]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Introduce gdb_tilde_expand
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
7da0a886
SDJ
12017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5 (COMMON_OBS): Add gdb_tilde_expand.o.
6 * common/gdb_tilde_expand.c: New file.
7 * common/gdb_tilde_expand.h: Likewise.
8
db8dd160
MR
92017-10-03 Maciej W. Rozycki <macro@imgtec.com>
10
11 * gdbarch.sh (objfile): Remove duplicate declaration.
12 * gdbarch.h: Regenerate.
13
f8bfbf22
TT
142017-10-03 Tom Tromey <tom@tromey.com>
15
16 * utils.c (internal_vproblem): Use string_vprintf.
17
5178ed48
TT
182017-10-03 Tom Tromey <tom@tromey.com>
19
20 * printcmd.c (info_symbol_command): Use std::string.
21
8cff8730
TT
222017-10-03 Tom Tromey <tom@tromey.com>
23
24 * top.c (gdb_safe_append_history): Use std::string.
25
895b8f30
TT
262017-10-03 Tom Tromey <tom@tromey.com>
27
28 * event-top.c (stdin_event_handler): Update.
29 * main.c (captured_main_1): Update.
30 * top.h (make_delete_ui_cleanup): Remove.
31 (struct ui): Add constructor and destructor.
32 (new_ui, delete_ui): Remove.
33 * top.c (make_delete_ui_cleanup): Remove.
34 (new_ui_command): Use std::unique_ptr.
35 (delete_ui_cleanup): Remove.
36 (ui::ui): Rename from new_ui. Update.
37 (free_ui): Remove.
38 (ui::~ui): Rename from delete_ui. Update.
39
0efef640
TT
402017-10-03 Tom Tromey <tom@tromey.com>
41
42 * symfile.c (load_progress): Use gdb::byte_vector.
43
245ad7d3
TT
442017-10-03 Tom Tromey <tom@tromey.com>
45
46 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
47 declaration.
48 * printcmd.c (x_command): Remove unused declaration.
49 * symfile.c (symbol_file_command): Remove unused declaration.
50
e05550d7
TT
512017-10-03 Tom Tromey <tom@tromey.com>
52
53 * utils.c (internal_vproblem): Use std::string.
54 (defaulted_query): Likewise.
55
b95de2b7
TT
562017-10-03 Tom Tromey <tom@tromey.com>
57
58 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
59 * top.c (execute_command_to_string): Update.
60 * utils.c (make_cleanup_restore_page_info): Remove.
61 (do_restore_page_info_cleanup): Remove.
62 (set_batch_flag_and_restore_page_info):
63 New.
64 (make_cleanup_restore_page_info): Remove.
65 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
66 (~set_batch_flag_and_restore_page_info): New
67 (make_cleanup_restore_uinteger): Remove.
68 (make_cleanup_restore_integer): Remove.
69 (struct restore_integer_closure): Remove.
70 (restore_integer): Remove.
71 * utils.h (struct set_batch_flag_and_restore_page_info): New
72 class.
73 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
74 (make_cleanup_restore_page_info): Remove.
75 (make_cleanup_restore_uinteger) Remove.
76 (make_cleanup_restore_integer) Remove.
77
07036511
TT
782017-10-03 Tom Tromey <tom@tromey.com>
79
80 * record-full.h (record_full_gdb_operation_disable_set): Return
81 scoped_restore_tmpl<int>.
82 * infrun.c (adjust_pc_after_break): Update.
83 (handle_signal_stop): Update.
84 * record-full.c (record_full_gdb_operation_disable_set): Return
85 scoped_restore_tmpl<int>.
86 (record_full_wait_1, record_full_insert_breakpoint)
87 (record_full_remove_breakpoint, record_full_save)
88 (record_full_goto_insn): Update.
89
45320ffa
TT
902017-10-02 Tom Tromey <tom@tromey.com>
91
92 PR rust/22236:
93 * rust-lang.c (rust_val_print_str): New function.
94 (val_print_struct): Call it.
95 (rust_subscript): Preserve name of slice type.
96
b3e3859b
TT
972017-10-02 Tom Tromey <tom@tromey.com>
98
99 * rust-lang.c (rust_subscript): Handle slices in
100 EVAL_AVOID_SIDE_EFFECTS case.
101
01af5e0d
TT
1022017-10-02 Tom Tromey <tom@tromey.com>
103
104 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
105
888e3ddb
TT
1062017-10-02 Tom Tromey <tom@tromey.com>
107
108 * rust-lang.h (rust_slice_type): Add "extern".
109
cc536b21
PA
1102017-10-02 Tom Tromey <tom@tromey.com>
111 Pedro Alves <palves@redhat.com>
112
113 * ada-lang.h (ada_exc_info::operator<): Make const.
114 (ada_exc_info::operator==): Make const.
115 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
116 Make const.
117
386c8614
TT
1182017-09-29 Tom Tromey <tom@tromey.com>
119
120 * target.c (read_whatever_is_readable): Change type of "result".
121 Update.
122 (free_memory_read_result_vector): Remove.
123 (read_memory_robust): Change return type. Update.
124 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
125 bin2hex, std::string.
126 * target.h (memory_read_result_s): Remove typedef.
127 (free_memory_read_result_vector): Remove.
128 (read_memory_robust): Return std::vector.
129
789c4b5e
TT
1302017-09-29 Tom Tromey <tom@tromey.com>
131
132 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
133
ab816a27
TT
1342017-09-29 Tom Tromey <tom@tromey.com>
135
136 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
137 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
138 operator< and operator==.
139 (ada_exceptions_list): Return a std::vector.
140 * ada-lang.c (ada_exc_info::operator<): Rename from
141 compare_ada_exception_info.
142 (ada_exc_info::operator==): New.
143 (sort_remove_dups_ada_exceptions_list): Change type of
144 "exceptions".
145 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
146 (ada_add_global_exceptions): Likewise.
147 (ada_exceptions_list_1): Return a std::vector.
148 (ada_exceptions_list): Likewise.
149
52f9abe4
TT
1502017-09-29 Tom Tromey <tom@tromey.com>
151
152 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
153 'std::set *'.
154 (print_one_inferior): Update.
155 (free_vector_of_ints): Remove.
156 (list_available_thread_groups): Change "ids" to std::set.
157 (mi_cmd_list_thread_groups): Update.
158 (struct collect_cores_data) <core>: Now a std::set.
159 (collect_cores): Update.
160 (unique): Remove.
161 (print_one_inferior): Update.
162
dcd5ddcc
TT
1632017-09-29 Tom Tromey <tom@tromey.com>
164
165 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
166 (mi_execute_async_cli_command): Likewise.
167 (mi_cmd_trace_frame_collected): Use field_fmt.
168
45d288cc
TT
1692017-09-29 Tom Tromey <tom@tromey.com>
170
171 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
172 gdb::byte_vector.
173
6afe2f4a
TT
1742017-09-29 Tom Tromey <tom@tromey.com>
175
176 * mi/mi-parse.c (mi_parse): Remove unused declaration.
177
9813429a
TT
1782017-09-29 Tom Tromey <tom@tromey.com>
179
180 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
181
2d6960b4
TT
1822017-09-29 Tom Tromey <tom@tromey.com>
183
184 * varobj.h (varobj_gen_name): Return std::string.
185 * varobj.c (varobj_gen_name): Return std::string.
186 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
187 (mi_cmd_var_delete): Don't copy "name".
188
784c453a
TT
1892017-09-29 Tom Tromey <tom@tromey.com>
190
191 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
192 (mi_cmd_break_insert_1): Update.
193
a9bc57b9
TT
1942017-09-29 Tom Tromey <tom@tromey.com>
195
196 * target.h (make_scoped_defer_target_commit_resume): Update.
197 * target.c (make_scoped_defer_target_commit_resume): Rename from
198 make_cleanup_defer_target_commit_resume. Return a
199 scoped_restore.
200 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
201
9754d8c4
TT
2022017-09-29 Tom Tromey <tom@tromey.com>
203
204 * main.c (captured_main_1): Remove unused declaration.
205 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
206
99ef965c
TT
2072017-09-29 Tom Tromey <tom@tromey.com>
208
209 * symtab.c (search_symbols): Remove unused outer cleanup.
210 (make_source_files_completion_list): Remove unused declaration.
211
42518ba7
TT
2122017-09-29 Tom Tromey <tom@tromey.com>
213
214 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
215
726b2169
TT
2162017-09-29 Tom Tromey <tom@tromey.com>
217
218 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
219 gdb::byte_vector.
220
55b06432
TT
2212017-09-29 Tom Tromey <tom@tromey.com>
222
223 * complaints.c (vcomplaint): Use std::string.
224
8abcee91
TT
2252017-09-29 Tom Tromey <tom@tromey.com>
226
227 * tracepoint.c (trace_variable_command): Use std::string.
228 (encode_actions_1): Remove unused declarations.
229 (create_tsv_from_upload): Use std::string.
230
6ad94bc7
TT
2312017-09-29 Tom Tromey <tom@tromey.com>
232
233 * cp-support.c (gdb_demangle): Use std::string.
234
2003f3d8
TT
2352017-09-29 Tom Tromey <tom@tromey.com>
236
237 * stack.c (parse_frame_specification): Use std::string
238 (info_frame_command): Use gdb::unique_xmalloc_ptr.
239
8f8accb5
TT
2402017-09-29 Tom Tromey <tom@tromey.com>
241
242 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
243
200aa7b1
TT
2442017-09-29 Tom Tromey <tom@tromey.com>
245
246 * utils.c (vfprintf_maybe_filtered): Use std::string.
247 (vfprintf_unfiltered): Likewise.
248
606aae8a
TT
2492017-09-29 Tom Tromey <tom@tromey.com>
250
251 * event-top.c (top_level_prompt): Return std::string.
252 (display_gdb_prompt): Update.
253
bd413795
TT
2542017-09-29 Tom Tromey <tom@tromey.com>
255
256 * unittests/common-utils-selftests.c (format): New function.
257 (string_vprintf_tests): New function.
258 (_initialize_common_utils_selftests): Register new tests.
259 * common/common-utils.c (string_vprintf): New function.
260 * common/common-utils.h (string_vprintf): Declare.
261
256642e8
PA
2622017-09-29 Pedro Alves <palves@redhat.com>
263
264 * common/rsp-low.c (unpack_varlen_hex): Constify.
265 * common/rsp-low.h (unpack_varlen_hex): Constify.
266 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
267 Constify.
268 * remote.c (remote_set_permissions, read_ptid)
269 (remote_current_thread, remote_get_threads_with_qthreadinfo)
270 (remote_static_tracepoint_marker_at)
271 (remote_static_tracepoint_markers_by_strid)
272 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
273 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
274 (parse_tracepoint_definition, parse_tsv_definition)
275 (parse_static_tracepoint_marker_definition): Constify.
276 * tracepoint.h (parse_static_tracepoint_marker_definition)
277 (parse_trace_status, parse_tracepoint_status)
278 (parse_tracepoint_definition, parse_tsv_definition): Constify.
279
b6bb3468
PA
2802017-09-29 Pedro Alves <palves@redhat.com>
281
282 * remote.c (target_buf, target_buf_size): Delete.
283 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
284 Use the connection's packet buffer instead.
285 All callers adjusted.
286 (_initialize_remote): Remove references to target_buf and
287 target_buf_size.
288
b2f8eb7a
PA
2892017-09-28 Pedro Alves <palves@redhat.com>
290
291 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
292 unittests/common-utils-selftests.c.
293 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
294 (COMMON_OBS): Remove utils-selftests.o.
295 * utils-selftests.c: Move to ...
296 * unittests/common-utils-selftests.c: ... here and rename self
297 test to "string_printf".
298
08302ed2
DE
2992017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
300
301 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
302 having NULL cus or tus.
303
96a5a1d3
UW
3042017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
305
306 * arm-tdep.c: (convert_from_extended): Remove.
307 (convert_to_extended): Likewise.
308 (arm_extract_return_value): Use convert_typed_floating.
309 (arm_store_return_value): Likewise.
310
311 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
312 * sh-tdep.c: Do not include "floatformat.h".
313 (sh_littlebyte_bigword_type): New function.
314 (sh_register_convert_to_virtual): Use convert_typed_floating.
315 (sh_register_convert_to_raw): Likewise.
316 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
317 (sh64_littlebyte_bigword_type): New function.
318 (sh64_extract_return_value): Use convert_typed_floating.
319 (sh64_register_convert_to_virtual): Likewise.
320 (sh64_register_convert_to_raw): Likewise.
321
0db7851f
UW
3222017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
323
324 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
325 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
326
327 * gdbtypes.h (union type_specific): Make field floatformat hold
328 just a single struct floatformat, not an array.
329 (floatformat_from_type): Move here.
330 * gdbtypes.c (floatformat_from_type): Move here. Update to
331 changed TYPE_FLOATFORMAT definition.
332 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
333 (recursive_dump_type): Likewise.
334 (init_float_type): Install correct floatformat for byte order.
335 (arch_float_type): Likewise.
336
77b7c781
UW
3372017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
338
339 * gdbtypes.c (init_type): Change incoming argument from
340 length-in-bytes to length-in-bits. Assert length is a
341 multiple of TARGET_CHAR_BITS.
342 (arch_type, arch_flags_type): Likewise.
343 (init_integer_type): Update call to init_type.
344 (init_character_type): Likewise.
345 (init_boolean_type): Likewise.
346 (init_float_type): Likewise.
347 (init_decfloat_type): Likewise.
348 (init_complex_type): Likewise.
349 (init_pointer_type): Likewise.
350 (objfile_type): Likewise.
351 (arch_integer_type): Update call to arch_type.
352 (arch_character_type): Likewise.
353 (arch_boolean_type): Likewise.
354 (arch_float_type): Likewise.
355 (arch_decfloat_type): Likewise.
356 (arch_complex_type): Likewise.
357 (arch_pointer_type): Likewise.
358 (gdbtypes_post_init): Likewise.
359
360 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
361 (read_base_type): Likewise.
362 * mdebugread.c (basic_type): Likewise.
363 * stabsread.c (dbx_init_float_type): Likewise.
364 (rs6000_builtin_type): Likewise.
365 (read_range_type): Likewise. Also, fix call to init_integer_type
366 with erroneous length argument.
367
368 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
369 * d-lang.c (build_d_types): Likewise.
370 * f-lang.c (build_fortran_types): Likewise.
371 * go-lang.c (build_go_types): Likewise.
372 * opencl-lang.c (build_opencl_types): Likewise.
373 * jit.c (finalize_symtab): Likewise.
374 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
375 (build_std_type_info_type): Likewise.
376 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
377 update call to arch_flags_type.
378
379 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
380 arch_type.
381 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
382 * windows-tdep.c (windows_get_tlb_type): Likewise.
383
384 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
385 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
386 * m32c-tdep.c (make_types): Likewise.
387 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
388 (rl78_psw_type): Update call to arch_flags_type.
389 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
390 * rx-tdep.c (rx_psw_type): Likewise.
391 (rx_fpsw_type): Likewise.
392 * sparc-tdep.c (sparc_psr_type): Likewise.
393 (sparc_fsr_type): Likewise.
394 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
395 (sparc64_ccr_type): Likewise.
396 (sparc64_fsr_type): Likewise.
397 (sparc64_fprs_type): Likewise.
398
f21b4d5c
TT
3992017-09-27 Tom Tromey <tom@tromey.com>
400
401 * findcmd.c (find_command): Constify.
402
643c2ffa
TT
4032017-09-27 Tom Tromey <tom@tromey.com>
404
405 * ada-tasks.c (task_command_1, task_command): Constify.
406
510e5e56
TT
4072017-09-27 Tom Tromey <tom@tromey.com>
408
409 * symtab.c (maintenance_print_symbol_cache)
410 (maintenance_flush_symbol_cache)
411 (maintenance_print_symbol_cache_statistics): Constify.
412
e503b191
TT
4132017-09-27 Tom Tromey <tom@tromey.com>
414
415 * inferior.c (detach_inferior_command, kill_inferior_command)
416 (inferior_command): Constify.
417
4e001312
TT
4182017-09-27 Tom Tromey <tom@tromey.com>
419
420 * regcache.c (regcache_print, maintenance_print_registers)
421 (maintenance_print_raw_registers)
422 (maintenance_print_cooked_registers)
423 (maintenance_print_register_groups)
424 (maintenance_print_remote_registers): Constify.
425
77763700
TT
4262017-09-27 Tom Tromey <tom@tromey.com>
427
428 * printcmd.c (map_display_numbers, undisplay_command)
429 (enable_disable_display_command, enable_display_command)
430 (disable_display_command): Constify.
431
4495129a
TT
4322017-09-27 Tom Tromey <tom@tromey.com>
433
434 * breakpoint.h (delete_command): Don't declare.
435 * breakpoint.c (delete_command, enable_once_command)
436 (enable_count_command, enable_delete_command, breakpoint_1)
437 (maintenance_info_breakpoints, stopin_command, stopat_command)
438 (delete_command, delete_trace_command, save_breakpoints)
439 (save_breakpoints_command, save_tracepoints_command): Constify.
440
3088cf40
TT
4412017-09-27 Tom Tromey <tom@tromey.com>
442
443 * macrocmd.c (macro_expand_command, macro_expand_once_command)
444 (skip_ws, extract_identifier, macro_define_command)
445 (macro_undef_command, macro_list_command): Constify.
446
69f476a3
TT
4472017-09-27 Tom Tromey <tom@tromey.com>
448
449 * infcmd.c (environment_info, set_environment_command)
450 (unset_environment_command, path_info, info_proc_cmd_1)
451 (info_proc_cmd_mappings, info_proc_cmd_stat)
452 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
453 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
454
c4a3e68e
TT
4552017-09-27 Tom Tromey <tom@tromey.com>
456
457 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
458 Constify.
459
c9d31bd6
TT
4602017-09-27 Tom Tromey <tom@tromey.com>
461
462 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
463
1f3f85eb
TT
4642017-09-27 Tom Tromey <tom@tromey.com>
465
466 * demangle.c (demangle_command): Constify.
467
9c504b5d
TT
4682017-09-27 Tom Tromey <tom@tromey.com>
469
470 * progspace.c (maintenance_info_program_spaces_command):
471 Constify.
472
6663cf91
TT
4732017-09-27 Tom Tromey <tom@tromey.com>
474
475 * compile/compile.c (check_raw_argument, compile_file_command)
476 (compile_code_command, compile_print_command): Constify.
477
34e5fa26
TT
4782017-09-27 Tom Tromey <tom@tromey.com>
479
480 * reggroups.c (maintenance_print_reggroups): Constify.
481
8384c356
TT
4822017-09-27 Tom Tromey <tom@tromey.com>
483
484 * dwarf2read.c (save_gdb_index_command): Constify.
485
884beb0c
TT
4862017-09-27 Tom Tromey <tom@tromey.com>
487
488 * stap-probe.c (info_probes_stap_command): Constify.
489
e0b2930c
TT
4902017-09-27 Tom Tromey <tom@tromey.com>
491
492 * fork-child.c (unset_exec_wrapper_command): Constify.
493
f938677d
TT
4942017-09-27 Tom Tromey <tom@tromey.com>
495
496 * btrace.c (get_uint, get_context_size, no_chunk)
497 (maint_btrace_packet_history_cmd)
498 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
499 (maint_info_btrace_cmd): Constify.
500
8949cb87
TT
5012017-09-27 Tom Tromey <tom@tromey.com>
502
503 * reverse.c (delete_bookmark_command): Constify.
504
ac88e2de
TT
5052017-09-27 Tom Tromey <tom@tromey.com>
506
507 * remote.c (set_memory_packet_size)
508 (set_memory_write_packet_size, show_memory_write_packet_size)
509 (set_memory_read_packet_size, show_memory_read_packet_size)
510 (compare_sections_command, packet_command, remote_put_command)
511 (remote_get_command, remote_delete_command): Constify.
512
bd4c9dfe
TT
5132017-09-27 Tom Tromey <tom@tromey.com>
514
515 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
516 (set_mipsfpu_double_command, set_mipsfpu_none_command)
517 (set_mipsfpu_auto_command): Constify.
518
5e93d4c6
TT
5192017-09-27 Tom Tromey <tom@tromey.com>
520
521 * cli/cli-cmds.h (cd_command): Constify.
522 * cli/cli-cmds.c (cd_command): Constify.
523
fc41a75b
TT
5242017-09-27 Tom Tromey <tom@tromey.com>
525
526 * thread.c (thread_name_command, thread_find_command): Constify.
527
67810076
TT
5282017-09-27 Tom Tromey <tom@tromey.com>
529
530 * probe.c (enable_probes_command, disable_probes_command):
531 Constify.
532
1d8b34a7
TT
5332017-09-27 Tom Tromey <tom@tromey.com>
534
535 * symfile.c (symbol_file_command): Constify.
536 * gdbcore.h (deprecated_file_changed_hook): Constify.
537 * exec.c (deprecated_file_changed_hook, exec_file_command)
538 (file_command): Constify.
539 * defs.h (symbol_file_command): Constify.
540
442019e1
TT
5412017-09-27 Tom Tromey <tom@tromey.com>
542
543 * remote-fileio.c (set_system_call_allowed)
544 (show_system_call_allowed): Constify.
545
2983f7cb
TT
5462017-09-27 Tom Tromey <tom@tromey.com>
547
548 * tracepoint.c (delete_trace_variable_command)
549 (tfind_end_command, tfind_start_command, tfind_pc_command)
550 (tfind_tracepoint_command, tfind_line_command)
551 (tfind_range_command, tfind_outside_command): Constify.
552
4fd41b24
TT
5532017-09-27 Tom Tromey <tom@tromey.com>
554
555 * ax-gdb.c (maint_agent_printf_command, agent_command)
556 (agent_eval_command): Constify.
557
f2fc3015
TT
5582017-09-27 Tom Tromey <tom@tromey.com>
559
560 * tracepoint.c (info_scope_command): Constify.
561 * python/python.c (gdbpy_decode_line): Constify.
562 * python/py-breakpoint.c (bppy_init): Constify.
563 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
564 * location.h: (new_linespec_location)
565 (string_to_event_location_basic, string_to_event_location):
566 Constify.
567 * location.c (new_linespec_location)
568 (string_to_event_location_basic, string_to_event_location):
569 Constify.
570 * linespec.h (decode_line_with_current_source)
571 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
572 * linespec.c (linespec_lex_to_end)
573 (decode_line_with_current_source)
574 (decode_line_with_last_displayed): Constify.
575 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
576 Constify.
577 * cli/cli-cmds.c (edit_command, list_command): Constify.
578 * breakpoint.h (until_break_command, watch_command_wrapper)
579 (awatch_command_wrapper, rwatch_command_wrapper)
580 (init_ada_exception_breakpoint): Constify.
581 * breakpoint.c (break_command_1, dprintf_command)
582 (break_range_command, watch_command_wrapper)
583 (rwatch_command_wrapper, awatch_command_wrapper)
584 (until_break_command, init_ada_exception_breakpoint)
585 (strace_marker_create_sals_from_location, trace_command)
586 (ftrace_command, strace_command, struct tracepoint): Constify.
587 * ax-gdb.c (agent_command_1): Constify.
588 * ada-lang.c (ada_exception_sal): Constify.
589
8c2f95f4
TT
5902017-09-27 Tom Tromey <tom@tromey.com>
591
592 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
593 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
594 (get_context_size, no_chunk, get_insn_history_modifiers)
595 (cmd_record_insn_history, get_call_history_modifiers)
596 (cmd_record_call_history): Constify.
597
a0d65762
TT
5982017-09-27 Tom Tromey <tom@tromey.com>
599
600 * source.c (show_substitute_path_command)
601 (unset_substitute_path_command, set_substitute_path_command):
602 Constify.
603
58971144
TT
6042017-09-27 Tom Tromey <tom@tromey.com>
605
606 * typeprint.c (maintenance_print_type): Constify.
607 * maint.c (maintenance_dump_me, maintenance_demangle)
608 (maintenance_time_display, maintenance_info_sections)
609 (maintenance_print_statistics, maintenance_deprecate)
610 (maintenance_undeprecate): Constify.
611 (maintenance_do_deprecate): Constify. Use std::string.
612 (maintenance_selftest): Constify.
613 * gdbtypes.h (maintenance_print_type): Constify.
614
c482f52c
TT
6152017-09-27 Tom Tromey <tom@tromey.com>
616
617 * hppa-tdep.c (unwind_command): Constify.
618
e100df1a
TT
6192017-09-27 Tom Tromey <tom@tromey.com>
620
621 * target-descriptions.c (unset_tdesc_filename_cmd)
622 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
623 Constify.
624
31d56ade
TT
6252017-09-27 Tom Tromey <tom@tromey.com>
626
627 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
628
b961da0b
TT
6292017-09-27 Tom Tromey <tom@tromey.com>
630
631 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
632
e2d8ae16
TT
6332017-09-27 Tom Tromey <tom@tromey.com>
634
635 * tui/tui-regs.c (tui_reg_command): Constify.
636
863779b0
TT
6372017-09-27 Tom Tromey <tom@tromey.com>
638
639 * skip.c (skip_file_command, skip_function_command)
640 (skip_enable_command, skip_disable_command, skip_delete_command):
641 Constify.
642
cdb34d4a
TT
6432017-09-27 Tom Tromey <tom@tromey.com>
644
645 * record-btrace.c (cmd_record_btrace_bts_start)
646 (cmd_record_btrace_pt_start): Constify.
647
e99c83e7
TT
6482017-09-27 Tom Tromey <tom@tromey.com>
649
650 * symmisc.c (maintenance_print_symbols)
651 (maintenance_print_msymbols, maintenance_print_objfiles)
652 (maintenance_info_symtabs, maintenance_check_symtabs)
653 (maintenance_expand_symtabs, maintenance_info_line_tables):
654 Constify.
655
32faf971
TT
6562017-09-27 Tom Tromey <tom@tromey.com>
657
658 * top.c (new_ui_command): Constify.
659
2cf311eb
TT
6602017-09-27 Tom Tromey <tom@tromey.com>
661
662 * symfile.c (add_symbol_file_command)
663 (remove_symbol_file_command, list_overlays_command)
664 (map_overlay_command, unmap_overlay_command)
665 (overlay_auto_command, overlay_manual_command)
666 (overlay_off_command, overlay_load_command): Constify.
667
e6738699
TT
6682017-09-27 Tom Tromey <tom@tromey.com>
669
670 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
671 (info_spu_mailbox_command, info_spu_dma_command)
672 (info_spu_proxydma_command): Constify.
673
aa360cd5
TT
6742017-09-27 Tom Tromey <tom@tromey.com>
675
676 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
677
898241a5
TT
6782017-09-27 Tom Tromey <tom@tromey.com>
679
680 * cli/cli-script.c (user_defined_command): Constify.
681
2d0ac106
TT
6822017-09-27 Tom Tromey <tom@tromey.com>
683
684 * cli/cli-dump.c (dump_memory_command, dump_value_command)
685 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
686 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
687 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
688 (dump_binary_value, append_binary_memory, append_binary_value):
689 Constify.
690 (struct dump_context) <func>: Constify.
691 (add_dump_command): Update.
692
dede02ce
TT
6932017-09-27 Tom Tromey <tom@tromey.com>
694
695 * cli/cli-cmds.c (show_version, show_configuration)
696 (source_command, show_user): Constify.
697
d3cb6b99
TT
6982017-09-27 Tom Tromey <tom@tromey.com>
699
700 * target.c (maintenance_print_target_stack): Constify.
701
1970a12f
TT
7022017-09-27 Tom Tromey <tom@tromey.com>
703
704 * interps.c (interpreter_exec_cmd): Constify.
705
41243651
TT
7062017-09-27 Tom Tromey <tom@tromey.com>
707
708 * record-full.c (cmd_record_full_restore): Constify.
709
4465d9db
TT
7102017-09-27 Tom Tromey <tom@tromey.com>
711
712 * memattr.c (enable_mem_command, disable_mem_command)
713 (delete_mem_command): Constify.
714
ad25e423
TT
7152017-09-27 Tom Tromey <tom@tromey.com>
716
717 * value.c (show_convenience): Constify.
718
d64097b1
TT
7192017-09-27 Tom Tromey <tom@tromey.com>
720
721 * gdbcore.h (core_file_command): Update.
722 * corefile.c (core_file_command): Constify.
723
4d4589ef
TT
7242017-09-27 Tom Tromey <tom@tromey.com>
725
726 * user-regs.c (maintenance_print_user_registers): Constify.
727
32a7bf17
TT
7282017-09-27 Tom Tromey <tom@tromey.com>
729
730 * cp-namespace.c (maintenance_cplus_namespace): Constify.
731
4a475551
TT
7322017-09-27 Tom Tromey <tom@tromey.com>
733
734 * cp-support.c (first_component_command): Constify.
735
990b9f9f
TT
7362017-09-27 Tom Tromey <tom@tromey.com>
737
738 * psymtab.c (maintenance_print_psymbols)
739 (maintenance_info_psymtabs, maintenance_check_psymtabs):
740 Constify.
741
c281872e
TT
7422017-09-27 Tom Tromey <tom@tromey.com>
743
744 * windows-tdep.c (display_tib): Constify.
745
5b64bf74
TT
7462017-09-27 Tom Tromey <tom@tromey.com>
747
748 * linux-fork.c (delete_checkpoint_command)
749 (detach_checkpoint_command): Constify.
750
4ada038f
TT
7512017-09-27 Tom Tromey <tom@tromey.com>
752
753 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
754
57f5a81b
TT
7552017-09-27 Tom Tromey <tom@tromey.com>
756
757 * arc-tdep.c (dump_arc_instruction_command): Constify.
758
b0a8e6c4
TT
7592017-09-27 Tom Tromey <tom@tromey.com>
760
761 * valprint.c (set_radix, show_radix): Constify.
762
8d97dc1c
TT
7632017-09-27 Tom Tromey <tom@tromey.com>
764
765 * dtrace-probe.c (info_probes_dtrace_command): Constify.
766
eb7c454d
TT
7672017-09-27 Tom Tromey <tom@tromey.com>
768
769 * command.h (not_just_help_class_command): Update.
770 * cli/cli-decode.h (not_just_help_class_command): Update.
771 * cli/cli-decode.c (not_just_help_class_command): Constify.
772
e4e33335
TT
7732017-09-27 Tom Tromey <tom@tromey.com>
774
775 * gdb_bfd.c (maintenance_info_bfds): Constify.
776
0450cc4c
TT
7772017-09-27 Tom Tromey <tom@tromey.com>
778
779 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
780 overloads.
781 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
782 (do_const_cfunc): New function.
783 (cmd_cfunc_eq): New overload.
784 (cli_user_command_p): Check do_const_cfunc.
785 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
786 const_cfunc.
787 * command.h (add_cmd): Add const overload and no-function
788 overload.
789 (set_cmd_cfunc): Add const overload.
790 (cmd_const_cfunc_ftype): Declare.
791 (cmd_cfunc_eq): Add const overload.
792 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
793 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
794 overload.
795
a9bbfbd8
TT
7962017-09-27 Tom Tromey <tom@tromey.com>
797
798 * macroexp.c (get_next_token_for_substitution): New function.
799 (substitute_args): Call it. Check for __VA_OPT__.
800
5230b05a
WT
8012017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
802 Pedro Alves <palves@redhat.com>
803
804 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
805 producer_is_icc_lt_14.
806 (producer_is_icc_lt_14): New function.
807 (check_producer): Add code for checking version of ICC.
808 (producer_is_icc): Move to producer.c.
809 (read_structure_type): Restrict ICC workaround to ICC<14.
810 * producer.c: Include selftest.h.
811 (producer_is_icc, producer_parsing_tests, _initialize_producer):
812 New functions.
813 * producer.h (producer_is_icc): New declaration.
814
b32b108a
WT
8152017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
816
817 * Makefile.in (SFILES): Add producer.c.
818 (COMMON_OBS): Add producer.o
819 * amd64-tdep.c (producer.h): Add new include.
820 * dwarf2read.c (producer.h): Add new include.
821 * producer.c: New file.
822 * producer.h: New file.
823 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
824 producer.c.
825 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
826 producer.h.
827
5007d765
MK
8282017-09-26 Matthias Klose <doko@ubuntu.com>
829
830 * configure.ac: Search ncursesw before ncurses.
831 Check ncursesw/ncurses.h before ncurses/ncurses.h.
832 * gdb_curses.h: Include <ncursesw/ncurses.h>
833 * config.in, configure: Regenerate.
834
281c4447
RO
8352017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
836
837 PR gdb/22185
838 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
839 obsolete.
840 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
841 Remove i386sol2 support.
842 * configure.nat <i386sol2>: Remove.
843 <sol2-64>: Fold into ...
844 <sol2>: ... this.
845 Move common settings to default section.
846 Add sol-thread.o.
847 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
848 x86_64-*-solaris2.1[0-9]*>: Rename to ...
849 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
850 <i[34567]86-*-solaris*>: Remove.
851 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
852
853 * configure.ac: Remove wctype in libw check.
854 (_MSE_INT_H): Don't define on Solaris 7-9.
855 <solaris*>: Remove libthread_db.so.1 check.
856 * configure: Regenerate.
857 * config.in: Regenerate.
858
859 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
860 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
861 (gdb_ps_size_t): Remove.
862 Use base types in users.
863 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
864
865 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
866
39b06c20
RO
8672017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
868
869 PR build/22206
870 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
871 (adi_is_addr_mapped): Likewise.
872 (PSR_ICC): Don't redefine.
873 (PSR_IMPL): Likewise.
874
6c3e20f1
TT
8752017-09-25 Tom Tromey <tom@tromey.com>
876
877 * regcache.c (regcache::dump): Use string_printf.
878
b292235f
TT
8792017-09-25 Tom Tromey <tom@tromey.com>
880
881 * regcache.c (class regcache_invalidator): New.
882 (struct register_to_invalidate): Remove.
883 (make_cleanup_regcache_invalidate): Remove.
884 (regcache::raw_write): Use regcache_invalidator.
885
9ac86b52
TT
8862017-09-25 Tom Tromey <tom@tromey.com>
887
888 * spu-tdep.c (spu2ppu_sniffer): Update.
889 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
890 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
891 Remove.
892 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
893 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
894 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
895 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
896 (frame_pop): Update.
897
c0e383c6
TT
8982017-09-25 Tom Tromey <tom@tromey.com>
899
900 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
901 * regcache.h (regcache_xfree): Don't declare.
902 * regcache.c (regcache_xfree): Remove.
903 (do_regcache_xfree): Use delete.
904 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
905 * linux-fork.c (free_fork): Use delete.
906 (fork_save_infrun_state): Likewise.
907 * jit.c (jit_dealloc_cache): Use delete.
908 * infrun.c (discard_infcall_suspend_state): Use delete.
909
791199cc
TT
9102017-09-25 Tom Tromey <tom@tromey.com>
911
912 * regcache.h (regcache_xmalloc): Don't declare.
913 (regcache_raw_set_cached_value): Update comment.
914 * regcache.c (regcache_xmalloc): Remove.
915 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
916 * jit.c (jit_frame_sniffer): Use new.
917 * frame.c (frame_save_as_regcache): Use new.
918
289e23aa
AA
9192017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
920
921 * NEWS: Advertise support for guarded-storage registers on IBM z.
922
1b63490c
AA
9232017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
924
925 * s390-linux-nat.c (have_regset_gs): New static variable.
926 (s390_linux_fetch_inferior_registers): Handle guarded-storage
927 control block and guarded-storage broadcast control regsets.
928 (s390_read_description): Detect whether the target has
929 guarded-storage support, return appropriate tdesc.
930 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
931 (features/s390x-gs-linux64.c): Likewise.
932 (struct gdbarch_tdep) <have_gs>: New field.
933 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
934 (s390_gsbc_regset): New variables.
935 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
936 and s390_gsbc_regset, if applicable.
937 (s390_core_read_description): Check whether core file was from a
938 target with guarded-storage support; include appropriate regsets.
939 (s390_gdbarch_init): Add registers for guarded-storage support.
940 (_initialize_s390_tdep): Initialize new target descriptions that
941 include registers for guarded-storage support.
942 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
943 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
944 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
945 (S390_NUM_REGS): Adjust macro definition.
946 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
947 (tdesc_s390x_gs_linux64): New declarations.
948
96235dc1
AA
9492017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
950
951 * features/s390-gs-linux64.xml: New file.
952 * features/s390-gs.xml: New file.
953 * features/s390-gsbc.xml: New file.
954 * features/s390x-gs-linux64.xml: New file.
955 * features/Makefile (WHICH): Add s390-gs-linux64 and
956 s390x-gs-linux64.
957 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
958 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
959 * features/s390-gs-linux64.c: New generated file.
960 * features/s390x-gs-linux64.c: New file.
961 * regformats/s390-gs-linux64.dat: New file.
962 * regformats/s390x-gs-linux64.dat: New file.
963
b4a7c699
TT
9642017-09-23 Tom Tromey <tom@tromey.com>
965
966 * defs.h (make_cleanup_override_quit_handler): Don't declare.
967
c2f97536
TT
9682017-09-22 Tom Tromey <tom@tromey.com>
969
970 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
971 type to scoped_restore_tmpl.
972 <scoped_input_handler>: Initialize m_quit_handler directly.
973
43573013
SDJ
9742017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
975
976 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
977 (cd_command): Likewise. Free "current_directory" before
978 assigning to it.
979 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
980 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
981 * top.c (gdb_dirbuf): Remove global declaration.
982 * top.h (gdb_dirbuf): Likewise.
983
6ec2e0f5
SDJ
9842017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
985
986 * gnulib/aclocal.m4: Regenerate.
987 * gnulib/config.in: Regenerate.
988 * gnulib/configure: Regenerate.
989 * gnulib/import/Makefile.am: Regenerate.
990 * gnulib/import/Makefile.in: Regenerate.
991 * gnulib/import/assure.h: New file.
992 * gnulib/import/at-func.c: Likewise
993 * gnulib/import/chdir-long.c: New file.
994 * gnulib/import/chdir-long.h: New file.
995 * gnulib/import/cloexec.c: New file.
996 * gnulib/import/cloexec.h: New file.
997 * gnulib/import/close.c: New file.
998 * gnulib/import/closedir.c: New file.
999 * gnulib/import/dirent-private.h: New file.
1000 * gnulib/import/dup-safer.c: New file.
1001 * gnulib/import/dup.c: New file.
1002 * gnulib/import/dup2.c: New file.
1003 * gnulib/import/error.c: New file.
1004 * gnulib/import/error.h: New file.
1005 * gnulib/import/exitfail.c: New file.
1006 * gnulib/import/exitfail.h: New file.
1007 * gnulib/import/fchdir.c: New file.
1008 * gnulib/import/fcntl.c: New file.
1009 * gnulib/import/fcntl.in.h: New file.
1010 * gnulib/import/fd-hook.c: New file.
1011 * gnulib/import/fd-hook.h: New file.
1012 * gnulib/import/fd-safer.c: New file.
1013 * gnulib/import/fdopendir.c: New file.
1014 * gnulib/import/filename.h: New file.
1015 * gnulib/import/filenamecat-lgpl.c: New file.
1016 * gnulib/import/filenamecat.h: New file.
1017 * gnulib/import/fstat.c: New file.
1018 * gnulib/import/fstatat.c: New file.
1019 * gnulib/import/getcwd-lgpl.c: New file.
1020 * gnulib/import/getcwd.c: New file.
1021 * gnulib/import/getdtablesize.c: New file.
1022 * gnulib/import/getlogin_r.c: New file.
1023 * gnulib/import/getprogname.c: New file.
1024 * gnulib/import/getprogname.h: New file.
1025 * gnulib/import/gettext.h: New file.
1026 * gnulib/import/glob-libc.h: New file.
1027 * gnulib/import/glob.c: New file.
1028 * gnulib/import/glob.in.h: New file.
1029 * gnulib/import/intprops.h: New file.
1030 * gnulib/import/m4/chdir-long.m4: New file.
1031 * gnulib/import/m4/close.m4: New file.
1032 * gnulib/import/m4/closedir.m4: New file.
1033 * gnulib/import/m4/d-ino.m4: New file.
1034 * gnulib/import/m4/d-type.m4: New file.
1035 * gnulib/import/m4/dup.m4: New file.
1036 * gnulib/import/m4/dup2.m4: New file.
1037 * gnulib/import/m4/error.m4: New file.
1038 * gnulib/import/m4/fchdir.m4: New file.
1039 * gnulib/import/m4/fcntl.m4: New file.
1040 * gnulib/import/m4/fcntl_h.m4: New file.
1041 * gnulib/import/m4/fdopendir.m4: New file.
1042 * gnulib/import/m4/filenamecat.m4: New file.
1043 * gnulib/import/m4/fstat.m4: New file.
1044 * gnulib/import/m4/fstatat.m4: New file.
1045 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1046 * gnulib/import/m4/getcwd-path-max.m4: New file.
1047 * gnulib/import/m4/getcwd.m4: New file.
1048 * gnulib/import/m4/getdtablesize.m4: New file.
1049 * gnulib/import/m4/getlogin_r.m4: New file.
1050 * gnulib/import/m4/getprogname.m4: New file.
1051 * gnulib/import/m4/glob.m4: New file.
1052 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1053 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1054 * gnulib/import/m4/mempcpy.m4: New file.
1055 * gnulib/import/m4/memrchr.m4: New file.
1056 * gnulib/import/m4/mode_t.m4: New file.
1057 * gnulib/import/m4/msvc-inval.m4: New file.
1058 * gnulib/import/m4/msvc-nothrow.m4: New file.
1059 * gnulib/import/m4/open.m4: New file.
1060 * gnulib/import/m4/openat.m4: New file.
1061 * gnulib/import/m4/opendir.m4: New file.
1062 * gnulib/import/m4/readdir.m4: New file.
1063 * gnulib/import/m4/realloc.m4: New file.
1064 * gnulib/import/m4/rewinddir.m4: New file.
1065 * gnulib/import/m4/save-cwd.m4: New file.
1066 * gnulib/import/m4/strdup.m4: New file.
1067 * gnulib/import/m4/strerror.m4: New file.
1068 * gnulib/import/m4/unistd-safer.m4: New file.
1069 * gnulib/import/mempcpy.c: New file.
1070 * gnulib/import/memrchr.c: New file.
1071 * gnulib/import/msvc-inval.c: New file.
1072 * gnulib/import/msvc-inval.h: New file.
1073 * gnulib/import/msvc-nothrow.c: New file.
1074 * gnulib/import/msvc-nothrow.h: New file.
1075 * gnulib/import/open.c: New file.
1076 * gnulib/import/openat-die.c: New file.
1077 * gnulib/import/openat-priv.h: New file.
1078 * gnulib/import/openat-proc.c: New file.
1079 * gnulib/import/openat.c: New file.
1080 * gnulib/import/openat.h: New file.
1081 * gnulib/import/opendir.c: New file.
1082 * gnulib/import/pipe-safer.c: New file.
1083 * gnulib/import/readdir.c: New file.
1084 * gnulib/import/realloc.c: New file.
1085 * gnulib/import/rewinddir.c: New file.
1086 * gnulib/import/save-cwd.c: New file.
1087 * gnulib/import/save-cwd.h: New file.
1088 * gnulib/import/strdup.c: New file.
1089 * gnulib/import/strerror-override.c: New file.
1090 * gnulib/import/strerror-override.h: New file.
1091 * gnulib/import/strerror.c: New file.
1092 * gnulib/import/unistd--.h: New file.
1093 * gnulib/import/unistd-safer.h: New file.
1094 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1095 "getcwd" and "glob".
1096 * ser-tcp.c: Undefine "close" before redefining it.
1097
432ae719
SM
10982017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1099
1100 * guile/scm-value.c (gdbscm_value_address): Initialize address,
1101 get rid of res_val.
1102
4fa7574e
RO
11032017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1104
1105 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1106 <sol2,sparc>: Likewise.
1107 <sol2-64,i386>: Likewise.
1108
1109 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1110 -Wdeprecated-declarations on *-*-solaris*.
1111 * configure: Regenerate.
1112
1113 * procfs.c: Include "nat/inferior.h".
1114 (procfs_info_proc): Fix typo.
1115
f6327dcb
KB
11162017-09-21 Kevin Buettner <kevinb@redhat.com>
1117
1118 * remote.c (vector): Include.
1119 (struct private_thread_info): Add field, thread_handle.
1120 (free_private_thread_info): Deallocate storage associated with
1121 thread handle.
1122 (get_private_info_thread): Initialize `thread_handle' field.
1123 (struct thread_item): Add field, thread_handle.
1124 (clear_threads_listing_context): Deallocate storage associated
1125 with thread handle.
1126 (start_thread): Add support for "handle" attribute.
1127 (thread_attributes): Add "handle".
1128 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1129 field.
1130 (remote_update_thread_list): Update thread_handle.
1131 (remote_thread_handle_to_thread_info): New function.
1132 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1133
fbbe5337
KB
11342017-09-21 Kevin Buettner <kevinb@redhat.com>
1135
1136 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1137 function.
1138 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1139 * python/python-internal.h (thread_object_type): Declare.
1140
e04ee09e
KB
11412017-09-21 Kevin Buettner <kevinb@redhat.com>
1142
1143 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1144 (target_thread_handle_to_thread_info): Declare.
1145 * target.c (target_thread_handle_to_thread_info): New function.
1146 * target-delegates.c: Regenerate.
1147 * gdbthread.h (find_thread_by_handle): Declare.
1148 * thread.c (find_thread_by_handle): New function.
1149 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1150 function.
1151 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1152
1e5b66ed
SM
11532017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1154
1155 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1156
ebe48ba0
SM
11572017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1158
1159 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1160
0a0bf5dc
YQ
11612017-09-21 Yao Qi <yao.qi@linaro.org>
1162
1163 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1164 to gdb_target_obs.
1165
d1b0a7bf
TT
11662017-09-20 Tom Tromey <tom@tromey.com>
1167
1168 * breakpoint.c (struct counted_command_line): Remove.
1169 (breakpoint_commands): Update.
1170 (alloc_counted_command_line, incref_counted_command_line)
1171 (decref_counted_command_line, do_cleanup_counted_command_line)
1172 (make_cleanup_decref_counted_command_line): Remove.
1173 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1174 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1175 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1176 (save_breakpoints): Update.
1177 * breakpoint.h (counted_command_line): Now a typedef to
1178 shared_ptr.
1179 (struct breakpoint) <commands>: Now a counted_command_line.
1180 (struct bpstats) <command>: Likewise.
1181
48649e1b
TT
11822017-09-20 Tom Tromey <tom@tromey.com>
1183
1184 * breakpoint.c (struct commands_info, do_map_commands_command):
1185 Remove.
1186 (commands_command_1): Update.
1187 (iterate_over_related_breakpoints): Take a function_view.
1188 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1189 (delete_command): Update.
1190 (map_breakpoint_numbers): Take a function_view.
1191 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1192 (disable_command): Update.
1193 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1194 (enable_command): Update.
1195 (struct disp_data, do_enable_breakpoint_disp)
1196 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1197 (do_map_enable_delete_breakpoint): Remove.
1198 (enable_once_command, enable_count_command, enable_delete_command)
1199 (delete_trace_variable_command): Update.
1200
04afa70c
TT
12012017-09-20 Tom Tromey <tom@tromey.com>
1202
1203 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
1204 (bpstat_clear): Use delete.
1205 (bpstats): New constructors.
1206 (bpstat_copy, bpstat_stop_status): Use new.
1207 (dprintf_after_condition_true): Update.
1208 * breakpoint.h (bpstats::bpstats): Add constructors.
1209 (bpstats::~bpstats): Add destructor.
1210
c83833f4
PA
12112017-09-20 Pedro Alves <palves@redhat.com>
1212
1213 * eval.c (make_params): Delete, refactored as ...
1214 (class fake_method): ... this new type's ctor.
1215 (fake_method::~fake_method): New.
1216 (evaluate_subexp_standard): Use 'fake_method'.
1217
223ffa71
TT
12182017-09-20 Tom Tromey <tom@tromey.com>
1219
1220 * windows-nat.c (get_windows_debug_event, windows_wait)
1221 (do_initial_windows_stuff, windows_attach): Update.
1222 * utils.c (vwarning, internal_vproblem): Update.
1223 (ui_unregister_input_event_handler_cleanup)
1224 (prepare_to_handle_input): Remove.
1225 (class scoped_input_handler): New.
1226 (defaulted_query, prompt_for_continue): Update.
1227 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1228 Update.
1229 * top.c (undo_terminal_modifications_before_exit): Update.
1230 * target/target.h (target_terminal_init, target_terminal_inferior)
1231 (target_terminal_ours): Don't declare.
1232 (class target_terminal): New.
1233 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1234 (target_terminal_ours_for_output)
1235 (make_cleanup_restore_target_terminal): Don't declare.
1236 (target_terminal_info): Remove.
1237 * target.c (enum terminal_state, terminal_state): Remove.
1238 (target_terminal::terminal_state): Define.
1239 (target_terminal::init): Rename from target_terminal_init.
1240 (target_terminal::inferior): Rename from
1241 target_terminal_inferior.
1242 (target_terminal::ours): Rename from target_terminal_ours.
1243 (target_terminal::ours_for_output): Rename from
1244 target_terminal_ours_for_output.
1245 (target_terminal::info): New method.
1246 (cleanup_restore_target_terminal)
1247 (make_cleanup_restore_target_terminal): Remove.
1248 * solib.c (handle_solib_event): Update.
1249 * remote.c (remote_serial_quit_handler): Update.
1250 (remote_terminal_inferior, remote_wait_as): Update.
1251 * record-full.c (record_full_wait_1): Update.
1252 * nto-procfs.c (procfs_create_inferior): Update.
1253 * nat/fork-inferior.c (startup_inferior): Update.
1254 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1255 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1256 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1257 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1258 (mi_breakpoint_created, mi_breakpoint_deleted)
1259 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1260 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1261 (mi_user_selected_context_changed, report_initial_inferior):
1262 Update.
1263 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1264 (linux_nat_terminal_inferior): Update.
1265 * infrun.c (follow_fork_inferior)
1266 (handle_vfork_child_exec_or_exit, do_target_resume)
1267 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1268 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1269 Update.
1270 * inflow.c (child_terminal_init, info_terminal_command): Update.
1271 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1272 (attach_command): Update.
1273 * infcall.c (call_thread_fsm_should_stop): Update.
1274 * gnu-nat.c (gnu_attach): Update.
1275 * extension.c (struct active_ext_lang_state)
1276 (restore_active_ext_lang): Update.
1277 * exceptions.c (print_flush): Update.
1278 * event-top.c (async_enable_stdin, default_quit_handler): Update.
1279 (struct quit_handler_cleanup_data, restore_quit_handler)
1280 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1281 Remove.
1282 * cp-support.c (gdb_demangle): Update.
1283 * breakpoint.c (update_inserted_breakpoint_locations)
1284 (insert_breakpoint_locations, handle_jit_event)
1285 (disable_breakpoints_in_unloaded_shlib): Update.
1286 * annotate.c (annotate_breakpoints_invalid)
1287 (annotate_frames_invalid): Update.
1288
013af3fc
TT
12892017-09-20 Tom Tromey <tom@tromey.com>
1290
1291 * main.c (catch_command_errors): Rename from
1292 catch_command_errors_const.
1293 (captured_main_1): Update.
1294
06871ae8
PA
12952017-09-20 Pedro Alves <palves@redhat.com>
1296
1297 * cli/cli-cmds.c (list_command): Use print_sal_location.
1298 (print_sal_location): New function.
1299 (ambiguous_line_spec): Use print_sal_location.
1300 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1301 * symtab.c (find_function_start_sal): Likewise.
1302 * symtab.h (symtab_and_line::symbol): New field.
1303
e5f25bc5
PA
13042017-09-20 Pedro Alves <palves@redhat.com>
1305
1306 * linespec.c (minsym_found): Handle non-text minsyms.
1307 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1308
1b7fa39e
WT
13092017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1310
1311 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1312 backslash.
1313
37dd0825
WT
13142017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1315
1316 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1317 vmovups instead vmovaps.
1318 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1319
4e5a4f58
JB
13202017-09-19 John Baldwin <jhb@FreeBSD.org>
1321
1322 * NEWS (Changes since GDB 8.0): Add starti.
1323 * infcmd.c (enum run_break): New.
1324 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1325 case.
1326 (run_command): Use enum run_how.
1327 (start_command): Likewise.
1328 (starti_command): New function.
1329 (RUN_ARGS_HELP): New macro.
1330 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1331 commands. Add starti command.
1332
aa70c9f1
YQ
13332017-09-19 Yao Qi <yao.qi@linaro.org>
1334
1335 * Makefile.in (monitor.o): Remove the rule.
1336
d6541620
YQ
13372017-09-19 Yao Qi <yao.qi@linaro.org>
1338
1339 * annotate.h (struct annotate_arg_emitter): Use
1340 DISABLE_COPY_AND_ASSIGN.
1341 * common/refcounted-object.h (refcounted_object): Likewise.
1342 * completer.h (struct completion_result): Likewise.
1343 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1344 * filename-seen-cache.h (filename_seen_cache): Likewise.
1345 * gdbcore.h (thread_section_name): Likewise.
1346 * gdb_regex.h (compiled_regex): Likewise.
1347 * gdbthread.h (scoped_restore_current_thread): Likewise.
1348 * inferior.h (scoped_restore_current_inferior): Likewise.
1349 * jit.c (jit_reader): Likewise.
1350 * linespec.h (struct linespec_result): Likewise.
1351 * mi/mi-parse.h (struct mi_parse): Likewise.
1352 * nat/fork-inferior.c (execv_argv): Likewise.
1353 * progspace.h (scoped_restore_current_program_space): Likewise.
1354 * python/python-internal.h (class gdbpy_enter): Likewise.
1355 * regcache.h (regcache): Likewise.
1356 * target-descriptions.c (struct tdesc_reg): Likewise.
1357 (struct tdesc_type): Likewise.
1358 (struct tdesc_feature): Likewise.
1359 * ui-out.h (ui_out_emit_type): Likewise.
1360
0615127c
SM
13612017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1362
1363 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1364 label abort_expression.
1365
5e187554
SM
13662017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1367
1368 * common/buffer.c (buffer_xml_printf): Adjust.
1369 * common/xml-utils.c (xml_escape_text): Change return type to
1370 std::string, update code accordingly.
1371 * common/xml-utils.h (xml_escape_text): Change return type to
1372 std::string.
1373 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1374 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1375 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1376 Adjust.
1377
c3d7b541
SM
13782017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1379
1380 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1381 (SUBDIR_UNITTESTS_OBS): Add new object file.
1382 * unittests/xml-utils-selftests.c: New file.
1383
1526853e
SM
13842017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1385
1386 * common/selftest.h (selftest): New struct/interface.
1387 (register_test): Add name parameter, add new overload.
1388 (run_tests): Add filter parameter.
1389 (for_each_selftest_ftype): New typedef.
1390 (for_each_selftest): New declaration.
1391 * common/selftest.c (tests): Change type to
1392 map<string, unique_ptr<selftest>>.
1393 (simple_selftest): New struct.
1394 (register_test): New function.
1395 (register_test): Add name parameter and use it.
1396 (run_tests): Add filter parameter and use it. Add prints.
1397 Adjust to vector -> map change.
1398 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1399 registering selftests.
1400 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1401 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1402 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1403 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1404 * findvar.c (_initialize_findvar): Likewise.
1405 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1406 * maint.c (maintenance_selftest): Update call to run_tests.
1407 (maintenance_info_selftests): New function.
1408 (_initialize_maint_cmds): Register "maintenance info selftests"
1409 command. Update "maintenance selftest" doc.
1410 * regcache.c (_initialize_regcache): Add names when registering
1411 selftests.
1412 * rust-exp.y (_initialize_rust_exp): Likewise.
1413 * selftest-arch.c (gdbarch_selftest): New struct.
1414 (gdbarch_tests): Remove.
1415 (register_test_foreach_arch): Add name parameter. Call
1416 register_test.
1417 (tests_with_arch): Remove, move most content to
1418 gdbarch_selftest::operator().
1419 (_initialize_selftests_foreach_arch): Remove.
1420 * selftest-arch.h (register_test_foreach_arch): Add name
1421 parameter.
1422 (run_tests_with_arch): New declaration.
1423 * utils-selftests.c (_initialize_utils_selftests): Add names
1424 when registering selftests.
1425 * utils.c (_initialize_utils): Likewise.
1426 * unittests/array-view-selftests.c
1427 (_initialize_array_view_selftests): Likewise.
1428 * unittests/environ-selftests.c (_initialize_environ_selftests):
1429 Likewise.
1430 * unittests/function-view-selftests.c
1431 (_initialize_function_view_selftests): Likewise.
1432 * unittests/offset-type-selftests.c
1433 (_initialize_offset_type_selftests): Likewise.
1434 * unittests/optional-selftests.c
1435 (_initialize_optional_selftests): Likewise.
1436 * unittests/scoped_restore-selftests.c
1437 (_initialize_scoped_restore_selftests): Likewise.
1438 * NEWS: Document "maintenance selftest" and "maint info
1439 selftests".
1440
5846367a
SM
14412017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1442
1443 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1444 scoped_restore.
1445
bd77e8ff
SM
14462017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1447
1448 * mi/mi-main.c (mi_load_progress): Make uiout variable
1449 a unique_ptr.
1450
26a67918
PA
14512017-09-15 Pedro Alves <palves@redhat.com>
1452
1453 * compile/compile-c-types.c (convert_enum, convert_int)
1454 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1455
3f8a7804
SM
14562017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1457
1458 * dwarf2read.c (copy_string): Remove.
1459 (parse_macro_definition): Replace copy_string with savestring.
1460
8d200706
YQ
14612017-09-15 Yao Qi <yao.qi@linaro.org>
1462
1463 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1464 gdb_target_obs.
1465 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1466 Likewise.
1467 (i[34567]86-*-linux*): Likewise.
1468
d185219d
SM
14692017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1470
1471 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1472 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1473 <stack>: Change type to std::vector.
1474 <stack_len, stack_allocated>: Remove.
1475 <grow_stack>: Remove.
1476 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1477 (dwarf_expr_context::~dwarf_expr_context): Remove.
1478 (dwarf_expr_context::grow_stack): Remove.
1479 (dwarf_expr_context::push): Adjust.
1480 (dwarf_expr_context::pop): Adjust.
1481 (dwarf_expr_context::fetch): Adjust.
1482 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1483 (dwarf_expr_context::stack_empty_p): Adjust.
1484 (dwarf_expr_context::execute_stack_op): Adjust.
1485
eccd80d6
SM
14862017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1487
1488 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1489 return type to bool.
1490 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1491
69009882
SM
14922017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1493
1494 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1495 Change type to bool.
1496 (dwarf_stack_value) <in_stack_memory>: Likewise.
1497 (dwarf_expr_context) <push_address>: Change parameter type to
1498 bool.
1499 <fetch_in_stack_memory>: Change return type to bool.
1500 <push>: Change parameter type to bool.
1501 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1502 to bool.
1503 (dwarf_expr_context::push_address): Likewise.
1504 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1505 to bool.
1506 (dwarf_expr_context::execute_stack_op): Adjust.
1507 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1508
1e467161
SM
15092017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1510
1511 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1512 (struct dwarf_expr_context) <n_pieces>: Remove.
1513 <pieces>: Change type to std::vector.
1514 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1515 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1516 pieces.
1517 (dwarf_expr_context::add_piece): Adjust.
1518 * dwarf2loc.c (struct piece_closure): Initialize fields.
1519 <n_pieces>: Remove.
1520 <pieces>: Change type to std::vector.
1521 (allocate_piece_closure): Adjust, change parameter to
1522 std::vector rvalue and std::move it to piece_closure.
1523 (rw_pieced_value): Adjust.
1524 (check_pieced_synthetic_pointer): Adjust.
1525 (indirect_synthetic_pointer): Adjust.
1526 (coerce_pieced_ref): Adjust.
1527 (free_pieced_value_closure): Adjust. Use delete to free
1528 piece_closure.
1529 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1530 to allocate_piece_closure.
1531 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1532
0782db84
SM
15332017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1534
1535 * probe.h (probe_ops_cp): Remove typedef.
1536 (DEF_VEC_P (probe_ops_cp)): Remove.
1537 (all_probe_ops): Change type to std::vector.
1538 * probe.c (info_probes_for_ops): Adjust to vector change.
1539 (probe_linespec_to_ops): Likewise.
1540 (all_probe_ops): Change type to std::vector.
1541 (_initialize_probe): Adjust to vector change.
1542 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1543 * elfread.c (elf_get_probes): Likewise.
1544 * stap-probe.c (_initialize_stap_probe): Likewise.
1545
1eac6bea
SM
15462017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1547
1548 * probe.h (struct bound_probe): Define constructors.
1549 * probe.c (bound_probe_s): Remove typedef.
1550 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1551 (collect_probes): Change return type to std::vector, remove
1552 cleanup.
1553 (compare_probes): Return bool, change parameter type. Change
1554 semantic to "less than".
1555 (gen_ui_out_table_header_info): Change parameter to std::vector
1556 and update.
1557 (exists_probe_with_pops): Likewise.
1558 (info_probes_for_ops): Update to std::vector change.
1559 (enable_probes_command): Likewise.
1560 (disable_probes_command): Likewise.
1561
aaa63a31
SM
15622017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1563
1564 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1565 vec to std::vector.
1566 * probe.c (parse_probes_in_pspace): Update.
1567 (find_probes_in_objfile): Update.
1568 (find_probe_by_pc): Update.
1569 (collect_probes): Update.
1570 (probe_any_get_probes): Update.
1571 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1572 return type to reference to std::vector.
1573 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1574 std::vector and update.
1575 (dtrace_process_dof): Likewise.
1576 (dtrace_get_probes): Likewise.
1577 * elfread.c (elf_get_probes): Change return type to std::vector,
1578 store an std::vector in bfd_data.
1579 (probe_key_free): Update to std::vector.
1580 * stap-probe.c (handle_stap_probe): Change parameter to
1581 std::vector and update.
1582 (stap_get_probes): Likewise.
1583 * symfile-debug.c (debug_sym_get_probes): Change return type to
1584 std::vector and update.
1585
cb85b21b
TT
15862017-09-11 Tom Tromey <tom@tromey.com>
1587
1588 * breakpoint.c (program_breakpoint_here_p): Update.
1589 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1590 from make_show_memory_breakpoints_cleanup. Return a
1591 scoped_restore_tmpl<int>.
1592 (restore_show_memory_breakpoints): Remove.
1593 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1594 * mem-break.c (memory_validate_breakpoint): Update.
1595 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1596 (ia64_memory_remove_breakpoint): Update.
1597 (ia64_breakpoint_from_pc): Update.
1598 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1599 from make_show_memory_breakpoints_cleanup.
1600
8fbc99ef
TT
16012017-09-11 Tom Tromey <tom@tromey.com>
1602
1603 * d-namespace.c (d_lookup_symbol): Use std::string.
1604 (find_symbol_in_baseclass): Likewise.
1605
50feb4bd
TT
16062017-09-11 Tom Tromey <tom@tromey.com>
1607
1608 * ctf.c (ctf_start): Use std::string.
1609
c6dc63a1
TT
16102017-09-11 Tom Tromey <tom@tromey.com>
1611
1612 * ada-lang.c (is_known_support_routine): Update.
1613 (ada_unhandled_exception_name_addr_from_raise): Update.
1614 * guile/scm-frame.c (gdbscm_frame_name): Update.
1615 * python/py-frame.c (frapy_name): Update.
1616 (frapy_function): Update.
1617 * stack.h (find_frame_funname): Update.
1618 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1619 (print_frame): Update.
1620
d6b9b80f
TT
16212017-09-11 Tom Tromey <tom@tromey.com>
1622
1623 * findcmd.c (put_bits): Take a gdb::byte_vector.
1624 (parse_find_args): Return gdb::byte_vector. "args" now const.
1625 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1626 cleanups.
1627 (find_command): Update.
1628
a9921622
TT
16292017-09-11 Tom Tromey <tom@tromey.com>
1630
1631 * cli/cli-script.c (class scoped_restore_hook_in): New.
1632 (clear_hook_in_cleanup): Remove.
1633 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1634 scoped_restore_hook_in.
1635
be0d7abb
TT
16362017-09-11 Tom Tromey <tom@tromey.com>
1637
1638 * cli/cli-script.c (restore_interp): Remove.
1639 (read_command_lines): Use scoped_restore_interp.
1640 * interps.c (scoped_restore_interp::set_temp): Rename from
1641 interp_set_temp.
1642 * interps.h (class scoped_restore_interp): New.
1643 (interp_set_temp): Remove.
1644
00f675ff
TT
16452017-09-11 Tom Tromey <tom@tromey.com>
1646
1647 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1648 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1649 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1650 scoped_restore.
1651 (mi_cmd_break_insert_1): Update.
1652 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1653 scoped_restore.
1654
cb791d59
TT
16552017-09-11 Tom Tromey <tom@tromey.com>
1656
1657 * demangle.c (demangle_command): Update.
1658 * breakpoint.c (disable_command): Update.
1659 (enable_command): Update.
1660 (find_location_by_number): Make "number" const. Use
1661 get_number_trailer.
1662 * cli/cli-utils.c (extract_arg): Return std::string.
1663 * probe.c (parse_probe_linespec): Update. Change types.
1664 (collect_probes): Take string arguments.
1665 (parse_probe_linespec): Likewise.
1666 (info_probes_for_ops): Update.
1667 (enable_probes_command): Update.
1668 (disable_probes_command): Update.
1669 * break-catch-sig.c (catch_signal_split_args): Update.
1670 * mi/mi-parse.c (mi_parse): Update.
1671
2039bd9f
TT
16722017-09-11 Tom Tromey <tom@tromey.com>
1673
1674 * language.h (language_enum): Make argument const.
1675 * language.c (language_enum): Make argument const.
1676
f1735a53
TT
16772017-09-11 Tom Tromey <tom@tromey.com>
1678
1679 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1680 as function.
1681 (skip_to_space): Rename from skip_to_space_const.
1682 * common/common-utils.c (skip_to_space): New function.
1683 (skip_to_space): Rename from skip_to_space_const.
1684 * cli/cli-utils.h (get_number): Rename from get_number_const.
1685 (extract_arg): Rename from extract_arg_const.
1686 * cli/cli-utils.c (get_number): Rename from get_number_const.
1687 (extract_arg): Rename from extract_arg_const.
1688 (number_or_range_parser::get_number): Use ::get_number.
1689 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1690 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1691 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1692 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1693 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1694 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1695 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1696 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1697
7d221d74
TT
16982017-09-11 Tom Tromey <tom@tromey.com>
1699
1700 * python/python.c (do_start_initialization): Use
1701 py-event-types.def to initialize types.
1702 Define all object type structures.
1703 * python/python-internal.h: Don't declare event initialization
1704 functions.
1705 * python/py-threadevent.c (thread_event_object_type): Don't
1706 define.
1707 * python/py-stopevent.c (stop_event_object_type): Don't define.
1708 * python/py-signalevent.c (signal_event_object_type): Don't
1709 declare or define.
1710 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1711 (clear_objfiles_event_object_type): Don't declare or define.
1712 * python/py-infevents.c (inferior_call_pre_event_object_type)
1713 (inferior_call_post_event_object_type)
1714 (register_changed_event_object_type)
1715 (memory_changed_event_object_type): Don't declare or define.
1716 * python/py-inferior.c (new_thread_event_object_type)
1717 (new_inferior_event_object_type)
1718 (inferior_deleted_event_object_type): Don't declare or define.
1719 * python/py-exitedevent.c (exited_event_object_type): Don't
1720 declare or define.
1721 * python/py-evts.c (gdbpy_initialize_py_events): Use
1722 py-all-events.def.
1723 * python/py-events.h (thread_event_object_type): Don't declare.
1724 (events_object): Use py-all-events.def.
1725 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1726 py-event-types.def.
1727 * python/py-event-types.def: New file.
1728 * python/py-continueevent.c (create_continue_event_object): Don't
1729 declare or define.
1730 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1731 declare or define.
1732 * python/py-all-events.def: New file.
1733
35c61a1d
TT
17342017-09-11 Tom Tromey <tom@tromey.com>
1735
1736 * python/py-threadevent.c (create_thread_event_object): Return
1737 gdbpy_ref.
1738 * python/py-stopevent.h (create_stop_event_object)
1739 (create_breakpoint_event_object, create_signal_event_object):
1740 Update.
1741 * python/py-stopevent.c (create_stop_event_object): Return
1742 gdbpy_ref.
1743 (emit_stop_event): Update.
1744 * python/py-signalevent.c (create_signal_event_object): Return
1745 gdbpy_ref.
1746 * python/py-infevents.c (create_inferior_call_event_object):
1747 Update.
1748 * python/py-event.h (create_event_object)
1749 (create_thread_event_object): Update.
1750 * python/py-event.c (create_event_object): Return gdbpy_ref.
1751 * python/py-continueevent.c: Return gdbpy_ref.
1752 * python/py-bpevent.c (create_breakpoint_event_object): Return
1753 gdbpy_ref.
1754
7c96f8c1
TT
17552017-09-11 Tom Tromey <tom@tromey.com>
1756
1757 PR python/15622:
1758 * NEWS: Add entry.
1759 * python/python.c (do_start_initialization): Initialize new event
1760 types.
1761 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1762 (gdbpy_initialize_inferior_deleted_event)
1763 (gdbpy_initialize_new_thread_event): Declare.
1764 * python/py-threadevent.c (create_thread_event_object): Add option
1765 "thread" parameter.
1766 * python/py-inferior.c (new_thread_event_object_type)
1767 (new_inferior_event_object_type)
1768 (inferior_deleted_event_object_type): Declare.
1769 (python_new_inferior, python_inferior_deleted): New functions.
1770 (add_thread_object): Emit new_thread event.
1771 (gdbpy_initialize_inferior): Attach new functions to corresponding
1772 observers.
1773 (new_thread, new_inferior, inferior_deleted): Define new event
1774 types.
1775 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1776 registries.
1777 * python/py-events.h (events_object) <new_inferior,
1778 inferior_deleted, new_thread>: New fields.
1779 * python/py-event.h (create_thread_event_breakpoint): Add optional
1780 "thread" parameter.
1781
72542b8e
AB
17822017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1783
1784 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1785 check current_ui instead.
1786 (internal_vproblem): Likewise.
1787
0d64823e
SM
17882017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1789
1790 * thread.c (print_thread_info_1): Remove unnecessary calls to
1791 uiout->is_mi_like_p.
1792
eb1e02fd
TT
17932017-09-09 Tom Tromey <tom@tromey.com>
1794
1795 * namespace.h (add_using_directive): Update.
1796 * namespace.c (add_using_directive): Change type of excludes to
1797 std::vector.
1798 * dwarf2read.c (read_import_statement): Use std::vector.
1799 (read_namespace): Update.
1800 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1801
0fc21fd8
TT
18022017-09-09 Tom Tromey <tom@tromey.com>
1803
1804 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1805
49663d05
TT
18062017-09-09 Tom Tromey <tom@tromey.com>
1807
1808 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1809
0b868b60
TT
18102017-09-09 Tom Tromey <tom@tromey.com>
1811
1812 * stack.c (func_command): Use gdb::def_vector.
1813
c0470d48
TT
18142017-09-09 Tom Tromey <tom@tromey.com>
1815
1816 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1817 ui_out_emit_list, ui_out_emit_tuple.
1818 (mi_cmd_var_update): Likewise.
1819
ca5909c7
TT
18202017-09-09 Tom Tromey <tom@tromey.com>
1821
1822 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1823 ui_out_redirect_pop.
1824 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1825 ui_out_redirect_pop.
1826 * utils.c (do_ui_out_redirect_pop)
1827 (make_cleanup_ui_out_redirect_pop): Remove.
1828 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1829 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1830 * ui-out.h (ui_out_redirect_pop): New class.
1831
e6a2252a
TT
18322017-09-09 Tom Tromey <tom@tromey.com>
1833
1834 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1835 (list_available_thread_groups, mi_cmd_list_thread_groups)
1836 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1837 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1838 Likewise.
1839
393702cd
TT
18402017-09-09 Tom Tromey <tom@tromey.com>
1841
1842 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1843 ui_out_emit_tuple.
1844
76f9c9cf
TT
18452017-09-09 Tom Tromey <tom@tromey.com>
1846
1847 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1848 * stack.c (print_frame): Use ui_out_emit_tuple.
1849 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1850 (info_spu_mailbox_command, info_spu_dma_command)
1851 (info_spu_proxydma_command): Likewise.
1852 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1853 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1854 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1855 ui_out_emit_tuple.
1856 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1857
dc9fe180
TT
18582017-09-09 Tom Tromey <tom@tromey.com>
1859
1860 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1861 (class ui_out_emit_table): Update comment.
1862 * ui-out.c (do_cleanup_table_end)
1863 (make_cleanup_ui_out_table_begin_end): Remove.
1864 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1865 (info_spu_dma_cmdlist): Likewise.
1866 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1867 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1868 ui_out_emit_table.
1869
f8cc3da6
TT
18702017-09-09 Tom Tromey <tom@tromey.com>
1871
1872 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1873 ui_out_emit_list, gdb::optional.
1874
481695ed
JB
18752017-09-09 John Baldwin <jhb@FreeBSD.org>
1876
1877 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1878 prototype.
1879 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1880 prototype.
1881 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1882 prototype.
1883 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1884 * ada-exp.y: Remove _initialize_ada_exp prototype.
1885 * ada-lang.c: Remove _initialize_ada_language prototype.
1886 * ada-tasks.c: Remove _initialize_tasks prototype.
1887 * addrmap.c: Remove _initialize_addrmap prototype.
1888 * agent.c: Remove _initialize_agent prototype.
1889 * aix-thread.c: Remove _initialize_aix_thread prototype.
1890 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1891 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1892 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1893 prototype.
1894 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1895 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1896 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1897 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1898 prototype.
1899 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1900 prototype.
1901 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1902 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1903 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1904 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1905 prototype.
1906 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1907 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1908 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1909 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1910 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1911 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1912 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1913 prototype.
1914 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1915 prototype.
1916 * annotate.c: Remove _initialize_annotate prototype.
1917 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1918 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1919 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1920 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1921 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1922 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1923 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1924 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1925 prototype.
1926 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1927 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1928 * auto-load.c: Remove _initialize_auto_load prototype.
1929 * auxv.c: Remove _initialize_auxv prototype.
1930 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1931 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1932 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1933 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1934 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1935 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1936 prototype.
1937 * break-catch-throw.c: Remove _initialize_break_catch_throw
1938 prototype.
1939 * breakpoint.c: Remove _initialize_breakpoint prototype.
1940 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1941 * btrace.c: Remove _initialize_btrace prototype.
1942 * charset.c: Remove _initialize_charset prototype.
1943 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1944 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1945 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1946 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1947 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1948 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1949 * coffread.c: Remove _initialize_coffread prototype.
1950 * compile/compile.c: Remove _initialize_compile prototype.
1951 * complaints.c: Remove _initialize_complaints prototype.
1952 * completer.c: Remove _initialize_completer prototype.
1953 * copying.awk: Remove _initialize_copying prototype.
1954 * copying.c: Regenerate.
1955 * core-regset.c: Remove _initialize_core_regset prototype.
1956 * corefile.c: Remove _initialize_core prototype.
1957 * corelow.c: Remove _initialize_corelow prototype.
1958 * cp-abi.c: Remove _initialize_cp_abi prototype.
1959 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1960 * cp-support.c: Remove _initialize_cp_support prototype.
1961 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1962 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1963 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1964 * ctf.c: Remove _initialize_ctf prototype.
1965 * d-lang.c: Remove _initialize_d_language prototype.
1966 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1967 prototype.
1968 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1969 * dbxread.c: Remove _initialize_dbxread prototype.
1970 * dcache.c: Remove _initialize_dcache prototype.
1971 * demangle.c: Remove _initialize_demangler prototype.
1972 * disasm-selftests.c: Remove _initialize_disasm_selftests
1973 prototype.
1974 * disasm.c: Remove _initialize_disasm prototype.
1975 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1976 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1977 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1978 prototype.
1979 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1980 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1981 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1982 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1983 * elfread.c: Remove _initialize_elfread prototype.
1984 * exec.c: Remove _initialize_exec prototype.
1985 * extension.c: Remove _initialize_extension prototype.
1986 * f-lang.c: Remove _initialize_f_language prototype.
1987 * f-valprint.c: Remove _initialize_f_valprint prototype.
1988 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1989 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1990 * filesystem.c: Remove _initialize_filesystem prototype.
1991 * findcmd.c: Remove _initialize_mem_search prototype.
1992 * fork-child.c: Remove _initialize_fork_child prototype.
1993 * frame-base.c: Remove _initialize_frame_base prototype.
1994 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1995 * frame.c: Remove _initialize_frame prototype.
1996 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1997 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1998 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1999 * gcore.c: Remove _initialize_gcore prototype.
2000 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2001 * gdbarch.c: Regenerate.
2002 * gdbarch.sh: Remove _initialize_gdbarch prototype.
2003 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2004 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2005 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2006 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2007 * go-lang.c: Remove _initialize_go_language prototype.
2008 * go32-nat.c: Remove _initialize_go32_nat prototype.
2009 * guile/guile.c: Remove _initialize_guile prototype.
2010 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2011 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2012 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2013 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2014 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2015 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2016 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2017 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2018 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2019 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2020 prototype.
2021 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2022 prototype.
2023 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2024 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2025 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2026 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2027 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2028 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2029 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2030 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2031 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2032 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2033 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2034 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2035 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2036 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2037 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2038 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2039 prototype.
2040 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2041 prototype.
2042 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2043 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2044 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2045 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2046 * infcall.c: Remove _initialize_infcall prototype.
2047 * infcmd.c: Remove _initialize_infcmd prototype.
2048 * inferior.c: Remove _initialize_inferiors prototype.
2049 * inflow.c: Remove _initialize_inflow prototype.
2050 * infrun.c: Remove _initialize_infrun prototype.
2051 * interps.c: Remove _initialize_interpreter prototype.
2052 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2053 * jit.c: Remove _initialize_jit prototype.
2054 * language.c: Remove _initialize_language prototype.
2055 * linux-fork.c: Remove _initialize_linux_fork prototype.
2056 * linux-nat.c: Remove _initialize_linux_nat prototype.
2057 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2058 * linux-thread-db.c: Remove _initialize_thread_db prototype.
2059 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2060 * m2-lang.c: Remove _initialize_m2_language prototype.
2061 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2062 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2063 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2064 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2065 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2066 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2067 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2068 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2069 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2070 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2071 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2072 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2073 * machoread.c: Remove _initialize_machoread prototype.
2074 * macrocmd.c: Remove _initialize_macrocmd prototype.
2075 * macroscope.c: Remove _initialize_macroscope prototype.
2076 * maint.c: Remove _initialize_maint_cmds prototype.
2077 * mdebugread.c: Remove _initialize_mdebugread prototype.
2078 * memattr.c: Remove _initialize_mem prototype.
2079 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2080 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2081 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2082 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2083 * mi/mi-main.c: Remove _initialize_mi_main prototype.
2084 * microblaze-linux-tdep.c: Remove
2085 _initialize_microblaze_linux_tdep prototype.
2086 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2087 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2088 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2089 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2090 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2091 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2092 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2093 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2094 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2095 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2096 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2097 prototype.
2098 * mipsread.c: Remove _initialize_mipsread prototype.
2099 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2100 prototype.
2101 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2102 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2103 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2104 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2105 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2106 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2107 prototype.
2108 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2109 * nto-procfs.c: Remove _initialize_procfs prototype.
2110 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2111 * objc-lang.c: Remove _initialize_objc_language prototype.
2112 * objfiles.c: Remove _initialize_objfiles prototype.
2113 * observer.c: Remove observer_test_first_notification_function,
2114 observer_test_second_notification_function,
2115 observer_test_third_notification_function, and
2116 _initialize_observer prototypes.
2117 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2118 * osabi.c: Remove _initialize_gdb_osabi prototype.
2119 * osdata.c: Remove _initialize_osdata prototype.
2120 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2121 * parse.c: Remove _initialize_parse prototype.
2122 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2123 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2124 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2125 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2126 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2127 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2128 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2129 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2130 * printcmd.c: Remove _initialize_printcmd prototype.
2131 * probe.c: Remove _initialize_probe prototype.
2132 * proc-api.c: Remove _initialize_proc_api prototype.
2133 * proc-events.c: Remove _initialize_proc_events prototype.
2134 * proc-service.c: Remove _initialize_proc_service prototype.
2135 * procfs.c: Remove _initialize_procfs prototype.
2136 * psymtab.c: Remove _initialize_psymtab prototype.
2137 * python/python.c: Remove _initialize_python prototype.
2138 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2139 * record-btrace.c: Remove _initialize_record_btrace prototype.
2140 * record-full.c: Remove _initialize_record_full prototype.
2141 * record.c: Remove _initialize_record prototype.
2142 * regcache.c: Remove _initialize_regcache prototype.
2143 * reggroups.c: Remove _initialize_reggroup prototype.
2144 * remote-notif.c: Remove _initialize_notif prototype.
2145 * remote-sim.c: Remove _initialize_remote_sim prototype.
2146 * remote.c: Remove _initialize_remote prototype.
2147 * reverse.c: Remove _initialize_reverse prototype.
2148 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2149 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2150 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2151 prototype.
2152 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2153 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2154 * rust-exp.y: Remove _initialize_rust_exp prototype.
2155 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2156 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2157 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2158 * score-tdep.c: Remove _initialize_score_tdep prototype.
2159 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2160 prototype.
2161 * ser-go32.c: Remove _initialize_ser_dos prototype.
2162 * ser-mingw.c: Remove _initialize_ser_windows prototype.
2163 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2164 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2165 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2166 * serial.c: Remove _initialize_serial prototype.
2167 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2168 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2169 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2170 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2171 * skip.c: Remove _initialize_step_skip prototype.
2172 * sol-thread.c: Remove _initialize_sol_thread prototype.
2173 * solib-aix.c: Remove _initialize_solib_aix prototype.
2174 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2175 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2176 * solib-frv.c: Remove _initialize_frv_solib prototype.
2177 * solib-spu.c: Remove _initialize_spu_solib prototype.
2178 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2179 * solib-target.c: Remove _initialize_solib_target prototype.
2180 * solib.c: Remove _initialize_solib prototype.
2181 * source.c: Remove _initialize_source prototype.
2182 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2183 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2184 prototype.
2185 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2186 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2187 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2188 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2189 prototype.
2190 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2191 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2192 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2193 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2194 prototype.
2195 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2196 prototype.
2197 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2198 prototype.
2199 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2200 prototype.
2201 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2202 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2203 prototype.
2204 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2205 prototype.
2206 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2207 prototype.
2208 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2209 prototype.
2210 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2211 prototype.
2212 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2213 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2214 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2215 * stabsread.c: Remove _initialize_stabsread prototype.
2216 * stack.c: Remove _initialize_stack prototype.
2217 * stap-probe.c: Remove _initialize_stap_probe prototype.
2218 * std-regs.c: Remove _initialize_frame_reg prototype.
2219 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2220 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2221 * symfile.c: Remove _initialize_symfile prototype.
2222 * symmisc.c: Remove _initialize_symmisc prototype.
2223 * symtab.c: Remove _initialize_symtab prototype.
2224 * target-dcache.c: Remove _initialize_target_dcache prototype.
2225 * target-descriptions.c: Remove _initialize_target_descriptions
2226 prototype.
2227 * thread.c: Remove _initialize_thread prototype.
2228 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2229 prototype.
2230 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2231 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2232 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2233 prototype.
2234 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2235 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2236 * tracefile.c: Remove _initialize_tracefile prototype.
2237 * tracepoint.c: Remove _initialize_tracepoint prototype.
2238 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2239 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2240 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2241 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2242 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2243 * tui/tui-win.c: Remove _initialize_tui_win prototype.
2244 * tui/tui.c: Remove _initialize_tui prototype.
2245 * typeprint.c: Remove _initialize_typeprint prototype.
2246 * user-regs.c: Remove _initialize_user_regs prototype.
2247 * utils.c: Remove _initialize_utils prototype.
2248 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2249 * valarith.c: Remove _initialize_valarith prototype.
2250 * valops.c: Remove _initialize_valops prototype.
2251 * valprint.c: Remove _initialize_valprint prototype.
2252 * value.c: Remove _initialize_values prototype.
2253 * varobj.c: Remove _initialize_varobj prototype.
2254 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2255 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2256 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2257 * windows-nat.c: Remove _initialize_windows_nat,
2258 _initialize_check_for_gdb_ini, and _initialize_loadable
2259 prototypes.
2260 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2261 * xcoffread.c: Remove _initialize_xcoffread prototype.
2262 * xml-support.c: Remove _initialize_xml_support prototype.
2263 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2264 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2265 prototype.
2266 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2267 prototype.
2268 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2269
a611b5cb
KS
22702017-09-08 Keith Seitz <keiths@redhat.com>
2271
2272 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2273 field.
2274
469412dd
CW
22752017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
2276
2277 * f-valprint.c (f_val_print): Remove check for one byte
2278 sized integers. Remove printing of character type.
2279
a5ad232b
FP
22802017-09-08 Frank Penczek <frank.penczek@intel.com>
2281 Christoph Weinmann <christoph.t.weinmann@intel.com>
2282 Bernhard Heckel <bernhard.heckel@intel.com>
2283
2284 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2285 to maintain proper indentation when printing pointers/refs.
2286
e5014227
JB
22872017-09-07 Joel Brobecker <brobecker@adacore.com>
2288
2289 GDB 8.0.1 released.
2290
63c99141
JB
22912017-09-07 Joel Brobecker <brobecker@adacore.com>
2292
2293 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2294
69c1e056
TT
22952017-09-05 Tom Tromey <tom@tromey.com>
2296
2297 * parse.c (funcall_chain): Now a std::vector.
2298 (start_arglist, end_arglist): Simplify.
2299 (free_funcalls): Remove.
2300 (parse_exp_in_context_1): Remove cleanup.
2301
fef704bf
TT
23022017-09-05 Tom Tromey <tom@tromey.com>
2303
2304 * go-exp.y (go_parse): Don't create a cleanup.
2305
5613c585
TT
23062017-09-05 Tom Tromey <tom@tromey.com>
2307
2308 * d-exp.y (PrimaryExpression): Use std::string.
2309 (d_parse): Don't create a cleanup.
2310
eae49211
TT
23112017-09-05 Tom Tromey <tom@tromey.com>
2312
2313 * utils.c (do_clear_parser_state): Remove.
2314 (make_cleanup_clear_parser_state): Remove.
2315 * p-exp.y (pascal_parse): Use scoped_restore.
2316 * m2-exp.y (m2_parse): Use scoped_restore.
2317 * f-exp.y (f_parse): Use scoped_restore.
2318 * d-exp.y (d_parse): Use scoped_restore.
2319 * c-exp.y (c_parse): Use scoped_restore.
2320 * ada-exp.y (ada_parse): Use scoped_restore.
2321 * utils.h (make_cleanup_clear_parser_state): Remove.
2322
73b9be8b
KS
23232017-09-06 Keith Seitz <keiths@redhat.com>
2324
2325 * dwarf2read.c (dw2_linkage_name_attr): New function.
2326 (dw2_linkage_name): New function.
2327 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2328 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2329 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2330
a102602b
KR
23312017-09-06 Kamil Rytarowski <n54@gmx.com>
2332
2333 * config/djgpp/djconfig.sh: Correct shell portability issue.
2334
28ad437d
KR
23352017-09-06 Kamil Rytarowski <n54@gmx.com>
2336
2337 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2338
351787dd
JB
23392017-09-06 John Baldwin <jhb@FreeBSD.org>
2340
2341 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2342 * NEWS: Mention new FreeBSD/mips native configuration.
2343 * configure.host: Add aarch64*-*-freebsd*.
2344 * configure.nat: Likewise.
2345 * aarch64-fbsd-nat.c: New file.
2346
c0f84956
JB
23472017-09-06 John Baldwin <jhb@FreeBSD.org>
2348
2349 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2350 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2351 * NEWS: Mention new FreeBSD/aarch64 target.
2352 * configure.tgt: Add aarch64*-*-freebsd*.
2353 * aarch64-fbsd-tdep.c: New file.
2354 * aarch64-fbsd-tdep.h: New file.
2355
7610297a
KR
23562017-09-06 Kamil Rytarowski <n54@gmx.com>
2357
2358 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2359
fbd1b771
JK
23602017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2361
2362 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2363 of TLS symbols.
2364
5ca79eae
PW
23652017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2366
2367 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2368 call.
2369
bf93d7ba
SM
23702017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2371
2372 * infrun.c (follow_exec): Call add_thread after
2373 target_find_description.
2374
1bb7c059
SM
23752017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2376
2377 * infrun.c (handle_inferior_event_1): When exec'ing, read
2378 stop_pc after follow_exec.
2379
fc809827
SM
23802017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2381
2382 * remote.c (process_g_packet): Update error message.
2383
d2fcdd85
YQ
23842017-09-05 Yao Qi <yao.qi@linaro.org>
2385
2386 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2387 targets.
2388
e69570ee
PA
23892017-09-05 Pedro Alves <palves@redhat.com>
2390
2391 * eval.c (eval_call, evaluate_funcall): New functions, factored
2392 out from ...
2393 (evaluate_subexp_standard): ... this.
2394
22916b07
YQ
23952017-09-05 Yao Qi <yao.qi@linaro.org>
2396
2397 * amd64-tdep.c (amd64_target_description): Create target
2398 descriptions.
2399 (_initialize_amd64_tdep): Don't call functions
2400 initialize_tdesc_amd64_*. Add self tests.
2401 * arch/amd64.c (amd64_create_target_description): Add parameter
2402 is_linux. Call set_tdesc_osabi if is_linux is true.
2403 * arch/amd64.h (amd64_create_target_description): Update the
2404 declaration.
2405 * arch/i386.c (i386_create_target_description): Add parameter
2406 is_linux. Call set_tdesc_osabi if is_linux is true.
2407 * arch/i386.h (i386_create_target_description): Update
2408 declaration.
2409 * configure.tgt: Add i386.o to gdb_target_obs.
2410 * features/Makefile (XMLTOC): Remove i386/*.xml.
2411 * features/i386/amd64-avx-avx512.c: Remove.
2412 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2413 * features/i386/amd64-avx-mpx.c: Remove.
2414 * features/i386/amd64-avx.c: Remove.
2415 * features/i386/amd64-mpx.c: Remove.
2416 * features/i386/amd64.c: Remove.
2417 * features/i386/i386-avx-avx512.c: Remove.
2418 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2419 * features/i386/i386-avx-mpx.c: Remove.
2420 * features/i386/i386-avx.c: Remove.
2421 * features/i386/i386-mmx.c: Remove.
2422 * features/i386/i386-mpx.c: Remove.
2423 * features/i386/i386.c: Remove.
2424 * i386-tdep.c: Don't include features/i386/i386*.c., include
2425 target-descriptions.h and arch/i386.h.
2426 (i386_target_description): Create target descriptions.
2427 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2428 functions. Do self tests.
2429
0854b7b1
YQ
24302017-09-05 Yao Qi <yao.qi@linaro.org>
2431
2432 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2433 * features/i386/amd64-avx-avx512-linux.c: Removed.
2434 * features/i386/amd64-avx-linux.c: Removed.
2435 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2436 * features/i386/amd64-avx-mpx-linux.c: Removed.
2437 * features/i386/amd64-linux.c: Removed.
2438 * features/i386/amd64-mpx-linux.c: Removed.
2439 * features/i386/x32-avx-avx512-linux.c: Removed.
2440 * features/i386/x32-avx-linux.c: Removed.
2441 * features/i386/x32-linux.c: Removed.
2442
b4570e4b
YQ
24432017-09-05 Yao Qi <yao.qi@linaro.org>
2444
2445 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2446 features/i386/*.c.
2447 (amd64_linux_read_description): Call
2448 amd64_create_target_description.
2449 * arch/amd64.c: New file.
2450 * arch/amd64.h: New file.
2451 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2452 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2453
6c73f67f
YQ
24542017-09-05 Yao Qi <yao.qi@linaro.org>
2455
2456 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2457 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2458 (amd64_linux_read_description): Create target descriptions.
2459 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2460 functions. Add unit tests.
2461 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2462 x32-core.xml.
2463 * features/i386/64bit-avx.c: Generated.
2464 * features/i386/64bit-avx512.c: Generated.
2465 * features/i386/64bit-core.c: Generated.
2466 * features/i386/64bit-linux.c: Generated.
2467 * features/i386/64bit-mpx.c: Generated.
2468 * features/i386/64bit-pkeys.c: Generated.
2469 * features/i386/64bit-segments.c: Generated.
2470 * features/i386/64bit-sse.c: Generated.
2471 * features/i386/x32-core.c: Generated.
2472 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2473 c files for amd64-linux and x32-linux.
2474
9d3d478b
YQ
24752017-09-05 Yao Qi <yao.qi@linaro.org>
2476
2477 * amd64-linux-tdep.c (amd64_linux_read_description): New
2478 function.
2479 (amd64_linux_core_read_description): Call
2480 amd64_linux_read_description.
2481 (amd64_linux_init_abi): Likewise.
2482 (amd64_x32_linux_init_abi): Likewise.
2483 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2484 * x86-linux-nat.c (x86_linux_read_description): Call
2485 amd64_linux_read_description.
2486
b9f1d50f
YQ
24872017-09-05 Yao Qi <yao.qi@linaro.org>
2488
2489 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2490 comments.
2491
188c9e6d
YQ
24922017-09-05 Yao Qi <yao.qi@linaro.org>
2493
2494 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2495 * features/i386/i386-avx-avx512-linux.c: Remove.
2496 * features/i386/i386-avx-linux.c: Remove.
2497 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2498 * features/i386/i386-avx-mpx-linux.c: Remove.
2499 * features/i386/i386-linux.c: Remove.
2500 * features/i386/i386-mmx-linux.c: Remove.
2501 * features/i386/i386-mpx-linux.c: Remove.
2502
5f035c07
YQ
25032017-09-05 Yao Qi <yao.qi@linaro.org>
2504
2505 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2506 (SFILES): Add arch/i386.c.
2507 (HFILES_NO_SRCDIR): Add arch/i386.h.
2508 * arch/i386.c: New file.
2509 * arch/i386.h: New file.
2510 * arch/tdesc.h (allocate_target_description): Declare.
2511 (set_tdesc_architecture): Declare.
2512 (set_tdesc_osabi): Declare.
2513 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2514 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2515 include arch/i386.h.
2516 (i386_linux_read_description): Remove code and call
2517 i386_create_target_description.
2518 (set_tdesc_architecture): New function.
2519 (set_tdesc_osabi): New function.
2520 * target-descriptions.h (allocate_target_description): Remove.
2521
0abe8a89
YQ
25222017-09-05 Yao Qi <yao.qi@linaro.org>
2523
2524 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2525 * target-descriptions.c (tdesc_create_feature): Likewise, and
2526 adjust code.
2527 * features/i386/32bit-avx.c: Re-generated.
2528 * features/i386/32bit-avx512.c: Re-generated.
2529 * features/i386/32bit-core.c: Re-generated.
2530 * features/i386/32bit-linux.c: Re-generated.
2531 * features/i386/32bit-mpx.c: Re-generated.
2532 * features/i386/32bit-pkeys.c: Re-generated.
2533 * features/i386/32bit-sse.c: Re-generated.
2534
0a188386
YQ
25352017-09-05 Yao Qi <yao.qi@linaro.org>
2536
2537 * regformats/regdef.h (struct reg): Override operator == and !=.
2538
f49ff000
YQ
25392017-09-05 Yao Qi <yao.qi@linaro.org>
2540
2541 * arch/tdesc.h: New file.
2542 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2543 * target-descriptions.c: Update comments.
2544 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2545 declarations.
2546 * features/i386/32bit-avx.c: Re-generated.
2547 * features/i386/32bit-avx512.c: Re-generated.
2548 * features/i386/32bit-core.c: Re-generated.
2549 * features/i386/32bit-linux.c: Re-generated.
2550 * features/i386/32bit-mpx.c: Re-generated.
2551 * features/i386/32bit-pkeys.c: Re-generated.
2552 * features/i386/32bit-sse.c: Re-generated.
2553
f7000548
YQ
25542017-09-05 Yao Qi <yao.qi@linaro.org>
2555
2556 * regformats/regdat.sh: Update generated code.
2557
c9a5e2a5
YQ
25582017-09-05 Yao Qi <yao.qi@linaro.org>
2559
2560 * regformats/regdat.sh: Adjust code order.
2561
d6b687ac
SM
25622017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2563
2564 * expprint.c (dump_subexp_body_standard): Use constant format
2565 string in fprintf_filtered call.
2566
a379bfd0
JB
25672017-09-04 John Baldwin <jhb@FreeBSD.org>
2568
2569 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2570 NetBSD/i386.
2571 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2572
f7efc967
JB
25732017-09-04 John Baldwin <jhb@FreeBSD.org>
2574
2575 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2576
c49fbc6c
JB
25772017-09-04 John Baldwin <jhb@FreeBSD.org>
2578
2579 * bsd-kvm.o: Define _KMEMUSER.
2580 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2581 * configure: Regenerate.
2582
26562e73
JB
25832017-09-04 John Baldwin <jhb@FreeBSD.org>
2584
2585 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2586 * i386-fbsd-nat.c: Likewise.
2587
31cf1487
JB
25882017-09-04 John Baldwin <jhb@FreeBSD.org>
2589
2590 * unittests/array-view-selftests.c: Add include of <array>.
2591
5b9f8a7c
JB
25922017-09-04 John Baldwin <jhb@FreeBSD.org>
2593
2594 * spu-tdep.c (flush_ea_cache): Add missing argument to
2595 call_function_by_hand.
2596
d69cf9b2
PA
25972017-09-04 Pedro Alves <palves@redhat.com>
2598
2599 * NEWS (Safer support for debugging with no debug info): New.
2600
3693fdb3
PA
26012017-09-04 Pedro Alves <palves@redhat.com>
2602
2603 * c-exp.y (function_method, function_method_void): Add current
2604 instance flags to TYPE_INSTANCE.
2605 * dwarf2read.c (check_modifier): New.
2606 (compute_delayed_physnames): Assert that only C++ adds delayed
2607 physnames. Mark fn_fields as const/volatile depending on
2608 physname.
2609 * eval.c (make_params): New type_instance_flags parameter. Use
2610 it as the new type's instance flags.
2611 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2612 flags element and pass it to make_params.
2613 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2614 instance flags element.
2615 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2616 * gdbtypes.h: Include "enum-flags.h".
2617 (type_instance_flags): New enum-flags type.
2618 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2619 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2620 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2621 (follow_type_instance_flags): New function.
2622 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2623 * parser-defs.h (follow_type_instance_flags): Declare.
2624 * valops.c (value_struct_elt_for_reference): const/volatile must
2625 match too.
2626
e68cb8e0
PA
26272017-09-04 Pedro Alves <palves@redhat.com>
2628
2629 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2630 function/method scopes; lookup the nested name as a function local
2631 static variable.
2632
858be34c
PA
26332017-09-04 Pedro Alves <palves@redhat.com>
2634
2635 (%type <voidval>): Add function_method.
2636 * c-exp.y (exp): New production for calls with no arguments.
2637 (function_method, function_method_void_or_typelist): New
2638 productions.
2639 (exp): New production for "method()::static_var".
2640 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2641 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2642 Handle OP_FUNC_STATIC_VAR.
2643 * parse.c (operator_length_standard):
2644 Handle OP_FUNC_STATIC_VAR.
2645
dd5901a6
PA
26462017-09-04 Pedro Alves <palves@redhat.com>
2647
2648 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2649 handling.
2650 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2651 Ditto.
2652 * parse.c (operator_length_standard, operator_check_standard):
2653 Ditto.
2654 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2655
46a4882b
PA
26562017-09-04 Pedro Alves <palves@redhat.com>
2657
2658 * ax-gdb.c: Include "typeprint.h".
2659 (gen_expr_for_cast): New function.
2660 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2661 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2662 type is unknown.
2663 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2664 nodebug_data_symbol.
2665 * eval.c: Include "typeprint.h".
2666 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2667 Error out if symbol has unknown type.
2668 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2669 evaluate_subexp_for_cast.
2670 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2671 OP_VAR_MSYM_VALUE.
2672 (evaluate_subexp_for_cast): New function.
2673 * gdbtypes.c (init_nodebug_var_type): New function.
2674 (objfile_type): Use it to initialize types of variables with no
2675 debug info.
2676 * typeprint.c (error_unknown_type): New.
2677 * typeprint.h (error_unknown_type): New declaration.
2678 * compile/compile-c-types.c (convert_type_basic): Handle
2679 TYPE_CODE_ERROR; warn and fallback to int for variables with
2680 unknown type.
2681
fe13dfec
PA
26822017-09-04 Pedro Alves <palves@redhat.com>
2683
2684 * eval.c (evaluate_var_value): New function, factored out from ...
2685 (evaluate_subexp_standard): ... here.
2686
d008ee21
PA
26872017-09-04 Pedro Alves <palves@redhat.com>
2688
2689 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2690 Remove useless assignments to 'op'.
2691
827d0c51
PA
26922017-09-04 Pedro Alves <palves@redhat.com>
2693
2694 * eval.c (eval_skip_value): New function.
2695 (evaluate_subexp_standard): Use it.
2696
2c5a2be1
PA
26972017-09-04 Pedro Alves <palves@redhat.com>
2698
2699 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2700 function name from symbol/minsym and pass it to
2701 error_call_unknown_return_type.
2702
74ea4be4
PA
27032017-09-04 Pedro Alves <palves@redhat.com>
2704
2705 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2706 * ax-gdb.c (gen_msym_var_ref): New function.
2707 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2708 * eval.c (evaluate_var_msym_value): New function.
2709 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2710 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2711 to call_function_by_hand.
2712 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2713 Handle OP_VAR_MSYM_VALUE.
2714 (union exp_element) <msymbol>: New field.
2715 * minsyms.h (struct type): Forward declare.
2716 (find_minsym_type_and_address): Declare.
2717 * parse.c (write_exp_elt_msym): New function.
2718 (write_exp_msymbol): Delete, refactored as ...
2719 (find_minsym_type_and_address): ... this new function.
2720 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2721 (operator_length_standard, operator_check_standard): Handle
2722 OP_VAR_MSYM_VALUE.
2723 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2724
7022349d
PA
27252017-09-04 Pedro Alves <palves@redhat.com>
2726
2727 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2728 TYPE_GNU_IFUNC specially here. Throw error if return type is
2729 unknown.
2730 * ada-typeprint.c (print_func_type): Handle functions with unknown
2731 return type.
2732 * c-typeprint.c (c_type_print_base): Handle functions and methods
2733 with unknown return type.
2734 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2735 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2736 * compile/compile-c-types.c: Include "objfiles.h".
2737 (convert_func): For functions with unknown return type, warn and
2738 default to int.
2739 * compile/compile-object-run.c (compile_object_run): Adjust call
2740 to call_function_by_hand_dummy.
2741 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2742 call_function_by_hand.
2743 * eval.c (evaluate_subexp_standard): Adjust calls to
2744 call_function_by_hand. Handle functions and methods with unknown
2745 return type. Pass expect_type to call_function_by_hand.
2746 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2747 return type.
2748 * gcore.c (call_target_sbrk): Adjust call to
2749 call_function_by_hand.
2750 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2751 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2752 an integer address type instead of nodebug.
2753 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2754 call_function_by_hand.
2755 * infcall.c (error_call_unknown_return_type): New function.
2756 (call_function_by_hand): New "default_return_type" parameter.
2757 Pass it down.
2758 (call_function_by_hand_dummy): New "default_return_type"
2759 parameter. Use it instead of defaulting to int. If there's no
2760 default and the return type is unknown, throw an error. If
2761 there's a default return type, and the called function has no
2762 debug info, then assume the function is prototyped.
2763 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2764 New "default_return_type" parameter.
2765 (error_call_unknown_return_type): New declaration.
2766 * linux-fork.c (call_lseek): Cast return type of lseek.
2767 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2768 call_function_by_hand.
2769 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2770 calls to call_function_by_hand.
2771 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2772 return type.
2773 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2774 (value_nsstring, print_object_command): Adjust calls to
2775 call_function_by_hand.
2776 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2777 functions with unknown return type.
2778 (pascal_type_print_func_varspec_suffix): New function.
2779 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2780 TYPE_CODE_METHOD>: Use it.
2781 * python/py-value.c (valpy_call): Adjust call to
2782 call_function_by_hand.
2783 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2784 call_function_by_hand.
2785 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2786 call_function_by_hand.
2787 * valops.c (value_allocate_space_in_inferior): Adjust call to
2788 call_function_by_hand.
2789 * typeprint.c (type_print_unknown_return_type): New function.
2790 * typeprint.h (type_print_unknown_return_type): New declaration.
2791
54990598
PA
27922017-09-04 Pedro Alves <palves@redhat.com>
2793
2794 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2795 types with more than one parameter as prototyped.
2796
9a24775b
PA
27972017-09-04 Pedro Alves <palves@redhat.com>
2798
2799 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2800 (disassemble_command): Use gdb_disassembly_flags instead of bare
2801 int.
2802 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2803 (dump_insns, do_mixed_source_and_assembly_deprecated)
2804 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2805 Use gdb_disassembly_flags instead of bare int.
2806 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2807 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2808 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2809 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2810 (enum gdb_disassembly_flag): ... values of this new enumeration.
2811 (gdb_disassembly_flags): Define.
2812 (gdb_disassembly)
2813 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2814 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2815 gdb_disassembly_flags instead of bare int.
2816 * record-btrace.c (btrace_insn_history)
2817 (record_btrace_insn_history, record_btrace_insn_history_range)
2818 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2819 instead of bare int.
2820 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2821 Use gdb_disassembly_flags instead of bare int.
2822 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2823 Define.
2824 * target-delegates.c: Regenerate.
2825 * target.c (target_insn_history, target_insn_history_from)
2826 (target_insn_history_range): Use gdb_disassembly_flags instead of
2827 bare int.
2828 * target.h: Include "disasm.h".
2829 (struct target_ops) <to_insn_history, to_insn_history_from,
2830 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2831 int.
2832 (target_insn_history, target_insn_history_from)
2833 (target_insn_history_range): Use gdb_disassembly_flags instead of
2834 bare int.
2835
80a65e9b
SM
28362017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2837
2838 * cli/cli-script.c (build_command_line): For if/while commands,
2839 check whether args is empty.
2840
6b66338c
SM
28412017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2842
2843 * cli/cli-script.h (enum misc_command_type): Move from defs.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 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2852 (enum command_control_type): Likewise.
2853 (struct command_line): Likewise.
2854 (free_command_lines): Likewise.
2855 (struct command_lines_deleter): Likewise.
2856 (command_line_up): Likewise.
2857 (read_command_lines): Likewise.
2858 (read_command_lines_1): Likewise.
2859 * breakpoint.h: Include cli/cli-script.h.
2860 * extension-priv.h: Likewise.
2861 * gdbcmd.h: Likewise.
2862
51abb421
PA
28632017-09-04 Pedro Alves <palves@redhat.com>
2864
2865 * ada-lang.c (is_known_support_routine): Move sal declaration to
2866 where it is initialized.
2867 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2868 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2869 (clear_command, update_static_tracepoint): Remove init_sal
2870 references. Move declarations closer to initializations.
2871 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2872 initializations.
2873 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2874 references. Move sal declarations closer to initializations.
2875 * frame.c (find_frame_sal): Return a symtab_and_line via function
2876 return instead of output parameter. Remove init_sal references.
2877 * frame.h (find_frame_sal): Return a symtab_and_line via function
2878 return instead of output parameter.
2879 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2880 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2881 instead of memset.
2882 (gdbscm_find_pc_line): Remove init_sal reference.
2883 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2884 references. Move declarations closer to initializations.
2885 * infcmd.c (set_step_frame): Update. Move declarations closer to
2886 initializations.
2887 (finish_backward): Remove init_sal references. Move declarations
2888 closer to initializations.
2889 * infrun.c (process_event_stop_test, handle_step_into_function)
2890 (insert_hp_step_resume_breakpoint_at_frame)
2891 (insert_step_resume_breakpoint_at_caller): Likewise.
2892 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2893 (symbol_to_sal): Likewise.
2894 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2895 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2896 to its initialization.
2897 * reverse.c (save_bookmark_command): Use new/delete. Remove
2898 init_sal references. Move declarations closer to initializations.
2899 * source.c (get_current_source_symtab_and_line): Remove brace
2900 initialization.
2901 (set_current_source_symtab_and_line): Now takes the sal by const
2902 reference. Remove brace initialization.
2903 (line_info): Remove init_sal reference.
2904 * source.h (set_current_source_symtab_and_line): Now takes a
2905 symtab_and_line via const reference.
2906 * stack.c (set_current_sal_from_frame): Adjust.
2907 (print_frame_info): Adjust.
2908 (get_last_displayed_sal): Return the sal via function return
2909 instead of via output parameter. Simplify.
2910 (frame_info): Adjust.
2911 * stack.h (get_last_displayed_sal): Return the sal via function
2912 return instead of via output parameter.
2913 * symtab.c (init_sal): Delete.
2914 (find_pc_sect_line): Remove init_sal references. Move
2915 declarations closer to initializations.
2916 (find_function_start_sal): Remove init_sal references. Move
2917 declarations closer to initializations.
2918 * symtab.h (struct symtab_and_line): In-class initialize all
2919 fields.
2920 * tracepoint.c (set_traceframe_context)
2921 (print_one_static_tracepoint_marker): Remove init_sal references.
2922 Move declarations closer to initializations.
2923 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2924 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2925 declarations closer to initializations.
2926 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2927 init_sal references. Adjust.
2928
6c5b2ebe
PA
29292017-09-04 Pedro Alves <palves@redhat.com>
2930
2931 * ax-gdb.c (agent_command_1): Use range-for.
2932 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2933 * breakpoint.c: Include "common/array-view.h".
2934 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2935 parameter from struct symtabs_and_lines to
2936 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2937 (breakpoint_sals_to_pc): Change sals parameter from struct
2938 symtabs_and_lines to std::vector reference.
2939 (check_fast_tracepoint_sals): Change sals parameter from struct
2940 symtabs_and_lines to std::array_view. Use range-for.
2941 (decode_static_tracepoint_spec): Return a std::vector instead of
2942 symtabs_and_lines. Update.
2943 (create_breakpoint): Update.
2944 (break_range_command, until_break_command, clear_command): Update.
2945 (base_breakpoint_decode_location, bkpt_decode_location)
2946 (bkpt_probe_create_sals_from_location)
2947 (bkpt_probe_decode_location, tracepoint_decode_location)
2948 (tracepoint_probe_decode_location)
2949 (strace_marker_create_sals_from_location): Return a std::vector
2950 instead of symtabs_and_lines.
2951 (strace_marker_create_breakpoints_sal): Update.
2952 (strace_marker_decode_location): Return a std::vector instead of
2953 symtabs_and_lines. Update.
2954 (update_breakpoint_locations): Change struct symtabs_and_lines
2955 parameters to gdb::array_view. Adjust.
2956 (location_to_sals): Return a std::vector instead of
2957 symtabs_and_lines. Update.
2958 (breakpoint_re_set_default): Use std::vector instead of struct
2959 symtabs_and_lines.
2960 (decode_location_default): Return a std::vector instead of
2961 symtabs_and_lines. Update.
2962 * breakpoint.h: Include "common/array-view.h".
2963 (struct breakpoint_ops) <decode_location>: Now returns a
2964 std::vector instead of returning a symtabs_and_lines via output
2965 parameter.
2966 (update_breakpoint_locations): Change sals parameters to use
2967 gdb::array_view.
2968 * cli/cli-cmds.c (edit_command, list_command): Update to use
2969 std::vector and gdb::array_view.
2970 (ambiguous_line_spec): Adjust to use gdb::array_view and
2971 range-for.
2972 (compare_symtabs): Rename to ...
2973 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2974 const reference and adjust.
2975 (filter_sals): Rewrite using std::vector and standard algorithms.
2976 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2977 (jump_command): Update to use std::vector.
2978 * linespec.c (struct linespec_state) <canonical_names>: Update
2979 comment.
2980 (add_sal_to_sals_basic): Delete.
2981 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2982 (decode_line_2, create_sals_line_offset)
2983 (convert_address_location_to_sals, convert_linespec_to_sals)
2984 (convert_explicit_location_to_sals, parse_linespec)
2985 (event_location_to_sals, decode_line_full, decode_line_1)
2986 (decode_line_with_current_source)
2987 (decode_line_with_last_displayed, decode_objc)
2988 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2989 (linespec_result::~linespec_result): Adjust to use std::vector
2990 instead of symtabs_and_lines.
2991 * linespec.h (linespec_sals::sals): Now a std::vector.
2992 (struct linespec_result): Use std::vector, bool, and in-class
2993 initialization.
2994 (decode_line_1, decode_line_with_current_source)
2995 (decode_line_with_last_displayed): Return std::vector.
2996 * macrocmd.c (info_macros_command): Use std::vector.
2997 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2998 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2999 std::vector.
3000 * probe.h (parse_probes): Return a std::vector.
3001 * python/python.c (gdbpy_decode_line): Use std::vector and
3002 gdb::array_view.
3003 * source.c (select_source_symtab, line_info): Use std::vector.
3004 * stack.c (func_command): Use std::vector.
3005 * symtab.h (struct symtabs_and_lines): Delete.
3006 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3007
7c44b49c
PA
30082017-09-04 Pedro Alves <palves@redhat.com>
3009
3010 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3011 unittests/array-view-selftests.c.
3012 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3013 * common/array-view.h: New file.
3014 * unittests/array-view-selftests.c: New file.
3015
e439fa14
PA
30162017-09-04 Pedro Alves <palves@redhat.com>
3017
3018 * cli/cli-cmds.c (edit_command): Pass message to
3019 ambiguous_line_spec.
3020 (list_command): Pass message to ambiguous_line_spec. Say
3021 "first"/"last" instead of "start" and "end" to be consistent with
3022 the manual.
3023 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
3024 them to print formatted message.
3025
7525b645
PA
30262017-09-04 Pedro Alves <palves@redhat.com>
3027
3028 * btrace.c (ftrace_add_pt): Pass btrace_insn to
3029 ftrace_update_insns by reference instead of pointer.
3030
badc0020
YQ
30312017-09-04 Yao Qi <yao.qi@linaro.org>
3032
3033 * i386-go32-tdep.c: Include x86-xstate.h.
3034 (i386_go32_init_abi): Call i386_target_description.
3035 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3036 if xcr0 is X86_XSTATE_X87_MASK.
3037 * i386-tdep.h (tdesc_i386): Remove the declaration.
3038 (tdesc_i386_mmx): Likewise.
3039
d78bdb54
YQ
30402017-09-04 Yao Qi <yao.qi@linaro.org>
3041
3042 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3043 X86_XSTATE_SSE_MASK instead of 0.
3044
ca1fa5ee
YQ
30452017-09-04 Yao Qi <yao.qi@linaro.org>
3046
3047 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3048 i386_target_description.
3049 * i386-fbsd-nat.c (i386fbsd_read_description): Call
3050 i386_target_description.
3051 * i386-tdep.c (i386_gdbarch_init): Likewise.
3052
2434b019
YQ
30532017-09-04 Yao Qi <yao.qi@linaro.org>
3054
3055 * amd64-darwin-tdep.c: Include "x86-xstate.h".
3056 (x86_darwin_init_abi_64): Call amd64_target_description.
3057 * amd64-dicos-tdep.c: Likewise.
3058 * amd64-fbsd-nat.c: Likewise.
3059 * amd64-fbsd-tdep.c: Likewise.
3060 * amd64-nbsd-tdep.c: Likewise.
3061 * amd64-obsd-tdep.c: Likewise.
3062 * amd64-sol2-tdep.c: Likewise.
3063 * amd64-windows-tdep.c: Likewise.
3064 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3065
0860c437
SM
30662017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3067
3068 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3069 (btrace_function) <insn>: Change type to use std::vector.
3070 * btrace.c (ftrace_debug, ftrace_call_num_insn,
3071 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3072 ftrace_update_insns, ftrace_compute_global_level_offset,
3073 btrace_stitch_bts, btrace_clear, btrace_insn_get,
3074 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3075 change to std::vector.
3076 (ftrace_update_insns): Adjust to change to std::vector, change
3077 type of INSN parameter.
3078 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3079 * record-btrace.c (btrace_call_history_insn_range,
3080 btrace_compute_src_line_range,
3081 record_btrace_frame_prev_register): Adjust to change to
3082 std::vector.
3083 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3084 to change to std::vector.
3085
0638b7f9
TT
30862017-09-03 Tom Tromey <tom@tromey.com>
3087
3088 * corefile.c (reopen_exec_file): Use std::string.
3089
8f84fb0e
TT
30902017-09-03 Tom Tromey <tom@tromey.com>
3091
3092 * compile/compile.c (compile_register_name_mangled): Return
3093 std::string.
3094 * compile/compile-loc2c.c (pushf_register_address): Update.
3095 (pushf_register): Update.
3096 * compile/compile-c-types.c (convert_array): Update.
3097 * compile/compile-c-symbols.c (generate_vla_size): Update.
3098 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3099 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3100 (convert_one_symbol): Update.
3101 (generate_c_for_for_one_variable): Update.
3102 * compile/compile-c-support.c (c_get_range_decl_name): Return a
3103 std::string.
3104 (generate_register_struct): Update.
3105 * compile/compile-internal.h (c_get_range_decl_name): Return a
3106 std::string.
3107 (compile_register_name_mangled): Return std::string.
3108
18e9961f
TT
31092017-09-03 Tom Tromey <tom@tromey.com>
3110
3111 * utils.c (perror_string): Return a std::string.
3112 (throw_perror_with_name, perror_warning_with_name): Update.
3113
45343786
TT
31142017-09-03 Tom Tromey <tom@tromey.com>
3115
3116 * demangle.c (demangle_command): Use std::string,
3117 unique_xmalloc_ptr.
3118
b57af503
TT
31192017-09-03 Tom Tromey <tom@tromey.com>
3120
3121 * cli/cli-setshow.c (do_set_command): Use std::string.
3122
6eecf35f
TT
31232017-09-03 Tom Tromey <tom@tromey.com>
3124
3125 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3126
56496dd4
TT
31272017-09-03 Tom Tromey <tom@tromey.com>
3128
3129 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3130
e91a1fa7
TT
31312017-09-03 Tom Tromey <tom@tromey.com>
3132
3133 * mi/mi-cmd-env.c (env_execute_cli_command): Use
3134 gdb::unique_xmalloc_ptr.
3135
7ffd83d7
TT
31362017-09-03 Tom Tromey <tom@tromey.com>
3137
3138 * thread.c (print_thread_info_1): Use string_printf.
3139 (thread_apply_command, thread_apply_all_command): Use
3140 std::string.
3141
1ccbe998
TT
31422017-09-03 Tom Tromey <tom@tromey.com>
3143
3144 * valprint.c (val_print_string): Update.
3145 * gdbcore.h (memory_error_message): Return std::string.
3146 * corefile.c (memory_error_message): Return std::string.
3147 (memory_error): Update.
3148 * breakpoint.c (insert_bp_location): Update.
3149
23fdd69e
SM
31502017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3151
3152 * target/waitstatus.h (target_waitstatus_to_string): Change
3153 return type to std::string.
3154 * target/waitstatus.c (target_waitstatus_to_string): Return
3155 std::string.
3156 * target.h (target_waitstatus_to_string): Remove declaration.
3157 * infrun.c (resume, clear_proceed_status_thread,
3158 print_target_wait_results, do_target_wait, save_waitstatus,
3159 stop_all_threads): Adjust.
3160 * record-btrace.c (record_btrace_wait): Adjust.
3161 * target-debug.h
3162 (target_debug_print_struct_target_waitstatus_p): Adjust.
3163
5c811d30
JK
31642017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3165
3166 PR gdb/22046
3167 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3168 detection.
3169
0a2dde4a
SDJ
31702017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3171
3172 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3173 for setting/unsetting environment variables on the remote target.
3174 (New remote packets): Add entries for QEnvironmentHexEncoded,
3175 QEnvironmentUnset and QEnvironmentReset.
3176 * common/environ.c (gdb_environ::operator=): Extend method to
3177 handle m_user_set_env_list and m_user_unset_env_list.
3178 (gdb_environ::clear): Likewise.
3179 (match_var_in_string): Change type of first parameter from 'char
3180 *' to 'const char *'.
3181 (gdb_environ::set): Extend method to handle
3182 m_user_set_env_list and m_user_unset_env_list.
3183 (gdb_environ::unset): Likewise.
3184 (gdb_environ::clear_user_set_env): New method.
3185 (gdb_environ::user_set_envp): Likewise.
3186 (gdb_environ::user_unset_envp): Likewise.
3187 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3188 m_user_unset_env_list on move constructor/assignment.
3189 (unset): Add new default parameter 'update_unset_list = true'.
3190 (clear_user_set_env): New method.
3191 (user_set_envp): Likewise.
3192 (user_unset_envp): Likewise.
3193 (m_user_set_env_list): New std::set.
3194 (m_user_unset_env_list): Likewise.
3195 * common/rsp-low.c (hex2str): New function.
3196 (bin2hex): New overload for bin2hex function.
3197 * common/rsp-low.c (hex2str): New prototype.
3198 (str2hex): New overload prototype.
3199 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3200 QEnvironmentUnset and QEnvironmentReset.
3201 (remote_protocol_features): Add QEnvironmentHexEncoded,
3202 QEnvironmentUnset and QEnvironmentReset packets.
3203 (send_environment_packet): New function.
3204 (extended_remote_environment_support): Likewise.
3205 (extended_remote_create_inferior): Call
3206 extended_remote_environment_support.
3207 (_initialize_remote): Add QEnvironmentHexEncoded,
3208 QEnvironmentUnset and QEnvironmentReset packet configs.
3209 * unittests/environ-selftests.c (gdb_selftest_env_var):
3210 New variable.
3211 (test_vector_initialization): New function.
3212 (test_init_from_host_environ): Likewise.
3213 (test_reinit_from_host_environ): Likewise.
3214 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3215 Likewise.
3216 (test_unset_set_empty_vector): Likewise.
3217 (test_vector_clear): Likewise.
3218 (test_std_move): Likewise.
3219 (test_move_constructor):
3220 (test_self_move): Likewise.
3221 (test_set_unset_reset): Likewise.
3222 (run_tests): Rewrite in terms of the functions above.
3223
654670a4
WP
32242017-08-31 Weimin Pan <weimin.pan@oracle.com>
3225
3226 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3227 (adi_available): Use a temp variable of type CORE_ADDR as argument
3228 3 when calling target_auxv_search.
3229 (adi_normalize_address): Use masks and xor operators to calculate
3230 normalized address.
3231 (adi_read_versions, adi_write_versions, adi_print_versions)
3232 (do_examine, do_assign): Use paddress.
3233
7755ddb7
JB
32342017-08-29 John Baldwin <jhb@FreeBSD.org>
3235
3236 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3237 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3238 out of loop and add supply of FIR.
3239 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3240 add collect of FIR.
3241
fd437cbc
SM
32422017-08-28 Simon Marchi <simon.marchi@ericsson.com>
3243
3804a343 3244 PR gdb/21827
fd437cbc
SM
3245 * cli/cli-script.c (define_command): Don't convert command name
3246 to lower case.
3247
988f6b3d
JB
32482017-08-25 Joel Brobecker <brobecker@adacore.com>
3249
3250 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3251 Update all callers accordingly. Remove all code blocks handling
3252 the case where DISPP is not NULL.
3253
663c44ac
JK
32542017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3255
3256 PR symtab/22003
3257 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3258 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3259 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3260
f1902523
JK
32612017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3262
3263 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3264 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3265 (read_comp_units_from_section): New parameter abbrev_section, use
3266 read_and_check_comp_unit_head, allocate signatured_type if needed.
3267 (create_all_comp_units): Update read_comp_units_from_section caller.
3268
87215ad1
SDJ
32692017-08-23 Pedro Alves <palves@redhat.com>
3270
3271 PR remote/21852
3272 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3273 to null_ptid and switch to thread without reading the registers
3274 after adding the inferior.
3275
6e41ddec
JK
32762017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3277
3278 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3279 compile-gcc.
3280 * compile/compile.c (compile_gcc, show_compile_gcc): New.
3281 (compile_to_object): Implement compile_gcc.
3282 (_initialize_compile): Install "set compile-gcc". Initialize
3283 compile_gcc.
3284
e68c32d5
JK
32852017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3286
3287 * compile/compile.c (compile_to_object): Conditionally call
3288 set_verbose. Conditionally call compile or compile_v0.
3289
58afddc6
WP
32902017-08-07 Weimin Pan <weimin.pan@oracle.com>
3291
3292 * sparc64-tdep.h: (adi_normalize_address): New export.
3293 * sparc-nat.h: (open_adi_tag_fd): New export.
3294 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3295 * sparc64-linux-tdep.c:
3296 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3297 (sparc64_linux_handle_segmentation_fault): New function.
3298 (sparc64_linux_init_abi): Register
3299 sparc64_linux_handle_segmentation_fault
3300 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3301 (sparc64_addr_bits_remove): New function.
3302 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3303 (MAX_PROC_NAME_SIZE): New macro.
3304 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3305 (sparc64adilist): New variable.
3306 (adi_proc_list): New variable.
3307 (find_adi_info): New function.
3308 (add_adi_info): New function.
3309 (get_adi_info_proc): New function.
3310 (get_adi_info): New function.
3311 (info_adi_command): New function.
3312 (read_maps_entry): New function.
3313 (adi_available): New function.
3314 (adi_normalize_address): New function.
3315 (adi_align_address): New function.
3316 (adi_convert_byte_count): New function.
3317 (adi_tag_fd): New function.
3318 (adi_is_addr_mapped): New function.
3319 (adi_read_versions): New function.
3320 (adi_write_versions): New function.
3321 (adi_print_versions): New function.
3322 (do_examine): New function.
3323 (do_assign): New function.
3324 (adi_examine_command): New function.
3325 (adi_assign_command): New function.
3326 (_initialize_sparc64_adi_tdep): New function.
3327
11db9430
SM
33282017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3329
3330 * breakpoint.c (breakpoints_info): Rename to ...
3331 (info_breakpoints_command): ... this.
3332 (watchpoints_info): Rename to ...
3333 (info_watchpoints_command): ... this.
3334 (tracepoints_info): Rename to ...
3335 (info_tracepoints_command): ... this.
3336 (_initialize_breakpoint): Adjust.
3337 * dcache.c (dcache_info): Rename to ...
3338 (info_display_command): ... this.
3339 (_initialize_dcache): Adjust.
3340 * frame.h (args_info): Rename to ...
3341 (info_args_command): ... this.
3342 (locals_info): Rename to ...
3343 (info_locals_command): ... this.
3344 * infcmd.c (nofp_registers_info): Rename to ...
3345 (info_registers_command): ... this.
3346 (float_info): Rename to ...
3347 (info_float_command): ... this.
3348 (program_info): Rename to ...
3349 (info_program_command): ... this.
3350 (all_registers_info): Rename to ...
3351 (info_all_registers_command): ... this.
3352 (vector_info): Rename to ...
3353 (info_vector_command): ... this.
3354 (float_info): Rename to ...
3355 (info_float_command): ... this.
3356 (_initialize_infcmd): Adjust.
3357 * inferior.h (term_info): Rename to ...
3358 (info_terminal_command): ... this.
3359 * inflow.c (term_info): Rename to ...
3360 (info_terminal_command): ... this.
3361 (_initialize_inflow): Adjust.
3362 * infrun.c (signals_info): Rename to ...
3363 (info_signals_command): ... this.
3364 (_initialize_infrun): Adjust.
3365 * objc-lang.c (classes_info): Rename to ...
3366 (info_classes_command): ... this.
3367 (selectors_info): Rename to ...
3368 (info_selectors_command): ... this.
3369 (_initialize_objc_language): Adjust.
3370 * printcmd.c (sym_info): Rename to ...
3371 (info_symbol_command): ... this.
3372 (address_info): Rename to ...
3373 (info_address_command): ... this.
3374 (display_info): Rename to ...
3375 (info_display_command): ... this.
3376 (_initialize_printcmd): Adjust.
3377 * reverse.c (bookmarks_info): Rename to ...
3378 (info_breakpoints_command): ... this.
3379 (_initialize_reverse): Adjust.
3380 * ser-go32.c (dos_info): Rename to ...
3381 (info_serial_command): ... this.
3382 (_initialize_ser_dos): Adjust.
3383 * skip.c (skip_info): Rename to ...
3384 (info_skip_command): ... this.
3385 (_initialize_step_skip): Adjust.
3386 * source.c (line_info): Rename to ...
3387 (info_line_command): ... this.
3388 (source_info): Rename to ...
3389 (info_source_command)
3390 * stack.c (frame_info): Rename to ...
3391 (info_frame_command): ... this.
3392 (locals_info): Rename to ...
3393 (info_locals_command): ... this.
3394 (args_info): Rename to ...
3395 (info_args_command): ... this.
3396 (_initialize_stack): Adjust.
3397 * symtab.c (sources_info): Rename to ...
3398 (info_sources_command): ... this.
3399 (variables_info): Rename to ...
3400 (info_variables_command): ... this.
3401 (functions_info): Rename to ...
3402 (info_functions_command): ... this.
3403 (types_info): Rename to ...
3404 (info_types_command): ... this.
3405 (_initialize_symtab): Adjust.
3406 * target.c (target_info): Rename to ...
3407 (info_target_command): ... this.
3408 (initialize_targets): Adjust.
3409 * tracepoint.c (tvariables_info): Rename to ...
3410 (info_tvariables_command): ... this.
3411 (scope_info): Rename to ...
3412 (info_scope_command): ... this.
3413 (trace_dump_actions): Adjust.
3414 (_initialize_tracepoint): Adjust.
3415
b270e6f9
TT
34162017-08-22 Tom Tromey <tom@tromey.com>
3417
3418 * breakpoint.h (install_breakpoint): Update.
3419 * breakpoint.c (add_solib_catchpoint): Update.
3420 (install_breakpoint): Change argument to a std::unique_ptr.
3421 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3422 (create_breakpoint_sal, create_breakpoint): Update.
3423 (watch_command_1, catch_exec_command_1)
3424 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3425 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3426 Return the breakpoint.
3427 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3428 (new_single_step_breakpoint): Update.
3429 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3430 std::unique_ptr.
3431 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3432 std::unique_ptr.
3433 * break-catch-sig.c (create_signal_catchpoint): Use
3434 std::unique_ptr.
3435 * ada-lang.c (create_ada_exception_catchpoint): Use
3436 std::unique_ptr.
3437
36bd8eaa
TT
34382017-08-22 Tom Tromey <tom@tromey.com>
3439
3440 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3441
56f37645
TT
34422017-08-22 Tom Tromey <tom@tromey.com>
3443
3444 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3445 (lookup_partial_symbol): Update.
3446
0b581c69
TT
34472017-08-22 Tom Tromey <tom@tromey.com>
3448
3449 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3450 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3451 (find_and_open_source, symtab_to_fullname): Update.
3452 * psymtab.c (psymtab_to_fullname): Update.
3453
14278e1f
TT
34542017-08-22 Tom Tromey <tom@tromey.com>
3455
3456 * exec.c (exec_file_attach): Update.
3457 * linux-thread-db.c (try_thread_db_load): Update.
3458 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3459 * utils.c (gdb_realpath): Change return type.
3460 (gdb_realpath_keepfile): Update.
3461 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3462 (_initialize_utils): Register the new self test.
3463 * source.c (openp): Update.
3464 (find_and_open_source): Update.
3465 * nto-tdep.c (nto_find_and_open_solib): Update.
3466 * main.c (set_gdb_data_directory): Update.
3467 (captured_main_1): Update.
3468 * dwarf2read.c (dwarf2_get_dwz_file): Update
3469 (dw2_map_symbol_filenames): Update.
3470 * auto-load.c (auto_load_safe_path_vec_update): Update.
3471 (filename_is_in_auto_load_safe_path_vec): Change type of
3472 "filename_realp".
3473 (auto_load_objfile_script): Update.
3474 (file_is_auto_load_safe): Update. Use std::string.
3475 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3476
4971c9a7
TT
34772017-08-22 Tom Tromey <tom@tromey.com>
3478
3479 * utils.c (gdb_realpath_keepfile): Return a
3480 gdb::unique_xmalloc_ptr.
3481 * exec.c (exec_file_attach): Update.
3482 * utils.h (gdb_realpath_keepfile): Return a
3483 gdb::unique_xmalloc_ptr.
3484
e3e41d58
TT
34852017-08-22 Tom Tromey <tom@tromey.com>
3486
3487 * compile/compile.c (compile_file_command): Use
3488 gdb::unique_xmalloc_ptr, std::string.
3489 * utils.c (gdb_abspath): Change return type.
3490 * source.c (openp): Update.
3491 * objfiles.c (allocate_objfile): Update.
3492 * main.c (set_gdb_data_directory): Update.
3493 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3494
0d999a6e
ZZ
34952017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3496
3497 * cli-cmds.c (list_commands): List actual code around more than
3498 one location.
3499
329d5e7e
JB
35002017-08-21 John Baldwin <jhb@FreeBSD.org>
3501
3502 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3503
bf223d3e
PA
35042017-08-21 Pedro Alves <palves@redhat.com>
3505
3506 PR gdb/19487
3507 * c-exp.y (variable production): Handle function aliases.
3508 * minsyms.c (msymbol_is_text): New function.
3509 * minsyms.h (msymbol_is_text): Declare.
3510 * symtab.c (find_function_alias_target): New function.
3511 * symtab.h (find_function_alias_target): Declare.
3512
c973d0aa
PA
35132017-08-21 Pedro Alves <palves@redhat.com>
3514
3515 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3516 typedefs.
3517 * typeprint.c (whatis_exp): If handling "whatis", and expression
3518 is OP_TYPE, strip one typedef level. Otherwise don't strip
3519 typedefs here.
3520 * valops.c (value_cast): Save "to" type before resolving
3521 stubs/typedefs. Use that type as resulting value's type.
3522
2989a365
TT
35232017-08-18 Tom Tromey <tom@tromey.com>
3524 Pedro Alves <palves@redhat.com>
3525
3526 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3527 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3528 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3529 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3530 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3531 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3532 (linux_get_siginfo_data): Add "thread" argument. Use
3533 scoped_restore.
3534 * linux-nat.c (linux_child_follow_fork)
3535 (check_stopped_by_watchpoint): Use scoped_restore.
3536 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3537 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3538 (restore_inferior_ptid, save_inferior_ptid): Remove.
3539 * btrace.c (btrace_fetch): Use scoped_restore.
3540 * bsd-uthread.c (bsd_uthread_fetch_registers)
3541 (bsd_uthread_store_registers): Use scoped_restore.
3542 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3543 scoped_restore.
3544 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3545 (aix_thread_xfer_partial): Use scoped_restore.
3546 * inferior.h (save_inferior_ptid): Remove.
3547
e60eb288
YQ
35482017-08-18 Yao Qi <yao.qi@linaro.org>
3549
3550 PR tdep/21818
3551 * arm-tdep.c (gdb_print_insn_arm): Mark
3552 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3553
6d580b63
YQ
35542017-08-18 Yao Qi <yao.qi@linaro.org>
3555
3556 * NEWS: Mention GDBserver's new option "--selftest".
3557 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3558 * selftest.c: Move it to common/selftest.c.
3559 * selftest.h: Move it to common/selftest.h.
3560 * selftest-arch.c (reset): New function.
3561 (tests_with_arch): Call reset.
3562
86dcbf50
YQ
35632017-08-18 Yao Qi <yao.qi@linaro.org>
3564
3565 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3566 instead of exception_fprintf and printf_filtered.
3567
7649770c
YQ
35682017-08-18 Yao Qi <yao.qi@linaro.org>
3569
3570 * selftest.c (register_self_test): Rename it to
3571 selftests::register_test.
3572 (run_self_tests): selftest::run_tests.
3573 * selftest.h: Update declarations.
3574 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3575 selftests::register_test_foreach_arch.
3576 * selftest-arch.h: Update declaration.
3577 * aarch64-tdep.c: Update.
3578 * arm-tdep.c: Likewise.
3579 * disasm-selftests.c: Likewise.
3580 * dwarf2loc.c: Likewise.
3581 * dwarf2-frame.c: Likewise.
3582 * findvar.c: Likewise.
3583 * gdbarch-selftests.c: Likewise.
3584 * maint.c (maintenance_selftest): Likewise.
3585 * regcache.c: Likewise.
3586 * rust-exp.y: Likewise.
3587 * selftest-arch.c: Likewise.
3588 * unittests/environ-selftests.c: Likewise.
3589 * unittests/function-view-selftests.c: Likewise.
3590 * unittests/offset-type-selftests.c: Likewise.
3591 * unittests/optional-selftests.c: Likewise.
3592 * unittests/scoped_restore-selftests.c: Likewise.
3593 * utils-selftests.c: Likewise.
3594
b0cba12e
PA
35952017-08-17 Pedro Alves <palves@redhat.com>
3596
3597 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3598 local.
3599
4c8aa72d
PA
36002017-08-17 Pedro Alves <palves@redhat.com>
3601
3602 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3603 field.
3604 (reset_die_in_process): Delete, replaced by ...
3605 (process_die_scope): ... this new class. Make it responsible for
3606 freeing cu->line_header too.
3607 (process_die): Use process_die_scope.
3608 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3609 cu->line_header_die_owner. Don't release the line header if it's
3610 owned by the CU.
3611 (setup_type_unit_groups): Make the CU/DIE own the line header.
3612 Don't release the line header here.
3613
ba713918
AL
36142017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3615
3616 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3617
44d0fb3a
RK
36182017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3619
3620 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3621 Single-Key mode
3622
a5afdb16
RK
36232017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3624
3625 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3626 mode command list.
3627
47613aeb
SH
36282017-08-15 Stafford Horne <shorne@gmail.com>
3629
3630 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3631
9c3cc999
SH
36322017-08-15 Stafford Horne <shorne@gmail.com>
3633
3634 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3635
206726fb
SDJ
36362017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3637
3638 PR gdb/21954
3639 * infcmd.c (unset_environment_command): Use the 'clear' method on
3640 the environment instead of resetting it.
3641
0335ac6d
JB
36422017-08-15 John Baldwin <jhb@FreeBSD.org>
3643
3644 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3645 platforms.
3646
d3abe1c8
TT
36472017-08-14 Tom Tromey <tom@tromey.com>
3648
3649 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3650 (print_binary_chars): Likewise.
3651 (BITS_IN_BYTES): Remove.
3652
d6382fff
TT
36532017-08-14 Tom Tromey <tom@tromey.com>
3654
3655 PR gdb/21675
3656 * valprint.c (LOW_ZERO): Change value to 034.
3657 (print_octal_chars): Add static_asserts for octal constants.
3658 * printcmd.c (print_scalar_formatted): Add 'd' case.
3659
f978cb06
TT
36602017-08-11 Tom Tromey <tom@tromey.com>
3661
3662 * symfile.c (add_symbol_file_command): Use std::vector.
3663
2f5404b3
TT
36642017-08-14 Tom Tromey <tom@tromey.com>
3665
3666 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3667 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3668 std::move.
3669 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3670
de7985c3
PA
36712017-08-11 Pedro Alves <palves@redhat.com>
3672
3673 * infrun.c (process_event_stop_test): Adjust
3674 function_name_is_marked_for_skip call.
3675 * skip.c: Include <list>.
3676 (skiplist_entry): Make it a class with private fields, and
3677 getters/setters.
3678 (skiplist_entry_chain): Delete.
3679 (skiplist_entries): New.
3680 (skiplist_entry_count): Delete.
3681 (highest_skiplist_entry_num): New.
3682 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3683 (add_skiplist_entry): Delete.
3684 (skiplist_entry::skiplist_entry): New.
3685 (skiplist_entry::add_entry): New.
3686 (skip_file_command, skip_function): Adjust.
3687 (compile_skip_regexp): Delete.
3688 (skip_command): Don't compile regexp here. Adjust to use
3689 skiplist_entry::add_entry.
3690 (skip_info): Adjust to use range-for and getters.
3691 (skip_enable_command, skip_disable_command): Adjust to use
3692 range-for and setters.
3693 (skip_delete_command): Adjust to use std::list.
3694 (add_skiplist_entry): Delete.
3695 (skip_file_p): Delete, refactored as ...
3696 (skiplist_entry::do_skip_file_p): ... this new method.
3697 (skip_gfile_p): Delete, refactored as ...
3698 (skiplist_entry::do_gskip_file_p): ... this new method.
3699 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3700 (skiplist_entry::skip_function_p): ... this new method.
3701 (function_name_is_marked_for_skip): Now returns bool, and takes
3702 the function sal by const reference. Adjust to use range-for and
3703 skiplist_entry methods.
3704 (_initialize_step_skip): Remove references to
3705 skiplist_entry_chain, skiplist_entry_count.
3706 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3707 takes the function sal by const reference.
3708
be7d3cd5
YQ
37092017-08-11 Yao Qi <yao.qi@linaro.org>
3710
3711 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3712 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3713 (dwarf2_frame_cache):
3714 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3715 RETURN_MASK_ALL and set *this_case to NULL.
3716 * frame-unwind.h: Update comments.
3717
1c90d9f0
YQ
37182017-08-11 Yao Qi <yao.qi@linaro.org>
3719
3720 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3721 (dwarf2_frame_state_copy_regs): Remove.
3722 (dwarf2_frame_state_free_regs): Remove.
3723 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3724 (dwarf2_restore_rule): Call method .alloc_regs instead of
3725 dwarf2_frame_state_alloc_regs.
3726 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3727 constructor. Call std::move.
3728 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3729 (dwarf2_frame_cache): Likewise.
3730
3731 [GDB_SELF_TEST]: Include selftest.h and
3732 selftest-arch.h.
3733 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3734 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3735 execute_cfa_program_test.
3736
3737 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3738 copy ctor, assignment operator, move assignment.
3739 <alloc_regs>: New method.
3740 <swap>: New method.
3741 (struct dwarf2_frame_state): Delete dtor.
3742 (dwarf2_frame_state_alloc_regs): Remove declaration.
3743 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3744 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3745
afe37d6b
YQ
37462017-08-11 Yao Qi <yao.qi@linaro.org>
3747
3748 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3749 (dwarf2_frame_state::dwarf2_frame_state): New.
3750 (dwarf2_frame_state::~dwarf2_frame_state): New.
3751 (dwarf2_fetch_cfa_info): Update.
3752 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3753 rather than a pointer. Update code.
3754 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3755 dtor.
3756 <data_align, code_align, retaddr_column>: Change them to const.
3757 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3758 to bool.
3759
b348037f
YQ
37602017-08-11 Yao Qi <yao.qi@linaro.org>
3761
3762 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3763 <loc.exp>: New field.
3764 * dwarf2-frame.c (execute_cfa_program): Update.
3765 (dwarf2_frame_prev_register): Update.
3766
e7c9de26
PA
37672017-08-10 Pedro Alves <palves@redhat.com>
3768
3769 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3770
e8c6b620
JB
37712017-08-09 John Baldwin <jhb@FreeBSD.org>
3772
3773 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3774 (fbsd_pending_children): Use std::list.
3775 (fbsd_remember_child): Likewise.
3776 (fbsd_is_child_pending): Likewise.
3777 (fbsd_pending_vfork_done): Use std::forward_list.
3778 (fbsd_add_vfork_done): Likewise.
3779 (fbsd_is_vfork_done_pending): Likewise.
3780 (fbsd_next_vfork_done): Likewise.
3781
e4a26669
JB
37822017-08-09 John Baldwin <jhb@FreeBSD.org>
3783
3784 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3785 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3786 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3787 for `mapfilename'.
3788 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 3789 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 3790
142311d3
JB
37912017-08-09 John Baldwin <jhb@FreeBSD.org>
3792
3793 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3794 "filestuff.h".
3795 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3796
42fa2e0e
TT
37972017-08-09 Tom Tromey <tom@tromey.com>
3798
3799 * skip.c (skiplist_entry): New constructor.
3800 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3801 (skiplist_entry::file_is_glob): Now bool.
3802 (skiplist_entry::file, skiplist_entry::function): Now
3803 std::string.
3804 (make_skip_entry): Return a unique_ptr. Use new.
3805 (free_skiplist_entry, free_skiplist_entry_cleanup)
3806 (make_free_skiplist_entry_cleanup): Remove.
3807 (skip_command, skip_disable_command, add_skiplist_entry)
3808 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3809 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3810 (function_name_is_marked_for_skip): Update.
3811 (skip_delete_command): Update. Use delete.
3812
cd3af38d
JW
38132017-08-09 Jiong Wang <jiong.wang@arm.com>
3814
3815 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3816 (aarch64_linux_core_read_description): New function.
3817 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3818
29592bde
PA
38192017-08-09 Pedro Alves <palves@redhat.com>
3820
3821 * cp-name-parser.y (cp_comp_to_string): Return a
3822 gdb::unique_xmalloc_ptr<char>.
3823 * cp-support.c (replace_typedefs_qualified_name)
3824 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3825 (cp_canonicalize_string_full): Use op= instead of explicit
3826 convertion.
3827 (cp_class_name_from_physname, method_name_from_physname)
3828 (cp_func_name, cp_remove_params): Adjust to use
3829 gdb::unique_xmalloc_ptr<char>.
3830 * cp-support.h (cp_comp_to_string): Return a
3831 gdb::unique_xmalloc_ptr<char>.
3832 * python/py-type.c (typy_lookup_type): Adjust to use
3833 gdb::unique_xmalloc_ptr<char>.
3834
b3340438
L
38352017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3836
3837 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3838
e88e8651
YQ
38392017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3840 Yao Qi <yao.qi@linaro.org>
3841
3842 * cp-support.c (cp_canonicalize_string_full): Use
3843 gdb::unique_xmalloc_ptr<char>.
3844 (cp_canonicalize_string): Likewise.
3845
f5a29eb0
YQ
38462017-08-09 Yao Qi <yao.qi@linaro.org>
3847
3848 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3849 * regformats/i386/amd64-avx-avx512.dat: Remove.
3850 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3851 * regformats/i386/amd64-avx-mpx.dat:Remove.
3852 * regformats/i386/amd64-avx.dat: Remove.
3853 * regformats/i386/amd64-mpx.dat: Remove.
3854 * regformats/i386/i386-avx-avx512.dat: Remove.
3855 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3856 * regformats/i386/i386-avx-mpx.dat: Remove.
3857 * regformats/i386/i386-mmx.dat: Remove.
3858 * regformats/i386/i386-mpx.dat: Remove.
3859
57757c2f
YQ
38602017-08-09 Yao Qi <yao.qi@linaro.org>
3861
3862 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3863 * amd64-tdep.c: Don't include features/i386/x32*.c.
3864 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3865 functions.
3866 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3867 and i386/x32-avx-avx512.
3868 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3869 and i386/x32.xml.
3870 * features/i386/x32-avx-avx512.c: Removed.
3871 * features/i386/x32-avx-avx512.xml: Removed.
3872 * features/i386/x32-avx.c: Removed.
3873 * features/i386/x32-avx.xml: Removed.
3874 * features/i386/x32.c: Removed.
3875 * features/i386/x32.xml: Removed.
3876 * regformats/i386/x32-avx-avx512.dat: Removed.
3877 * regformats/i386/x32-avx.dat: Removed.
3878 * regformats/i386/x32.dat: Removed.
3879
ba7b109b
MR
38802017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3881
3882 PR breakpoints/21886
3883 * mem-break.c (default_memory_insert_breakpoint): Use
3884 `->placed_address' rather than `->reqstd_address' for the
3885 breakpoint location.
3886
e347efc3
MR
38872017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3888
3889 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3890 assertions.
3891
0dba2a6c
MR
38922017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3893
3894 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3895 a union of `tdep_info', `tdesc_data' and `id'.
3896 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3897 rather than `info.tdep_info'.
3898 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3899 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3900 * i386-tdep.c (i386_gdbarch_init): Likewise.
3901 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3902 * mips-tdep.c (mips_gdbarch_init): Likewise.
3903 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3904 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3905 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3906 `info.tdep_info'.
3907 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3908 `info.tdep_info'.
3909 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3910 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3911 `info.tdep_info'.
3912 * spu-tdep.c (spu_gdbarch_init): Likewise.
3913 * gdbarch.h: Regenerate.
3914
16eb6b2d
LS
39152017-08-07 Leszek Swirski <leszeks@google.com>
3916
7b005726 3917 PR symtab/20899
16eb6b2d
LS
3918 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3919
74cbb09e
SM
39202017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3921
3922 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3923 (gdbsim_open): Rename gdb_argv args object to argv.
3924
ee0c3293
TT
39252017-08-05 Tom Tromey <tom@tromey.com>
3926
3927 * compile/compile-object-load.c (compile_object_load): Use
3928 gdb::unique_xmalloc_ptr.
3929 * cli/cli-dump.c (scan_filename): Rename from
3930 scan_filename_with_cleanup. Change return type.
3931 (scan_expression): Rename from scan_expression_with_cleanup.
3932 Change return type.
3933 (dump_memory_to_file, dump_value_to_file, restore_command):
3934 Use gdb::unique_xmalloc_ptr. Update.
3935 * cli/cli-cmds.c (find_and_open_script): Use
3936 gdb::unique_xmalloc_ptr.
3937 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3938 * symmisc.c (maintenance_print_symbols)
3939 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3940 * symfile.c (symfile_bfd_open, generic_load)
3941 (add_symbol_file_command, remove_symbol_file_command): Use
3942 gdb::unique_xmalloc_ptr.
3943 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3944 * psymtab.c (maintenance_print_psymbols): Use
3945 gdb::unique_xmalloc_ptr.
3946 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3947 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3948 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3949 (reload_shared_libraries_1): Likewise.
3950
3232fabd
TT
39512017-08-05 Tom Tromey <tom@tromey.com>
3952
3953 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3954 (rust_op_vector, rust_set_vector): New typedefs.
3955 (current_parser): New global.
3956 (work_obstack): Change to pointer type. Update all users.
3957 (rust_ast, pstate): Remove globals.
3958 (struct rust_parser): New.
3959 (%union) <params, field_inits>: Change type.
3960 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3961 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3962 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3963 (convert_params_to_types, convert_params_to_expression): Change
3964 type of "params".
3965 (ast_string): Change type of "fields".
3966 (rust_parse): Make a rust_parser. Remove cleanups.
3967 (rust_lex_tests): Make and install an auto_obstack.
3968
f02fd774
YQ
39692017-08-04 Yao Qi <yao.qi@linaro.org>
3970
3971 * configure.srv (ipa_x32_linux_regobj): New.
3972 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3973 instead of X86_TDESC_AVX512.
3974 (initialize_low_tracepoint): Call
3975 init_registers_x32_avx_avx512_linux.
3976
91975afd
YQ
39772017-08-04 Yao Qi <yao.qi@linaro.org>
3978
3979 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3980
2331fa3a
RK
39812017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3982
3983 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3984
744e4fe1
TT
39852017-08-03 Tom Tromey <tom@tromey.com>
3986
3987 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3988 Remove.
3989 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3990
1c034b67
TT
39912017-08-03 Tom Tromey <tom@tromey.com>
3992
3993 * python/py-param.c (compute_enum_values): Use gdb_argv.
3994
773a1edc
TT
39952017-08-03 Tom Tromey <tom@tromey.com>
3996
3997 * utils.h (struct gdb_argv_deleter): New.
3998 (gdb_argv): New class.
3999 * utils.c (gdb_argv::reset): New method.
4000 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4001 * tracefile.c (tsave_command): Use gdb_argv.
4002 * top.c (new_ui_command): Use gdb_argv.
4003 * symmisc.c (maintenance_print_symbols)
4004 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4005 * symfile.c (symbol_file_command, generic_load)
4006 (remove_symbol_file_command): Use gdb_argv.
4007 * stack.c (backtrace_command): Use gdb_argv.
4008 * source.c (add_path, show_substitute_path_command)
4009 (unset_substitute_path_command, set_substitute_path_command):
4010 Use gdb_argv.
4011 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
4012 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4013 * remote.c (extended_remote_run, remote_put_command)
4014 (remote_get_command, remote_delete_command): Use gdb_argv.
4015 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4016 (gdbsim_open): Use gdb_argv.
4017 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4018 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4019 * procfs.c (procfs_info_proc): Use gdb_argv.
4020 * interps.c (interpreter_exec_cmd): Use gdb_argv.
4021 * infrun.c (handle_command): Use gdb_argv.
4022 * inferior.c (add_inferior_command, clone_inferior_command):
4023 Use gdb_argv.
4024 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4025 * exec.c (exec_file_command): Use gdb_argv.
4026 * cli/cli-cmds.c (alias_command): Use gdb_argv.
4027 * compile/compile.c (build_argc_argv): Use gdb_argv.
4028
0d50bde3
TT
40292017-08-03 Tom Tromey <tom@tromey.com>
4030
4031 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4032
7f968c89
TT
40332017-08-03 Tom Tromey <tom@tromey.com>
4034
4035 * python/python.c (compute_python_string): Return std::string.
4036 (gdbpy_eval_from_control_command): Update.
4037 (do_start_initialization): Use std::string.
4038 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4039 xstrprintf.
4040 * python/py-breakpoint.c (local_setattro): Use string_printf, not
4041 xstrprintf.
4042
3c9ebddd
TT
40432017-08-03 Tom Tromey <tom@tromey.com>
4044
4045 * top.h (do_restore_instream_cleanup): Remove.
4046 * top.c (do_restore_instream_cleanup): Remove.
4047 (read_command_file): Use scoped_restore.
4048 * cli/cli-script.c (execute_user_command): Use scoped_restore.
4049
b51b225e
TT
40502017-08-03 Tom Tromey <tom@tromey.com>
4051
4052 * cli/cli-script.c (execute_user_command)
4053 (execute_control_command): Use scoped_restore.
4054
ac991630
TT
40552017-08-03 Tom Tromey <tom@tromey.com>
4056
4057 * cli/cli-script.c (do_restore_user_call_depth): Remove.
4058 (execute_user_command): Remove user_call_depth; use
4059 user_args_stack's size instead.
4060
898e0c8e
TT
40612017-08-03 Tom Tromey <tom@tromey.com>
4062
4063 * top.h (in_user_command): Remove.
4064 * top.c (in_user_command): Remove.
4065 * cli/cli-script.c (do_restore_user_call_depth)
4066 (execute_user_command): Update.
4067
26fcd5d7
TT
40682017-08-03 Tom Tromey <tom@tromey.com>
4069
4070 * valops.c (search_struct_method): Use gdb::byte_vector.
4071 * valarith.c (value_concat): Use std::vector.
4072 * target.c (memory_xfer_partial): Use gdb::byte_vector.
4073 (simple_search_memory): Likewise.
4074 * printcmd.c (find_string_backward): Use gdb::byte_vector.
4075 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4076 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4077 * elfread.c (elf_rel_plt_read): Use std::string.
4078 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4079 * cli/cli-dump.c (restore_section_callback): Use
4080 gdb::byte_vector.
4081
7c218e6c
TT
40822017-08-03 Tom Tromey <tom@tromey.com>
4083
4084 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4085
31b68d4a
TT
40862017-08-03 Tom Tromey <tom@tromey.com>
4087
4088 * tui/tui-regs.c (tui_restore_gdbout): Remove.
4089 (tui_register_format): Use scoped_restore.
4090
2ec845e7
TT
40912017-08-03 Tom Tromey <tom@tromey.com>
4092
4093 * reverse.c (exec_direction_default): Remove.
4094 (exec_reverse_once): Use scoped_restore.
4095 * remote.c (restore_remote_timeout): Remove.
4096 (remote_flash_erase, remote_flash_write, remote_flash_done)
4097 (readchar, remote_serial_write): Use scoped_restore.
4098 * cli/cli-script.c (struct source_cleanup_lines_args)
4099 (source_cleanup_lines): Remove.
4100 (script_from_file): Use scoped_restore.
4101 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4102 (source_command): Use scoped_restore.
4103
b3bc8453
TT
41042017-08-03 Tom Tromey <tom@tromey.com>
4105
4106 * utils.h (make_cleanup_free_so): Remove.
4107 * utils.c (do_free_so, make_cleanup_free_so): Remove.
4108 * solist.h (struct so_deleter): New.
4109 (so_list_up): New typedef.
4110 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4111
e3ad2841
TT
41122017-08-03 Tom Tromey <tom@tromey.com>
4113
4114 * utils.h (make_cleanup_restore_current_language): Remove.
4115 * utils.c (do_restore_current_language)
4116 (make_cleanup_restore_current_language): Remove.
4117 * parse.c (parse_exp_in_context_1)
4118 (parse_expression_with_language): Use
4119 scoped_restore_current_language.
4120 * mi/mi-main.c (mi_cmd_execute): Use
4121 scoped_restore_current_language.
4122 * language.h (scoped_restore_current_language): New class.
4123
b80cf838
TT
41242017-08-03 Tom Tromey <tom@tromey.com>
4125
4126 * compile/compile.c (cleanup_unlink_file): Remove.
4127 (compile_to_object): Use gdb::unlinker.
4128 (eval_compile_command): Likewise.
4129
fad0444a
TT
41302017-08-03 Tom Tromey <tom@tromey.com>
4131
4132 * utils.h (make_cleanup_fclose): Remove.
4133 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4134
6e7bc05c
TT
41352017-08-03 Tom Tromey <tom@tromey.com>
4136
4137 * top.c (open_terminal_stream): Return gdb_file_up.
4138 (new_ui_command): Update.
4139
4a45905b
TT
41402017-08-03 Tom Tromey <tom@tromey.com>
4141
4142 * source.c (print_source_lines_base, forward_search_command)
4143 (reverse_search_command): Use gdb_file_up.
4144
7cd06d6e
TT
41452017-08-03 Tom Tromey <tom@tromey.com>
4146
4147 * fbsd-nat.c (fbsd_find_memory_regions): Update.
4148
ed166945
TT
41492017-08-03 Tom Tromey <tom@tromey.com>
4150
4151 * cli/cli-cmds.c (find_and_open_script): Change return type.
4152 Remove "streamp" and "full_path" parameters.
4153 (source_script_with_search): Update.
4154 * auto-load.c (source_script_file): Update.
4155 * cli/cli-cmds.h (find_and_open_script): Change type.
4156 (open_script): New struct.
4157
d419f42d
TT
41582017-08-03 Tom Tromey <tom@tromey.com>
4159
4160 * xml-support.c (xml_fetch_content_from_file): Update.
4161 * ui-file.c (stdio_file::open): Update.
4162 * tracefile-tfile.c (tfile_start): Update.
4163 * remote.c (remote_file_put, remote_file_get): Update.
4164 * nat/linux-procfs.c (linux_proc_get_int)
4165 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4166 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4167 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4168 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4169 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4170 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4171 * linux-nat.c (linux_proc_pending_signals): Update.
4172 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4173 (file_closer): Remove.
4174 * compile/compile.c (compile_to_object): Update.
4175 * common/filestuff.h (struct gdb_file_deleter): New.
4176 (gdb_file_up): New typedef.
4177 (gdb_fopen_cloexec): Change return type.
4178 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4179 * cli/cli-dump.c (fopen_with_cleanup): Remove.
4180 (dump_binary_file, restore_binary_file): Update.
4181 * auto-load.c (auto_load_objfile_script_1): Update.
4182
4a2b031d
TT
41832017-08-03 Tom Tromey <tom@tromey.com>
4184
4185 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4186 (info_static_tracepoint_markers_command): Likewise.
4187 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4188 * skip.c (skip_info): Use ui_out_emit_table.
4189 * progspace.c (print_program_space): Use ui_out_emit_table.
4190 * osdata.c (info_osdata): Use ui_out_emit_table.
4191 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4192 ui_out_emit_table.
4193 * linux-thread-db.c (info_auto_load_libthread_db): Use
4194 ui_out_emit_table.
4195 * inferior.c (print_inferior): Use ui_out_emit_table.
4196 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4197 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4198 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4199 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4200 * ui-out.h (class ui_out_emit_table): New.
4201
a4f320fd
MR
42022017-08-02 Maciej W. Rozycki <macro@imgtec.com>
4203
4204 * mips-tdep.c (mips_fpu_type_str): New function.
4205 (mips_dump_tdep): Call it.
4206
a2f1f308
MR
42072017-08-01 Maciej W. Rozycki <macro@imgtec.com>
4208
4209 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4210 `->mips_fpu_type'.
4211
7e5ed83b
XR
42122017-07-31 Xavier Roirand <roirand@adacore.com>
4213
4214 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4215
4c9dc811
XR
42162017-07-27 Xavier Roirand <roirand@adacore.com>
4217
4218 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4219
27d41eac
YQ
42202017-07-26 Yao Qi <yao.qi@linaro.org>
4221
4222 * cli/cli-cmds.c (maintenancechecklist): New variable.
4223 * gdbcmd.h (maintenancechecklist): Declare it.
4224 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4225 Call i386_linux_read_description with different masks.
4226 * maint.c (maintenance_check_command): New function.
4227 (_initialize_maint_cmds): Call add_prefix_cmd.
4228 * target-descriptions.c (tdesc_reg): override operator != and ==.
4229 (tdesc_type): Likewise.
4230 (tdesc_feature): Likewise.
4231 (target_desc): Likewise.
4232 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4233 (maintenance_check_xml_descriptions): New function.
4234 (_initialize_target_descriptions) Add command "xml-descriptions".
4235 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4236
ea03d0d3
YQ
42372017-07-26 Yao Qi <yao.qi@linaro.org>
4238
4239 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4240 Include features/i386/32bit-*.c.
4241 (i386_linux_read_description): Generate target description if it
4242 doesn't exist.
4243 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4244 functions.
4245 * features/i386/32bit-linux.c: Re-generated.
4246 * features/i386/32bit-sse.c: Likewise.
4247 * target-descriptions.c (print_c_feature::visit): Print code to
4248 set register number if needed.
4249 (print_c_feature) <m_next_regnum>: New field.
4250
25aa13e5
YQ
42512017-07-26 Yao Qi <yao.qi@linaro.org>
4252
4253 * features/Makefile (CFILES): Rename with TDESC_CFILES.
4254 (FEATURE_XMLFILES): New.
4255 (FEATURE_CFILES): New.
4256 New rules.
4257 (clean-cfiles): Remove generated c files.
4258 * features/i386/32bit-avx.c: Generated.
4259 * features/i386/32bit-avx512.c: Generated.
4260 * features/i386/32bit-core.c: Generated.
4261 * features/i386/32bit-linux.c: Generated.
4262 * features/i386/32bit-mpx.c: Generated.
4263 * features/i386/32bit-pkeys.c: Generated.
4264 * features/i386/32bit-sse.c: Generated.
4265 * target-descriptions.c: Include algorithm.
4266 (tdesc_element_visitor): Add method visit_end.
4267 (print_c_tdesc): Implement visit_end.
4268 (print_c_tdesc:: m_filename_after_features): Move it to
4269 protected.
4270 (print_c_feature): New class.
4271 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4272 name starts with "i386/32bit-".
4273
6eb1e6a8
YQ
42742017-07-26 Yao Qi <yao.qi@linaro.org>
4275
4276 * target-descriptions.c (tdesc_element_visitor): New class.
4277 (tdesc_element): New class.
4278 (tdesc_reg): Inherit from tdesc_element.
4279 (tdesc_reg::accept): New function.
4280 (tdesc_type): Inherit from tdesc_element.
4281 (tdesc_type::accept): New function.
4282 (tdesc_feature): Inherit from tdesc_element.
4283 (tdesc_feature::accept): New function.
4284 (target_desc): Inherit from tdesc_element.
4285 (target_desc::target_desc): New.
4286 (target_desc::~target_desc): New.
4287 (target_desc::accept): New.
4288 (allocate_target_description): Use new.
4289 (free_target_description): Use delete.
4290 (print_c_tdesc): New class.
4291 (maint_print_c_tdesc_cmd): Adjust.
4292
4293 * features/aarch64.c: Re-generated.
4294 * features/arc-arcompact.c: Re-generated.
4295 * features/arc-v2.c: Re-generated.
4296 * features/arm/arm-with-iwmmxt.c: Re-generated.
4297 * features/arm/arm-with-m.c: Re-generated.
4298 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4299 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4300 * features/arm/arm-with-neon.c: Re-generated.
4301 * features/arm/arm-with-vfpv2.c: Re-generated.
4302 * features/arm/arm-with-vfpv3.c: Re-generated.
4303 * features/i386/amd64-avx-avx512.c: Re-generated.
4304 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4305 * features/i386/amd64-avx.c: Re-generated.
4306 * features/i386/amd64-avx-linux.c: Re-generated.
4307 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4308 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4309 * features/i386/amd64-avx-mpx.c: Re-generated.
4310 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4311 * features/i386/amd64.c: Re-generated.
4312 * features/i386/amd64-linux.c: Re-generated.
4313 * features/i386/amd64-mpx.c: Re-generated.
4314 * features/i386/amd64-mpx-linux.c: Re-generated.
4315 * features/i386/i386-avx-avx512.c: Re-generated.
4316 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4317 * features/i386/i386-avx.c: Re-generated.
4318 * features/i386/i386-avx-linux.c: Re-generated.
4319 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4320 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4321 * features/i386/i386-avx-mpx.c: Re-generated.
4322 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4323 * features/i386/i386.c: Re-generated.
4324 * features/i386/i386-linux.c: Re-generated.
4325 * features/i386/i386-mmx.c: Re-generated.
4326 * features/i386/i386-mmx-linux.c: Re-generated.
4327 * features/i386/i386-mpx.c: Re-generated.
4328 * features/i386/i386-mpx-linux.c: Re-generated.
4329 * features/i386/x32-avx-avx512.c: Re-generated.
4330 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4331 * features/i386/x32-avx.c: Re-generated.
4332 * features/i386/x32-avx-linux.c: Re-generated.
4333 * features/i386/x32.c: Re-generated.
4334 * features/i386/x32-linux.c: Re-generated.
4335 * features/microblaze.c: Re-generated.
4336 * features/microblaze-with-stack-protect.c: Re-generated.
4337 * features/mips64-dsp-linux.c: Re-generated.
4338 * features/mips64-linux.c: Re-generated.
4339 * features/mips-dsp-linux.c: Re-generated.
4340 * features/mips-linux.c: Re-generated.
4341 * features/nds32.c: Re-generated.
4342 * features/nios2.c: Re-generated.
4343 * features/nios2-linux.c: Re-generated.
4344 * features/rs6000/powerpc-32.c: Re-generated.
4345 * features/rs6000/powerpc-32l.c: Re-generated.
4346 * features/rs6000/powerpc-403.c: Re-generated.
4347 * features/rs6000/powerpc-403gc.c : Re-generated.
4348 * features/rs6000/powerpc-405.c: Re-generated.
4349 * features/rs6000/powerpc-505.c: Re-generated.
4350 * features/rs6000/powerpc-601.c: Re-generated.
4351 * features/rs6000/powerpc-602.c: Re-generated.
4352 * features/rs6000/powerpc-603.c: Re-generated.
4353 * features/rs6000/powerpc-604.c: Re-generated.
4354 * features/rs6000/powerpc-64.c: Re-generated.
4355 * features/rs6000/powerpc-64l.c: Re-generated.
4356 * features/rs6000/powerpc-7400.c: Re-generated.
4357 * features/rs6000/powerpc-750.c: Re-generated.
4358 * features/rs6000/powerpc-860.c: Re-generated.
4359 * features/rs6000/powerpc-altivec32.c: Re-generated.
4360 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4361 * features/rs6000/powerpc-altivec64.c: Re-generated.
4362 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4363 * features/rs6000/powerpc-cell32l.c: Re-generated.
4364 * features/rs6000/powerpc-cell64l.c: Re-generated.
4365 * features/rs6000/powerpc-e500.c: Re-generated.
4366 * features/rs6000/powerpc-e500l.c: Re-generated.
4367 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4368 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4369 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4370 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4371 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4372 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4373 * features/rs6000/powerpc-vsx32.c: Re-generated.
4374 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4375 * features/rs6000/powerpc-vsx64.c: Re-generated.
4376 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4377 * features/rs6000/rs6000.c: Re-generated.
4378 * features/s390-linux32.c: Re-generated.
4379 * features/s390-linux32v1.c: Re-generated.
4380 * features/s390-linux32v2.c: Re-generated.
4381 * features/s390-linux64.c: Re-generated.
4382 * features/s390-linux64v1.c: Re-generated.
4383 * features/s390-linux64v2.c: Re-generated.
4384 * features/s390-te-linux64.c: Re-generated.
4385 * features/s390-tevx-linux64.c: Re-generated.
4386 * features/s390-vx-linux64.c: Re-generated.
4387 * features/s390x-linux64.c: Re-generated.
4388 * features/s390x-linux64v1.c: Re-generated.
4389 * features/s390x-linux64v2.c: Re-generated.
4390 * features/s390x-te-linux64.c: Re-generated.
4391 * features/s390x-tevx-linux64.c: Re-generated.
4392 * features/s390x-vx-linux64.c: Re-generated.
4393 * features/sparc/sparc32-solaris.c: Re-generated.
4394 * features/sparc/sparc64-solaris.c: Re-generated.
4395 * features/tic6x-c62x.c: Re-generated.
4396 * features/tic6x-c62x-linux.c: Re-generated.
4397 * features/tic6x-c64x.c: Re-generated.
4398 * features/tic6x-c64x-linux.c: Re-generated.
4399 * features/tic6x-c64xp.c: Re-generated.
4400 * features/tic6x-c64xp-linux.c: Re-generated.
4401
35b4818d
YQ
44022017-07-26 Yao Qi <yao.qi@linaro.org>
4403
4404 * i386-linux-tdep.c (i386_linux_read_description): New function.
4405 (i386_linux_core_read_description): Call
4406 i386_linux_read_description.
4407 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4408 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4409 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4410 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4411 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4412 * x86-linux-nat.c (x86_linux_read_description): Call
4413 i386_linux_read_description.
4414
8e2141c6
YQ
44152017-07-26 Yao Qi <yao.qi@linaro.org>
4416
4417 * NEWS: Mention it.
4418 * features/Makefile (%.c: %.xml): Pass the xml file name to
4419 command "maint print c-tdesc".
4420 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4421 name from 'arg'.
4422
b468ff4c
YQ
44232017-07-26 Yao Qi <yao.qi@linaro.org>
4424
4425 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4426 in-class initialization.
4427 (tdesc_create_feature): Call new instead of XCNEW.
4428 (free_target_description): Ue delete.
4429
b9c0e1b4
JB
44302017-07-25 John Baldwin <jhb@FreeBSD.org>
4431
4432 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4433
a04b5337
YQ
44342017-07-25 Yao Qi <yao.qi@linaro.org>
4435
4436 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4437 constant.
4438 (amd64_x32_init_abi): Likewise.
4439 * amd64-tdep.h (amd64_init_abi): Update declaration.
4440 (amd64_x32_init_abi): Likewise.
4441
02ad7fc2
YQ
44422017-07-25 Yao Qi <yao.qi@linaro.org>
4443
4444 PR tdep/21717
4445 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4446 condition for FPSCR.
4447 (arm_linux_store_inferior_registers): Likewise.
4448
b6f48cb0
TT
44492017-07-22 Tom Tromey <tom@tromey.com>
4450
4451 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4452 <syscalls_counts>: Now a std::vector.
4453 (get_catch_syscall_inferior_data): Use "new".
4454 (catch_syscall_inferior_data_cleanup): Use "delete".
4455 (insert_catch_syscall, remove_catch_syscall)
4456 (clear_syscall_counts): Update.
4457
e12c9b7a
TT
44582017-07-22 Tom Tromey <tom@tromey.com>
4459
4460 * break-catch-syscall.c (syscall_catchpoint)
4461 <syscalls_to_be_caught>: Now a std::vector<int>
4462 (~syscall_catchpoint): Remove.
4463 (insert_catch_syscall, remove_catch_syscall)
4464 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4465 (print_mention_catch_syscall, print_recreate_catch_syscall):
4466 Update.
4467 (create_syscall_event_catchpoint): Change type of "filter"
4468 parameter.
4469 (catch_syscall_split_args): Return a std::vector.
4470 (catch_syscall_command_1, catching_syscall_number_1): Update.
4471
4fa8aeac
TT
44722017-07-22 Tom Tromey <tom@tromey.com>
4473
4474 * break-catch-throw.c (struct exception_catchpoint)
4475 <exception_rx>: Now a std::string.
4476 (~exception_catchpoint): Remove.
4477 (print_one_detail_exception_catchpoint): Update.
4478 (handle_gnu_v3_exceptions): Change type of except_rx.
4479 (extract_exception_regexp): Return a std::string.
4480 (catch_exception_command_1): Update.
4481
f746a154
TT
44822017-07-22 Tom Tromey <tom@tromey.com>
4483
4484 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4485 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4486 std::vector.
4487 <catch_all>: Now a bool.
4488 (~signal_catchpoint): Remove.
4489 (signal_catchpoint_insert_location)
4490 (signal_catchpoint_remove_location)
4491 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4492 (signal_catchpoint_print_mention)
4493 (signal_catchpoint_print_recreate)
4494 (signal_catchpoint_explains_signal): Update.
4495 (create_signal_catchpoint): Change type of "filter" and
4496 "catch_all".
4497 (catch_signal_split_args): Return a std::vector. Change type of
4498 "catch_all".
4499 (catch_signal_command): Update.
4500
47e77640
PA
45012017-07-20 Pedro Alves <palves@redhat.com>
4502
4503 * ada-lang.c (ada_language_defn): Make extern.
4504 (_initialize_ada_language): Remove add_language call.
4505 * c-lang.c (c_language_defn, cplus_language_defn)
4506 (asm_language_defn, minimal_language_defn): Make extern.
4507 (_initialize_c_language): Delete.
4508 * completer.c (compare_cstrings): Delete, moved to utils.h.
4509 * d-lang.c (d_language_defn): Make extern.
4510 (_initialize_d_language): Remove add_language calls.
4511 * defs.h (enum language): Add comment.
4512 * f-lang.c (f_language_defn): Make extern.
4513 (_initialize_f_language): Remove add_language call.
4514 * go-lang.c (go_language_defn): Make extern.
4515 (_initialize_go_language): Remove add_language call.
4516 * language.c: Include <algorithm>.
4517 (languages): Redefine as const array.
4518 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4519 (set_language_command): Handle "local". Use for-range loop.
4520 (set_language): Remove loop.
4521 (language_enum): Rewrite.
4522 (language_def, language_str): Remove loops.
4523 (add_language): Delete.
4524 (add_set_language_command): New, based on add_languages.
4525 (skip_language_trampoline): Adjust.
4526 (local_language_defn): Delete.
4527 (language_gdbarch_post_init): Adjust.
4528 (_initialize_language): Remove add_language calls. Call
4529 add_set_language_command.
4530 * language.h (add_language): Delete.
4531 (auto_language_defn)
4532 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4533 (asm_language_defn, c_language_defn, cplus_language_defn)
4534 (d_language_defn, f_language_defn, go_language_defn)
4535 (m2_language_defn, objc_language_defn, opencl_language_defn)
4536 (pascal_language_defn, rust_language_defn): Declare.
4537 * m2-lang.c (m2_language_defn): Make extern.
4538 (_initialize_m2_language): Remove add_language call.
4539 * objc-lang.c (objc_language_defn): Make extern.
4540 (_initialize_objc_language): Remove add_language call.
4541 * opencl-lang.c (opencl_language_defn): Make extern.
4542 (_initialize_opencl_language): Remove add_language call.
4543 * p-lang.c (pascal_language_defn): Make extern.
4544 (_initialize_pascal_language): Delete.
4545 * rust-lang.c (rust_language_defn): Make extern.
4546 (_initialize_rust_language): Delete.
4547 * utils.h (compare_cstrings): New static inline function.
4548
edb0c9cb
PA
45492017-07-20 Pedro Alves <palves@redhat.com>
4550
4551 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4552 (get_var_value): Constify parameters.
4553 (get_int_var_value): Change prototype.
4554 (to_fixed_range_type): Adjust.
4555 * ada-lang.h (get_int_var_value): Change prototype.
4556
a778f165
PA
45572017-07-20 Pedro Alves <palves@redhat.com>
4558
4559 * dwarf2read.c (dw2_lookup_symbol): Use
4560 SYMBOL_MATCHES_SEARCH_NAME.
4561 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4562
42edd901
PA
45632017-07-20 Pedro Alves <palves@redhat.com>
4564
4565 * block.c (block_iter_name_step, block_iter_name_first)
4566 (block_iter_name_next): Delete.
4567 (block_lookup_symbol_primary): Adjust to use
4568 dict_iter_match_first/dict_iter_match_next.
4569 * block.h (block_iter_name_first, block_iter_name_next): Delete
4570 declarations.
4571 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4572 dict_iter_match_first/dict_iter_match_next.
4573
cf325299
PA
45742017-07-20 Pedro Alves <palves@redhat.com>
4575
4576 * cp-support.c (cp_find_first_component_aux): Add missing case for
4577 end of string.
4578
c5ed0576
DB
45792017-07-18 David Blaikie <dblaikie@gmail.com>
4580
4581 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4582 of dwo_cu's dwo_file.
4583
27841e76
YQ
45842017-07-18 Yao Qi <yao.qi@linaro.org>
4585
4586 * remote.c (store_registers_using_G): Remove one line comment.
4587
cfb7e58b
YQ
45882017-07-18 Yao Qi <yao.qi@linaro.org>
4589
4590 * regcache.c (regcache_cpy): Simplify it.
4591 (regcache::cpy_no_passthrough): Remove it.
4592 * regcache.h (cpy_no_passthrough): Remove it.
4593 (regcache_dup, regcache_cpy): Update comments.
4594
386535dd
PA
45952017-07-18 Pedro Alves <palves@redhat.com>
4596
4597 * remote-sim.c (sim_command_completer): Adjust to work with a
4598 completion_tracker instead of a VEC.
4599
c45ec17c
PA
46002017-07-17 Pedro Alves <palves@redhat.com>
4601
4602 * completer.c (complete_source_filenames): New function.
4603 (complete_address_and_linespec_locations): New function.
4604 (location_completer): Use complete_address_and_linespec_locations.
4605 (completion_tracker::build_completion_result): Honor the tracker's
4606 request to suppress append.
4607 * completer.h (completion_tracker::suppress_append_ws)
4608 (completion_tracker::set_suppress_append_ws): New methods.
4609 (completion_tracker::m_suppress_append_ws): New field.
4610 (complete_source_filenames): New declaration.
4611 * linespec.c (linespec_complete_what): New.
4612 (struct ls_parser) <complete_what, completion_word,
4613 completion_quote_char, completion_quote_end, completion_tracker>:
4614 New fields.
4615 (string_find_incomplete_keyword_at_end): New.
4616 (linespec_lexer_lex_string): Record quote char. If in completion
4617 mode, don't throw.
4618 (linespec_lexer_consume_token): Advance the completion word point.
4619 (linespec_lexer_peek_token): Save/restore completion info.
4620 (save_stream_and_consume_token): New.
4621 (set_completion_after_number): New.
4622 (linespec_parse_basic): Set what to complete next depending on
4623 token. Handle function and label completions specially.
4624 (parse_linespec): Disable objc shortcut in completion mode. Set
4625 what to complete next depending on token type. Skip keyword if in
4626 completion mode.
4627 (complete_linespec_component, linespec_complete): New.
4628 * linespec.h (linespec_complete): Declare.
4629
be966d42
PA
46302017-07-17 Pedro Alves <palves@redhat.com>
4631
4632 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4633 Handle 'operator<' / 'operator<<'.
4634
a2459270
PA
46352017-07-17 Pedro Alves <palves@redhat.com>
4636
4637 * completer.c (collect_explicit_location_matches): Handle
4638 MATCH_LABEL.
4639 (convert_explicit_location_to_linespec): New, factored out from
4640 ...
4641 (convert_explicit_location_to_sals): ... this.
4642 (complete_label): New.
4643 (linespec_complete_label, find_label_symbols_in_block): New.
4644 (find_label_symbols): Add completion_mode parameter and adjust to
4645 call find_label_symbols_in_block.
4646 * linespec.h (linespec_complete_label): Declare.
4647
c6756f62
PA
46482017-07-17 Pedro Alves <palves@redhat.com>
4649
4650 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4651 complete_symbol_mode parameter.
4652 * cli/cli-cmds.c (complete_command): Get the completion result out
4653 of the handle_brkchars tracker if used a custom word point.
4654 * completer.c: Include "linespec.h".
4655 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4656 (advance_to_expression_complete_word_point): New.
4657 (completion_tracker::completes_to_completion_word): New.
4658 (complete_files_symbols): Pass down
4659 complete_symbol_mode::EXPRESSION.
4660 (explicit_options, probe_options): New.
4661 (collect_explicit_location_matches): Complete on the
4662 explictit_loc->foo instead of word. Use
4663 linespec_complete_function. Handle MATCH_LINE. Handle offering
4664 keyword and options completions.
4665 (backup_text_ptr): Delete.
4666 (skip_keyword): New.
4667 (complete_explicit_location): Remove 'word' parameter. Add
4668 language, quoted_arg_start and quoted_arg_end parameters.
4669 Rewrite, parsing left to right.
4670 (location_completer): Rewrite.
4671 (location_completer_handle_brkchars): New function.
4672 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4673 (enum complete_line_internal_reason): Adjust comments.
4674 (completion_tracker::discard_completions): New.
4675 (completer_handle_brkchars_func_for_completer): Handle
4676 location_completer.
4677 (gdb_custom_word_point_brkchars)
4678 (gdb_org_rl_basic_quote_characters): New.
4679 (gdb_completion_word_break_characters_throw)
4680 (completion_find_completion_word): Handle trackers that use a
4681 custom word point.
4682 (completion_tracker::advance_custom_word_point_by): New.
4683 (completion_tracker::build_completion_result): Don't rely on
4684 readline appending the quote char.
4685 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4686 use a custom word point.
4687 (gdb_rl_attempted_completion_function): Restore
4688 rl_basic_quote_characters.
4689 * completer.h (class completion_tracker): Extend intro comment.
4690 (completion_tracker::set_quote_char)
4691 (completion_tracker::quote_char)
4692 (completion_tracker::set_use_custom_word_point)
4693 (completion_tracker::use_custom_word_point)
4694 (completion_tracker::custom_word_point)
4695 (completion_tracker::set_custom_word_point)
4696 (completion_tracker::advance_custom_word_point_by)
4697 (completion_tracker::completes_to_completion_word)
4698 (completion_tracker::discard_completions): New methods.
4699 (completion_tracker::m_quote_char)
4700 (completion_tracker::m_use_custom_word_point)
4701 (completion_tracker::m_custom_word_point): New fields.
4702 (advance_to_expression_complete_word_point): Declare.
4703 * f-lang.c (f_collect_symbol_completion_matches): Add
4704 complete_symbol_mode parameter.
4705 * language.h (struct language_defn)
4706 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4707 parameter.
4708 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4709 (linespec_complete_function): New function.
4710 (linespec_lexer_lex_keyword): Adjust.
4711 * linespec.h (linespec_keywords, linespec_complete_function): New
4712 declarations.
4713 * location.c (find_end_quote): New function.
4714 (explicit_location_lex_one): Add explicit_completion_info
4715 parameter. Save quoting info. Don't throw if being called for
4716 completion. Don't handle Ada operators here.
4717 (is_cp_operator, skip_op_false_positives, first_of)
4718 (explicit_location_lex_one_function): New function.
4719 (string_to_explicit_location): Replace 'dont_throw' parameter with
4720 an explicit_completion_info pointer parameter. Handle it. Don't
4721 use explicit_location_lex_one to lex function names. Use
4722 explicit_location_lex_one_function instead.
4723 * location.h (struct explicit_completion_info): New.
4724 (string_to_explicit_location): Replace 'dont_throw' parameter with
4725 an explicit_completion_info pointer parameter.
4726 * symtab.c (default_collect_symbol_completion_matches_break_on):
4727 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4728 (default_collect_symbol_completion_matches)
4729 (collect_symbol_completion_matches): Add complete_symbol_mode
4730 parameter.
4731 (collect_symbol_completion_matches_type): Pass down
4732 complete_symbol_mode::EXPRESSION.
4733 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4734 parameter. Handle LINESPEC mode.
4735 * symtab.h (complete_symbol_mode): New.
4736 (default_collect_symbol_completion_matches_break_on)
4737 (default_collect_symbol_completion_matches)
4738 (collect_symbol_completion_matches)
4739 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4740 parameter.
4741
1d550c82
PA
47422017-07-17 Pedro Alves <palves@redhat.com>
4743
4744 * utils.c (enum class strncmp_iw_mode): New.
4745 (strcmp_iw): Rename to ...
4746 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4747 parameters. Handle them.
4748 (strncmp_iw): New.
4749 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4750 * utils.h (strncmp_iw): Declare.
4751 (strcmp_iw): Move describing comments here.
4752
8090b426
PA
47532017-07-17 Pedro Alves <palves@redhat.com>
4754
4755 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4756 CP_OPERATOR_STR.
4757 * c-typeprint.c (is_type_conversion_operator): Use
4758 CP_OPERATOR_STR.
4759 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4760 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4761 CP_OPERATOR_LEN.
4762 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4763 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4764 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4765 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4766 CP_OPERATOR_STR.
4767 * location.c: Include "cp-support.h".
4768 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4769 CP_OPERATOR_STR.
4770 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4771 CP_OPERATOR_LEN.
4772
6a2c1b87
PA
47732017-07-17 Pedro Alves <palves@redhat.com>
4774
4775 * cli/cli-cmds.c (complete_command): Use a completion tracker
4776 along with completion_find_completion_word for handle_brkchars
4777 phase.
4778 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4779 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4780 (struct gdb_rl_completion_word_info): New.
4781 (gdb_rl_find_completion_word): New.
4782 (completion_find_completion_word): New.
4783 * completer.h (completion_find_completion_word): Declare.
4784
eb3ff9a5
PA
47852017-07-17 Pedro Alves <palves@redhat.com>
4786
4787 * ada-lang.c (symbol_completion_match): Adjust comments.
4788 (symbol_completion_add): Replace vector parameter with
4789 completion_tracker parameter. Use it.
4790 (ada_make_symbol_completion_list): Rename to...
4791 (ada_collect_symbol_completion_matches): ... this. Add
4792 completion_tracker parameter and use it.
4793 (ada_language_defn): Adjust.
4794 * break-catch-syscall.c (catch_syscall_completer): Adjust
4795 prototype and work with completion_tracker instead of VEC.
4796 * breakpoint.c (condition_completer): Adjust prototype and work
4797 with completion_tracker instead of VEC.
4798 * c-lang.c (c_language_defn, cplus_language_defn)
4799 (asm_language_defn, minimal_language_defn): Adjust to renames.
4800 * cli/cli-cmds.c (complete_command): Rework using
4801 completion_tracker. Catch exceptions when completing.
4802 * cli/cli-decode.c (integer_unlimited_completer)
4803 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4804 with completion_tracker instead of VEC.
4805 * command.h (struct completion_tracker): Forward declare.
4806 (completer_ftype, completer_handle_brkchars_ftype): Change
4807 types.
4808 (complete_on_cmdlist, complete_on_enum): Adjust.
4809 * completer.c: Include <algorithm>.
4810 (struct gdb_completer_state): New.
4811 (current_completion): New global.
4812 (readline_line_completion_function): Delete.
4813 (noop_completer, filename_completer)
4814 (filename_completer_handle_brkchars, complete_files_symbols)
4815 (linespec_location_completer): Adjust to work with a
4816 completion_tracker instead of a VEC.
4817 (string_or_empty): New.
4818 (collect_explicit_location_matches): Adjust to work with a
4819 completion_tracker instead of a VEC.
4820 (explicit_location_completer): Rename to ...
4821 (complete_explicit_location): ... this and adjust to work with a
4822 completion_tracker instead of a VEC.
4823 (location_completer): Adjust to work with a completion_tracker
4824 instead of a VEC.
4825 (add_struct_fields): Adjust to work with a completion_list instead
4826 of VEC.
4827 (expression_completer): Rename to ...
4828 (complete_expression): ... this and adjust to work with a
4829 completion_tracker instead of a VEC. Use complete_files_symbols.
4830 (expression_completer): Reimplement on top of complete_expression.
4831 (symbol_completer): Adjust to work with a completion_tracker
4832 instead of a VEC.
4833 (enum complete_line_internal_reason): Add describing comments.
4834 (complete_line_internal_normal_command): Adjust to work with a
4835 completion_tracker instead of a VEC.
4836 (complete_line_internal): Rename to ...
4837 (complete_line_internal_1): ... this and adjust to work with a
4838 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4839 handle_brkchars phase.
4840 (new_completion_tracker): Delete.
4841 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4842 complete_line_internal_1.
4843 (free_completion_tracker): Delete.
4844 (INITIAL_COMPLETION_HTAB_SIZE): New.
4845 (completion_tracker::completion_tracker)
4846 (completion_tracker::~completion_tracker): New.
4847 (maybe_add_completion): Delete.
4848 (completion_tracker::maybe_add_completion)
4849 (completion_tracker::add_completion)
4850 (completion_tracker::add_completions): New.
4851 (throw_max_completions_reached_error): Delete.
4852 (complete_line): Adjust to work with a completion_tracker instead
4853 of a VEC. Don't create a completion_tracker_t or check for max
4854 completions here.
4855 (command_completer, command_completer_handle_brkchars)
4856 (signal_completer, reg_or_group_completer_1)
4857 (reg_or_group_completer, default_completer_handle_brkchars):
4858 Adjust to work with a completion_tracker.
4859 (gdb_completion_word_break_characters_throw): New.
4860 (gdb_completion_word_break_characters): Reimplement.
4861 (line_completion_function): Delete.
4862 (completion_tracker::recompute_lowest_common_denominator)
4863 (expand_preserving_ws)
4864 (completion_tracker::build_completion_result)
4865 (completion_result::completion_result)
4866 (completion_result::completion_result)
4867 (completion_result::~completion_result)
4868 (completion_result::completion_result)
4869 (completion_result::release_match_list, compare_cstrings)
4870 (completion_result::sort_match_list)
4871 (completion_result::reset_match_list)
4872 (gdb_rl_attempted_completion_function_throw)
4873 (gdb_rl_attempted_completion_function): New.
4874 * completer.h (completion_list, struct completion_result)
4875 (class completion_tracker): New.
4876 (complete_line): Add completion_tracker parameter.
4877 (readline_line_completion_function): Delete.
4878 (gdb_rl_attempted_completion_function): New.
4879 (noop_completer, filename_completer, expression_completer)
4880 (location_completer, symbol_completer, command_completer)
4881 (signal_completer, reg_or_group_completer): Update prototypes.
4882 (completion_tracker_t, new_completion_tracker)
4883 (make_cleanup_free_completion_tracker): Delete.
4884 (enum maybe_add_completion_enum): Delete.
4885 (maybe_add_completion): Delete.
4886 (throw_max_completions_reached_error): Delete.
4887 * corefile.c (complete_set_gnutarget): Adjust to work with a
4888 completion_tracker instead of a VEC.
4889 * cp-abi.c (cp_abi_completer): Adjust to work with a
4890 completion_tracker instead of a VEC.
4891 * d-lang.c (d_language_defn): Adjust.
4892 * disasm.c (disassembler_options_completer): Adjust to work with a
4893 completion_tracker instead of a VEC.
4894 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4895 (f_collect_symbol_completion_matches): ... this. Adjust to work
4896 with a completion_tracker instead of a VEC.
4897 (f_language_defn): Adjust.
4898 * go-lang.c (go_language_defn): Adjust.
4899 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4900 Adjust to work with a completion_tracker instead of a VEC.
4901 * infrun.c (handle_completer): Likewise.
4902 * interps.c (interpreter_completer): Likewise.
4903 * interps.h (interpreter_completer): Likewise.
4904 * language.c (unknown_language_defn, auto_language_defn)
4905 (local_language_defn): Adjust.
4906 * language.h (language_defn::la_make_symbol_completion_list):
4907 Rename to ...
4908 (language_defn::la_collect_symbol_completion_matches): ... this
4909 and adjust to work with a completion_tracker instead of a VEC.
4910 * m2-lang.c (m2_language_defn): Adjust.
4911 * objc-lang.c (objc_language_defn): Adjust.
4912 * opencl-lang.c (opencl_language_defn): Adjust.
4913 * p-lang.c (pascal_language_defn): Adjust.
4914 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4915 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4916 with a completion_tracker.
4917 * rust-lang.c (rust_language_defn): Adjust.
4918 * symtab.c (free_completion_list, do_free_completion_list)
4919 (return_val, completion_tracker): Delete.
4920 (completion_list_add_name, completion_list_add_symbol)
4921 (completion_list_add_msymbol, completion_list_objc_symbol)
4922 (completion_list_add_fields, add_symtab_completions): Add
4923 completion_tracker parameter and use it.
4924 (default_make_symbol_completion_list_break_on_1): Rename to...
4925 (default_collect_symbol_completion_matches_break_on): ... this.
4926 Add completion_tracker parameter and use it instead of allocating
4927 a completion tracker here.
4928 (default_make_symbol_completion_list_break_on): Delete old
4929 implementation.
4930 (default_make_symbol_completion_list): Delete.
4931 (default_collect_symbol_completion_matches): New.
4932 (make_symbol_completion_list): Delete.
4933 (collect_symbol_completion_matches): New.
4934 (make_symbol_completion_type): Rename to ...
4935 (collect_symbol_completion_matches_type): ... this. Add
4936 completion_tracker parameter and use it instead of VEC.
4937 (make_file_symbol_completion_list_1): Rename to...
4938 (collect_file_symbol_completion_matches): ... this. Add
4939 completion_tracker parameter and use it instead of VEC.
4940 (make_file_symbol_completion_list): Delete.
4941 (add_filename_to_list): Use completion_list instead of a VEC.
4942 (add_partial_filename_data::list): Now a completion_list.
4943 (make_source_files_completion_list): Work with a completion_list
4944 instead of a VEC.
4945 * symtab.h: Include "completer.h".
4946 (default_make_symbol_completion_list_break_on)
4947 (default_make_symbol_completion_list, make_symbol_completion_list)
4948 (make_symbol_completion_type, make_file_symbol_completion_list)
4949 (make_source_files_completion_list): Delete.
4950 (default_collect_symbol_completion_matches_break_on)
4951 (default_collect_symbol_completion_matches)
4952 (collect_symbol_completion_matches)
4953 (collect_symbol_completion_matches_type)
4954 (collect_file_symbol_completion_matches)
4955 (make_source_files_completion_list): New.
4956 * top.c (init_main): Don't install a rl_completion_entry_function
4957 hook. Install a rl_attempted_completion_function hook instead.
4958 * tui/tui-layout.c (layout_completer): Adjust to work with a
4959 completion_tracker.
4960 * tui/tui-regs.c (tui_reggroup_completer):
4961 * tui/tui-win.c (window_name_completer, focus_completer)
4962 (winheight_completer): Adjust to work with a completion_tracker.
4963 * value.c: Include "completer.h".
4964 (complete_internalvar): Adjust to work with a completion_tracker.
4965 * value.h (complete_internalvar): Likewise.
4966
6e1dbf8c
PA
49672017-07-17 Pedro Alves <palves@redhat.com>
4968
4969 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4970 renames.
4971 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4972 comments to completer_ftype's declaration.
4973 <completer_handle_brkchars>: Change type to
4974 completer_handle_brkchars_ftype.
4975 * command.h (completer_ftype): Add describing comment and give
4976 names to parameters.
4977 (completer_ftype_void): Rename to ...
4978 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4979 (set_cmd_completer_handle_brkchars): Adjust.
4980 * completer.c (filename_completer_handle_brkchars): New function.
4981 (complete_line_internal_normal_command): New function, factored
4982 out from ...
4983 (complete_line_internal): ... here.
4984 (command_completer_handle_brkchars)
4985 (default_completer_handle_brkchars)
4986 (completer_handle_brkchars_func_for_completer): New functions.
4987 * completer.h (set_gdb_completion_word_break_characters): Delete
4988 declaration.
4989 (completer_handle_brkchars_func_for_completer): New declaration.
4990 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4991 completer_handle_brkchars_func_for_completer.
4992
78b13106
PA
49932017-07-17 Pedro Alves <palves@redhat.com>
4994
4995 * completer.c (symbol_completer): New function, based on
4996 make_symbol_completion_list_fn.
4997 * completer.h (symbol_completer): New declaration.
4998 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4999 * python/py-cmd.c (completers): Adjust.
5000 * symtab.c (make_symbol_completion_list_fn): Delete.
5001 * symtab.h (make_symbol_completion_list_fn): Delete.
5002 * cli/cli-decode.c (add_cmd): Adjust.
5003
bbf2f4df
PA
50042017-07-17 Pedro Alves <palves@redhat.com>
5005
5006 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5007 * dwarf2read.c: Include "filename-seen-cache.h".
5008 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5009 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5010 * filename-seen-cache.c: New file.
5011 * filename-seen-cache.h: New file.
5012 * symtab.c: Include "filename-seen-cache.h".
5013 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5014 (create_filename_seen_cache, clear_filename_seen_cache)
5015 (delete_filename_seen_cache, filename_seen): Delete, parts moved
5016 to filename-seen-cache.h/filename-seen-cache.c.
5017 (output_source_filename, sources_info)
5018 (maybe_add_partial_symtab_filename)
5019 (make_source_files_completion_list): Adjust to use
5020 filename_seen_cache.
5021
330cdd98
PA
50222017-07-17 Pedro Alves <palves@redhat.com>
5023
5024 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5025 fields.
5026 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5027 dwarf2_debug_sections*)): New.
5028 (dwarf2_per_objfile::dwarf2_per_objfile(const
5029 dwarf2_per_objfile&)): Declare as deleted.
5030 (dwarf2_per_objfile::operator=): Declare as deleted.
5031 (dwarf2_per_objfile::dwarf2_per_objfile)
5032 (dwarf2_per_objfile::~dwarf2_per_objfile)
5033 (dwarf2_per_objfile::free_cached_comp_units): New.
5034 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5035 ctor. Call dwarf2_per_objfile's ctor manually.
5036 (dwarf2_locate_sections): Deleted/refactored as ...
5037 (dwarf2_per_objfile::locate_sections): ... this new method.
5038 (free_cached_comp_units): Defer to
5039 dwarf2_per_objfile::free_cached_comp_units.
5040 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5041
8880f2a9
TT
50422017-07-14 Tom Tromey <tom@tromey.com>
5043
5044 PR rust/21764:
5045 * rust-exp.y (convert_ast_to_expression): Add "want_type"
5046 parameter.
5047 <UNOP_SIZEOF>: Split into separate case.
5048 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
5049
65547233
TT
50502017-07-14 Tom Tromey <tom@tromey.com>
5051
5052 PR rust/21763:
5053 * symtab.c (symbol_matches_domain): Add language_rust to special
5054 case.
5055 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5056 treat LOC_TYPEDEF symbols as variables.
5057
8f14146e
PA
50582017-07-14 Pedro Alves <palves@redhat.com>
5059
5060 * symtab.c (make_file_symbol_completion_list_1): Iterate over
5061 symtabs matching all symtabs with SRCFILE as file name instead of
5062 only considering the first hit, with lookup_symtab.
5063
2347965c
SM
50642017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5065
5066 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5067 operator_name parameters.
5068 (gen_expr): Update function call.
5069
40f4af28
SM
50702017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5071
5072 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5073 parameter.
5074 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5075 Likewise.
5076 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5077 parameter, use agent_expr::gdbarch instead, update function
5078 calls.
5079 (locexpr_tracepoint_var_ref): Likewise.
5080 (loclist_tracepoint_var_ref): Likewise.
5081 * ax-gdb.c (gen_trace_static_fields): Likewise.
5082 (gen_traced_pop): Likewise.
5083 (gen_frame_args_address): Likewise.
5084 (gen_frame_locals_address): Likewise.
5085 (gen_var_ref): Likewise.
5086 (gen_struct_ref_recursive): Likewise.
5087 (gen_static_field): Likewise.
5088 (gen_maybe_namespace_elt): Likewise.
5089 (gen_expr): Likewise.
5090 (gen_trace_for_var): Likewise.
5091 (gen_trace_for_expr): Likewise.
5092 (gen_trace_for_return_address): Likewise.
5093
053f8057
SM
50942017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5095
5096 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5097 parameter.
5098 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5099
6661ad48
SM
51002017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5101
5102 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5103 from ax, update calls.
5104 (gen_usual_arithmetic): Likewise.
5105 (gen_integral_promotions): Likewise.
5106 (gen_bitfield_ref): Likewise.
5107 (gen_primitive_field): Likewise.
5108 (gen_struct_ref_recursive): Likewise.
5109 (gen_struct_ref): Likewise.
5110 (gen_maybe_namespace_elt): Likewise.
5111 (gen_struct_elt_for_reference): Likewise.
5112 (gen_namespace_elt): Likewise.
5113 (gen_aggregate_elt_ref): Likewise.
5114 (gen_expr): Get gdbarch from ax, update calls.
5115 (gen_expr_binop_rest): Likewise.
5116
c55a47e7
PA
51172017-07-13 Pedro Alves <palves@redhat.com>
5118
5119 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5120 as default tdesc.
5121 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5122 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5123 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5124 tdesc_amd64_linux as default tdesc. Get final tdesc from the
5125 tdep.
5126 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5127 Get final tdesc from the tdep.
5128 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5129 default tdesc.
5130 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5131 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5132 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5133 Use it as default tdesc.
5134 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5135 down to amd_init_abi. No longer handle fallback tdesc here.
5136 * amd64-tdep.h (tdesc_x32): Declare.
5137 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5138 parameter.
5139 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5140 as default tdesc.
5141
55efceab
AA
51422017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5143
5144 * s390-linux-tdep.c (s390_process_record): Add support for
5145 instructions new in arch12.
5146
0aa37b65
JB
51472017-07-11 John Baldwin <jhb@FreeBSD.org>
5148
5149 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5150 PT_GETFSBASE and PT_GETGSBASE.
5151 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5152 PT_SETGSBASE.
5153
48aeef91
JB
51542017-07-11 John Baldwin <jhb@FreeBSD.org>
5155
5156 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5157 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5158 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5159 those rules.
5160 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5161 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5162 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5163 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5164 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5165 * features/i386/amd64.xml: Add 64bit-segments.xml.
5166 * features/i386/amd64-avx-avx512.c: Regenerated.
5167 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5168 * features/i386/amd64-avx-mpx.c: Regenerated.
5169 * features/i386/amd64-avx.c: Regenerated.
5170 * features/i386/amd64-mpx.c: Regenerated.
5171 * features/i386/amd64.c: Regenerated.
5172 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5173 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5174 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5175 * regformats/i386/amd64-avx.dat: Regenerated.
5176 * regformats/i386/amd64-mpx.dat: Regenerated.
5177 * regformats/i386/amd64.dat: Regenerated.
5178
77c501bc
YQ
51792017-07-10 Yao Qi <yao.qi@linaro.org>
5180
5181 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5182 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5183
6dc8d757
AK
51842017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
5185
5186 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5187 unsetenv.
5188 * gnulib/aclocal.m4: Regenerate.
5189 * gnulib/config.in: Regenerate.
5190 * gnulib/configure: Regenerate.
5191 * gnulib/import/Makefile.am: Regenerate.
5192 * gnulib/import/Makefile.in: Regenerate.
5193 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5194 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5195 * gnulib/import/m4/environ.m4: New file.
5196 * gnulib/import/m4/setenv.m4: New file.
5197 * gnulib/import/setenv.c: New file.
5198 * gnulib/import/unsetenv.c: New file.
5199
266934d1
SM
52002017-07-09 Simon Marchi <simon.marchi@ericsson.com>
5201
5202 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5203 address when op is DW_OP_addr.
5204
03278692
TT
52052017-07-09 Tom Tromey <tom@tromey.com>
5206
5207 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5208 check and apply to outer type.
5209
4b654465
JB
52102017-07-07 John Baldwin <jhb@FreeBSD.org>
5211
5212 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5213 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5214 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5215 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5216
2af9fc44
JB
52172017-07-07 John Baldwin <jhb@FreeBSD.org>
5218
5219 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5220
382b69bb
JB
52212017-07-07 John Baldwin <jhb@FreeBSD.org>
5222
5223 * corelow.c (get_core_siginfo): Remove.
5224 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5225 instead of get_core_siginfo.
5226 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5227 * gdbarch.h: Re-generate.
5228 * gdbarch.c: Re-generate.
5229 * linux-tdep.c (linux_core_xfer_siginfo): New.
5230 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5231
6e5eab33
JB
52322017-07-07 John Baldwin <jhb@FreeBSD.org>
5233
5234 * corelow.c (thread_section_name): Move to ...
5235 * gdbcore.h (thread_section_name): ... here.
5236
929edea9
JB
52372017-07-07 John Baldwin <jhb@FreeBSD.org>
5238
5239 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5240 (struct siginfo32): New.
5241 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5242 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5243 via ptrace(PT_LWPINFO).
5244
762c974a
JB
52452017-07-07 John Baldwin <jhb@FreeBSD.org>
5246
5247 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5248 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5249 (fbsd_get_siginfo_type): New.
5250 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5251 (_initialize_fbsd_tdep): New.
5252
33c5cd75
DB
52532017-07-06 David Blaikie <dblaikie@gmail.com>
5254
5255 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5256 a singular dwo_unit*) to support multiple CUs in the same way that
5257 multiple TUs are supported.
5258 (create_cus_hash_table): Replace create_dwo_cu with a function for
5259 parsing multiple CUs from a DWO file.
5260 (open_and_init_dwo_file): Use create_cus_hash_table rather than
5261 create_dwo_cu.
5262 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5263 htab_find, rather than comparing the signature to a singleton CU in
5264 the dwo_file.
5265
8455d262
PA
52662017-07-06 Pedro Alves <palves@redhat.com>
5267
5268 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5269
4da3eb35
PA
52702017-07-04 Pedro Alves <palves@redhat.com>
5271
5272 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5273 * gdbtypes.h (TYPE_STATIC): Delete.
5274 (struct fn_field) <is_public, is_abstract, is_static, is_final,
5275 is_synchronized, is_native>: Delete.
5276 <dummy>: Bump.
5277 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5278 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5279 (TYPE_FN_FIELD_ABSTRACT): Delete.
5280
5bfd255c
SM
52812017-07-03 Simon Marchi <simon.marchi@ericsson.com>
5282
5283 * buffer.h (buffer_finish): Fix spelling mistakes.
5284
25c54127
EZ
52852017-07-01 Eli Zaretskii <eliz@gnu.org>
5286
5287 * .dir-locals.el: Automatically switch to C-style comments in
5288 versions of Emacs that support the feature.
5289
dc4bde35
SDJ
52902017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5291 Pedro Alves <palves@redhat.com>
5292
5293 PR cli/21688
5294 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5295 (process_next_line): New variable 'inline_cmd'.
5296 Adjust 'if' clauses for "python", "compile" and "guile" to use
5297 'command_name_equals' and check for '!inline_cmd'.
5298
51ed89aa
SDJ
52992017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5300
5301 PR cli/21688
5302 * cli/cli-script.c (command_name_equals_not_inline): New function.
5303 (process_next_line): Adjust 'if' clauses for "python", "compile"
5304 and "guile" to use command_name_equals_not_inline.
5305
eb17d413
PA
53062017-06-29 Pedro Alves <palves@redhat.com>
5307
5308 * completer.c (expression_completer): Call
5309 linespec_location_completer instead of location_completer.
5310
195bcdd5
PA
53112017-06-29 Pedro Alves <palves@redhat.com>
5312
5313 * completer.c (expression_completer): Remove code that recomputes
5314 'text' from 'word'.
5315
adc764e7
YQ
53162017-06-29 Yao Qi <yao.qi@linaro.org>
5317
5318 * regformats/regdat.sh: Generate code with
5319 "ifndef IN_PROCESS_AGENT".
5320
6e75794e
PA
53212017-06-28 Pedro Alves <palves@redhat.com>
5322
5323 * command.h: Include "common/scoped_restore.h".
5324
bc491f2e
YQ
53252017-06-28 Yao Qi <yao.qi@linaro.org>
5326
5327 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5328 instead of obstack_grow.
5329
41664b45
DG
53302017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5331
5332 PR gdb/21337
5333 * symfile.c (reread_symbols): Call objfiles_changed just before
5334 read_symbols.
5335
6da67eb1
PA
53362017-06-27 Pedro Alves <palves@redhat.com>
5337
5338 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5339 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5340 (completion_list_add_symbol, completion_list_add_msymbol):
5341 ... these new functions.
5342 (add_symtab_completions)
5343 (default_make_symbol_completion_list_break_on_1): Adjust.
5344
23732b1e
PA
53452017-06-27 Pedro Alves <palves@redhat.com>
5346
5347 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5348 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5349 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5350 dtor.
5351 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5352 'storage_obstack' field an auto_obstack. In-class initialize all
5353 non-bitfield fields. Make minsyms_read bool.
5354 * symfile.c (read_symbols): Adjust.
5355
a4d1e79a
AH
53562017-06-27 Alan Hayward <alan.hayward@arm.com>
5357
5358 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5359 (gdbsim_store_register): Likewise.
5360
8268c778
PA
53612017-06-27 Pedro Alves <palves@redhat.com>
5362
5363 * c-exp.y (name_obstack): Now an auto_obstack.
5364 (yylex): Use auto_obstack::clear.
5365 (c_parse): Use auto_obstack::clear instead of reinitializing and
5366 freeing the obstack.
5367 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5368 * d-exp.y (name_obstack): Now an auto_obstack.
5369 (yylex): Use auto_obstack::clear.
5370 (d_parse): Use auto_obstack::clear instead of reinitializing and
5371 freeing the obstack.
5372 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5373 auto_obstack.
5374 * dwarf2read.c (create_addrmap_from_index)
5375 (dwarf2_build_psymtabs_hard)
5376 (update_enumeration_type_from_children): Likewise.
5377 * gdb_obstack.h (auto_obstack): New type.
5378 * go-exp.y (name_obstack): Now an auto_obstack.
5379 (build_packaged_name): Use auto_obstack::clear.
5380 (go_parse): Use auto_obstack::clear instead of reinitializing and
5381 freeing the obstack.
5382 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5383 auto_obstack.
5384 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5385 * rust-exp.y (work_obstack): Now an auto_obstack.
5386 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5387 reinitializing and freeing the obstack.
5388 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5389 (host_char_to_target): Use auto_obstack.
5390 * utils.h (make_cleanup_obstack_free): Delete declaration.
5391 * valprint.c (generic_emit_char, generic_printstr): Use
5392 auto_obstack.
5393
db665f42
SM
53942017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5395
5396 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5397 thread.
5398 (darwin_init_thread_list): Don't update dummy thread.
5399 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5400
873c0814
SM
54012017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5402
5403 * record-full.c (netorder16): Remove.
5404
8b5a7a6e
SM
54052017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5406
5407 * common/diagnostics.h: Define macros for GCC.
5408 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5409 * common/vec.h: Include diagnostics.h.
5410 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5411 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5412 warning.
5413
d1435379
SM
54142017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5415
5416 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5417 New macro.
5418 * ada-lex.l: Ignore deprecated register warnings.
5419
cc75e0fd
SM
54202017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5421
5422 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5423 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5424
07809eaf
SM
54252017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5426
5427 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5428 its own line.
5429
f076f034
SM
54302017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5431
5432 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5433
0dd5cbc5
AH
54342017-06-23 Alan Hayward <alan.hayward@arm.com>
5435
5436 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5437 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5438 (xtensa_register_read_masked): Likewise.
5439
d4c6ce5b
SDJ
54402017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5441
5442 * common/environ.c (gdb_environ::unset): Update comment.
5443
16892a03
AH
54442017-06-22 Alan Hayward <alan.hayward@arm.com>
5445
5446 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5447 registers.
5448
d7dcbefc
AH
54492017-06-22 Alan Hayward <alan.hayward@arm.com>
5450
5451 * record-full.c (record_full_exec_insn): Use byte_vector.
5452
b30ff123
YQ
54532017-06-22 Yao Qi <yao.qi@linaro.org>
5454
5455 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5456 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5457
4fa847d7
AH
54582017-06-22 Alan Hayward <alan.hayward@arm.com>
5459
5460 * remote.c (cached_reg): Move from here...
5461 * regcache.h (cached_reg): ...to here.
5462 * python/py-unwind.c (struct reg_info): Remove.
5463 (cached_frame_info): Use cached_reg_t.
5464 (pyuw_prev_register): Likewise.
5465 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5466 (pyuw_dealloc_cache): Free all registers.
5467
f4906a9a
PA
54682017-06-22 Pedro Alves <palves@redhat.com>
5469 Simon Marchi <simon.marchi@ericsson.com>
5470
5471 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5472 warning.
5473 * common/diagnostics.h: New file.
5474
b45a1208
PA
54752017-06-22 Pedro Alves <palves@redhat.com>
5476
5477 * common/agent.h: Add include guards.
5478
e4da2c61
SM
54792017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5480
5481 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5482 talk about addressable units instead of bytes.
5483
96160d60
SDJ
54842017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5485
5486 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5487 of '::const_iterator'.
5488
9a6c7d9c
SDJ
54892017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5490
5491 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5492 'unittests/environ-selftests.c'.
5493 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5494 * charset.c (find_charset_names): Declare object 'iconv_env'.
5495 Update code to use 'iconv_env' object. Remove call to
5496 'free_environ'.
5497 * common/environ.c: Include <utility>.
5498 (make_environ): Delete function.
5499 (free_environ): Delete function.
5500 (gdb_environ::clear): New function.
5501 (gdb_environ::operator=): New function.
5502 (gdb_environ::get): Likewise.
5503 (environ_vector): Delete function.
5504 (set_in_environ): Delete function.
5505 (gdb_environ::set): New function.
5506 (unset_in_environ): Delete function.
5507 (gdb_environ::unset): New function.
5508 (gdb_environ::envp): Likewise.
5509 * common/environ.h: Include <vector>.
5510 (struct gdb_environ): Delete; transform into...
5511 (class gdb_environ): ... this class.
5512 (free_environ): Delete prototype.
5513 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5514 environ_vector): Likewise.
5515 * infcmd.c (run_command_1): Update code to call
5516 'envp' from 'gdb_environ' class.
5517 (environment_info): Update code to call methods from 'gdb_environ'
5518 class.
5519 (unset_environment_command): Likewise.
5520 (path_info): Likewise.
5521 (path_command): Likewise.
5522 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5523 (inferior::inferior): Initialize 'environment' using the host's
5524 information.
5525 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5526 Include "environ.h".
5527 (class inferior) <environment>: Change type from 'struct
5528 gdb_environ' to 'gdb_environ'.
5529 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5530 methods from 'gdb_environ' class.
5531 * solib.c (solib_find_1): Likewise
5532 * unittests/environ-selftests.c: New file.
5533
75c554cf
YQ
55342017-06-20 Yao Qi <yao.qi@linaro.org>
5535
5536 * features/i386/i386-linux.xml: Exchange the order of including
5537 32bit-linux.xml and 32bit-sse.xml.
5538 * features/i386/i386-linux.c: Regenerated.
5539
72ddacb7
YQ
55402017-06-20 Yao Qi <yao.qi@linaro.org>
5541
5542 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5543 Delete copy ctor and assignment operator.
5544 (tdesc_type): Likewise.
5545 (tdesc_feature): Likewise.
5546 (tdesc_free_reg): Remove.
5547 (tdesc_create_reg): Use new.
5548 (tdesc_free_type): Remove.
5549 (tdesc_create_vector): Use new.
5550 (tdesc_create_union): Likewise.
5551 (tdesc_create_flags): Likewise.
5552 (tdesc_create_enum): Likewise.
5553 (tdesc_free_feature): Delete.
5554 (free_target_description): Use delete.
5555
325c9fd4
JB
55562017-06-19 John Baldwin <jhb@FreeBSD.org>
5557
5558 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5559 registers.
5560
16b7a719
PA
55612017-06-19 Pedro Alves <palves@redhat.com>
5562
5563 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5564 after gdb::unlinker.
5565
1c8e01c9
SDJ
55662017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5567
5568 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5569 gdb_environ to access an environment variable.
5570
ffce45d2
TP
55712017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5572
5573 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5574 gdb_byte*.
5575
1d4fbac9
SM
55762017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5577
5578 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5579
8465943a
SM
55802017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5581
5582 * configure: Re-generate.
5583 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5584
3e019bdc
SM
55852017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5586
5587 * configure: Re-generate.
5588 * warning.m4: Pass -Werror to compiler when checking for
5589 supported warning flags.
5590
cf0dd6f0
SM
55912017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5592
5593 * Makefile.in (COMPILE.pre): Add "-x c++".
5594
6f98355c
YQ
55952017-06-16 Alan Hayward <alan.hayward@arm.com>
5596 Pedro Alves <palves@redhat.com>
5597 Yao Qi <yao.qi@linaro.org>
5598
5599 * defs.h (RequireLongest): New.
5600 (extract_integer): Declare function template.
5601 (extract_signed_integer): Remove the declaration, but define it
5602 static inline.
5603 (extract_unsigned_integer): Likewise.
5604 (store_integer): Declare function template.
5605 (store_signed_integer): Remove the declaration, but define it
5606 static inline.
5607 (store_unsigned_integer): Likewise.
5608 * findvar.c (extract_integer): New function template.
5609 (extract_signed_integer): Remove.
5610 (extract_unsigned_integer): Remove.
5611 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5612 instantiations.
5613 (store_integer): New function template.
5614 (store_signed_integer): Remove.
5615 (store_unsigned_integer): Remove.
5616 (store_integer): Explicit instantiations.
5617 * regcache.c (regcache_raw_read_signed): Update.
5618 (regcache::raw_read): New function.
5619 (regcache::raw_read_signed): Remove.
5620 (regcache::raw_read_unsigned): Remove.
5621 (regcache_raw_read_unsigned): Update.
5622 (regcache_raw_write_unsigned): Update.
5623 (regcache::raw_write_signed): Remove.
5624 (regcache::raw_write): New function.
5625 (regcache_cooked_read_signed): Update.
5626 (regcache::raw_write_unsigned): Remove.
5627 (regcache::cooked_read_signed): Remove.
5628 (regcache_cooked_read_unsigned): Update.
5629 (regcache::cooked_read_unsigned): Remove.
5630 (regcache_cooked_write_signed): Update.
5631 (regcache_cooked_write_unsigned): Update.
5632 * regcache.h (regcache) <raw_read_signed>: Remove.
5633 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5634 <raw_read, raw_write>: New.
5635 <cooked_read_signed, cooked_write_signed>: Remove.
5636 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5637 <cooked_read, cooked_write>: New.
5638 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5639 (sh64_pseudo_register_write): Update.
5640
a87dc45a
AK
56412017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5642
5643 * arc-tdep.c (arc_disassembler_options): New variable.
5644 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5645 of default_print_insn.
5646 (arc_delayed_print_insn): Set info->section when needed,
5647 use default_print_insn to retrieve a disassembler.
5648
45159d6a
SDJ
56492017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5650
5651 PR gdb/21574
5652 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5653 to mention $SHELL and startup-with-shell.
5654
b46c4cf0
MF
56552017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5656
5657 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5658
6394c606
YQ
56592017-06-14 Yao Qi <yao.qi@linaro.org>
5660
5661 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5662 default_print_insn instead of print_insn_aarch64.
5663 * arm-tdep.c (gdb_print_insn_arm): Call
5664 default_print_insn instead of print_insn_big_arm
5665 and print_insn_little_arm.
5666 * i386-tdep.c (i386_print_insn): Call default_print_insn
5667 instead of print_insn_i386.
5668 * ia64-tdep.c (ia64_print_insn): Call
5669 default_print_insn instead of print_insn_ia64.
5670 * mips-tdep.c (gdb_print_insn_mips): Call
5671 default_print_insn instead of print_insn_big_mips
5672 and print_insn_little_mips.
5673 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5674 instead of print_insn_spu.
5675
d5722aa2
PA
56762017-06-14 Pedro Alves <palves@redhat.com>
5677
5678 * ada-lang.c: Include "common/byte-vector.h".
5679 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5680 * charset.c (wchar_iterator::iterate): Resize the vector instead
5681 of reserving it.
5682 * common/byte-vector.h: Include "common/def-vector.h".
5683 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5684 * cli/cli-dump.c: Include "common/byte-vector.h".
5685 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5686 * common/byte-vector.h: New file.
5687 * common/def-vector.h: New file.
5688 * common/default-init-alloc.h: New file.
5689 * dwarf2loc.c: Include "common/byte-vector.h".
5690 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5691 instead of reserving it.
5692 * dwarf2read.c: Include "common/byte-vector.h".
5693 (data_buf::m_vec): Now a gdb::byte_vector.
5694 * gdb_regex.c: Include "common/def-vector.h".
5695 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5696 * mi/mi-main.c: Include "common/byte-vector.h".
5697 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5698 * printcmd.c: Include "common/byte-vector.h".
5699 (print_scalar_formatted): Use gdb::byte_vector.
5700 * valprint.c: Include "common/byte-vector.h".
5701 (maybe_negate_by_bytes, print_decimal_chars): Use
5702 gdb::byte_vector.
5703
01ec7a27
SM
57042017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5705
5706 * darwin-nat.c: Include "nat/fork-inferior.h".
5707
848d9074
SM
57082017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5709
5710 * configure.nat: Factor out Darwin bits that are not
5711 architecture-specific. Add fork-inferior.o.
5712
3b912944
SM
57132017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5714
5715 * configure.nat: Factor out AIX bits that are not
5716 architecture-specific. Add fork-inferior.o.
5717
55acdf22
AA
57182017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5719
5720 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5721 (read_pieced_value, write_pieced_value): ...here. Reduce to
5722 wrappers that just call rw_pieced_value.
5723
f65e2044
AA
57242017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5725
5726 * dwarf2loc.c (write_pieced_value): When writing the data for a
5727 memory piece, use write_memory_with_notification instead of
5728 write_memory.
5729
23f945bf
AA
57302017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5731
5732 * valops.c (read_value_memory): Change embedded_offset to
5733 represent a bit offset instead of a byte offset.
5734 * value.h (read_value_memory): Adjust comment.
5735
f236533e
AA
57362017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5737
5738 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5739 dest_offset_bits and source_offset_bits.
5740 (write_pieced_value): Likewise.
5741
65d84b76
AA
57422017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5743
5744 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5745 given by DW_OP_bit_piece.
5746 (write_pieced_value): Likewise.
5747
242d31ab
AA
57482017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5749
5750 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5751 some other preparations to the places where sufficient information
5752 is available.
5753 (write_pieced_value): Likewise.
5754
03c8af18
AA
57552017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5756
5757 * dwarf2loc.c (bits_to_bytes): New function.
5758 (read_pieced_value): Fix offset calculations for register pieces
5759 on big-endian targets.
5760 (write_pieced_value): Likewise.
5761
840989c1
AA
57622017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5763
5764 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5765 (write_pieced_value): Likewise.
5766
359b19bb
AA
57672017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5768
5769 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5770 transfer the source value's least significant bits, instead of its
5771 lowest-addressed ones. Rename type_len to max_offset.
5772 (read_pieced_value): Mirror above changes to write_pieced_value as
5773 applicable.
5774
07c9ca3b
AA
57752017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5776
5777 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5778 truncate full bytes from dest_offset_bits before using it as an
5779 offset into the buffer.
5780
f1cc9874
AA
57812017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5782
5783 * dwarf2loc.c (write_pieced_value): Include transfer size in
5784 byte-wise check.
5785
cdaac320
AA
57862017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5787
5788 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5789 calculation of this_size.
5790
af547a96
AA
57912017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5792
5793 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5794 when targeting a bit-field.
5795 (write_pieced_value): Likewise.
5796
ddd7882a
AA
57972017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5798
5799 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5800 (allocate_piece_closure): Drop addr_size parameter.
5801 (dwarf2_evaluate_loc_desc_full): Adjust call to
5802 allocate_piece_closure.
5803
e9352324
AA
58042017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5805
5806 PR gdb/21226
5807 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5808 the LSB end, independent of endianness.
5809
d5d1163e
AA
58102017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5811
5812 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5813 size capping.
5814
032bb6ea
YQ
58152017-06-13 Yao Qi <yao.qi@linaro.org>
5816
5817 * mips-linux-nat.c: Move include features/mips*-linux.c to
5818 mips-linux-tdep.c.
5819 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5820 to mips-linux-tdep.c.
5821 * mips-linux-tdep.c: Include features/mips*-linux.c
5822 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5823 functions.
5824 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5825 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5826 (tdesc_mips64_dsp_linux): Declare.
5827
f12f6bad
TT
58282017-06-12 Tom Tromey <tom@tromey.com>
5829
5830 * valprint.h (val_print_type_code_int): Remove.
5831 * valprint.c (generic_val_print_int): Always call
5832 val_print_scalar_formatted.
5833 (val_print_type_code_int): Remove.
5834 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5835 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5836 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5837 * ada-valprint.c (ada_val_print_num): Use
5838 val_print_scalar_formatted.
5839
d9109c80
TT
58402017-06-12 Tom Tromey <tom@tromey.com>
5841
5842 * printcmd.c (print_scalar_formatted): Unify the two switches.
5843 Don't convert scalars to LONGEST.
5844
4ac0cb1c
TT
58452017-06-12 Tom Tromey <tom@tromey.com>
5846
5847 PR exp/16225:
5848 * valprint.h (print_decimal_chars): Update.
5849 * valprint.c (maybe_negate_by_bytes): New function.
5850 (print_decimal_chars): Add "is_signed" argument.
5851 * printcmd.c (print_scalar_formatted): Update.
5852
30a25466
TT
58532017-06-12 Tom Tromey <tom@tromey.com>
5854
5855 PR exp/16225:
5856 * valprint.h (print_binary_chars, print_hex_chars): Update.
5857 * valprint.c (val_print_type_code_int): Update.
5858 (print_binary_chars): Add "zero_pad" argument.
5859 (emit_octal_digit): New function.
5860 (print_octal_chars): Don't zero-pad.
5861 (print_decimal_chars): Likewise.
5862 (print_hex_chars): Add "zero_pad" argument.
5863 * sh64-tdep.c (sh64_do_fp_register): Update.
5864 * regcache.c (regcache::dump): Update.
5865 * printcmd.c (print_scalar_formatted): Update.
5866 * infcmd.c (default_print_one_register_info): Update.
5867
b3464d03
PA
58682017-06-12 Pedro Alves <palves@redhat.com>
5869 Alan Hayward <alan.hayward@arm.com>
5870
5871 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5872 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5873 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5874 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5875 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5876
4b76cda9
PA
58772017-06-12 Pedro Alves <palves@redhat.com>
5878
5879 * dwarf2read.c (mapped_symtab::data): Now a vector of
5880 symtab_index_entry instead of vector of
5881 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5882 whether an element's name is NULL instead of checking whether the
5883 element itself is NULL.
5884 (find_slot): Change return type. Adjust.
5885 (hash_expand, , add_index_entry, uniquify_cu_indices)
5886 (write_hash_table): Adjust.
5887
e8f8bcb3
PA
58882017-06-12 Pedro Alves <palves@redhat.com>
5889
5890 * dwarf2read.c (recursively_count_psymbols): New function.
5891 (write_psymtabs_to_index): Call it to compute number of psyms and
5892 pass estimate size of psyms_seen to unordered_set's ctor.
5893
70a1152b
PA
58942017-06-12 Pedro Alves <palves@redhat.com>
5895
5896 * dwarf2read.c (write_hash_table): Check if key already exists
5897 before emplacing.
5898
c2f134ac
PA
58992017-06-12 Pedro Alves <palves@redhat.com>
5900
5901 * dwarf2read.c (data_buf::append_space): Rename to...
5902 (data_buf::grow): ... this, and make private. Adjust all callers.
5903 (data_buf::append_uint): New method.
5904 (add_address_entry, write_one_signatured_type)
5905 (write_psymtabs_to_index): Use it.
5906
a81e6d4d
PA
59072017-06-12 Pedro Alves <palves@redhat.com>
5908
5909 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5910 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5911 (data_buf::file_write): Call ::fwrite directly.
5912
6fd931f2
PA
59132017-06-12 Pedro Alves <palves@redhat.com>
5914
5915 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5916 std::vector::erase.
5917
bc8f2430
JK
59182017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5919
5920 Code cleanup: C++ify .gdb_index producer.
5921 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5922 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5923 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5924 (create_strtab, add_string): Remove.
5925 (file_write, data_buf): New.
5926 (struct symtab_index_entry): Use std::vector for cu_indices.
5927 (struct mapped_symtab): Use std::vector for data.
5928 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5929 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5930 Remove.
5931 (find_slot): Change return type. Update it to the new data structures.
5932 (hash_expand, add_index_entry): Update it to the new data structures.
5933 (offset_type_compare): Remove.
5934 (uniquify_cu_indices): Update it to the new data structures.
5935 (c_str_view, c_str_view_hasher, vector_hasher): New.
5936 (add_indices_to_cpool): Remove.
5937 (write_hash_table): Update it to the new data structures.
5938 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5939 (eq_psymtab_cu_index): Remove.
5940 (psym_index_map): New typedef.
5941 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5942 reference and std::unordered_map for cu_index_htab.
5943 (add_address_entry, add_address_entry_worker, write_address_map)
5944 (write_psymbols): Update it to the new data structures.
5945 (write_obstack): Remove.
5946 (struct signatured_type_index_data): Change types_list to a data_buf
5947 reference and psyms_seen to a std::unordered_set reference.
5948 (write_one_signatured_type, recursively_write_psymbols)
5949 (write_psymtabs_to_index): Update it to the new data structures.
5950
c4dcb155
SM
59512017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5952
5953 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5954 separate-debug-file commands.
5955 * symfile.h (separate_debug_file_debug): New global.
5956 * symfile.c (separate_debug_file_debug): New global.
5957 (separate_debug_file_exists, find_separate_debug_file): Add
5958 debug output.
5959 (_initialize_symfile): Add "set debug separate-debug-file"
5960 command.
5961 * build-id.c (build_id_to_debug_bfd,
5962 find_separate_debug_file_by_buildid): Add debug output.
5963
6d45d4b4
SM
59642017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5965
5966 * gdbarch.sh (displaced_step_free_closure): Remove.
5967 * gdbarch.h, gdbarch.c: Re-generate.
5968 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5969 displaced_step_free_closure.
5970 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5971 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5972 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5973 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5974 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5975 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5976 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5977 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5978 * infrun.c (displaced_step_clear): Call xfree instead of
5979 gdbarch_displaced_step_free_closure.
5980
2f91880f
SDJ
59812017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5982
5983 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5984 NULL".
5985
b8b6e72f
AH
59862017-06-08 Alan Hayward <alan.hayward@arm.com>
5987
5988 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5989 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5990 (mn10300_push_dummy_call): Likewise.
5991
5369082e
AH
59922017-06-08 Alan Hayward <alan.hayward@arm.com>
5993
5994 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5995
ff4ca5ac
AH
59962017-06-08 Alan Hayward <alan.hayward@arm.com>
5997
5998 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5999
aefd8b33
SDJ
60002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6001
6002 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6003 able to start inferiors using a shell.
6004 (New remote packets): Announce new packet "QStartupWithShell".
6005 * remote.c: Add PACKET_QStartupWithShell.
6006 (extended_remote_create_inferior): Handle new
6007 PACKET_QStartupWithShell.
6008 (remote_protocol_features) <QStartupWithShell>: New entry for
6009 PACKET_QStartupWithShell.
6010 (_initialize_remote): Call "add_packet_config_cmd" for
6011 QStartupShell.
6012
2090129c
SDJ
60132017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6014 Pedro Alves <palves@redhat.com>
6015
6016 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6017 and "nat/fork-inferior.h".
6018 * common/common-inferior.h: New file, with contents from
6019 "gdb/inferior.h".
6020 * commom/common-utils.c: Include "common-utils.h".
6021 (stringify_argv): New function.
6022 * common/common-utils.h (stringify_argv): New prototype.
6023 * configure.nat: Add "fork-inferior.o" as a dependency for
6024 "*linux*", "fbsd*" and "nbsd*" hosts.
6025 * corefile.c (get_exec_file): Update comment.
6026 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6027 instead of "startup_inferior".
6028 (darwin_create_inferior): Call "add_thread_silent" after
6029 "fork_inferior".
6030 * fork-child.c: Cleanup unnecessary includes.
6031 (SHELL_FILE): Move to "common/common-fork-child.c".
6032 (environ): Likewise.
6033 (exec_wrapper): Initialize.
6034 (get_exec_wrapper): New function.
6035 (breakup_args): Move to "common/common-fork-child.c"; rename to
6036 "breakup_args_for_exec".
6037 (escape_bang_in_quoted_argument): Move to
6038 "common/common-fork-child.c".
6039 (saved_ui): New variable.
6040 (prefork_hook): New function.
6041 (postfork_hook): Likewise.
6042 (postfork_child_hook): Likewise.
6043 (gdb_startup_inferior): Likewise.
6044 (fork_inferior): Move to "common/common-fork-child.c". Update
6045 function to support gdbserver.
6046 (startup_inferior): Likewise.
6047 * gdbcore.h (get_exec_file): Remove declaration.
6048 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6049 instead of "startup_inferior". Call "add_thread_silent" after
6050 "fork_inferior".
6051 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6052 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6053 instead of "startup_inferior". Call "add_thread_silent" after
6054 "fork_inferior".
6055 * inferior.h: Include "common-inferior.h".
6056 (trace_start_error): Move to "common/common-utils.h".
6057 (trace_start_error_with_name): Likewise.
6058 (fork_inferior): Move prototype to "nat/fork-inferior.h".
6059 (startup_inferior): Likewise.
6060 (gdb_startup_inferior): New prototype.
6061 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6062 * nat/fork-inferior.h: New file.
6063 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6064 instead of "startup_inferior". Call "add_thread_silent" after
6065 "fork_inferior".
6066 * target.h (target_terminal_init): Move prototype to
6067 "target/target.h".
6068 (target_terminal_inferior): Likewise.
6069 (target_terminal_ours): Likewise.
6070 * target/target.h (target_terminal_init): New prototype, moved
6071 from "target.h".
6072 (target_terminal_inferior): Likewise.
6073 (target_terminal_ours): Likewise.
6074 * utils.c (gdb_flush_out_err): New function.
6075
043a4934
SDJ
60762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6077
6078 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6079 * common/common-gdbthread.h: New file, with parts from
6080 "gdb/gdbthread.h".
6081 * gdbthread.h: Include "common-gdbthread.h".
6082 (switch_to_thread): Moved to "common/common-gdbthread.h".
6083
15652511
SDJ
60842017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6085
6086 * Makefile.in (SFILES): Add "common/job-control.c".
6087 (HFILES_NO_SRCDIR): Add "common/job-control.h".
6088 (COMMON_OBS): Add "job-control.o".
6089 * common/job-control.c: New file, with contents from
6090 "gdb/inflow.c".
6091 * common/job-control.h: New file, with contents from "terminal.h".
6092 * fork-child.c: Include "job-control.h".
6093 * inflow.c: Include "job-control.h".
6094 (gdb_setpgid): Move to "common/common-inflow.c".
6095 (_initialize_inflow): Move setting of "job_control" to
6096 "handle_job_control".
6097 * terminal.h (job_control): Moved to "common/common-terminal.h".
6098 (gdb_setpgid): Likewise.
6099 * top.c: Include "job_control.h".
6100 * utils.c: Likewise.
6101 (job_control): Moved to "job-control.c".
6102
2d7cc5c7
PA
61032017-06-07 Pedro Alves <palves@redhat.com>
6104
6105 * Makefile.in (SFILES): Add gdb_regex.c.
6106 (COMMON_OBS): Add gdb_regex.o.
6107 * ada-lang.c (ada_add_standard_exceptions)
6108 (ada_add_exceptions_from_frame, name_matches_regex)
6109 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6110 parameter type to compiled_regex. Adjust.
6111 (ada_exceptions_list): Use compiled_regex.
6112 * break-catch-throw.c (exception_catchpoint::pattern): Now a
6113 std::unique_ptr<compiled_regex>.
6114 (exception_catchpoint::~exception_catchpoint): Remove regfree
6115 call.
6116 (check_status_exception_catchpoint): Adjust to use compiled_regex.
6117 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6118 * breakpoint.c (solib_catchpoint::compiled): Now a
6119 std::unique_ptr<compiled_regex>.
6120 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6121 (check_status_catch_solib): Adjust to use compiled_regex.
6122 (add_solib_catchpoint): Adjust to use compiled_regex.
6123 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6124 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6125 compiled_regex reference. Adjust to use it.
6126 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6127 declaration. Include "gdb_regex.h".
6128 (apropos_cmd): Change regex parameter to compiled_regex reference.
6129 * gdb_regex.c: New file.
6130 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6131 declarations.
6132 (class compiled_regex): New.
6133 * linux-tdep.c: Include "common/gdb_optional.h".
6134 (struct mapping_regexes): New, factored out from
6135 mapping_is_anonymous_p, and adjusted to use compiled_regex.
6136 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6137 gdb::optional and remove cleanups. Adjust to compiled_regex.
6138 * probe.c: Include "common/gdb_optional.h".
6139 (collect_probes): Use compiled_regex and gdb::optional and remove
6140 cleanups.
6141 * skip.c: Include "common/gdb_optional.h".
6142 (skiplist_entry::compiled_function_regexp): Now a
6143 gdb::optional<compiled_regex>.
6144 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6145 (free_skiplist_entry): Remove regfree call.
6146 (compile_skip_regexp, skip_rfunction_p): Adjust to use
6147 compiled_regex and gdb::optional.
6148 * symtab.c: Include "common/gdb_optional.h".
6149 (search_symbols): Use compiled_regex and gdb::optional.
6150 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6151 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
6152 to gdb_regex.c.
6153
50d6adef
AH
61542017-06-07 Alan Hayward <alan.hayward@arm.com>
6155
6156 * regcache.c (regcache::save): Avoid buffer use.
6157 (regcache::dump): Likewise.
6158
4a8a33c8
AH
61592017-06-07 Alan Hayward <alan.hayward@arm.com>
6160
6161 * sh-tdep.c (sh_pseudo_register_read): Remove
6162 MAX_REGISTER_SIZE.
6163 (sh_pseudo_register_write): Likewise.
6164 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6165 (sh64_pseudo_register_write): Likewise
6166
d1be909e
AH
61672017-06-07 Alan Hayward <alan.hayward@arm.com>
6168
6169 * aarch64-tdep.c (aarch64_store_return_value): Use
6170 V_REGISTER_SIZE.
6171 (aarch64_pseudo_read_value): Likewise.
6172 (aarch64_pseudo_write): Likewise.
6173
f4a65042
YQ
61742017-06-06 Yao Qi <yao.qi@linaro.org>
6175
6176 * regformats/regdef.h (set_register_cache): Remove the
6177 declaration.
6178
9f7fb0aa
AH
61792017-06-06 Alan Hayward <alan.hayward@arm.com>
6180
6181 * frame.c (frame_unwind_register_signed): Use
6182 frame_unwind_register_value.
6183
e1e01040
PA
61842017-06-06 Pedro Alves <palves@redhat.com>
6185
6186 PR breakpoints/21553
6187 * breakpoint.c (create_breakpoints_sal_default)
6188 (init_breakpoint_sal, create_breakpoint_sal): Use
6189 gdb::unique_xmalloc_ptr for string parameters.
6190 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6191 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
6192 (base_breakpoint_create_breakpoints_sal)
6193 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6194 (strace_marker_create_breakpoints_sal)
6195 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6196 string parameters.
6197 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6198 gdb::unique_xmalloc_ptr for string parameters.
6199 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6200 parameters.
6201
fbe654c8
AH
62022017-06-06 Alan Hayward <alan.hayward@arm.com>
6203
6204 * alpha-tdep.c (alpha_register_to_value): Use
6205 get_frame_register_value.
6206 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6207
ae0d01d6
AH
62082017-06-06 Alan Hayward <alan.hayward@arm.com>
6209
6210 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6211 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6212 (ia64_value_to_register): Likewise.
6213 (ia64_extract_return_value): Likewise.
6214 (ia64_store_return_value): Likewise.
6215 (ia64_push_dummy_call): Likewise.
6216
49cf576c
JB
62172017-06-04 Joel Brobecker <brobecker@adacore.com>
6218
6219 GDB 8.0 released.
6220
26b6a6ab
SM
62212017-06-03 Simon Marchi <simon.marchi@ericsson.com>
6222
6223 * x86-linux-nat.c (struct arch_lwp_info): Remove.
6224
22827c51
SM
62252017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
6226
6227 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6228 parameter.
6229 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6230
0e05cf3a
SM
62312017-06-02 Simon Marchi <simon.marchi@ericsson.com>
6232
6233 * event-loop.c (poll_timers): Unallocate timer using delete
6234 instead of xfree.
6235
c1fc2657
SM
62362017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6237
6238 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6239 (struct breakpoint) <~breakpoint>: New.
6240 (struct watchpoint): Inherit from breakpoint.
6241 <~watchpoint>: New.
6242 <base>: Remove.
6243 (struct tracepoint): Inherit from breakpoint.
6244 <base>: Remove.
6245 * breakpoint.c (longjmp_breakpoint_ops): Remove.
6246 (struct longjmp_breakpoint): Inherit from breakpoint.
6247 <~longjmp_breakpoint>: New.
6248 <base>: Remove.
6249 (new_breakpoint_from_type): Remove casts.
6250 (watchpoint_in_thread_scope): Remove reference to base field.
6251 (watchpoint_del_at_next_stop): Likewise.
6252 (update_watchpoint): Likewise.
6253 (watchpoint_check): Likewise.
6254 (bpstat_check_watchpoint): Likewise.
6255 (set_longjmp_breakpoint): Likewise.
6256 (struct fork_catchpoint): Inherit from breakpoint.
6257 <base>: Remove.
6258 (struct solib_catchpoint): Inherit from breakpoint.
6259 <~solib_catchpoint>: New.
6260 <base>: Remove.
6261 (dtor_catch_solib): Change to ...
6262 (solib_catchpoint::~solib_catchpoint): ... this.
6263 (breakpoint_hit_catch_solib): Remove reference to base field.
6264 (add_solib_catchpoint): Likewise.
6265 (create_fork_vfork_event_catchpoint): Likewise.
6266 (struct exec_catchpoint): Inherit from breakpoint.
6267 <~exec_catchpoint>: New.
6268 <base>: Remove.
6269 (dtor_catch_exec): Change to ...
6270 (exec_catchpoint::~exec_catchpoint): ... this.
6271 (dtor_watchpoint): Change to ...
6272 (watchpoint::~watchpoint): ... this.
6273 (watch_command_1): Remove reference to base field.
6274 (catch_exec_command_1): Likewise.
6275 (base_breakpoint_dtor): Change to ...
6276 (breakpoint::~breakpoint): ... this.
6277 (base_breakpoint_ops): Remove dtor field value.
6278 (longjmp_bkpt_dtor): Change to ...
6279 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6280 (strace_marker_create_breakpoints_sal): Remove reference to base
6281 field.
6282 (delete_breakpoint): Don't manually call breakpoint destructor.
6283 (create_tracepoint_from_upload): Remove reference to base field.
6284 (trace_pass_set_count): Likewise.
6285 (initialize_breakpoint_ops): Don't initialize
6286 momentary_breakpoint_ops, don't set dtors.
6287 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6288 <~ada_catchpoint>: New.
6289 <base>: Remove.
6290 (create_excep_cond_exprs): Remove reference to base field.
6291 (dtor_exception): Change to ...
6292 (ada_catchpoint::~ada_catchpoint): ... this.
6293 (dtor_catch_exception): Remove.
6294 (dtor_catch_exception_unhandled): Remove.
6295 (dtor_catch_assert): Remove.
6296 (create_ada_exception_catchpoint): Remove reference to base
6297 field.
6298 (initialize_ada_catchpoint_ops): Don't set dtors.
6299 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6300 breakpoint.
6301 <~signal_catchpoint>: New.
6302 <base>: Remove.
6303 (signal_catchpoint_dtor): Change to ...
6304 (signal_catchpoint::~signal_catchpoint): ... this.
6305 (create_signal_catchpoint): Remove reference to base field.
6306 (initialize_signal_catchpoint_ops): Don't set dtor.
6307 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6308 from breakpoint.
6309 <~syscall_catchpoint>: New.
6310 <base>: Remove.
6311 (dtor_catch_syscall): Change to ...
6312 (syscall_catchpoint::~syscall_catchpoint): ... this.
6313 (create_syscall_event_catchpoint): Remove reference to base
6314 field.
6315 (initialize_syscall_catchpoint_ops): Don't set dtor.
6316 * break-catch-throw.c (struct exception_catchpoint): Inherit
6317 from breakpoint.
6318 <~exception_catchpoint>: New.
6319 <base>: Remove.
6320 (dtor_exception_catchpoint): Change to ...
6321 (exception_catchpoint::~exception_catchpoint): ... this.
6322 (handle_gnu_v3_exceptions): Remove reference to base field.
6323 (initialize_throw_catchpoint_ops): Don't set dtor.
6324 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6325 field.
6326 * remote.c (remote_get_tracepoint_status): Likewise.
6327 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6328 * tracefile.c (tracefile_fetch_registers): Likewise.
6329 * tracepoint.c (actions_command): Likewise.
6330 (validate_actionline): Likewise.
6331 (tfind_1): Likewise.
6332 (get_traceframe_location): Likewise.
6333 (find_matching_tracepoint_location): Likewise.
6334 (parse_tracepoint_status): Likewise.
6335 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6336
3b0871f4
SM
63372017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6338
6339 * breakpoint.c (struct longjmp_breakpoint): New struct.
6340 (is_tracepoint_type): Change return type to bool.
6341 (is_longjmp_type): New function.
6342 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6343 (set_raw_breakpoint_without_location): Use
6344 new_breakpoint_from_type.
6345 (set_raw_breakpoint): Likewise.
6346
a5e364af
SM
63472017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6348
6349 * breakpoint.c (new_breakpoint_from_type): New function.
6350 (create_breakpoint_sal): Use new_breakpoint_from_type and
6351 unique_ptr.
6352 (create_breakpoint): Likewise.
6353
ae3b3f34
SM
63542017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6355
6356 * memattr.c (mem_info_command): Rename to ...
6357 (info_mem_command): ... this.
6358 (mem_enable_command): Rename to ...
6359 (enable_mem_command): ... this.
6360 (mem_disable_command): Rename to ...
6361 (disable_mem_command): ... this.
6362 (mem_delete_command): Rename to ...
6363 (delete_mem_command): ... this.
6364 (_initialize_mem): Adjust function names.
6365
13ace077
MM
63662017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6367
6368 * btrace.c (handle_pt_insn_events): New.
6369 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6370 STATUS. Split into this and ...
6371 (handle_pt_insn_event_flags): ... this.
6372
c56ccc05
MM
63732017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6374
6375 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6376 and struct pt_insn.resynced.
6377 * configure: Regenerated.
6378 * config.in: Regenerated.
6379
08c3f6d2
TW
63802017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6381
6382 * btrace.c (ftrace_find_call_by_number): New function.
6383 (ftrace_new_function): Store objects, not pointers.
6384 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6385 ftrace_new_gap, ftrace_update_function,
6386 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6387 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6388 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6389 btrace_ends_with_single_insn, btrace_call_get): Account for
6390 btrace_thread_info::functions now storing objects.
6391 * btrace.h (struct btrace_thread_info): Add constructor.
6392 (struct btrace_thread_info) <functions>: Make std::vector.
6393 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6394 Initialize with default values.
6395 * record-btrace.c (record_btrace_frame_sniffer): Account for
6396 btrace_thread_info::functions now storing objects.
6397
8ffd39f2
TW
63982017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6399
6400 * btrace.c: Remove typedef bfun_s.
6401 (ftrace_new_gap): Directly add gaps to the list of gaps.
6402 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6403 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6404 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6405 instead of gdb VEC.
6406
4aeb0dfc
TW
64072017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6408
6409 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6410 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6411 with btrace_thread_info::next_segment and
6412 btrace_thread_info::prev_segment.
6413 * btrace.h: Remove struct btrace_func_link.
6414 (struct btrace_function): Replace pair of function segment pointers
6415 with pair of indices.
6416 * python/py-record-btrace.c (btpy_call_prev_sibling,
6417 btpy_call_next_sibling): Replace references to
6418 btrace_thread_info::segment with btrace_thread_info::next_segment and
6419 btrace_thread_info::prev_segment.
6420 * record-btrace.c (record_btrace_frame_this_id): Use
6421 btrace_find_call_by_number.
6422
eb8f2b9c
TW
64232017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6424
6425 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6426 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6427 btrace_insn_next, btrace_insn_prev): Remove references to
6428 btrace_thread_info::flow.
6429 * btrace.h (struct btrace_function): Remove FLOW.
6430
42bfe59e
TW
64312017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6432
6433 * btrace.c (ftrace_find_call_by_number): New function.
6434 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6435 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6436 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6437 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6438 index.
6439 * btrace.h (struct btrace_function): Turn UP into an index.
6440 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6441 as an index.
6442 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6443 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6444 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6445
b54b03bd
TW
64462017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6447
6448 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6449 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6450 ftrace_update_function, ftrace_compute_global_level_offset,
6451 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6452 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6453 btrace_insn_end, btrace_is_empty): Remove references to
6454 btrace_thread_info::begin and btrace_thread_info::end.
6455 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6456 (struct btrace_thread_info) <functions>: Adjust comment.
6457 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6458 btrace_thread_info::begin.
6459
8286623c
TW
64602017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6461
6462 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6463 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6464 ftrace_update_function): Remove arguments that implicitly were always
6465 BTINFO->END.
6466 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6467 Don't pass BTINFO->END.
6468
a0f1b963
TW
64692017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6470
6471 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6472 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6473 btrace_find_insn_by_number): Replace function segment pointer with
6474 index.
6475 (btrace_insn_cmp): Simplify.
6476 * btrace.h: (struct btrace_insn_iterator) Rename index to
6477 insn_index. Replace function segment pointer with index into function
6478 segment vector.
6479 * record-btrace.c (record_btrace_call_history): Replace function
6480 segment pointer use with index.
6481 (record_btrace_frame_sniffer): Retrieve function call segment through
6482 vector.
6483 (record_btrace_set_replay): Remove defunc't safety check.
6484
f158f208
TW
64852017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6486
6487 * btrace.c (btrace_ends_with_single_insn): New function.
6488 (btrace_call_get, btrace_call_number, btrace_call_begin,
6489 btrace_call_end, btrace_call_next, btrace_call_prev,
6490 btrace_find_call_by_number): Use index into call segment vector
6491 instead of pointer.
6492 (btrace_call_cmp): Simplify.
6493 * btrace.h (struct btrace_call_iterator): Replace function call segment
6494 pointer with index into vector.
6495 * record-btrace.c (record_btrace_call_history): Use index instead of
6496 pointer.
6497
521103fd
TW
64982017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6499
6500 * btrace.c (btrace_insn_begin, btrace_insn_end,
6501 btrace_find_insn_by_number): Add btinfo to iterator.
6502 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6503
17b89b34
TW
65042017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6505
6506 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6507 and save pointers directly.
6508 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6509 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6510 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6511 changed signature of functions.
6512 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6513 (btrace_fetch): Remove code that adds btrace_function pointers to
6514 vector of btrace_functions.
6515 (btrace_clear): Simplify freeing vector of btrace_functions.
6516
2b51eddc
TW
65172017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6518
6519 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6520 Replace VEC_* with std::vector functions.
6521 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6522 (struct btrace_thread_info)<functions>: Change type to std::vector.
6523
db6be0d5
SM
65242017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6525
6526 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6527 "Removed targets and native configurations" up. Merge duplicate
6528 "New commands" sub-sections. Add "New options" sub-sections.
6529
b057297a
AH
65302017-05-26 Alan Hayward <alan.hayward@arm.com>
6531
6532 * defs.h (copy_integer_to_size): New declaration.
6533 * findvar.c (copy_integer_to_size): New function.
6534 (do_cint_test): New selftest function.
6535 (copy_integer_to_size_test): Likewise.
6536 (_initialize_findvar): Likewise.
6537 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6538 (mips_fbsd_collect_reg): Use raw_collect_integer.
6539 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6540 (mips64_fill_gregset): Use raw_collect_integer
6541 (mips64_fill_fpregset): Use raw_supply_integer.
6542 * regcache.c (regcache::raw_supply_integer): New function.
6543 (regcache::raw_collect_integer): Likewise.
6544 * regcache.h: (regcache::raw_supply_integer): New declaration.
6545 (regcache::raw_collect_integer): Likewise.
6546
b77b02a5
YQ
65472017-05-24 Yao Qi <yao.qi@linaro.org>
6548
6549 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6550 (COMMON_OBS): Add gdbarch-selftests.o.
6551 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6552 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6553 * gdbarch-selftests.c: New file.
6554 * regcache.h (regcache) <~regcache>: Mark it virtual if
6555 GDB_SELF_TEST.
6556 <raw_write>: Likewise.
6557
e521e87e
YQ
65582017-05-24 Yao Qi <yao.qi@linaro.org>
6559
6560 * regcache.c (current_regcache): Change it to
6561 regcache::current_regcache.
6562 (regcache_observer_target_changed): Update.
6563 (regcache_thread_ptid_changed): Make it a regcache static
6564 method.
6565 (regcache_thread_ptid_changed): Update.
6566 (class regcache_access): New.
6567 (current_regcache_test): Update.
6568 (_initialize_regcache): Update.
6569 * regcache.h: Include forward_list.
6570 (regcache): Declare regcache_thread_ptid_changed and declare
6571 registers_changed_ptid as friend.
6572
d8e07dda
YQ
65732017-05-24 Yao Qi <yao.qi@linaro.org>
6574
6575 * i387-tdep.c (i387_register_to_value): Use register_size
6576 instead of TYPE_LENGTH.
6577 * m68k-tdep.c (m68k_register_to_value): Likewise.
6578
8c8f9122
YQ
65792017-05-24 Yao Qi <yao.qi@linaro.org>
6580
6581 * i387-tdep.c (i387_convert_register_p): Return false if type
6582 code isn't TYPE_CODE_FLT.
6583
68fce50f
YQ
65842017-05-24 Yao Qi <yao.qi@linaro.org>
6585
6586 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6587 length is 4.
6588 (alpha_register_to_value): Remove type length check.
6589 (alpha_value_to_register): Likewise.
6590
88954b49
YQ
65912017-05-24 Yao Qi <yao.qi@linaro.org>
6592
6593 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6594 TYPE_CODE_FLT.
6595
e3ec9b69
YQ
65962017-05-24 Yao Qi <yao.qi@linaro.org>
6597
6598 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6599 TYPE_CODE_FLT or not.
6600
cdd238da
YQ
66012017-05-24 Yao Qi <yao.qi@linaro.org>
6602
6603 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6604 * avr-tdep.c (avr_gdbarch_init): Likewise.
6605 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6606 * cris-tdep.c (cris_gdbarch_init): Likewise.
6607 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6608 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6609 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6610 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6611 * mep-tdep.c (mep_gdbarch_init): Likewise.
6612 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6613 * mips-tdep.c (mips_gdbarch_init): Likewise.
6614 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6615 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6616 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6617 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6618 * v850-tdep.c (v850_gdbarch_init): Likewise.
6619
7a3929c4
YQ
66202017-05-24 Yao Qi <yao.qi@linaro.org>
6621
6622 * selftest-arch.c (tests_with_arch): Call registers_changed
6623 and reinit_frame_cache.
6624 * selftest.c (run_self_tests): Likewise.
6625
f4985dba
YQ
66262017-05-24 Yao Qi <yao.qi@linaro.org>
6627
6628 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6629 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6630
ab20fa4a
YQ
66312017-05-24 Yao Qi <yao.qi@linaro.org>
6632
6633 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6634 set_gdbarch_print_insn.
6635
f532ab94
YQ
66362017-05-24 Yao Qi <yao.qi@linaro.org>
6637
6638 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6639 set_gdbarch_print_insn.
6640
39503f82
YQ
66412017-05-24 Yao Qi <yao.qi@linaro.org>
6642
6643 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6644 set_gdbarch_print_insn.
6645 * arc-tdep.c (arc_gdbarch_init): Likewise.
6646 * arch-utils.c: include dis-asm.h.
6647 (default_print_insn): New function.
6648 * arch-utils.h (default_print_insn): Declare.
6649 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6650 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6651 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6652 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6653 * frv-tdep.c (frv_gdbarch_init): Likewise.
6654 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6655 * gdbarch.sh (print_insn): Use default_print_insn.
6656 * gdbarch.c: Regenerated.
6657 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6658 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6659 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6660 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6661 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6662 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6663 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6664 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6665 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6666 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6667 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6668 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6669 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6670 * mt-tdep.c (mt_gdbarch_init): Likewise.
6671 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6672 * nios2-tdep.c (nios2_print_insn): Remove.
6673 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6674 * rx-tdep.c (rx_gdbarch_init): Likewise.
6675 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6676 * score-tdep.c (score_print_insn): Remove.
6677 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6678 * sh-tdep.c (sh_gdbarch_init): Likewise.
6679 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6680 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6681 * tic6x-tdep.c (tic6x_print_insn): Remove.
6682 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6683 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6684 * v850-tdep.c (v850_gdbarch_init): Likewise.
6685 * vax-tdep.c (vax_gdbarch_init): Likewise.
6686 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6687 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6688
f7241d4f
JB
66892017-05-23 John Baldwin <jhb@FreeBSD.org>
6690
6691 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6692 (MIPS_FP0_REGNUM): Remove.
6693 (MIPS_FSR_REGNUM): Remove.
6694 (mips_fbsd_supply_fpregs): Use mips_regnum.
6695 (mips_fbsd_supply_gregs): Likewise.
6696 (mips_fbsd_collect_fpregs): Likewise.
6697 (mips_fbsd_collect_gregs): Likewise.
6698
d489d81d
JB
66992017-05-23 John Baldwin <jhb@FreeBSD.org>
6700
6701 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6702 (getpfpregs_supplies): New function.
6703 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6704 getfpregs_supplies.
6705 (mips_fbsd_store_inferior_registers): Likewise.
6706
e11b3cdc
PA
67072017-05-22 Pedro Alves <palves@redhat.com>
6708
6709 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6710 maintainer.
6711
0f068fb5
AH
67122017-05-22 Alan Hayward <alan.hayward@arm.com>
6713
6714 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6715 (store_register): Likewise.
6716 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6717 (get_decimal_float_return_value): Likewise.
6718 (do_ppc_sysv_return_value): Likewise.
6719 (ppc64_sysv_abi_push_integer): Likewise.
6720 (ppc64_sysv_abi_push_freg): Likewise.
6721 (ppc64_sysv_abi_return_value_base): Likewise.
6722 (ppc64_sysv_abi_return_value): Likewise.
6723 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6724 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6725 * rs6000-nat.c: Likewise.
6726 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6727 (rs6000_value_to_register): Likewise.
6728 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6729
e6cf65f2
TT
67302017-05-21 Tom Tromey <tom@tromey.com>
6731
6732 PR rust/21466:
6733 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6734 arrays as "[T]", not "[T; ]".
6735
43cc5389
TT
67362017-05-19 Tom Tromey <tom@tromey.com>
6737
6738 PR rust/21484:
6739 * rust-lang.c (exp_descriptor_rust): New function.
6740 (rust_language_defn): Use it.
6741 * p-lang.c (pascal_language_defn): Update.
6742 * opencl-lang.c (opencl_language_defn): Update.
6743 * objc-lang.c (objc_language_defn): Update.
6744 * m2-lang.c (m2_language_defn): Update.
6745 * language.h (struct language_defn)
6746 <la_watch_location_expression>: New member.
6747 * language.c (unknown_language_defn, auto_language_defn)
6748 (local_language_defn): Update.
6749 * go-lang.c (go_language_defn): Update.
6750 * f-lang.c (f_language_defn): Update.
6751 * d-lang.c (d_language_defn): Update.
6752 * c-lang.h (c_watch_location_expression): Declare.
6753 * c-lang.c (c_watch_location_expression): New function.
6754 (c_language_defn, cplus_language_defn, asm_language_defn)
6755 (minimal_language_defn): Use it.
6756 * breakpoint.c (watch_command_1): Call
6757 la_watch_location_expression.
6758 * ada-lang.c (ada_language_defn): Update.
6759
7a6e7fcc
RO
67602017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6761
6e7e1744
RO
6762 PR tui/21482
6763 * gdb_curses.h (NOMACROS): Define.
6764 (NCURSES_NOMACROS): Define.
6765
67662017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6767
6768 PR tui/21482
7a6e7fcc
RO
6769 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6770 arg to char *.
6771 * tui/tui-wingeneral.c (box_win): Likewise.
6772 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6773 (tui_show_source_line): Likewise.
6774 (tui_show_exec_info_content): Likewise.
6775
1933fd8e
VM
67762017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6777
6778 * sparc-tdep.c (sparc_structure_return_p)
6779 (sparc_arg_on_registers_p): New functions.
6780 (sparc32_store_arguments): Use them.
6781 * sparc64-tdep.c (sparc64_16_byte_align_p)
6782 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6783 Handle TYPE_CODE_ARRAY.
6784
21873064
YQ
67852017-05-17 Yao Qi <yao.qi@linaro.org>
6786
6787 * cli/cli-decode.c (add_alias_cmd): New function.
6788 * command.h (add_alias_cmd): Declare.
6789 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6790 instead call add_alias_cmd.
6791
2b351b19
PA
67922017-05-17 Pedro Alves <palves@redhat.com>
6793
6794 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6795 (nat_makefile_frag): ... this. All references updated.
6796 * configure.ac: Likewise.
6797 * configure.nat: Likewise. Enhance comments.
6798 * configure: Regenerate.
6799
5f2ad7a3
RO
68002017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6801
6802 * procfs.c (procfs_create_inferior): Change prototype to match
6803 definition.
6804
adf3dde5
EZ
68052017-05-13 Eli Zaretskii <eliz@gnu.org>
6806
6807 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6808 C++ compiler warning.
6809
6830f270
TT
68102017-05-12 Tom Tromey <tom@tromey.com>
6811
6812 PR rust/21483:
6813 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6814 recurse, just call value_struct_elt directly.
6815
68f2f2e3
TT
68162017-05-12 Tom Tromey <tom@tromey.com>
6817
6818 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6819 OP_RUST_ARRAY>: Fix.
6820
256afbc2
TT
68212017-05-12 Tom Tromey <tom@tromey.com>
6822
6823 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6824
94bb8dfe
YQ
68252017-05-09 Yao Qi <yao.qi@linaro.org>
6826
6827 * regcache.c: Include <forward_list>.
6828 (struct regcache_list): Remove.
6829 (current_regcache): Update.
6830 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6831 (regcache_thread_ptid_changed): Likewise.
6832 (registers_changed_ptid): Likewise.
6833 (current_regcache_size): Likewise.
6834
8248946c
YQ
68352017-05-09 Yao Qi <yao.qi@linaro.org>
6836
6837 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6838 (current_regcache_size): New function.
6839 (current_regcache_test): New function.
6840 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6841
313c5961
AH
68422017-05-08 Alan Hayward <alan.hayward@arm.com>
6843
6844 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6845 (print_gp_register_row): Use get_frame_register_value.
6846
27bfc1d1
AH
68472017-05-08 Alan Hayward <alan.hayward@arm.com>
6848
6849 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6850 (mips_supply_fpregset): Likewise.
6851 (mips64_supply_gregset): Likewise.
6852
146e6c5c
AH
68532017-05-08 Alan Hayward <alan.hayward@arm.com>
6854
6855 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6856 regcache->raw_supply_zeroed.
6857
e50f25ec
SDJ
68582017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6859
6860 * configure.nat: Rearrange 'case' statements to match
6861 host before cpu.
6862
21ea5acd
SDJ
68632017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6864
6865 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6866 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6867 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6868 "@nat_extra_makefile_frag@".
6869 (Makefile): Remove dependency on "@frags@".
6870 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6871 (data-directory/Makefile): Likewise.
6872 * config/aarch64/linux.mh: Deleted; moved contents to
6873 "gdb/configure.nat".
6874 * config/alpha/alpha-linux.mh: Likewise.
6875 * config/alpha/nbsd.mh: Likewise.
6876 * config/arm/linux.mh: Likewise.
6877 * config/arm/nbsdelf.mh: Likewise.
6878 * config/i386/cygwin.mh: Likewise.
6879 * config/i386/cygwin64.mh: Likewise.
6880 * config/i386/darwin.mh: Likewise.
6881 * config/i386/fbsd.mh: Likewise.
6882 * config/i386/fbsd64.mh: Likewise.
6883 * config/i386/go32.mh: Likewise.
6884 * config/i386/i386gnu.mh: Likewise.
6885 * config/i386/i386sol2.mh: Likewise.
6886 * config/i386/linux.mh: Likewise.
6887 * config/i386/linux64.mh: Likewise.
6888 * config/i386/mingw.mh: Likewise.
6889 * config/i386/mingw64.mh: Likewise.
6890 * config/i386/nbsd64.mh: Likewise.
6891 * config/i386/nbsdelf.mh: Likewise.
6892 * config/i386/nto.mh: Likewise.
6893 * config/i386/obsd.mh: Likewise.
6894 * config/i386/obsd64.mh: Likewise.
6895 * config/i386/sol2-64.mh: Likewise.
6896 * config/ia64/linux.mh: Likewise.
6897 * config/m32r/linux.mh: Likewise.
6898 * config/m68k/linux.mh: Likewise.
6899 * config/m68k/nbsdelf.mh: Likewise.
6900 * config/m68k/obsd.mh: Likewise.
6901 * config/m88k/obsd.mh: Likewise.
6902 * config/mips/fbsd.mh: Likewise.
6903 * config/mips/linux.mh: Likewise.
6904 * config/mips/nbsd.mh: Likewise.
6905 * config/mips/obsd64.mh: Likewise.
6906 * config/pa/linux.mh: Likewise.
6907 * config/pa/nbsd.mh: Likewise.
6908 * config/pa/obsd.mh: Likewise.
6909 * config/powerpc/aix.mh: Likewise.
6910 * config/powerpc/fbsd.mh: Likewise.
6911 * config/powerpc/linux.mh: Likewise.
6912 * config/powerpc/nbsd.mh: Likewise.
6913 * config/powerpc/obsd.mh: Likewise.
6914 * config/powerpc/ppc64-linux.mh: Likewise.
6915 * config/powerpc/spu-linux.mh: Likewise.
6916 * config/s390/linux.mh: Likewise.
6917 * config/sh/nbsd.mh: Likewise.
6918 * config/sparc/fbsd.mh: Likewise.
6919 * config/sparc/linux.mh: Likewise.
6920 * config/sparc/linux64.mh: Likewise.
6921 * config/sparc/nbsd64.mh: Likewise.
6922 * config/sparc/nbsdelf.mh: Likewise.
6923 * config/sparc/obsd64.mh: Likewise.
6924 * config/sparc/sol2.mh: Likewise.
6925 * config/tilegx/linux.mh: Likewise.
6926 * config/vax/nbsdelf.mh: Likewise.
6927 * config/vax/obsd.mh: Likewise.
6928 * config/xtensa/linux.mh: Likewise.
6929 * config/i386/i386gnu.mn: New file, with excerpts from
6930 "config/i386/i386gnu.mh".
6931 * configure: Regenerate.
6932 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6933 *.mh files under "gdb/config".
6934 * configure.nat: New file, with contents from the
6935 "gdb/config/*/*.mh" files.
6936
7ed1acaf
TW
69372017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6938
6939 * btrace.c (btrace_clear): Free insn vector.
6940
e13cb306
PA
69412017-05-05 Pedro Alves <palves@redhat.com>
6942
6943 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6944 * configure: Regenerate.
6945
5ed8105e
PA
69462017-05-04 Pedro Alves <palves@redhat.com>
6947
6948 * Makefile.in (SFILES): Add progspace-and-thread.c.
6949 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6950 (COMMON_OBS): Add progspace-and-thread.o.
6951 * breakpoint.c: Include "progspace-and-thread.h".
6952 (update_inserted_breakpoint_locations)
6953 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6954 Use scoped_restore_current_pspace_and_thread.
6955 (create_std_terminate_master_breakpoint): Use
6956 scoped_restore_current_program_space.
6957 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6958 (print_breakpoint_location): Use
6959 scoped_restore_current_program_space.
6960 (bp_loc_is_permanent): Use
6961 scoped_restore_current_pspace_and_thread.
6962 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6963 (download_tracepoint_locations): Use
6964 scoped_restore_current_pspace_and_thread.
6965 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6966 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6967 (enum step_over_calls_kind): Moved from inferior.h.
6968 (class scoped_restore_current_thread): New class.
6969 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6970 declaration.
6971 (scoped_restore_current_thread): New class.
6972 * infcmd.c: Include "common/gdb_optional.h".
6973 (continue_1, proceed_after_attach): Use
6974 scoped_restore_current_thread.
6975 (notice_new_inferior): Use scoped_restore_current_thread.
6976 * inferior.c: Include "progspace-and-thread.h".
6977 (restore_inferior, save_current_inferior): Delete.
6978 (add_inferior_command, clone_inferior_command): Use
6979 scoped_restore_current_pspace_and_thread.
6980 * inferior.h (scoped_restore_current_inferior): New class.
6981 * infrun.c: Include "progspace-and-thread.h" and
6982 "common/gdb_optional.h".
6983 (follow_fork_inferior): Use
6984 scoped_restore_current_pspace_and_thread.
6985 (scoped_restore_exited_inferior): New class.
6986 (handle_vfork_child_exec_or_exit): Use
6987 scoped_restore_exited_inferior,
6988 scoped_restore_current_pspace_and_thread,
6989 scoped_restore_current_thread and scoped_restore.
6990 (fetch_inferior_event): Use scoped_restore_current_thread.
6991 * linespec.c (decode_line_full, decode_line_1): Use
6992 scoped_restore_current_program_space.
6993 * mi/mi-main.c: Include "progspace-and-thread.h".
6994 (exec_continue): Use scoped_restore_current_thread.
6995 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6996 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6997 * proc-service.c (ps_pglobal_lookup): Use
6998 scoped_restore_current_program_space.
6999 * progspace-and-thread.c: New file.
7000 * progspace-and-thread.h: New file.
7001 * progspace.c (release_program_space, clone_program_space): Use
7002 scoped_restore_current_program_space.
7003 (restore_program_space, save_current_program_space)
7004 (save_current_space_and_thread): Delete.
7005 (switch_to_program_space_and_thread): Moved to
7006 progspace-and-thread.c.
7007 * progspace.h (save_current_program_space)
7008 (save_current_space_and_thread): Delete declarations.
7009 (scoped_restore_current_program_space): New class.
7010 * remote.c (remote_btrace_maybe_reopen): Use
7011 scoped_restore_current_thread.
7012 * symtab.c: Include "progspace-and-thread.h".
7013 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7014 * thread.c (print_thread_info_1): Use
7015 scoped_restore_current_thread.
7016 (struct current_thread_cleanup): Delete.
7017 (do_restore_current_thread_cleanup)
7018 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7019 (scoped_restore_current_thread::~scoped_restore_current_thread):
7020 ... this new dtor.
7021 (make_cleanup_restore_current_thread): Rename/convert to ...
7022 (scoped_restore_current_thread::scoped_restore_current_thread):
7023 ... this new ctor.
7024 (thread_apply_all_command): Use scoped_restore_current_thread.
7025 (thread_apply_command): Use scoped_restore_current_thread.
7026 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7027 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7028
f6223dbb
PA
70292017-05-04 Pedro Alves <palves@redhat.com>
7030
7031 * thread.c (make_cleanup_restore_current_thread): Move
7032 find_thread_ptid call before the is_stopped call. Assert that the
7033 thread is found. Replace is_stopped call by checking the thread's
7034 state directly. Remove unnecessary NULL-thread check.
7035
3c3ae77e
PA
70362017-05-04 Pedro Alves <palves@redhat.com>
7037
7038 * corelow.c (thread_section_name): New class.
7039 (get_core_register_section, get_core_siginfo): Use it.
7040
45eba0ab
AA
70412017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
7042
7043 * corelow.c (sniff_core_bfd): Remove extra semicolon.
7044 (get_core_register_section): Remove xfree of NULL pointer.
7045
f81fdd35
AH
70462017-05-03 Alan Hayward <alan.hayward@arm.com>
7047
7048 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7049 * regcache.c (regcache::raw_supply_zeroed): New function.
7050 * regcache.h (regcache::raw_supply_zeroed): New declaration.
7051
35837774
SM
70522017-05-03 Simon Marchi <simon.marchi@ericsson.com>
7053
7054 * gdbarch.sh: Remove commented out definition of
7055 TARGET_CHAR_BIT.
7056 * gdbarch.h: Re-generate.
7057
c94fee56
SDJ
70582017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7059
7060 * configure: Regenerate.
7061
d17f7b36
SM
70622017-05-02 Simon Marchi <simon.marchi@ericsson.com>
7063
7064 * solib-target.c (solib_target_relocate_section_addresses):
7065 Remove num_section_bases, num_bases, segment_bases variables.
7066
b560ebd6
SM
70672017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7068
7069 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7070
f2f46dfc
SM
70712017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7072
7073 * solib-target.c: Include <vector>
7074 (struct lm_info_target) <~lm_info_target>: Remove.
7075 <segment_bases, section_bases>: Change type to
7076 std::vector<CORE_ADDR>.
7077 (library_list_start_segment, library_list_start_section,
7078 library_list_end_library,
7079 solib_target_relocate_section_addresses): Adjust.
7080
a0ff9e1a
SM
70812017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7082
7083 * gdbarch.sh (software_single_step): Change return type to
7084 std::vector<CORE_ADDR>.
7085 * gdbarch.c, gdbarch.h: Re-generate.
7086 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7087 Adjust.
7088 (arm_deal_with_atomic_sequence_raw): Adjust.
7089 (thumb_get_next_pcs_raw): Adjust.
7090 (arm_get_next_pcs_raw): Adjust.
7091 (arm_get_next_pcs): Adjust.
7092 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7093 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7094 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7095 (alpha_software_single_step): Adjust.
7096 * alpha-tdep.h (alpha_software_single_step): Adjust.
7097 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7098 * arm-tdep.c (arm_software_single_step): Adjust.
7099 (arm_breakpoint_kind_from_current_state): Adjust.
7100 * arm-tdep.h (arm_software_single_step): Adjust.
7101 * breakpoint.c (insert_single_step_breakpoint): Adjust.
7102 * cris-tdep.c (cris_software_single_step): Adjust.
7103 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7104 (micromips_deal_with_atomic_sequence): Adjust.
7105 (deal_with_atomic_sequence): Adjust.
7106 (mips_software_single_step): Adjust.
7107 * mips-tdep.h (mips_software_single_step): Adjust.
7108 * moxie-tdep.c (moxie_software_single_step): Adjust.
7109 * nios2-tdep.c (nios2_software_single_step): Adjust.
7110 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7111 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7112 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7113 * s390-linux-tdep.c (s390_software_single_step): Adjust.
7114 * sparc-tdep.c (sparc_software_single_step): Adjust.
7115 * spu-tdep.c (spu_software_single_step): Adjust.
7116 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7117
ea480a30
SM
71182017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7119
7120 * gdbarch.sh: Use semi-colon as field separator instead of colon.
7121 * gdbarch.h: Re-generate.
7122
d050f7d7
TW
71232017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7124
7125 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7126 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7127 * python/py-instruction.c, python/py-instruction.h: New file.
7128 * python/py-record.c: Add py-instruction.h include.
7129 (gdbpy_initialize_record): Make gdb.Instruction a super class of
7130 gdb.RecordInstruction.
7131 * python/python-internal.h: Add gdbpy_initialize_instruction
7132 declaration.
7133 * python/python.c (do_start_initialization): Add
7134 gdbpy_initialize_instruction.
7135
14f819c8
TW
71362017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7137
7138 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7139 Remove.
7140 (btrace_func_from_recpy_func): New function.
7141 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7142 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7143 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7144 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7145 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7146 Also, use new helper functions.
7147 (btpy_list_item): Use new helper functions.
7148 (recpy_bt_function_call_history): Use new type name.
7149 (btpy_call_getset): Remove.
7150 (gdbpy_initialize_btrace): Remove code to initialize
7151 gdb.BtraceFunctionCall.
7152 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7153 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7154 recpy_bt_func_prev, recpy_bt_func_next): New export.
7155 * python/py-record.c (recpy_func_type): New static object.
7156 (recpy_func_new, recpy_func_level, recpy_func_symbol,
7157 recpy_func_instructions, recpy_func_up, recpy_func_prev,
7158 recpy_func_next): New function.
7159 (recpy_element_hash, recpy_element_richcompare): Updated comment.
7160 (recpy_func_getset): New static object.
7161 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7162 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7163
0ed5da75
TW
71642017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7165
7166 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7167 (btpy_object, btpy_insn_type, btpy_new): Remove.
7168 (btpy_list_object): Use gdb.RecordInstruction type instead of
7169 gdb.BtraceInstruction type.
7170 (btrace_insn_from_recpy_insn): New function.
7171 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7172 btpy_new.
7173 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7174 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7175 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7176 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7177 instead of btpy_object.
7178 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7179 btpy_insn_data, btpy_insn_decode): Rename to ...
7180 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7181 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7182 recpy_bt_insn_decode): This. Also, use new helper functions.
7183 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7184 recpy_insn_type.
7185 (btpy_insn_getset): Remove.
7186 (gdbpy_initialize_btrace): Remove code to initialize
7187 gdb.BtraceInstruction. Use recpy_element_object.
7188 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7189 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7190 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7191 * python/py-record.c (recpy_insn_type): New static object.
7192 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7193 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7194 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7195 New function.
7196 (recpy_insn_getset): New static object.
7197 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7198 * python/py-record.h (recpy_element_object): New typedef.
7199 (recpy_insn_type, recpy_insn_new): New export.
7200
913aeadd
TW
72012017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7202
7203 * py-record-btrace.c (btpy_insn_new): Removed.
7204 (btpy_insn_or_gap_new): New function.
7205 (btpy_insn_error): Removed.
7206 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7207 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7208 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7209 btpy_insn_or_gap_new instead of btpy_insn_new.
7210 (btpy_insn_getset): Remove btpy_insn_error.
7211 * py-record.c (recpy_gap_type): New static object.
7212 (recpy_gap_object): New typedef.
7213 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7214 recpy_gap_reason_string): New function.
7215 (recpy_gap_getset): New static object.
7216 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7217 * py-record.h (recpy_gap_new): New export.
7218
a3be24ad
TW
72192017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7220
7221 * python/py-record.c (recpy_ptid): Remove.
7222 (recpy_record_getset): Remove recpy_ptid.
7223
ae20e79a
TW
72242017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7225
7226 * btrace.c (btrace_fetch): Set inferior_ptid.
7227 * python/py-record-btrace.c: Add "py-record.h" include.
7228 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7229 recpy_bt_end, recpy_bt_instruction_history,
7230 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7231 in gdb.Record object instead of current ptid.
7232 * python/py-record.c: Include new "py-record.h" file.
7233 (recpy_record_object): Moved to py-record.h.
7234 * python/py-record.h: New file.
7235
8d0050ea
TW
72362017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7237
7238 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7239 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7240 indentation.
7241
3f380b50
JB
72422017-05-01 Joel Brobecker <brobecker@adacore.com>
7243
7244 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7245 the past maintainers section.
7246
07495424
YQ
72472017-04-28 Yao Qi <yao.qi@linaro.org>
7248
7249 * infcmd.c (get_return_value): Use regcache ctor, and remove
7250 cleanup.
7251
deb1fa3e
YQ
72522017-04-28 Yao Qi <yao.qi@linaro.org>
7253 Pedro Alves <palves@redhat.com>
7254
7255 * regcache.c (regcache::regcache): New tag dispatch ctor.
7256 (do_cooked_read): Moved above.
7257 (regcache_dup): Use the tag dispatch ctor..
7258 * regcache.h (regcache): Declare ctor, delete copy ctor and
7259 assignment operator, remove friend regcache_dup.
7260
b421c83c
YQ
72612017-04-28 Yao Qi <yao.qi@linaro.org>
7262
7263 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7264 call method save instead of regcache_cpy.
7265 * regcache.h (struct regcache): Make regcache_dup a friend.
7266
ef79d9a3
YQ
72672017-04-28 Yao Qi <yao.qi@linaro.org>
7268
7269 * regcache.c (struct regcache): Move to regcache.h
7270 (regcache::arch): New method.
7271 (regcache_get_ptid): Update.
7272 (get_regcache_arch): Call arch method.
7273 (get_regcache_aspace): Call method aspace.
7274 (register_buffer): Change it to method.
7275 (regcache_save): Change it to regcache::save.
7276 (regcache_restore): Likewise.
7277 (regcache_cpy_no_passthrough): Remove the declaration.
7278 (regcache_cpy): Call methods restore and cpy_no_passthrough.
7279 (regcache_cpy_no_passthrough): Change it to method
7280 cpy_no_passthrough.
7281 (regcache_register_status): Change it to method
7282 get_register_status.
7283 (regcache_invalidate): Change it to method invalidate.
7284 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7285 (regcache_raw_update): Change it to method raw_update.
7286 (regcache_raw_read): Likewise.
7287 (regcache_raw_read_signed): Likewise.
7288 (regcache_raw_read_unsigned): Likewise.
7289 (regcache_raw_write_signed): Likewise.
7290 (regcache_raw_write_unsigned): Likewise.
7291 (regcache_cooked_read): Likewise.
7292 (regcache_cooked_read_value): Likewise.
7293 (regcache_cooked_read_signed): Likewise.
7294 (regcache_cooked_read_unsigned): Likewise.
7295 (regcache_cooked_write_signed): Likewise.
7296 (regcache_cooked_write_unsigned): Likewise.
7297 (regcache_raw_set_cached_value): Likewise.
7298 (regcache_raw_write): Likewise.
7299 (regcache_cooked_write): Likewise.
7300 (regcache_xfer_part): Likewise.
7301 (regcache_raw_read_part): Likewise.
7302 (regcache_raw_write_part): Likewise.
7303 (regcache_cooked_read_part): Likewise.
7304 (regcache_cooked_write_part): Likewise.
7305 (regcache_raw_supply): Likewise.
7306 (regcache_raw_collect): Likewise.
7307 (regcache_transfer_regset): Likewise.
7308 (regcache_supply_regset): Likewise.
7309 (regcache_collect_regset): Likewise.
7310 (regcache_debug_print_register): Likewise.
7311 (enum regcache_dump_what): Move it to regcache.h.
7312 (regcache_dump): Change it to method dump.
7313 * regcache.h (enum regcache_dump_what): New.
7314 (class regcache): New.
7315 * target.c (target_fetch_registers): Call method
7316 debug_print_register.
7317 (target_store_registers): Likewise.
7318
f8fdb78e
SM
73192017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7320
7321 * windows-nat.c (struct lm_info_windows): Initialize field.
7322 (windows_make_so): Allocate lm_info_windows with new.
7323 (windows_free_so): Free lm_info_windows with delete.
7324
9ccbfd7b
SM
73252017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7326
7327 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7328 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7329 cleanup.
7330 (darwin_free_so): Free lm_info_darwin with delete.
7331
76e75227
SM
73322017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7333
7334 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7335 <l_addr_p>: Change type to bool.
7336 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7337 (svr4_free_so): Free lm_info_svr4 with delete.
7338 (svr4_copy_library_list): Replace memcpy with call to copy
7339 constructor.
7340 (library_list_start_library, svr4_default_sos): Allocate
7341 lm_info_svr4 with new.
7342
51046d9e
SM
73432017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7344
7345 * solib-target.c (struct lm_info_target): Add destructor,
7346 initialize fields.
7347 <name>: Change type to std::string.
7348 (library_list_start_library): Allocate lm_info_target with new.
7349 (solib_target_free_library_list): Free lm_info_target with
7350 delete.
7351 (solib_target_current_sos): Adapt to std::string.
7352 (solib_target_free_so): Free lm_info_target with delete.
7353
4023ae76
SM
73542017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7355
7356 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7357 fields.
7358 (frv_current_sos): Allocate lm_info_frv with new.
7359 (frv_relocate_main_executable): Free lm_info_frv with delete,
7360 allocate with new.
7361 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7362
af43057b
SM
73632017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7364
7365 * solib-frv.c (struct lm_info_frv): Fix indentation.
7366
b0911207
SM
73672017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7368
7369 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7370 map field.
7371 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7372 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7373 and allocate with new.
7374 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7375
6c401f72
SM
73762017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7377
7378 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7379 <filename, member_name>: Change type to std::string.
7380 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7381 (library_list_start_library): Allocate lm_info_aix with new.
7382 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7383 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7384 with copy constructor.
7385
d0e449a1
SM
73862017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7387
7388 * solist.h (struct lm_info): Remove.
7389 (struct lm_info_base): New class.
7390 (struct so_list) <lm_info>: Change type to lm_info_base *.
7391 * nto-tdep.c (struct lm_info): Remove.
7392 (lm_addr): Adjust.
7393 * solib-aix.c (struct lm_info): Rename to ...
7394 (struct lm_info_aix): ... this. Extend lm_info_base.
7395 (lm_info_p): Rename to ...
7396 (lm_info_aix_p): ... this, and adjust.
7397 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7398 solib_aix_parse_libraries, library_list_start_library,
7399 solib_aix_free_library_list, solib_aix_parse_libraries,
7400 solib_aix_get_library_list,
7401 solib_aix_relocate_section_addresses, solib_aix_free_so,
7402 solib_aix_get_section_offsets,
7403 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7404 Adjust.
7405 (struct solib_aix_inferior_data) <library_list>: Adjust.
7406 * solib-darwin.c (struct lm_info): Rename to ...
7407 (struct lm_info_darwin): ... this. Extend lm_info_base.
7408 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7409 * solib-dsbt.c (struct lm_info): Rename to ...
7410 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7411 (struct dsbt_info) <main_executable_lm_info): Adjust.
7412 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7413 dsbt_relocate_section_addresses): Adjust.
7414 * solib-frv.c (struct lm_info): Rename to ...
7415 (struct lm_info_frv): ... this. Extend lm_info_base.
7416 (main_executable_lm_info): Adjust.
7417 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7418 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7419 find_canonical_descriptor_in_load_object,
7420 frv_fdpic_find_canonical_descriptor): Adjust.
7421 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7422 to lm_info_svr4.
7423 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7424 svr4_clear_so, svr4_copy_library_list,
7425 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7426 svr4_current_sos, svr4_fetch_objfile_link_map,
7427 solist_update_incremental): Adjust.
7428 * solib-svr4.h (struct lm_info_svr4): Move here from
7429 solib-svr4.c.
7430 * solib-target.c (struct lm_info): Rename to ...
7431 (struct lm_info_target): ... this. Extend lm_info_base.
7432 (lm_info_p): Rename to ...
7433 (lm_info_target_p): ... this.
7434 (solib_target_parse_libraries, library_list_start_segment,
7435 library_list_start_section, library_list_start_library,
7436 library_list_end_library, solib_target_free_library_list,
7437 solib_target_current_sos, solib_target_free_so,
7438 solib_target_relocate_section_addresses): Adjust.
7439 * windows-nat.c (struct lm_info): Rename to ...
7440 (struct lm_info_windows): ... this. Extend lm_info_base.
7441 (windows_make_so, handle_load_dll, handle_unload_dll,
7442 windows_xfer_shared_libraries): Adjust.
7443
434a4023
SM
74442017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7445
7446 * solib-darwin.c (struct darwin_so_list): Remove.
7447 (darwin_current_sos): Allocate an so_list object instead of a
7448 darwin_so_list, separately allocate an lm_info object.
7449 (darwin_free_so): Free lm_info.
7450
428544e8
JB
74512017-04-28 John Baldwin <jhb@FreeBSD.org>
7452
7453 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7454 with fprintf_filtered.
7455
4621115f
YQ
74562017-04-28 Yao Qi <yao.qi@linaro.org>
7457
7458 * regcache.c (regcache::regcache): New function.
7459 (regcache::~regcache): New function.
7460 (regcache_xmalloc_1): Remove.
7461 (regcache_xmalloc): Call new regcache.
7462 (regcache_xfree): Call delete regcache.
7463 (get_thread_arch_aspace_regcache): Call new regcache.
7464
339053c2
YQ
74652017-04-28 Yao Qi <yao.qi@linaro.org>
7466
7467 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7468 lwp instead of ptid_get_lwp.
7469
7974a605
YQ
74702017-04-28 Yao Qi <yao.qi@linaro.org>
7471
7472 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7473 lwp_info instead of getting from inferior_ptid.
7474
e15c3eb4
KS
74752017-04-27 Keith Seitz <keiths@redhat.com>
7476
7477 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7478 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7479 (CV_CONVERSION_BADNESS): Define.
7480 (rank_one_type): Remove overly restrictive rvalue reference
7481 rank checks.
7482 Add cv-qualifier checks and subranks for type equality.
7483 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7484 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7485 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7486
72bc1d24
SM
74872017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7488
7489 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7490 count when creating the object.
7491
55bcecda
UW
74922017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7493 Ulrich Weigand <uweigand@de.ibm.com>
7494
7495 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7496 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7497 is used in AIX.
7498 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7499 (process_xcoff_symbol): Likewise.
7500 (scan_xcoff_symtab): Likewise.
7501
5c99fcf8
AH
75022017-04-26 Alan Hayward <alan.hayward@arm.com>
7503
7504 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7505 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7506 (ia64_access_reg): Use get_frame_register_unsigned.
7507 (ia64_access_rse_reg): Likewise.
7508 (ia64_libunwind_frame_prev_register): Likewise.
7509
b41c5a85
JW
75102017-04-26 Jiong Wang <jiong.wang@arm.com>
7511
7512 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7513 * gdbarch.c: Regenerated.
7514 * gdbarch.h: Regenerated.
7515 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7516 visibility external.
7517 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7518 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7519 (enum cfa_how_kind): Move to ...
7520 (struct dwarf2_frame_state_reg_info): Likewise.
7521 (struct dwarf2_frame_state): Likewise.
7522 * dwarf2-frame.h: ... here.
7523 (dwarf2_frame_state_alloc_regs): New declaration.
7524 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7525 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7526
c185f580
AH
75272017-04-26 Alan Hayward <alan.hayward@arm.com>
7528
7529 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7530 regcache_raw_read_unsigned.
7531 (xtensa_pseudo_register_write): Likewise.
7532
19c45594
AH
75332017-04-26 Alan Hayward <alan.hayward@arm.com>
7534
7535 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7536 (nds32_pseudo_register_write): Likewise.
7537
4658f12e
YQ
75382017-04-25 Yao Qi <yao.qi@linaro.org>
7539
7540 * regcache.c (struct regcache) <readonly_p>: Change its type
7541 to bool.
7542 (regcache_xmalloc_1): Update parameter type and callers update.
7543
d581dda8
YQ
75442017-04-25 Yao Qi <yao.qi@linaro.org>
7545
7546 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7547 set_gdbarch_wchar_bit.
7548 * arm-tdep.c (arm_gdbarch_init): Likewise.
7549
debed3db
PA
75502017-04-25 Pedro Alves <palves@redhat.com>
7551
7552 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7553 (BothAreRelocatable, memcopy, memmove): Don't define.
7554 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7555 macros.
7556
b0b92aeb
PA
75572017-04-25 Pedro Alves <palves@redhat.com>
7558
7559 * common/common-defs.h: Include "common/poison.h".
7560 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7561 and adjust.
7562 * common/poison.h: New file.
7563 * common/traits.h: Include <type_traits>.
7564 (Not, Or, Requires): New, moved from common/function-view.h.
7565
16c4d54a
PA
75662017-04-25 Pedro Alves <palves@redhat.com>
7567
7568 * breakpoint.h (struct breakpoint): In-class initialize all
7569 fields. Make boolean fields "bool".
7570 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7571 memset call and initializations no longer necessary.
7572
b5c36682
PA
75732017-04-25 Pedro Alves <palves@redhat.com>
7574
7575 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7576 reference.
7577 (pt_btrace_insn): New function.
7578 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7579
5625a286
PA
75802017-04-25 Pedro Alves <palves@redhat.com>
7581
7582 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7583 "base" field and inherit from "bp_location" instead. Add
7584 non-default ctor.
7585 (allocate_location_exception): Use new non-default ctor.
7586 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7587 (init_bp_location): Convert to ...
7588 (bp_location::bp_location): ... this new ctor, and remove memset
7589 call.
7590 (base_breakpoint_allocate_location): Use the new non-default ctor.
7591 * breakpoint.h (bp_location): Now a class. Declare default and
7592 non-default ctors. In-class initialize all members.
7593 (init_bp_location): Remove declaration.
7594
23bcc18f
PA
75952017-04-25 Pedro Alves <palves@redhat.com>
7596
7597 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7598 assignment operator.
7599
e1ba3053
YQ
76002017-04-24 Yao Qi <yao.qi@linaro.org>
7601
7602 * doublest.c (convert_doublest_to_floatformat): Call
7603 floatformat_totalsize_bytes.
7604
10f489e5
TT
76052017-04-22 Tom Tromey <tom@tromey.com>
7606
7607 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7608 ui_out_emit_list.
7609 * stack.c (print_frame): Use ui_out_emit_list.
7610 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7611 ui_out_emit_list.
7612 * mi/mi-main.c (print_one_inferior)
7613 (mi_cmd_data_list_register_names)
7614 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7615 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7616 ui_out_emit_list.
7617 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7618 (mi_output_solib_attribs): Use ui_out_emit_list,
7619 ui_out_emit_tuple.
7620 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7621 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7622 (mi_cmd_stack_list_args, list_args_or_locals): Use
7623 ui_out_emit_list.
7624 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7625 * breakpoint.c (print_solib_event, output_thread_groups): Use
7626 ui_out_emit_list.
7627
0092b74d
TT
76282017-04-22 Tom Tromey <tom@tromey.com>
7629
7630 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7631 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7632 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7633
a14a62dd
TT
76342017-04-22 Tom Tromey <tom@tromey.com>
7635
7636 * tracepoint.c (tvariables_info_1)
7637 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7638
46b9c129
TT
76392017-04-22 Tom Tromey <tom@tromey.com>
7640
7641 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7642 annotate_arg_emitter.
7643 * breakpoint.c (print_mention_watchpoint)
7644 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7645 * annotate.h (struct annotate_arg_emitter): New.
7646
2e783024
TT
76472017-04-22 Tom Tromey <tom@tromey.com>
7648
7649 * record-btrace.c (record_btrace_insn_history)
7650 (record_btrace_insn_history_range, record_btrace_call_history)
7651 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7652 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7653 ui_out_emit_tuple.
7654 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7655 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7656 * skip.c (skip_info): Use ui_out_emit_tuple.
7657 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7658 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7659 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7660 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7661 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7662 ui_out_emit_tuple.
7663 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7664 (output_register, mi_cmd_data_read_memory)
7665 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7666 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7667 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7668 Use ui_out_emit_tuple.
7669 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7670 ui_out_emit_tuple.
7671 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7672 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7673 * linux-thread-db.c (info_auto_load_libthread_db): Use
7674 ui_out_emit_tuple.
7675 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7676 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7677 * disasm.c (do_mixed_source_and_assembly_deprecated)
7678 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7679 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7680 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7681 * breakpoint.c (print_one_breakpoint_location)
7682 (print_one_breakpoint): Use ui_out_emit_tuple.
7683 * auto-load.c (print_script, info_auto_load_cmd): Use
7684 ui_out_emit_tuple.
7685 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7686
9be21bb4
SM
76872017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7688
7689 * thread.c (print_thread_info_1): Remove dead code.
7690
0d4c07af
JK
76912017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7692
7693 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7694 GDB_SELF_TEST.
7695 * arm-tdep.c (selftests::arm_record_test): Likewise.
7696
4daf993d
YQ
76972017-04-21 Yao Qi <yao.qi@linaro.org>
7698
7699 * regcache.c (regcache_restore): Remove argument 2. Replace
7700 argument 3 with regcache. Get register status from
7701 src->register_status and get register contents from
7702 register_buffer (src, regnum).
7703 (regcache_cpy): Update.
7704
a6c21d4a
PA
77052017-04-19 Pedro Alves <palves@redhat.com>
7706
7707 * gdbthread.h (thread): Add missing closing parenthesis in
7708 comment.
7709
3a3fd0fd
PA
77102017-04-19 Pedro Alves <palves@redhat.com>
7711
7712 * common/refcounted-object.h: New file.
7713 * gdbthread.h: Include "common/refcounted-object.h".
7714 (thread_info): Inherit from refcounted_object and add comments.
7715 (thread_info::incref, thread_info::decref)
7716 (thread_info::m_refcount): Delete.
7717 (thread_info::deletable): Use the refcounted_object::refcount()
7718 method.
7719 * inferior.c (current_inferior_): Add comment.
7720 (set_current_inferior): Increment/decrement refcounts.
7721 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7722 not-deletable instead of comparing with the current inferior.
7723 (initialize_inferiors): Increment the initial inferior's refcount.
7724 * inferior.h (struct inferior): Forward declare.
7725 Include "common/refcounted-object.h".
7726 (current_inferior, set_current_inferior): Move declaration to
7727 before struct inferior's definition, and fix comment.
7728 (inferior): Inherit from refcounted_object. Add comments.
7729 * thread.c (switch_to_thread_no_regs): Reference the thread's
7730 inferior pointer directly instead of doing a ptid lookup.
7731 (switch_to_no_thread): New function.
7732 (switch_to_thread(thread_info *)): New function, factored out
7733 from ...
7734 (switch_to_thread(ptid_t)): ... this.
7735 (restore_current_thread): Delete.
7736 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7737 fields, and add 'inf' field.
7738 (do_restore_current_thread_cleanup): Check whether old->inf is
7739 alive instead of looking up an inferior by ptid. Use
7740 switch_to_thread and switch_to_no_thread.
7741 (restore_current_thread_cleanup_dtor): Use old->inf directly
7742 instead of lookup up an inferior by id. Decref the inferior.
7743 Don't restore 'removable'.
7744 (make_cleanup_restore_current_thread): Same the inferior pointer
7745 in old, instead of the inferior number. Incref the inferior.
7746 Don't save/clear 'removable'.
7747
9bcb1f16
PA
77482017-04-19 Pedro Alves <palves@redhat.com>
7749
7750 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7751 unittests/scoped_restore-selftests.c.
7752 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7753 * common/scoped_restore.h (scoped_restore_base): Make "class".
7754 (scoped_restore_base::release): New public method.
7755 (scoped_restore_base::scoped_restore_base): New protected ctor.
7756 (scoped_restore_base::m_saved_var): New protected field.
7757 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7758 scoped_restore_base base class instead of m_saved_var directly.
7759 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7760 (scoped_restore_tmpl::scoped_restore_tmpl(const
7761 scoped_restore_tmpl<T>&)): Likewise.
7762 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7763 method.
7764 (scoped_restore_tmpl::saved_var): New method.
7765 (scoped_restore_tmpl::m_saved_var): Delete.
7766 * inferior.h (inferior::detaching): Now a bool.
7767 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7768 cleanup.
7769 * unittests/scoped_restore-selftests.c: New file.
7770
26fcd539
PA
77712017-04-19 Pedro Alves <palves@redhat.com>
7772
7773 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7774 Re-sort in alphabetic order.
7775
fdd243b0
PA
77762017-04-18 Pedro Alves <palves@redhat.com>
7777
7778 * xml-support.c (obstack_xml_printf): Delete.
7779 * xml-support.h (obstack_xml_printf): Delete.
7780
4895cde2
PA
77812017-04-18 Pedro Alves <palves@redhat.com>
7782
7783 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7784 vdebug, verror, body_text, start_element, end_element, name,
7785 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7786 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7787 is_xinclude>: Make private and add m_ prefix.
7788 (gdb_xml_parser::body_text): New method, based on ...
7789 (gdb_xml_body_text): ... this. Adjust.
7790 (gdb_xml_parser::vdebug): New method, based on ...
7791 (gdb_xml_debug): ... this. Adjust.
7792 (gdb_xml_parser::verror): New method, based on ...
7793 (gdb_xml_error): ... this. Adjust.
7794 (gdb_xml_parser::start_element): New method, based on ...
7795 (gdb_xml_start_element): ... this. Adjust.
7796 (gdb_xml_start_element_wrapper): Defer to
7797 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7798 (gdb_xml_parser::end_element): New method, based on ...
7799 (gdb_xml_end_element_wrapper): ... this. Adjust.
7800 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7801 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7802 (gdb_xml_parser::use_dtd): New method, based on ...
7803 (gdb_xml_use_dtd): ... this. Adjust.
7804 (gdb_xml_parser::parse): New method, based on ...
7805 (gdb_xml_parse): ... this. Adjust.
7806 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7807 (xinclude_start_include): Adjust to call the parser's name method.
7808 (xml_xinclude_default, xml_xinclude_start_doctype)
7809 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7810 method.
7811 (xml_process_xincludes): Adjust to call parser methods.
7812 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7813 declarations.
7814
bd8a901f
PA
78152017-04-18 Pedro Alves <palves@redhat.com>
7816
7817 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7818 gdb::optional<std::string>.
7819 * xml-support.c: Include <string>.
7820 (scope_level::scope_level(scope_level &&))
7821 (scope_level::~scope_level): Delete.
7822 (scope_level::body): Now a std::string.
7823 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7824 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7825 parameter.
7826 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7827 (xinclude_parsing_data::output): Now a std::string reference.
7828 (xinclude_start_include): Adjust.
7829 (xml_xinclude_default): Adjust.
7830 (xml_process_xincludes): Add 'output' parameter, and return bool.
7831 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7832 and return bool.
7833 * xml-tdesc.c: Include <unordered_map> and <string>.
7834 (tdesc_xml_cache): Delete.
7835 (tdesc_xml_cache_s): Delete.
7836 (xml_cache): Now an std::unordered_map.
7837 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7838 (target_fetch_description_xml): Change return type to
7839 gdb::optional<std::string>, and adjust.
7840 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7841 (target_fetch_description_xml): Change return type to
7842 gdb::optional<std::string>.
7843
d35d1958
PA
78442017-04-18 Pedro Alves <palves@redhat.com>
7845
7846 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7847 unittests/optional-selftests.c.
7848 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7849 * unittests/optional-selftests.c: New file.
7850 * unittests/optional/assignment/1.cc: New file.
7851 * unittests/optional/assignment/2.cc: New file.
7852 * unittests/optional/assignment/3.cc: New file.
7853 * unittests/optional/assignment/4.cc: New file.
7854 * unittests/optional/assignment/5.cc: New file.
7855 * unittests/optional/assignment/6.cc: New file.
7856 * unittests/optional/assignment/7.cc: New file.
7857 * unittests/optional/cons/copy.cc: New file.
7858 * unittests/optional/cons/default.cc: New file.
7859 * unittests/optional/cons/move.cc: New file.
7860 * unittests/optional/cons/value.cc: New file.
7861 * unittests/optional/in_place.cc: New file.
7862 * unittests/optional/observers/1.cc: New file.
7863 * unittests/optional/observers/2.cc: New file.
7864
22796e97
PA
78652017-04-18 Pedro Alves <palves@redhat.com>
7866
7867 * common/gdb_optional.h: Include common/traits.h.
7868 (in_place_t): New type.
7869 (in_place): New constexpr variable.
7870 (optional::optional): Remove member initialization of
7871 m_instantiated.
7872 (optional::optional(in_place_t...)): New constructor.
7873 (optional::~optional): Use reset.
7874 (optional::optional(const optional&)): New.
7875 (optional::optional(const optional&&)): New.
7876 (optional::optional(T &)): New.
7877 (optional::optional(T &&)): New.
7878 (operator::operator=(const optional &)): New.
7879 (operator::operator=(optional &&)): New.
7880 (operator::operator= (const T &))
7881 (operator::operator= (T &&))
7882 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7883 (operator::reset): New.
7884 (operator::m_instantiated):: Add in-class initializer.
7885 * common/traits.h: Include <type_traits>.
7886 (struct And): New types.
7887
a7fc9b61
PA
78882017-04-18 Pedro Alves <palves@redhat.com>
7889
7890 * xml-support.c: Include <vector>.
7891 (scope_level::scope_level(const gdb_xml_element *))
7892 (scope_level::scope_level(scope_level&&)): New.
7893 (scope_level::~scope_level): New.
7894 (scope_level_s): Delete.
7895 (gdb_xml_parser::scopes): Now a std::vector.
7896 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7897 Use std::vector.
7898 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7899 scope cleanup code.
7900 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7901 of the scopes member. Use std::vector::emplace_back.
7902
010151c9
PA
79032017-04-18 Pedro Alves <palves@redhat.com>
7904
7905 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7906 a bool.
7907 (gdb_xml_end_element): Change type of first parameter.
7908 (gdb_xml_cleanup): Rename to ...
7909 (gdb_xml_parser::~gdb_xml_parser): ... this.
7910 (gdb_xml_create_parser_and_cleanup): Delete with ...
7911 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7912 to this new ctor.
7913 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7914 using gdb_xml_create_parser_and_cleanup.
7915 (xinclude_parsing_data): Add ctor/dtor.
7916 (xml_xinclude_cleanup): Delete.
7917 (xml_process_xincludes): Create a local xinclude_parsing_data
7918 instead of heap-allocating one. Create a local gdb_xml_parser
7919 instead of heap-allocating one with
7920 gdb_xml_create_parser_and_cleanup.
7921
d56060f0
JB
79222017-04-18 John Baldwin <jhb@FreeBSD.org>
7923
7924 PR threads/20743
7925 * fbsd-nat.c (resume_one_thread_cb): Remove.
7926 (resume_all_threads_cb): Remove.
7927 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7928 iterate_over_threads.
7929
305d16a9
JB
79302017-04-17 Joel Brobecker <brobecker@adacore.com>
7931
7932 * NEWS: Create a new section for the next release branch.
7933 Rename the section of the current branch, now that it has
7934 been cut.
7935
8bb57231
JB
79362017-04-17 Joel Brobecker <brobecker@adacore.com>
7937
7938 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7939 * version.in: Bump version to 8.0.50.DATE-git.
7940
096c92dd
SDJ
79412017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7942
7943 PR gdb/21385
7944 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7945 independently of the host, and fix build breakage on Cygwin.
7946
0550c955
PA
79472017-04-13 Pedro Alves <palves@redhat.com>
7948
7949 * inferior.c (free_inferior): Convert to ...
7950 (inferior::~inferior): ... this dtor.
7951 (inferior::inferior): New ctor, factored out from ...
7952 (add_inferior_silent): ... here. Allocate the inferior with a new
7953 expression.
7954 (delete_inferior): Call delete instead of free_inferior.
7955 * inferior.h (gdb_environ, continuation): Forward declare.
7956 (inferior): Now a class. Add in-class initialization to all
7957 members. Make boolean fields bool, except 'detaching'.
7958 (inferior::inferior): New explicit ctor.
7959 (inferior::~inferior): New.
7960
e3d60dfc
PA
79612017-04-13 Pedro Alves <palves@redhat.com>
7962
7963 * inferior.c (init_inferior_list): Delete.
7964 * inferior.h (init_inferior_list): Delete.
7965
5fd69d0a
PA
79662017-04-13 Pedro Alves <palves@redhat.com>
7967
7968 PR threads/13217
7969 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7970 (top level): Call it twice, with different thread sets.
7971
c6609450
PA
79722017-04-13 Pedro Alves <palves@redhat.com>
7973
7974 * thread.c: Include <algorithm>.
7975 (thread_array_cleanup): Delete.
7976 (scoped_inc_dec_ref): New class.
7977 (live_threads_count): New function.
7978 (set_thread_refcount): Delete.
7979 (tp_array_compar_ascending): Now a bool.
7980 (tp_array_compar): Convert to a std::sort comparison function.
7981 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7982 and live_threads_count.
7983
2a00d7ce
PA
79842017-04-13 Pedro Alves <palves@redhat.com>
7985
7986 * infrun.c (follow_fork_inferior): Also switch the current
7987 inferior.
7988
441d7c93
PA
79892017-04-13 Pedro Alves <palves@redhat.com>
7990
7991 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7992 before calling create_internal_breakpoint.
7993
808480f6
PA
79942017-04-13 Pedro Alves <palves@redhat.com>
7995
7996 * fork-child.c (execv_argv): New class.
7997 (breakup_args): Refactored as ...
7998 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7999 Copy arguments to storage and replace separators with NULL
8000 terminators in place.
8001 (escape_bang_in_quoted_argument): Adjust to return bool.
8002 (execv_argv::execv_argv): New ctor.
8003 (execv_argv::init_for_shell): New method, factored out from
8004 fork_inferior. Don't strdup strings into the vector.
8005 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
8006 Remove free_vector_argv call.
8007
ad3d022a
YQ
80082017-04-13 Yao Qi <yao.qi@linaro.org>
8009
8010 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8011 tdep->rx_psw_type.
8012
e6ddc3bf
YQ
80132017-04-13 Yao Qi <yao.qi@linaro.org>
8014
8015 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8016 * rx-tdep.c (rx_gdbarch_init): Likewise.
8017
bfb8cf90
PA
80182017-04-13 Pedro Alves <palves@redhat.com>
8019
8020 * breakpoint.h (struct breakpoint): Reindent.
8021
f5336ca5
PA
80222017-04-13 Pedro Alves <palves@redhat.com>
8023
8024 * breakpoint.c (bp_location): Rename to ...
8025 (bp_locations): ... this. All references updated.
8026 (bp_location_count): Rename to ...
8027 (bp_locations_count): ... this. All references updated.
8028 (bp_location_placed_address_before_address_max): Rename to ...
8029 (bp_locations_placed_address_before_address_max): ... this. All
8030 references updated.
8031 (bp_location_shadow_len_after_address_max): Rename to ...
8032 (bp_locations_shadow_len_after_address_max): ... this. All
8033 references updated.
8034 (bp_location_compare_addrs): Rename to ...
8035 (bp_locations_compare_addrs): ... this. All references updated.
8036 (bp_location_compare):Rename to ...
8037 (bp_locations_compare): ... this. All references updated.
8038 (bp_location_target_extensions_update): Rename to ...
8039 (bp_locations_target_extensions_update): ... this. All references
8040 updated.
8041
be628ab8
SDJ
80422017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8043
8044 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8045 * common/common.m4: Check headers 'termios.h', 'termio.h' and
8046 'sgtty.h'.
8047 * common/gdb_termios.h: New file, with parts of "terminal.h".
8048 * inflow.c: Include "gdb_termios.h".
8049 * ser-unix.c: Include "gdb_termios.h".
8050 * terminal.h: Move terminal-related defines to
8051 "common/gdb_termios.h".
8052
8e9e35b1
TT
80532017-04-12 Tom Tromey <tom@tromey.com>
8054
8055 * probe.c (parse_probes): Update.
8056 * location.h (delete_event_location): Don't declare.
8057 (event_location_deleter::operator()): Update.
8058 * location.c (event_location_deleter::operator()): Rename from
8059 delete_event_location.
8060 * linespec.h (linespec_result) <location>: Change type to
8061 event_location_up.
8062 * linespec.c (canonicalize_linespec, event_location_to_sals)
8063 (decode_objc): Update.
8064 (linespec_result): Don't call delete_event_location.
8065 * breakpoint.c (create_breakpoints_sal)
8066 (bkpt_probe_create_sals_from_location)
8067 (strace_marker_create_sals_from_location): Update.
8068
16e802b9
TT
80692017-04-12 Tom Tromey <tom@tromey.com>
8070
8071 * linespec.h (struct linespec_result): Add constructor and
8072 destructor.
8073 (init_linespec_result, destroy_linespec_result)
8074 (make_cleanup_destroy_linespec_result): Don't declare.
8075 * linespec.c (init_linespec_result): Remove.
8076 (linespec_result::~linespec_result): Rename from
8077 destroy_linespec_result. Update.
8078 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8079 Remove.
8080 * breakpoint.c (create_breakpoint, break_range_command)
8081 (decode_location_default): Update.
8082 * ax-gdb.c (agent_command_1): Update.
8083
d28cd78a
TT
80842017-04-12 Tom Tromey <tom@tromey.com>
8085
8086 * remote.c (remote_download_tracepoint): Update.
8087 * python/py-breakpoint.c (bppy_get_location): Update.
8088 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8089 (gdbscm_breakpoint_location): Update.
8090 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8091 * breakpoint.h (struct breakpoint) <location, location_range_end>:
8092 Change type to event_location_up.
8093 * breakpoint.c (create_overlay_event_breakpoint)
8094 (create_longjmp_master_breakpoint)
8095 (create_std_terminate_master_breakpoint)
8096 (create_exception_master_breakpoint)
8097 (breakpoint_event_location_empty_p, print_breakpoint_location)
8098 (print_one_breakpoint_location, create_thread_event_breakpoint)
8099 (init_breakpoint_sal, create_breakpoint)
8100 (print_recreate_ranged_breakpoint, break_range_command)
8101 (init_ada_exception_breakpoint, say_where): Update.
8102 (base_breakpoint_dtor): Don't call delete_event_location.
8103 (bkpt_print_recreate, tracepoint_print_recreate)
8104 (dprintf_print_recreate, update_static_tracepoint)
8105 (breakpoint_re_set_default): Update.
8106
711799d5
TT
81072017-04-12 Tom Tromey <tom@tromey.com>
8108
8109 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8110 type of "to_do". Update.
8111 (compute_stack_depth): Use std::vector.
8112
52d214d3
TT
81132017-04-12 Tom Tromey <tom@tromey.com>
8114
8115 * printcmd.c (find_instruction_backward): Use std::vector.
8116
4c404b8b
TT
81172017-04-12 Tom Tromey <tom@tromey.com>
8118
8119 * symfile.c (objfilep): Remove typedef.
8120 (reread_symbols): Use a std::vector.
8121
156d9eab
TT
81222017-04-12 Tom Tromey <tom@tromey.com>
8123
8124 * mi/mi-main.c (exec_direction_forward): Remove.
8125 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8126 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8127 scoped_restore.
8128 * guile/guile.c (guile_repl_command, guile_command)
8129 (gdbscm_execute_gdb_command): Use scoped_restore.
8130 * go-exp.y (go_parse): Use scoped_restore.
8131 * d-exp.y (d_parse): Use scoped_restore.
8132 * cli/cli-decode.c (cmd_func): Use scoped_restore.
8133 * c-exp.y (c_parse): Use scoped_restore.
8134
4d89769a
TT
81352017-04-12 Tom Tromey <tom@tromey.com>
8136
8137 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8138 (mi_parse): Update return type.
8139 (mi_parse_free): Remove.
8140 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8141 (mi_parse::~mi_parse): Rename from mi_parse_free.
8142 (mi_parse_cleanup): Remove.
8143 (mi_parse): Return a unique_ptr. Use new.
8144 * mi/mi-main.c (mi_execute_command): Update.
8145
4b217cc7
TT
81462017-04-12 Tom Tromey <tom@tromey.com>
8147
8148 * location.c (explicit_location_lex_one): Return a
8149 unique_xmalloc_ptr.
8150 (string_to_explicit_location): Update. Remove cleanups.
8151
59d3651b
TT
81522017-04-12 Tom Tromey <tom@tromey.com>
8153
8154 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8155 (compare_value_and_voffset): Change type. Update.
8156 (compute_vtable_size): Change type of "offset_vec".
8157 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
8158 (gnuv3_get_typeid): Remove extraneous declaration.
8159
b24b0d6c
TT
81602017-04-12 Tom Tromey <tom@tromey.com>
8161
8162 * charset.h (wchar_iterator): Fix comment.
8163
80a3b8c5
TT
81642017-04-12 Tom Tromey <tom@tromey.com>
8165
8166 * charset.c (iconv_wrapper): New class.
8167 (cleanup_iconv): Remove.
8168 (convert_between_encodings): Use it.
8169
c83dd867
TT
81702017-04-12 Tom Tromey <tom@tromey.com>
8171
8172 * symfile.h (increment_reading_symtab): Update type.
8173 * symfile.c (decrement_reading_symtab): Remove.
8174 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8175 * psymtab.c (psymtab_to_symtab): Update.
8176 * dwarf2read.c (dw2_instantiate_symtab): Update.
8177
0e8621a0
TT
81782017-04-12 Tom Tromey <tom@tromey.com>
8179
8180 * jit.c (struct jit_reader): Declare separately. Add constructor
8181 and destructor. Change type of "handle".
8182 (loaded_jit_reader): Define separately.
8183 (jit_reader_load): Update. New "new".
8184 (jit_reader_unload_command): Use "delete".
8185 * gdb-dlfcn.h (struct dlclose_deleter): New.
8186 (gdb_dlhandle_up): New typedef.
8187 (gdb_dlopen, gdb_dlsym): Update types.
8188 (gdb_dlclose): Remove.
8189 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8190 (gdb_dlsym): Change type of "handle".
8191 (make_cleanup_dlclose): Remove.
8192 (dlclose_deleter::operator()): Rename from gdb_dlclose.
8193 * compile/compile-c-support.c (load_libcc): Update.
8194
67d89901
TT
81952017-04-12 Tom Tromey <tom@tromey.com>
8196
8197 * symtab.h (find_pcs_for_symtab_line): Change return type.
8198 * symtab.c (find_pcs_for_symtab_line): Change return type.
8199 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8200 type of "vec". Update.
8201 (ltpy_get_pcs_for_line): Update.
8202 * linespec.c (decode_digits_ordinary): Update.
8203
93921405
TT
82042017-04-12 Tom Tromey <tom@tromey.com>
8205
8206 * tracepoint.c (actions_command): Update.
8207 * python/python.c (python_command, python_interactive_command):
8208 Update.
8209 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8210 * guile/guile.c (guile_command): Update.
8211 * defs.h (read_command_lines, read_command_lines_1): Return
8212 command_line_up.
8213 (command_lines_deleter): New struct.
8214 (command_line_up): New typedef.
8215 * compile/compile.c (compile_code_command)
8216 (compile_print_command): Update.
8217 * cli/cli-script.h (get_command_line, copy_command_lines): Return
8218 command_line_up.
8219 (make_cleanup_free_command_lines): Remove.
8220 * cli/cli-script.c (get_command_line, read_command_lines_1)
8221 (copy_command_lines): Return command_line_up.
8222 (while_command, if_command, read_command_lines, define_command)
8223 (document_command): Update.
8224 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8225 Remove.
8226 * breakpoint.h (breakpoint_set_commands): Change type of
8227 "commands".
8228 * breakpoint.c (breakpoint_set_commands): Change type of
8229 "commands". Update.
8230 (do_map_commands_command, update_dprintf_command_list)
8231 (create_tracepoint_from_upload): Update.
8232
ffc2605c
TT
82332017-04-12 Tom Tromey <tom@tromey.com>
8234
8235 * tracepoint.c (scope_info): Update.
8236 * spu-tdep.c (spu_catch_start): Update.
8237 * python/python.c (gdbpy_decode_line): Update.
8238 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8239 * python/py-breakpoint.c (bppy_init): Update.
8240 * probe.c (parse_probes): Update.
8241 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8242 * location.h (event_location_deleter): New struct.
8243 (event_location_up): New typedef.
8244 (new_linespec_location, new_address_location, new_probe_location)
8245 (new_explicit_location, copy_event_location)
8246 (string_to_event_location, string_to_event_location_basic)
8247 (string_to_explicit_location): Update return type.
8248 (make_cleanup_delete_event_location): Remove.
8249 * location.c (new_linespec_location, new_address_location)
8250 (new_probe_location, new_explicit_location, copy_event_location):
8251 Return event_location_up.
8252 (delete_event_location_cleanup)
8253 (make_cleanup_delete_event_location): Remove.
8254 (string_to_explicit_location, string_to_event_location_basic)
8255 (string_to_event_location): Return event_location_up.
8256 * linespec.c (canonicalize_linespec, event_location_to_sals)
8257 (decode_line_with_current_source)
8258 (decode_line_with_last_displayed, decode_objc): Update.
8259 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8260 * completer.c (location_completer): Update.
8261 * cli/cli-cmds.c (edit_command, list_command): Update.
8262 * breakpoint.c (create_overlay_event_breakpoint)
8263 (create_longjmp_master_breakpoint)
8264 (create_std_terminate_master_breakpoint)
8265 (create_exception_master_breakpoint)
8266 (create_thread_event_breakpoint): Update.
8267 (init_breakpoint_sal): Update. Remove some dead code.
8268 (create_breakpoint_sal): Change type of "location". Update.
8269 (create_breakpoints_sal, create_breakpoint, break_command_1)
8270 (dprintf_command, break_range_command, until_break_command)
8271 (init_ada_exception_breakpoint)
8272 (strace_marker_create_sals_from_location)
8273 (update_static_tracepoint, trace_command, ftrace_command)
8274 (strace_command, create_tracepoint_from_upload): Update.
8275 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8276 * ax-gdb.c (agent_command_1): Update.
8277
8f10c932
PA
82782017-04-12 Pedro Alves <palves@redhat.com>
8279
8280 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8281 * configure.tgt: Handle i[34567]86-*-go32* and
8282 i[34567]86-*-msdosdjgpp*.
8283 * i386-tdep.c (i386_svr4_reg_to_regnum):
8284 Make extern.
8285 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8286 i386-go32-tdep.c.
8287 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8288 * i386-go32-tdep.c: New file.
8289 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8290 declarations.
8291
0a31ccfb
SM
82922017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8293
8294 * aix-thread.c (pd_status2str): Change return type to const char *.
8295
e9bb3fbb
PA
82962017-04-12 Pedro Alves <palves@redhat.com>
8297
8298 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8299 calls to set_gdbarch_gnu_triplet_regexp.
8300
53375380
PA
83012017-04-12 Pedro Alves <palves@redhat.com>
8302
8303 PR gdb/21323
8304 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8305 New enum value.
8306 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8307 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8308 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8309 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8310 * gdbarch.h, gdbarch.c: Regenerate.
8311 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8312 gdbarch_wchar_bit and gdbarch_wchar_signed.
8313 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8314 * arm-tdep.c (arm_gdbarch_init): Likewise.
8315 * avr-tdep.c (avr_gdbarch_init): Likewise.
8316 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8317 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8318 * i386-tdep.c (i386_go32_init_abi): Likewise.
8319 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8320 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8321 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8322 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8323 * sh-tdep.c (sh_gdbarch_init): Likewise.
8324 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8325 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8326 * windows-tdep.c (windows_init_abi): Likewise.
8327 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8328
53e710ac
PA
83292017-04-12 Pedro Alves <palves@redhat.com>
8330
8331 PR c++/21323
8332 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8333 cplus_primitive_type_char32_t>: New enum values.
8334 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8335 and cplus_primitive_type_char32_t.
8336 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8337 32, use the archtecture's built-in type for char16_t and char32_t,
8338 respectively. Otherwise, fallback to init_integer_type as before,
8339 but make the type unsigned, and issue a complaint.
8340 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8341
ab0538b8
AH
83422017-04-12 Alan Hayward <alan.hayward@arm.com>
8343
5e0e0422 8344 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
8345 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8346
5430098f
SDJ
83472017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8348
8349 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8350 'const char *'.
8351
7c5ded6a
SDJ
83522017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8353
8354 * common/common-utils.c (free_vector_argv): New function.
8355 * common/common-utils.h: Include <vector>.
8356 (free_vector_argv): New prototype.
8357 * darwin-nat.c (darwin_create_inferior): Rewrite function
8358 prototype in order to constify "exec_file" and accept a
8359 "std::string" for "allargs".
8360 * fork-child.c: Include <vector>.
8361 (breakup_args): Rewrite function, using C++.
8362 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8363 and accept "std::string" for "allargs". Update the code to
8364 calculate "argv" based on "allargs". Update calls to "exec_fun"
8365 and "execvp".
8366 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8367 order to constify "exec_file" and accept a "std::string" for
8368 "allargs".
8369 * go32-nat.c (go32_create_inferior): Likewise.
8370 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8371 * infcmd.c (run_command_1): Constify "exec_file". Use
8372 "std::string" for inferior arguments.
8373 * inferior.h (fork_inferior): Update prototype.
8374 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8375 prototype in order to constify "exec_file" and accept a
8376 "std::string" for "allargs".
8377 * nto-procfs.c (procfs_create_inferior): Likewise.
8378 * procfs.c (procfs_create_inferior): Likewise.
8379 * remote-sim.c (gdbsim_create_inferior): Likewise.
8380 * remote.c (extended_remote_run): Update code to accept
8381 "std::string" as argument.
8382 (extended_remote_create_inferior): Rewrite function prototype in
8383 order to constify "exec_file" and accept a "std::string" for
8384 "allargs".
8385 * rs6000-nat.c (super_create_inferior): Likewise.
8386 (rs6000_create_inferior): Likewise.
8387 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8388 * windows-nat.c (windows_create_inferior): Likewise.
8389
ae0eee42
PA
83902017-04-11 Pedro Alves <palves@redhat.com>
8391
8392 * thread.c: Fix whitespace throughout.
8393
a6acac06
PR
83942017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8395
8396 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8397
64403bd1
AH
83982017-04-11 Alan Hayward <alan.hayward@arm.com>
8399
8400 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8401
a5bef50f
SDJ
84022017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8403
8404 PR gdb/21364
8405 * osdata.c (info_osdata): Check if 'type' is an empty string
8406 instead of NULL.
8407
9295a5a9
PA
84082017-04-10 Pedro Alves <palves@redhat.com>
8409
8410 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8411 (ptid_to_global_thread_id, in_thread_list)
8412 (do_captured_list_thread_ids, set_resumed, set_running)
8413 (set_executing, set_stop_requested, finish_thread_state)
8414 (validate_registers_access, can_access_registers_ptid)
8415 (print_thread_info_1, switch_to_thread)
8416 (do_restore_current_thread_cleanup)
8417 (make_cleanup_restore_current_thread, thread_command)
8418 (thread_name_command): Use operator== instead of ptid_equal.
8419
996812e3
PA
84202017-04-10 Pedro Alves <palves@redhat.com>
8421
8422 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8423 (current_thread_cleanup_chain): Delete.
8424 (restore_current_thread_cleanup_dtor)
8425 (make_cleanup_restore_current_thread): Remove references to
8426 current_thread_cleanup_chain.
8427
845b344f
AH
84282017-04-10 Alan Hayward <alan.hayward@arm.com>
8429
8430 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8431 REG_UNKNOWN.
8432
803bdfe4
YQ
84332017-04-10 Yao Qi <yao.qi@linaro.org>
8434
8435 PR gdb/19942
8436 * gdbthread.h (thread_info::deletable): New method.
8437 (thread_info::incref): New method.
8438 (thread_info::decref): New method.
8439 (thread_info::refcount): Move it to private.
8440 * infrun.c (save_stop_context): Call inc_refcount.
8441 (release_stop_context_cleanup): Likewise.
8442 * thread.c (set_thread_exited): New function.
8443 (init_thread_list): Delete "tp" only it is deletable, otherwise
8444 call set_thread_exited.
8445 (delete_thread_1): Call set_thread_exited.
8446 (current_thread_cleanup) <inferior_pid>: Remove.
8447 <thread>: New field.
8448 (restore_current_thread_ptid_changed): Removed.
8449 (do_restore_current_thread_cleanup): Adjust.
8450 (restore_current_thread_cleanup_dtor): Don't call
8451 find_thread_ptid.
8452 (set_thread_refcount): Use dec_refcount.
8453 (make_cleanup_restore_current_thread): Adjust.
8454 (thread_apply_all_command): Call inc_refcount.
8455 (_initialize_thread): Don't call
8456 observer_attach_thread_ptid_changed.
8457
8c25b497
YQ
84582017-04-10 Yao Qi <yao.qi@linaro.org>
8459
8460 * thread.c (delete_thread_1): Hoist code on marking thread as
8461 exited.
8462
8473b447
SM
84632017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8464
8465 * windows-nat.c (windows_detach): Initialize ptid with
8466 minus_one_ptid.
8467
6670ec13
SM
84682017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8469
8470 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8471
ba2f91bb
AH
84722017-04-07 Alan Hayward <alan.hayward@arm.com>
8473
8474 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8475 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8476 (bfin_pseudo_register_write): Likewise
8477
436252de
SM
84782017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8479
8480 * common/ptid.h (struct ptid): Change to...
8481 (class ptid_t): ... this.
8482 <ptid_t>: New constructors.
8483 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8484 matches>: New methods.
8485 <make_null, make_minus_one>: New static methods.
8486 <pid>: Rename to...
8487 <m_pid>: ...this.
8488 <lwp>: Rename to...
8489 <m_lwp>: ...this.
8490 <tid>: Rename to...
8491 <m_tid>: ...this.
8492 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8493 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8494 as references, move comment to class ptid_t.
8495 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8496 ptid_t static methods.
8497 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8498 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8499 Take ptid arguments as references, implement using ptid_t methods.
8500 * unittests/ptid-selftests.c: New file.
8501 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8502 unittests/ptid-selftests.c.
8503 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8504
0dedf377
TP
85052017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8506
8507 * python/python.c (python_run_simple_file): Cast mode literal to
8508 non-const char pointer as expected by PyFile_FromString.
8509
4e9868d4
SM
85102017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8511
8512 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8513 minus_one_ptid and null_ptid.
8514
9bf2a700
PA
85152017-04-05 Pedro Alves <palves@redhat.com>
8516
8517 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8518 * configure: Regenerate.
8519
a121b7c1
PA
85202017-04-05 Pedro Alves <palves@redhat.com>
8521
8522 * ada-exp.y (yyerror): Constify.
8523 * ada-lang.c (bound_name, get_selections)
8524 (ada_variant_discrim_type)
8525 (ada_variant_discrim_name, ada_value_struct_elt)
8526 (ada_lookup_struct_elt_type, is_unchecked_variant)
8527 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8528 (catch_ada_exception_command_split)
8529 (catch_ada_assert_command_split, catch_assert_command)
8530 (ada_op_name): Constify.
8531 * ada-lang.h (ada_yyerror, get_selections)
8532 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8533 * arc-tdep.c (arc_print_frame_cache): Constify.
8534 * arm-tdep.c (arm_skip_stub): Constify.
8535 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8536 (gen_aggregate_elt_ref): Constify.
8537 * bcache.c (print_bcache_statistics): Constify.
8538 * bcache.h (print_bcache_statistics): Constify.
8539 * break-catch-throw.c (catch_exception_command_1):
8540 * breakpoint.c (struct ep_type_description::description):
8541 Constify.
8542 (add_solib_catchpoint): Constify.
8543 (catch_fork_command_1): Add cast.
8544 (add_catch_command): Constify.
8545 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8546 Constify.
8547 * bsd-uthread.c (bsd_uthread_state): Constify.
8548 * buildsym.c (patch_subfile_names): Constify.
8549 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8550 Constify.
8551 * c-exp.y (yyerror): Constify.
8552 (token::oper): Constify.
8553 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8554 * c-varobj.c (cplus_describe_child): Constify.
8555 * charset.c (find_charset_names): Add cast.
8556 (find_charset_names): Constify array and add const_cast.
8557 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8558 (edit_command): Constify.
8559 * cli/cli-decode.c (lookup_cmd): Constify.
8560 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8561 Constify.
8562 (struct dump_context): Constify.
8563 (add_dump_command, restore_command): Constify.
8564 * cli/cli-script.c (get_command_line): Constify.
8565 * cli/cli-script.h (get_command_line): Constify.
8566 * cli/cli-utils.c (check_for_argument): Constify.
8567 * cli/cli-utils.h (check_for_argument): Constify.
8568 * coff-pe-read.c (struct read_pe_section_data): Constify.
8569 * command.h (lookup_cmd): Constify.
8570 * common/print-utils.c (decimal2str): Constify.
8571 * completer.c (gdb_print_filename): Constify.
8572 * corefile.c (set_gnutarget): Constify.
8573 * cp-name-parser.y (yyerror): Constify.
8574 * cp-valprint.c (cp_print_class_member): Constify.
8575 * cris-tdep.c (cris_register_name, crisv32_register_name):
8576 Constify.
8577 * d-exp.y (yyerror): Constify.
8578 (struct token::oper): Constify.
8579 * d-lang.h (d_yyerror): Constify.
8580 * dbxread.c (struct header_file_location::name): Constify.
8581 (add_old_header_file, add_new_header_file, last_function_name)
8582 (dbx_next_symbol_text, add_bincl_to_list)
8583 (find_corresponding_bincl_psymtab, set_namestring)
8584 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8585 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8586 * defs.h (command_line_input, print_address_symbolic)
8587 (deprecated_readline_begin_hook): Constify.
8588 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8589 Constify.
8590 * event-top.c (handle_line_of_input): Constify and add cast.
8591 * exceptions.c (catch_errors): Constify.
8592 * exceptions.h (catch_errors): Constify.
8593 * expprint.c (print_subexp_standard, op_string, op_name)
8594 (op_name_standard, dump_raw_expression, dump_raw_expression):
8595 * expression.h (op_name, op_string, dump_raw_expression):
8596 Constify.
8597 * f-exp.y (yyerror): Constify.
8598 (struct token::oper): Constify.
8599 (struct f77_boolean_val::name): Constify.
8600 * f-lang.c (f_word_break_characters): Constify.
8601 * f-lang.h (f_yyerror): Constify.
8602 * fork-child.c (fork_inferior): Add cast.
8603 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8604 (new_variant): Constify.
8605 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8606 * gdbarch.c: Regenerate.
8607 * gdbcore.h (set_gnutarget): Constify.
8608 * go-exp.y (yyerror): Constify.
8609 (token::oper): Constify.
8610 * go-lang.h (go_yyerror): Constify.
8611 * go32-nat.c (go32_sysinfo): Constify.
8612 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8613 * guile/scm-cmd.c (cmdscm_function): Constify.
8614 * guile/scm-param.c (pascm_param_value): Constify.
8615 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8616 (h8300sx_register_name): Constify.
8617 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8618 Constify.
8619 * ia64-tdep.c (ia64_register_names): Constify.
8620 * infcmd.c (construct_inferior_arguments): Constify.
8621 (path_command, attach_post_wait): Constify.
8622 * language.c (show_range_command, show_case_command)
8623 (unk_lang_error): Constify.
8624 * language.h (language_defn::la_error)
8625 (language_defn::la_name_of_this): Constify.
8626 * linespec.c (decode_line_2): Constify.
8627 * linux-thread-db.c (thread_db_err_str): Constify.
8628 * lm32-tdep.c (lm32_register_name): Constify.
8629 * m2-exp.y (yyerror): Constify.
8630 * m2-lang.h (m2_yyerror): Constify.
8631 * m32r-tdep.c (m32r_register_names): Constify and make static.
8632 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8633 * m88k-tdep.c (m88k_register_name): Constify.
8634 * macroexp.c (appendmem): Constify.
8635 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8636 (upgrade_type, parse_external, parse_partial_symbols)
8637 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8638 (new_symbol): Constify.
8639 * memattr.c (mem_info_command): Constify.
8640 * mep-tdep.c (register_name_from_keyword): Constify.
8641 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8642 Constify.
8643 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8644 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8645 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8646 cast.
8647 (mi_execute_async_cli_command): Constify.
8648 * mips-tdep.c (mips_register_name): Constify.
8649 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8650 (am33_register_name, am33_2_register_name)
8651 * moxie-tdep.c (moxie_register_names): Constify.
8652 * nat/linux-osdata.c (osdata_type): Constify fields.
8653 * nto-tdep.c (nto_parse_redirection): Constify.
8654 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8655 (lookup_child_selector): Constify.
8656 (objc_methcall::name): Constify.
8657 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8658 (lookup_struct_typedef): Constify.
8659 * objfiles.c (pc_in_section): Constify.
8660 * objfiles.h (pc_in_section): Constify.
8661 * p-exp.y (struct token::oper): Constify.
8662 (yyerror): Constify.
8663 * p-lang.h (pascal_yyerror): Constify.
8664 * parser-defs.h (op_name_standard): Constify.
8665 (op_print::string): Constify.
8666 (exp_descriptor::op_name): Constify.
8667 * printcmd.c (print_address_symbolic): Constify.
8668 * psymtab.c (print_partial_symbols): Constify.
8669 * python/py-breakpoint.c (stop_func): Constify.
8670 (bppy_get_expression): Constify.
8671 * python/py-cmd.c (cmdpy_completer::name): Constify.
8672 (cmdpy_function): Constify.
8673 * python/py-event.c (evpy_add_attribute)
8674 (gdbpy_initialize_event_generic): Constify.
8675 * python/py-event.h (evpy_add_attribute)
8676 (gdbpy_initialize_event_generic): Constify.
8677 * python/py-evts.c (add_new_registry): Constify.
8678 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8679 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8680 * python/py-inferior.c (get_buffer): Add cast.
8681 * python/py-param.c (parm_constant::name): Constify.
8682 * python/py-unwind.c (fprint_frame_id): Constify.
8683 * python/python.c (gdbpy_parameter_value): Constify.
8684 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8685 * remote.c (memory_packet_config::name): Constify.
8686 (show_packet_config_cmd, remote_write_bytes)
8687 (remote_buffer_add_string):
8688 * reverse.c (exec_reverse_once): Constify.
8689 * rs6000-tdep.c (variant::name, variant::description): Constify.
8690 * rust-exp.y (rustyyerror): Constify.
8691 * rust-lang.c (rust_op_name): Constify.
8692 * rust-lang.h (rustyyerror): Constify.
8693 * serial.h (serial_ops::name): Constify.
8694 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8695 (sh_sh3e_register_name, sh_sh2e_register_name)
8696 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8697 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8698 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8699 (sh_sh4al_dsp_register_name): Constify.
8700 * sh64-tdep.c (sh64_register_name): Constify.
8701 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8702 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8703 * stabsread.c (patch_block_stabs, read_type_number)
8704 (ref_map::stabs, ref_add, process_reference)
8705 (symbol_reference_defined, define_symbol, define_symbol)
8706 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8707 (read_one_struct_field, read_struct_fields, read_baseclasses)
8708 (read_tilde_fields, read_struct_type, read_array_type)
8709 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8710 (read_huge_number, read_range_type, read_args, common_block_start)
8711 (find_name_end): Constify.
8712 * stabsread.h (common_block_start, define_symbol)
8713 (process_one_symbol, symbol_reference_defined, ref_add):
8714 * symfile.c (get_section_index, add_symbol_file_command):
8715 * symfile.h (get_section_index): Constify.
8716 * target-descriptions.c (tdesc_type::name): Constify.
8717 (tdesc_free_type): Add cast.
8718 * target.c (find_default_run_target):
8719 (add_deprecated_target_alias, find_default_run_target)
8720 (target_announce_detach): Constify.
8721 (do_option): Constify.
8722 * target.h (add_deprecated_target_alias): Constify.
8723 * thread.c (print_thread_info_1): Constify.
8724 * top.c (deprecated_readline_begin_hook, command_line_input):
8725 Constify.
8726 (init_main): Add casts.
8727 * top.h (handle_line_of_input): Constify.
8728 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8729 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8730 (tfind_command): Rename to ...
8731 (tfind_command_1): ... this and constify.
8732 (tfind_command): New function.
8733 (tfind_end_command, tfind_start_command): Adjust.
8734 (encode_source_string): Constify.
8735 * tracepoint.h (encode_source_string): Constify.
8736 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8737 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8738 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8739 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8740 * tui/tui-win.c (parse_scrolling_args): Constify.
8741 * tui/tui-windata.c (tui_erase_data_content): Constify.
8742 * tui/tui-windata.h (tui_erase_data_content): Constify.
8743 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8744 * tui/tui.c (tui_enable): Add cast.
8745 * utils.c (defaulted_query): Constify.
8746 (init_page_info): Add cast.
8747 (puts_debug, subset_compare): Constify.
8748 * utils.h (subset_compare): Constify.
8749 * varobj.c (varobj_format_string): Constify.
8750 * varobj.h (varobj_format_string): Constify.
8751 * vax-tdep.c (vax_register_name): Constify.
8752 * windows-nat.c (windows_detach): Constify.
8753 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8754 * xml-support.c (gdb_xml_end_element): Constify.
8755 * xml-tdesc.c (tdesc_start_reg): Constify.
8756 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8757 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8758 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8759
995816ba
PA
87602017-04-05 Pedro Alves <palves@redhat.com>
8761
8762 * proc-api.c (struct trans): Constify.
8763 (procfs_note): Constify.
8764 * proc-events.c (struct trans, syscall_table):
8765 * proc-flags.c (struct trans): Constify.
8766 * proc-utils.h (procfs_note): Constify.
8767 * proc-why.c (struct trans): Constify.
8768 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8769 (procfs_detach): Constify.
8770 * sol-thread.c (struct string_map): Constify.
8771 (td_err_string, td_state_string): Constify.
8772
3e83a920
PA
87732017-04-05 Pedro Alves <palves@redhat.com>
8774
8775 * proc-api.c (procfs_filename): Don't initialize
8776 procfs_filename.
8777 (prepare_to_trace): Assume procfs_filename is non-NULL.
8778 (_initialize_proc_api): Give procfs_filename a default value here.
8779
63160a43
PA
87802017-04-05 Pedro Alves <palves@redhat.com>
8781
8782 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8783 'cond_string' parameter.
8784 (extract_exception_regexp): Constify 'string' parameter.
8785 (catch_exception_command_1): Constify.
8786 * breakpoint.c (init_catchpoint)
8787 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8788 parameter.
8789 (ep_parse_optional_if_clause, catch_fork_command_1)
8790 (catch_exec_command_1): Constify.
8791 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8792 parameter.
8793 (ep_parse_optional_if_clause): Constify.
8794 * cli/cli-utils.c (remove_trailing_whitespace)
8795 (check_for_argument): Constify.
8796 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8797 non-const overload.
8798 (check_for_argument): Likewise.
8799
9b2eba3d
PA
88002017-04-05 Pedro Alves <palves@redhat.com>
8801
8802 * event-top.c (command_line_handler): Add cast to execute_command
8803 call.
8804 * record-btrace.c (cmd_record_btrace_bts_start)
8805 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8806 (cmd_record_btrace_start): Add cast to execute_command call.
8807 * record-full.c (record_full_goto_insn):
8808 * record.c (record_start, record_stop): Add cast to
8809 execute_command_to_string calls.
8810 (cmd_record_start): Add cast to execute_command calls.
8811
2adadf51
PA
88122017-04-05 Pedro Alves <palves@redhat.com>
8813
8814 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8815 static inline function.
8816 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8817 array and use gdb_PyArg_ParseTupleAndKeywords.
8818 * python/py-cmd.c (cmdpy_init): Likewise.
8819 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8820 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8821 (infpy_search_memory): Likewise.
8822 * python/py-objfile.c (objfpy_add_separate_debug_file)
8823 (gdbpy_lookup_objfile): Likewise.
8824 * python/py-symbol.c (gdbpy_lookup_symbol)
8825 (gdbpy_lookup_global_symbol): Likewise.
8826 * python/py-type.c (gdbpy_lookup_type): Likewise.
8827 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8828 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8829 Likewise.
8830
0d1f4ceb
PA
88312017-04-05 Pedro Alves <palves@redhat.com>
8832
8833 * python/python-internal.h (gdb_PyGetSetDef): New type.
8834 * python/py-block.c (block_object_getset)
8835 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8836 * python/py-event.c (event_object_getset)
8837 (finish_breakpoint_object_getset): Likewise.
8838 * python/py-inferior.c (inferior_object_getset): Likewise.
8839 * python/py-infthread.c (thread_object_getset): Likewise.
8840 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8841 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8842 * python/py-objfile.c (objfile_getset): Likewise.
8843 * python/py-progspace.c (pspace_getset): Likewise.
8844 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8845 Likewise.
8846 * python/py-record.c (recpy_record_getset): Likewise.
8847 * python/py-symbol.c (symbol_object_getset): Likewise.
8848 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8849 Likewise.
8850 * python/py-type.c (type_object_getset, field_object_getset):
8851 Likewise.
8852 * python/py-value.c (value_object_getset): Likewise.
8853
4d759979
PA
88542017-04-05 Pedro Alves <palves@redhat.com>
8855
8856 * python/python-internal.h (gdb_PyObject_CallMethod)
8857 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8858 New functions.
8859 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8860 (PySys_GetObject, PySys_SetPath): New macros.
8861
fdf9e36f
PA
88622017-04-05 Pedro Alves <palves@redhat.com>
8863
8864 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8865 info_osdata_command.
8866 * osdata.c (info_osdata_command): Rename to ...
8867 (info_osdata): ... this. Constify 'type' parameter, and remove
8868 the 'from_tty' parameter. Accept NULL TYPE.
8869 (info_osdata_command): New function.
8870 * osdata.h (info_osdata_command): Remove declaration.
8871 (info_osdata): New declaration.
8872
9f33b8b7
PA
88732017-04-05 Pedro Alves <palves@redhat.com>
8874
8875 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8876 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8877 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8878 parameter.
8879 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8880 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8881 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8882 parameter.
8883 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8884 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8885 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8886 (mi_cmd_file_list_exec_source_files)
8887 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8888 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8889 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8890 parameter.
8891 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8892 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8893 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8894 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8895 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8896 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8897 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8898 'command' parameter.
8899 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8900 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8901 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8902 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8903 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8904 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8905 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8906 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8907 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8908 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8909 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8910 parameter.
8911 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8912 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8913 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8914 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8915 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8916 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8917 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8918 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8919 (mi_cmd_data_list_changed_registers)
8920 (mi_cmd_data_write_register_values)
8921 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8922 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8923 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8924 (mi_cmd_list_features, mi_cmd_list_target_features)
8925 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8926 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8927 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8928 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8929 (mi_cmd_trace_frame_collected): Constify 'command'
8930 parameter.
8931 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8932 'command' parameter.
8933
67cb5b2d
PA
89342017-04-05 Pedro Alves <palves@redhat.com>
8935
8936 * ada-lang.c (ada_completer_word_break_characters): Now a const
8937 array.
8938 (ada_get_gdb_completer_word_break_characters): Constify.
8939 * completer.c (gdb_completer_command_word_break_characters)
8940 (gdb_completer_file_name_break_characters)
8941 (gdb_completer_quote_characters): Now const arrays.
8942 (get_gdb_completer_quote_characters): Constify.
8943 (set_rl_completer_word_break_characters): New function.
8944 (set_gdb_completion_word_break_characters)
8945 (complete_line_internal): Use it.
8946 * completer.h (get_gdb_completer_quote_characters): Constify.
8947 (set_rl_completer_word_break_characters): Declare.
8948 * f-lang.c (f_word_break_characters): Constify.
8949 * language.c (default_word_break_characters): Constify.
8950 * language.h (language_defn::la_word_break_characters): Constify.
8951 (default_word_break_characters): Constify.
8952 * top.c (init_main): Use set_rl_completer_word_break_characters.
8953
7a114964
PA
89542017-04-05 Pedro Alves <palves@redhat.com>
8955
8956 * aix-thread.c (aix_thread_pid_to_str)
8957 (aix_thread_extra_thread_info): Constify.
8958 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8959 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8960 (bsd_uthread_pid_to_str): Constify.
8961 * corelow.c (core_pid_to_str): Constify.
8962 * darwin-nat.c (darwin_pid_to_str): Constify.
8963 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8964 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8965 Constify.
8966 * gnu-nat.c (gnu_pid_to_str): Constify.
8967 * go32-nat.c (go32_pid_to_str): Constify.
8968 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8969 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8970 * inferior.c (inferior_pid_to_str): Constify.
8971 * linux-nat.c (linux_nat_pid_to_str): Constify.
8972 * linux-tdep.c (linux_core_pid_to_str): Constify.
8973 * linux-thread-db.c (thread_db_pid_to_str)
8974 (thread_db_extra_thread_info): Constify.
8975 * nto-tdep.c (nto_extra_thread_info): Constify.
8976 * nto-tdep.h (nto_extra_thread_info): Constify.
8977 * obsd-nat.c (obsd_pid_to_str): Constify.
8978 * procfs.c (procfs_pid_to_str): Constify.
8979 * ravenscar-thread.c (ravenscar_extra_thread_info)
8980 (ravenscar_pid_to_str): Constify.
8981 * remote-sim.c (gdbsim_pid_to_str): Constify.
8982 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8983 Constify.
8984 * sol-thread.c (solaris_pid_to_str): Constify.
8985 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8986 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8987 * target.c (default_pid_to_str, target_pid_to_str)
8988 (normal_pid_to_str, default_pid_to_str): Constify.
8989 * target.h (target_ops::to_pid_to_str)
8990 (target_ops::to_extra_thread_info): Constify.
8991 (target_pid_to_str, normal_pid_to_str): Constify.
8992 * windows-nat.c (windows_pid_to_str): Constify.
8993 * gdbarch.sh (core_pid_to_str): Constify.
8994 * target-delegates.c: Regenerate.
8995 * gdbarch.h, gdbarch.c: Regenerate.
8996
69bbf465
PA
89972017-04-05 Pedro Alves <palves@redhat.com>
8998
8999 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9000 the memory of the temporary warning_pre_print override.
9001 * utils.c (warning_pre_print): Constify.
9002 * utils.h (warning_pre_print): Constify.
9003
be47f9e8
PA
90042017-04-05 Pedro Alves <palves@redhat.com>
9005
9006 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9007 (shell_command): New function.
9008 (make_command): Use std::string.
9009 (init_cli_cmds): Register shell_command instead of shell_escape.
9010
bde6261a
PA
90112017-04-05 Pedro Alves <palves@redhat.com>
9012
9013 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9014 * tracepoint.c (default_collect): Don't initialize.
9015
b38ef47f
PA
90162017-04-05 Pedro Alves <palves@redhat.com>
9017
9018 * macroexp.c (macro_buffer::shared): Now a bool.
9019 (init_buffer): Update.
9020 (init_shared_buffer): Constify 'addr' parameter.
9021 (substitute_args, expand, macro_expand, macro_expand_next): Remove
9022 casts.
9023
f995bbe8
PA
90242017-04-05 Pedro Alves <palves@redhat.com>
9025
9026 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9027 * disasm.c (set_disassembler_options): Constify local.
9028 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9029
4a596fe2
SDJ
90302017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
9031
9032 PR gdb/21352
9033 * tracefile.c (tsave_command): Fix argument parsing for '-r'
9034 option.
9035
2cad08ea
YQ
90362017-04-05 Yao Qi <yao.qi@linaro.org>
9037
9038 * frame.c (frame_unwind_register_unsigned): Call
9039 frame_unwind_register_value.
9040
55a98976
YQ
90412017-04-05 Yao Qi <yao.qi@linaro.org>
9042
9043 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9044 Use gdb_test_multiple, and don't match anchor.
9045
4ac40124
PA
90462017-04-05 Pedro Alves <palves@redhat.com>
9047
9048 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9049 (Write After Approval): Remove Simon Marchi.
9050
c053b654
PA
90512017-04-05 Pedro Alves <palves@redhat.com>
9052
9053 * common/gdb_optional.h (optional::optional): Make constexpr and
9054 initialize m_dummy.
9055
4c7bf4f9
JB
90562017-04-04 John Baldwin <jhb@FreeBSD.org>
9057
9058 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9059 (amd64fbsd_jmp_buf_reg_offset): Remove.
9060 (amd64fbsd_supply_uthread): Remove function.
9061 (amd64fbsd_collect_uthread): Remove function.
9062 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9063 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9064 (x86_64-*-freebsd*): Remove bsd-uthread.o.
9065 (fbsd-nat.c): Update comment.
9066 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9067 (i386fbsd_jmp_buf_reg_offset): Remove.
9068 (i386fbsd_supply_uthread): Remove function.
9069 (i386fbsd_collect_uthread): Remove function.
9070 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9071
1e1a8bef
JB
90722017-04-04 John Baldwin <jhb@FreeBSD.org>
9073
9074 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9075 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9076 * NEWS: Mention that support for FreeBSD/alpha was removed.
9077 * alpha-fbsd-tdep.c: Delete file.
9078 * config/alpha/fbsd.mh: Delete file.
9079 * configure.host: Delete alpha*-*-freebsd* and
9080 alpha*-*-kfreebsd*-gnu.
9081 * configure.tgt: Delete alpha*-*-freebsd* and
9082 alpha*-*-kfreebsd*-gnu.
9083
49907934
JB
90842017-04-04 John Baldwin <jhb@FreeBSD.org>
9085
9086 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9087 amd64bsd_store_inferior_registers): Use ptid from regcache.
9088
6f77053d
PA
90892017-04-04 Pedro Alves <palves@redhat.com>
9090
9091 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
9092 data fields, make them private and add "m_" prefixes.
9093 (lnp_state_machine::lnp_state_machine): New ctor.
9094 (record_line, check_line_address, handle_set_discriminator)
9095 (handle_set_address, handle_advance_pc, handle_special_opcode)
9096 (handle_advance_line, handle_set_file, handle_negate_stmt)
9097 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9098 (end_sequence, advance_line): New methods.
9099 (m_gdbarch, m_record_lines_p): New fields.
9100 (lnp_reader_state): Delete.
9101 (dwarf_record_line): Rename to ...
9102 (lnp_state_machine::record_line): ... adjust.
9103 (init_lnp_state_machine): Delete.
9104 (lnp_state_machine::lnp_state_machine): New.
9105 (check_line_address): Rename to ...
9106 (lnp_state_machine::check_line_address): This.
9107 (dwarf_decode_lines_1): Remove reference to "reader_state".
9108 Adjust lnp_state_machine having a non-default ctor. Use bool.
9109 State machine internal state manipulation moved to
9110 lnp_state_machine methods.
9111
9c541725
PA
91122017-04-04 Pedro Alves <palves@redhat.com>
9113
9114 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9115 unittests/offset-type-selftests.c.
9116 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9117 * common/offset-type.h: New file.
9118 * common/preprocessor.h: New file.
9119 * common/traits.h: New file.
9120 * common/valid-expr.h: New file.
9121 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
9122 sect_offset and cu_offset strong typedefs throughout.
9123 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9124 typedefs throughout.
9125 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
9126 sect_offset and cu_offset strong typedefs throughout.
9127 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9128 typedefs throughout.
9129 * gdbtypes.h: Include "common/offset-type.h".
9130 (cu_offset): Now an offset type (strong typedef) instead of a
9131 struct.
9132 (sect_offset): Likewise.
9133 (union call_site_parameter_u): Rename "param_offset" field to
9134 "param_cu_off".
9135 * unittests/offset-type-selftests.c: New file.
9136
ecfb656c
PA
91372017-04-04 Pedro Alves <palves@redhat.com>
9138
9139 * common/underlying.h: New file.
9140 * dwarf2read.c: Include "common/gdb_optional.h" and
9141 "common/underlying.h".
9142 (dir_index, file_name_index): New types.
9143 (file_entry): Use them.
9144 (file_entry::include): Use to_underlying.
9145 (line_header::add_file_name): Use dir_index.
9146 (read_formatted_entries): Use gdb::optional. Read form before
9147 writting to file_entry.
9148 (dwarf_decode_line_header): Use dir_index.
9149 (lnp_state_machine::current_file): Use to_underlying.
9150 (lnp_state_machine::file): Change type to file_name_index.
9151 (dwarf_record_line): Use to_underlying.
9152 (init_lnp_state_machine): Use file_name_index.
9153 (dwarf_decode_lines_1): Use dir_index and file_name_index.
9154
d194f1fe
PA
91552017-04-04 Pedro Alves <palves@redhat.com>
9156
9157 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9158 operator bool, has_value and get methods.
9159
fff8551c
PA
91602017-04-04 Pedro Alves <palves@redhat.com>
9161
9162 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9163 fields.
9164 (line_header): Initialize all data fields. Change type of
9165 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9166 Change type of include_dirs to std::vector<const char *>. Remove
9167 num_include_dirs, include_dirs_size. Change type of file_names to
9168 std::vector<file_entry>. Remove num_file_names, file_names_size.
9169 (line_header::line_header): New.
9170 (line_header::add_include_dir, line_header::add_file_name): New
9171 methods.
9172 (line_header::include_dir_at): Remove NULL check.
9173 (line_header::file_name_at): Add const overload.
9174 (line_header_up): New unique_ptr typedef.
9175 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
9176 std::vector. Remove free_line_header call.
9177 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
9178 free_line_header call.
9179 (free_cu_line_header): Delete.
9180 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9181 (setup_type_unit_groups): Use line_header_up instead of cleanups.
9182 Adjust to use std::vector.
9183 (free_line_header): Delete.
9184 (free_line_header_voidp): Use delete.
9185 (add_include_dir): Replace with ...
9186 (line_header::add_include_dir): ... this method. Use std::vector.
9187 (add_file_name): Replace with ...
9188 (line_header::add_file_name): ... this method. Use std::vector.
9189 (add_include_dir_stub): Delete.
9190 (read_formatted_entries): Remove memset.
9191 (dwarf_decode_line_header): Return a line_header_up instead of a
9192 raw pointer. Remove cleanup handling. Pass lambdas to
9193 read_formatted_entries. Adjust to use line_header methods.
9194 (dwarf_decode_lines_1): Adjust to use line_header methods.
9195 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9196 use std::vector.
9197
d62a8ae2
SM
91982017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
9199
9200 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9201 instead of struct ptid.
9202
db3a1dc7
AH
92032017-05-04 Alan Hayward <alan.hayward@arm.com>
9204
9205 * frame.c (get_frame_register_bytes): Unwind using value.
9206 (put_frame_register_bytes): Likewise.
9207
b1b45502
IB
92082017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
9209
9210 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9211 aggregate-like.
9212
ec13808e
JK
92132017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
9214
9215 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9216
12316564
YQ
92172017-03-29 Yao Qi <yao.qi@linaro.org>
9218
9219 * gdbthread.h (struct thread_info): Declare constructor and
9220 destructor. Add some in-class member initializers.
9221 * thread.c (free_thread): Remove.
9222 (init_thread_list): Call delete instead of free_thread.
9223 (new_thread): Call thread_info constructor.
9224 (thread_info::thread_info): New function.
9225 (thread_info::~thread_info): New function.
9226 (delete_thread_1): Call delete instead of free_thread.
9227 (make_cleanup_restore_current_thread): Move tp and frame to
9228 inner block.
9229
fe5f7374
AK
92302017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9231
9232 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9233 (arc_skip_prologue): Likewise.
9234 (arc_make_frame_cache): Likewise.
9235 (arc_pv_get_operand): New function.
9236 (arc_is_in_prologue): Likewise.
9237 (arc_analyze_prologue): Likewise.
9238 (arc_print_frame_cache): Likewise.
9239 (MAX_PROLOGUE_LENGTH): New constant.
9240
eea78757
AK
92412017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9242
9243 * configure.tgt: Add arc-insn.o.
9244 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9245 (dump_arc_instruction_command): New function.
9246 (arc_fprintf_disasm): Likewise.
9247 (arc_disassemble_info): Likewise.
9248 (arc_insn_get_operand_value): Likewise.
9249 (arc_insn_get_operand_value_signed): Likewise.
9250 (arc_insn_get_memory_base_reg): Likewise.
9251 (arc_insn_get_memory_offset): Likewise.
9252 (arc_insn_get_branch_target): Likewise.
9253 (arc_insn_dump): Likewise.
9254 (arc_insn_get_linear_next_pc): Likewise.
9255 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9256 (arc_disassemble_info): Likewise.
9257 (arc_insn_get_branch_target): Likewise.
9258 (arc_insn_get_linear_next_pc): Likewise.
9259 * NEWS: Mention new "maint print arc arc-instruction".
9260
3be78afd
AK
92612017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9262
9263 * arc-tdep (maintenance_print_arc_list): New variable.
9264 (maintenance_print_arc_command): New function.
9265
296ec4fa
AK
92662017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9267
9268 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9269 Add "limm" and "reserved".
9270 (arc_cannot_fetch_register, arc_cannot_store_register): Add
9271 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9272 * arc-tdep.h (arc_regnum): Likewise.
9273
f74f865e
MF
92742017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9275
9276 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9277 for THREADPTR register.
9278 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9279 register.
9280 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9281 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9282 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9283
0d0bf81a
MF
92842017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9285
9286 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9287 registers above gdbarch_num_regs (gdbarch) as privileged in
9288 call0 ABI.
9289
0ce4291e
MF
92902017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9291
9292 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9293 for a single specified register or for all registers in
9294 a0_base..a0_base + C0_NREGS range.
9295 (supply_gregset_reg): Call regcache_raw_supply for a single
9296 specified register or for all registers in a0_base..a0_base +
9297 C0_NREGS range.
9298
c56054f9
MF
92992017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9300
9301 * arch/xtensa.h (C0_NREGS): Add definition.
9302 * xtensa-tdep.c (C0_NREGS): Remove definition.
9303
a4398628
MF
93042017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9305
9306 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9307 Drop xtensa_default_isa initialization.
9308 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9309
8c43009f
PA
93102017-03-27 Pedro Alves <palves@redhat.com>
9311
9312 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9313 (file_entry::include_dir): New method.
9314 (line_header::include_dir_at, line_header::file_name_at): New
9315 methods.
9316 (setup_type_unit_groups, setup_type_unit_groups)
9317 (psymtab_include_file_name): Simplify using the new methods.
9318 (lnp_state_machine) <the_line_header>: New field.
9319 <file>: Add comment.
9320 (lnp_state_machine::current_file): New method.
9321 (dwarf_record_line): Simplify using the new methods.
9322 (init_lnp_state_machine): Initialize the "the_line_header" field.
9323 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9324 Simplify using the new methods.
9325
a7e80b9e
PA
93262017-03-27 Pedro Alves <palves@redhat.com>
9327
9328 * cp-name-parser.y (make_empty): Delete.
9329 (demangler_special, nested_name, ptr_operator, array_indicator)
9330 (direct_declarator, declarator_1): Use fill_comp instead of
9331 make_empty.
9332
21047726
PA
93332017-03-27 Pedro Alves <palves@redhat.com>
9334
9335 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9336 to ATTRIBUTE_PRINTF.
9337 * solib-target.c (library_list_start_list): Print "string" not
9338 "version".
9339 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9340 gdb_xml_error call.
9341
d721ba37
PA
93422017-03-27 Pedro Alves <palves@redhat.com>
9343
9344 * dwarf2read.c (struct file_and_directory): New.
9345 (dwarf2_get_dwz_file): Adjust to use std::string.
9346 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9347 (find_file_and_directory): Adjust to return a file_and_directory
9348 object.
9349 (read_file_scope): Adjust to use file_and_directory. Remove
9350 make_cleanup/do_cleanups calls.
9351 (open_and_init_dwp_file): Adjust to use std::string. Remove
9352 make_cleanup/do_cleanups calls.
9353 * python/python.c (do_start_initialization): Adjust to ldirname
9354 returning a std::string.
9355 * utils.c (ldirname): Now returns a std::string.
9356 * utils.h (ldirname): Change return type to std::string.
9357 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9358 returning a std::string.
9359 * xml-tdesc.c (file_read_description_xml): Likewise.
9360
ed771251
AH
93612017-03-24 Alan Hayward <alan.hayward@arm.com>
9362
9363 * regcache.c (regcache_debug_print_register): New function.
9364 * regcache.h (regcache_debug_print_register): New declaration.
9365 * target.c (debug_print_register): Remove.
9366 (target_fetch_registers): Call regcache_debug_print_register.
9367 (target_store_registers): Likewise.
9368
568c1b9f
PB
93692017-03-24 Pádraig Brady <pbrady@fb.com>
9370
9371 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9372 reference beyond the 'lh->include_dirs' array before accessing to
9373 it.
9374 (psymtab_include_file_name): Likewise.
9375 (dwarf_decode_lines_1): Likewise.
9376 (dwarf_decode_lines): Likewise.
9377 (file_file_name): Likewise.
9378
3e00d44f
SM
93792017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9380
9381 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9382 inferior_ptid.
9383 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9384 ps_lsetfpregs): Likewise.
9385 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9386 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9387 ps_lsetfpregs): Likewise.
9388 * target.c (target_fetch_registers, target_store_registers):
9389 Remove asserts.
9390
077ae656
AH
93912017-03-23 Alan Hayward <alan.hayward@arm.com>
9392
9393 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9394
1e2b521d
YQ
93952017-03-23 Yao Qi <yao.qi@linaro.org>
9396
9397 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9398 (_initialize_aarch64_tdep): Register it.
9399 (aarch64_record_load_store): Handle PRFM instruction.
9400 (aarch64_process_record_test): New function.
9401
33877125
YQ
94022017-03-23 Yao Qi <yao.qi@linaro.org>
9403
9404 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9405 indentation.
9406
a0eef940
YQ
94072017-03-23 Yao Qi <yao.qi@linaro.org>
9408
9409 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9410
3f2a3564
PR
94112017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9412
9413 python/python.c (do_start_initialization): Fix memory leak.
9414
b67aeab0
SM
94152017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9416
9417 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9418 using get_ptrace_pid.
9419 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9420 inferior_ptid.
9421 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9422 inferior_ptid instead of pid.
9423
ffdbe864
YQ
94242017-03-22 Yao Qi <yao.qi@linaro.org>
9425
9426 * aarch64-tdep.c: Wrap locally used classes in anonymous
9427 namespace.
9428 * arm-tdep.c: Likewise.
9429 * linespec.c: Likewise.
9430 * ui-out.c: Likewise.
9431
9d736fbf
JG
94322017-03-22 Jonah Graham <jonah@kichwacoders.com>
9433
9434 PR gdb/19637
9435 * python/lib/gdb/printer/bound_registers.py: Import sys.
9436
3de88e9a
SM
94372017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9438
9439 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9440 windows_thread_info parameter and use it instead of
9441 current_thread.
9442 (windows_fetch_inferior_registers): Don't set current_thread,
9443 pass the thread to do_windows_fetch_inferior_registers. Use
9444 ptid from regcache instead of inferior_ptid.
9445 (do_windows_store_inferior_registers): Add windows_thread_info
9446 parameter and use it instead of current_thread.
9447 (windows_store_inferior_registers): Don't set current_thread,
9448 pass the thread to do_windows_store_inferior_registers. Use
9449 ptid from regcache instead of inferior_ptid.
9450
0e7b8f61
SM
94512017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9452
9453 * ser-mingw.c (ser_windows_raw): Remove reference to
9454 struct serial::current_timeout.
9455
5badf10a
IR
94562017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9457
9458 PR tdep/20928
9459 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9460 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9461 (sparc64_fsr_type): Fix %fsr decoding.
9462
cee59b3f
TW
94632017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9464
9465 * python/py-record-btrace.c (btpy_insn_data): Change return type
9466 for Python 2.
9467
639a9038
SM
94682017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9469
9470 * spu-linux-nat.c (spu_fetch_inferior_registers,
9471 spu_store_inferior_registers): Use ptid from regcache, set and
9472 restore inferior_ptid.
9473 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9474 Likewise.
9475
bcc0c096
SM
94762017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9477
9478 * i386-linux-nat.c (fetch_register, store_register,
9479 i386_linux_fetch_inferior_registers,
9480 i386_linux_store_inferior_registers): Use ptid from regcache.
9481 * ia64-linux-nat.c (ia64_linux_fetch_register,
9482 ia64_linux_store_register): Likewise.
9483 * inf-ptrace.c (inf_ptrace_fetch_register,
9484 inf_ptrace_store_register): Likewise.
9485 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9486 m32r_linux_store_inferior_registers): Likewise.
9487 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9488 m68kbsd_store_inferior_registers): Likewise.
9489 * m68k-linux-nat.c (fetch_register, store_register,
9490 m68k_linux_fetch_inferior_registers,
9491 m68k_linux_store_inferior_registers): Likewise.
9492 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9493 m88kbsd_store_inferior_registers): Likewise.
9494 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9495 mips_fbsd_store_inferior_registers): Likewise.
9496 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9497 mips64_linux_regsets_store_registers): Likewise.
9498 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9499 mipsnbsd_store_inferior_registers): Likewise.
9500 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9501 mips64obsd_store_inferior_registers): Likewise.
9502 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9503 Likewise.
9504 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9505 ppcfbsd_store_inferior_registers): Likewise.
9506 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9507 ppc_linux_store_inferior_registers): Likewise.
9508 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9509 ppcnbsd_store_inferior_registers): Likewise.
9510 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9511 ppcobsd_store_registers): Likewise.
9512 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9513 Likewise.
9514 * ravenscar-thread.c (ravenscar_fetch_registers,
9515 ravenscar_store_registers, ravenscar_prepare_to_store):
9516 Likewise.
9517 * record-btrace.c (record_btrace_fetch_registers,
9518 record_btrace_store_registers, record_btrace_prepare_to_store):
9519 Likewise.
9520 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9521 Lookup inferior using ptid from regcache, instead of
9522 current_inferior.
9523 * remote.c (remote_fetch_registers, remote_store_registers): Use
9524 ptid from regcache.
9525 * rs6000-nat.c (fetch_register, store_register): Likewise.
9526 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9527 s390_linux_store_inferior_registers): Likewise.
9528 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9529 shnbsd_store_inferior_registers): Likewise.
9530 * sol-thread.c (sol_thread_fetch_registers,
9531 sol_thread_store_registers): Likewise.
9532 * sparc-nat.c (sparc_fetch_inferior_registers,
9533 sparc_store_inferior_registers): Likewise.
9534 * tilegx-linux-nat.c (fetch_inferior_registers,
9535 store_inferior_registers): Likewise.
9536 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9537 vaxbsd_store_inferior_registers): Likewise.
9538 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9539 store_xtregs): Likewise.
9540
c0f55cc6
AV
95412017-03-20 Artemiy Volkov <artemiyv@acm.org>
9542
9543 PR gdb/14441
9544 * NEWS: Mention support for rvalue references in GDB and python.
9545 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9546 supports both lvalue and rvalue references.
9547
15c0a2a9
AV
95482017-03-20 Artemiy Volkov <artemiyv@acm.org>
9549
9550 PR gdb/14441
9551 * gdbtypes.c (rank_one_type): Implement overloading
9552 resolution rules regarding rvalue references.
9553
aa006118
AV
95542017-03-20 Artemiy Volkov <artemiyv@acm.org>
9555
9556 PR gdb/14441
9557 * aarch64-tdep.c (aarch64_type_align)
9558 (aarch64_extract_return_value, aarch64_store_return_value): Change
9559 lvalue reference type checks to general reference type checks.
9560 * amd64-tdep.c (amd64_classify): Likewise.
9561 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9562 Likewise.
9563 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9564 (arm_store_return_value): Likewise.
9565 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9566 * c-typeprint.c (c_print_type): Likewise.
9567 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9568 (cplus_number_of_children, cplus_describe_child): Likewise.
9569 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9570 * completer.c (expression_completer): Likewise.
9571 * cp-support.c (make_symbol_overload_list_adl_namespace):
9572 Likewise.
9573 * darwin-nat-info.c (info_mach_region_command): Likewise.
9574 * dwarf2loc.c (entry_data_value_coerce_ref)
9575 (value_of_dwarf_reg_entry): Likewise.
9576 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9577 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9578 Likewise.
9579 * findvar.c (extract_typed_address, store_typed_address):
9580 Likewise.
9581 * gdbtypes.c (rank_one_type): Likewise.
9582 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9583 * infcall.c (value_arg_coerce): Likewise.
9584 * language.c (pointer_type): Likewise.
9585 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9586 Likewise.
9587 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9588 * mn10300-tdep.c (mn10300_type_align): Likewise.
9589 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9590 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9591 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9592 Likewise.
9593 * printcmd.c (print_formatted, x_command): Likewise.
9594 * python/py-type.c (typy_get_composite, typy_template_argument):
9595 Likewise.
9596 * python/py-value.c (valpy_referenced_value)
9597 (valpy_get_dynamic_type, value_has_field): Likewise.
9598 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9599 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9600 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9601 * spu-tdep.c (spu_scalar_value_p): Likewise.
9602 * symtab.c (lookup_symbol_aux): Likewise.
9603 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9604 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9605 Likewise.
9606 * valops.c (value_cast_pointers, value_cast)
9607 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9608 (value_struct_elt, value_struct_elt_bitpos)
9609 (value_find_oload_method_list, find_overload_match)
9610 (value_rtti_indirect_type): Likewise.
9611 * valprint.c (val_print_scalar_type_p, generic_val_print):
9612 Likewise.
9613 * value.c (value_actual_type, value_as_address, unpack_long)
9614 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9615 (coerce_ref): Likewise.
9616 * varobj.c (varobj_get_value_type): Likewise.
9617
3fcf899d
AV
96182017-03-20 Artemiy Volkov <artemiyv@acm.org>
9619
9620 PR gdb/14441
9621 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9622 table of constants.
9623 * python/lib/gdb/command/explore.py: Support exploring values
9624 of rvalue reference types.
9625 * python/lib/gdb/types.py: Implement get_basic_type() for
9626 rvalue reference types.
9627 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9628 constant.
9629 * python/py-value.c (valpy_getitem): Add an rvalue reference
9630 check.
9631 (valpy_reference_value): Add new parameter "refcode".
9632 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9633 New wrappers for valpy_reference_value().
9634 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9635 (gdbpy_invoke_xmethod): Likewise.
9636
4297a3f0
AV
96372017-03-20 Artemiy Volkov <artemiyv@acm.org>
9638
9639 PR gdb/14441
9640 * dwarf2read.c (process_die, read_type_die_1): Handle the
9641 DW_TAG_rvalue_reference_type DIE.
9642 (read_tag_reference_type): Add new parameter "refcode".
9643
e1cb3213
AV
96442017-03-20 Artemiy Volkov <artemiyv@acm.org>
9645
9646 PR gdb/14441
9647 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9648 (c_type_print_modifier, c_type_print_varspec_suffix)
9649 (c_type_print_base): Support printing rvalue reference types.
9650 * c-valprint.c (c_val_print, c_value_print): Support printing
9651 rvalue reference values.
9652
e4347c89
AV
96532017-03-20 Artemiy Volkov <artemiyv@acm.org>
9654
9655 PR gdb/14441
9656 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9657 typename.
9658 * cp-support.c (replace_typedefs): Handle
9659 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9660 * python/py-type.c (typy_lookup_type): Likewise.
9661
53cc15f5
AV
96622017-03-20 Artemiy Volkov <artemiyv@acm.org>
9663
9664 PR gdb/14441
9665 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9666 * parse.c (insert_type): Change assert statement.
9667 (follow_types): Handle rvalue reference types.
9668 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9669 constant.
9670
a65cfae5
AV
96712017-03-20 Artemiy Volkov <artemiyv@acm.org>
9672
9673 PR gdb/14441
9674 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9675 value_ref() interface.
9676 * c-valprint.c (c_value_print): Likewise.
9677 * infcall.c (value_arg_coerce): Likewise.
9678 * python/py-value.c (valpy_reference_value): Likewise.
9679 * valops.c (value_cast, value_reinterpret_cast)
9680 (value_dynamic_cast, typecmp): Likewise.
9681 (value_ref): Parameterize by kind of return value reference type.
9682 * value.h (value_ref): Add new parameter "refcode".
9683
3b224330
AV
96842017-03-20 Artemiy Volkov <artemiyv@acm.org>
9685
9686 PR gdb/14441
9687 * dwarf2read.c (read_tag_reference_type): Use
9688 lookup_lvalue_reference_type() instead of lookup_reference_type().
9689 * eval.c (evaluate_subexp_standard): Likewise.
9690 * f-exp.y: Likewise.
9691 * gdbtypes.c (make_reference_type, lookup_reference_type):
9692 Generalize with rvalue reference types.
9693 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9694 convenience wrappers for lookup_reference_type().
9695 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9696 reference kind parameter.
9697 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9698 wrappers for lookup_reference_type().
9699 * guile/scm-type.c (gdbscm_type_reference): Use
9700 lookup_lvalue_reference_type() instead of lookup_reference_type().
9701 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9702 * parse.c (follow_types): Likewise.
9703 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9704 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9705 Likewise.
9706 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9707 (gdbpy_invoke_xmethod): Likewise.
9708 * stabsread.c: Provide extra argument to make_reference_type()
9709 call.
9710 * valops.c (value_ref, value_rtti_indirect_type): Use
9711 lookup_lvalue_reference_type() instead of lookup_reference_type().
9712
f9aeb8d4
AV
97132017-03-20 Artemiy Volkov <artemiyv@acm.org>
9714
9715 PR gdb/14441
9716 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9717 (TYPE_IS_REFERENCE): New macro.
9718 (struct type): Add rvalue_reference_type field.
9719 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9720
51457a05
MAL
97212017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9722
9723 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9724 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9725 New function definition.
9726 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9727 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9728 New function declaration.
9729 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9730 * mi/mi-interp.h: New file.
9731 * solib.c (info_sharedlibrary_command): Replace for loop with
9732 ALL_SO_LIBS macro
9733 * solib.h (update_solib_list): New function declaration.
9734 (so_list_head): Move macro.
9735 * solist.h (ALL_SO_LIBS): New macro.
9736
e696b3ad
MAL
97372017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9738
9739 * infcmd.c (post_create_inferior): Remove unused argument in
9740 call to solib_add.
9741 * remote.c (remote_start_remote): Likewise.
9742 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9743 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9744 (enable_break): Likewise.
9745 * solib.c (update_solib_list): Remove unused target argument
9746 and its documentation.
9747 (solib_add): Remove unused target argument. Remove unused
9748 argument in call to update_solib_list.
9749 (info_sharedlibrary_command): Remove unused argument in call
9750 to update_solib_list.
9751 (sharedlibrary_command): Remove unused argument in call to
9752 solib_add.
9753 (handle_solib_event): Likewise.
9754 (reload_shared_libraries): Likewise.
9755 * solib.h (solib_add): Remove unused target argument.
9756
dcb84eda
AA
97572017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9758
9759 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9760 (s390_displaced_step_fixup): Cover relative branches with the
9761 default fixup handling. This fixes lack of support for some
9762 relative branch instructions.
9763
d9cb6cdc
SM
97642017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9765
9766 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9767 ptid from regcache.
9768
1afaf9f4
SM
97692017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9770
9771 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9772 i386_darwin_store_inferior_registers): Use ptid from regcache.
9773
aac12e24
SM
97742017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9775
9776 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9777 i386bsd_store_inferior_registers): Use ptid from regcache.
9778
bbe1eef1
SM
97792017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9780
9781 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9782 hppaobsd_store_registers): Use ptid from regcache.
9783
10799020
SM
97842017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9785
9786 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9787 hppanbsd_store_registers): Use ptid from regcache.
9788
00204cf7
SM
97892017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9790
9791 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9792 from regcache. Use get_ptrace_pid.
9793
11a33714
SM
97942017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9795
9796 * corelow.c (get_core_register_section): Use ptid from regcache,
9797 update doc.
9798
317cd492
SM
97992017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9800
9801 * bsd-uthread.c (bsd_uthread_fetch_registers,
9802 bsd_uthread_store_registers): Use ptid from regcache, set and
9803 restore inferior_ptid.
9804
9ac8a7c2
SM
98052017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9806
9807 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9808 fetch_fp_regs, store_register, store_regs, store_fp_register,
9809 store_fp_regs): Use ptid from regcache.
9810
4ac4bb6a
SM
98112017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9812
9813 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9814 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9815 store_vfp_regs): Use ptid from regcache.
9816
9bcbdca8
PA
98172017-03-17 Pedro Alves <palves@redhat.com>
9818
9819 PR remote/21188
9820 * ser-base.c (ser_base_wait_for): Add comment.
9821 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9822 version.
9823 * ser-unix.c (hardwire_raw): Remove reference to
9824 scb->current_timeout.
9825 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9826 (hardwire_ops): Install ser_base_readchar instead of
9827 hardwire_readchar.
9828 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9829 Remove fields.
9830
7503099f
JG
98312017-03-17 Jonah Graham <jonah@kichwacoders.com>
9832
9833 PR gdb/19637
9834 * python/lib/gdb/printer/bound_registers.py: Add support for
9835 Python 3.
9836
7942e96e
AA
98372017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9838
9839 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9840 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9841 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9842 byte_offset to subobj_byte_offset. Fix the handling of
9843 DWARF_VALUE_STACK on big-endian targets when coming via an
9844 implicit pointer.
9845 (dwarf2_evaluate_loc_desc): Adjust call to
9846 dwarf2_evaluate_loc_desc_full.
9847 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9848 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9849
ba14f379
YQ
98502017-03-16 Yao Qi <yao.qi@linaro.org>
9851
9852 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9853 and REVSH instructions.
9854
b121eeb9
YQ
98552017-03-16 Yao Qi <yao.qi@linaro.org>
9856
9857 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9858 (arm_record_test): Declare.
9859 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9860 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9861 align with the manual.
9862 (thumb_record_misc): Adjust the code order to align with the
9863 manual.
9864 (thumb2_record_decode_insn_handler): Fix instruction matching.
9865 (instruction_reader_thumb): New class.
9866 (arm_record_test): New function.
9867
728a7913
YQ
98682017-03-16 Yao Qi <yao.qi@linaro.org>
9869
9870 * arm-tdep.c (abstract_memory_reader): New class.
9871 (instruction_reader): New class.
9872 (extract_arm_insn): Add argument 'reader'. Callers updated.
9873 (decode_insn): Likewise.
9874
34b43320
DE
98752017-03-16 Doug Evans <dje@google.com>
9876
a7c0469f
DE
9877 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9878 member. Change type of TYPE member to SCM. All uses updated.
9879 (lsscm_make_lazy_string_smob): Add assert.
9880 (lsscm_make_lazy_string): Flag bad length values.
9881 (lsscm_elt_type): New function.
9882 (gdbscm_lazy_string_to_value): Rewrite to use
9883 lsscm_safe_lazy_string_to_value.
9884 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9885 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9886 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9887 in incoming type.
9888 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9889 * guile/scm-type.c (tyscm_scm_to_type): New function.
9890
98912017-03-15 Doug Evans <dje@google.com>
9892
34b43320
DE
9893 PR python/17728, python/18439, python/18779
9894 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9895 member. Change type of TYPE member to PyObject *. All uses updated.
9896 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9897 (gdbpy_create_lazy_string_object): Flag bad length values.
9898 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9899 Handle typedefs in incoming type.
9900 (stpy_lazy_string_elt_type): New function.
9901 (gdbpy_extract_lazy_string): Call it.
9902 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9903 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9904 typedefs in incoming type.
9905
a3a5fecc
DE
99062017-03-16 Doug Evans <dje@google.com>
9907
9908 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9909 * guile/scm-type.c (tyscm_scm_to_type): New function.
9910
28f1c605
JW
99112017-03-16 Jiong Wang <jiong.wang@arm.com>
9912
9913 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9914 "ULONGEST" for "skip".
9915
87c336f6
AA
99162017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9917
9918 PR gdb/21220
9919 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9920 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9921 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9922 over ptrace peek/poke until end of buffer or error.
9923
cf81cf60
SM
99242017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9925
9926 * parse.c (length_of_subexp): Make static.
9927 * parser-defs.h (length_of_subexp): Remove.
9928
a379284a
AA
99292017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9930
9931 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9932 as well.
9933
8a6200ba
PA
99342017-03-14 Pedro Alves <palves@redhat.com>
9935
9936 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9937 (main): Use std::unique_ptr. Remove calls to
9938 cp_demangled_name_parse_free.
9939
f79ec206
SM
99402017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9941
9942 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9943 alphabsd_store_inferior_registers): Use regcache->ptid instead
9944 of inferior_ptid.
9945
edb5fb00
SM
99462017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9947
9948 * aix-thread.c (aix_thread_fetch_registers,
9949 aix_thread_store_registers): Use regcache->ptid instead of
9950 inferior_ptid.
9951
55119686
SM
99522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9953
9954 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9955 store_gregs_to_thread, fetch_fpregs_from_thread,
9956 store_fpregs_to_thread): Use regcache->ptid instead of
9957 inferior_ptid.
9958
6a06fbb7
SM
99592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9960
9961 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9962 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9963 instead of inferior_ptid.
9964
c6386875
SM
99652017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9966
9967 * target.c (target_fetch_registers, target_store_registers): Add
9968 assert.
9969
ddaaf0fb
SM
99702017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9971
9972 * regcache.h (regcache_get_ptid): New function.
9973 * regcache.c (regcache_get_ptid): New function.
9974
b9da89d1 99752017-03-13 Mark Wielaard <mark@klomp.org>
9976
9977 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9978
5f4d1085
KS
99792017-03-10 Keith Seitz <keiths@redhat.com>
9980
9981 PR c++/8218
9982 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9983
c65d6b55
PA
99842017-03-08 Pedro Alves <palves@redhat.com>
9985
9986 PR gdb/18360
9987 * infrun.c (start_step_over, do_target_resume, resume)
9988 (restart_threads): Assert we're not resuming a thread that is
9989 meant to be stopped.
9990 (infrun_thread_stop_requested_callback): Delete.
9991 (infrun_thread_stop_requested): If the thread is internally
9992 stopped, queue a pending stop event and clear the thread's
9993 inline-frame state.
9994 (handle_stop_requested): New function.
9995 (handle_syscall_event, handle_inferior_event_1): Use
9996 handle_stop_requested.
9997 (handle_stop_requested): New function.
9998 (handle_signal_stop): Set the thread's stop_signal here instead of
9999 at caller.
10000 (finish_step_over): Clear step over info unconditionally.
10001 (handle_signal_stop): If the user had interrupted the event
10002 thread, consider the stop a random signal.
10003 (handle_signal_stop) <signal arrived while stepping over
10004 breakpoint>: Don't restart threads here.
10005 (stop_waiting): Don't clear step-over info here.
10006
15c22686
PA
100072017-03-08 Pedro Alves <palves@redhat.com>
10008
10009 PR 21206
10010 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10011 goes to argument 2, not 1.
10012
6e5d74e7
PA
100132017-03-08 Pedro Alves <palves@redhat.com>
10014
10015 PR cli/21218
10016 * top.c (gdb_readline_wrapper): Avoid passing NULL to
10017 display_gdb_prompt.
10018 (command_line_input): Add comment.
10019
9753a2f6
PA
100202017-03-08 Pedro Alves <palves@redhat.com>
10021
10022 PR tui/21216
10023 * tui/tui-file.c (tui_file::write): New.
10024 * tui/tui-file.h (tui_file): Override "write".
10025 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10026 factored out from ...
10027 (tui_puts): ... here.
10028 (tui_putc): Use them.
10029 (tui_write): New function.
10030 * tui/tui-io.h (tui_write): Declare.
10031
1672e0d9
SDJ
100322017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
10033
10034 * Makefile.in (SFILES): Replace "environ.c" with
10035 "common/environ.c".
10036 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10037 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
10038 to...
10039 * common/environ.c: ... here.
10040 * environ.h: Moved to...
10041 * common/environ.h: ... here.
10042
f7bb4e3a
PB
100432017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10044
10045 * gdbarch.sh (pstring_ptr): New static function.
10046 (gdbarch_disassembler_options): Use it.
10047 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10048 not valid_disassembler_option->name.
10049 * gdbarch.c: Regenerate.
10050
e45ced6c
PB
100512017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10052
10053 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10054
5f6fd321
PA
100552017-03-07 Pedro Alves <palves@redhat.com>
10056
10057 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10058
6dbb839a 100592017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
10060
10061 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10062 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10063 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 10064 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 10065
d274ecf4
SM
100662017-03-06 Simon Marchi <simon.marchi@ericsson.com>
10067
10068 * xtensa-linux-nat.c (fetch_gregs): Remove const.
10069
df97be55
SM
100702017-03-03 Simon Marchi <simon.marchi@ericsson.com>
10071
10072 * remote.c (remote_add_target_side_commands): Use range-based
10073 for loop.
10074
7d45f3df
YQ
100752017-03-03 Yao Qi <yao.qi@linaro.org>
10076
10077 PR gdb/21165
10078 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10079 value is lazy.
10080 * valprint.c (common_val_print): Likewise.
10081
65b48a81
PB
100822017-02-28 Peter Bergner <bergner@vnet.ibm.com>
10083
10084 * NEWS: Mention new set/show disassembler-options commands.
10085 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10086 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10087 (prospective_options): New static variable.
10088 (gdb_disassembler::gdb_disassembler): Initialize
10089 m_di.disassembler_options.
10090 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10091 (get_disassembler_options): New function.
10092 (set_disassembler_options): Likewise.
10093 (set_disassembler_options_sfunc): Likewise.
10094 (show_disassembler_options_sfunc): Likewise.
10095 (disassembler_options_completer): Likewise.
10096 (_initialize_disasm): Likewise.
10097 * disasm.h (get_disassembler_options): New prototype.
10098 (set_disassembler_options): Likewise.
10099 * gdbarch.sh (gdbarch_disassembler_options): New variable.
10100 (gdbarch_verify_disassembler_options): Likewise.
10101 * gdbarch.c: Regenerate.
10102 * gdbarch.h: Likewise.
10103 * arm-tdep.c (num_disassembly_options): Delete.
10104 (set_disassembly_style): Likewise.
10105 (arm_disassembler_options): New static variable.
10106 (set_disassembly_style_sfunc): Convert short style name into long
10107 option name. Call set_disassembler_options.
10108 (show_disassembly_style_sfunc): New function.
10109 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10110 set_gdbarch_verify_disassembler_options.
10111 (_initialize_arm_tdep): Delete regnames variable and update callers.
10112 (arm_disassembler_options): Initialize.
10113 (disasm_options): New variable.
10114 (num_disassembly_options): Rename from this...
10115 (num_disassembly_styles): ...to this. Compute by scanning through
10116 disasm_options.
10117 (valid_disassembly_styles): Initialize using disasm_options.
10118 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10119 set_arm_regname_option.
10120 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10121 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10122 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10123 set_gdbarch_verify_disassembler_options.
10124 * s390-tdep.c (s390_disassembler_options): New static variable.
10125 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10126 set_gdbarch_verify_disassembler_options.
10127
d538e36d
SM
101282017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10129
10130 * remote.c (remote_add_target_side_condition): Remove "struct"
10131 keyword from range-based for loop.
10132
83621223
SM
101332017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10134
10135 * remote.c (remote_add_target_side_condition): Use range-based
10136 for loop. Update comment.
10137
2123df0e
YQ
101382017-02-27 Yao Qi <yao.qi@linaro.org>
10139
10140 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10141
8e368124
AH
101422017-02-26 Alan Hayward <alan.hayward@arm.com>
10143
10144 * regcache.c (regcache_raw_update): New function.
10145 (regcache_raw_read): Move code to regcache_raw_update.
10146 * regcache.h (regcache_raw_update): New declaration.
10147 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10148
a49dd8dd
JK
101492017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
10150
10151 * dwarf2read.c (create_debug_type_hash_table): Initialize
10152 header.signature and header.type_offset_in_tu.
10153
34e4bae9
PA
101542017-02-24 Pedro Alves <palves@redhat.com>
10155
10156 * symtab.c (make_file_symbol_completion_list_1): Use
10157 add_symtab_completions.
10158
b0e4b369
AH
101592017-02-24 Alan Hayward <alan.hayward@arm.com>
10160
10161 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10162
975c21ab
AH
101632017-02-24 Alan Hayward <alan.hayward@arm.com>
10164
10165 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10166 I386_MAX_REGISTER_SIZE.
10167 (i386_pseudo_register_write): Likewise.
10168 (i386_process_record): Likewise.
10169 * i387-tdep.c (i387_supply_xsave): Likewise.
10170 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10171 (store_register): Likewise.
10172
14bc53a8
PA
101732017-02-23 Pedro Alves <palves@redhat.com>
10174
10175 * ada-lang.c: Include "common/function-view.h".
10176 (ada_iterate_over_symbols): Adjust to use function_view as
10177 callback type.
10178 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10179 (ada_make_symbol_completion_list): Use a lambda.
10180 (ada_exc_search_name_matches): Delete.
10181 (name_matches_regex): New.
10182 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10183 * compile/compile-c-support.c: Include "common/function-view.h".
10184 (print_one_macro): Change prototype to accept a ui_file pointer.
10185 (write_macro_definitions): Use a lambda.
10186 * dwarf2read.c: Include "common/function-view.h".
10187 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10188 (dw2_expand_symtabs_matching): Adjust to use function_view as
10189 callback type.
10190 * language.h: Include "common/function-view.h".
10191 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10192 function_view as callback type.
10193 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10194 * linespec.c: Include "common/function-view.h".
10195 (collect_info::add_symbol): New method.
10196 (struct symbol_and_data_callback, iterate_inline_only, struct
10197 symbol_matcher_data, iterate_name_matcher): Delete.
10198 (iterate_over_all_matching_symtabs): Adjust to use function_view
10199 as callback type and lambdas.
10200 (iterate_over_file_blocks): Adjust to use function_view as
10201 callback type.
10202 (decode_compound_collector): Now a class with private fields.
10203 (decode_compound_collector::release_symbols): New method.
10204 (collect_one_symbol): Rename to...
10205 (decode_compound_collector::operator()): ... this and adjust.
10206 (lookup_prefix_sym): decode_compound_collector construction bits
10207 move to decode_compound_collector ctor. Pass the
10208 decode_compound_collector object directly as callback. Remove
10209 cleanups and use decode_compound_collector::release_symbols
10210 instead.
10211 (symtab_collector): Now a class with private fields.
10212 (symtab_collector::release_symtabs): New method.
10213 (add_symtabs_to_list): Rename to...
10214 (symtab_collector::operator()): ... this and adjust.
10215 (collect_symtabs_from_filename): symtab_collector construction
10216 bits move to symtab_collector ctor. Pass the symtab_collector
10217 object directly as callback. Remove cleanups and use
10218 symtab_collector::release_symtabs instead.
10219 (collect_symbols): Delete.
10220 (add_matching_symbols_to_info): Use lambdas.
10221 * macrocmd.c (print_macro_callback): Delete.
10222 (info_macro_command): Use a lambda.
10223 (info_macros_command): Pass print_macro_definition as callable
10224 directly.
10225 (print_one_macro): Remove 'ignore' parameter.
10226 (macro_list_command): Adjust.
10227 * macrotab.c (macro_for_each_data::fn): Now a function_view.
10228 (macro_for_each_data::user_data): Delete field.
10229 (foreach_macro): Adjust to call the function_view.
10230 (macro_for_each): Adjust to use function_view as callback type.
10231 (foreach_macro_in_scope): Adjust to call the function_view.
10232 (macro_for_each_in_scope): Adjust to use function_view as callback
10233 type.
10234 * macrotab.h: Include "common/function-view.h".
10235 (macro_callback_fn): Declare a prototype instead of a pointer.
10236 Remove "user_data" parameter.
10237 (macro_for_each, macro_for_each_in_scope): Adjust to use
10238 function_view as callback type.
10239 * psymtab.c (partial_map_expand_apply)
10240 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10241 Adjust to use function_view as callback type and to return bool.
10242 (psym_expand_symtabs_matching): Adjust to use function_view as
10243 callback types.
10244 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10245 to use function_view as callback type and to return bool.
10246 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10247 callback types.
10248 * symfile.c (expand_symtabs_matching): Adjust to use function_view
10249 as callback types.
10250 * symfile.h: Include "common/function-view.h".
10251 (expand_symtabs_file_matcher_ftype)
10252 (expand_symtabs_symbol_matcher_ftype)
10253 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10254 return bool.
10255 (quick_symbol_functions::map_symtabs_matching_filename)
10256 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10257 function_view as callback type and return bool.
10258 (expand_symtabs_matching): Adjust to use function_view as callback
10259 type.
10260 (maintenance_expand_name_matcher)
10261 (maintenance_expand_file_matcher): Delete.
10262 (maintenance_expand_symtabs): Use lambdas.
10263 * symtab.c (iterate_over_some_symtabs): Adjust to use
10264 function_view as callback types and return bool.
10265 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
10266 of a cleanup.
10267 (lookup_symtab_callback): Delete.
10268 (lookup_symtab): Use a lambda.
10269 (iterate_over_symbols): Adjust to use function_view as callback
10270 type.
10271 (struct search_symbols_data, search_symbols_file_matches)
10272 (search_symbols_name_matches): Delete.
10273 (search_symbols): Use a pair of lambdas.
10274 (struct add_name_data, add_macro_name, symbol_completion_matcher)
10275 (symtab_expansion_callback): Delete.
10276 (default_make_symbol_completion_list_break_on_1): Use lambdas.
10277 * symtab.h: Include "common/function-view.h".
10278 (iterate_over_some_symtabs): Adjust to use function_view as
10279 callback type and return bool.
10280 (iterate_over_symtabs): Adjust to use function_view as callback
10281 type.
10282 (symbol_found_callback_ftype): Remove 'data' parameter and return
10283 bool.
10284 (iterate_over_symbols): Adjust to use function_view as callback
10285 type.
10286
07e253aa
PA
102872017-02-23 Pedro Alves <palves@redhat.com>
10288
10289 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10290 (%.o) <unittests/%.c>: New pattern.
10291 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10292 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10293 * common/function-view.h: New file.
10294 * unittests/function-view-selftests.c: New file.
10295 * configure: Regenerate.
10296
8eaf5320
SM
102972017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10298
10299 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10300 inferior_ptid.
10301 * go32-nat.c (go32_thread_alive): Likewise.
10302
38768751
YQ
103032017-02-23 Yao Qi <yao.qi@linaro.org>
10304
10305 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10306 delete.
10307
0a8beaba
YQ
103082017-02-23 Yao Qi <yao.qi@linaro.org>
10309
10310 * varobj.c (varobj_clear_saved_item): Use delete instead of
10311 xfree.
10312 (update_dynamic_varobj_children): Likewise.
10313
58fdfd2c
JK
103142017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10315
10316 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10317
1b90b139
SM
103182017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10319
10320 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10321 m_enum_value to 0 in default constructor.
10322
2039d74e
EBM
103232017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10324
10325 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10326 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10327 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10328 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10329 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10330 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10331 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10332 IS_STORE_CONDITIONAL_INSN.
10333
7814882a
JK
103342017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10335
10336 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10337
0ae60b63
JK
103382017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10339
10340 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10341
0224619f
JK
103422017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10343
10344 * dwarf2read.c (skip_one_die, read_attribute_value)
10345 (dwarf2_const_value_attr, dump_die_shallow)
10346 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10347 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10348
0af92d60
JK
103492017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10350
10351 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10352 (dwarf_parse_macro_header): Accept DWARF version 5.
10353 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10354
216f72a1
JK
103552017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10356
10357 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10358 DW_AT_GNU_*.
10359 * common/common-exceptions.h (enum errors): Likewise.
10360 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10361 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10362 (dwarf_expr_context::execute_stack_op): Likewise.
10363 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10364 Likewise.
10365 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10366 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10367 (show_entry_values_debug, call_site_to_target_addr)
10368 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10369 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10370 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10371 (value_of_dwarf_block_entry, indirect_pieced_value)
10372 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10373 (disassemble_dwarf_expression): Likewise.
10374 * dwarf2read.c (process_die, inherit_abstract_dies)
10375 (read_call_site_scope): Likewise.
10376 * gdbtypes.h (struct func_type, struct call_site_parameter)
10377 (struct call_site): Likewise.
10378 * stack.c (read_frame_arg): Likewise.
10379 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10380
43988095
JK
103812017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10382
10383 * defs.h (read_unsigned_leb128): New declaration.
10384 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10385 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10386 (dwarf2_find_location_expression): Call also
10387 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10388 * dwarf2loc.h (dwarf2_version): New declaration.
10389 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10390 rnglists.
10391 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10392 .debug_rnglists.
10393 (struct dwop_section_names): Add loclists_dwo.
10394 (dwop_section_names): Add .debug_loclists.dwo.
10395 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10396 (struct dwarf2_per_cu_data): Add dwarf_version.
10397 (struct dwo_sections): Add loclists.
10398 (struct attr_abbrev): Add implicit_const.
10399 (read_indirect_line_string): New declaration.
10400 (read_unsigned_leb128): Delete declaration.
10401 (rcuh_kind): New definition.
10402 (read_and_check_comp_unit_head): Change parameter
10403 is_debug_types_section to section_kind.
10404 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10405 (read_comp_unit_head): Change parameter abfd to section, add parameter
10406 section_kind. Handle DWARF-5.
10407 (error_check_comp_unit_head): Accept also DWARF version 5.
10408 (read_and_check_comp_unit_head): Change parameter
10409 is_debug_types_section to section_kind.
10410 (read_and_check_type_unit_head): Delete function.
10411 (read_abbrev_offset): Handle DWARF-5.
10412 (create_debug_type_hash_table): Add parameter section_kind. Process
10413 only DW_UT_type. Use signature and type_offset_in_tu from struct
10414 comp_unit_head.
10415 (create_debug_types_hash_table): Update create_debug_type_hash_table
10416 caller.
10417 (create_all_type_units): Call create_debug_type_hash_table.
10418 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10419 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10420 caller.
10421 (skip_one_die): Handle DW_FORM_implicit_const.
10422 (dwarf2_rnglists_process): New function.
10423 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10424 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10425 (read_attribute_value): Handle DW_FORM_implicit_const,
10426 DW_FORM_line_strp.
10427 (read_attribute): Handle DW_FORM_implicit_const.
10428 (read_indirect_string_at_offset_from): New function from
10429 read_indirect_string_at_offset.
10430 (read_indirect_string_at_offset): Call
10431 read_indirect_string_at_offset_from.
10432 (read_indirect_line_string_at_offset): New function.
10433 (read_indirect_string): New function comment.
10434 (read_indirect_line_string): New function.
10435 (read_unsigned_leb128): Make it global.
10436 (dwarf2_string_attr): Handle DWARF-5.
10437 (add_include_dir_stub, read_formatted_entries): New functions.
10438 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10439 Handle DWARF-5.
10440 (per_cu_header_read_in): Update read_comp_unit_head caller.
10441 (dwarf2_version): New function.
10442 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10443 rnglists.
10444 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10445 fields.
10446
22d2f3ab
JK
104472017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10448
10449 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10450
5f46c5a5
JK
104512017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10452
10453 * dwarf2read.c (dwarf2_ranges_process): New function from
10454 dwarf2_ranges_read.
10455 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10456 dwarf2_ranges_process.
10457
78d4d2c5
JK
104582017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10459
10460 * dwarf2read.c (create_debug_type_hash_table): New function from
10461 create_debug_types_hash_table.
10462 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10463 (create_all_type_units, open_and_init_dwo_file): Update
10464 create_debug_types_hash_table callers.
10465
1b076f25
SDJ
104662017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10467
10468 PR gdb/16188
10469 * fork-child.c (trace_start_error): Fix thinko. va_end should
10470 refer to 'ap', not 'args'.
10471
0db8980c
SDJ
104722017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10473 Pedro Alves <palves@redhat.com>
10474
10475 PR gdb/16188
10476 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10477 calls succeeded.
10478 * fork-child.c (trace_start_error): New function.
10479 (trace_start_error_with_name): Likewise.
10480 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10481 * inf-ptrace.c (inf_ptrace_me): Likewise.
10482 * inferior.h (trace_start_error): New prototype.
10483 (trace_start_error_with_name): Likewise.
10484
99e8a4f9
SDJ
104852017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10486
10487 PR gdb/21164
10488 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10489 NULL before using it.
10490 * symmisc.c (maintenance_print_symbols): Likewise.
10491 (maintenance_print_msymbols): Likewise.
10492
4e746bb6
TW
104932017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10494
10495 * NEWS: Add record Python bindings entry.
10496
104972017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10498
10499 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10500 py-record-full.o.
10501 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10502 * python/py-record-btrace.c, python/py-record-btrace.h,
10503 python/py-record-full.c, python/py-record-full.h: New file.
10504 * python/py-record.c: Add include for py-record-btrace.h and
10505 py-record-full.h.
10506 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10507 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10508 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10509 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10510 New definition.
10511 (gdbpy_initialize_btrace): New export.
10512 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10513
105142017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10515
10516 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10517 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10518 * python/py-record.c: New file.
10519 * python/python-internal.h (gdbpy_start_recording,
10520 gdbpy_current_recording, gdpy_stop_recording,
10521 gdbpy_initialize_record): New export.
10522 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10523 (python_GdbMethods): Add gdbpy_start_recording,
10524 gdbpy_current_recording and gdbpy_stop_recording.
10525
105262017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10527
10528 * record-btrace.c (record_btrace_record_method): New function.
10529 (init_record_btrace_ops): Initialize to_record_method.
10530 * record-full.c (record_full_record_method): New function.
10531 (init_record_full_ops, init_record_full_core_ops): Add
10532 record_full_record_method.
10533 * record.h (enum record_method): New enum.
10534 * target-debug.h (target_debug_print_enum_record_method: New define.
10535 * target-delegates.c: Regenerate.
10536 * target.c (target_record_method): New function.
10537 * target.h: Include record.h.
10538 (struct target_ops) <to_record_method>: New field.
10539 (target_record_method): New export.
10540
105412017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10542
10543 * record.h (record_start, record_stop): New export.
10544 * record.c (record_start, record_stop): New function.
10545
105462017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10547
10548 * btrace.c (btrace_fetch): Copy function call segments pointer
10549 into a vector.
10550 (btrace_clear): Clear the vector.
10551 (btrace_find_insn_by_number): Use binary search to find the correct
10552 function call segment.
10553 * btrace.h (brace_fun_p): New typedef.
10554 (struct btrace_thread_info) <functions>: New field.
10555
105562017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10557
10558 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10559 * btrace.c (btrace_decode_error): ... here. New function.
10560 * btrace.h (btrace_decode_error): New export.
10561
105622017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10563
10564 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10565 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10566 btrace_find_insn_by_number): Remove special case for gaps.
10567 * btrace.h (btrace_insn_get_error): New export.
10568 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10569 * record-btrace.c (btrace_insn_history): Print number for gaps.
10570 (record_btrace_info, record_btrace_goto): Handle gaps.
10571
3f77c769
TT
105722017-02-14 Tom Tromey <tom@tromey.com>
10573
10574 PR python/13598:
10575 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10576 event.
10577 * python/py-evts.c (gdbpy_initialize_py_events): Add
10578 before_prompt registry.
10579 * python/py-events.h (events_object) <before_prompt>: New field.
10580
4c2c7ac6
MM
105812017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10582
10583 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10584
5cf30ebf
LM
105852017-02-13 Luis Machado <lgustavo@codesourcery.com>
10586
10587 * symfile (_initialize_symfile): Add usage text to the load command's
10588 help text.
10589
26a06916
SM
105902017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10591
10592 * utils.c (defaulted_query): Don't query on secondary UIs.
10593
0b145e37
TT
105942017-02-10 Tom Tromey <tom@tromey.com>
10595
10596 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10597
2d8365c4
TT
105982017-02-10 Tom Tromey <tom@tromey.com>
10599
10600 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10601 "cleanup" local.
10602 * python/py-type.c (typy_legacy_template_argument): Remove
10603 unnecessary "cleanup" local.
10604
2bb8f231
TT
106052017-02-10 Tom Tromey <tom@tromey.com>
10606
10607 * python/python.c (do_start_initialization): New function, from
10608 _initialize_python.
10609 (_initialize_python): Call do_start_initialization.
10610 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10611 goto.
10612
1bdfaf42
TT
106132017-02-10 Tom Tromey <tom@tromey.com>
10614
10615 * python/py-prettyprint.c (pretty_print_one_value): Use
10616 gdbpy_ref.
10617
88b6faea
TT
106182017-02-10 Tom Tromey <tom@tromey.com>
10619
10620 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10621 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10622 gdbpy_ref.
10623 * python/py-type.c (field_new): Use gdbpy_ref.
10624 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10625 gdbpy_ref.
10626 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10627 (py_free_pspace): Likewise.
10628 (pspace_to_pspace_object): Likewise.
10629 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10630 (py_free_objfile): Likewise.
10631 (objfile_to_objfile_object): Likewise.
10632 * python/py-inferior.c (delete_thread_object): Use
10633 gdbpy_ref.
10634 (infpy_read_memory): Likewise.
10635 (py_free_inferior): Likewise.
10636 * python/py-evtregistry.c (create_eventregistry_object): Use
10637 gdbpy_ref.
10638 * python/py-event.c (create_event_object): Use gdbpy_ref.
10639
7780f186
TT
106402017-02-10 Tom Tromey <tom@tromey.com>
10641
10642 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10643 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10644 used.
10645 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10646 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10647 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10648 python/py-framefilter.c, python/py-function.c,
10649 python/py-inferior.c, python/py-infevents.c,
10650 python/py-linetable.c, python/py-newobjfileevent.c,
10651 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10652 python/py-signalevent.c, python/py-stopevent.c,
10653 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10654 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10655 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10656 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10657
d4b0bb18
TT
106582017-02-10 Tom Tromey <tom@tromey.com>
10659
10660 * ui-out.h (ui_out_emit_type): New class.
10661 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10662 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10663 and ui_out_emit_tuple.
10664 (enumerate_locals): Likewise.
10665 (py_mi_print_variables, py_print_locals, py_print_args): Use
10666 ui_out_emit_list.
10667 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10668 ui_out_emit_list.
10669 * common/gdb_optional.h: New file.
10670
f67f945c
MG
106712017-02-10 Martin Galvan <martingalvan@sourceware.org>
10672
10673 * MAINTAINERS (Write After Approval): Update my e-mail address.
10674
18da0c51
MG
106752017-02-10 Martin Galvan <martingalvan@sourceware.org>
10676
10677 PR gdb/21122
10678 * breakpoint.c (_initialize_breakpoint): Update the help description
10679 of the 'commands' command to indicate that it takes a list argument.
10680
62c14536
SM
106812017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10682
10683 * interps.c (current_interp_set_logging): Remove "return".
10684
ff6fa247
GB
106852017-02-09 Gary Benson <gbenson@redhat.com>
10686
10687 * symtab.c (add_symtab_completions): Prevent NULL pointer
10688 dereference.
10689
a474bd8e
PA
106902017-02-08 Pedro Alves <palves@redhat.com>
10691
10692 * interps.c (interp::interp): Remove reference to quiet_p.
10693 (interp_set): Make static. Remove dead "Switching to" output
10694 code.
10695 (interp_quiet_p, interp_set_quiet): Delete.
10696 (interpreter_exec_cmd): Don't set the interpreter quiet.
10697 * interps.h (interp_quiet_p): Make static.
10698 (class interp) <quiet_p>: Remove field
10699
3d7b173c
JG
107002017-02-08 Jerome Guitton <guitton@adacore.com>
10701
604c4576
JG
10702 * cli/cli-decode.c (find_command_name_length): Make it extern.
10703 * cli/cli-decode.h (find_command_name_length): Declare.
10704 * cli/cli-script.c (command_name_equals, line_first_arg):
10705 New functions.
10706 (process_next_line): Use cli-decode to parse command names.
10707 (build_command_line): Make args a constant pointer.
10708
107092017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 10710
3d7b173c
JG
10711 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10712 Remove case-insensitive search.
10713
1291063d
JM
107142017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10715
10716 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10717 at the end of the line. Avoids an ARI warning.
10718
20b477a7
LM
107192017-02-06 Luis Machado <lgustavo@codesourcery.com>
10720
10721 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10722 rdseed instructions.
10723 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10724
3f7b46f2
IR
107252017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10726
10727 PR tdep/20936
10728 Provide and use sparc32 and sparc64 target description XML files.
10729 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10730 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10731 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10732 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10733 * features/sparc/sparc32-solaris.xml: New file.
10734 * features/sparc/sparc64-solaris.xml: New file.
10735 * features/sparc/sparc32-solaris.c: Generated.
10736 * features/sparc/sparc64-solaris.c: Generated.
10737 * sparc-tdep.h: Account for differences in target descriptions.
10738 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10739 (sparc32_register_type): Use target provided registers.
10740 (validate_tdesc_registers): New function.
10741 (sparc32_gdbarch_init): Use tdesc_has_registers.
10742 Set pseudoregister functions.
10743 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10744 (sparc64_register_type): Use target provided registers.
10745 (sparc64_init_abi): Set pseudoregister functions.
10746
f0fd41c1
TT
107472017-02-03 Tom Tromey <tom@tromey.com>
10748
10749 PR rust/21097:
10750 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10751 with a single member.
10752
d6f9b0fb
PA
107532017-02-03 Pedro Alves <palves@redhat.com>
10754
10755 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10756 (cli_interp_base::~cli_interp_base): New.
10757 (cli_interp): New struct.
10758 (as_cli_interp): Cast the interp itself to cli_interp.
10759 (cli_interpreter_pre_command_loop): Rename to ...
10760 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10761 parameter.
10762 (cli_interpreter_init): Rename to ...
10763 (cli_interp::init): ... this. Remove 'self' parameter. Use
10764 boolean. Make extern.
10765 (cli_interpreter_resume): Rename to ...
10766 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10767 extern.
10768 (cli_interpreter_suspend): Rename to ...
10769 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10770 extern.
10771 (cli_interpreter_exec): Rename to ...
10772 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10773 extern.
10774 (cli_interpreter_supports_command_editing): Rename to ...
10775 (cli_interp_base::supports_command_editing): ... this. Remove
10776 'interp' parameter. Make extern.
10777 (cli_ui_out): Rename to ...
10778 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10779 Make extern.
10780 (cli_set_logging): Rename to ...
10781 (cli_interp_base::set_logging): ... this. Remove 'interp'
10782 parameter. Make extern.
10783 (cli_interp_procs): Delete.
10784 (cli_interp_factory): Adjust to use "new".
10785 * cli/cli-interp.h: Include "interps.h".
10786 (struct cli_interp_base): New struct.
10787 * interps.c (struct interp): Delete. Fields moved to interps.h.
10788 (interp_new): Delete.
10789 (interp::interp, interp::~interp): New.
10790 (interp_set): Use bool, and return void. Assume the interpreter
10791 has suspend, init and resume methods, and that the all return
10792 void.
10793 (set_top_level_interpreter): interp_set returns void.
10794 (interp_ui_out): Adapt.
10795 (current_interp_set_logging): Adapt.
10796 (interp_data): Delete.
10797 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10798 (interp_exec): Adapt.
10799 (top_level_interpreter_data): Delete.
10800 * interps.h (interp_init_ftype, interp_resume_ftype)
10801 (interp_suspend_ftype, interp_exec_ftype)
10802 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10803 (class interp): New.
10804 (interp_new): Delete.
10805 (interp_set): Now returns void. Use bool.
10806 (interp_data, top_level_interpreter_data): Delete.
10807 * mi/mi-common.h: Include interps.h.
10808 (class mi_interp): Inherit from interp. Define a ctor. Declare
10809 init, resume, suspect, exec, interp_ui_out, set_logging and
10810 pre_command_loop methods.
10811 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10812 (mi_interpreter_init): Rename to ...
10813 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10814 bool, return void and make extern. Adjust.
10815 (mi_interpreter_resume): ... Rename to ...
10816 (mi_interp::resume): ... this. Remove the 'data' parameter,
10817 return void and make extern. Adjust.
10818 (mi_interpreter_suspend): ... Rename to ...
10819 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10820 return void and make extern. Adjust.
10821 (mi_interpreter_exec): ... Rename to ...
10822 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10823 extern. Adjust.
10824 (mi_interpreter_pre_command_loop): ... Rename to ...
10825 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10826 parameter and make extern.
10827 (mi_on_normal_stop_1): Adjust.
10828 (mi_ui_out): Rename to ...
10829 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10830 parameter and make extern. Adjust.
10831 (mi_set_logging): Rename to ...
10832 (mi_interp::set_logging): ... this. Remove the 'interp'
10833 parameter and make extern. Adjust.
10834 (mi_interp_procs): Delete.
10835 (mi_interp_factory): Adjust to use 'new'.
10836 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10837 (mi_print_exception, mi_execute_command, mi_load_progress):
10838 Adjust.
10839 * tui/tui-interp.c (tui_interp): New class.
10840 (as_tui_interp): Return a tui_interp pointer.
10841 (tui_on_normal_stop, tui_on_signal_received)
10842 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10843 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10844 to use interp::interp_ui_out.
10845 (tui_init): Rename to ...
10846 (tui_interp::init): ... this. Remove the 'self' parameter, use
10847 bool, return void and make extern. Adjust.
10848 (tui_resume): Rename to ...
10849 (tui_interp::resume): ... this. Remove the 'data' parameter,
10850 return void and make extern. Adjust.
10851 (tui_suspend): Rename to ...
10852 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10853 return void and make extern. Adjust.
10854 (tui_ui_out): Rename to ...
10855 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10856 parameter, and make extern. Adjust.
10857 (tui_exec): Rename to ...
10858 (tui_interp::exec): ... this. Remove the 'data' parameter and
10859 make extern.
10860 (tui_interp_procs): Delete.
10861 (tui_interp_factory): Use "new".
10862
65c40c95
TT
108632017-02-02 Tom Tromey <tom@tromey.com>
10864
10865 * rust-exp.y (ends_raw_string, space_then_number)
10866 (rust_identifier_start_p): Return bool.
10867 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10868 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10869 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10870 (rust_chartype_p): Return bool.
10871 (val_print_struct, rust_print_struct_def, rust_print_type):
10872 Update.
10873 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10874 Return bool.
10875
b50f188d
TT
108762017-02-02 Tom Tromey <tom@tromey.com>
10877
10878 * rust-lang.c: Reindent.
10879
03c85b11
TT
108802017-02-02 Tom Tromey <tom@tromey.com>
10881
10882 * rust-lang.h (rust_crate_for_block): Update.
10883 * rust-lang.c (rust_crate_for_block): Return std::string.
10884 (rust_get_disr_info): Use std:;string, not
10885 gdb::unique_xmalloc_ptr.
10886 * rust-exp.y (crate_name): Update.
10887
9b6da501
PA
108882017-02-02 Pedro Alves <palves@redhat.com>
10889
10890 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10891 field out of gdb_disassembler_test and make it static.
10892
ec4cb20b
PA
108932017-02-02 Pedro Alves <palves@redhat.com>
10894
10895 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10896 mi1_interp and mi_interp fields.
10897
5be5dbf0
PA
108982017-02-02 Pedro Alves <palves@redhat.com>
10899
616268b6
PA
10900 * cli/cli-interp.c (struct saved_output_files, saved_output):
10901 Moved from cli/cli-logging.c.
10902 (cli_set_logging): New function.
10903 (cli_interp_procs): Install cli_set_logging.
10904 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10905 Declare.
10906 * cli/cli-logging.c (struct saved_output_files, saved_output):
10907 Moved to cli/cli-interp.c.
10908 (pop_output_files): Don't save outputs here.
10909 (make_logging_output): New function.
10910 (handle_redirections): Don't build tee nor save previous outputs
10911 here.
10912 * interps.c (current_interp_set_logging): Change prototype.
10913 Assume there's always a set_logging_proc method installed.
10914 * interps.h (interp_set_logging_ftype): Change prototype.
10915 (current_interp_set_logging): Change prototype and adjust comment.
10916 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10917 use make_logging_output.
10918 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
109192017-02-02 Pedro Alves <palves@redhat.com>
10920
5be5dbf0
PA
10921 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10922 from ...
10923 (set_logging_overwrite): ... here.
10924 (logging_no_redirect_file): Delete.
10925 (set_logging_redirect): Don't handle redirection on the fly.
10926 Instead warn that "logging off" / "logging on" is necessary.
10927 (pop_output_files): Delete references to logging_no_redirect_file.
10928 (show_logging_command): Always speak in terms of what will happen
10929 once logging is reenabled.
10930
c99cc448
PA
109312017-02-02 Pedro Alves <palves@redhat.com>
10932
10933 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10934
8b172ce7
PA
109352017-02-02 Pedro Alves <palves@redhat.com>
10936
10937 * disasm.c (gdb_pretty_print_insn): Rename to ...
10938 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10939 Remove gdbarch parameter. Adapt to clear the object's buffers
10940 instead of allocating new buffers, and to print using the object's
10941 gdb_disassembler instead of calling gdb_print_insn.
10942 (dump_insns): Use gdb_pretty_print_disassembler.
10943 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10944 (gdb_pretty_print_disassembler): New class.
10945 * record-btrace.c (btrace_insn_history): Use
10946 gdb_pretty_print_disassembler.
10947
d7e74731
PA
109482017-02-02 Pedro Alves <palves@redhat.com>
10949
10950 * ada-lang.c (type_as_string): Use string_file.
10951 * ada-valprint.c (ada_print_floating): Use string_file.
10952 * ada-varobj.c (ada_varobj_scalar_image)
10953 (ada_varobj_get_value_image): Use string_file.
10954 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10955 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10956 * breakpoint.c (update_inserted_breakpoint_locations)
10957 (insert_breakpoint_locations, reattach_breakpoints)
10958 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10959 (print_it_watchpoint): Use string_file.
10960 (save_breakpoints): Use stdio_file.
10961 * c-exp.y (oper): Use string_file.
10962 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10963 tee_file.
10964 (pop_output_files): Use delete.
10965 (handle_redirections): Use stdio_file and tee_file.
10966 * cli/cli-setshow.c (do_show_command): Use string_file.
10967 * compile/compile-c-support.c (c_compute_program): Use
10968 string_file.
10969 * compile/compile-c-symbols.c (generate_vla_size): Take a
10970 'string_file &' instead of a 'ui_file *'.
10971 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10972 of a 'ui_file *'. Use string_file.
10973 (generate_c_for_variable_locations): Take a 'string_file &'
10974 instead of a 'ui_file *'.
10975 * compile/compile-internal.h (generate_c_for_for_one_variable):
10976 Take a 'string_file &' instead of a 'ui_file *'.
10977 * compile/compile-loc2c.c (push, pushf, unary, binary)
10978 (print_label, pushf_register_address, pushf_register)
10979 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10980 'ui_file *'. Adjust.
10981 * compile/compile.c (compile_to_object): Use string_file.
10982 * compile/compile.h (compile_dwarf_expr_to_c)
10983 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10984 'ui_file *'.
10985 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10986 (replace_typedefs_qualified_name): Use string_file and
10987 obstack_copy0.
10988 * disasm.c (gdb_pretty_print_insn): Use string_file.
10989 (gdb_disassembly): Adjust reference the null_stream global.
10990 (do_ui_file_delete): Delete.
10991 (gdb_insn_length): Use null_stream.
10992 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10993 * dwarf2loc.c (dwarf2_compile_property_to_c)
10994 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10995 'string_file &' instead of a 'ui_file *'.
10996 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10997 * dwarf2read.c (do_ui_file_peek_last): Delete.
10998 (dwarf2_compute_name): Use string_file.
10999 * event-top.c (gdb_setup_readline): Use stdio_file.
11000 * gdbarch.sh (verify_gdbarch): Use string_file.
11001 * gdbtypes.c (safe_parse_type): Use null_stream.
11002 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11003 string_file.
11004 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11005 'string_file *' instead of a 'ui_file *'.
11006 (gdbscm_arch_disassemble): Use string_file.
11007 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11008 * guile/scm-ports.c (class ioscm_file_port): Now a class that
11009 inherits from ui_file.
11010 (ioscm_file_port_delete, ioscm_file_port_rewind)
11011 (ioscm_file_port_put): Delete.
11012 (ioscm_file_port_write): Rename to ...
11013 (ioscm_file_port::write): ... this. Remove file_port_magic
11014 checks.
11015 (ioscm_file_port_new): Delete.
11016 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11017 ui_file_up.
11018 * guile/scm-type.c (tyscm_type_name): Use string_file.
11019 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11020 Use string_file.
11021 * infcmd.c (print_return_value_1): Use string_file.
11022 * infrun.c (print_target_wait_results): Use string_file.
11023 * language.c (add_language): Use string_file.
11024 * location.c (explicit_to_string_internal): Use string_file.
11025 * main.c (captured_main_1): Use null_file.
11026 * maint.c (maintenance_print_architecture): Use stdio_file.
11027 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11028 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11029 event_channel>: Change type to mi_console_file pointer.
11030 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11031 (mi_console_file_delete): Delete.
11032 (struct mi_console_file): Delete.
11033 (mi_console_file_magic): Delete.
11034 (mi_console_file_new): Delete.
11035 (mi_console_file::mi_console_file): New.
11036 (mi_console_file_delete): Delete.
11037 (mi_console_file_fputs): Delete.
11038 (mi_console_file::write): New.
11039 (mi_console_raw_packet): Delete.
11040 (mi_console_file::flush): New.
11041 (mi_console_file_flush): Delete.
11042 (mi_console_set_raw): Rename to ...
11043 (mi_console_file::set_raw): ... this.
11044 * mi/mi-console.h (class mi_console_file): New class.
11045 (mi_console_file_new, mi_console_set_raw): Delete.
11046 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11047 (mi_set_logging): Use delete and tee_file. Adjust.
11048 * mi/mi-main.c (output_register): Use string_file.
11049 (mi_cmd_data_evaluate_expression): Use string_file.
11050 (mi_cmd_data_read_memory): Use string_file.
11051 (mi_cmd_execute, print_variable_or_computed): Use string_file.
11052 * mi/mi-out.c (mi_ui_out::main_stream): New.
11053 (mi_ui_out::rewind): Use main_stream and
11054 string_file.
11055 (mi_ui_out::put): Use main_stream and string_file.
11056 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11057 Allocate a 'string_file' instead.
11058 (mi_out_new): Don't allocate a mem_fileopen stream here.
11059 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11060 (mi_ui_out::main_stream): Declare method.
11061 * printcmd.c (eval_command): Use string_file.
11062 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11063 * python/py-arch.c (archpy_disassemble): Use string_file.
11064 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11065 * python/py-frame.c (frapy_str): Use string_file.
11066 * python/py-framefilter.c (py_print_type, py_print_single_arg):
11067 Use string_file.
11068 * python/py-type.c (typy_str): Use string_file.
11069 * python/py-unwind.c (unwind_infopy_str): Use string_file.
11070 * python/py-value.c (valpy_str): Use string_file.
11071 * record-btrace.c (btrace_insn_history): Use string_file.
11072 * regcache.c (regcache_print): Use stdio_file.
11073 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11074 * remote.c (escape_buffer): Use string_file.
11075 * rust-lang.c (rust_get_disr_info): Use string_file.
11076 * serial.c (serial_open_ops_1): Use stdio_file.
11077 (do_serial_close): Use delete.
11078 * stack.c (print_frame_arg): Use string_file.
11079 (print_frame_args): Remove local mem_fileopen stream, not used.
11080 (print_frame): Use string_file.
11081 * symmisc.c (maintenance_print_symbols): Use stdio_file.
11082 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11083 Take a 'string_file *' instead of a 'ui_file *'.
11084 * top.c (new_ui): Use stdio_file and stderr_file.
11085 (free_ui): Use delete.
11086 (execute_command_to_string): Use string_file.
11087 (quit_confirm): Use string_file.
11088 * tracepoint.c (collection_list::append_exp): Use string_file.
11089 * tui/tui-disasm.c (tui_disassemble): Use string_file.
11090 * tui/tui-file.c: Don't include "ui-file.h".
11091 (enum streamtype, struct tui_stream): Delete.
11092 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11093 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11094 (tui_file::tui_file): New method.
11095 (tui_file_fputs): Delete.
11096 (tui_file_get_strbuf): Delete.
11097 (tui_file::puts): New method.
11098 (tui_file_adjust_strbuf): Delete.
11099 (tui_file_flush): Delete.
11100 (tui_file::flush): New method.
11101 * tui/tui-file.h: Tweak intro comment.
11102 Include ui-file.h.
11103 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11104 (tui_file_adjust_strbuf): Delete declarations.
11105 (class tui_file): New class.
11106 * tui/tui-io.c (tui_initialize_io): Use tui_file.
11107 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11108 (tui_register_format): Use string_stream.
11109 * tui/tui-stack.c (tui_make_status_line): Use string_file.
11110 (tui_get_function_from_frame): Use string_file.
11111 * typeprint.c (type_to_string): Use string_file.
11112 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11113 (null_stream): New global.
11114 (ui_file_delete): Delete.
11115 (ui_file::ui_file): New.
11116 (null_file_isatty): Delete.
11117 (ui_file::~ui_file): New.
11118 (null_file_rewind): Delete.
11119 (ui_file::printf): New.
11120 (null_file_put): Delete.
11121 (null_file_flush): Delete.
11122 (ui_file::putstr): New.
11123 (null_file_write): Delete.
11124 (ui_file::putstrn): New.
11125 (null_file_read): Delete.
11126 (ui_file::putc): New.
11127 (null_file_fputs): Delete.
11128 (null_file_write_async_safe): Delete.
11129 (ui_file::vprintf): New.
11130 (null_file_delete): Delete.
11131 (null_file::write): New.
11132 (null_file_fseek): Delete.
11133 (null_file::puts): New.
11134 (ui_file_data): Delete.
11135 (null_file::write_async_safe): New.
11136 (gdb_flush, ui_file_isatty): Adjust.
11137 (ui_file_put, ui_file_rewind): Delete.
11138 (ui_file_write): Adjust.
11139 (ui_file_write_for_put): Delete.
11140 (ui_file_write_async_safe, ui_file_read): Adjust.
11141 (ui_file_fseek): Delete.
11142 (fputs_unfiltered): Adjust.
11143 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11144 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11145 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11146 (set_ui_file_data): Delete.
11147 (string_file::~string_file, string_file::write)
11148 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11149 (do_ui_file_as_string, ui_file_as_string): Delete.
11150 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11151 (struct mem_file): Delete.
11152 (mem_file_new): Delete.
11153 (stdio_file::stdio_file): New.
11154 (mem_file_delete): Delete.
11155 (stdio_file::stdio_file): New.
11156 (mem_fileopen): Delete.
11157 (stdio_file::~stdio_file): New.
11158 (mem_file_rewind): Delete.
11159 (stdio_file::set_stream): New.
11160 (mem_file_put): Delete.
11161 (stdio_file::open): New.
11162 (mem_file_write): Delete.
11163 (stdio_file_magic, struct stdio_file): Delete.
11164 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11165 (stdio_file::flush): New.
11166 (stdio_file_read): Rename to ...
11167 (stdio_file::read): ... this. Adjust.
11168 (stdio_file_write): Rename to ...
11169 (stdio_file::write): ... this. Adjust.
11170 (stdio_file_write_async_safe): Rename to ...
11171 (stdio_file::write_async_safe) ... this. Adjust.
11172 (stdio_file_fputs): Rename to ...
11173 (stdio_file::puts) ... this. Adjust.
11174 (stdio_file_isatty): Delete.
11175 (stdio_file_fseek): Delete.
11176 (stdio_file::isatty): New.
11177 (stderr_file_write): Rename to ...
11178 (stderr_file::write) ... this. Adjust.
11179 (stderr_file_fputs): Rename to ...
11180 (stderr_file::puts) ... this. Adjust.
11181 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11182 (stderr_file::stderr_file): New.
11183 (tee_file_magic): Delete.
11184 (struct tee_file): Delete.
11185 (tee_file::tee_file): New.
11186 (tee_file_new): Delete.
11187 (tee_file::~tee_file): New.
11188 (tee_file_delete): Delete.
11189 (tee_file_flush): Rename to ...
11190 (tee_file::flush): ... this. Adjust.
11191 (tee_file_write): Rename to ...
11192 (tee_file::write): ... this. Adjust.
11193 (tee_file::write_async_safe): New.
11194 (tee_file_fputs): Rename to ...
11195 (tee_file::puts): ... this. Adjust.
11196 (tee_file_isatty): Rename to ...
11197 (tee_file::isatty): ... this. Adjust.
11198 * ui-file.h (struct obstack, struct ui_file): Don't
11199 forward-declare.
11200 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11201 (ui_file_write_ftype)
11202 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11203 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11204 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11205 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11206 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11207 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11208 (set_ui_file_fseek): Delete.
11209 (ui_file_data, ui_file_delete, ui_file_rewind)
11210 (struct ui_file): New.
11211 (ui_file_up): New.
11212 (class null_file): New.
11213 (null_stream): Declare.
11214 (ui_file_write_for_put, ui_file_put): Delete.
11215 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11216 Delete.
11217 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11218 (gdb_fopen, tee_file_new): Delete.
11219 (struct string_file): New.
11220 (struct stdio_file): New.
11221 (stdio_file_up): New.
11222 (struct stderr_file): New.
11223 (class tee_file): New.
11224 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11225 of a 'ui_file *'. Adjust.
11226 * ui-out.h (class ui_out) <field_stream>: Likewise.
11227 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11228 (null_stream): Delete.
11229 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11230 Adjust.
11231 * utils.h (struct ui_file): Delete forward declaration..
11232 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11233 (error_stream): Take a 'string_file &' instead of a
11234 'ui_file *'.
11235 * varobj.c (varobj_value_get_print_value): Use string_file.
11236 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11237 * gdbarch.c: Regenerate.
11238
187808b0
PA
112392017-02-02 Pedro Alves <palves@redhat.com>
11240
11241 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11242 (gdb_pretty_print_insn): ... this. Now a free function. Add back
11243 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
11244 Adjust to call gdb_print_insn instead of
11245 gdb_disassembler::print_insn.
11246 (dump_insns, do_mixed_source_and_assembly_deprecated)
11247 (do_mixed_source_and_assembly, do_assembly_only): Add back a
11248 'gdbarch' parameter. Remove gdb_disassembler parameter.
11249 (gdb_disassembly): Don't allocate a gdb_disassembler here.
11250 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11251 declaration.
11252 (gdb_pretty_print_insn): Re-add declaration.
11253 * record-btrace.c (btrace_insn_history): Don't allocate a
11254 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
11255
7a8eb317
SM
112562017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
11257
11258 * disasm.h (gdb_disassembly): Remove file_string parameter.
11259 * disasm.c (gdb_disassembly): Likewise.
11260 * cli/cli-cmds.c (print_disassembly): Adapt.
11261 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11262 * stack.c (do_gdb_disassembly): Likewise.
11263
7346ef59
AA
112642017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
11265
11266 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11267 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11268 targets. And if the implicit value is longer than needed, extract
11269 the first bytes instead of the "least significant" ones.
11270
cd4007e4
MM
112712017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11272
11273 * btrace.c (btrace_enable): Do not call btrace_add_pc for
11274 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11275 (btrace_fetch): Assert can_access_registers_ptid.
11276 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11277 validate_registers_access.
11278
cf77c34e
MM
112792017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11280
11281 * gdbthread.h (can_access_registers_ptid): New.
11282 * thread.c (can_access_registers_ptid): New.
11283
be85ce7d
PA
112842017-02-01 Pedro Alves <palves@redhat.com>
11285
11286 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11287
29b0b251
PA
112882017-01-31 Pedro Alves <palves@redhat.com>
11289
11290 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11291 Fix typos.
11292
289b5b24
PA
112932017-01-31 Pedro Alves <palves@redhat.com>
11294
11295 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11296 not used.
11297
b47413b4
PA
112982017-01-31 Pedro Alves <palves@redhat.com>
11299
11300 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11301
60adb36c
PA
113022017-01-31 Pedro Alves <palves@redhat.com>
11303
11304 * common/scoped_restore.h
11305 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11306 change the value's parameter type to T2.
11307 (make_scoped_restore): Likewise.
11308
2735833d
WT
113092017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11310 Richard Henderson <rth@redhat.com>
11311
11312 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11313 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11314 GS_BASE for older kernels.
11315 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11316 GS_BASE for older kernels.
11317 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11318 and GS_BASE to the offset table.
11319 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11320 system register group.
11321 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11322 for older kernels.
11323 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11324 amd64 ABI.
11325 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11326 AMD64_GSBASE_REGNUM.
11327 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11328 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11329 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11330 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11331 i386/64bit-segments.xml in those rules.
11332 * features/i386/64bit-segments.xml: New file.
11333 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11334 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11335 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11336 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11337 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11338 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11339 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11340 * features/i386/amd64-avx-linux.c: Regenerated.
11341 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11342 * features/i386/amd64-avx-mpx.c: Regenerated.
11343 * features/i386/amd64-avx512-linux.c: Regenerated.
11344 * features/i386/amd64-linux.c: Regenerated.
11345 * features/i386/amd64-mpx-linux.c: Regenerated.
11346 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11347 * features/i386/i386-avx-mpx.c: Regenerated.
11348 * features/i386/x32-avx-linux.c: Regenerated.
11349 * features/i386/x32-avx512-linux.c: Regenerated.
11350 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11351 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11352 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11353 * regformats/i386/amd64-linux.dat: Regenerated.
11354 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11355 * regformats/i386/x32-avx-linux.dat: Regenerated.
11356 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11357 * regformats/i386/x32-linux.dat: Regenerated.
11358
8884e97e
WT
113592017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11360
11361 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11362 Set to AMD64_NUM_REGS.
11363
7005d26a
WT
113642017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11365
11366 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11367 that checks validity of a register number.
11368
4bd2e1b2
KC
113692017-01-27 Kees Cook <keescook@google.com>
11370
11371 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11372 fetch_fpregs if target has fpa registers.
11373 (arm_linux_store_inferior_registers): Call store_fpregs if target
11374 has fpa registers.
11375
7cf1de6c
AA
113762017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11377
11378 * cris-tdep.c (cris_gdbarch_init): Remove check for
11379 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11380
874a1c8c
AT
113812017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11382
11383 * corelow.c (get_core_register_section): Check for regset
11384 existence before checking for REGSET_VARIABLE_SIZE.
11385
d8b49cf0
YQ
113862017-01-26 Yao Qi <yao.qi@linaro.org>
11387 Pedro Alves <palves@redhat.com>
11388
11389 PR gdb/20939
11390 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11391 call memory_error, save memaddr instead.
11392 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11393 negative, cal memory_error.
11394 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11395
658ca58c
YQ
113962017-01-26 Yao Qi <yao.qi@linaro.org>
11397
11398 * disasm-selftests.c (memory_error_test): New function.
11399 (_initialize_disasm_selftests): Register memory_error_test.
11400
79843d45
YQ
114012017-01-26 Yao Qi <yao.qi@linaro.org>
11402
11403 * Makefile.in (SFILES): Add disasm-selftests.c and
11404 selftest-arch.c.
11405 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11406 * disasm-selftests.c: New file.
11407 * selftest-arch.c: New file.
11408 * selftest-arch.h: New file.
11409
8cafda32
YQ
114102017-01-26 Yao Qi <yao.qi@linaro.org>
11411
11412 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11413 to bfd_arch_mep. Don't return 0 if section is not
11414 found. Call print_insn_mep.
11415
e47ad6c0
YQ
114162017-01-26 Pedro Alves <palves@redhat.com>
11417 Yao Qi <yao.qi@linaro.org>
11418
11419 * arm-tdep.c: Include "disasm.h".
11420 (gdb_print_insn_arm): Update code to get gdbarch.
11421 * disasm.c (dis_asm_read_memory): Change it to
11422 gdb_disassembler::dis_asm_read_memory.
11423 (dis_asm_memory_error): Likewise.
11424 (dis_asm_print_address): Likewise.
11425 (gdb_pretty_print_insn): Change it to
11426 gdb_disassembler::pretty_print_insn.
11427 (dump_insns): Add one argument gdb_disassemlber. All
11428 callers updated.
11429 (do_mixed_source_and_assembly_deprecated): Likewise.
11430 (do_mixed_source_and_assembly): Likewise.
11431 (do_assembly_only): Likewise.
11432 (gdb_disassembler::gdb_disassembler): New.
11433 (gdb_disassembler::print_insn): New.
11434 * disasm.h (class gdb_disassembler): New.
11435 (gdb_pretty_print_insn): Remove declaration.
11436 (gdb_disassemble_info): Likewise.
11437 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11438 (gdbscm_disasm_read_memory_worker): Update.
11439 (gdbscm_disasm_read_memory): Update.
11440 (gdbscm_disasm_memory_error): Remove.
11441 (gdbscm_disasm_print_address): Remove.
11442 (gdbscm_disassembler::gdbscm_disassembler): New.
11443 (gdbscm_print_insn_from_port): Update.
11444 * mips-tdep.c: Include disasm.h.
11445 (gdb_print_insn_mips): Update code to get gdbarch.
11446 * record-btrace.c (btrace_insn_history): Update.
11447 * spu-tdep.c: Include disasm.h.
11448 (struct spu_dis_asm_data): Remove.
11449 (struct spu_dis_asm_info): New.
11450 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11451 SPU id.
11452 (gdb_print_insn_spu): Cast disassemble_info to
11453 spu_dis_asm_info.
11454
80d75874
YQ
114552017-01-26 Yao Qi <yao.qi@linaro.org>
11456
11457 * disasm.c (do_ui_file_delete): Delete.
11458 (gdb_insn_length): Move code creating stream to ...
11459 * utils.c (null_stream): ... here. New function.
11460 * utils.h (null_stream): Declare.
11461
60685cd0
SM
114622017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11463
11464 * python/py-inferior.c (find_thread_object): Return directly
11465 from the loop. Remove "found" variable.
11466
eb1cdb62
JB
114672017-01-21 Joel Brobecker <brobecker@adacore.com>
11468
11469 GDB 7.12.1 released.
11470
b1ce6568
SM
114712017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11472
11473 * python/py-function.c (fnpy_call): Reorder declarations to have
11474 the gdbpy_enter object declared first.
11475 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11476
6f8b0407
SM
114772017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11478
fec93fb1 11479 PR python/21068
6f8b0407
SM
11480 * python/python-internal.h (PyMem_RawMalloc): Define for
11481 Python < 3.4.
11482 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11483 PyMem_RawMalloc instead of PyMem_Malloc.
11484
78cbbba8
LM
114852017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11486 Luis Machado <lgustavo@codesourcery.com>
11487
11488 * NEWS (New commands): Mention flash-erase.
11489 (New MI commands): Mention target-flash-erase.
11490 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11491 command.
11492 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11493 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11494 * target.c (flash_erase_command): New function.
11495 (initialize_targets): Add new flash-erase command.
11496 * target.h (flash_erase_command): New declaration.
11497
2132fe85
JB
114982017-01-20 Joel Brobecker <brobecker@adacore.com>
11499
11500 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11501 HAVE_SYS_PROCFS_H is defined.
11502
d1dff226
AH
115032017-01-18 Alan Hayward <alan.hayward@arm.com>
11504
11505 * remote.c (struct cached_reg): Change data into a pointer.
11506 * (stop_reply_dtr): Free data pointers before deleting vector.
11507 (process_stop_reply): Likewise.
11508 (remote_parse_stop_reply): Allocate space for data
11509
9890e433
AH
115102017-01-18 Alan Hayward <alan.hayward@arm.com>
11511
11512 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11513 MAX_REGISTER_SIZE.
11514 (amd64_pseudo_register_read_value): Likewise.
11515 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11516 (store_register_using_P): Likewise.
11517 * regcache.c (regcache_xfer_part): Likewise.
11518
7a36499a
IR
115192017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11520
11521 Split real and pseudo registers.
11522 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11523 (sparc32_pseudo_regnum): New enum.
11524 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11525 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11526 (SPARC32_CP0_REGISTERS): New macro.
11527 (sparc32_pseudo_register_name): New function.
11528 (sparc32_register_name): Use sparc32_pseudo_register_name.
11529 (sparc32_pseudo_register_type): New function.
11530 (sparc32_register_type): Use sparc32_pseudo_register_type.
11531 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11532 pseudo register numbers.
11533 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11534 (SPARC64_CP0_REGISTERS): New macro.
11535 (sparc64_pseudo_register_name): New function.
11536 (sparc64_register_name): Use sparc64_pseudo_register_name.
11537 (sparc64_pseudo_register_type): New function.
11538 (sparc64_register_type): Use sparc64_pseudo_register_type.
11539 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11540 pseudo register numbers.
11541 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11542 sparc64_store_arguments): Handle pseudo register numbers.
11543
6f8976bf
YQ
115442017-01-13 Yao Qi <yao.qi@linaro.org>
11545
11546 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11547 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11548 output.
11549 (getpkt_or_notif_sane_1): Likewise.
11550
e4241ace
YQ
115512017-01-13 Yao Qi <yao.qi@linaro.org>
11552
11553 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11554 of CC. Pass "-x c++-header" instead of "-x c".
11555
3015c064
SM
115562017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11557
11558 * remote.c (remote_can_async_p): Update comment.
11559
fde1b17d
SM
115602017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11561
11562 * linux-nat.c (linux_nat_can_async_p): Update comment.
11563
ca1ca08b
SM
115642017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11565
11566 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11567
4ad2da73
SM
115682017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11569
11570 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11571
c8b23b3f
TT
115722017-01-10 Tom Tromey <tom@tromey.com>
11573
11574 * python/py-type.c (typy_legacy_template_argument): Update.
11575 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11576 ~demangle_parse_info): Declare new members.
11577 (cp_demangled_name_to_comp): Return unique_ptr.
11578 (cp_demangled_name_parse_free)
11579 (make_cleanup_cp_demangled_name_parse_free)
11580 (cp_new_demangle_parse_info): Remove.
11581 * cp-support.c (do_demangled_name_parse_free_cleanup)
11582 (make_cleanup_cp_demangled_name_parse_free): Remove.
11583 (inspect_type, cp_canonicalize_string_full)
11584 (cp_canonicalize_string): Update.
11585 (mangled_name_to_comp): Change return type.
11586 (cp_class_name_from_physname, method_name_from_physname)
11587 (cp_func_name, cp_remove_params): Update.
11588 * cp-name-parser.y (demangle_parse_info): New constructor, from
11589 cp_new_demangle_parse_info.
11590 (~demangle_parse_info): New destructor, from
11591 cp_demangled_name_parse_free.
11592 (cp_merge_demangle_parse_infos): Update.
11593 (cp_demangled_name_to_comp): Change return type.
11594
1ac32117
TT
115952017-01-10 Tom Tromey <tom@tromey.com>
11596
11597 * top.c (prevent_dont_repeat): Change return type.
11598 * python/python.c (execute_gdb_command): Use std::string.
11599 Update.
11600 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11601 * command.h (prevent_dont_repeat): Change return type.
11602 * breakpoint.c (bpstat_do_actions_1): Update.
11603
0cf08227
TT
116042017-01-10 Tom Tromey <tom@tromey.com>
11605
11606 * value.h (scoped_value_mark::~scoped_value_mark): Call
11607 free_to_mark.
11608 (scoped_value_mark::free_to_mark): New method.
11609 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11610 scoped_value_mark.
11611
eb115069
TT
116122017-01-10 Tom Tromey <tom@tromey.com>
11613
11614 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11615 (valpy_reference_value, valpy_const_value, valpy_get_address)
11616 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11617 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11618 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11619 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11620 scoped_value_mark.
11621 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11622 * value.h (scoped_value_mark): New class.
11623
906768f9
TT
116242017-01-10 Tom Tromey <tom@tromey.com>
11625
11626 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11627 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11628 * psymtab.c (discard_psymtabs_upto): Remove.
11629 (make_cleanup_discard_psymtabs): Remove.
11630 (struct psymtab_state): Remove.
11631
bef155c3
TT
116322017-01-10 Tom Tromey <tom@tromey.com>
11633
11634 * record-full.c (record_full_save_cleanups): Remove.
11635 (record_full_save): Use gdb::unlinker.
11636 * gcore.c (do_bfd_delete_cleanup): Remove.
11637 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11638 cleanups.
11639 * dwarf2read.c (unlink_if_set): Remove.
11640 (write_psymtabs_to_index): Use gdb::unlinker.
11641 * common/gdb_unlinker.h: New file.
11642
192b62ce
TT
116432017-01-10 Tom Tromey <tom@tromey.com>
11644
11645 * windows-tdep.c (windows_xfer_shared_library): Update.
11646 * windows-nat.c (windows_make_so): Update.
11647 * utils.h (make_cleanup_bfd_unref): Remove.
11648 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11649 * symfile.h (symfile_bfd_open)
11650 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11651 * symfile.c (read_symbols, symbol_file_add)
11652 (separate_debug_file_exists): Update.
11653 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11654 (generic_load, reread_symbols): Update.
11655 * symfile-mem.c (symbol_file_add_from_memory): Update.
11656 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11657 (spu_symbol_file_add_from_memory): Update.
11658 * solist.h (struct target_so_ops) <bfd_open>: Return
11659 gdb_bfd_ref_ptr.
11660 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11661 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11662 gdb_bfd_ref_ptr.
11663 (solib_map_sections, reload_shared_libraries_1): Update.
11664 * solib-svr4.c (enable_break): Update.
11665 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11666 * solib-frv.c (enable_break2): Update.
11667 * solib-dsbt.c (enable_break): Update.
11668 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11669 gdb_bfd_ref_ptr.
11670 (darwin_solib_get_all_image_info_addr_at_init): Update.
11671 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11672 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11673 * record-full.c (record_full_save): Update.
11674 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11675 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11676 * minidebug.c (find_separate_debug_file_in_section): Return
11677 gdb_bfd_ref_ptr.
11678 * machoread.c (macho_add_oso_symfile): Change abfd to
11679 gdb_bfd_ref_ptr.
11680 (macho_symfile_read_all_oso): Update.
11681 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11682 (macho_symfile_read): Update.
11683 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11684 (jit_bfd_try_read_symtab): Update.
11685 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11686 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11687 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11688 gdb_bfd_ref_ptr.
11689 (gdb_bfd_ref_policy): New struct.
11690 (gdb_bfd_ref_ptr): New typedef.
11691 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11692 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11693 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11694 gdb_bfd_ref_ptr.
11695 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11696 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11697 (gcore_command): Update.
11698 * exec.c (exec_file_attach): Update.
11699 * elfread.c (elf_symfile_read): Update.
11700 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11701 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11702 (open_and_init_dwo_file): Update.
11703 (open_dwp_file): Return gdb_bfd_ref_ptr.
11704 (open_and_init_dwp_file): Update.
11705 * corelow.c (core_open): Update.
11706 * compile/compile-object-load.c (compile_object_load): Update.
11707 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11708 * coffread.c (coff_symfile_read): Update.
11709 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11710 gdb_bfd_ref_ptr. Rename.
11711 (dump_bfd_file, restore_command): Update.
11712 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11713 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11714 (find_separate_debug_file_by_buildid): Update.
11715
50315b21
TT
117162017-01-10 Tom Tromey <tom@tromey.com>
11717
11718 * common/gdb_ref_ptr.h: New file.
11719 * python/py-ref.h (struct gdbpy_ref_policy): New.
11720 (gdbpy_ref): Now a typedef.
11721
fc4007c9
TT
117222017-01-10 Tom Tromey <tom@tromey.com>
11723
11724 * utils.h (make_cleanup_htab_delete): Don't declare.
11725 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11726 Remove.
11727 * linespec.c (decode_compound_collector): Add constructor,
11728 destructor.
11729 (lookup_prefix_sym): Remove cleanup.
11730 (symtab_collector): Add constructor, destructor.
11731 (collect_symtabs_from_filename): Remove cleanup.
11732 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11733 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11734 Use htab_up.
11735 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11736 * dwarf2read.c (dw2_expand_symtabs_matching)
11737 (dw2_map_symbol_filenames, dwarf_decode_macros)
11738 (write_psymtabs_to_index): Use htab_up.
11739 * dwarf2loc.c (func_verify_no_selftailcall)
11740 (call_site_find_chain_1, func_verify_no_selftailcall)
11741 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11742 std::vector, gdb::unique_xmalloc_ptr.
11743 (call_sitep): Remove typedef.
11744 (dwarf2_locexpr_baton_eval): Remove unused variable.
11745
8dbcee67
TT
117462017-01-10 Tom Tromey <tom@tromey.com>
11747
11748 * python/python-internal.h (make_cleanup_py_decref)
11749 (make_cleanup_py_xdecref): Don't declare.
11750 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11751 (py_xdecref, make_cleanup_py_xdecref): Remove.
11752
13df46cc
TT
117532017-01-10 Tom Tromey <tom@tromey.com>
11754
11755 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11756 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11757
06fc9bf7
TT
117582017-01-10 Tom Tromey <tom@tromey.com>
11759
11760 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11761
830a4934
TT
117622017-01-10 Tom Tromey <tom@tromey.com>
11763
11764 * python/py-utils.c (unicode_to_encoded_string)
11765 (python_string_to_target_string)
11766 (python_string_to_target_python_string)
11767 (python_string_to_host_string, gdbpy_obj_to_string)
11768 (get_addr_from_python): Use gdbpy_ref.
11769
4586d543
TT
117702017-01-10 Tom Tromey <tom@tromey.com>
11771
11772 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11773 gdbpy_ref.
11774
59876f8f
TT
117752017-01-10 Tom Tromey <tom@tromey.com>
11776
11777 * python/python.c (eval_python_command, gdbpy_decode_line)
11778 (gdbpy_run_events, gdbpy_start_type_printers)
11779 (gdbpy_apply_type_printers): Use gdbpy_ref.
11780
97d83487
TT
117812017-01-10 Tom Tromey <tom@tromey.com>
11782
11783 * python/py-param.c (get_doc_string, compute_enum_values): Use
11784 gdbpy_ref.
11785
9205649a
TT
117862017-01-10 Tom Tromey <tom@tromey.com>
11787
11788 * python/py-inferior.c (find_thread_object, build_inferior_list):
11789 Use gdbpy_ref.
11790
74c49d45
TT
117912017-01-10 Tom Tromey <tom@tromey.com>
11792
11793 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11794
16361ffb
TT
117952017-01-10 Tom Tromey <tom@tromey.com>
11796
11797 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11798 gdbpy_ref.
11799
905f2cca
TT
118002017-01-10 Tom Tromey <tom@tromey.com>
11801
11802 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11803 extra incref.
11804 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11805 Use gdbpy_ref.
11806
64081434
TT
118072017-01-10 Tom Tromey <tom@tromey.com>
11808
11809 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11810 gdbpy_ref.
11811
59e9e831
TT
118122017-01-10 Tom Tromey <tom@tromey.com>
11813
11814 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11815 decref results of PyArg_ParseTupleAndKeywords.
11816
9de10f6d
TT
118172017-01-10 Tom Tromey <tom@tromey.com>
11818
11819 * python/python.c (python_run_simple_file): Use
11820 unique_xmalloc_ptr, gdbpy_ref.
11821
2bd5759d
TT
118222017-01-10 Tom Tromey <tom@tromey.com>
11823
11824 * python/py-prettyprint.c (print_stack_unless_memory_error)
11825 (print_string_repr, print_children): Use gdbpy_ref.
11826 (dummy_python_frame): New class.
11827 (dummy_python_frame::dummy_python_frame): Rename from
11828 push_dummy_python_frame.
11829 (py_restore_tstate): Remove.
11830
3b4e0e01
TT
118312017-01-10 Tom Tromey <tom@tromey.com>
11832
11833 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11834
17a22718
TT
118352017-01-10 Tom Tromey <tom@tromey.com>
11836
11837 * python/python.c (ensure_python_env, restore_python_env):
11838 Remove.
11839 * python/python-internal.h (ensure_python_env): Don't declare.
11840 * varobj.h (varobj_ensure_python_env): Don't declare.
11841 * varobj.c (varobj_ensure_python_env): Remove.
11842
68cdc557
TT
118432017-01-10 Tom Tromey <tom@tromey.com>
11844
11845 * varobj.c (varobj_value_get_print_value): Use
11846 gdbpy_enter_varobj.
11847
1eba6383
TT
118482017-01-10 Tom Tromey <tom@tromey.com>
11849
11850 * python/py-prettyprint.c (print_string_repr, print_children):
11851 Update.
11852 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11853 of "encoding".
11854 * varobj.c (varobj_value_get_print_value): Update.
11855 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11856
bde7b3e3
TT
118572017-01-10 Tom Tromey <tom@tromey.com>
11858
11859 * varobj.c (varobj_get_display_hint)
11860 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11861 (varobj_set_visualizer, free_variable): Use
11862 gdbpy_enter_varobj.
11863
a7785f8c
TT
118642017-01-10 Tom Tromey <tom@tromey.com>
11865
11866 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11867 (do_finish_initialization): New function. Use gdbpy_ref.
11868 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11869 do_finish_initialization.
11870
2865bfce
TT
118712017-01-10 Tom Tromey <tom@tromey.com>
11872
11873 * python/py-param.c (get_set_value, get_show_value): Use
11874 gdbpy_enter, gdbpy_ref.
11875
0e9dcc75
TT
118762017-01-10 Tom Tromey <tom@tromey.com>
11877
11878 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11879
12a5cedd
TT
118802017-01-10 Tom Tromey <tom@tromey.com>
11881
11882 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11883
788f2586
TT
118842017-01-10 Tom Tromey <tom@tromey.com>
11885
11886 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11887 Use gdbpy_enter_varobj.
11888
6cd67bea
TT
118892017-01-10 Tom Tromey <tom@tromey.com>
11890
11891 * varobj.c (gdbpy_enter_varobj): New constructor.
11892 * python/python-internal.h (gdbpy_enter_varobj): New class.
11893 * python/py-varobj.c (py_varobj_get_iterator): Use
11894 gdbpy_enter_varobj.
11895
14b122bf
TT
118962017-01-10 Tom Tromey <tom@tromey.com>
11897
11898 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11899 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11900 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11901 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11902 unique_xmalloc_ptr.
11903 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11904
bf1ca3b9
TT
119052017-01-10 Tom Tromey <tom@tromey.com>
11906
11907 * python/py-xmethods.c (invoke_match_method): Use
11908 gdbpy_ref.
11909
572a5524
TT
119102017-01-10 Tom Tromey <tom@tromey.com>
11911
11912 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11913 gdbpy_enter, gdbpy_ref.
11914
396a78b6
TT
119152017-01-10 Tom Tromey <tom@tromey.com>
11916
11917 * python/python.c (python_interactive_command): Use gdbpy_enter.
11918
a88b13c7
TT
119192017-01-10 Tom Tromey <tom@tromey.com>
11920
11921 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11922 gdbpy_ref.
11923
e9f0c363
TT
119242017-01-10 Tom Tromey <tom@tromey.com>
11925
11926 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11927 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11928
6349f452
TT
119292017-01-10 Tom Tromey <tom@tromey.com>
11930
11931 * utils.h (htab_deleter): New struct.
11932 (htab_up): New typedef.
11933 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11934 gdbpy_enter, gdbpy_ref, htab_up.
11935
c0171de6
TT
119362017-01-10 Tom Tromey <tom@tromey.com>
11937
11938 * python/py-unwind.c (pending_frame_invalidate): Remove.
11939 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11940
f18e226f
TT
119412017-01-10 Tom Tromey <tom@tromey.com>
11942
11943 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11944 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11945
c57af3f1
TT
119462017-01-10 Tom Tromey <tom@tromey.com>
11947
11948 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11949
60e600ec
TT
119502017-01-10 Tom Tromey <tom@tromey.com>
11951
11952 * python/python.c (gdbpy_eval_from_control_command)
11953 (gdbpy_source_script, gdbpy_run_events)
11954 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11955 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11956 gdbpy_enter.
11957
bf7da5b0
TT
119582017-01-10 Tom Tromey <tom@tromey.com>
11959
11960 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11961
2d38bced
TT
119622017-01-10 Tom Tromey <tom@tromey.com>
11963
11964 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11965
07bc7329
TT
119662017-01-10 Tom Tromey <tom@tromey.com>
11967
11968 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11969 (python_on_inferior_call_pre, python_on_inferior_call_post)
11970 (python_on_memory_change, python_on_register_change)
11971 (python_inferior_exit, python_new_objfile, add_thread_object)
11972 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11973
6e7c365e
TT
119742017-01-10 Tom Tromey <tom@tromey.com>
11975
11976 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11977 (bpfinishpy_handle_exit): Use gdbpy_enter.
11978
6ba0cd40
TT
119792017-01-10 Tom Tromey <tom@tromey.com>
11980
11981 * python/py-cmd.c (cmdpy_destroyer)
11982 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11983 gdbpy_enter.
11984
de2dc875
TT
119852017-01-10 Tom Tromey <tom@tromey.com>
11986
11987 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11988 gdbpy_enter.
11989 (gdbpy_breakpoint_has_cond): Likewise.
11990
4ecee2c4
TT
119912017-01-10 Tom Tromey <tom@tromey.com>
11992
11993 * python/python.c (gdbpy_enter): New constructor.
11994 (~gdbpy_enter): New destructor.
11995 (restore_python_env, ensure_python_env): Rewrite.
11996 * python/python-internal.h (gdbpy_enter): New class.
11997
37fce74f
TT
119982017-01-10 Tom Tromey <tom@tromey.com>
11999
12000 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12001
53a0cca3
TT
120022017-01-10 Tom Tromey <tom@tromey.com>
12003
12004 * python/py-value.c (value_has_field, get_field_flag)
12005 (get_field_type, valpy_getitem, convert_value_from_python): Use
12006 gdbpy_ref.
12007
ff3724f5
TT
120082017-01-10 Tom Tromey <tom@tromey.com>
12009
12010 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12011 gdbpy_ref.
12012
0700aea5
TT
120132017-01-10 Tom Tromey <tom@tromey.com>
12014
12015 * python/py-prettyprint.c (search_pp_list)
12016 (find_pretty_printer_from_objfiles)
12017 (find_pretty_printer_from_progspace)
12018 (find_pretty_printer_from_gdb, find_pretty_printer)
12019 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12020 gdbpy_ref.
12021
1bb44c9f
TT
120222017-01-10 Tom Tromey <tom@tromey.com>
12023
12024 * python/py-param.c (call_doc_function): Use gdbpy_ref.
12025
87ce03fd
TT
120262017-01-10 Tom Tromey <tom@tromey.com>
12027
12028 * python/py-linetable.c (build_line_table_tuple_from_pcs)
12029 (ltpy_get_all_source_lines): Use gdbpy_ref.
12030
ee0a3fb8
TT
120312017-01-10 Tom Tromey <tom@tromey.com>
12032
12033 * python/py-framefilter.c (extract_sym, extract_value)
12034 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12035 gdbpy_ref.
12036
bf2a52fa
TT
120372017-01-10 Tom Tromey <tom@tromey.com>
12038
12039 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12040
f59fe7f8
TT
120412017-01-10 Tom Tromey <tom@tromey.com>
12042
12043 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12044
80bd970a
TT
120452017-01-10 Tom Tromey <tom@tromey.com>
12046
12047 * python/py-function.c (convert_values_to_python, fnpy_init): Use
12048 gdbpy_ref.
12049
d1b3de2e
TT
120502017-01-10 Tom Tromey <tom@tromey.com>
12051
12052 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12053
3bb43384
TT
120542017-01-10 Tom Tromey <tom@tromey.com>
12055
12056 * python/py-type.c (convert_field, make_fielditem, typy_fields)
12057 (typy_range): Use gdbpy_ref.
12058
abf5651e
TT
120592017-01-10 Tom Tromey <tom@tromey.com>
12060
12061 * python/py-threadevent.c (create_thread_event_object): Use
12062 gdbpy_ref.
12063 * python/py-stopevent.c (create_stop_event_object): Simplify.
12064 (emit_stop_event): Use gdbpy_ref.
12065 * python/py-signalevent.c (create_signal_event_object): Use
12066 gdbpy_ref.
12067 * python/py-newobjfileevent.c (create_new_objfile_event_object)
12068 (emit_new_objfile_event, create_clear_objfiles_event_object)
12069 (emit_clear_objfiles_event): Use gdbpy_ref.
12070 * python/py-infevents.c (create_inferior_call_event_object)
12071 (create_register_changed_event_object)
12072 (create_memory_changed_event_object, emit_inferior_call_event)
12073 (emit_memory_changed_event, emit_register_changed_event): Use
12074 gdbpy_ref.
12075 * python/py-exitedevent.c (create_exited_event_object)
12076 (emit_exited_event): Use gdbpy_ref.
12077 * python/py-event.h (evpy_emit_event): Remove
12078 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12079 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12080 * python/py-continueevent.c (emit_continue_event): Use
12081 gdbpy_ref.
12082 * python/py-breakpoint.c (gdbpy_breakpoint_created)
12083 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12084 gdbpy_ref.
12085 * python/py-bpevent.c (create_breakpoint_event_object): Use
12086 gdbpy_ref.
12087
a68ff33e
TT
120882017-01-10 Tom Tromey <tom@tromey.com>
12089
12090 * python/py-ref.h: New file.
12091
7becfd03
SM
120922017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12093
12094 * cli-out.c (cli_ui_out::do_redirect): Change return type to
12095 void.
12096 * cli-out.h (cli_ui_out::do_redirect): Likewise.
12097 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12098 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12099 * ui-out.c (ui_out::redirect): Likewise.
12100 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12101 * cli/cli-logging.c (set_logging_redirect): Update call site of
12102 ui_out::redirect.
12103 (handle_redirections): Likewise.
12104 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12105 * top.c (execute_command_to_string): Likewise.
12106 * utils.c (do_ui_out_redirect_pop): Likewise.
12107
df294654
SM
121082017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12109
12110 * stack.c (_initialize_stack): Update "frame" command help message.
12111
f5e6296e
IB
121122017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
12113
12114 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12115
0e2d6fa6
YQ
121162017-01-06 Yao Qi <yao.qi@linaro.org>
12117
12118 * x86-linux-nat.h: Include gdb_proc_service.h.
12119
44d6d3f9
YQ
121202017-01-06 Yao Qi <yao.qi@linaro.org>
12121
12122 * ser-base.h: Include serial.h.
12123
656731fe
YQ
121242017-01-06 Yao Qi <yao.qi@linaro.org>
12125
12126 * ppc-linux-tdep.h: Include ppc-tdep.h.
12127
1ca8f924
YQ
121282017-01-06 Yao Qi <yao.qi@linaro.org>
12129
12130 * nat/amd64-linux-siginfo.h: Include signal.h.
12131
bc3008c4
YQ
121322017-01-06 Yao Qi <yao.qi@linaro.org>
12133
12134 * nat/aarch64-linux-hw-point.h: Include break-common.h.
12135
66c80d03
YQ
121362017-01-06 Yao Qi <yao.qi@linaro.org>
12137
12138 * mi/mi-parse.h: Include mi-cmds.h.
12139
051d2dda
YQ
121402017-01-06 Yao Qi <yao.qi@linaro.org>
12141
12142 * inf-loop.c: Don't include "target.h".
12143 * inf-loop.h: Include it here.
12144
8018d34f
YQ
121452017-01-06 Yao Qi <yao.qi@linaro.org>
12146
12147 * dfp.h: Include "dboulest.h" and "expression.h".
12148
c0b8369c
YQ
121492017-01-06 Yao Qi <yao.qi@linaro.org>
12150
12151 * ax-gdb.h: Include "ax.h".
12152
ad5cba2a
YQ
121532017-01-06 Yao Qi <yao.qi@linaro.org>
12154
12155 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12156 with nat/gdb_ptrace.h.
12157
1c33cd7f
YQ
121582017-01-05 Yao Qi <yao.qi@linaro.org>
12159
12160 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12161 new line.
12162 (mips64_fbsd_sigframe_init): Likewise.
12163
c988ac1d
JB
121642017-01-04 John Baldwin <jhb@FreeBSD.org>
12165
12166 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12167 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12168
b268007c
JB
121692017-01-04 John Baldwin <jhb@FreeBSD.org>
12170
12171 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12172 * NEWS: Mention new FreeBSD/mips native configuration.
12173 * config/mips/fbsd.mh: New file.
12174 * configure.host: Add mips*-*-freebsd*.
12175 * mips-fbsd-nat.c: New file.
12176
387360da
JB
121772017-01-04 John Baldwin <jhb@FreeBSD.org>
12178
12179 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12180 (ALLDEPFILES): Add mips-fbsd-tdep.c.
12181 * NEWS: Mention new FreeBSD/mips target.
12182 * configure.tgt: Add mips*-*-freebsd*.
12183 * mips-fbsd-tdep.c: New file.
12184 * mips-fbsd-tdep.h: New file.
12185
2aaaf250
YQ
121862017-01-04 Yao Qi <yao.qi@linaro.org>
12187
12188 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12189 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12190
61baf725
JB
121912017-01-01 Joel Brobecker <brobecker@adacore.com>
12192
6dbb839a 12193 Update copyright year range in all GDB files.
61baf725 12194
c113e7ff 121952017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 12196
c113e7ff 12197 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 12198
c113e7ff 12199For older changes see ChangeLog-2016.
c906108c
SS
12200\f
12201Local Variables:
12202mode: change-log
12203left-margin: 8
12204fill-column: 74
12205version-control: never
57da7796 12206coding: utf-8
c906108c 12207End: