Implement "set cwd" command on GDB
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
d092c5a2
SDJ
12017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * NEWS (New commands): Mention "set/show cwd".
4 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5 "cd" command's help text.
6 * common/common-inferior.h (get_inferior_cwd): New prototype.
7 * infcmd.c (inferior_cwd_scratch): New global variable.
8 (set_inferior_cwd): New function.
9 (get_inferior_cwd): Likewise.
10 (set_cwd_command): Likewise.
11 (show_cwd_command): Likewise.
12 (_initialize_infcmd): Add "set/show cwd" commands.
13 * inferior.h (class inferior) <cwd>: New field.
14 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
15 (fork_inferior): Change inferior's cwd before its execution.
16 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
17 to CreateProcess.
18
7da0a886
SDJ
192017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
20
21 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
22 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
23 (COMMON_OBS): Add gdb_tilde_expand.o.
24 * common/gdb_tilde_expand.c: New file.
25 * common/gdb_tilde_expand.h: Likewise.
26
db8dd160
MR
272017-10-03 Maciej W. Rozycki <macro@imgtec.com>
28
29 * gdbarch.sh (objfile): Remove duplicate declaration.
30 * gdbarch.h: Regenerate.
31
f8bfbf22
TT
322017-10-03 Tom Tromey <tom@tromey.com>
33
34 * utils.c (internal_vproblem): Use string_vprintf.
35
5178ed48
TT
362017-10-03 Tom Tromey <tom@tromey.com>
37
38 * printcmd.c (info_symbol_command): Use std::string.
39
8cff8730
TT
402017-10-03 Tom Tromey <tom@tromey.com>
41
42 * top.c (gdb_safe_append_history): Use std::string.
43
895b8f30
TT
442017-10-03 Tom Tromey <tom@tromey.com>
45
46 * event-top.c (stdin_event_handler): Update.
47 * main.c (captured_main_1): Update.
48 * top.h (make_delete_ui_cleanup): Remove.
49 (struct ui): Add constructor and destructor.
50 (new_ui, delete_ui): Remove.
51 * top.c (make_delete_ui_cleanup): Remove.
52 (new_ui_command): Use std::unique_ptr.
53 (delete_ui_cleanup): Remove.
54 (ui::ui): Rename from new_ui. Update.
55 (free_ui): Remove.
56 (ui::~ui): Rename from delete_ui. Update.
57
0efef640
TT
582017-10-03 Tom Tromey <tom@tromey.com>
59
60 * symfile.c (load_progress): Use gdb::byte_vector.
61
245ad7d3
TT
622017-10-03 Tom Tromey <tom@tromey.com>
63
64 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
65 declaration.
66 * printcmd.c (x_command): Remove unused declaration.
67 * symfile.c (symbol_file_command): Remove unused declaration.
68
e05550d7
TT
692017-10-03 Tom Tromey <tom@tromey.com>
70
71 * utils.c (internal_vproblem): Use std::string.
72 (defaulted_query): Likewise.
73
b95de2b7
TT
742017-10-03 Tom Tromey <tom@tromey.com>
75
76 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
77 * top.c (execute_command_to_string): Update.
78 * utils.c (make_cleanup_restore_page_info): Remove.
79 (do_restore_page_info_cleanup): Remove.
80 (set_batch_flag_and_restore_page_info):
81 New.
82 (make_cleanup_restore_page_info): Remove.
83 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
84 (~set_batch_flag_and_restore_page_info): New
85 (make_cleanup_restore_uinteger): Remove.
86 (make_cleanup_restore_integer): Remove.
87 (struct restore_integer_closure): Remove.
88 (restore_integer): Remove.
89 * utils.h (struct set_batch_flag_and_restore_page_info): New
90 class.
91 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
92 (make_cleanup_restore_page_info): Remove.
93 (make_cleanup_restore_uinteger) Remove.
94 (make_cleanup_restore_integer) Remove.
95
07036511
TT
962017-10-03 Tom Tromey <tom@tromey.com>
97
98 * record-full.h (record_full_gdb_operation_disable_set): Return
99 scoped_restore_tmpl<int>.
100 * infrun.c (adjust_pc_after_break): Update.
101 (handle_signal_stop): Update.
102 * record-full.c (record_full_gdb_operation_disable_set): Return
103 scoped_restore_tmpl<int>.
104 (record_full_wait_1, record_full_insert_breakpoint)
105 (record_full_remove_breakpoint, record_full_save)
106 (record_full_goto_insn): Update.
107
45320ffa
TT
1082017-10-02 Tom Tromey <tom@tromey.com>
109
110 PR rust/22236:
111 * rust-lang.c (rust_val_print_str): New function.
112 (val_print_struct): Call it.
113 (rust_subscript): Preserve name of slice type.
114
b3e3859b
TT
1152017-10-02 Tom Tromey <tom@tromey.com>
116
117 * rust-lang.c (rust_subscript): Handle slices in
118 EVAL_AVOID_SIDE_EFFECTS case.
119
01af5e0d
TT
1202017-10-02 Tom Tromey <tom@tromey.com>
121
122 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
123
888e3ddb
TT
1242017-10-02 Tom Tromey <tom@tromey.com>
125
126 * rust-lang.h (rust_slice_type): Add "extern".
127
cc536b21
PA
1282017-10-02 Tom Tromey <tom@tromey.com>
129 Pedro Alves <palves@redhat.com>
130
131 * ada-lang.h (ada_exc_info::operator<): Make const.
132 (ada_exc_info::operator==): Make const.
133 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
134 Make const.
135
386c8614
TT
1362017-09-29 Tom Tromey <tom@tromey.com>
137
138 * target.c (read_whatever_is_readable): Change type of "result".
139 Update.
140 (free_memory_read_result_vector): Remove.
141 (read_memory_robust): Change return type. Update.
142 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
143 bin2hex, std::string.
144 * target.h (memory_read_result_s): Remove typedef.
145 (free_memory_read_result_vector): Remove.
146 (read_memory_robust): Return std::vector.
147
789c4b5e
TT
1482017-09-29 Tom Tromey <tom@tromey.com>
149
150 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
151
ab816a27
TT
1522017-09-29 Tom Tromey <tom@tromey.com>
153
154 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
155 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
156 operator< and operator==.
157 (ada_exceptions_list): Return a std::vector.
158 * ada-lang.c (ada_exc_info::operator<): Rename from
159 compare_ada_exception_info.
160 (ada_exc_info::operator==): New.
161 (sort_remove_dups_ada_exceptions_list): Change type of
162 "exceptions".
163 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
164 (ada_add_global_exceptions): Likewise.
165 (ada_exceptions_list_1): Return a std::vector.
166 (ada_exceptions_list): Likewise.
167
52f9abe4
TT
1682017-09-29 Tom Tromey <tom@tromey.com>
169
170 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
171 'std::set *'.
172 (print_one_inferior): Update.
173 (free_vector_of_ints): Remove.
174 (list_available_thread_groups): Change "ids" to std::set.
175 (mi_cmd_list_thread_groups): Update.
176 (struct collect_cores_data) <core>: Now a std::set.
177 (collect_cores): Update.
178 (unique): Remove.
179 (print_one_inferior): Update.
180
dcd5ddcc
TT
1812017-09-29 Tom Tromey <tom@tromey.com>
182
183 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
184 (mi_execute_async_cli_command): Likewise.
185 (mi_cmd_trace_frame_collected): Use field_fmt.
186
45d288cc
TT
1872017-09-29 Tom Tromey <tom@tromey.com>
188
189 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
190 gdb::byte_vector.
191
6afe2f4a
TT
1922017-09-29 Tom Tromey <tom@tromey.com>
193
194 * mi/mi-parse.c (mi_parse): Remove unused declaration.
195
9813429a
TT
1962017-09-29 Tom Tromey <tom@tromey.com>
197
198 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
199
2d6960b4
TT
2002017-09-29 Tom Tromey <tom@tromey.com>
201
202 * varobj.h (varobj_gen_name): Return std::string.
203 * varobj.c (varobj_gen_name): Return std::string.
204 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
205 (mi_cmd_var_delete): Don't copy "name".
206
784c453a
TT
2072017-09-29 Tom Tromey <tom@tromey.com>
208
209 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
210 (mi_cmd_break_insert_1): Update.
211
a9bc57b9
TT
2122017-09-29 Tom Tromey <tom@tromey.com>
213
214 * target.h (make_scoped_defer_target_commit_resume): Update.
215 * target.c (make_scoped_defer_target_commit_resume): Rename from
216 make_cleanup_defer_target_commit_resume. Return a
217 scoped_restore.
218 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
219
9754d8c4
TT
2202017-09-29 Tom Tromey <tom@tromey.com>
221
222 * main.c (captured_main_1): Remove unused declaration.
223 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
224
99ef965c
TT
2252017-09-29 Tom Tromey <tom@tromey.com>
226
227 * symtab.c (search_symbols): Remove unused outer cleanup.
228 (make_source_files_completion_list): Remove unused declaration.
229
42518ba7
TT
2302017-09-29 Tom Tromey <tom@tromey.com>
231
232 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
233
726b2169
TT
2342017-09-29 Tom Tromey <tom@tromey.com>
235
236 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
237 gdb::byte_vector.
238
55b06432
TT
2392017-09-29 Tom Tromey <tom@tromey.com>
240
241 * complaints.c (vcomplaint): Use std::string.
242
8abcee91
TT
2432017-09-29 Tom Tromey <tom@tromey.com>
244
245 * tracepoint.c (trace_variable_command): Use std::string.
246 (encode_actions_1): Remove unused declarations.
247 (create_tsv_from_upload): Use std::string.
248
6ad94bc7
TT
2492017-09-29 Tom Tromey <tom@tromey.com>
250
251 * cp-support.c (gdb_demangle): Use std::string.
252
2003f3d8
TT
2532017-09-29 Tom Tromey <tom@tromey.com>
254
255 * stack.c (parse_frame_specification): Use std::string
256 (info_frame_command): Use gdb::unique_xmalloc_ptr.
257
8f8accb5
TT
2582017-09-29 Tom Tromey <tom@tromey.com>
259
260 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
261
200aa7b1
TT
2622017-09-29 Tom Tromey <tom@tromey.com>
263
264 * utils.c (vfprintf_maybe_filtered): Use std::string.
265 (vfprintf_unfiltered): Likewise.
266
606aae8a
TT
2672017-09-29 Tom Tromey <tom@tromey.com>
268
269 * event-top.c (top_level_prompt): Return std::string.
270 (display_gdb_prompt): Update.
271
bd413795
TT
2722017-09-29 Tom Tromey <tom@tromey.com>
273
274 * unittests/common-utils-selftests.c (format): New function.
275 (string_vprintf_tests): New function.
276 (_initialize_common_utils_selftests): Register new tests.
277 * common/common-utils.c (string_vprintf): New function.
278 * common/common-utils.h (string_vprintf): Declare.
279
256642e8
PA
2802017-09-29 Pedro Alves <palves@redhat.com>
281
282 * common/rsp-low.c (unpack_varlen_hex): Constify.
283 * common/rsp-low.h (unpack_varlen_hex): Constify.
284 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
285 Constify.
286 * remote.c (remote_set_permissions, read_ptid)
287 (remote_current_thread, remote_get_threads_with_qthreadinfo)
288 (remote_static_tracepoint_marker_at)
289 (remote_static_tracepoint_markers_by_strid)
290 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
291 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
292 (parse_tracepoint_definition, parse_tsv_definition)
293 (parse_static_tracepoint_marker_definition): Constify.
294 * tracepoint.h (parse_static_tracepoint_marker_definition)
295 (parse_trace_status, parse_tracepoint_status)
296 (parse_tracepoint_definition, parse_tsv_definition): Constify.
297
b6bb3468
PA
2982017-09-29 Pedro Alves <palves@redhat.com>
299
300 * remote.c (target_buf, target_buf_size): Delete.
301 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
302 Use the connection's packet buffer instead.
303 All callers adjusted.
304 (_initialize_remote): Remove references to target_buf and
305 target_buf_size.
306
b2f8eb7a
PA
3072017-09-28 Pedro Alves <palves@redhat.com>
308
309 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
310 unittests/common-utils-selftests.c.
311 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
312 (COMMON_OBS): Remove utils-selftests.o.
313 * utils-selftests.c: Move to ...
314 * unittests/common-utils-selftests.c: ... here and rename self
315 test to "string_printf".
316
08302ed2
DE
3172017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
318
319 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
320 having NULL cus or tus.
321
96a5a1d3
UW
3222017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
323
324 * arm-tdep.c: (convert_from_extended): Remove.
325 (convert_to_extended): Likewise.
326 (arm_extract_return_value): Use convert_typed_floating.
327 (arm_store_return_value): Likewise.
328
329 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
330 * sh-tdep.c: Do not include "floatformat.h".
331 (sh_littlebyte_bigword_type): New function.
332 (sh_register_convert_to_virtual): Use convert_typed_floating.
333 (sh_register_convert_to_raw): Likewise.
334 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
335 (sh64_littlebyte_bigword_type): New function.
336 (sh64_extract_return_value): Use convert_typed_floating.
337 (sh64_register_convert_to_virtual): Likewise.
338 (sh64_register_convert_to_raw): Likewise.
339
0db7851f
UW
3402017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
341
342 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
343 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
344
345 * gdbtypes.h (union type_specific): Make field floatformat hold
346 just a single struct floatformat, not an array.
347 (floatformat_from_type): Move here.
348 * gdbtypes.c (floatformat_from_type): Move here. Update to
349 changed TYPE_FLOATFORMAT definition.
350 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
351 (recursive_dump_type): Likewise.
352 (init_float_type): Install correct floatformat for byte order.
353 (arch_float_type): Likewise.
354
77b7c781
UW
3552017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
356
357 * gdbtypes.c (init_type): Change incoming argument from
358 length-in-bytes to length-in-bits. Assert length is a
359 multiple of TARGET_CHAR_BITS.
360 (arch_type, arch_flags_type): Likewise.
361 (init_integer_type): Update call to init_type.
362 (init_character_type): Likewise.
363 (init_boolean_type): Likewise.
364 (init_float_type): Likewise.
365 (init_decfloat_type): Likewise.
366 (init_complex_type): Likewise.
367 (init_pointer_type): Likewise.
368 (objfile_type): Likewise.
369 (arch_integer_type): Update call to arch_type.
370 (arch_character_type): Likewise.
371 (arch_boolean_type): Likewise.
372 (arch_float_type): Likewise.
373 (arch_decfloat_type): Likewise.
374 (arch_complex_type): Likewise.
375 (arch_pointer_type): Likewise.
376 (gdbtypes_post_init): Likewise.
377
378 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
379 (read_base_type): Likewise.
380 * mdebugread.c (basic_type): Likewise.
381 * stabsread.c (dbx_init_float_type): Likewise.
382 (rs6000_builtin_type): Likewise.
383 (read_range_type): Likewise. Also, fix call to init_integer_type
384 with erroneous length argument.
385
386 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
387 * d-lang.c (build_d_types): Likewise.
388 * f-lang.c (build_fortran_types): Likewise.
389 * go-lang.c (build_go_types): Likewise.
390 * opencl-lang.c (build_opencl_types): Likewise.
391 * jit.c (finalize_symtab): Likewise.
392 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
393 (build_std_type_info_type): Likewise.
394 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
395 update call to arch_flags_type.
396
397 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
398 arch_type.
399 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
400 * windows-tdep.c (windows_get_tlb_type): Likewise.
401
402 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
403 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
404 * m32c-tdep.c (make_types): Likewise.
405 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
406 (rl78_psw_type): Update call to arch_flags_type.
407 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
408 * rx-tdep.c (rx_psw_type): Likewise.
409 (rx_fpsw_type): Likewise.
410 * sparc-tdep.c (sparc_psr_type): Likewise.
411 (sparc_fsr_type): Likewise.
412 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
413 (sparc64_ccr_type): Likewise.
414 (sparc64_fsr_type): Likewise.
415 (sparc64_fprs_type): Likewise.
416
f21b4d5c
TT
4172017-09-27 Tom Tromey <tom@tromey.com>
418
419 * findcmd.c (find_command): Constify.
420
643c2ffa
TT
4212017-09-27 Tom Tromey <tom@tromey.com>
422
423 * ada-tasks.c (task_command_1, task_command): Constify.
424
510e5e56
TT
4252017-09-27 Tom Tromey <tom@tromey.com>
426
427 * symtab.c (maintenance_print_symbol_cache)
428 (maintenance_flush_symbol_cache)
429 (maintenance_print_symbol_cache_statistics): Constify.
430
e503b191
TT
4312017-09-27 Tom Tromey <tom@tromey.com>
432
433 * inferior.c (detach_inferior_command, kill_inferior_command)
434 (inferior_command): Constify.
435
4e001312
TT
4362017-09-27 Tom Tromey <tom@tromey.com>
437
438 * regcache.c (regcache_print, maintenance_print_registers)
439 (maintenance_print_raw_registers)
440 (maintenance_print_cooked_registers)
441 (maintenance_print_register_groups)
442 (maintenance_print_remote_registers): Constify.
443
77763700
TT
4442017-09-27 Tom Tromey <tom@tromey.com>
445
446 * printcmd.c (map_display_numbers, undisplay_command)
447 (enable_disable_display_command, enable_display_command)
448 (disable_display_command): Constify.
449
4495129a
TT
4502017-09-27 Tom Tromey <tom@tromey.com>
451
452 * breakpoint.h (delete_command): Don't declare.
453 * breakpoint.c (delete_command, enable_once_command)
454 (enable_count_command, enable_delete_command, breakpoint_1)
455 (maintenance_info_breakpoints, stopin_command, stopat_command)
456 (delete_command, delete_trace_command, save_breakpoints)
457 (save_breakpoints_command, save_tracepoints_command): Constify.
458
3088cf40
TT
4592017-09-27 Tom Tromey <tom@tromey.com>
460
461 * macrocmd.c (macro_expand_command, macro_expand_once_command)
462 (skip_ws, extract_identifier, macro_define_command)
463 (macro_undef_command, macro_list_command): Constify.
464
69f476a3
TT
4652017-09-27 Tom Tromey <tom@tromey.com>
466
467 * infcmd.c (environment_info, set_environment_command)
468 (unset_environment_command, path_info, info_proc_cmd_1)
469 (info_proc_cmd_mappings, info_proc_cmd_stat)
470 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
471 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
472
c4a3e68e
TT
4732017-09-27 Tom Tromey <tom@tromey.com>
474
475 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
476 Constify.
477
c9d31bd6
TT
4782017-09-27 Tom Tromey <tom@tromey.com>
479
480 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
481
1f3f85eb
TT
4822017-09-27 Tom Tromey <tom@tromey.com>
483
484 * demangle.c (demangle_command): Constify.
485
9c504b5d
TT
4862017-09-27 Tom Tromey <tom@tromey.com>
487
488 * progspace.c (maintenance_info_program_spaces_command):
489 Constify.
490
6663cf91
TT
4912017-09-27 Tom Tromey <tom@tromey.com>
492
493 * compile/compile.c (check_raw_argument, compile_file_command)
494 (compile_code_command, compile_print_command): Constify.
495
34e5fa26
TT
4962017-09-27 Tom Tromey <tom@tromey.com>
497
498 * reggroups.c (maintenance_print_reggroups): Constify.
499
8384c356
TT
5002017-09-27 Tom Tromey <tom@tromey.com>
501
502 * dwarf2read.c (save_gdb_index_command): Constify.
503
884beb0c
TT
5042017-09-27 Tom Tromey <tom@tromey.com>
505
506 * stap-probe.c (info_probes_stap_command): Constify.
507
e0b2930c
TT
5082017-09-27 Tom Tromey <tom@tromey.com>
509
510 * fork-child.c (unset_exec_wrapper_command): Constify.
511
f938677d
TT
5122017-09-27 Tom Tromey <tom@tromey.com>
513
514 * btrace.c (get_uint, get_context_size, no_chunk)
515 (maint_btrace_packet_history_cmd)
516 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
517 (maint_info_btrace_cmd): Constify.
518
8949cb87
TT
5192017-09-27 Tom Tromey <tom@tromey.com>
520
521 * reverse.c (delete_bookmark_command): Constify.
522
ac88e2de
TT
5232017-09-27 Tom Tromey <tom@tromey.com>
524
525 * remote.c (set_memory_packet_size)
526 (set_memory_write_packet_size, show_memory_write_packet_size)
527 (set_memory_read_packet_size, show_memory_read_packet_size)
528 (compare_sections_command, packet_command, remote_put_command)
529 (remote_get_command, remote_delete_command): Constify.
530
bd4c9dfe
TT
5312017-09-27 Tom Tromey <tom@tromey.com>
532
533 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
534 (set_mipsfpu_double_command, set_mipsfpu_none_command)
535 (set_mipsfpu_auto_command): Constify.
536
5e93d4c6
TT
5372017-09-27 Tom Tromey <tom@tromey.com>
538
539 * cli/cli-cmds.h (cd_command): Constify.
540 * cli/cli-cmds.c (cd_command): Constify.
541
fc41a75b
TT
5422017-09-27 Tom Tromey <tom@tromey.com>
543
544 * thread.c (thread_name_command, thread_find_command): Constify.
545
67810076
TT
5462017-09-27 Tom Tromey <tom@tromey.com>
547
548 * probe.c (enable_probes_command, disable_probes_command):
549 Constify.
550
1d8b34a7
TT
5512017-09-27 Tom Tromey <tom@tromey.com>
552
553 * symfile.c (symbol_file_command): Constify.
554 * gdbcore.h (deprecated_file_changed_hook): Constify.
555 * exec.c (deprecated_file_changed_hook, exec_file_command)
556 (file_command): Constify.
557 * defs.h (symbol_file_command): Constify.
558
442019e1
TT
5592017-09-27 Tom Tromey <tom@tromey.com>
560
561 * remote-fileio.c (set_system_call_allowed)
562 (show_system_call_allowed): Constify.
563
2983f7cb
TT
5642017-09-27 Tom Tromey <tom@tromey.com>
565
566 * tracepoint.c (delete_trace_variable_command)
567 (tfind_end_command, tfind_start_command, tfind_pc_command)
568 (tfind_tracepoint_command, tfind_line_command)
569 (tfind_range_command, tfind_outside_command): Constify.
570
4fd41b24
TT
5712017-09-27 Tom Tromey <tom@tromey.com>
572
573 * ax-gdb.c (maint_agent_printf_command, agent_command)
574 (agent_eval_command): Constify.
575
f2fc3015
TT
5762017-09-27 Tom Tromey <tom@tromey.com>
577
578 * tracepoint.c (info_scope_command): Constify.
579 * python/python.c (gdbpy_decode_line): Constify.
580 * python/py-breakpoint.c (bppy_init): Constify.
581 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
582 * location.h: (new_linespec_location)
583 (string_to_event_location_basic, string_to_event_location):
584 Constify.
585 * location.c (new_linespec_location)
586 (string_to_event_location_basic, string_to_event_location):
587 Constify.
588 * linespec.h (decode_line_with_current_source)
589 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
590 * linespec.c (linespec_lex_to_end)
591 (decode_line_with_current_source)
592 (decode_line_with_last_displayed): Constify.
593 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
594 Constify.
595 * cli/cli-cmds.c (edit_command, list_command): Constify.
596 * breakpoint.h (until_break_command, watch_command_wrapper)
597 (awatch_command_wrapper, rwatch_command_wrapper)
598 (init_ada_exception_breakpoint): Constify.
599 * breakpoint.c (break_command_1, dprintf_command)
600 (break_range_command, watch_command_wrapper)
601 (rwatch_command_wrapper, awatch_command_wrapper)
602 (until_break_command, init_ada_exception_breakpoint)
603 (strace_marker_create_sals_from_location, trace_command)
604 (ftrace_command, strace_command, struct tracepoint): Constify.
605 * ax-gdb.c (agent_command_1): Constify.
606 * ada-lang.c (ada_exception_sal): Constify.
607
8c2f95f4
TT
6082017-09-27 Tom Tromey <tom@tromey.com>
609
610 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
611 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
612 (get_context_size, no_chunk, get_insn_history_modifiers)
613 (cmd_record_insn_history, get_call_history_modifiers)
614 (cmd_record_call_history): Constify.
615
a0d65762
TT
6162017-09-27 Tom Tromey <tom@tromey.com>
617
618 * source.c (show_substitute_path_command)
619 (unset_substitute_path_command, set_substitute_path_command):
620 Constify.
621
58971144
TT
6222017-09-27 Tom Tromey <tom@tromey.com>
623
624 * typeprint.c (maintenance_print_type): Constify.
625 * maint.c (maintenance_dump_me, maintenance_demangle)
626 (maintenance_time_display, maintenance_info_sections)
627 (maintenance_print_statistics, maintenance_deprecate)
628 (maintenance_undeprecate): Constify.
629 (maintenance_do_deprecate): Constify. Use std::string.
630 (maintenance_selftest): Constify.
631 * gdbtypes.h (maintenance_print_type): Constify.
632
c482f52c
TT
6332017-09-27 Tom Tromey <tom@tromey.com>
634
635 * hppa-tdep.c (unwind_command): Constify.
636
e100df1a
TT
6372017-09-27 Tom Tromey <tom@tromey.com>
638
639 * target-descriptions.c (unset_tdesc_filename_cmd)
640 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
641 Constify.
642
31d56ade
TT
6432017-09-27 Tom Tromey <tom@tromey.com>
644
645 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
646
b961da0b
TT
6472017-09-27 Tom Tromey <tom@tromey.com>
648
649 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
650
e2d8ae16
TT
6512017-09-27 Tom Tromey <tom@tromey.com>
652
653 * tui/tui-regs.c (tui_reg_command): Constify.
654
863779b0
TT
6552017-09-27 Tom Tromey <tom@tromey.com>
656
657 * skip.c (skip_file_command, skip_function_command)
658 (skip_enable_command, skip_disable_command, skip_delete_command):
659 Constify.
660
cdb34d4a
TT
6612017-09-27 Tom Tromey <tom@tromey.com>
662
663 * record-btrace.c (cmd_record_btrace_bts_start)
664 (cmd_record_btrace_pt_start): Constify.
665
e99c83e7
TT
6662017-09-27 Tom Tromey <tom@tromey.com>
667
668 * symmisc.c (maintenance_print_symbols)
669 (maintenance_print_msymbols, maintenance_print_objfiles)
670 (maintenance_info_symtabs, maintenance_check_symtabs)
671 (maintenance_expand_symtabs, maintenance_info_line_tables):
672 Constify.
673
32faf971
TT
6742017-09-27 Tom Tromey <tom@tromey.com>
675
676 * top.c (new_ui_command): Constify.
677
2cf311eb
TT
6782017-09-27 Tom Tromey <tom@tromey.com>
679
680 * symfile.c (add_symbol_file_command)
681 (remove_symbol_file_command, list_overlays_command)
682 (map_overlay_command, unmap_overlay_command)
683 (overlay_auto_command, overlay_manual_command)
684 (overlay_off_command, overlay_load_command): Constify.
685
e6738699
TT
6862017-09-27 Tom Tromey <tom@tromey.com>
687
688 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
689 (info_spu_mailbox_command, info_spu_dma_command)
690 (info_spu_proxydma_command): Constify.
691
aa360cd5
TT
6922017-09-27 Tom Tromey <tom@tromey.com>
693
694 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
695
898241a5
TT
6962017-09-27 Tom Tromey <tom@tromey.com>
697
698 * cli/cli-script.c (user_defined_command): Constify.
699
2d0ac106
TT
7002017-09-27 Tom Tromey <tom@tromey.com>
701
702 * cli/cli-dump.c (dump_memory_command, dump_value_command)
703 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
704 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
705 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
706 (dump_binary_value, append_binary_memory, append_binary_value):
707 Constify.
708 (struct dump_context) <func>: Constify.
709 (add_dump_command): Update.
710
dede02ce
TT
7112017-09-27 Tom Tromey <tom@tromey.com>
712
713 * cli/cli-cmds.c (show_version, show_configuration)
714 (source_command, show_user): Constify.
715
d3cb6b99
TT
7162017-09-27 Tom Tromey <tom@tromey.com>
717
718 * target.c (maintenance_print_target_stack): Constify.
719
1970a12f
TT
7202017-09-27 Tom Tromey <tom@tromey.com>
721
722 * interps.c (interpreter_exec_cmd): Constify.
723
41243651
TT
7242017-09-27 Tom Tromey <tom@tromey.com>
725
726 * record-full.c (cmd_record_full_restore): Constify.
727
4465d9db
TT
7282017-09-27 Tom Tromey <tom@tromey.com>
729
730 * memattr.c (enable_mem_command, disable_mem_command)
731 (delete_mem_command): Constify.
732
ad25e423
TT
7332017-09-27 Tom Tromey <tom@tromey.com>
734
735 * value.c (show_convenience): Constify.
736
d64097b1
TT
7372017-09-27 Tom Tromey <tom@tromey.com>
738
739 * gdbcore.h (core_file_command): Update.
740 * corefile.c (core_file_command): Constify.
741
4d4589ef
TT
7422017-09-27 Tom Tromey <tom@tromey.com>
743
744 * user-regs.c (maintenance_print_user_registers): Constify.
745
32a7bf17
TT
7462017-09-27 Tom Tromey <tom@tromey.com>
747
748 * cp-namespace.c (maintenance_cplus_namespace): Constify.
749
4a475551
TT
7502017-09-27 Tom Tromey <tom@tromey.com>
751
752 * cp-support.c (first_component_command): Constify.
753
990b9f9f
TT
7542017-09-27 Tom Tromey <tom@tromey.com>
755
756 * psymtab.c (maintenance_print_psymbols)
757 (maintenance_info_psymtabs, maintenance_check_psymtabs):
758 Constify.
759
c281872e
TT
7602017-09-27 Tom Tromey <tom@tromey.com>
761
762 * windows-tdep.c (display_tib): Constify.
763
5b64bf74
TT
7642017-09-27 Tom Tromey <tom@tromey.com>
765
766 * linux-fork.c (delete_checkpoint_command)
767 (detach_checkpoint_command): Constify.
768
4ada038f
TT
7692017-09-27 Tom Tromey <tom@tromey.com>
770
771 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
772
57f5a81b
TT
7732017-09-27 Tom Tromey <tom@tromey.com>
774
775 * arc-tdep.c (dump_arc_instruction_command): Constify.
776
b0a8e6c4
TT
7772017-09-27 Tom Tromey <tom@tromey.com>
778
779 * valprint.c (set_radix, show_radix): Constify.
780
8d97dc1c
TT
7812017-09-27 Tom Tromey <tom@tromey.com>
782
783 * dtrace-probe.c (info_probes_dtrace_command): Constify.
784
eb7c454d
TT
7852017-09-27 Tom Tromey <tom@tromey.com>
786
787 * command.h (not_just_help_class_command): Update.
788 * cli/cli-decode.h (not_just_help_class_command): Update.
789 * cli/cli-decode.c (not_just_help_class_command): Constify.
790
e4e33335
TT
7912017-09-27 Tom Tromey <tom@tromey.com>
792
793 * gdb_bfd.c (maintenance_info_bfds): Constify.
794
0450cc4c
TT
7952017-09-27 Tom Tromey <tom@tromey.com>
796
797 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
798 overloads.
799 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
800 (do_const_cfunc): New function.
801 (cmd_cfunc_eq): New overload.
802 (cli_user_command_p): Check do_const_cfunc.
803 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
804 const_cfunc.
805 * command.h (add_cmd): Add const overload and no-function
806 overload.
807 (set_cmd_cfunc): Add const overload.
808 (cmd_const_cfunc_ftype): Declare.
809 (cmd_cfunc_eq): Add const overload.
810 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
811 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
812 overload.
813
a9bbfbd8
TT
8142017-09-27 Tom Tromey <tom@tromey.com>
815
816 * macroexp.c (get_next_token_for_substitution): New function.
817 (substitute_args): Call it. Check for __VA_OPT__.
818
5230b05a
WT
8192017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
820 Pedro Alves <palves@redhat.com>
821
822 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
823 producer_is_icc_lt_14.
824 (producer_is_icc_lt_14): New function.
825 (check_producer): Add code for checking version of ICC.
826 (producer_is_icc): Move to producer.c.
827 (read_structure_type): Restrict ICC workaround to ICC<14.
828 * producer.c: Include selftest.h.
829 (producer_is_icc, producer_parsing_tests, _initialize_producer):
830 New functions.
831 * producer.h (producer_is_icc): New declaration.
832
b32b108a
WT
8332017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
834
835 * Makefile.in (SFILES): Add producer.c.
836 (COMMON_OBS): Add producer.o
837 * amd64-tdep.c (producer.h): Add new include.
838 * dwarf2read.c (producer.h): Add new include.
839 * producer.c: New file.
840 * producer.h: New file.
841 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
842 producer.c.
843 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
844 producer.h.
845
5007d765
MK
8462017-09-26 Matthias Klose <doko@ubuntu.com>
847
848 * configure.ac: Search ncursesw before ncurses.
849 Check ncursesw/ncurses.h before ncurses/ncurses.h.
850 * gdb_curses.h: Include <ncursesw/ncurses.h>
851 * config.in, configure: Regenerate.
852
281c4447
RO
8532017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
854
855 PR gdb/22185
856 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
857 obsolete.
858 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
859 Remove i386sol2 support.
860 * configure.nat <i386sol2>: Remove.
861 <sol2-64>: Fold into ...
862 <sol2>: ... this.
863 Move common settings to default section.
864 Add sol-thread.o.
865 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
866 x86_64-*-solaris2.1[0-9]*>: Rename to ...
867 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
868 <i[34567]86-*-solaris*>: Remove.
869 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
870
871 * configure.ac: Remove wctype in libw check.
872 (_MSE_INT_H): Don't define on Solaris 7-9.
873 <solaris*>: Remove libthread_db.so.1 check.
874 * configure: Regenerate.
875 * config.in: Regenerate.
876
877 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
878 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
879 (gdb_ps_size_t): Remove.
880 Use base types in users.
881 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
882
883 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
884
39b06c20
RO
8852017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
886
887 PR build/22206
888 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
889 (adi_is_addr_mapped): Likewise.
890 (PSR_ICC): Don't redefine.
891 (PSR_IMPL): Likewise.
892
6c3e20f1
TT
8932017-09-25 Tom Tromey <tom@tromey.com>
894
895 * regcache.c (regcache::dump): Use string_printf.
896
b292235f
TT
8972017-09-25 Tom Tromey <tom@tromey.com>
898
899 * regcache.c (class regcache_invalidator): New.
900 (struct register_to_invalidate): Remove.
901 (make_cleanup_regcache_invalidate): Remove.
902 (regcache::raw_write): Use regcache_invalidator.
903
9ac86b52
TT
9042017-09-25 Tom Tromey <tom@tromey.com>
905
906 * spu-tdep.c (spu2ppu_sniffer): Update.
907 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
908 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
909 Remove.
910 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
911 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
912 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
913 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
914 (frame_pop): Update.
915
c0e383c6
TT
9162017-09-25 Tom Tromey <tom@tromey.com>
917
918 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
919 * regcache.h (regcache_xfree): Don't declare.
920 * regcache.c (regcache_xfree): Remove.
921 (do_regcache_xfree): Use delete.
922 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
923 * linux-fork.c (free_fork): Use delete.
924 (fork_save_infrun_state): Likewise.
925 * jit.c (jit_dealloc_cache): Use delete.
926 * infrun.c (discard_infcall_suspend_state): Use delete.
927
791199cc
TT
9282017-09-25 Tom Tromey <tom@tromey.com>
929
930 * regcache.h (regcache_xmalloc): Don't declare.
931 (regcache_raw_set_cached_value): Update comment.
932 * regcache.c (regcache_xmalloc): Remove.
933 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
934 * jit.c (jit_frame_sniffer): Use new.
935 * frame.c (frame_save_as_regcache): Use new.
936
289e23aa
AA
9372017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
938
939 * NEWS: Advertise support for guarded-storage registers on IBM z.
940
1b63490c
AA
9412017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
942
943 * s390-linux-nat.c (have_regset_gs): New static variable.
944 (s390_linux_fetch_inferior_registers): Handle guarded-storage
945 control block and guarded-storage broadcast control regsets.
946 (s390_read_description): Detect whether the target has
947 guarded-storage support, return appropriate tdesc.
948 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
949 (features/s390x-gs-linux64.c): Likewise.
950 (struct gdbarch_tdep) <have_gs>: New field.
951 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
952 (s390_gsbc_regset): New variables.
953 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
954 and s390_gsbc_regset, if applicable.
955 (s390_core_read_description): Check whether core file was from a
956 target with guarded-storage support; include appropriate regsets.
957 (s390_gdbarch_init): Add registers for guarded-storage support.
958 (_initialize_s390_tdep): Initialize new target descriptions that
959 include registers for guarded-storage support.
960 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
961 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
962 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
963 (S390_NUM_REGS): Adjust macro definition.
964 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
965 (tdesc_s390x_gs_linux64): New declarations.
966
96235dc1
AA
9672017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
968
969 * features/s390-gs-linux64.xml: New file.
970 * features/s390-gs.xml: New file.
971 * features/s390-gsbc.xml: New file.
972 * features/s390x-gs-linux64.xml: New file.
973 * features/Makefile (WHICH): Add s390-gs-linux64 and
974 s390x-gs-linux64.
975 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
976 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
977 * features/s390-gs-linux64.c: New generated file.
978 * features/s390x-gs-linux64.c: New file.
979 * regformats/s390-gs-linux64.dat: New file.
980 * regformats/s390x-gs-linux64.dat: New file.
981
b4a7c699
TT
9822017-09-23 Tom Tromey <tom@tromey.com>
983
984 * defs.h (make_cleanup_override_quit_handler): Don't declare.
985
c2f97536
TT
9862017-09-22 Tom Tromey <tom@tromey.com>
987
988 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
989 type to scoped_restore_tmpl.
990 <scoped_input_handler>: Initialize m_quit_handler directly.
991
43573013
SDJ
9922017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
993
994 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
995 (cd_command): Likewise. Free "current_directory" before
996 assigning to it.
997 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
998 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
999 * top.c (gdb_dirbuf): Remove global declaration.
1000 * top.h (gdb_dirbuf): Likewise.
1001
6ec2e0f5
SDJ
10022017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
1003
1004 * gnulib/aclocal.m4: Regenerate.
1005 * gnulib/config.in: Regenerate.
1006 * gnulib/configure: Regenerate.
1007 * gnulib/import/Makefile.am: Regenerate.
1008 * gnulib/import/Makefile.in: Regenerate.
1009 * gnulib/import/assure.h: New file.
1010 * gnulib/import/at-func.c: Likewise
1011 * gnulib/import/chdir-long.c: New file.
1012 * gnulib/import/chdir-long.h: New file.
1013 * gnulib/import/cloexec.c: New file.
1014 * gnulib/import/cloexec.h: New file.
1015 * gnulib/import/close.c: New file.
1016 * gnulib/import/closedir.c: New file.
1017 * gnulib/import/dirent-private.h: New file.
1018 * gnulib/import/dup-safer.c: New file.
1019 * gnulib/import/dup.c: New file.
1020 * gnulib/import/dup2.c: New file.
1021 * gnulib/import/error.c: New file.
1022 * gnulib/import/error.h: New file.
1023 * gnulib/import/exitfail.c: New file.
1024 * gnulib/import/exitfail.h: New file.
1025 * gnulib/import/fchdir.c: New file.
1026 * gnulib/import/fcntl.c: New file.
1027 * gnulib/import/fcntl.in.h: New file.
1028 * gnulib/import/fd-hook.c: New file.
1029 * gnulib/import/fd-hook.h: New file.
1030 * gnulib/import/fd-safer.c: New file.
1031 * gnulib/import/fdopendir.c: New file.
1032 * gnulib/import/filename.h: New file.
1033 * gnulib/import/filenamecat-lgpl.c: New file.
1034 * gnulib/import/filenamecat.h: New file.
1035 * gnulib/import/fstat.c: New file.
1036 * gnulib/import/fstatat.c: New file.
1037 * gnulib/import/getcwd-lgpl.c: New file.
1038 * gnulib/import/getcwd.c: New file.
1039 * gnulib/import/getdtablesize.c: New file.
1040 * gnulib/import/getlogin_r.c: New file.
1041 * gnulib/import/getprogname.c: New file.
1042 * gnulib/import/getprogname.h: New file.
1043 * gnulib/import/gettext.h: New file.
1044 * gnulib/import/glob-libc.h: New file.
1045 * gnulib/import/glob.c: New file.
1046 * gnulib/import/glob.in.h: New file.
1047 * gnulib/import/intprops.h: New file.
1048 * gnulib/import/m4/chdir-long.m4: New file.
1049 * gnulib/import/m4/close.m4: New file.
1050 * gnulib/import/m4/closedir.m4: New file.
1051 * gnulib/import/m4/d-ino.m4: New file.
1052 * gnulib/import/m4/d-type.m4: New file.
1053 * gnulib/import/m4/dup.m4: New file.
1054 * gnulib/import/m4/dup2.m4: New file.
1055 * gnulib/import/m4/error.m4: New file.
1056 * gnulib/import/m4/fchdir.m4: New file.
1057 * gnulib/import/m4/fcntl.m4: New file.
1058 * gnulib/import/m4/fcntl_h.m4: New file.
1059 * gnulib/import/m4/fdopendir.m4: New file.
1060 * gnulib/import/m4/filenamecat.m4: New file.
1061 * gnulib/import/m4/fstat.m4: New file.
1062 * gnulib/import/m4/fstatat.m4: New file.
1063 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1064 * gnulib/import/m4/getcwd-path-max.m4: New file.
1065 * gnulib/import/m4/getcwd.m4: New file.
1066 * gnulib/import/m4/getdtablesize.m4: New file.
1067 * gnulib/import/m4/getlogin_r.m4: New file.
1068 * gnulib/import/m4/getprogname.m4: New file.
1069 * gnulib/import/m4/glob.m4: New file.
1070 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1071 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1072 * gnulib/import/m4/mempcpy.m4: New file.
1073 * gnulib/import/m4/memrchr.m4: New file.
1074 * gnulib/import/m4/mode_t.m4: New file.
1075 * gnulib/import/m4/msvc-inval.m4: New file.
1076 * gnulib/import/m4/msvc-nothrow.m4: New file.
1077 * gnulib/import/m4/open.m4: New file.
1078 * gnulib/import/m4/openat.m4: New file.
1079 * gnulib/import/m4/opendir.m4: New file.
1080 * gnulib/import/m4/readdir.m4: New file.
1081 * gnulib/import/m4/realloc.m4: New file.
1082 * gnulib/import/m4/rewinddir.m4: New file.
1083 * gnulib/import/m4/save-cwd.m4: New file.
1084 * gnulib/import/m4/strdup.m4: New file.
1085 * gnulib/import/m4/strerror.m4: New file.
1086 * gnulib/import/m4/unistd-safer.m4: New file.
1087 * gnulib/import/mempcpy.c: New file.
1088 * gnulib/import/memrchr.c: New file.
1089 * gnulib/import/msvc-inval.c: New file.
1090 * gnulib/import/msvc-inval.h: New file.
1091 * gnulib/import/msvc-nothrow.c: New file.
1092 * gnulib/import/msvc-nothrow.h: New file.
1093 * gnulib/import/open.c: New file.
1094 * gnulib/import/openat-die.c: New file.
1095 * gnulib/import/openat-priv.h: New file.
1096 * gnulib/import/openat-proc.c: New file.
1097 * gnulib/import/openat.c: New file.
1098 * gnulib/import/openat.h: New file.
1099 * gnulib/import/opendir.c: New file.
1100 * gnulib/import/pipe-safer.c: New file.
1101 * gnulib/import/readdir.c: New file.
1102 * gnulib/import/realloc.c: New file.
1103 * gnulib/import/rewinddir.c: New file.
1104 * gnulib/import/save-cwd.c: New file.
1105 * gnulib/import/save-cwd.h: New file.
1106 * gnulib/import/strdup.c: New file.
1107 * gnulib/import/strerror-override.c: New file.
1108 * gnulib/import/strerror-override.h: New file.
1109 * gnulib/import/strerror.c: New file.
1110 * gnulib/import/unistd--.h: New file.
1111 * gnulib/import/unistd-safer.h: New file.
1112 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1113 "getcwd" and "glob".
1114 * ser-tcp.c: Undefine "close" before redefining it.
1115
432ae719
SM
11162017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1117
1118 * guile/scm-value.c (gdbscm_value_address): Initialize address,
1119 get rid of res_val.
1120
4fa7574e
RO
11212017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1122
1123 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1124 <sol2,sparc>: Likewise.
1125 <sol2-64,i386>: Likewise.
1126
1127 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1128 -Wdeprecated-declarations on *-*-solaris*.
1129 * configure: Regenerate.
1130
1131 * procfs.c: Include "nat/inferior.h".
1132 (procfs_info_proc): Fix typo.
1133
f6327dcb
KB
11342017-09-21 Kevin Buettner <kevinb@redhat.com>
1135
1136 * remote.c (vector): Include.
1137 (struct private_thread_info): Add field, thread_handle.
1138 (free_private_thread_info): Deallocate storage associated with
1139 thread handle.
1140 (get_private_info_thread): Initialize `thread_handle' field.
1141 (struct thread_item): Add field, thread_handle.
1142 (clear_threads_listing_context): Deallocate storage associated
1143 with thread handle.
1144 (start_thread): Add support for "handle" attribute.
1145 (thread_attributes): Add "handle".
1146 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1147 field.
1148 (remote_update_thread_list): Update thread_handle.
1149 (remote_thread_handle_to_thread_info): New function.
1150 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1151
fbbe5337
KB
11522017-09-21 Kevin Buettner <kevinb@redhat.com>
1153
1154 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1155 function.
1156 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1157 * python/python-internal.h (thread_object_type): Declare.
1158
e04ee09e
KB
11592017-09-21 Kevin Buettner <kevinb@redhat.com>
1160
1161 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1162 (target_thread_handle_to_thread_info): Declare.
1163 * target.c (target_thread_handle_to_thread_info): New function.
1164 * target-delegates.c: Regenerate.
1165 * gdbthread.h (find_thread_by_handle): Declare.
1166 * thread.c (find_thread_by_handle): New function.
1167 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1168 function.
1169 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1170
1e5b66ed
SM
11712017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1172
1173 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1174
ebe48ba0
SM
11752017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1176
1177 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1178
0a0bf5dc
YQ
11792017-09-21 Yao Qi <yao.qi@linaro.org>
1180
1181 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1182 to gdb_target_obs.
1183
d1b0a7bf
TT
11842017-09-20 Tom Tromey <tom@tromey.com>
1185
1186 * breakpoint.c (struct counted_command_line): Remove.
1187 (breakpoint_commands): Update.
1188 (alloc_counted_command_line, incref_counted_command_line)
1189 (decref_counted_command_line, do_cleanup_counted_command_line)
1190 (make_cleanup_decref_counted_command_line): Remove.
1191 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1192 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1193 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1194 (save_breakpoints): Update.
1195 * breakpoint.h (counted_command_line): Now a typedef to
1196 shared_ptr.
1197 (struct breakpoint) <commands>: Now a counted_command_line.
1198 (struct bpstats) <command>: Likewise.
1199
48649e1b
TT
12002017-09-20 Tom Tromey <tom@tromey.com>
1201
1202 * breakpoint.c (struct commands_info, do_map_commands_command):
1203 Remove.
1204 (commands_command_1): Update.
1205 (iterate_over_related_breakpoints): Take a function_view.
1206 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1207 (delete_command): Update.
1208 (map_breakpoint_numbers): Take a function_view.
1209 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1210 (disable_command): Update.
1211 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1212 (enable_command): Update.
1213 (struct disp_data, do_enable_breakpoint_disp)
1214 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1215 (do_map_enable_delete_breakpoint): Remove.
1216 (enable_once_command, enable_count_command, enable_delete_command)
1217 (delete_trace_variable_command): Update.
1218
04afa70c
TT
12192017-09-20 Tom Tromey <tom@tromey.com>
1220
1221 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
1222 (bpstat_clear): Use delete.
1223 (bpstats): New constructors.
1224 (bpstat_copy, bpstat_stop_status): Use new.
1225 (dprintf_after_condition_true): Update.
1226 * breakpoint.h (bpstats::bpstats): Add constructors.
1227 (bpstats::~bpstats): Add destructor.
1228
c83833f4
PA
12292017-09-20 Pedro Alves <palves@redhat.com>
1230
1231 * eval.c (make_params): Delete, refactored as ...
1232 (class fake_method): ... this new type's ctor.
1233 (fake_method::~fake_method): New.
1234 (evaluate_subexp_standard): Use 'fake_method'.
1235
223ffa71
TT
12362017-09-20 Tom Tromey <tom@tromey.com>
1237
1238 * windows-nat.c (get_windows_debug_event, windows_wait)
1239 (do_initial_windows_stuff, windows_attach): Update.
1240 * utils.c (vwarning, internal_vproblem): Update.
1241 (ui_unregister_input_event_handler_cleanup)
1242 (prepare_to_handle_input): Remove.
1243 (class scoped_input_handler): New.
1244 (defaulted_query, prompt_for_continue): Update.
1245 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1246 Update.
1247 * top.c (undo_terminal_modifications_before_exit): Update.
1248 * target/target.h (target_terminal_init, target_terminal_inferior)
1249 (target_terminal_ours): Don't declare.
1250 (class target_terminal): New.
1251 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1252 (target_terminal_ours_for_output)
1253 (make_cleanup_restore_target_terminal): Don't declare.
1254 (target_terminal_info): Remove.
1255 * target.c (enum terminal_state, terminal_state): Remove.
1256 (target_terminal::terminal_state): Define.
1257 (target_terminal::init): Rename from target_terminal_init.
1258 (target_terminal::inferior): Rename from
1259 target_terminal_inferior.
1260 (target_terminal::ours): Rename from target_terminal_ours.
1261 (target_terminal::ours_for_output): Rename from
1262 target_terminal_ours_for_output.
1263 (target_terminal::info): New method.
1264 (cleanup_restore_target_terminal)
1265 (make_cleanup_restore_target_terminal): Remove.
1266 * solib.c (handle_solib_event): Update.
1267 * remote.c (remote_serial_quit_handler): Update.
1268 (remote_terminal_inferior, remote_wait_as): Update.
1269 * record-full.c (record_full_wait_1): Update.
1270 * nto-procfs.c (procfs_create_inferior): Update.
1271 * nat/fork-inferior.c (startup_inferior): Update.
1272 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1273 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1274 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1275 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1276 (mi_breakpoint_created, mi_breakpoint_deleted)
1277 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1278 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1279 (mi_user_selected_context_changed, report_initial_inferior):
1280 Update.
1281 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1282 (linux_nat_terminal_inferior): Update.
1283 * infrun.c (follow_fork_inferior)
1284 (handle_vfork_child_exec_or_exit, do_target_resume)
1285 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1286 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1287 Update.
1288 * inflow.c (child_terminal_init, info_terminal_command): Update.
1289 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1290 (attach_command): Update.
1291 * infcall.c (call_thread_fsm_should_stop): Update.
1292 * gnu-nat.c (gnu_attach): Update.
1293 * extension.c (struct active_ext_lang_state)
1294 (restore_active_ext_lang): Update.
1295 * exceptions.c (print_flush): Update.
1296 * event-top.c (async_enable_stdin, default_quit_handler): Update.
1297 (struct quit_handler_cleanup_data, restore_quit_handler)
1298 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1299 Remove.
1300 * cp-support.c (gdb_demangle): Update.
1301 * breakpoint.c (update_inserted_breakpoint_locations)
1302 (insert_breakpoint_locations, handle_jit_event)
1303 (disable_breakpoints_in_unloaded_shlib): Update.
1304 * annotate.c (annotate_breakpoints_invalid)
1305 (annotate_frames_invalid): Update.
1306
013af3fc
TT
13072017-09-20 Tom Tromey <tom@tromey.com>
1308
1309 * main.c (catch_command_errors): Rename from
1310 catch_command_errors_const.
1311 (captured_main_1): Update.
1312
06871ae8
PA
13132017-09-20 Pedro Alves <palves@redhat.com>
1314
1315 * cli/cli-cmds.c (list_command): Use print_sal_location.
1316 (print_sal_location): New function.
1317 (ambiguous_line_spec): Use print_sal_location.
1318 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1319 * symtab.c (find_function_start_sal): Likewise.
1320 * symtab.h (symtab_and_line::symbol): New field.
1321
e5f25bc5
PA
13222017-09-20 Pedro Alves <palves@redhat.com>
1323
1324 * linespec.c (minsym_found): Handle non-text minsyms.
1325 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1326
1b7fa39e
WT
13272017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1328
1329 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1330 backslash.
1331
37dd0825
WT
13322017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1333
1334 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1335 vmovups instead vmovaps.
1336 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1337
4e5a4f58
JB
13382017-09-19 John Baldwin <jhb@FreeBSD.org>
1339
1340 * NEWS (Changes since GDB 8.0): Add starti.
1341 * infcmd.c (enum run_break): New.
1342 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1343 case.
1344 (run_command): Use enum run_how.
1345 (start_command): Likewise.
1346 (starti_command): New function.
1347 (RUN_ARGS_HELP): New macro.
1348 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1349 commands. Add starti command.
1350
aa70c9f1
YQ
13512017-09-19 Yao Qi <yao.qi@linaro.org>
1352
1353 * Makefile.in (monitor.o): Remove the rule.
1354
d6541620
YQ
13552017-09-19 Yao Qi <yao.qi@linaro.org>
1356
1357 * annotate.h (struct annotate_arg_emitter): Use
1358 DISABLE_COPY_AND_ASSIGN.
1359 * common/refcounted-object.h (refcounted_object): Likewise.
1360 * completer.h (struct completion_result): Likewise.
1361 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1362 * filename-seen-cache.h (filename_seen_cache): Likewise.
1363 * gdbcore.h (thread_section_name): Likewise.
1364 * gdb_regex.h (compiled_regex): Likewise.
1365 * gdbthread.h (scoped_restore_current_thread): Likewise.
1366 * inferior.h (scoped_restore_current_inferior): Likewise.
1367 * jit.c (jit_reader): Likewise.
1368 * linespec.h (struct linespec_result): Likewise.
1369 * mi/mi-parse.h (struct mi_parse): Likewise.
1370 * nat/fork-inferior.c (execv_argv): Likewise.
1371 * progspace.h (scoped_restore_current_program_space): Likewise.
1372 * python/python-internal.h (class gdbpy_enter): Likewise.
1373 * regcache.h (regcache): Likewise.
1374 * target-descriptions.c (struct tdesc_reg): Likewise.
1375 (struct tdesc_type): Likewise.
1376 (struct tdesc_feature): Likewise.
1377 * ui-out.h (ui_out_emit_type): Likewise.
1378
0615127c
SM
13792017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1380
1381 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1382 label abort_expression.
1383
5e187554
SM
13842017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1385
1386 * common/buffer.c (buffer_xml_printf): Adjust.
1387 * common/xml-utils.c (xml_escape_text): Change return type to
1388 std::string, update code accordingly.
1389 * common/xml-utils.h (xml_escape_text): Change return type to
1390 std::string.
1391 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1392 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1393 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1394 Adjust.
1395
c3d7b541
SM
13962017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1397
1398 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1399 (SUBDIR_UNITTESTS_OBS): Add new object file.
1400 * unittests/xml-utils-selftests.c: New file.
1401
1526853e
SM
14022017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1403
1404 * common/selftest.h (selftest): New struct/interface.
1405 (register_test): Add name parameter, add new overload.
1406 (run_tests): Add filter parameter.
1407 (for_each_selftest_ftype): New typedef.
1408 (for_each_selftest): New declaration.
1409 * common/selftest.c (tests): Change type to
1410 map<string, unique_ptr<selftest>>.
1411 (simple_selftest): New struct.
1412 (register_test): New function.
1413 (register_test): Add name parameter and use it.
1414 (run_tests): Add filter parameter and use it. Add prints.
1415 Adjust to vector -> map change.
1416 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1417 registering selftests.
1418 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1419 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1420 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1421 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1422 * findvar.c (_initialize_findvar): Likewise.
1423 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1424 * maint.c (maintenance_selftest): Update call to run_tests.
1425 (maintenance_info_selftests): New function.
1426 (_initialize_maint_cmds): Register "maintenance info selftests"
1427 command. Update "maintenance selftest" doc.
1428 * regcache.c (_initialize_regcache): Add names when registering
1429 selftests.
1430 * rust-exp.y (_initialize_rust_exp): Likewise.
1431 * selftest-arch.c (gdbarch_selftest): New struct.
1432 (gdbarch_tests): Remove.
1433 (register_test_foreach_arch): Add name parameter. Call
1434 register_test.
1435 (tests_with_arch): Remove, move most content to
1436 gdbarch_selftest::operator().
1437 (_initialize_selftests_foreach_arch): Remove.
1438 * selftest-arch.h (register_test_foreach_arch): Add name
1439 parameter.
1440 (run_tests_with_arch): New declaration.
1441 * utils-selftests.c (_initialize_utils_selftests): Add names
1442 when registering selftests.
1443 * utils.c (_initialize_utils): Likewise.
1444 * unittests/array-view-selftests.c
1445 (_initialize_array_view_selftests): Likewise.
1446 * unittests/environ-selftests.c (_initialize_environ_selftests):
1447 Likewise.
1448 * unittests/function-view-selftests.c
1449 (_initialize_function_view_selftests): Likewise.
1450 * unittests/offset-type-selftests.c
1451 (_initialize_offset_type_selftests): Likewise.
1452 * unittests/optional-selftests.c
1453 (_initialize_optional_selftests): Likewise.
1454 * unittests/scoped_restore-selftests.c
1455 (_initialize_scoped_restore_selftests): Likewise.
1456 * NEWS: Document "maintenance selftest" and "maint info
1457 selftests".
1458
5846367a
SM
14592017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1460
1461 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1462 scoped_restore.
1463
bd77e8ff
SM
14642017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1465
1466 * mi/mi-main.c (mi_load_progress): Make uiout variable
1467 a unique_ptr.
1468
26a67918
PA
14692017-09-15 Pedro Alves <palves@redhat.com>
1470
1471 * compile/compile-c-types.c (convert_enum, convert_int)
1472 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1473
3f8a7804
SM
14742017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1475
1476 * dwarf2read.c (copy_string): Remove.
1477 (parse_macro_definition): Replace copy_string with savestring.
1478
8d200706
YQ
14792017-09-15 Yao Qi <yao.qi@linaro.org>
1480
1481 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1482 gdb_target_obs.
1483 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1484 Likewise.
1485 (i[34567]86-*-linux*): Likewise.
1486
d185219d
SM
14872017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1488
1489 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1490 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1491 <stack>: Change type to std::vector.
1492 <stack_len, stack_allocated>: Remove.
1493 <grow_stack>: Remove.
1494 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1495 (dwarf_expr_context::~dwarf_expr_context): Remove.
1496 (dwarf_expr_context::grow_stack): Remove.
1497 (dwarf_expr_context::push): Adjust.
1498 (dwarf_expr_context::pop): Adjust.
1499 (dwarf_expr_context::fetch): Adjust.
1500 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1501 (dwarf_expr_context::stack_empty_p): Adjust.
1502 (dwarf_expr_context::execute_stack_op): Adjust.
1503
eccd80d6
SM
15042017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1505
1506 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1507 return type to bool.
1508 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1509
69009882
SM
15102017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1511
1512 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1513 Change type to bool.
1514 (dwarf_stack_value) <in_stack_memory>: Likewise.
1515 (dwarf_expr_context) <push_address>: Change parameter type to
1516 bool.
1517 <fetch_in_stack_memory>: Change return type to bool.
1518 <push>: Change parameter type to bool.
1519 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1520 to bool.
1521 (dwarf_expr_context::push_address): Likewise.
1522 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1523 to bool.
1524 (dwarf_expr_context::execute_stack_op): Adjust.
1525 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1526
1e467161
SM
15272017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1528
1529 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1530 (struct dwarf_expr_context) <n_pieces>: Remove.
1531 <pieces>: Change type to std::vector.
1532 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1533 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1534 pieces.
1535 (dwarf_expr_context::add_piece): Adjust.
1536 * dwarf2loc.c (struct piece_closure): Initialize fields.
1537 <n_pieces>: Remove.
1538 <pieces>: Change type to std::vector.
1539 (allocate_piece_closure): Adjust, change parameter to
1540 std::vector rvalue and std::move it to piece_closure.
1541 (rw_pieced_value): Adjust.
1542 (check_pieced_synthetic_pointer): Adjust.
1543 (indirect_synthetic_pointer): Adjust.
1544 (coerce_pieced_ref): Adjust.
1545 (free_pieced_value_closure): Adjust. Use delete to free
1546 piece_closure.
1547 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1548 to allocate_piece_closure.
1549 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1550
0782db84
SM
15512017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1552
1553 * probe.h (probe_ops_cp): Remove typedef.
1554 (DEF_VEC_P (probe_ops_cp)): Remove.
1555 (all_probe_ops): Change type to std::vector.
1556 * probe.c (info_probes_for_ops): Adjust to vector change.
1557 (probe_linespec_to_ops): Likewise.
1558 (all_probe_ops): Change type to std::vector.
1559 (_initialize_probe): Adjust to vector change.
1560 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1561 * elfread.c (elf_get_probes): Likewise.
1562 * stap-probe.c (_initialize_stap_probe): Likewise.
1563
1eac6bea
SM
15642017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1565
1566 * probe.h (struct bound_probe): Define constructors.
1567 * probe.c (bound_probe_s): Remove typedef.
1568 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1569 (collect_probes): Change return type to std::vector, remove
1570 cleanup.
1571 (compare_probes): Return bool, change parameter type. Change
1572 semantic to "less than".
1573 (gen_ui_out_table_header_info): Change parameter to std::vector
1574 and update.
1575 (exists_probe_with_pops): Likewise.
1576 (info_probes_for_ops): Update to std::vector change.
1577 (enable_probes_command): Likewise.
1578 (disable_probes_command): Likewise.
1579
aaa63a31
SM
15802017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1581
1582 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1583 vec to std::vector.
1584 * probe.c (parse_probes_in_pspace): Update.
1585 (find_probes_in_objfile): Update.
1586 (find_probe_by_pc): Update.
1587 (collect_probes): Update.
1588 (probe_any_get_probes): Update.
1589 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1590 return type to reference to std::vector.
1591 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1592 std::vector and update.
1593 (dtrace_process_dof): Likewise.
1594 (dtrace_get_probes): Likewise.
1595 * elfread.c (elf_get_probes): Change return type to std::vector,
1596 store an std::vector in bfd_data.
1597 (probe_key_free): Update to std::vector.
1598 * stap-probe.c (handle_stap_probe): Change parameter to
1599 std::vector and update.
1600 (stap_get_probes): Likewise.
1601 * symfile-debug.c (debug_sym_get_probes): Change return type to
1602 std::vector and update.
1603
cb85b21b
TT
16042017-09-11 Tom Tromey <tom@tromey.com>
1605
1606 * breakpoint.c (program_breakpoint_here_p): Update.
1607 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1608 from make_show_memory_breakpoints_cleanup. Return a
1609 scoped_restore_tmpl<int>.
1610 (restore_show_memory_breakpoints): Remove.
1611 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1612 * mem-break.c (memory_validate_breakpoint): Update.
1613 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1614 (ia64_memory_remove_breakpoint): Update.
1615 (ia64_breakpoint_from_pc): Update.
1616 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1617 from make_show_memory_breakpoints_cleanup.
1618
8fbc99ef
TT
16192017-09-11 Tom Tromey <tom@tromey.com>
1620
1621 * d-namespace.c (d_lookup_symbol): Use std::string.
1622 (find_symbol_in_baseclass): Likewise.
1623
50feb4bd
TT
16242017-09-11 Tom Tromey <tom@tromey.com>
1625
1626 * ctf.c (ctf_start): Use std::string.
1627
c6dc63a1
TT
16282017-09-11 Tom Tromey <tom@tromey.com>
1629
1630 * ada-lang.c (is_known_support_routine): Update.
1631 (ada_unhandled_exception_name_addr_from_raise): Update.
1632 * guile/scm-frame.c (gdbscm_frame_name): Update.
1633 * python/py-frame.c (frapy_name): Update.
1634 (frapy_function): Update.
1635 * stack.h (find_frame_funname): Update.
1636 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1637 (print_frame): Update.
1638
d6b9b80f
TT
16392017-09-11 Tom Tromey <tom@tromey.com>
1640
1641 * findcmd.c (put_bits): Take a gdb::byte_vector.
1642 (parse_find_args): Return gdb::byte_vector. "args" now const.
1643 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1644 cleanups.
1645 (find_command): Update.
1646
a9921622
TT
16472017-09-11 Tom Tromey <tom@tromey.com>
1648
1649 * cli/cli-script.c (class scoped_restore_hook_in): New.
1650 (clear_hook_in_cleanup): Remove.
1651 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1652 scoped_restore_hook_in.
1653
be0d7abb
TT
16542017-09-11 Tom Tromey <tom@tromey.com>
1655
1656 * cli/cli-script.c (restore_interp): Remove.
1657 (read_command_lines): Use scoped_restore_interp.
1658 * interps.c (scoped_restore_interp::set_temp): Rename from
1659 interp_set_temp.
1660 * interps.h (class scoped_restore_interp): New.
1661 (interp_set_temp): Remove.
1662
00f675ff
TT
16632017-09-11 Tom Tromey <tom@tromey.com>
1664
1665 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1666 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1667 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1668 scoped_restore.
1669 (mi_cmd_break_insert_1): Update.
1670 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1671 scoped_restore.
1672
cb791d59
TT
16732017-09-11 Tom Tromey <tom@tromey.com>
1674
1675 * demangle.c (demangle_command): Update.
1676 * breakpoint.c (disable_command): Update.
1677 (enable_command): Update.
1678 (find_location_by_number): Make "number" const. Use
1679 get_number_trailer.
1680 * cli/cli-utils.c (extract_arg): Return std::string.
1681 * probe.c (parse_probe_linespec): Update. Change types.
1682 (collect_probes): Take string arguments.
1683 (parse_probe_linespec): Likewise.
1684 (info_probes_for_ops): Update.
1685 (enable_probes_command): Update.
1686 (disable_probes_command): Update.
1687 * break-catch-sig.c (catch_signal_split_args): Update.
1688 * mi/mi-parse.c (mi_parse): Update.
1689
2039bd9f
TT
16902017-09-11 Tom Tromey <tom@tromey.com>
1691
1692 * language.h (language_enum): Make argument const.
1693 * language.c (language_enum): Make argument const.
1694
f1735a53
TT
16952017-09-11 Tom Tromey <tom@tromey.com>
1696
1697 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1698 as function.
1699 (skip_to_space): Rename from skip_to_space_const.
1700 * common/common-utils.c (skip_to_space): New function.
1701 (skip_to_space): Rename from skip_to_space_const.
1702 * cli/cli-utils.h (get_number): Rename from get_number_const.
1703 (extract_arg): Rename from extract_arg_const.
1704 * cli/cli-utils.c (get_number): Rename from get_number_const.
1705 (extract_arg): Rename from extract_arg_const.
1706 (number_or_range_parser::get_number): Use ::get_number.
1707 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1708 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1709 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1710 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1711 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1712 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1713 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1714 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1715
7d221d74
TT
17162017-09-11 Tom Tromey <tom@tromey.com>
1717
1718 * python/python.c (do_start_initialization): Use
1719 py-event-types.def to initialize types.
1720 Define all object type structures.
1721 * python/python-internal.h: Don't declare event initialization
1722 functions.
1723 * python/py-threadevent.c (thread_event_object_type): Don't
1724 define.
1725 * python/py-stopevent.c (stop_event_object_type): Don't define.
1726 * python/py-signalevent.c (signal_event_object_type): Don't
1727 declare or define.
1728 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1729 (clear_objfiles_event_object_type): Don't declare or define.
1730 * python/py-infevents.c (inferior_call_pre_event_object_type)
1731 (inferior_call_post_event_object_type)
1732 (register_changed_event_object_type)
1733 (memory_changed_event_object_type): Don't declare or define.
1734 * python/py-inferior.c (new_thread_event_object_type)
1735 (new_inferior_event_object_type)
1736 (inferior_deleted_event_object_type): Don't declare or define.
1737 * python/py-exitedevent.c (exited_event_object_type): Don't
1738 declare or define.
1739 * python/py-evts.c (gdbpy_initialize_py_events): Use
1740 py-all-events.def.
1741 * python/py-events.h (thread_event_object_type): Don't declare.
1742 (events_object): Use py-all-events.def.
1743 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1744 py-event-types.def.
1745 * python/py-event-types.def: New file.
1746 * python/py-continueevent.c (create_continue_event_object): Don't
1747 declare or define.
1748 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1749 declare or define.
1750 * python/py-all-events.def: New file.
1751
35c61a1d
TT
17522017-09-11 Tom Tromey <tom@tromey.com>
1753
1754 * python/py-threadevent.c (create_thread_event_object): Return
1755 gdbpy_ref.
1756 * python/py-stopevent.h (create_stop_event_object)
1757 (create_breakpoint_event_object, create_signal_event_object):
1758 Update.
1759 * python/py-stopevent.c (create_stop_event_object): Return
1760 gdbpy_ref.
1761 (emit_stop_event): Update.
1762 * python/py-signalevent.c (create_signal_event_object): Return
1763 gdbpy_ref.
1764 * python/py-infevents.c (create_inferior_call_event_object):
1765 Update.
1766 * python/py-event.h (create_event_object)
1767 (create_thread_event_object): Update.
1768 * python/py-event.c (create_event_object): Return gdbpy_ref.
1769 * python/py-continueevent.c: Return gdbpy_ref.
1770 * python/py-bpevent.c (create_breakpoint_event_object): Return
1771 gdbpy_ref.
1772
7c96f8c1
TT
17732017-09-11 Tom Tromey <tom@tromey.com>
1774
1775 PR python/15622:
1776 * NEWS: Add entry.
1777 * python/python.c (do_start_initialization): Initialize new event
1778 types.
1779 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1780 (gdbpy_initialize_inferior_deleted_event)
1781 (gdbpy_initialize_new_thread_event): Declare.
1782 * python/py-threadevent.c (create_thread_event_object): Add option
1783 "thread" parameter.
1784 * python/py-inferior.c (new_thread_event_object_type)
1785 (new_inferior_event_object_type)
1786 (inferior_deleted_event_object_type): Declare.
1787 (python_new_inferior, python_inferior_deleted): New functions.
1788 (add_thread_object): Emit new_thread event.
1789 (gdbpy_initialize_inferior): Attach new functions to corresponding
1790 observers.
1791 (new_thread, new_inferior, inferior_deleted): Define new event
1792 types.
1793 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1794 registries.
1795 * python/py-events.h (events_object) <new_inferior,
1796 inferior_deleted, new_thread>: New fields.
1797 * python/py-event.h (create_thread_event_breakpoint): Add optional
1798 "thread" parameter.
1799
72542b8e
AB
18002017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1801
1802 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1803 check current_ui instead.
1804 (internal_vproblem): Likewise.
1805
0d64823e
SM
18062017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1807
1808 * thread.c (print_thread_info_1): Remove unnecessary calls to
1809 uiout->is_mi_like_p.
1810
eb1e02fd
TT
18112017-09-09 Tom Tromey <tom@tromey.com>
1812
1813 * namespace.h (add_using_directive): Update.
1814 * namespace.c (add_using_directive): Change type of excludes to
1815 std::vector.
1816 * dwarf2read.c (read_import_statement): Use std::vector.
1817 (read_namespace): Update.
1818 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1819
0fc21fd8
TT
18202017-09-09 Tom Tromey <tom@tromey.com>
1821
1822 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1823
49663d05
TT
18242017-09-09 Tom Tromey <tom@tromey.com>
1825
1826 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1827
0b868b60
TT
18282017-09-09 Tom Tromey <tom@tromey.com>
1829
1830 * stack.c (func_command): Use gdb::def_vector.
1831
c0470d48
TT
18322017-09-09 Tom Tromey <tom@tromey.com>
1833
1834 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1835 ui_out_emit_list, ui_out_emit_tuple.
1836 (mi_cmd_var_update): Likewise.
1837
ca5909c7
TT
18382017-09-09 Tom Tromey <tom@tromey.com>
1839
1840 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1841 ui_out_redirect_pop.
1842 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1843 ui_out_redirect_pop.
1844 * utils.c (do_ui_out_redirect_pop)
1845 (make_cleanup_ui_out_redirect_pop): Remove.
1846 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1847 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1848 * ui-out.h (ui_out_redirect_pop): New class.
1849
e6a2252a
TT
18502017-09-09 Tom Tromey <tom@tromey.com>
1851
1852 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1853 (list_available_thread_groups, mi_cmd_list_thread_groups)
1854 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1855 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1856 Likewise.
1857
393702cd
TT
18582017-09-09 Tom Tromey <tom@tromey.com>
1859
1860 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1861 ui_out_emit_tuple.
1862
76f9c9cf
TT
18632017-09-09 Tom Tromey <tom@tromey.com>
1864
1865 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1866 * stack.c (print_frame): Use ui_out_emit_tuple.
1867 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1868 (info_spu_mailbox_command, info_spu_dma_command)
1869 (info_spu_proxydma_command): Likewise.
1870 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1871 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1872 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1873 ui_out_emit_tuple.
1874 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1875
dc9fe180
TT
18762017-09-09 Tom Tromey <tom@tromey.com>
1877
1878 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1879 (class ui_out_emit_table): Update comment.
1880 * ui-out.c (do_cleanup_table_end)
1881 (make_cleanup_ui_out_table_begin_end): Remove.
1882 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1883 (info_spu_dma_cmdlist): Likewise.
1884 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1885 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1886 ui_out_emit_table.
1887
f8cc3da6
TT
18882017-09-09 Tom Tromey <tom@tromey.com>
1889
1890 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1891 ui_out_emit_list, gdb::optional.
1892
481695ed
JB
18932017-09-09 John Baldwin <jhb@FreeBSD.org>
1894
1895 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1896 prototype.
1897 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1898 prototype.
1899 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1900 prototype.
1901 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1902 * ada-exp.y: Remove _initialize_ada_exp prototype.
1903 * ada-lang.c: Remove _initialize_ada_language prototype.
1904 * ada-tasks.c: Remove _initialize_tasks prototype.
1905 * addrmap.c: Remove _initialize_addrmap prototype.
1906 * agent.c: Remove _initialize_agent prototype.
1907 * aix-thread.c: Remove _initialize_aix_thread prototype.
1908 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1909 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1910 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1911 prototype.
1912 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1913 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1914 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1915 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1916 prototype.
1917 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1918 prototype.
1919 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1920 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1921 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1922 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1923 prototype.
1924 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1925 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1926 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1927 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1928 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1929 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1930 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1931 prototype.
1932 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1933 prototype.
1934 * annotate.c: Remove _initialize_annotate prototype.
1935 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1936 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1937 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1938 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1939 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1940 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1941 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1942 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1943 prototype.
1944 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1945 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1946 * auto-load.c: Remove _initialize_auto_load prototype.
1947 * auxv.c: Remove _initialize_auxv prototype.
1948 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1949 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1950 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1951 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1952 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1953 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1954 prototype.
1955 * break-catch-throw.c: Remove _initialize_break_catch_throw
1956 prototype.
1957 * breakpoint.c: Remove _initialize_breakpoint prototype.
1958 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1959 * btrace.c: Remove _initialize_btrace prototype.
1960 * charset.c: Remove _initialize_charset prototype.
1961 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1962 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1963 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1964 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1965 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1966 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1967 * coffread.c: Remove _initialize_coffread prototype.
1968 * compile/compile.c: Remove _initialize_compile prototype.
1969 * complaints.c: Remove _initialize_complaints prototype.
1970 * completer.c: Remove _initialize_completer prototype.
1971 * copying.awk: Remove _initialize_copying prototype.
1972 * copying.c: Regenerate.
1973 * core-regset.c: Remove _initialize_core_regset prototype.
1974 * corefile.c: Remove _initialize_core prototype.
1975 * corelow.c: Remove _initialize_corelow prototype.
1976 * cp-abi.c: Remove _initialize_cp_abi prototype.
1977 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1978 * cp-support.c: Remove _initialize_cp_support prototype.
1979 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1980 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1981 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1982 * ctf.c: Remove _initialize_ctf prototype.
1983 * d-lang.c: Remove _initialize_d_language prototype.
1984 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1985 prototype.
1986 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1987 * dbxread.c: Remove _initialize_dbxread prototype.
1988 * dcache.c: Remove _initialize_dcache prototype.
1989 * demangle.c: Remove _initialize_demangler prototype.
1990 * disasm-selftests.c: Remove _initialize_disasm_selftests
1991 prototype.
1992 * disasm.c: Remove _initialize_disasm prototype.
1993 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1994 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1995 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1996 prototype.
1997 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1998 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1999 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2000 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2001 * elfread.c: Remove _initialize_elfread prototype.
2002 * exec.c: Remove _initialize_exec prototype.
2003 * extension.c: Remove _initialize_extension prototype.
2004 * f-lang.c: Remove _initialize_f_language prototype.
2005 * f-valprint.c: Remove _initialize_f_valprint prototype.
2006 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2007 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2008 * filesystem.c: Remove _initialize_filesystem prototype.
2009 * findcmd.c: Remove _initialize_mem_search prototype.
2010 * fork-child.c: Remove _initialize_fork_child prototype.
2011 * frame-base.c: Remove _initialize_frame_base prototype.
2012 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2013 * frame.c: Remove _initialize_frame prototype.
2014 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2015 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2016 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2017 * gcore.c: Remove _initialize_gcore prototype.
2018 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2019 * gdbarch.c: Regenerate.
2020 * gdbarch.sh: Remove _initialize_gdbarch prototype.
2021 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2022 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2023 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2024 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2025 * go-lang.c: Remove _initialize_go_language prototype.
2026 * go32-nat.c: Remove _initialize_go32_nat prototype.
2027 * guile/guile.c: Remove _initialize_guile prototype.
2028 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2029 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2030 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2031 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2032 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2033 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2034 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2035 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2036 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2037 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2038 prototype.
2039 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2040 prototype.
2041 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2042 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2043 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2044 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2045 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2046 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2047 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2048 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2049 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2050 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2051 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2052 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2053 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2054 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2055 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2056 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2057 prototype.
2058 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2059 prototype.
2060 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2061 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2062 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2063 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2064 * infcall.c: Remove _initialize_infcall prototype.
2065 * infcmd.c: Remove _initialize_infcmd prototype.
2066 * inferior.c: Remove _initialize_inferiors prototype.
2067 * inflow.c: Remove _initialize_inflow prototype.
2068 * infrun.c: Remove _initialize_infrun prototype.
2069 * interps.c: Remove _initialize_interpreter prototype.
2070 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2071 * jit.c: Remove _initialize_jit prototype.
2072 * language.c: Remove _initialize_language prototype.
2073 * linux-fork.c: Remove _initialize_linux_fork prototype.
2074 * linux-nat.c: Remove _initialize_linux_nat prototype.
2075 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2076 * linux-thread-db.c: Remove _initialize_thread_db prototype.
2077 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2078 * m2-lang.c: Remove _initialize_m2_language prototype.
2079 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2080 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2081 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2082 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2083 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2084 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2085 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2086 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2087 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2088 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2089 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2090 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2091 * machoread.c: Remove _initialize_machoread prototype.
2092 * macrocmd.c: Remove _initialize_macrocmd prototype.
2093 * macroscope.c: Remove _initialize_macroscope prototype.
2094 * maint.c: Remove _initialize_maint_cmds prototype.
2095 * mdebugread.c: Remove _initialize_mdebugread prototype.
2096 * memattr.c: Remove _initialize_mem prototype.
2097 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2098 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2099 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2100 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2101 * mi/mi-main.c: Remove _initialize_mi_main prototype.
2102 * microblaze-linux-tdep.c: Remove
2103 _initialize_microblaze_linux_tdep prototype.
2104 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2105 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2106 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2107 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2108 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2109 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2110 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2111 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2112 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2113 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2114 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2115 prototype.
2116 * mipsread.c: Remove _initialize_mipsread prototype.
2117 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2118 prototype.
2119 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2120 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2121 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2122 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2123 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2124 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2125 prototype.
2126 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2127 * nto-procfs.c: Remove _initialize_procfs prototype.
2128 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2129 * objc-lang.c: Remove _initialize_objc_language prototype.
2130 * objfiles.c: Remove _initialize_objfiles prototype.
2131 * observer.c: Remove observer_test_first_notification_function,
2132 observer_test_second_notification_function,
2133 observer_test_third_notification_function, and
2134 _initialize_observer prototypes.
2135 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2136 * osabi.c: Remove _initialize_gdb_osabi prototype.
2137 * osdata.c: Remove _initialize_osdata prototype.
2138 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2139 * parse.c: Remove _initialize_parse prototype.
2140 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2141 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2142 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2143 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2144 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2145 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2146 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2147 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2148 * printcmd.c: Remove _initialize_printcmd prototype.
2149 * probe.c: Remove _initialize_probe prototype.
2150 * proc-api.c: Remove _initialize_proc_api prototype.
2151 * proc-events.c: Remove _initialize_proc_events prototype.
2152 * proc-service.c: Remove _initialize_proc_service prototype.
2153 * procfs.c: Remove _initialize_procfs prototype.
2154 * psymtab.c: Remove _initialize_psymtab prototype.
2155 * python/python.c: Remove _initialize_python prototype.
2156 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2157 * record-btrace.c: Remove _initialize_record_btrace prototype.
2158 * record-full.c: Remove _initialize_record_full prototype.
2159 * record.c: Remove _initialize_record prototype.
2160 * regcache.c: Remove _initialize_regcache prototype.
2161 * reggroups.c: Remove _initialize_reggroup prototype.
2162 * remote-notif.c: Remove _initialize_notif prototype.
2163 * remote-sim.c: Remove _initialize_remote_sim prototype.
2164 * remote.c: Remove _initialize_remote prototype.
2165 * reverse.c: Remove _initialize_reverse prototype.
2166 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2167 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2168 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2169 prototype.
2170 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2171 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2172 * rust-exp.y: Remove _initialize_rust_exp prototype.
2173 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2174 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2175 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2176 * score-tdep.c: Remove _initialize_score_tdep prototype.
2177 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2178 prototype.
2179 * ser-go32.c: Remove _initialize_ser_dos prototype.
2180 * ser-mingw.c: Remove _initialize_ser_windows prototype.
2181 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2182 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2183 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2184 * serial.c: Remove _initialize_serial prototype.
2185 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2186 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2187 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2188 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2189 * skip.c: Remove _initialize_step_skip prototype.
2190 * sol-thread.c: Remove _initialize_sol_thread prototype.
2191 * solib-aix.c: Remove _initialize_solib_aix prototype.
2192 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2193 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2194 * solib-frv.c: Remove _initialize_frv_solib prototype.
2195 * solib-spu.c: Remove _initialize_spu_solib prototype.
2196 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2197 * solib-target.c: Remove _initialize_solib_target prototype.
2198 * solib.c: Remove _initialize_solib prototype.
2199 * source.c: Remove _initialize_source prototype.
2200 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2201 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2202 prototype.
2203 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2204 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2205 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2206 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2207 prototype.
2208 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2209 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2210 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2211 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2212 prototype.
2213 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2214 prototype.
2215 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2216 prototype.
2217 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2218 prototype.
2219 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2220 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2221 prototype.
2222 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2223 prototype.
2224 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2225 prototype.
2226 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2227 prototype.
2228 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2229 prototype.
2230 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2231 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2232 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2233 * stabsread.c: Remove _initialize_stabsread prototype.
2234 * stack.c: Remove _initialize_stack prototype.
2235 * stap-probe.c: Remove _initialize_stap_probe prototype.
2236 * std-regs.c: Remove _initialize_frame_reg prototype.
2237 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2238 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2239 * symfile.c: Remove _initialize_symfile prototype.
2240 * symmisc.c: Remove _initialize_symmisc prototype.
2241 * symtab.c: Remove _initialize_symtab prototype.
2242 * target-dcache.c: Remove _initialize_target_dcache prototype.
2243 * target-descriptions.c: Remove _initialize_target_descriptions
2244 prototype.
2245 * thread.c: Remove _initialize_thread prototype.
2246 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2247 prototype.
2248 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2249 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2250 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2251 prototype.
2252 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2253 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2254 * tracefile.c: Remove _initialize_tracefile prototype.
2255 * tracepoint.c: Remove _initialize_tracepoint prototype.
2256 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2257 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2258 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2259 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2260 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2261 * tui/tui-win.c: Remove _initialize_tui_win prototype.
2262 * tui/tui.c: Remove _initialize_tui prototype.
2263 * typeprint.c: Remove _initialize_typeprint prototype.
2264 * user-regs.c: Remove _initialize_user_regs prototype.
2265 * utils.c: Remove _initialize_utils prototype.
2266 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2267 * valarith.c: Remove _initialize_valarith prototype.
2268 * valops.c: Remove _initialize_valops prototype.
2269 * valprint.c: Remove _initialize_valprint prototype.
2270 * value.c: Remove _initialize_values prototype.
2271 * varobj.c: Remove _initialize_varobj prototype.
2272 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2273 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2274 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2275 * windows-nat.c: Remove _initialize_windows_nat,
2276 _initialize_check_for_gdb_ini, and _initialize_loadable
2277 prototypes.
2278 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2279 * xcoffread.c: Remove _initialize_xcoffread prototype.
2280 * xml-support.c: Remove _initialize_xml_support prototype.
2281 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2282 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2283 prototype.
2284 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2285 prototype.
2286 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2287
a611b5cb
KS
22882017-09-08 Keith Seitz <keiths@redhat.com>
2289
2290 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2291 field.
2292
469412dd
CW
22932017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
2294
2295 * f-valprint.c (f_val_print): Remove check for one byte
2296 sized integers. Remove printing of character type.
2297
a5ad232b
FP
22982017-09-08 Frank Penczek <frank.penczek@intel.com>
2299 Christoph Weinmann <christoph.t.weinmann@intel.com>
2300 Bernhard Heckel <bernhard.heckel@intel.com>
2301
2302 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2303 to maintain proper indentation when printing pointers/refs.
2304
e5014227
JB
23052017-09-07 Joel Brobecker <brobecker@adacore.com>
2306
2307 GDB 8.0.1 released.
2308
63c99141
JB
23092017-09-07 Joel Brobecker <brobecker@adacore.com>
2310
2311 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2312
69c1e056
TT
23132017-09-05 Tom Tromey <tom@tromey.com>
2314
2315 * parse.c (funcall_chain): Now a std::vector.
2316 (start_arglist, end_arglist): Simplify.
2317 (free_funcalls): Remove.
2318 (parse_exp_in_context_1): Remove cleanup.
2319
fef704bf
TT
23202017-09-05 Tom Tromey <tom@tromey.com>
2321
2322 * go-exp.y (go_parse): Don't create a cleanup.
2323
5613c585
TT
23242017-09-05 Tom Tromey <tom@tromey.com>
2325
2326 * d-exp.y (PrimaryExpression): Use std::string.
2327 (d_parse): Don't create a cleanup.
2328
eae49211
TT
23292017-09-05 Tom Tromey <tom@tromey.com>
2330
2331 * utils.c (do_clear_parser_state): Remove.
2332 (make_cleanup_clear_parser_state): Remove.
2333 * p-exp.y (pascal_parse): Use scoped_restore.
2334 * m2-exp.y (m2_parse): Use scoped_restore.
2335 * f-exp.y (f_parse): Use scoped_restore.
2336 * d-exp.y (d_parse): Use scoped_restore.
2337 * c-exp.y (c_parse): Use scoped_restore.
2338 * ada-exp.y (ada_parse): Use scoped_restore.
2339 * utils.h (make_cleanup_clear_parser_state): Remove.
2340
73b9be8b
KS
23412017-09-06 Keith Seitz <keiths@redhat.com>
2342
2343 * dwarf2read.c (dw2_linkage_name_attr): New function.
2344 (dw2_linkage_name): New function.
2345 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2346 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2347 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2348
a102602b
KR
23492017-09-06 Kamil Rytarowski <n54@gmx.com>
2350
2351 * config/djgpp/djconfig.sh: Correct shell portability issue.
2352
28ad437d
KR
23532017-09-06 Kamil Rytarowski <n54@gmx.com>
2354
2355 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2356
351787dd
JB
23572017-09-06 John Baldwin <jhb@FreeBSD.org>
2358
2359 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2360 * NEWS: Mention new FreeBSD/mips native configuration.
2361 * configure.host: Add aarch64*-*-freebsd*.
2362 * configure.nat: Likewise.
2363 * aarch64-fbsd-nat.c: New file.
2364
c0f84956
JB
23652017-09-06 John Baldwin <jhb@FreeBSD.org>
2366
2367 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2368 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2369 * NEWS: Mention new FreeBSD/aarch64 target.
2370 * configure.tgt: Add aarch64*-*-freebsd*.
2371 * aarch64-fbsd-tdep.c: New file.
2372 * aarch64-fbsd-tdep.h: New file.
2373
7610297a
KR
23742017-09-06 Kamil Rytarowski <n54@gmx.com>
2375
2376 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2377
fbd1b771
JK
23782017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2379
2380 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2381 of TLS symbols.
2382
5ca79eae
PW
23832017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2384
2385 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2386 call.
2387
bf93d7ba
SM
23882017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2389
2390 * infrun.c (follow_exec): Call add_thread after
2391 target_find_description.
2392
1bb7c059
SM
23932017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2394
2395 * infrun.c (handle_inferior_event_1): When exec'ing, read
2396 stop_pc after follow_exec.
2397
fc809827
SM
23982017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2399
2400 * remote.c (process_g_packet): Update error message.
2401
d2fcdd85
YQ
24022017-09-05 Yao Qi <yao.qi@linaro.org>
2403
2404 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2405 targets.
2406
e69570ee
PA
24072017-09-05 Pedro Alves <palves@redhat.com>
2408
2409 * eval.c (eval_call, evaluate_funcall): New functions, factored
2410 out from ...
2411 (evaluate_subexp_standard): ... this.
2412
22916b07
YQ
24132017-09-05 Yao Qi <yao.qi@linaro.org>
2414
2415 * amd64-tdep.c (amd64_target_description): Create target
2416 descriptions.
2417 (_initialize_amd64_tdep): Don't call functions
2418 initialize_tdesc_amd64_*. Add self tests.
2419 * arch/amd64.c (amd64_create_target_description): Add parameter
2420 is_linux. Call set_tdesc_osabi if is_linux is true.
2421 * arch/amd64.h (amd64_create_target_description): Update the
2422 declaration.
2423 * arch/i386.c (i386_create_target_description): Add parameter
2424 is_linux. Call set_tdesc_osabi if is_linux is true.
2425 * arch/i386.h (i386_create_target_description): Update
2426 declaration.
2427 * configure.tgt: Add i386.o to gdb_target_obs.
2428 * features/Makefile (XMLTOC): Remove i386/*.xml.
2429 * features/i386/amd64-avx-avx512.c: Remove.
2430 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2431 * features/i386/amd64-avx-mpx.c: Remove.
2432 * features/i386/amd64-avx.c: Remove.
2433 * features/i386/amd64-mpx.c: Remove.
2434 * features/i386/amd64.c: Remove.
2435 * features/i386/i386-avx-avx512.c: Remove.
2436 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2437 * features/i386/i386-avx-mpx.c: Remove.
2438 * features/i386/i386-avx.c: Remove.
2439 * features/i386/i386-mmx.c: Remove.
2440 * features/i386/i386-mpx.c: Remove.
2441 * features/i386/i386.c: Remove.
2442 * i386-tdep.c: Don't include features/i386/i386*.c., include
2443 target-descriptions.h and arch/i386.h.
2444 (i386_target_description): Create target descriptions.
2445 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2446 functions. Do self tests.
2447
0854b7b1
YQ
24482017-09-05 Yao Qi <yao.qi@linaro.org>
2449
2450 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2451 * features/i386/amd64-avx-avx512-linux.c: Removed.
2452 * features/i386/amd64-avx-linux.c: Removed.
2453 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2454 * features/i386/amd64-avx-mpx-linux.c: Removed.
2455 * features/i386/amd64-linux.c: Removed.
2456 * features/i386/amd64-mpx-linux.c: Removed.
2457 * features/i386/x32-avx-avx512-linux.c: Removed.
2458 * features/i386/x32-avx-linux.c: Removed.
2459 * features/i386/x32-linux.c: Removed.
2460
b4570e4b
YQ
24612017-09-05 Yao Qi <yao.qi@linaro.org>
2462
2463 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2464 features/i386/*.c.
2465 (amd64_linux_read_description): Call
2466 amd64_create_target_description.
2467 * arch/amd64.c: New file.
2468 * arch/amd64.h: New file.
2469 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2470 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2471
6c73f67f
YQ
24722017-09-05 Yao Qi <yao.qi@linaro.org>
2473
2474 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2475 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2476 (amd64_linux_read_description): Create target descriptions.
2477 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2478 functions. Add unit tests.
2479 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2480 x32-core.xml.
2481 * features/i386/64bit-avx.c: Generated.
2482 * features/i386/64bit-avx512.c: Generated.
2483 * features/i386/64bit-core.c: Generated.
2484 * features/i386/64bit-linux.c: Generated.
2485 * features/i386/64bit-mpx.c: Generated.
2486 * features/i386/64bit-pkeys.c: Generated.
2487 * features/i386/64bit-segments.c: Generated.
2488 * features/i386/64bit-sse.c: Generated.
2489 * features/i386/x32-core.c: Generated.
2490 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2491 c files for amd64-linux and x32-linux.
2492
9d3d478b
YQ
24932017-09-05 Yao Qi <yao.qi@linaro.org>
2494
2495 * amd64-linux-tdep.c (amd64_linux_read_description): New
2496 function.
2497 (amd64_linux_core_read_description): Call
2498 amd64_linux_read_description.
2499 (amd64_linux_init_abi): Likewise.
2500 (amd64_x32_linux_init_abi): Likewise.
2501 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2502 * x86-linux-nat.c (x86_linux_read_description): Call
2503 amd64_linux_read_description.
2504
b9f1d50f
YQ
25052017-09-05 Yao Qi <yao.qi@linaro.org>
2506
2507 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2508 comments.
2509
188c9e6d
YQ
25102017-09-05 Yao Qi <yao.qi@linaro.org>
2511
2512 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2513 * features/i386/i386-avx-avx512-linux.c: Remove.
2514 * features/i386/i386-avx-linux.c: Remove.
2515 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2516 * features/i386/i386-avx-mpx-linux.c: Remove.
2517 * features/i386/i386-linux.c: Remove.
2518 * features/i386/i386-mmx-linux.c: Remove.
2519 * features/i386/i386-mpx-linux.c: Remove.
2520
5f035c07
YQ
25212017-09-05 Yao Qi <yao.qi@linaro.org>
2522
2523 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2524 (SFILES): Add arch/i386.c.
2525 (HFILES_NO_SRCDIR): Add arch/i386.h.
2526 * arch/i386.c: New file.
2527 * arch/i386.h: New file.
2528 * arch/tdesc.h (allocate_target_description): Declare.
2529 (set_tdesc_architecture): Declare.
2530 (set_tdesc_osabi): Declare.
2531 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2532 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2533 include arch/i386.h.
2534 (i386_linux_read_description): Remove code and call
2535 i386_create_target_description.
2536 (set_tdesc_architecture): New function.
2537 (set_tdesc_osabi): New function.
2538 * target-descriptions.h (allocate_target_description): Remove.
2539
0abe8a89
YQ
25402017-09-05 Yao Qi <yao.qi@linaro.org>
2541
2542 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2543 * target-descriptions.c (tdesc_create_feature): Likewise, and
2544 adjust code.
2545 * features/i386/32bit-avx.c: Re-generated.
2546 * features/i386/32bit-avx512.c: Re-generated.
2547 * features/i386/32bit-core.c: Re-generated.
2548 * features/i386/32bit-linux.c: Re-generated.
2549 * features/i386/32bit-mpx.c: Re-generated.
2550 * features/i386/32bit-pkeys.c: Re-generated.
2551 * features/i386/32bit-sse.c: Re-generated.
2552
0a188386
YQ
25532017-09-05 Yao Qi <yao.qi@linaro.org>
2554
2555 * regformats/regdef.h (struct reg): Override operator == and !=.
2556
f49ff000
YQ
25572017-09-05 Yao Qi <yao.qi@linaro.org>
2558
2559 * arch/tdesc.h: New file.
2560 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2561 * target-descriptions.c: Update comments.
2562 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2563 declarations.
2564 * features/i386/32bit-avx.c: Re-generated.
2565 * features/i386/32bit-avx512.c: Re-generated.
2566 * features/i386/32bit-core.c: Re-generated.
2567 * features/i386/32bit-linux.c: Re-generated.
2568 * features/i386/32bit-mpx.c: Re-generated.
2569 * features/i386/32bit-pkeys.c: Re-generated.
2570 * features/i386/32bit-sse.c: Re-generated.
2571
f7000548
YQ
25722017-09-05 Yao Qi <yao.qi@linaro.org>
2573
2574 * regformats/regdat.sh: Update generated code.
2575
c9a5e2a5
YQ
25762017-09-05 Yao Qi <yao.qi@linaro.org>
2577
2578 * regformats/regdat.sh: Adjust code order.
2579
d6b687ac
SM
25802017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2581
2582 * expprint.c (dump_subexp_body_standard): Use constant format
2583 string in fprintf_filtered call.
2584
a379bfd0
JB
25852017-09-04 John Baldwin <jhb@FreeBSD.org>
2586
2587 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2588 NetBSD/i386.
2589 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2590
f7efc967
JB
25912017-09-04 John Baldwin <jhb@FreeBSD.org>
2592
2593 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2594
c49fbc6c
JB
25952017-09-04 John Baldwin <jhb@FreeBSD.org>
2596
2597 * bsd-kvm.o: Define _KMEMUSER.
2598 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2599 * configure: Regenerate.
2600
26562e73
JB
26012017-09-04 John Baldwin <jhb@FreeBSD.org>
2602
2603 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2604 * i386-fbsd-nat.c: Likewise.
2605
31cf1487
JB
26062017-09-04 John Baldwin <jhb@FreeBSD.org>
2607
2608 * unittests/array-view-selftests.c: Add include of <array>.
2609
5b9f8a7c
JB
26102017-09-04 John Baldwin <jhb@FreeBSD.org>
2611
2612 * spu-tdep.c (flush_ea_cache): Add missing argument to
2613 call_function_by_hand.
2614
d69cf9b2
PA
26152017-09-04 Pedro Alves <palves@redhat.com>
2616
2617 * NEWS (Safer support for debugging with no debug info): New.
2618
3693fdb3
PA
26192017-09-04 Pedro Alves <palves@redhat.com>
2620
2621 * c-exp.y (function_method, function_method_void): Add current
2622 instance flags to TYPE_INSTANCE.
2623 * dwarf2read.c (check_modifier): New.
2624 (compute_delayed_physnames): Assert that only C++ adds delayed
2625 physnames. Mark fn_fields as const/volatile depending on
2626 physname.
2627 * eval.c (make_params): New type_instance_flags parameter. Use
2628 it as the new type's instance flags.
2629 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2630 flags element and pass it to make_params.
2631 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2632 instance flags element.
2633 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2634 * gdbtypes.h: Include "enum-flags.h".
2635 (type_instance_flags): New enum-flags type.
2636 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2637 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2638 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2639 (follow_type_instance_flags): New function.
2640 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2641 * parser-defs.h (follow_type_instance_flags): Declare.
2642 * valops.c (value_struct_elt_for_reference): const/volatile must
2643 match too.
2644
e68cb8e0
PA
26452017-09-04 Pedro Alves <palves@redhat.com>
2646
2647 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2648 function/method scopes; lookup the nested name as a function local
2649 static variable.
2650
858be34c
PA
26512017-09-04 Pedro Alves <palves@redhat.com>
2652
2653 (%type <voidval>): Add function_method.
2654 * c-exp.y (exp): New production for calls with no arguments.
2655 (function_method, function_method_void_or_typelist): New
2656 productions.
2657 (exp): New production for "method()::static_var".
2658 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2659 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2660 Handle OP_FUNC_STATIC_VAR.
2661 * parse.c (operator_length_standard):
2662 Handle OP_FUNC_STATIC_VAR.
2663
dd5901a6
PA
26642017-09-04 Pedro Alves <palves@redhat.com>
2665
2666 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2667 handling.
2668 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2669 Ditto.
2670 * parse.c (operator_length_standard, operator_check_standard):
2671 Ditto.
2672 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2673
46a4882b
PA
26742017-09-04 Pedro Alves <palves@redhat.com>
2675
2676 * ax-gdb.c: Include "typeprint.h".
2677 (gen_expr_for_cast): New function.
2678 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2679 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2680 type is unknown.
2681 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2682 nodebug_data_symbol.
2683 * eval.c: Include "typeprint.h".
2684 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2685 Error out if symbol has unknown type.
2686 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2687 evaluate_subexp_for_cast.
2688 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2689 OP_VAR_MSYM_VALUE.
2690 (evaluate_subexp_for_cast): New function.
2691 * gdbtypes.c (init_nodebug_var_type): New function.
2692 (objfile_type): Use it to initialize types of variables with no
2693 debug info.
2694 * typeprint.c (error_unknown_type): New.
2695 * typeprint.h (error_unknown_type): New declaration.
2696 * compile/compile-c-types.c (convert_type_basic): Handle
2697 TYPE_CODE_ERROR; warn and fallback to int for variables with
2698 unknown type.
2699
fe13dfec
PA
27002017-09-04 Pedro Alves <palves@redhat.com>
2701
2702 * eval.c (evaluate_var_value): New function, factored out from ...
2703 (evaluate_subexp_standard): ... here.
2704
d008ee21
PA
27052017-09-04 Pedro Alves <palves@redhat.com>
2706
2707 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2708 Remove useless assignments to 'op'.
2709
827d0c51
PA
27102017-09-04 Pedro Alves <palves@redhat.com>
2711
2712 * eval.c (eval_skip_value): New function.
2713 (evaluate_subexp_standard): Use it.
2714
2c5a2be1
PA
27152017-09-04 Pedro Alves <palves@redhat.com>
2716
2717 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2718 function name from symbol/minsym and pass it to
2719 error_call_unknown_return_type.
2720
74ea4be4
PA
27212017-09-04 Pedro Alves <palves@redhat.com>
2722
2723 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2724 * ax-gdb.c (gen_msym_var_ref): New function.
2725 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2726 * eval.c (evaluate_var_msym_value): New function.
2727 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2728 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2729 to call_function_by_hand.
2730 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2731 Handle OP_VAR_MSYM_VALUE.
2732 (union exp_element) <msymbol>: New field.
2733 * minsyms.h (struct type): Forward declare.
2734 (find_minsym_type_and_address): Declare.
2735 * parse.c (write_exp_elt_msym): New function.
2736 (write_exp_msymbol): Delete, refactored as ...
2737 (find_minsym_type_and_address): ... this new function.
2738 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2739 (operator_length_standard, operator_check_standard): Handle
2740 OP_VAR_MSYM_VALUE.
2741 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2742
7022349d
PA
27432017-09-04 Pedro Alves <palves@redhat.com>
2744
2745 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2746 TYPE_GNU_IFUNC specially here. Throw error if return type is
2747 unknown.
2748 * ada-typeprint.c (print_func_type): Handle functions with unknown
2749 return type.
2750 * c-typeprint.c (c_type_print_base): Handle functions and methods
2751 with unknown return type.
2752 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2753 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2754 * compile/compile-c-types.c: Include "objfiles.h".
2755 (convert_func): For functions with unknown return type, warn and
2756 default to int.
2757 * compile/compile-object-run.c (compile_object_run): Adjust call
2758 to call_function_by_hand_dummy.
2759 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2760 call_function_by_hand.
2761 * eval.c (evaluate_subexp_standard): Adjust calls to
2762 call_function_by_hand. Handle functions and methods with unknown
2763 return type. Pass expect_type to call_function_by_hand.
2764 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2765 return type.
2766 * gcore.c (call_target_sbrk): Adjust call to
2767 call_function_by_hand.
2768 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2769 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2770 an integer address type instead of nodebug.
2771 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2772 call_function_by_hand.
2773 * infcall.c (error_call_unknown_return_type): New function.
2774 (call_function_by_hand): New "default_return_type" parameter.
2775 Pass it down.
2776 (call_function_by_hand_dummy): New "default_return_type"
2777 parameter. Use it instead of defaulting to int. If there's no
2778 default and the return type is unknown, throw an error. If
2779 there's a default return type, and the called function has no
2780 debug info, then assume the function is prototyped.
2781 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2782 New "default_return_type" parameter.
2783 (error_call_unknown_return_type): New declaration.
2784 * linux-fork.c (call_lseek): Cast return type of lseek.
2785 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2786 call_function_by_hand.
2787 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2788 calls to call_function_by_hand.
2789 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2790 return type.
2791 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2792 (value_nsstring, print_object_command): Adjust calls to
2793 call_function_by_hand.
2794 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2795 functions with unknown return type.
2796 (pascal_type_print_func_varspec_suffix): New function.
2797 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2798 TYPE_CODE_METHOD>: Use it.
2799 * python/py-value.c (valpy_call): Adjust call to
2800 call_function_by_hand.
2801 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2802 call_function_by_hand.
2803 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2804 call_function_by_hand.
2805 * valops.c (value_allocate_space_in_inferior): Adjust call to
2806 call_function_by_hand.
2807 * typeprint.c (type_print_unknown_return_type): New function.
2808 * typeprint.h (type_print_unknown_return_type): New declaration.
2809
54990598
PA
28102017-09-04 Pedro Alves <palves@redhat.com>
2811
2812 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2813 types with more than one parameter as prototyped.
2814
9a24775b
PA
28152017-09-04 Pedro Alves <palves@redhat.com>
2816
2817 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2818 (disassemble_command): Use gdb_disassembly_flags instead of bare
2819 int.
2820 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2821 (dump_insns, do_mixed_source_and_assembly_deprecated)
2822 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2823 Use gdb_disassembly_flags instead of bare int.
2824 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2825 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2826 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2827 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2828 (enum gdb_disassembly_flag): ... values of this new enumeration.
2829 (gdb_disassembly_flags): Define.
2830 (gdb_disassembly)
2831 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2832 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2833 gdb_disassembly_flags instead of bare int.
2834 * record-btrace.c (btrace_insn_history)
2835 (record_btrace_insn_history, record_btrace_insn_history_range)
2836 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2837 instead of bare int.
2838 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2839 Use gdb_disassembly_flags instead of bare int.
2840 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2841 Define.
2842 * target-delegates.c: Regenerate.
2843 * target.c (target_insn_history, target_insn_history_from)
2844 (target_insn_history_range): Use gdb_disassembly_flags instead of
2845 bare int.
2846 * target.h: Include "disasm.h".
2847 (struct target_ops) <to_insn_history, to_insn_history_from,
2848 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2849 int.
2850 (target_insn_history, target_insn_history_from)
2851 (target_insn_history_range): Use gdb_disassembly_flags instead of
2852 bare int.
2853
80a65e9b
SM
28542017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2855
2856 * cli/cli-script.c (build_command_line): For if/while commands,
2857 check whether args is empty.
2858
6b66338c
SM
28592017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2860
2861 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2862 (enum command_control_type): Likewise.
2863 (struct command_line): Likewise.
2864 (free_command_lines): Likewise.
2865 (struct command_lines_deleter): Likewise.
2866 (command_line_up): Likewise.
2867 (read_command_lines): Likewise.
2868 (read_command_lines_1): Likewise.
2869 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2870 (enum command_control_type): Likewise.
2871 (struct command_line): Likewise.
2872 (free_command_lines): Likewise.
2873 (struct command_lines_deleter): Likewise.
2874 (command_line_up): Likewise.
2875 (read_command_lines): Likewise.
2876 (read_command_lines_1): Likewise.
2877 * breakpoint.h: Include cli/cli-script.h.
2878 * extension-priv.h: Likewise.
2879 * gdbcmd.h: Likewise.
2880
51abb421
PA
28812017-09-04 Pedro Alves <palves@redhat.com>
2882
2883 * ada-lang.c (is_known_support_routine): Move sal declaration to
2884 where it is initialized.
2885 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2886 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2887 (clear_command, update_static_tracepoint): Remove init_sal
2888 references. Move declarations closer to initializations.
2889 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2890 initializations.
2891 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2892 references. Move sal declarations closer to initializations.
2893 * frame.c (find_frame_sal): Return a symtab_and_line via function
2894 return instead of output parameter. Remove init_sal references.
2895 * frame.h (find_frame_sal): Return a symtab_and_line via function
2896 return instead of output parameter.
2897 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2898 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2899 instead of memset.
2900 (gdbscm_find_pc_line): Remove init_sal reference.
2901 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2902 references. Move declarations closer to initializations.
2903 * infcmd.c (set_step_frame): Update. Move declarations closer to
2904 initializations.
2905 (finish_backward): Remove init_sal references. Move declarations
2906 closer to initializations.
2907 * infrun.c (process_event_stop_test, handle_step_into_function)
2908 (insert_hp_step_resume_breakpoint_at_frame)
2909 (insert_step_resume_breakpoint_at_caller): Likewise.
2910 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2911 (symbol_to_sal): Likewise.
2912 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2913 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2914 to its initialization.
2915 * reverse.c (save_bookmark_command): Use new/delete. Remove
2916 init_sal references. Move declarations closer to initializations.
2917 * source.c (get_current_source_symtab_and_line): Remove brace
2918 initialization.
2919 (set_current_source_symtab_and_line): Now takes the sal by const
2920 reference. Remove brace initialization.
2921 (line_info): Remove init_sal reference.
2922 * source.h (set_current_source_symtab_and_line): Now takes a
2923 symtab_and_line via const reference.
2924 * stack.c (set_current_sal_from_frame): Adjust.
2925 (print_frame_info): Adjust.
2926 (get_last_displayed_sal): Return the sal via function return
2927 instead of via output parameter. Simplify.
2928 (frame_info): Adjust.
2929 * stack.h (get_last_displayed_sal): Return the sal via function
2930 return instead of via output parameter.
2931 * symtab.c (init_sal): Delete.
2932 (find_pc_sect_line): Remove init_sal references. Move
2933 declarations closer to initializations.
2934 (find_function_start_sal): Remove init_sal references. Move
2935 declarations closer to initializations.
2936 * symtab.h (struct symtab_and_line): In-class initialize all
2937 fields.
2938 * tracepoint.c (set_traceframe_context)
2939 (print_one_static_tracepoint_marker): Remove init_sal references.
2940 Move declarations closer to initializations.
2941 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2942 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2943 declarations closer to initializations.
2944 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2945 init_sal references. Adjust.
2946
6c5b2ebe
PA
29472017-09-04 Pedro Alves <palves@redhat.com>
2948
2949 * ax-gdb.c (agent_command_1): Use range-for.
2950 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2951 * breakpoint.c: Include "common/array-view.h".
2952 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2953 parameter from struct symtabs_and_lines to
2954 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2955 (breakpoint_sals_to_pc): Change sals parameter from struct
2956 symtabs_and_lines to std::vector reference.
2957 (check_fast_tracepoint_sals): Change sals parameter from struct
2958 symtabs_and_lines to std::array_view. Use range-for.
2959 (decode_static_tracepoint_spec): Return a std::vector instead of
2960 symtabs_and_lines. Update.
2961 (create_breakpoint): Update.
2962 (break_range_command, until_break_command, clear_command): Update.
2963 (base_breakpoint_decode_location, bkpt_decode_location)
2964 (bkpt_probe_create_sals_from_location)
2965 (bkpt_probe_decode_location, tracepoint_decode_location)
2966 (tracepoint_probe_decode_location)
2967 (strace_marker_create_sals_from_location): Return a std::vector
2968 instead of symtabs_and_lines.
2969 (strace_marker_create_breakpoints_sal): Update.
2970 (strace_marker_decode_location): Return a std::vector instead of
2971 symtabs_and_lines. Update.
2972 (update_breakpoint_locations): Change struct symtabs_and_lines
2973 parameters to gdb::array_view. Adjust.
2974 (location_to_sals): Return a std::vector instead of
2975 symtabs_and_lines. Update.
2976 (breakpoint_re_set_default): Use std::vector instead of struct
2977 symtabs_and_lines.
2978 (decode_location_default): Return a std::vector instead of
2979 symtabs_and_lines. Update.
2980 * breakpoint.h: Include "common/array-view.h".
2981 (struct breakpoint_ops) <decode_location>: Now returns a
2982 std::vector instead of returning a symtabs_and_lines via output
2983 parameter.
2984 (update_breakpoint_locations): Change sals parameters to use
2985 gdb::array_view.
2986 * cli/cli-cmds.c (edit_command, list_command): Update to use
2987 std::vector and gdb::array_view.
2988 (ambiguous_line_spec): Adjust to use gdb::array_view and
2989 range-for.
2990 (compare_symtabs): Rename to ...
2991 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2992 const reference and adjust.
2993 (filter_sals): Rewrite using std::vector and standard algorithms.
2994 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2995 (jump_command): Update to use std::vector.
2996 * linespec.c (struct linespec_state) <canonical_names>: Update
2997 comment.
2998 (add_sal_to_sals_basic): Delete.
2999 (add_sal_to_sals, filter_results, convert_results_to_lsals)
3000 (decode_line_2, create_sals_line_offset)
3001 (convert_address_location_to_sals, convert_linespec_to_sals)
3002 (convert_explicit_location_to_sals, parse_linespec)
3003 (event_location_to_sals, decode_line_full, decode_line_1)
3004 (decode_line_with_current_source)
3005 (decode_line_with_last_displayed, decode_objc)
3006 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3007 (linespec_result::~linespec_result): Adjust to use std::vector
3008 instead of symtabs_and_lines.
3009 * linespec.h (linespec_sals::sals): Now a std::vector.
3010 (struct linespec_result): Use std::vector, bool, and in-class
3011 initialization.
3012 (decode_line_1, decode_line_with_current_source)
3013 (decode_line_with_last_displayed): Return std::vector.
3014 * macrocmd.c (info_macros_command): Use std::vector.
3015 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3016 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3017 std::vector.
3018 * probe.h (parse_probes): Return a std::vector.
3019 * python/python.c (gdbpy_decode_line): Use std::vector and
3020 gdb::array_view.
3021 * source.c (select_source_symtab, line_info): Use std::vector.
3022 * stack.c (func_command): Use std::vector.
3023 * symtab.h (struct symtabs_and_lines): Delete.
3024 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3025
7c44b49c
PA
30262017-09-04 Pedro Alves <palves@redhat.com>
3027
3028 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3029 unittests/array-view-selftests.c.
3030 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3031 * common/array-view.h: New file.
3032 * unittests/array-view-selftests.c: New file.
3033
e439fa14
PA
30342017-09-04 Pedro Alves <palves@redhat.com>
3035
3036 * cli/cli-cmds.c (edit_command): Pass message to
3037 ambiguous_line_spec.
3038 (list_command): Pass message to ambiguous_line_spec. Say
3039 "first"/"last" instead of "start" and "end" to be consistent with
3040 the manual.
3041 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
3042 them to print formatted message.
3043
7525b645
PA
30442017-09-04 Pedro Alves <palves@redhat.com>
3045
3046 * btrace.c (ftrace_add_pt): Pass btrace_insn to
3047 ftrace_update_insns by reference instead of pointer.
3048
badc0020
YQ
30492017-09-04 Yao Qi <yao.qi@linaro.org>
3050
3051 * i386-go32-tdep.c: Include x86-xstate.h.
3052 (i386_go32_init_abi): Call i386_target_description.
3053 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3054 if xcr0 is X86_XSTATE_X87_MASK.
3055 * i386-tdep.h (tdesc_i386): Remove the declaration.
3056 (tdesc_i386_mmx): Likewise.
3057
d78bdb54
YQ
30582017-09-04 Yao Qi <yao.qi@linaro.org>
3059
3060 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3061 X86_XSTATE_SSE_MASK instead of 0.
3062
ca1fa5ee
YQ
30632017-09-04 Yao Qi <yao.qi@linaro.org>
3064
3065 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3066 i386_target_description.
3067 * i386-fbsd-nat.c (i386fbsd_read_description): Call
3068 i386_target_description.
3069 * i386-tdep.c (i386_gdbarch_init): Likewise.
3070
2434b019
YQ
30712017-09-04 Yao Qi <yao.qi@linaro.org>
3072
3073 * amd64-darwin-tdep.c: Include "x86-xstate.h".
3074 (x86_darwin_init_abi_64): Call amd64_target_description.
3075 * amd64-dicos-tdep.c: Likewise.
3076 * amd64-fbsd-nat.c: Likewise.
3077 * amd64-fbsd-tdep.c: Likewise.
3078 * amd64-nbsd-tdep.c: Likewise.
3079 * amd64-obsd-tdep.c: Likewise.
3080 * amd64-sol2-tdep.c: Likewise.
3081 * amd64-windows-tdep.c: Likewise.
3082 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3083
0860c437
SM
30842017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3085
3086 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3087 (btrace_function) <insn>: Change type to use std::vector.
3088 * btrace.c (ftrace_debug, ftrace_call_num_insn,
3089 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3090 ftrace_update_insns, ftrace_compute_global_level_offset,
3091 btrace_stitch_bts, btrace_clear, btrace_insn_get,
3092 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3093 change to std::vector.
3094 (ftrace_update_insns): Adjust to change to std::vector, change
3095 type of INSN parameter.
3096 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3097 * record-btrace.c (btrace_call_history_insn_range,
3098 btrace_compute_src_line_range,
3099 record_btrace_frame_prev_register): Adjust to change to
3100 std::vector.
3101 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3102 to change to std::vector.
3103
0638b7f9
TT
31042017-09-03 Tom Tromey <tom@tromey.com>
3105
3106 * corefile.c (reopen_exec_file): Use std::string.
3107
8f84fb0e
TT
31082017-09-03 Tom Tromey <tom@tromey.com>
3109
3110 * compile/compile.c (compile_register_name_mangled): Return
3111 std::string.
3112 * compile/compile-loc2c.c (pushf_register_address): Update.
3113 (pushf_register): Update.
3114 * compile/compile-c-types.c (convert_array): Update.
3115 * compile/compile-c-symbols.c (generate_vla_size): Update.
3116 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3117 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3118 (convert_one_symbol): Update.
3119 (generate_c_for_for_one_variable): Update.
3120 * compile/compile-c-support.c (c_get_range_decl_name): Return a
3121 std::string.
3122 (generate_register_struct): Update.
3123 * compile/compile-internal.h (c_get_range_decl_name): Return a
3124 std::string.
3125 (compile_register_name_mangled): Return std::string.
3126
18e9961f
TT
31272017-09-03 Tom Tromey <tom@tromey.com>
3128
3129 * utils.c (perror_string): Return a std::string.
3130 (throw_perror_with_name, perror_warning_with_name): Update.
3131
45343786
TT
31322017-09-03 Tom Tromey <tom@tromey.com>
3133
3134 * demangle.c (demangle_command): Use std::string,
3135 unique_xmalloc_ptr.
3136
b57af503
TT
31372017-09-03 Tom Tromey <tom@tromey.com>
3138
3139 * cli/cli-setshow.c (do_set_command): Use std::string.
3140
6eecf35f
TT
31412017-09-03 Tom Tromey <tom@tromey.com>
3142
3143 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3144
56496dd4
TT
31452017-09-03 Tom Tromey <tom@tromey.com>
3146
3147 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3148
e91a1fa7
TT
31492017-09-03 Tom Tromey <tom@tromey.com>
3150
3151 * mi/mi-cmd-env.c (env_execute_cli_command): Use
3152 gdb::unique_xmalloc_ptr.
3153
7ffd83d7
TT
31542017-09-03 Tom Tromey <tom@tromey.com>
3155
3156 * thread.c (print_thread_info_1): Use string_printf.
3157 (thread_apply_command, thread_apply_all_command): Use
3158 std::string.
3159
1ccbe998
TT
31602017-09-03 Tom Tromey <tom@tromey.com>
3161
3162 * valprint.c (val_print_string): Update.
3163 * gdbcore.h (memory_error_message): Return std::string.
3164 * corefile.c (memory_error_message): Return std::string.
3165 (memory_error): Update.
3166 * breakpoint.c (insert_bp_location): Update.
3167
23fdd69e
SM
31682017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3169
3170 * target/waitstatus.h (target_waitstatus_to_string): Change
3171 return type to std::string.
3172 * target/waitstatus.c (target_waitstatus_to_string): Return
3173 std::string.
3174 * target.h (target_waitstatus_to_string): Remove declaration.
3175 * infrun.c (resume, clear_proceed_status_thread,
3176 print_target_wait_results, do_target_wait, save_waitstatus,
3177 stop_all_threads): Adjust.
3178 * record-btrace.c (record_btrace_wait): Adjust.
3179 * target-debug.h
3180 (target_debug_print_struct_target_waitstatus_p): Adjust.
3181
5c811d30
JK
31822017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3183
3184 PR gdb/22046
3185 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3186 detection.
3187
0a2dde4a
SDJ
31882017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3189
3190 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3191 for setting/unsetting environment variables on the remote target.
3192 (New remote packets): Add entries for QEnvironmentHexEncoded,
3193 QEnvironmentUnset and QEnvironmentReset.
3194 * common/environ.c (gdb_environ::operator=): Extend method to
3195 handle m_user_set_env_list and m_user_unset_env_list.
3196 (gdb_environ::clear): Likewise.
3197 (match_var_in_string): Change type of first parameter from 'char
3198 *' to 'const char *'.
3199 (gdb_environ::set): Extend method to handle
3200 m_user_set_env_list and m_user_unset_env_list.
3201 (gdb_environ::unset): Likewise.
3202 (gdb_environ::clear_user_set_env): New method.
3203 (gdb_environ::user_set_envp): Likewise.
3204 (gdb_environ::user_unset_envp): Likewise.
3205 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3206 m_user_unset_env_list on move constructor/assignment.
3207 (unset): Add new default parameter 'update_unset_list = true'.
3208 (clear_user_set_env): New method.
3209 (user_set_envp): Likewise.
3210 (user_unset_envp): Likewise.
3211 (m_user_set_env_list): New std::set.
3212 (m_user_unset_env_list): Likewise.
3213 * common/rsp-low.c (hex2str): New function.
3214 (bin2hex): New overload for bin2hex function.
3215 * common/rsp-low.c (hex2str): New prototype.
3216 (str2hex): New overload prototype.
3217 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3218 QEnvironmentUnset and QEnvironmentReset.
3219 (remote_protocol_features): Add QEnvironmentHexEncoded,
3220 QEnvironmentUnset and QEnvironmentReset packets.
3221 (send_environment_packet): New function.
3222 (extended_remote_environment_support): Likewise.
3223 (extended_remote_create_inferior): Call
3224 extended_remote_environment_support.
3225 (_initialize_remote): Add QEnvironmentHexEncoded,
3226 QEnvironmentUnset and QEnvironmentReset packet configs.
3227 * unittests/environ-selftests.c (gdb_selftest_env_var):
3228 New variable.
3229 (test_vector_initialization): New function.
3230 (test_init_from_host_environ): Likewise.
3231 (test_reinit_from_host_environ): Likewise.
3232 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3233 Likewise.
3234 (test_unset_set_empty_vector): Likewise.
3235 (test_vector_clear): Likewise.
3236 (test_std_move): Likewise.
3237 (test_move_constructor):
3238 (test_self_move): Likewise.
3239 (test_set_unset_reset): Likewise.
3240 (run_tests): Rewrite in terms of the functions above.
3241
654670a4
WP
32422017-08-31 Weimin Pan <weimin.pan@oracle.com>
3243
3244 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3245 (adi_available): Use a temp variable of type CORE_ADDR as argument
3246 3 when calling target_auxv_search.
3247 (adi_normalize_address): Use masks and xor operators to calculate
3248 normalized address.
3249 (adi_read_versions, adi_write_versions, adi_print_versions)
3250 (do_examine, do_assign): Use paddress.
3251
7755ddb7
JB
32522017-08-29 John Baldwin <jhb@FreeBSD.org>
3253
3254 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3255 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3256 out of loop and add supply of FIR.
3257 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3258 add collect of FIR.
3259
fd437cbc
SM
32602017-08-28 Simon Marchi <simon.marchi@ericsson.com>
3261
3804a343 3262 PR gdb/21827
fd437cbc
SM
3263 * cli/cli-script.c (define_command): Don't convert command name
3264 to lower case.
3265
988f6b3d
JB
32662017-08-25 Joel Brobecker <brobecker@adacore.com>
3267
3268 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3269 Update all callers accordingly. Remove all code blocks handling
3270 the case where DISPP is not NULL.
3271
663c44ac
JK
32722017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3273
3274 PR symtab/22003
3275 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3276 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3277 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3278
f1902523
JK
32792017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3280
3281 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3282 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3283 (read_comp_units_from_section): New parameter abbrev_section, use
3284 read_and_check_comp_unit_head, allocate signatured_type if needed.
3285 (create_all_comp_units): Update read_comp_units_from_section caller.
3286
87215ad1
SDJ
32872017-08-23 Pedro Alves <palves@redhat.com>
3288
3289 PR remote/21852
3290 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3291 to null_ptid and switch to thread without reading the registers
3292 after adding the inferior.
3293
6e41ddec
JK
32942017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3295
3296 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3297 compile-gcc.
3298 * compile/compile.c (compile_gcc, show_compile_gcc): New.
3299 (compile_to_object): Implement compile_gcc.
3300 (_initialize_compile): Install "set compile-gcc". Initialize
3301 compile_gcc.
3302
e68c32d5
JK
33032017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3304
3305 * compile/compile.c (compile_to_object): Conditionally call
3306 set_verbose. Conditionally call compile or compile_v0.
3307
58afddc6
WP
33082017-08-07 Weimin Pan <weimin.pan@oracle.com>
3309
3310 * sparc64-tdep.h: (adi_normalize_address): New export.
3311 * sparc-nat.h: (open_adi_tag_fd): New export.
3312 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3313 * sparc64-linux-tdep.c:
3314 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3315 (sparc64_linux_handle_segmentation_fault): New function.
3316 (sparc64_linux_init_abi): Register
3317 sparc64_linux_handle_segmentation_fault
3318 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3319 (sparc64_addr_bits_remove): New function.
3320 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3321 (MAX_PROC_NAME_SIZE): New macro.
3322 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3323 (sparc64adilist): New variable.
3324 (adi_proc_list): New variable.
3325 (find_adi_info): New function.
3326 (add_adi_info): New function.
3327 (get_adi_info_proc): New function.
3328 (get_adi_info): New function.
3329 (info_adi_command): New function.
3330 (read_maps_entry): New function.
3331 (adi_available): New function.
3332 (adi_normalize_address): New function.
3333 (adi_align_address): New function.
3334 (adi_convert_byte_count): New function.
3335 (adi_tag_fd): New function.
3336 (adi_is_addr_mapped): New function.
3337 (adi_read_versions): New function.
3338 (adi_write_versions): New function.
3339 (adi_print_versions): New function.
3340 (do_examine): New function.
3341 (do_assign): New function.
3342 (adi_examine_command): New function.
3343 (adi_assign_command): New function.
3344 (_initialize_sparc64_adi_tdep): New function.
3345
11db9430
SM
33462017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3347
3348 * breakpoint.c (breakpoints_info): Rename to ...
3349 (info_breakpoints_command): ... this.
3350 (watchpoints_info): Rename to ...
3351 (info_watchpoints_command): ... this.
3352 (tracepoints_info): Rename to ...
3353 (info_tracepoints_command): ... this.
3354 (_initialize_breakpoint): Adjust.
3355 * dcache.c (dcache_info): Rename to ...
3356 (info_display_command): ... this.
3357 (_initialize_dcache): Adjust.
3358 * frame.h (args_info): Rename to ...
3359 (info_args_command): ... this.
3360 (locals_info): Rename to ...
3361 (info_locals_command): ... this.
3362 * infcmd.c (nofp_registers_info): Rename to ...
3363 (info_registers_command): ... this.
3364 (float_info): Rename to ...
3365 (info_float_command): ... this.
3366 (program_info): Rename to ...
3367 (info_program_command): ... this.
3368 (all_registers_info): Rename to ...
3369 (info_all_registers_command): ... this.
3370 (vector_info): Rename to ...
3371 (info_vector_command): ... this.
3372 (float_info): Rename to ...
3373 (info_float_command): ... this.
3374 (_initialize_infcmd): Adjust.
3375 * inferior.h (term_info): Rename to ...
3376 (info_terminal_command): ... this.
3377 * inflow.c (term_info): Rename to ...
3378 (info_terminal_command): ... this.
3379 (_initialize_inflow): Adjust.
3380 * infrun.c (signals_info): Rename to ...
3381 (info_signals_command): ... this.
3382 (_initialize_infrun): Adjust.
3383 * objc-lang.c (classes_info): Rename to ...
3384 (info_classes_command): ... this.
3385 (selectors_info): Rename to ...
3386 (info_selectors_command): ... this.
3387 (_initialize_objc_language): Adjust.
3388 * printcmd.c (sym_info): Rename to ...
3389 (info_symbol_command): ... this.
3390 (address_info): Rename to ...
3391 (info_address_command): ... this.
3392 (display_info): Rename to ...
3393 (info_display_command): ... this.
3394 (_initialize_printcmd): Adjust.
3395 * reverse.c (bookmarks_info): Rename to ...
3396 (info_breakpoints_command): ... this.
3397 (_initialize_reverse): Adjust.
3398 * ser-go32.c (dos_info): Rename to ...
3399 (info_serial_command): ... this.
3400 (_initialize_ser_dos): Adjust.
3401 * skip.c (skip_info): Rename to ...
3402 (info_skip_command): ... this.
3403 (_initialize_step_skip): Adjust.
3404 * source.c (line_info): Rename to ...
3405 (info_line_command): ... this.
3406 (source_info): Rename to ...
3407 (info_source_command)
3408 * stack.c (frame_info): Rename to ...
3409 (info_frame_command): ... this.
3410 (locals_info): Rename to ...
3411 (info_locals_command): ... this.
3412 (args_info): Rename to ...
3413 (info_args_command): ... this.
3414 (_initialize_stack): Adjust.
3415 * symtab.c (sources_info): Rename to ...
3416 (info_sources_command): ... this.
3417 (variables_info): Rename to ...
3418 (info_variables_command): ... this.
3419 (functions_info): Rename to ...
3420 (info_functions_command): ... this.
3421 (types_info): Rename to ...
3422 (info_types_command): ... this.
3423 (_initialize_symtab): Adjust.
3424 * target.c (target_info): Rename to ...
3425 (info_target_command): ... this.
3426 (initialize_targets): Adjust.
3427 * tracepoint.c (tvariables_info): Rename to ...
3428 (info_tvariables_command): ... this.
3429 (scope_info): Rename to ...
3430 (info_scope_command): ... this.
3431 (trace_dump_actions): Adjust.
3432 (_initialize_tracepoint): Adjust.
3433
b270e6f9
TT
34342017-08-22 Tom Tromey <tom@tromey.com>
3435
3436 * breakpoint.h (install_breakpoint): Update.
3437 * breakpoint.c (add_solib_catchpoint): Update.
3438 (install_breakpoint): Change argument to a std::unique_ptr.
3439 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3440 (create_breakpoint_sal, create_breakpoint): Update.
3441 (watch_command_1, catch_exec_command_1)
3442 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3443 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3444 Return the breakpoint.
3445 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3446 (new_single_step_breakpoint): Update.
3447 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3448 std::unique_ptr.
3449 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3450 std::unique_ptr.
3451 * break-catch-sig.c (create_signal_catchpoint): Use
3452 std::unique_ptr.
3453 * ada-lang.c (create_ada_exception_catchpoint): Use
3454 std::unique_ptr.
3455
36bd8eaa
TT
34562017-08-22 Tom Tromey <tom@tromey.com>
3457
3458 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3459
56f37645
TT
34602017-08-22 Tom Tromey <tom@tromey.com>
3461
3462 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3463 (lookup_partial_symbol): Update.
3464
0b581c69
TT
34652017-08-22 Tom Tromey <tom@tromey.com>
3466
3467 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3468 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3469 (find_and_open_source, symtab_to_fullname): Update.
3470 * psymtab.c (psymtab_to_fullname): Update.
3471
14278e1f
TT
34722017-08-22 Tom Tromey <tom@tromey.com>
3473
3474 * exec.c (exec_file_attach): Update.
3475 * linux-thread-db.c (try_thread_db_load): Update.
3476 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3477 * utils.c (gdb_realpath): Change return type.
3478 (gdb_realpath_keepfile): Update.
3479 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3480 (_initialize_utils): Register the new self test.
3481 * source.c (openp): Update.
3482 (find_and_open_source): Update.
3483 * nto-tdep.c (nto_find_and_open_solib): Update.
3484 * main.c (set_gdb_data_directory): Update.
3485 (captured_main_1): Update.
3486 * dwarf2read.c (dwarf2_get_dwz_file): Update
3487 (dw2_map_symbol_filenames): Update.
3488 * auto-load.c (auto_load_safe_path_vec_update): Update.
3489 (filename_is_in_auto_load_safe_path_vec): Change type of
3490 "filename_realp".
3491 (auto_load_objfile_script): Update.
3492 (file_is_auto_load_safe): Update. Use std::string.
3493 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3494
4971c9a7
TT
34952017-08-22 Tom Tromey <tom@tromey.com>
3496
3497 * utils.c (gdb_realpath_keepfile): Return a
3498 gdb::unique_xmalloc_ptr.
3499 * exec.c (exec_file_attach): Update.
3500 * utils.h (gdb_realpath_keepfile): Return a
3501 gdb::unique_xmalloc_ptr.
3502
e3e41d58
TT
35032017-08-22 Tom Tromey <tom@tromey.com>
3504
3505 * compile/compile.c (compile_file_command): Use
3506 gdb::unique_xmalloc_ptr, std::string.
3507 * utils.c (gdb_abspath): Change return type.
3508 * source.c (openp): Update.
3509 * objfiles.c (allocate_objfile): Update.
3510 * main.c (set_gdb_data_directory): Update.
3511 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3512
0d999a6e
ZZ
35132017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3514
3515 * cli-cmds.c (list_commands): List actual code around more than
3516 one location.
3517
329d5e7e
JB
35182017-08-21 John Baldwin <jhb@FreeBSD.org>
3519
3520 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3521
bf223d3e
PA
35222017-08-21 Pedro Alves <palves@redhat.com>
3523
3524 PR gdb/19487
3525 * c-exp.y (variable production): Handle function aliases.
3526 * minsyms.c (msymbol_is_text): New function.
3527 * minsyms.h (msymbol_is_text): Declare.
3528 * symtab.c (find_function_alias_target): New function.
3529 * symtab.h (find_function_alias_target): Declare.
3530
c973d0aa
PA
35312017-08-21 Pedro Alves <palves@redhat.com>
3532
3533 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3534 typedefs.
3535 * typeprint.c (whatis_exp): If handling "whatis", and expression
3536 is OP_TYPE, strip one typedef level. Otherwise don't strip
3537 typedefs here.
3538 * valops.c (value_cast): Save "to" type before resolving
3539 stubs/typedefs. Use that type as resulting value's type.
3540
2989a365
TT
35412017-08-18 Tom Tromey <tom@tromey.com>
3542 Pedro Alves <palves@redhat.com>
3543
3544 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3545 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3546 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3547 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3548 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3549 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3550 (linux_get_siginfo_data): Add "thread" argument. Use
3551 scoped_restore.
3552 * linux-nat.c (linux_child_follow_fork)
3553 (check_stopped_by_watchpoint): Use scoped_restore.
3554 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3555 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3556 (restore_inferior_ptid, save_inferior_ptid): Remove.
3557 * btrace.c (btrace_fetch): Use scoped_restore.
3558 * bsd-uthread.c (bsd_uthread_fetch_registers)
3559 (bsd_uthread_store_registers): Use scoped_restore.
3560 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3561 scoped_restore.
3562 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3563 (aix_thread_xfer_partial): Use scoped_restore.
3564 * inferior.h (save_inferior_ptid): Remove.
3565
e60eb288
YQ
35662017-08-18 Yao Qi <yao.qi@linaro.org>
3567
3568 PR tdep/21818
3569 * arm-tdep.c (gdb_print_insn_arm): Mark
3570 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3571
6d580b63
YQ
35722017-08-18 Yao Qi <yao.qi@linaro.org>
3573
3574 * NEWS: Mention GDBserver's new option "--selftest".
3575 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3576 * selftest.c: Move it to common/selftest.c.
3577 * selftest.h: Move it to common/selftest.h.
3578 * selftest-arch.c (reset): New function.
3579 (tests_with_arch): Call reset.
3580
86dcbf50
YQ
35812017-08-18 Yao Qi <yao.qi@linaro.org>
3582
3583 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3584 instead of exception_fprintf and printf_filtered.
3585
7649770c
YQ
35862017-08-18 Yao Qi <yao.qi@linaro.org>
3587
3588 * selftest.c (register_self_test): Rename it to
3589 selftests::register_test.
3590 (run_self_tests): selftest::run_tests.
3591 * selftest.h: Update declarations.
3592 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3593 selftests::register_test_foreach_arch.
3594 * selftest-arch.h: Update declaration.
3595 * aarch64-tdep.c: Update.
3596 * arm-tdep.c: Likewise.
3597 * disasm-selftests.c: Likewise.
3598 * dwarf2loc.c: Likewise.
3599 * dwarf2-frame.c: Likewise.
3600 * findvar.c: Likewise.
3601 * gdbarch-selftests.c: Likewise.
3602 * maint.c (maintenance_selftest): Likewise.
3603 * regcache.c: Likewise.
3604 * rust-exp.y: Likewise.
3605 * selftest-arch.c: Likewise.
3606 * unittests/environ-selftests.c: Likewise.
3607 * unittests/function-view-selftests.c: Likewise.
3608 * unittests/offset-type-selftests.c: Likewise.
3609 * unittests/optional-selftests.c: Likewise.
3610 * unittests/scoped_restore-selftests.c: Likewise.
3611 * utils-selftests.c: Likewise.
3612
b0cba12e
PA
36132017-08-17 Pedro Alves <palves@redhat.com>
3614
3615 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3616 local.
3617
4c8aa72d
PA
36182017-08-17 Pedro Alves <palves@redhat.com>
3619
3620 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3621 field.
3622 (reset_die_in_process): Delete, replaced by ...
3623 (process_die_scope): ... this new class. Make it responsible for
3624 freeing cu->line_header too.
3625 (process_die): Use process_die_scope.
3626 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3627 cu->line_header_die_owner. Don't release the line header if it's
3628 owned by the CU.
3629 (setup_type_unit_groups): Make the CU/DIE own the line header.
3630 Don't release the line header here.
3631
ba713918
AL
36322017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3633
3634 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3635
44d0fb3a
RK
36362017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3637
3638 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3639 Single-Key mode
3640
a5afdb16
RK
36412017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3642
3643 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3644 mode command list.
3645
47613aeb
SH
36462017-08-15 Stafford Horne <shorne@gmail.com>
3647
3648 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3649
9c3cc999
SH
36502017-08-15 Stafford Horne <shorne@gmail.com>
3651
3652 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3653
206726fb
SDJ
36542017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3655
3656 PR gdb/21954
3657 * infcmd.c (unset_environment_command): Use the 'clear' method on
3658 the environment instead of resetting it.
3659
0335ac6d
JB
36602017-08-15 John Baldwin <jhb@FreeBSD.org>
3661
3662 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3663 platforms.
3664
d3abe1c8
TT
36652017-08-14 Tom Tromey <tom@tromey.com>
3666
3667 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3668 (print_binary_chars): Likewise.
3669 (BITS_IN_BYTES): Remove.
3670
d6382fff
TT
36712017-08-14 Tom Tromey <tom@tromey.com>
3672
3673 PR gdb/21675
3674 * valprint.c (LOW_ZERO): Change value to 034.
3675 (print_octal_chars): Add static_asserts for octal constants.
3676 * printcmd.c (print_scalar_formatted): Add 'd' case.
3677
f978cb06
TT
36782017-08-11 Tom Tromey <tom@tromey.com>
3679
3680 * symfile.c (add_symbol_file_command): Use std::vector.
3681
2f5404b3
TT
36822017-08-14 Tom Tromey <tom@tromey.com>
3683
3684 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3685 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3686 std::move.
3687 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3688
de7985c3
PA
36892017-08-11 Pedro Alves <palves@redhat.com>
3690
3691 * infrun.c (process_event_stop_test): Adjust
3692 function_name_is_marked_for_skip call.
3693 * skip.c: Include <list>.
3694 (skiplist_entry): Make it a class with private fields, and
3695 getters/setters.
3696 (skiplist_entry_chain): Delete.
3697 (skiplist_entries): New.
3698 (skiplist_entry_count): Delete.
3699 (highest_skiplist_entry_num): New.
3700 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3701 (add_skiplist_entry): Delete.
3702 (skiplist_entry::skiplist_entry): New.
3703 (skiplist_entry::add_entry): New.
3704 (skip_file_command, skip_function): Adjust.
3705 (compile_skip_regexp): Delete.
3706 (skip_command): Don't compile regexp here. Adjust to use
3707 skiplist_entry::add_entry.
3708 (skip_info): Adjust to use range-for and getters.
3709 (skip_enable_command, skip_disable_command): Adjust to use
3710 range-for and setters.
3711 (skip_delete_command): Adjust to use std::list.
3712 (add_skiplist_entry): Delete.
3713 (skip_file_p): Delete, refactored as ...
3714 (skiplist_entry::do_skip_file_p): ... this new method.
3715 (skip_gfile_p): Delete, refactored as ...
3716 (skiplist_entry::do_gskip_file_p): ... this new method.
3717 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3718 (skiplist_entry::skip_function_p): ... this new method.
3719 (function_name_is_marked_for_skip): Now returns bool, and takes
3720 the function sal by const reference. Adjust to use range-for and
3721 skiplist_entry methods.
3722 (_initialize_step_skip): Remove references to
3723 skiplist_entry_chain, skiplist_entry_count.
3724 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3725 takes the function sal by const reference.
3726
be7d3cd5
YQ
37272017-08-11 Yao Qi <yao.qi@linaro.org>
3728
3729 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3730 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3731 (dwarf2_frame_cache):
3732 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3733 RETURN_MASK_ALL and set *this_case to NULL.
3734 * frame-unwind.h: Update comments.
3735
1c90d9f0
YQ
37362017-08-11 Yao Qi <yao.qi@linaro.org>
3737
3738 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3739 (dwarf2_frame_state_copy_regs): Remove.
3740 (dwarf2_frame_state_free_regs): Remove.
3741 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3742 (dwarf2_restore_rule): Call method .alloc_regs instead of
3743 dwarf2_frame_state_alloc_regs.
3744 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3745 constructor. Call std::move.
3746 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3747 (dwarf2_frame_cache): Likewise.
3748
3749 [GDB_SELF_TEST]: Include selftest.h and
3750 selftest-arch.h.
3751 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3752 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3753 execute_cfa_program_test.
3754
3755 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3756 copy ctor, assignment operator, move assignment.
3757 <alloc_regs>: New method.
3758 <swap>: New method.
3759 (struct dwarf2_frame_state): Delete dtor.
3760 (dwarf2_frame_state_alloc_regs): Remove declaration.
3761 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3762 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3763
afe37d6b
YQ
37642017-08-11 Yao Qi <yao.qi@linaro.org>
3765
3766 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3767 (dwarf2_frame_state::dwarf2_frame_state): New.
3768 (dwarf2_frame_state::~dwarf2_frame_state): New.
3769 (dwarf2_fetch_cfa_info): Update.
3770 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3771 rather than a pointer. Update code.
3772 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3773 dtor.
3774 <data_align, code_align, retaddr_column>: Change them to const.
3775 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3776 to bool.
3777
b348037f
YQ
37782017-08-11 Yao Qi <yao.qi@linaro.org>
3779
3780 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3781 <loc.exp>: New field.
3782 * dwarf2-frame.c (execute_cfa_program): Update.
3783 (dwarf2_frame_prev_register): Update.
3784
e7c9de26
PA
37852017-08-10 Pedro Alves <palves@redhat.com>
3786
3787 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3788
e8c6b620
JB
37892017-08-09 John Baldwin <jhb@FreeBSD.org>
3790
3791 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3792 (fbsd_pending_children): Use std::list.
3793 (fbsd_remember_child): Likewise.
3794 (fbsd_is_child_pending): Likewise.
3795 (fbsd_pending_vfork_done): Use std::forward_list.
3796 (fbsd_add_vfork_done): Likewise.
3797 (fbsd_is_vfork_done_pending): Likewise.
3798 (fbsd_next_vfork_done): Likewise.
3799
e4a26669
JB
38002017-08-09 John Baldwin <jhb@FreeBSD.org>
3801
3802 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3803 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3804 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3805 for `mapfilename'.
3806 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 3807 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 3808
142311d3
JB
38092017-08-09 John Baldwin <jhb@FreeBSD.org>
3810
3811 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3812 "filestuff.h".
3813 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3814
42fa2e0e
TT
38152017-08-09 Tom Tromey <tom@tromey.com>
3816
3817 * skip.c (skiplist_entry): New constructor.
3818 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3819 (skiplist_entry::file_is_glob): Now bool.
3820 (skiplist_entry::file, skiplist_entry::function): Now
3821 std::string.
3822 (make_skip_entry): Return a unique_ptr. Use new.
3823 (free_skiplist_entry, free_skiplist_entry_cleanup)
3824 (make_free_skiplist_entry_cleanup): Remove.
3825 (skip_command, skip_disable_command, add_skiplist_entry)
3826 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3827 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3828 (function_name_is_marked_for_skip): Update.
3829 (skip_delete_command): Update. Use delete.
3830
cd3af38d
JW
38312017-08-09 Jiong Wang <jiong.wang@arm.com>
3832
3833 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3834 (aarch64_linux_core_read_description): New function.
3835 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3836
29592bde
PA
38372017-08-09 Pedro Alves <palves@redhat.com>
3838
3839 * cp-name-parser.y (cp_comp_to_string): Return a
3840 gdb::unique_xmalloc_ptr<char>.
3841 * cp-support.c (replace_typedefs_qualified_name)
3842 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3843 (cp_canonicalize_string_full): Use op= instead of explicit
3844 convertion.
3845 (cp_class_name_from_physname, method_name_from_physname)
3846 (cp_func_name, cp_remove_params): Adjust to use
3847 gdb::unique_xmalloc_ptr<char>.
3848 * cp-support.h (cp_comp_to_string): Return a
3849 gdb::unique_xmalloc_ptr<char>.
3850 * python/py-type.c (typy_lookup_type): Adjust to use
3851 gdb::unique_xmalloc_ptr<char>.
3852
b3340438
L
38532017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3854
3855 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3856
e88e8651
YQ
38572017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3858 Yao Qi <yao.qi@linaro.org>
3859
3860 * cp-support.c (cp_canonicalize_string_full): Use
3861 gdb::unique_xmalloc_ptr<char>.
3862 (cp_canonicalize_string): Likewise.
3863
f5a29eb0
YQ
38642017-08-09 Yao Qi <yao.qi@linaro.org>
3865
3866 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3867 * regformats/i386/amd64-avx-avx512.dat: Remove.
3868 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3869 * regformats/i386/amd64-avx-mpx.dat:Remove.
3870 * regformats/i386/amd64-avx.dat: Remove.
3871 * regformats/i386/amd64-mpx.dat: Remove.
3872 * regformats/i386/i386-avx-avx512.dat: Remove.
3873 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3874 * regformats/i386/i386-avx-mpx.dat: Remove.
3875 * regformats/i386/i386-mmx.dat: Remove.
3876 * regformats/i386/i386-mpx.dat: Remove.
3877
57757c2f
YQ
38782017-08-09 Yao Qi <yao.qi@linaro.org>
3879
3880 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3881 * amd64-tdep.c: Don't include features/i386/x32*.c.
3882 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3883 functions.
3884 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3885 and i386/x32-avx-avx512.
3886 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3887 and i386/x32.xml.
3888 * features/i386/x32-avx-avx512.c: Removed.
3889 * features/i386/x32-avx-avx512.xml: Removed.
3890 * features/i386/x32-avx.c: Removed.
3891 * features/i386/x32-avx.xml: Removed.
3892 * features/i386/x32.c: Removed.
3893 * features/i386/x32.xml: Removed.
3894 * regformats/i386/x32-avx-avx512.dat: Removed.
3895 * regformats/i386/x32-avx.dat: Removed.
3896 * regformats/i386/x32.dat: Removed.
3897
ba7b109b
MR
38982017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3899
3900 PR breakpoints/21886
3901 * mem-break.c (default_memory_insert_breakpoint): Use
3902 `->placed_address' rather than `->reqstd_address' for the
3903 breakpoint location.
3904
e347efc3
MR
39052017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3906
3907 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3908 assertions.
3909
0dba2a6c
MR
39102017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3911
3912 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3913 a union of `tdep_info', `tdesc_data' and `id'.
3914 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3915 rather than `info.tdep_info'.
3916 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3917 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3918 * i386-tdep.c (i386_gdbarch_init): Likewise.
3919 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3920 * mips-tdep.c (mips_gdbarch_init): Likewise.
3921 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3922 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3923 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3924 `info.tdep_info'.
3925 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3926 `info.tdep_info'.
3927 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3928 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3929 `info.tdep_info'.
3930 * spu-tdep.c (spu_gdbarch_init): Likewise.
3931 * gdbarch.h: Regenerate.
3932
16eb6b2d
LS
39332017-08-07 Leszek Swirski <leszeks@google.com>
3934
7b005726 3935 PR symtab/20899
16eb6b2d
LS
3936 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3937
74cbb09e
SM
39382017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3939
3940 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3941 (gdbsim_open): Rename gdb_argv args object to argv.
3942
ee0c3293
TT
39432017-08-05 Tom Tromey <tom@tromey.com>
3944
3945 * compile/compile-object-load.c (compile_object_load): Use
3946 gdb::unique_xmalloc_ptr.
3947 * cli/cli-dump.c (scan_filename): Rename from
3948 scan_filename_with_cleanup. Change return type.
3949 (scan_expression): Rename from scan_expression_with_cleanup.
3950 Change return type.
3951 (dump_memory_to_file, dump_value_to_file, restore_command):
3952 Use gdb::unique_xmalloc_ptr. Update.
3953 * cli/cli-cmds.c (find_and_open_script): Use
3954 gdb::unique_xmalloc_ptr.
3955 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3956 * symmisc.c (maintenance_print_symbols)
3957 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3958 * symfile.c (symfile_bfd_open, generic_load)
3959 (add_symbol_file_command, remove_symbol_file_command): Use
3960 gdb::unique_xmalloc_ptr.
3961 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3962 * psymtab.c (maintenance_print_psymbols): Use
3963 gdb::unique_xmalloc_ptr.
3964 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3965 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3966 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3967 (reload_shared_libraries_1): Likewise.
3968
3232fabd
TT
39692017-08-05 Tom Tromey <tom@tromey.com>
3970
3971 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3972 (rust_op_vector, rust_set_vector): New typedefs.
3973 (current_parser): New global.
3974 (work_obstack): Change to pointer type. Update all users.
3975 (rust_ast, pstate): Remove globals.
3976 (struct rust_parser): New.
3977 (%union) <params, field_inits>: Change type.
3978 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3979 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3980 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3981 (convert_params_to_types, convert_params_to_expression): Change
3982 type of "params".
3983 (ast_string): Change type of "fields".
3984 (rust_parse): Make a rust_parser. Remove cleanups.
3985 (rust_lex_tests): Make and install an auto_obstack.
3986
f02fd774
YQ
39872017-08-04 Yao Qi <yao.qi@linaro.org>
3988
3989 * configure.srv (ipa_x32_linux_regobj): New.
3990 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3991 instead of X86_TDESC_AVX512.
3992 (initialize_low_tracepoint): Call
3993 init_registers_x32_avx_avx512_linux.
3994
91975afd
YQ
39952017-08-04 Yao Qi <yao.qi@linaro.org>
3996
3997 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3998
2331fa3a
RK
39992017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
4000
4001 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4002
744e4fe1
TT
40032017-08-03 Tom Tromey <tom@tromey.com>
4004
4005 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4006 Remove.
4007 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4008
1c034b67
TT
40092017-08-03 Tom Tromey <tom@tromey.com>
4010
4011 * python/py-param.c (compute_enum_values): Use gdb_argv.
4012
773a1edc
TT
40132017-08-03 Tom Tromey <tom@tromey.com>
4014
4015 * utils.h (struct gdb_argv_deleter): New.
4016 (gdb_argv): New class.
4017 * utils.c (gdb_argv::reset): New method.
4018 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4019 * tracefile.c (tsave_command): Use gdb_argv.
4020 * top.c (new_ui_command): Use gdb_argv.
4021 * symmisc.c (maintenance_print_symbols)
4022 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4023 * symfile.c (symbol_file_command, generic_load)
4024 (remove_symbol_file_command): Use gdb_argv.
4025 * stack.c (backtrace_command): Use gdb_argv.
4026 * source.c (add_path, show_substitute_path_command)
4027 (unset_substitute_path_command, set_substitute_path_command):
4028 Use gdb_argv.
4029 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
4030 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4031 * remote.c (extended_remote_run, remote_put_command)
4032 (remote_get_command, remote_delete_command): Use gdb_argv.
4033 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4034 (gdbsim_open): Use gdb_argv.
4035 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4036 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4037 * procfs.c (procfs_info_proc): Use gdb_argv.
4038 * interps.c (interpreter_exec_cmd): Use gdb_argv.
4039 * infrun.c (handle_command): Use gdb_argv.
4040 * inferior.c (add_inferior_command, clone_inferior_command):
4041 Use gdb_argv.
4042 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4043 * exec.c (exec_file_command): Use gdb_argv.
4044 * cli/cli-cmds.c (alias_command): Use gdb_argv.
4045 * compile/compile.c (build_argc_argv): Use gdb_argv.
4046
0d50bde3
TT
40472017-08-03 Tom Tromey <tom@tromey.com>
4048
4049 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4050
7f968c89
TT
40512017-08-03 Tom Tromey <tom@tromey.com>
4052
4053 * python/python.c (compute_python_string): Return std::string.
4054 (gdbpy_eval_from_control_command): Update.
4055 (do_start_initialization): Use std::string.
4056 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4057 xstrprintf.
4058 * python/py-breakpoint.c (local_setattro): Use string_printf, not
4059 xstrprintf.
4060
3c9ebddd
TT
40612017-08-03 Tom Tromey <tom@tromey.com>
4062
4063 * top.h (do_restore_instream_cleanup): Remove.
4064 * top.c (do_restore_instream_cleanup): Remove.
4065 (read_command_file): Use scoped_restore.
4066 * cli/cli-script.c (execute_user_command): Use scoped_restore.
4067
b51b225e
TT
40682017-08-03 Tom Tromey <tom@tromey.com>
4069
4070 * cli/cli-script.c (execute_user_command)
4071 (execute_control_command): Use scoped_restore.
4072
ac991630
TT
40732017-08-03 Tom Tromey <tom@tromey.com>
4074
4075 * cli/cli-script.c (do_restore_user_call_depth): Remove.
4076 (execute_user_command): Remove user_call_depth; use
4077 user_args_stack's size instead.
4078
898e0c8e
TT
40792017-08-03 Tom Tromey <tom@tromey.com>
4080
4081 * top.h (in_user_command): Remove.
4082 * top.c (in_user_command): Remove.
4083 * cli/cli-script.c (do_restore_user_call_depth)
4084 (execute_user_command): Update.
4085
26fcd5d7
TT
40862017-08-03 Tom Tromey <tom@tromey.com>
4087
4088 * valops.c (search_struct_method): Use gdb::byte_vector.
4089 * valarith.c (value_concat): Use std::vector.
4090 * target.c (memory_xfer_partial): Use gdb::byte_vector.
4091 (simple_search_memory): Likewise.
4092 * printcmd.c (find_string_backward): Use gdb::byte_vector.
4093 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4094 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4095 * elfread.c (elf_rel_plt_read): Use std::string.
4096 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4097 * cli/cli-dump.c (restore_section_callback): Use
4098 gdb::byte_vector.
4099
7c218e6c
TT
41002017-08-03 Tom Tromey <tom@tromey.com>
4101
4102 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4103
31b68d4a
TT
41042017-08-03 Tom Tromey <tom@tromey.com>
4105
4106 * tui/tui-regs.c (tui_restore_gdbout): Remove.
4107 (tui_register_format): Use scoped_restore.
4108
2ec845e7
TT
41092017-08-03 Tom Tromey <tom@tromey.com>
4110
4111 * reverse.c (exec_direction_default): Remove.
4112 (exec_reverse_once): Use scoped_restore.
4113 * remote.c (restore_remote_timeout): Remove.
4114 (remote_flash_erase, remote_flash_write, remote_flash_done)
4115 (readchar, remote_serial_write): Use scoped_restore.
4116 * cli/cli-script.c (struct source_cleanup_lines_args)
4117 (source_cleanup_lines): Remove.
4118 (script_from_file): Use scoped_restore.
4119 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4120 (source_command): Use scoped_restore.
4121
b3bc8453
TT
41222017-08-03 Tom Tromey <tom@tromey.com>
4123
4124 * utils.h (make_cleanup_free_so): Remove.
4125 * utils.c (do_free_so, make_cleanup_free_so): Remove.
4126 * solist.h (struct so_deleter): New.
4127 (so_list_up): New typedef.
4128 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4129
e3ad2841
TT
41302017-08-03 Tom Tromey <tom@tromey.com>
4131
4132 * utils.h (make_cleanup_restore_current_language): Remove.
4133 * utils.c (do_restore_current_language)
4134 (make_cleanup_restore_current_language): Remove.
4135 * parse.c (parse_exp_in_context_1)
4136 (parse_expression_with_language): Use
4137 scoped_restore_current_language.
4138 * mi/mi-main.c (mi_cmd_execute): Use
4139 scoped_restore_current_language.
4140 * language.h (scoped_restore_current_language): New class.
4141
b80cf838
TT
41422017-08-03 Tom Tromey <tom@tromey.com>
4143
4144 * compile/compile.c (cleanup_unlink_file): Remove.
4145 (compile_to_object): Use gdb::unlinker.
4146 (eval_compile_command): Likewise.
4147
fad0444a
TT
41482017-08-03 Tom Tromey <tom@tromey.com>
4149
4150 * utils.h (make_cleanup_fclose): Remove.
4151 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4152
6e7bc05c
TT
41532017-08-03 Tom Tromey <tom@tromey.com>
4154
4155 * top.c (open_terminal_stream): Return gdb_file_up.
4156 (new_ui_command): Update.
4157
4a45905b
TT
41582017-08-03 Tom Tromey <tom@tromey.com>
4159
4160 * source.c (print_source_lines_base, forward_search_command)
4161 (reverse_search_command): Use gdb_file_up.
4162
7cd06d6e
TT
41632017-08-03 Tom Tromey <tom@tromey.com>
4164
4165 * fbsd-nat.c (fbsd_find_memory_regions): Update.
4166
ed166945
TT
41672017-08-03 Tom Tromey <tom@tromey.com>
4168
4169 * cli/cli-cmds.c (find_and_open_script): Change return type.
4170 Remove "streamp" and "full_path" parameters.
4171 (source_script_with_search): Update.
4172 * auto-load.c (source_script_file): Update.
4173 * cli/cli-cmds.h (find_and_open_script): Change type.
4174 (open_script): New struct.
4175
d419f42d
TT
41762017-08-03 Tom Tromey <tom@tromey.com>
4177
4178 * xml-support.c (xml_fetch_content_from_file): Update.
4179 * ui-file.c (stdio_file::open): Update.
4180 * tracefile-tfile.c (tfile_start): Update.
4181 * remote.c (remote_file_put, remote_file_get): Update.
4182 * nat/linux-procfs.c (linux_proc_get_int)
4183 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4184 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4185 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4186 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4187 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4188 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4189 * linux-nat.c (linux_proc_pending_signals): Update.
4190 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4191 (file_closer): Remove.
4192 * compile/compile.c (compile_to_object): Update.
4193 * common/filestuff.h (struct gdb_file_deleter): New.
4194 (gdb_file_up): New typedef.
4195 (gdb_fopen_cloexec): Change return type.
4196 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4197 * cli/cli-dump.c (fopen_with_cleanup): Remove.
4198 (dump_binary_file, restore_binary_file): Update.
4199 * auto-load.c (auto_load_objfile_script_1): Update.
4200
4a2b031d
TT
42012017-08-03 Tom Tromey <tom@tromey.com>
4202
4203 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4204 (info_static_tracepoint_markers_command): Likewise.
4205 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4206 * skip.c (skip_info): Use ui_out_emit_table.
4207 * progspace.c (print_program_space): Use ui_out_emit_table.
4208 * osdata.c (info_osdata): Use ui_out_emit_table.
4209 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4210 ui_out_emit_table.
4211 * linux-thread-db.c (info_auto_load_libthread_db): Use
4212 ui_out_emit_table.
4213 * inferior.c (print_inferior): Use ui_out_emit_table.
4214 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4215 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4216 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4217 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4218 * ui-out.h (class ui_out_emit_table): New.
4219
a4f320fd
MR
42202017-08-02 Maciej W. Rozycki <macro@imgtec.com>
4221
4222 * mips-tdep.c (mips_fpu_type_str): New function.
4223 (mips_dump_tdep): Call it.
4224
a2f1f308
MR
42252017-08-01 Maciej W. Rozycki <macro@imgtec.com>
4226
4227 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4228 `->mips_fpu_type'.
4229
7e5ed83b
XR
42302017-07-31 Xavier Roirand <roirand@adacore.com>
4231
4232 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4233
4c9dc811
XR
42342017-07-27 Xavier Roirand <roirand@adacore.com>
4235
4236 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4237
27d41eac
YQ
42382017-07-26 Yao Qi <yao.qi@linaro.org>
4239
4240 * cli/cli-cmds.c (maintenancechecklist): New variable.
4241 * gdbcmd.h (maintenancechecklist): Declare it.
4242 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4243 Call i386_linux_read_description with different masks.
4244 * maint.c (maintenance_check_command): New function.
4245 (_initialize_maint_cmds): Call add_prefix_cmd.
4246 * target-descriptions.c (tdesc_reg): override operator != and ==.
4247 (tdesc_type): Likewise.
4248 (tdesc_feature): Likewise.
4249 (target_desc): Likewise.
4250 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4251 (maintenance_check_xml_descriptions): New function.
4252 (_initialize_target_descriptions) Add command "xml-descriptions".
4253 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4254
ea03d0d3
YQ
42552017-07-26 Yao Qi <yao.qi@linaro.org>
4256
4257 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4258 Include features/i386/32bit-*.c.
4259 (i386_linux_read_description): Generate target description if it
4260 doesn't exist.
4261 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4262 functions.
4263 * features/i386/32bit-linux.c: Re-generated.
4264 * features/i386/32bit-sse.c: Likewise.
4265 * target-descriptions.c (print_c_feature::visit): Print code to
4266 set register number if needed.
4267 (print_c_feature) <m_next_regnum>: New field.
4268
25aa13e5
YQ
42692017-07-26 Yao Qi <yao.qi@linaro.org>
4270
4271 * features/Makefile (CFILES): Rename with TDESC_CFILES.
4272 (FEATURE_XMLFILES): New.
4273 (FEATURE_CFILES): New.
4274 New rules.
4275 (clean-cfiles): Remove generated c files.
4276 * features/i386/32bit-avx.c: Generated.
4277 * features/i386/32bit-avx512.c: Generated.
4278 * features/i386/32bit-core.c: Generated.
4279 * features/i386/32bit-linux.c: Generated.
4280 * features/i386/32bit-mpx.c: Generated.
4281 * features/i386/32bit-pkeys.c: Generated.
4282 * features/i386/32bit-sse.c: Generated.
4283 * target-descriptions.c: Include algorithm.
4284 (tdesc_element_visitor): Add method visit_end.
4285 (print_c_tdesc): Implement visit_end.
4286 (print_c_tdesc:: m_filename_after_features): Move it to
4287 protected.
4288 (print_c_feature): New class.
4289 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4290 name starts with "i386/32bit-".
4291
6eb1e6a8
YQ
42922017-07-26 Yao Qi <yao.qi@linaro.org>
4293
4294 * target-descriptions.c (tdesc_element_visitor): New class.
4295 (tdesc_element): New class.
4296 (tdesc_reg): Inherit from tdesc_element.
4297 (tdesc_reg::accept): New function.
4298 (tdesc_type): Inherit from tdesc_element.
4299 (tdesc_type::accept): New function.
4300 (tdesc_feature): Inherit from tdesc_element.
4301 (tdesc_feature::accept): New function.
4302 (target_desc): Inherit from tdesc_element.
4303 (target_desc::target_desc): New.
4304 (target_desc::~target_desc): New.
4305 (target_desc::accept): New.
4306 (allocate_target_description): Use new.
4307 (free_target_description): Use delete.
4308 (print_c_tdesc): New class.
4309 (maint_print_c_tdesc_cmd): Adjust.
4310
4311 * features/aarch64.c: Re-generated.
4312 * features/arc-arcompact.c: Re-generated.
4313 * features/arc-v2.c: Re-generated.
4314 * features/arm/arm-with-iwmmxt.c: Re-generated.
4315 * features/arm/arm-with-m.c: Re-generated.
4316 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4317 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4318 * features/arm/arm-with-neon.c: Re-generated.
4319 * features/arm/arm-with-vfpv2.c: Re-generated.
4320 * features/arm/arm-with-vfpv3.c: Re-generated.
4321 * features/i386/amd64-avx-avx512.c: Re-generated.
4322 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4323 * features/i386/amd64-avx.c: Re-generated.
4324 * features/i386/amd64-avx-linux.c: Re-generated.
4325 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4326 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4327 * features/i386/amd64-avx-mpx.c: Re-generated.
4328 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4329 * features/i386/amd64.c: Re-generated.
4330 * features/i386/amd64-linux.c: Re-generated.
4331 * features/i386/amd64-mpx.c: Re-generated.
4332 * features/i386/amd64-mpx-linux.c: Re-generated.
4333 * features/i386/i386-avx-avx512.c: Re-generated.
4334 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4335 * features/i386/i386-avx.c: Re-generated.
4336 * features/i386/i386-avx-linux.c: Re-generated.
4337 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4338 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4339 * features/i386/i386-avx-mpx.c: Re-generated.
4340 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4341 * features/i386/i386.c: Re-generated.
4342 * features/i386/i386-linux.c: Re-generated.
4343 * features/i386/i386-mmx.c: Re-generated.
4344 * features/i386/i386-mmx-linux.c: Re-generated.
4345 * features/i386/i386-mpx.c: Re-generated.
4346 * features/i386/i386-mpx-linux.c: Re-generated.
4347 * features/i386/x32-avx-avx512.c: Re-generated.
4348 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4349 * features/i386/x32-avx.c: Re-generated.
4350 * features/i386/x32-avx-linux.c: Re-generated.
4351 * features/i386/x32.c: Re-generated.
4352 * features/i386/x32-linux.c: Re-generated.
4353 * features/microblaze.c: Re-generated.
4354 * features/microblaze-with-stack-protect.c: Re-generated.
4355 * features/mips64-dsp-linux.c: Re-generated.
4356 * features/mips64-linux.c: Re-generated.
4357 * features/mips-dsp-linux.c: Re-generated.
4358 * features/mips-linux.c: Re-generated.
4359 * features/nds32.c: Re-generated.
4360 * features/nios2.c: Re-generated.
4361 * features/nios2-linux.c: Re-generated.
4362 * features/rs6000/powerpc-32.c: Re-generated.
4363 * features/rs6000/powerpc-32l.c: Re-generated.
4364 * features/rs6000/powerpc-403.c: Re-generated.
4365 * features/rs6000/powerpc-403gc.c : Re-generated.
4366 * features/rs6000/powerpc-405.c: Re-generated.
4367 * features/rs6000/powerpc-505.c: Re-generated.
4368 * features/rs6000/powerpc-601.c: Re-generated.
4369 * features/rs6000/powerpc-602.c: Re-generated.
4370 * features/rs6000/powerpc-603.c: Re-generated.
4371 * features/rs6000/powerpc-604.c: Re-generated.
4372 * features/rs6000/powerpc-64.c: Re-generated.
4373 * features/rs6000/powerpc-64l.c: Re-generated.
4374 * features/rs6000/powerpc-7400.c: Re-generated.
4375 * features/rs6000/powerpc-750.c: Re-generated.
4376 * features/rs6000/powerpc-860.c: Re-generated.
4377 * features/rs6000/powerpc-altivec32.c: Re-generated.
4378 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4379 * features/rs6000/powerpc-altivec64.c: Re-generated.
4380 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4381 * features/rs6000/powerpc-cell32l.c: Re-generated.
4382 * features/rs6000/powerpc-cell64l.c: Re-generated.
4383 * features/rs6000/powerpc-e500.c: Re-generated.
4384 * features/rs6000/powerpc-e500l.c: Re-generated.
4385 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4386 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4387 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4388 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4389 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4390 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4391 * features/rs6000/powerpc-vsx32.c: Re-generated.
4392 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4393 * features/rs6000/powerpc-vsx64.c: Re-generated.
4394 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4395 * features/rs6000/rs6000.c: Re-generated.
4396 * features/s390-linux32.c: Re-generated.
4397 * features/s390-linux32v1.c: Re-generated.
4398 * features/s390-linux32v2.c: Re-generated.
4399 * features/s390-linux64.c: Re-generated.
4400 * features/s390-linux64v1.c: Re-generated.
4401 * features/s390-linux64v2.c: Re-generated.
4402 * features/s390-te-linux64.c: Re-generated.
4403 * features/s390-tevx-linux64.c: Re-generated.
4404 * features/s390-vx-linux64.c: Re-generated.
4405 * features/s390x-linux64.c: Re-generated.
4406 * features/s390x-linux64v1.c: Re-generated.
4407 * features/s390x-linux64v2.c: Re-generated.
4408 * features/s390x-te-linux64.c: Re-generated.
4409 * features/s390x-tevx-linux64.c: Re-generated.
4410 * features/s390x-vx-linux64.c: Re-generated.
4411 * features/sparc/sparc32-solaris.c: Re-generated.
4412 * features/sparc/sparc64-solaris.c: Re-generated.
4413 * features/tic6x-c62x.c: Re-generated.
4414 * features/tic6x-c62x-linux.c: Re-generated.
4415 * features/tic6x-c64x.c: Re-generated.
4416 * features/tic6x-c64x-linux.c: Re-generated.
4417 * features/tic6x-c64xp.c: Re-generated.
4418 * features/tic6x-c64xp-linux.c: Re-generated.
4419
35b4818d
YQ
44202017-07-26 Yao Qi <yao.qi@linaro.org>
4421
4422 * i386-linux-tdep.c (i386_linux_read_description): New function.
4423 (i386_linux_core_read_description): Call
4424 i386_linux_read_description.
4425 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4426 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4427 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4428 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4429 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4430 * x86-linux-nat.c (x86_linux_read_description): Call
4431 i386_linux_read_description.
4432
8e2141c6
YQ
44332017-07-26 Yao Qi <yao.qi@linaro.org>
4434
4435 * NEWS: Mention it.
4436 * features/Makefile (%.c: %.xml): Pass the xml file name to
4437 command "maint print c-tdesc".
4438 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4439 name from 'arg'.
4440
b468ff4c
YQ
44412017-07-26 Yao Qi <yao.qi@linaro.org>
4442
4443 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4444 in-class initialization.
4445 (tdesc_create_feature): Call new instead of XCNEW.
4446 (free_target_description): Ue delete.
4447
b9c0e1b4
JB
44482017-07-25 John Baldwin <jhb@FreeBSD.org>
4449
4450 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4451
a04b5337
YQ
44522017-07-25 Yao Qi <yao.qi@linaro.org>
4453
4454 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4455 constant.
4456 (amd64_x32_init_abi): Likewise.
4457 * amd64-tdep.h (amd64_init_abi): Update declaration.
4458 (amd64_x32_init_abi): Likewise.
4459
02ad7fc2
YQ
44602017-07-25 Yao Qi <yao.qi@linaro.org>
4461
4462 PR tdep/21717
4463 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4464 condition for FPSCR.
4465 (arm_linux_store_inferior_registers): Likewise.
4466
b6f48cb0
TT
44672017-07-22 Tom Tromey <tom@tromey.com>
4468
4469 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4470 <syscalls_counts>: Now a std::vector.
4471 (get_catch_syscall_inferior_data): Use "new".
4472 (catch_syscall_inferior_data_cleanup): Use "delete".
4473 (insert_catch_syscall, remove_catch_syscall)
4474 (clear_syscall_counts): Update.
4475
e12c9b7a
TT
44762017-07-22 Tom Tromey <tom@tromey.com>
4477
4478 * break-catch-syscall.c (syscall_catchpoint)
4479 <syscalls_to_be_caught>: Now a std::vector<int>
4480 (~syscall_catchpoint): Remove.
4481 (insert_catch_syscall, remove_catch_syscall)
4482 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4483 (print_mention_catch_syscall, print_recreate_catch_syscall):
4484 Update.
4485 (create_syscall_event_catchpoint): Change type of "filter"
4486 parameter.
4487 (catch_syscall_split_args): Return a std::vector.
4488 (catch_syscall_command_1, catching_syscall_number_1): Update.
4489
4fa8aeac
TT
44902017-07-22 Tom Tromey <tom@tromey.com>
4491
4492 * break-catch-throw.c (struct exception_catchpoint)
4493 <exception_rx>: Now a std::string.
4494 (~exception_catchpoint): Remove.
4495 (print_one_detail_exception_catchpoint): Update.
4496 (handle_gnu_v3_exceptions): Change type of except_rx.
4497 (extract_exception_regexp): Return a std::string.
4498 (catch_exception_command_1): Update.
4499
f746a154
TT
45002017-07-22 Tom Tromey <tom@tromey.com>
4501
4502 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4503 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4504 std::vector.
4505 <catch_all>: Now a bool.
4506 (~signal_catchpoint): Remove.
4507 (signal_catchpoint_insert_location)
4508 (signal_catchpoint_remove_location)
4509 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4510 (signal_catchpoint_print_mention)
4511 (signal_catchpoint_print_recreate)
4512 (signal_catchpoint_explains_signal): Update.
4513 (create_signal_catchpoint): Change type of "filter" and
4514 "catch_all".
4515 (catch_signal_split_args): Return a std::vector. Change type of
4516 "catch_all".
4517 (catch_signal_command): Update.
4518
47e77640
PA
45192017-07-20 Pedro Alves <palves@redhat.com>
4520
4521 * ada-lang.c (ada_language_defn): Make extern.
4522 (_initialize_ada_language): Remove add_language call.
4523 * c-lang.c (c_language_defn, cplus_language_defn)
4524 (asm_language_defn, minimal_language_defn): Make extern.
4525 (_initialize_c_language): Delete.
4526 * completer.c (compare_cstrings): Delete, moved to utils.h.
4527 * d-lang.c (d_language_defn): Make extern.
4528 (_initialize_d_language): Remove add_language calls.
4529 * defs.h (enum language): Add comment.
4530 * f-lang.c (f_language_defn): Make extern.
4531 (_initialize_f_language): Remove add_language call.
4532 * go-lang.c (go_language_defn): Make extern.
4533 (_initialize_go_language): Remove add_language call.
4534 * language.c: Include <algorithm>.
4535 (languages): Redefine as const array.
4536 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4537 (set_language_command): Handle "local". Use for-range loop.
4538 (set_language): Remove loop.
4539 (language_enum): Rewrite.
4540 (language_def, language_str): Remove loops.
4541 (add_language): Delete.
4542 (add_set_language_command): New, based on add_languages.
4543 (skip_language_trampoline): Adjust.
4544 (local_language_defn): Delete.
4545 (language_gdbarch_post_init): Adjust.
4546 (_initialize_language): Remove add_language calls. Call
4547 add_set_language_command.
4548 * language.h (add_language): Delete.
4549 (auto_language_defn)
4550 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4551 (asm_language_defn, c_language_defn, cplus_language_defn)
4552 (d_language_defn, f_language_defn, go_language_defn)
4553 (m2_language_defn, objc_language_defn, opencl_language_defn)
4554 (pascal_language_defn, rust_language_defn): Declare.
4555 * m2-lang.c (m2_language_defn): Make extern.
4556 (_initialize_m2_language): Remove add_language call.
4557 * objc-lang.c (objc_language_defn): Make extern.
4558 (_initialize_objc_language): Remove add_language call.
4559 * opencl-lang.c (opencl_language_defn): Make extern.
4560 (_initialize_opencl_language): Remove add_language call.
4561 * p-lang.c (pascal_language_defn): Make extern.
4562 (_initialize_pascal_language): Delete.
4563 * rust-lang.c (rust_language_defn): Make extern.
4564 (_initialize_rust_language): Delete.
4565 * utils.h (compare_cstrings): New static inline function.
4566
edb0c9cb
PA
45672017-07-20 Pedro Alves <palves@redhat.com>
4568
4569 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4570 (get_var_value): Constify parameters.
4571 (get_int_var_value): Change prototype.
4572 (to_fixed_range_type): Adjust.
4573 * ada-lang.h (get_int_var_value): Change prototype.
4574
a778f165
PA
45752017-07-20 Pedro Alves <palves@redhat.com>
4576
4577 * dwarf2read.c (dw2_lookup_symbol): Use
4578 SYMBOL_MATCHES_SEARCH_NAME.
4579 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4580
42edd901
PA
45812017-07-20 Pedro Alves <palves@redhat.com>
4582
4583 * block.c (block_iter_name_step, block_iter_name_first)
4584 (block_iter_name_next): Delete.
4585 (block_lookup_symbol_primary): Adjust to use
4586 dict_iter_match_first/dict_iter_match_next.
4587 * block.h (block_iter_name_first, block_iter_name_next): Delete
4588 declarations.
4589 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4590 dict_iter_match_first/dict_iter_match_next.
4591
cf325299
PA
45922017-07-20 Pedro Alves <palves@redhat.com>
4593
4594 * cp-support.c (cp_find_first_component_aux): Add missing case for
4595 end of string.
4596
c5ed0576
DB
45972017-07-18 David Blaikie <dblaikie@gmail.com>
4598
4599 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4600 of dwo_cu's dwo_file.
4601
27841e76
YQ
46022017-07-18 Yao Qi <yao.qi@linaro.org>
4603
4604 * remote.c (store_registers_using_G): Remove one line comment.
4605
cfb7e58b
YQ
46062017-07-18 Yao Qi <yao.qi@linaro.org>
4607
4608 * regcache.c (regcache_cpy): Simplify it.
4609 (regcache::cpy_no_passthrough): Remove it.
4610 * regcache.h (cpy_no_passthrough): Remove it.
4611 (regcache_dup, regcache_cpy): Update comments.
4612
386535dd
PA
46132017-07-18 Pedro Alves <palves@redhat.com>
4614
4615 * remote-sim.c (sim_command_completer): Adjust to work with a
4616 completion_tracker instead of a VEC.
4617
c45ec17c
PA
46182017-07-17 Pedro Alves <palves@redhat.com>
4619
4620 * completer.c (complete_source_filenames): New function.
4621 (complete_address_and_linespec_locations): New function.
4622 (location_completer): Use complete_address_and_linespec_locations.
4623 (completion_tracker::build_completion_result): Honor the tracker's
4624 request to suppress append.
4625 * completer.h (completion_tracker::suppress_append_ws)
4626 (completion_tracker::set_suppress_append_ws): New methods.
4627 (completion_tracker::m_suppress_append_ws): New field.
4628 (complete_source_filenames): New declaration.
4629 * linespec.c (linespec_complete_what): New.
4630 (struct ls_parser) <complete_what, completion_word,
4631 completion_quote_char, completion_quote_end, completion_tracker>:
4632 New fields.
4633 (string_find_incomplete_keyword_at_end): New.
4634 (linespec_lexer_lex_string): Record quote char. If in completion
4635 mode, don't throw.
4636 (linespec_lexer_consume_token): Advance the completion word point.
4637 (linespec_lexer_peek_token): Save/restore completion info.
4638 (save_stream_and_consume_token): New.
4639 (set_completion_after_number): New.
4640 (linespec_parse_basic): Set what to complete next depending on
4641 token. Handle function and label completions specially.
4642 (parse_linespec): Disable objc shortcut in completion mode. Set
4643 what to complete next depending on token type. Skip keyword if in
4644 completion mode.
4645 (complete_linespec_component, linespec_complete): New.
4646 * linespec.h (linespec_complete): Declare.
4647
be966d42
PA
46482017-07-17 Pedro Alves <palves@redhat.com>
4649
4650 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4651 Handle 'operator<' / 'operator<<'.
4652
a2459270
PA
46532017-07-17 Pedro Alves <palves@redhat.com>
4654
4655 * completer.c (collect_explicit_location_matches): Handle
4656 MATCH_LABEL.
4657 (convert_explicit_location_to_linespec): New, factored out from
4658 ...
4659 (convert_explicit_location_to_sals): ... this.
4660 (complete_label): New.
4661 (linespec_complete_label, find_label_symbols_in_block): New.
4662 (find_label_symbols): Add completion_mode parameter and adjust to
4663 call find_label_symbols_in_block.
4664 * linespec.h (linespec_complete_label): Declare.
4665
c6756f62
PA
46662017-07-17 Pedro Alves <palves@redhat.com>
4667
4668 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4669 complete_symbol_mode parameter.
4670 * cli/cli-cmds.c (complete_command): Get the completion result out
4671 of the handle_brkchars tracker if used a custom word point.
4672 * completer.c: Include "linespec.h".
4673 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4674 (advance_to_expression_complete_word_point): New.
4675 (completion_tracker::completes_to_completion_word): New.
4676 (complete_files_symbols): Pass down
4677 complete_symbol_mode::EXPRESSION.
4678 (explicit_options, probe_options): New.
4679 (collect_explicit_location_matches): Complete on the
4680 explictit_loc->foo instead of word. Use
4681 linespec_complete_function. Handle MATCH_LINE. Handle offering
4682 keyword and options completions.
4683 (backup_text_ptr): Delete.
4684 (skip_keyword): New.
4685 (complete_explicit_location): Remove 'word' parameter. Add
4686 language, quoted_arg_start and quoted_arg_end parameters.
4687 Rewrite, parsing left to right.
4688 (location_completer): Rewrite.
4689 (location_completer_handle_brkchars): New function.
4690 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4691 (enum complete_line_internal_reason): Adjust comments.
4692 (completion_tracker::discard_completions): New.
4693 (completer_handle_brkchars_func_for_completer): Handle
4694 location_completer.
4695 (gdb_custom_word_point_brkchars)
4696 (gdb_org_rl_basic_quote_characters): New.
4697 (gdb_completion_word_break_characters_throw)
4698 (completion_find_completion_word): Handle trackers that use a
4699 custom word point.
4700 (completion_tracker::advance_custom_word_point_by): New.
4701 (completion_tracker::build_completion_result): Don't rely on
4702 readline appending the quote char.
4703 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4704 use a custom word point.
4705 (gdb_rl_attempted_completion_function): Restore
4706 rl_basic_quote_characters.
4707 * completer.h (class completion_tracker): Extend intro comment.
4708 (completion_tracker::set_quote_char)
4709 (completion_tracker::quote_char)
4710 (completion_tracker::set_use_custom_word_point)
4711 (completion_tracker::use_custom_word_point)
4712 (completion_tracker::custom_word_point)
4713 (completion_tracker::set_custom_word_point)
4714 (completion_tracker::advance_custom_word_point_by)
4715 (completion_tracker::completes_to_completion_word)
4716 (completion_tracker::discard_completions): New methods.
4717 (completion_tracker::m_quote_char)
4718 (completion_tracker::m_use_custom_word_point)
4719 (completion_tracker::m_custom_word_point): New fields.
4720 (advance_to_expression_complete_word_point): Declare.
4721 * f-lang.c (f_collect_symbol_completion_matches): Add
4722 complete_symbol_mode parameter.
4723 * language.h (struct language_defn)
4724 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4725 parameter.
4726 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4727 (linespec_complete_function): New function.
4728 (linespec_lexer_lex_keyword): Adjust.
4729 * linespec.h (linespec_keywords, linespec_complete_function): New
4730 declarations.
4731 * location.c (find_end_quote): New function.
4732 (explicit_location_lex_one): Add explicit_completion_info
4733 parameter. Save quoting info. Don't throw if being called for
4734 completion. Don't handle Ada operators here.
4735 (is_cp_operator, skip_op_false_positives, first_of)
4736 (explicit_location_lex_one_function): New function.
4737 (string_to_explicit_location): Replace 'dont_throw' parameter with
4738 an explicit_completion_info pointer parameter. Handle it. Don't
4739 use explicit_location_lex_one to lex function names. Use
4740 explicit_location_lex_one_function instead.
4741 * location.h (struct explicit_completion_info): New.
4742 (string_to_explicit_location): Replace 'dont_throw' parameter with
4743 an explicit_completion_info pointer parameter.
4744 * symtab.c (default_collect_symbol_completion_matches_break_on):
4745 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4746 (default_collect_symbol_completion_matches)
4747 (collect_symbol_completion_matches): Add complete_symbol_mode
4748 parameter.
4749 (collect_symbol_completion_matches_type): Pass down
4750 complete_symbol_mode::EXPRESSION.
4751 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4752 parameter. Handle LINESPEC mode.
4753 * symtab.h (complete_symbol_mode): New.
4754 (default_collect_symbol_completion_matches_break_on)
4755 (default_collect_symbol_completion_matches)
4756 (collect_symbol_completion_matches)
4757 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4758 parameter.
4759
1d550c82
PA
47602017-07-17 Pedro Alves <palves@redhat.com>
4761
4762 * utils.c (enum class strncmp_iw_mode): New.
4763 (strcmp_iw): Rename to ...
4764 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4765 parameters. Handle them.
4766 (strncmp_iw): New.
4767 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4768 * utils.h (strncmp_iw): Declare.
4769 (strcmp_iw): Move describing comments here.
4770
8090b426
PA
47712017-07-17 Pedro Alves <palves@redhat.com>
4772
4773 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4774 CP_OPERATOR_STR.
4775 * c-typeprint.c (is_type_conversion_operator): Use
4776 CP_OPERATOR_STR.
4777 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4778 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4779 CP_OPERATOR_LEN.
4780 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4781 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4782 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4783 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4784 CP_OPERATOR_STR.
4785 * location.c: Include "cp-support.h".
4786 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4787 CP_OPERATOR_STR.
4788 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4789 CP_OPERATOR_LEN.
4790
6a2c1b87
PA
47912017-07-17 Pedro Alves <palves@redhat.com>
4792
4793 * cli/cli-cmds.c (complete_command): Use a completion tracker
4794 along with completion_find_completion_word for handle_brkchars
4795 phase.
4796 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4797 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4798 (struct gdb_rl_completion_word_info): New.
4799 (gdb_rl_find_completion_word): New.
4800 (completion_find_completion_word): New.
4801 * completer.h (completion_find_completion_word): Declare.
4802
eb3ff9a5
PA
48032017-07-17 Pedro Alves <palves@redhat.com>
4804
4805 * ada-lang.c (symbol_completion_match): Adjust comments.
4806 (symbol_completion_add): Replace vector parameter with
4807 completion_tracker parameter. Use it.
4808 (ada_make_symbol_completion_list): Rename to...
4809 (ada_collect_symbol_completion_matches): ... this. Add
4810 completion_tracker parameter and use it.
4811 (ada_language_defn): Adjust.
4812 * break-catch-syscall.c (catch_syscall_completer): Adjust
4813 prototype and work with completion_tracker instead of VEC.
4814 * breakpoint.c (condition_completer): Adjust prototype and work
4815 with completion_tracker instead of VEC.
4816 * c-lang.c (c_language_defn, cplus_language_defn)
4817 (asm_language_defn, minimal_language_defn): Adjust to renames.
4818 * cli/cli-cmds.c (complete_command): Rework using
4819 completion_tracker. Catch exceptions when completing.
4820 * cli/cli-decode.c (integer_unlimited_completer)
4821 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4822 with completion_tracker instead of VEC.
4823 * command.h (struct completion_tracker): Forward declare.
4824 (completer_ftype, completer_handle_brkchars_ftype): Change
4825 types.
4826 (complete_on_cmdlist, complete_on_enum): Adjust.
4827 * completer.c: Include <algorithm>.
4828 (struct gdb_completer_state): New.
4829 (current_completion): New global.
4830 (readline_line_completion_function): Delete.
4831 (noop_completer, filename_completer)
4832 (filename_completer_handle_brkchars, complete_files_symbols)
4833 (linespec_location_completer): Adjust to work with a
4834 completion_tracker instead of a VEC.
4835 (string_or_empty): New.
4836 (collect_explicit_location_matches): Adjust to work with a
4837 completion_tracker instead of a VEC.
4838 (explicit_location_completer): Rename to ...
4839 (complete_explicit_location): ... this and adjust to work with a
4840 completion_tracker instead of a VEC.
4841 (location_completer): Adjust to work with a completion_tracker
4842 instead of a VEC.
4843 (add_struct_fields): Adjust to work with a completion_list instead
4844 of VEC.
4845 (expression_completer): Rename to ...
4846 (complete_expression): ... this and adjust to work with a
4847 completion_tracker instead of a VEC. Use complete_files_symbols.
4848 (expression_completer): Reimplement on top of complete_expression.
4849 (symbol_completer): Adjust to work with a completion_tracker
4850 instead of a VEC.
4851 (enum complete_line_internal_reason): Add describing comments.
4852 (complete_line_internal_normal_command): Adjust to work with a
4853 completion_tracker instead of a VEC.
4854 (complete_line_internal): Rename to ...
4855 (complete_line_internal_1): ... this and adjust to work with a
4856 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4857 handle_brkchars phase.
4858 (new_completion_tracker): Delete.
4859 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4860 complete_line_internal_1.
4861 (free_completion_tracker): Delete.
4862 (INITIAL_COMPLETION_HTAB_SIZE): New.
4863 (completion_tracker::completion_tracker)
4864 (completion_tracker::~completion_tracker): New.
4865 (maybe_add_completion): Delete.
4866 (completion_tracker::maybe_add_completion)
4867 (completion_tracker::add_completion)
4868 (completion_tracker::add_completions): New.
4869 (throw_max_completions_reached_error): Delete.
4870 (complete_line): Adjust to work with a completion_tracker instead
4871 of a VEC. Don't create a completion_tracker_t or check for max
4872 completions here.
4873 (command_completer, command_completer_handle_brkchars)
4874 (signal_completer, reg_or_group_completer_1)
4875 (reg_or_group_completer, default_completer_handle_brkchars):
4876 Adjust to work with a completion_tracker.
4877 (gdb_completion_word_break_characters_throw): New.
4878 (gdb_completion_word_break_characters): Reimplement.
4879 (line_completion_function): Delete.
4880 (completion_tracker::recompute_lowest_common_denominator)
4881 (expand_preserving_ws)
4882 (completion_tracker::build_completion_result)
4883 (completion_result::completion_result)
4884 (completion_result::completion_result)
4885 (completion_result::~completion_result)
4886 (completion_result::completion_result)
4887 (completion_result::release_match_list, compare_cstrings)
4888 (completion_result::sort_match_list)
4889 (completion_result::reset_match_list)
4890 (gdb_rl_attempted_completion_function_throw)
4891 (gdb_rl_attempted_completion_function): New.
4892 * completer.h (completion_list, struct completion_result)
4893 (class completion_tracker): New.
4894 (complete_line): Add completion_tracker parameter.
4895 (readline_line_completion_function): Delete.
4896 (gdb_rl_attempted_completion_function): New.
4897 (noop_completer, filename_completer, expression_completer)
4898 (location_completer, symbol_completer, command_completer)
4899 (signal_completer, reg_or_group_completer): Update prototypes.
4900 (completion_tracker_t, new_completion_tracker)
4901 (make_cleanup_free_completion_tracker): Delete.
4902 (enum maybe_add_completion_enum): Delete.
4903 (maybe_add_completion): Delete.
4904 (throw_max_completions_reached_error): Delete.
4905 * corefile.c (complete_set_gnutarget): Adjust to work with a
4906 completion_tracker instead of a VEC.
4907 * cp-abi.c (cp_abi_completer): Adjust to work with a
4908 completion_tracker instead of a VEC.
4909 * d-lang.c (d_language_defn): Adjust.
4910 * disasm.c (disassembler_options_completer): Adjust to work with a
4911 completion_tracker instead of a VEC.
4912 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4913 (f_collect_symbol_completion_matches): ... this. Adjust to work
4914 with a completion_tracker instead of a VEC.
4915 (f_language_defn): Adjust.
4916 * go-lang.c (go_language_defn): Adjust.
4917 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4918 Adjust to work with a completion_tracker instead of a VEC.
4919 * infrun.c (handle_completer): Likewise.
4920 * interps.c (interpreter_completer): Likewise.
4921 * interps.h (interpreter_completer): Likewise.
4922 * language.c (unknown_language_defn, auto_language_defn)
4923 (local_language_defn): Adjust.
4924 * language.h (language_defn::la_make_symbol_completion_list):
4925 Rename to ...
4926 (language_defn::la_collect_symbol_completion_matches): ... this
4927 and adjust to work with a completion_tracker instead of a VEC.
4928 * m2-lang.c (m2_language_defn): Adjust.
4929 * objc-lang.c (objc_language_defn): Adjust.
4930 * opencl-lang.c (opencl_language_defn): Adjust.
4931 * p-lang.c (pascal_language_defn): Adjust.
4932 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4933 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4934 with a completion_tracker.
4935 * rust-lang.c (rust_language_defn): Adjust.
4936 * symtab.c (free_completion_list, do_free_completion_list)
4937 (return_val, completion_tracker): Delete.
4938 (completion_list_add_name, completion_list_add_symbol)
4939 (completion_list_add_msymbol, completion_list_objc_symbol)
4940 (completion_list_add_fields, add_symtab_completions): Add
4941 completion_tracker parameter and use it.
4942 (default_make_symbol_completion_list_break_on_1): Rename to...
4943 (default_collect_symbol_completion_matches_break_on): ... this.
4944 Add completion_tracker parameter and use it instead of allocating
4945 a completion tracker here.
4946 (default_make_symbol_completion_list_break_on): Delete old
4947 implementation.
4948 (default_make_symbol_completion_list): Delete.
4949 (default_collect_symbol_completion_matches): New.
4950 (make_symbol_completion_list): Delete.
4951 (collect_symbol_completion_matches): New.
4952 (make_symbol_completion_type): Rename to ...
4953 (collect_symbol_completion_matches_type): ... this. Add
4954 completion_tracker parameter and use it instead of VEC.
4955 (make_file_symbol_completion_list_1): Rename to...
4956 (collect_file_symbol_completion_matches): ... this. Add
4957 completion_tracker parameter and use it instead of VEC.
4958 (make_file_symbol_completion_list): Delete.
4959 (add_filename_to_list): Use completion_list instead of a VEC.
4960 (add_partial_filename_data::list): Now a completion_list.
4961 (make_source_files_completion_list): Work with a completion_list
4962 instead of a VEC.
4963 * symtab.h: Include "completer.h".
4964 (default_make_symbol_completion_list_break_on)
4965 (default_make_symbol_completion_list, make_symbol_completion_list)
4966 (make_symbol_completion_type, make_file_symbol_completion_list)
4967 (make_source_files_completion_list): Delete.
4968 (default_collect_symbol_completion_matches_break_on)
4969 (default_collect_symbol_completion_matches)
4970 (collect_symbol_completion_matches)
4971 (collect_symbol_completion_matches_type)
4972 (collect_file_symbol_completion_matches)
4973 (make_source_files_completion_list): New.
4974 * top.c (init_main): Don't install a rl_completion_entry_function
4975 hook. Install a rl_attempted_completion_function hook instead.
4976 * tui/tui-layout.c (layout_completer): Adjust to work with a
4977 completion_tracker.
4978 * tui/tui-regs.c (tui_reggroup_completer):
4979 * tui/tui-win.c (window_name_completer, focus_completer)
4980 (winheight_completer): Adjust to work with a completion_tracker.
4981 * value.c: Include "completer.h".
4982 (complete_internalvar): Adjust to work with a completion_tracker.
4983 * value.h (complete_internalvar): Likewise.
4984
6e1dbf8c
PA
49852017-07-17 Pedro Alves <palves@redhat.com>
4986
4987 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4988 renames.
4989 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4990 comments to completer_ftype's declaration.
4991 <completer_handle_brkchars>: Change type to
4992 completer_handle_brkchars_ftype.
4993 * command.h (completer_ftype): Add describing comment and give
4994 names to parameters.
4995 (completer_ftype_void): Rename to ...
4996 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4997 (set_cmd_completer_handle_brkchars): Adjust.
4998 * completer.c (filename_completer_handle_brkchars): New function.
4999 (complete_line_internal_normal_command): New function, factored
5000 out from ...
5001 (complete_line_internal): ... here.
5002 (command_completer_handle_brkchars)
5003 (default_completer_handle_brkchars)
5004 (completer_handle_brkchars_func_for_completer): New functions.
5005 * completer.h (set_gdb_completion_word_break_characters): Delete
5006 declaration.
5007 (completer_handle_brkchars_func_for_completer): New declaration.
5008 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5009 completer_handle_brkchars_func_for_completer.
5010
78b13106
PA
50112017-07-17 Pedro Alves <palves@redhat.com>
5012
5013 * completer.c (symbol_completer): New function, based on
5014 make_symbol_completion_list_fn.
5015 * completer.h (symbol_completer): New declaration.
5016 * guile/scm-cmd.c (cmdscm_completers): Adjust.
5017 * python/py-cmd.c (completers): Adjust.
5018 * symtab.c (make_symbol_completion_list_fn): Delete.
5019 * symtab.h (make_symbol_completion_list_fn): Delete.
5020 * cli/cli-decode.c (add_cmd): Adjust.
5021
bbf2f4df
PA
50222017-07-17 Pedro Alves <palves@redhat.com>
5023
5024 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5025 * dwarf2read.c: Include "filename-seen-cache.h".
5026 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5027 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5028 * filename-seen-cache.c: New file.
5029 * filename-seen-cache.h: New file.
5030 * symtab.c: Include "filename-seen-cache.h".
5031 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5032 (create_filename_seen_cache, clear_filename_seen_cache)
5033 (delete_filename_seen_cache, filename_seen): Delete, parts moved
5034 to filename-seen-cache.h/filename-seen-cache.c.
5035 (output_source_filename, sources_info)
5036 (maybe_add_partial_symtab_filename)
5037 (make_source_files_completion_list): Adjust to use
5038 filename_seen_cache.
5039
330cdd98
PA
50402017-07-17 Pedro Alves <palves@redhat.com>
5041
5042 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5043 fields.
5044 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5045 dwarf2_debug_sections*)): New.
5046 (dwarf2_per_objfile::dwarf2_per_objfile(const
5047 dwarf2_per_objfile&)): Declare as deleted.
5048 (dwarf2_per_objfile::operator=): Declare as deleted.
5049 (dwarf2_per_objfile::dwarf2_per_objfile)
5050 (dwarf2_per_objfile::~dwarf2_per_objfile)
5051 (dwarf2_per_objfile::free_cached_comp_units): New.
5052 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5053 ctor. Call dwarf2_per_objfile's ctor manually.
5054 (dwarf2_locate_sections): Deleted/refactored as ...
5055 (dwarf2_per_objfile::locate_sections): ... this new method.
5056 (free_cached_comp_units): Defer to
5057 dwarf2_per_objfile::free_cached_comp_units.
5058 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5059
8880f2a9
TT
50602017-07-14 Tom Tromey <tom@tromey.com>
5061
5062 PR rust/21764:
5063 * rust-exp.y (convert_ast_to_expression): Add "want_type"
5064 parameter.
5065 <UNOP_SIZEOF>: Split into separate case.
5066 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
5067
65547233
TT
50682017-07-14 Tom Tromey <tom@tromey.com>
5069
5070 PR rust/21763:
5071 * symtab.c (symbol_matches_domain): Add language_rust to special
5072 case.
5073 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5074 treat LOC_TYPEDEF symbols as variables.
5075
8f14146e
PA
50762017-07-14 Pedro Alves <palves@redhat.com>
5077
5078 * symtab.c (make_file_symbol_completion_list_1): Iterate over
5079 symtabs matching all symtabs with SRCFILE as file name instead of
5080 only considering the first hit, with lookup_symtab.
5081
2347965c
SM
50822017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5083
5084 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5085 operator_name parameters.
5086 (gen_expr): Update function call.
5087
40f4af28
SM
50882017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5089
5090 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5091 parameter.
5092 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5093 Likewise.
5094 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5095 parameter, use agent_expr::gdbarch instead, update function
5096 calls.
5097 (locexpr_tracepoint_var_ref): Likewise.
5098 (loclist_tracepoint_var_ref): Likewise.
5099 * ax-gdb.c (gen_trace_static_fields): Likewise.
5100 (gen_traced_pop): Likewise.
5101 (gen_frame_args_address): Likewise.
5102 (gen_frame_locals_address): Likewise.
5103 (gen_var_ref): Likewise.
5104 (gen_struct_ref_recursive): Likewise.
5105 (gen_static_field): Likewise.
5106 (gen_maybe_namespace_elt): Likewise.
5107 (gen_expr): Likewise.
5108 (gen_trace_for_var): Likewise.
5109 (gen_trace_for_expr): Likewise.
5110 (gen_trace_for_return_address): Likewise.
5111
053f8057
SM
51122017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5113
5114 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5115 parameter.
5116 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5117
6661ad48
SM
51182017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5119
5120 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5121 from ax, update calls.
5122 (gen_usual_arithmetic): Likewise.
5123 (gen_integral_promotions): Likewise.
5124 (gen_bitfield_ref): Likewise.
5125 (gen_primitive_field): Likewise.
5126 (gen_struct_ref_recursive): Likewise.
5127 (gen_struct_ref): Likewise.
5128 (gen_maybe_namespace_elt): Likewise.
5129 (gen_struct_elt_for_reference): Likewise.
5130 (gen_namespace_elt): Likewise.
5131 (gen_aggregate_elt_ref): Likewise.
5132 (gen_expr): Get gdbarch from ax, update calls.
5133 (gen_expr_binop_rest): Likewise.
5134
c55a47e7
PA
51352017-07-13 Pedro Alves <palves@redhat.com>
5136
5137 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5138 as default tdesc.
5139 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5140 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5141 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5142 tdesc_amd64_linux as default tdesc. Get final tdesc from the
5143 tdep.
5144 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5145 Get final tdesc from the tdep.
5146 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5147 default tdesc.
5148 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5149 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5150 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5151 Use it as default tdesc.
5152 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5153 down to amd_init_abi. No longer handle fallback tdesc here.
5154 * amd64-tdep.h (tdesc_x32): Declare.
5155 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5156 parameter.
5157 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5158 as default tdesc.
5159
55efceab
AA
51602017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5161
5162 * s390-linux-tdep.c (s390_process_record): Add support for
5163 instructions new in arch12.
5164
0aa37b65
JB
51652017-07-11 John Baldwin <jhb@FreeBSD.org>
5166
5167 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5168 PT_GETFSBASE and PT_GETGSBASE.
5169 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5170 PT_SETGSBASE.
5171
48aeef91
JB
51722017-07-11 John Baldwin <jhb@FreeBSD.org>
5173
5174 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5175 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5176 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5177 those rules.
5178 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5179 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5180 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5181 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5182 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5183 * features/i386/amd64.xml: Add 64bit-segments.xml.
5184 * features/i386/amd64-avx-avx512.c: Regenerated.
5185 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5186 * features/i386/amd64-avx-mpx.c: Regenerated.
5187 * features/i386/amd64-avx.c: Regenerated.
5188 * features/i386/amd64-mpx.c: Regenerated.
5189 * features/i386/amd64.c: Regenerated.
5190 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5191 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5192 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5193 * regformats/i386/amd64-avx.dat: Regenerated.
5194 * regformats/i386/amd64-mpx.dat: Regenerated.
5195 * regformats/i386/amd64.dat: Regenerated.
5196
77c501bc
YQ
51972017-07-10 Yao Qi <yao.qi@linaro.org>
5198
5199 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5200 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5201
6dc8d757
AK
52022017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
5203
5204 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5205 unsetenv.
5206 * gnulib/aclocal.m4: Regenerate.
5207 * gnulib/config.in: Regenerate.
5208 * gnulib/configure: Regenerate.
5209 * gnulib/import/Makefile.am: Regenerate.
5210 * gnulib/import/Makefile.in: Regenerate.
5211 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5212 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5213 * gnulib/import/m4/environ.m4: New file.
5214 * gnulib/import/m4/setenv.m4: New file.
5215 * gnulib/import/setenv.c: New file.
5216 * gnulib/import/unsetenv.c: New file.
5217
266934d1
SM
52182017-07-09 Simon Marchi <simon.marchi@ericsson.com>
5219
5220 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5221 address when op is DW_OP_addr.
5222
03278692
TT
52232017-07-09 Tom Tromey <tom@tromey.com>
5224
5225 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5226 check and apply to outer type.
5227
4b654465
JB
52282017-07-07 John Baldwin <jhb@FreeBSD.org>
5229
5230 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5231 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5232 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5233 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5234
2af9fc44
JB
52352017-07-07 John Baldwin <jhb@FreeBSD.org>
5236
5237 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5238
382b69bb
JB
52392017-07-07 John Baldwin <jhb@FreeBSD.org>
5240
5241 * corelow.c (get_core_siginfo): Remove.
5242 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5243 instead of get_core_siginfo.
5244 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5245 * gdbarch.h: Re-generate.
5246 * gdbarch.c: Re-generate.
5247 * linux-tdep.c (linux_core_xfer_siginfo): New.
5248 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5249
6e5eab33
JB
52502017-07-07 John Baldwin <jhb@FreeBSD.org>
5251
5252 * corelow.c (thread_section_name): Move to ...
5253 * gdbcore.h (thread_section_name): ... here.
5254
929edea9
JB
52552017-07-07 John Baldwin <jhb@FreeBSD.org>
5256
5257 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5258 (struct siginfo32): New.
5259 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5260 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5261 via ptrace(PT_LWPINFO).
5262
762c974a
JB
52632017-07-07 John Baldwin <jhb@FreeBSD.org>
5264
5265 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5266 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5267 (fbsd_get_siginfo_type): New.
5268 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5269 (_initialize_fbsd_tdep): New.
5270
33c5cd75
DB
52712017-07-06 David Blaikie <dblaikie@gmail.com>
5272
5273 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5274 a singular dwo_unit*) to support multiple CUs in the same way that
5275 multiple TUs are supported.
5276 (create_cus_hash_table): Replace create_dwo_cu with a function for
5277 parsing multiple CUs from a DWO file.
5278 (open_and_init_dwo_file): Use create_cus_hash_table rather than
5279 create_dwo_cu.
5280 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5281 htab_find, rather than comparing the signature to a singleton CU in
5282 the dwo_file.
5283
8455d262
PA
52842017-07-06 Pedro Alves <palves@redhat.com>
5285
5286 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5287
4da3eb35
PA
52882017-07-04 Pedro Alves <palves@redhat.com>
5289
5290 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5291 * gdbtypes.h (TYPE_STATIC): Delete.
5292 (struct fn_field) <is_public, is_abstract, is_static, is_final,
5293 is_synchronized, is_native>: Delete.
5294 <dummy>: Bump.
5295 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5296 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5297 (TYPE_FN_FIELD_ABSTRACT): Delete.
5298
5bfd255c
SM
52992017-07-03 Simon Marchi <simon.marchi@ericsson.com>
5300
5301 * buffer.h (buffer_finish): Fix spelling mistakes.
5302
25c54127
EZ
53032017-07-01 Eli Zaretskii <eliz@gnu.org>
5304
5305 * .dir-locals.el: Automatically switch to C-style comments in
5306 versions of Emacs that support the feature.
5307
dc4bde35
SDJ
53082017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5309 Pedro Alves <palves@redhat.com>
5310
5311 PR cli/21688
5312 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5313 (process_next_line): New variable 'inline_cmd'.
5314 Adjust 'if' clauses for "python", "compile" and "guile" to use
5315 'command_name_equals' and check for '!inline_cmd'.
5316
51ed89aa
SDJ
53172017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5318
5319 PR cli/21688
5320 * cli/cli-script.c (command_name_equals_not_inline): New function.
5321 (process_next_line): Adjust 'if' clauses for "python", "compile"
5322 and "guile" to use command_name_equals_not_inline.
5323
eb17d413
PA
53242017-06-29 Pedro Alves <palves@redhat.com>
5325
5326 * completer.c (expression_completer): Call
5327 linespec_location_completer instead of location_completer.
5328
195bcdd5
PA
53292017-06-29 Pedro Alves <palves@redhat.com>
5330
5331 * completer.c (expression_completer): Remove code that recomputes
5332 'text' from 'word'.
5333
adc764e7
YQ
53342017-06-29 Yao Qi <yao.qi@linaro.org>
5335
5336 * regformats/regdat.sh: Generate code with
5337 "ifndef IN_PROCESS_AGENT".
5338
6e75794e
PA
53392017-06-28 Pedro Alves <palves@redhat.com>
5340
5341 * command.h: Include "common/scoped_restore.h".
5342
bc491f2e
YQ
53432017-06-28 Yao Qi <yao.qi@linaro.org>
5344
5345 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5346 instead of obstack_grow.
5347
41664b45
DG
53482017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5349
5350 PR gdb/21337
5351 * symfile.c (reread_symbols): Call objfiles_changed just before
5352 read_symbols.
5353
6da67eb1
PA
53542017-06-27 Pedro Alves <palves@redhat.com>
5355
5356 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5357 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5358 (completion_list_add_symbol, completion_list_add_msymbol):
5359 ... these new functions.
5360 (add_symtab_completions)
5361 (default_make_symbol_completion_list_break_on_1): Adjust.
5362
23732b1e
PA
53632017-06-27 Pedro Alves <palves@redhat.com>
5364
5365 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5366 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5367 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5368 dtor.
5369 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5370 'storage_obstack' field an auto_obstack. In-class initialize all
5371 non-bitfield fields. Make minsyms_read bool.
5372 * symfile.c (read_symbols): Adjust.
5373
a4d1e79a
AH
53742017-06-27 Alan Hayward <alan.hayward@arm.com>
5375
5376 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5377 (gdbsim_store_register): Likewise.
5378
8268c778
PA
53792017-06-27 Pedro Alves <palves@redhat.com>
5380
5381 * c-exp.y (name_obstack): Now an auto_obstack.
5382 (yylex): Use auto_obstack::clear.
5383 (c_parse): Use auto_obstack::clear instead of reinitializing and
5384 freeing the obstack.
5385 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5386 * d-exp.y (name_obstack): Now an auto_obstack.
5387 (yylex): Use auto_obstack::clear.
5388 (d_parse): Use auto_obstack::clear instead of reinitializing and
5389 freeing the obstack.
5390 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5391 auto_obstack.
5392 * dwarf2read.c (create_addrmap_from_index)
5393 (dwarf2_build_psymtabs_hard)
5394 (update_enumeration_type_from_children): Likewise.
5395 * gdb_obstack.h (auto_obstack): New type.
5396 * go-exp.y (name_obstack): Now an auto_obstack.
5397 (build_packaged_name): Use auto_obstack::clear.
5398 (go_parse): Use auto_obstack::clear instead of reinitializing and
5399 freeing the obstack.
5400 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5401 auto_obstack.
5402 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5403 * rust-exp.y (work_obstack): Now an auto_obstack.
5404 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5405 reinitializing and freeing the obstack.
5406 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5407 (host_char_to_target): Use auto_obstack.
5408 * utils.h (make_cleanup_obstack_free): Delete declaration.
5409 * valprint.c (generic_emit_char, generic_printstr): Use
5410 auto_obstack.
5411
db665f42
SM
54122017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5413
5414 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5415 thread.
5416 (darwin_init_thread_list): Don't update dummy thread.
5417 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5418
873c0814
SM
54192017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5420
5421 * record-full.c (netorder16): Remove.
5422
8b5a7a6e
SM
54232017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5424
5425 * common/diagnostics.h: Define macros for GCC.
5426 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5427 * common/vec.h: Include diagnostics.h.
5428 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5429 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5430 warning.
5431
d1435379
SM
54322017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5433
5434 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5435 New macro.
5436 * ada-lex.l: Ignore deprecated register warnings.
5437
cc75e0fd
SM
54382017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5439
5440 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5441 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5442
07809eaf
SM
54432017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5444
5445 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5446 its own line.
5447
f076f034
SM
54482017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5449
5450 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5451
0dd5cbc5
AH
54522017-06-23 Alan Hayward <alan.hayward@arm.com>
5453
5454 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5455 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5456 (xtensa_register_read_masked): Likewise.
5457
d4c6ce5b
SDJ
54582017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5459
5460 * common/environ.c (gdb_environ::unset): Update comment.
5461
16892a03
AH
54622017-06-22 Alan Hayward <alan.hayward@arm.com>
5463
5464 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5465 registers.
5466
d7dcbefc
AH
54672017-06-22 Alan Hayward <alan.hayward@arm.com>
5468
5469 * record-full.c (record_full_exec_insn): Use byte_vector.
5470
b30ff123
YQ
54712017-06-22 Yao Qi <yao.qi@linaro.org>
5472
5473 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5474 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5475
4fa847d7
AH
54762017-06-22 Alan Hayward <alan.hayward@arm.com>
5477
5478 * remote.c (cached_reg): Move from here...
5479 * regcache.h (cached_reg): ...to here.
5480 * python/py-unwind.c (struct reg_info): Remove.
5481 (cached_frame_info): Use cached_reg_t.
5482 (pyuw_prev_register): Likewise.
5483 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5484 (pyuw_dealloc_cache): Free all registers.
5485
f4906a9a
PA
54862017-06-22 Pedro Alves <palves@redhat.com>
5487 Simon Marchi <simon.marchi@ericsson.com>
5488
5489 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5490 warning.
5491 * common/diagnostics.h: New file.
5492
b45a1208
PA
54932017-06-22 Pedro Alves <palves@redhat.com>
5494
5495 * common/agent.h: Add include guards.
5496
e4da2c61
SM
54972017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5498
5499 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5500 talk about addressable units instead of bytes.
5501
96160d60
SDJ
55022017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5503
5504 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5505 of '::const_iterator'.
5506
9a6c7d9c
SDJ
55072017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5508
5509 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5510 'unittests/environ-selftests.c'.
5511 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5512 * charset.c (find_charset_names): Declare object 'iconv_env'.
5513 Update code to use 'iconv_env' object. Remove call to
5514 'free_environ'.
5515 * common/environ.c: Include <utility>.
5516 (make_environ): Delete function.
5517 (free_environ): Delete function.
5518 (gdb_environ::clear): New function.
5519 (gdb_environ::operator=): New function.
5520 (gdb_environ::get): Likewise.
5521 (environ_vector): Delete function.
5522 (set_in_environ): Delete function.
5523 (gdb_environ::set): New function.
5524 (unset_in_environ): Delete function.
5525 (gdb_environ::unset): New function.
5526 (gdb_environ::envp): Likewise.
5527 * common/environ.h: Include <vector>.
5528 (struct gdb_environ): Delete; transform into...
5529 (class gdb_environ): ... this class.
5530 (free_environ): Delete prototype.
5531 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5532 environ_vector): Likewise.
5533 * infcmd.c (run_command_1): Update code to call
5534 'envp' from 'gdb_environ' class.
5535 (environment_info): Update code to call methods from 'gdb_environ'
5536 class.
5537 (unset_environment_command): Likewise.
5538 (path_info): Likewise.
5539 (path_command): Likewise.
5540 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5541 (inferior::inferior): Initialize 'environment' using the host's
5542 information.
5543 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5544 Include "environ.h".
5545 (class inferior) <environment>: Change type from 'struct
5546 gdb_environ' to 'gdb_environ'.
5547 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5548 methods from 'gdb_environ' class.
5549 * solib.c (solib_find_1): Likewise
5550 * unittests/environ-selftests.c: New file.
5551
75c554cf
YQ
55522017-06-20 Yao Qi <yao.qi@linaro.org>
5553
5554 * features/i386/i386-linux.xml: Exchange the order of including
5555 32bit-linux.xml and 32bit-sse.xml.
5556 * features/i386/i386-linux.c: Regenerated.
5557
72ddacb7
YQ
55582017-06-20 Yao Qi <yao.qi@linaro.org>
5559
5560 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5561 Delete copy ctor and assignment operator.
5562 (tdesc_type): Likewise.
5563 (tdesc_feature): Likewise.
5564 (tdesc_free_reg): Remove.
5565 (tdesc_create_reg): Use new.
5566 (tdesc_free_type): Remove.
5567 (tdesc_create_vector): Use new.
5568 (tdesc_create_union): Likewise.
5569 (tdesc_create_flags): Likewise.
5570 (tdesc_create_enum): Likewise.
5571 (tdesc_free_feature): Delete.
5572 (free_target_description): Use delete.
5573
325c9fd4
JB
55742017-06-19 John Baldwin <jhb@FreeBSD.org>
5575
5576 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5577 registers.
5578
16b7a719
PA
55792017-06-19 Pedro Alves <palves@redhat.com>
5580
5581 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5582 after gdb::unlinker.
5583
1c8e01c9
SDJ
55842017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5585
5586 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5587 gdb_environ to access an environment variable.
5588
ffce45d2
TP
55892017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5590
5591 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5592 gdb_byte*.
5593
1d4fbac9
SM
55942017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5595
5596 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5597
8465943a
SM
55982017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5599
5600 * configure: Re-generate.
5601 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5602
3e019bdc
SM
56032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5604
5605 * configure: Re-generate.
5606 * warning.m4: Pass -Werror to compiler when checking for
5607 supported warning flags.
5608
cf0dd6f0
SM
56092017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5610
5611 * Makefile.in (COMPILE.pre): Add "-x c++".
5612
6f98355c
YQ
56132017-06-16 Alan Hayward <alan.hayward@arm.com>
5614 Pedro Alves <palves@redhat.com>
5615 Yao Qi <yao.qi@linaro.org>
5616
5617 * defs.h (RequireLongest): New.
5618 (extract_integer): Declare function template.
5619 (extract_signed_integer): Remove the declaration, but define it
5620 static inline.
5621 (extract_unsigned_integer): Likewise.
5622 (store_integer): Declare function template.
5623 (store_signed_integer): Remove the declaration, but define it
5624 static inline.
5625 (store_unsigned_integer): Likewise.
5626 * findvar.c (extract_integer): New function template.
5627 (extract_signed_integer): Remove.
5628 (extract_unsigned_integer): Remove.
5629 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5630 instantiations.
5631 (store_integer): New function template.
5632 (store_signed_integer): Remove.
5633 (store_unsigned_integer): Remove.
5634 (store_integer): Explicit instantiations.
5635 * regcache.c (regcache_raw_read_signed): Update.
5636 (regcache::raw_read): New function.
5637 (regcache::raw_read_signed): Remove.
5638 (regcache::raw_read_unsigned): Remove.
5639 (regcache_raw_read_unsigned): Update.
5640 (regcache_raw_write_unsigned): Update.
5641 (regcache::raw_write_signed): Remove.
5642 (regcache::raw_write): New function.
5643 (regcache_cooked_read_signed): Update.
5644 (regcache::raw_write_unsigned): Remove.
5645 (regcache::cooked_read_signed): Remove.
5646 (regcache_cooked_read_unsigned): Update.
5647 (regcache::cooked_read_unsigned): Remove.
5648 (regcache_cooked_write_signed): Update.
5649 (regcache_cooked_write_unsigned): Update.
5650 * regcache.h (regcache) <raw_read_signed>: Remove.
5651 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5652 <raw_read, raw_write>: New.
5653 <cooked_read_signed, cooked_write_signed>: Remove.
5654 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5655 <cooked_read, cooked_write>: New.
5656 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5657 (sh64_pseudo_register_write): Update.
5658
a87dc45a
AK
56592017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5660
5661 * arc-tdep.c (arc_disassembler_options): New variable.
5662 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5663 of default_print_insn.
5664 (arc_delayed_print_insn): Set info->section when needed,
5665 use default_print_insn to retrieve a disassembler.
5666
45159d6a
SDJ
56672017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5668
5669 PR gdb/21574
5670 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5671 to mention $SHELL and startup-with-shell.
5672
b46c4cf0
MF
56732017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5674
5675 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5676
6394c606
YQ
56772017-06-14 Yao Qi <yao.qi@linaro.org>
5678
5679 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5680 default_print_insn instead of print_insn_aarch64.
5681 * arm-tdep.c (gdb_print_insn_arm): Call
5682 default_print_insn instead of print_insn_big_arm
5683 and print_insn_little_arm.
5684 * i386-tdep.c (i386_print_insn): Call default_print_insn
5685 instead of print_insn_i386.
5686 * ia64-tdep.c (ia64_print_insn): Call
5687 default_print_insn instead of print_insn_ia64.
5688 * mips-tdep.c (gdb_print_insn_mips): Call
5689 default_print_insn instead of print_insn_big_mips
5690 and print_insn_little_mips.
5691 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5692 instead of print_insn_spu.
5693
d5722aa2
PA
56942017-06-14 Pedro Alves <palves@redhat.com>
5695
5696 * ada-lang.c: Include "common/byte-vector.h".
5697 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5698 * charset.c (wchar_iterator::iterate): Resize the vector instead
5699 of reserving it.
5700 * common/byte-vector.h: Include "common/def-vector.h".
5701 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5702 * cli/cli-dump.c: Include "common/byte-vector.h".
5703 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5704 * common/byte-vector.h: New file.
5705 * common/def-vector.h: New file.
5706 * common/default-init-alloc.h: New file.
5707 * dwarf2loc.c: Include "common/byte-vector.h".
5708 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5709 instead of reserving it.
5710 * dwarf2read.c: Include "common/byte-vector.h".
5711 (data_buf::m_vec): Now a gdb::byte_vector.
5712 * gdb_regex.c: Include "common/def-vector.h".
5713 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5714 * mi/mi-main.c: Include "common/byte-vector.h".
5715 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5716 * printcmd.c: Include "common/byte-vector.h".
5717 (print_scalar_formatted): Use gdb::byte_vector.
5718 * valprint.c: Include "common/byte-vector.h".
5719 (maybe_negate_by_bytes, print_decimal_chars): Use
5720 gdb::byte_vector.
5721
01ec7a27
SM
57222017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5723
5724 * darwin-nat.c: Include "nat/fork-inferior.h".
5725
848d9074
SM
57262017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5727
5728 * configure.nat: Factor out Darwin bits that are not
5729 architecture-specific. Add fork-inferior.o.
5730
3b912944
SM
57312017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5732
5733 * configure.nat: Factor out AIX bits that are not
5734 architecture-specific. Add fork-inferior.o.
5735
55acdf22
AA
57362017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5737
5738 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5739 (read_pieced_value, write_pieced_value): ...here. Reduce to
5740 wrappers that just call rw_pieced_value.
5741
f65e2044
AA
57422017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5743
5744 * dwarf2loc.c (write_pieced_value): When writing the data for a
5745 memory piece, use write_memory_with_notification instead of
5746 write_memory.
5747
23f945bf
AA
57482017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5749
5750 * valops.c (read_value_memory): Change embedded_offset to
5751 represent a bit offset instead of a byte offset.
5752 * value.h (read_value_memory): Adjust comment.
5753
f236533e
AA
57542017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5755
5756 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5757 dest_offset_bits and source_offset_bits.
5758 (write_pieced_value): Likewise.
5759
65d84b76
AA
57602017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5761
5762 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5763 given by DW_OP_bit_piece.
5764 (write_pieced_value): Likewise.
5765
242d31ab
AA
57662017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5767
5768 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5769 some other preparations to the places where sufficient information
5770 is available.
5771 (write_pieced_value): Likewise.
5772
03c8af18
AA
57732017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5774
5775 * dwarf2loc.c (bits_to_bytes): New function.
5776 (read_pieced_value): Fix offset calculations for register pieces
5777 on big-endian targets.
5778 (write_pieced_value): Likewise.
5779
840989c1
AA
57802017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5781
5782 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5783 (write_pieced_value): Likewise.
5784
359b19bb
AA
57852017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5786
5787 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5788 transfer the source value's least significant bits, instead of its
5789 lowest-addressed ones. Rename type_len to max_offset.
5790 (read_pieced_value): Mirror above changes to write_pieced_value as
5791 applicable.
5792
07c9ca3b
AA
57932017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5794
5795 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5796 truncate full bytes from dest_offset_bits before using it as an
5797 offset into the buffer.
5798
f1cc9874
AA
57992017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5800
5801 * dwarf2loc.c (write_pieced_value): Include transfer size in
5802 byte-wise check.
5803
cdaac320
AA
58042017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5805
5806 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5807 calculation of this_size.
5808
af547a96
AA
58092017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5810
5811 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5812 when targeting a bit-field.
5813 (write_pieced_value): Likewise.
5814
ddd7882a
AA
58152017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5816
5817 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5818 (allocate_piece_closure): Drop addr_size parameter.
5819 (dwarf2_evaluate_loc_desc_full): Adjust call to
5820 allocate_piece_closure.
5821
e9352324
AA
58222017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5823
5824 PR gdb/21226
5825 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5826 the LSB end, independent of endianness.
5827
d5d1163e
AA
58282017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5829
5830 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5831 size capping.
5832
032bb6ea
YQ
58332017-06-13 Yao Qi <yao.qi@linaro.org>
5834
5835 * mips-linux-nat.c: Move include features/mips*-linux.c to
5836 mips-linux-tdep.c.
5837 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5838 to mips-linux-tdep.c.
5839 * mips-linux-tdep.c: Include features/mips*-linux.c
5840 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5841 functions.
5842 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5843 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5844 (tdesc_mips64_dsp_linux): Declare.
5845
f12f6bad
TT
58462017-06-12 Tom Tromey <tom@tromey.com>
5847
5848 * valprint.h (val_print_type_code_int): Remove.
5849 * valprint.c (generic_val_print_int): Always call
5850 val_print_scalar_formatted.
5851 (val_print_type_code_int): Remove.
5852 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5853 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5854 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5855 * ada-valprint.c (ada_val_print_num): Use
5856 val_print_scalar_formatted.
5857
d9109c80
TT
58582017-06-12 Tom Tromey <tom@tromey.com>
5859
5860 * printcmd.c (print_scalar_formatted): Unify the two switches.
5861 Don't convert scalars to LONGEST.
5862
4ac0cb1c
TT
58632017-06-12 Tom Tromey <tom@tromey.com>
5864
5865 PR exp/16225:
5866 * valprint.h (print_decimal_chars): Update.
5867 * valprint.c (maybe_negate_by_bytes): New function.
5868 (print_decimal_chars): Add "is_signed" argument.
5869 * printcmd.c (print_scalar_formatted): Update.
5870
30a25466
TT
58712017-06-12 Tom Tromey <tom@tromey.com>
5872
5873 PR exp/16225:
5874 * valprint.h (print_binary_chars, print_hex_chars): Update.
5875 * valprint.c (val_print_type_code_int): Update.
5876 (print_binary_chars): Add "zero_pad" argument.
5877 (emit_octal_digit): New function.
5878 (print_octal_chars): Don't zero-pad.
5879 (print_decimal_chars): Likewise.
5880 (print_hex_chars): Add "zero_pad" argument.
5881 * sh64-tdep.c (sh64_do_fp_register): Update.
5882 * regcache.c (regcache::dump): Update.
5883 * printcmd.c (print_scalar_formatted): Update.
5884 * infcmd.c (default_print_one_register_info): Update.
5885
b3464d03
PA
58862017-06-12 Pedro Alves <palves@redhat.com>
5887 Alan Hayward <alan.hayward@arm.com>
5888
5889 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5890 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5891 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5892 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5893 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5894
4b76cda9
PA
58952017-06-12 Pedro Alves <palves@redhat.com>
5896
5897 * dwarf2read.c (mapped_symtab::data): Now a vector of
5898 symtab_index_entry instead of vector of
5899 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5900 whether an element's name is NULL instead of checking whether the
5901 element itself is NULL.
5902 (find_slot): Change return type. Adjust.
5903 (hash_expand, , add_index_entry, uniquify_cu_indices)
5904 (write_hash_table): Adjust.
5905
e8f8bcb3
PA
59062017-06-12 Pedro Alves <palves@redhat.com>
5907
5908 * dwarf2read.c (recursively_count_psymbols): New function.
5909 (write_psymtabs_to_index): Call it to compute number of psyms and
5910 pass estimate size of psyms_seen to unordered_set's ctor.
5911
70a1152b
PA
59122017-06-12 Pedro Alves <palves@redhat.com>
5913
5914 * dwarf2read.c (write_hash_table): Check if key already exists
5915 before emplacing.
5916
c2f134ac
PA
59172017-06-12 Pedro Alves <palves@redhat.com>
5918
5919 * dwarf2read.c (data_buf::append_space): Rename to...
5920 (data_buf::grow): ... this, and make private. Adjust all callers.
5921 (data_buf::append_uint): New method.
5922 (add_address_entry, write_one_signatured_type)
5923 (write_psymtabs_to_index): Use it.
5924
a81e6d4d
PA
59252017-06-12 Pedro Alves <palves@redhat.com>
5926
5927 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5928 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5929 (data_buf::file_write): Call ::fwrite directly.
5930
6fd931f2
PA
59312017-06-12 Pedro Alves <palves@redhat.com>
5932
5933 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5934 std::vector::erase.
5935
bc8f2430
JK
59362017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5937
5938 Code cleanup: C++ify .gdb_index producer.
5939 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5940 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5941 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5942 (create_strtab, add_string): Remove.
5943 (file_write, data_buf): New.
5944 (struct symtab_index_entry): Use std::vector for cu_indices.
5945 (struct mapped_symtab): Use std::vector for data.
5946 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5947 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5948 Remove.
5949 (find_slot): Change return type. Update it to the new data structures.
5950 (hash_expand, add_index_entry): Update it to the new data structures.
5951 (offset_type_compare): Remove.
5952 (uniquify_cu_indices): Update it to the new data structures.
5953 (c_str_view, c_str_view_hasher, vector_hasher): New.
5954 (add_indices_to_cpool): Remove.
5955 (write_hash_table): Update it to the new data structures.
5956 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5957 (eq_psymtab_cu_index): Remove.
5958 (psym_index_map): New typedef.
5959 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5960 reference and std::unordered_map for cu_index_htab.
5961 (add_address_entry, add_address_entry_worker, write_address_map)
5962 (write_psymbols): Update it to the new data structures.
5963 (write_obstack): Remove.
5964 (struct signatured_type_index_data): Change types_list to a data_buf
5965 reference and psyms_seen to a std::unordered_set reference.
5966 (write_one_signatured_type, recursively_write_psymbols)
5967 (write_psymtabs_to_index): Update it to the new data structures.
5968
c4dcb155
SM
59692017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5970
5971 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5972 separate-debug-file commands.
5973 * symfile.h (separate_debug_file_debug): New global.
5974 * symfile.c (separate_debug_file_debug): New global.
5975 (separate_debug_file_exists, find_separate_debug_file): Add
5976 debug output.
5977 (_initialize_symfile): Add "set debug separate-debug-file"
5978 command.
5979 * build-id.c (build_id_to_debug_bfd,
5980 find_separate_debug_file_by_buildid): Add debug output.
5981
6d45d4b4
SM
59822017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5983
5984 * gdbarch.sh (displaced_step_free_closure): Remove.
5985 * gdbarch.h, gdbarch.c: Re-generate.
5986 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5987 displaced_step_free_closure.
5988 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5989 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5990 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5991 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5992 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5993 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5994 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5995 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5996 * infrun.c (displaced_step_clear): Call xfree instead of
5997 gdbarch_displaced_step_free_closure.
5998
2f91880f
SDJ
59992017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
6000
6001 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6002 NULL".
6003
b8b6e72f
AH
60042017-06-08 Alan Hayward <alan.hayward@arm.com>
6005
6006 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6007 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6008 (mn10300_push_dummy_call): Likewise.
6009
5369082e
AH
60102017-06-08 Alan Hayward <alan.hayward@arm.com>
6011
6012 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6013
ff4ca5ac
AH
60142017-06-08 Alan Hayward <alan.hayward@arm.com>
6015
6016 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6017
aefd8b33
SDJ
60182017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6019
6020 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6021 able to start inferiors using a shell.
6022 (New remote packets): Announce new packet "QStartupWithShell".
6023 * remote.c: Add PACKET_QStartupWithShell.
6024 (extended_remote_create_inferior): Handle new
6025 PACKET_QStartupWithShell.
6026 (remote_protocol_features) <QStartupWithShell>: New entry for
6027 PACKET_QStartupWithShell.
6028 (_initialize_remote): Call "add_packet_config_cmd" for
6029 QStartupShell.
6030
2090129c
SDJ
60312017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6032 Pedro Alves <palves@redhat.com>
6033
6034 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6035 and "nat/fork-inferior.h".
6036 * common/common-inferior.h: New file, with contents from
6037 "gdb/inferior.h".
6038 * commom/common-utils.c: Include "common-utils.h".
6039 (stringify_argv): New function.
6040 * common/common-utils.h (stringify_argv): New prototype.
6041 * configure.nat: Add "fork-inferior.o" as a dependency for
6042 "*linux*", "fbsd*" and "nbsd*" hosts.
6043 * corefile.c (get_exec_file): Update comment.
6044 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6045 instead of "startup_inferior".
6046 (darwin_create_inferior): Call "add_thread_silent" after
6047 "fork_inferior".
6048 * fork-child.c: Cleanup unnecessary includes.
6049 (SHELL_FILE): Move to "common/common-fork-child.c".
6050 (environ): Likewise.
6051 (exec_wrapper): Initialize.
6052 (get_exec_wrapper): New function.
6053 (breakup_args): Move to "common/common-fork-child.c"; rename to
6054 "breakup_args_for_exec".
6055 (escape_bang_in_quoted_argument): Move to
6056 "common/common-fork-child.c".
6057 (saved_ui): New variable.
6058 (prefork_hook): New function.
6059 (postfork_hook): Likewise.
6060 (postfork_child_hook): Likewise.
6061 (gdb_startup_inferior): Likewise.
6062 (fork_inferior): Move to "common/common-fork-child.c". Update
6063 function to support gdbserver.
6064 (startup_inferior): Likewise.
6065 * gdbcore.h (get_exec_file): Remove declaration.
6066 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6067 instead of "startup_inferior". Call "add_thread_silent" after
6068 "fork_inferior".
6069 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6070 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6071 instead of "startup_inferior". Call "add_thread_silent" after
6072 "fork_inferior".
6073 * inferior.h: Include "common-inferior.h".
6074 (trace_start_error): Move to "common/common-utils.h".
6075 (trace_start_error_with_name): Likewise.
6076 (fork_inferior): Move prototype to "nat/fork-inferior.h".
6077 (startup_inferior): Likewise.
6078 (gdb_startup_inferior): New prototype.
6079 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6080 * nat/fork-inferior.h: New file.
6081 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6082 instead of "startup_inferior". Call "add_thread_silent" after
6083 "fork_inferior".
6084 * target.h (target_terminal_init): Move prototype to
6085 "target/target.h".
6086 (target_terminal_inferior): Likewise.
6087 (target_terminal_ours): Likewise.
6088 * target/target.h (target_terminal_init): New prototype, moved
6089 from "target.h".
6090 (target_terminal_inferior): Likewise.
6091 (target_terminal_ours): Likewise.
6092 * utils.c (gdb_flush_out_err): New function.
6093
043a4934
SDJ
60942017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6095
6096 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6097 * common/common-gdbthread.h: New file, with parts from
6098 "gdb/gdbthread.h".
6099 * gdbthread.h: Include "common-gdbthread.h".
6100 (switch_to_thread): Moved to "common/common-gdbthread.h".
6101
15652511
SDJ
61022017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6103
6104 * Makefile.in (SFILES): Add "common/job-control.c".
6105 (HFILES_NO_SRCDIR): Add "common/job-control.h".
6106 (COMMON_OBS): Add "job-control.o".
6107 * common/job-control.c: New file, with contents from
6108 "gdb/inflow.c".
6109 * common/job-control.h: New file, with contents from "terminal.h".
6110 * fork-child.c: Include "job-control.h".
6111 * inflow.c: Include "job-control.h".
6112 (gdb_setpgid): Move to "common/common-inflow.c".
6113 (_initialize_inflow): Move setting of "job_control" to
6114 "handle_job_control".
6115 * terminal.h (job_control): Moved to "common/common-terminal.h".
6116 (gdb_setpgid): Likewise.
6117 * top.c: Include "job_control.h".
6118 * utils.c: Likewise.
6119 (job_control): Moved to "job-control.c".
6120
2d7cc5c7
PA
61212017-06-07 Pedro Alves <palves@redhat.com>
6122
6123 * Makefile.in (SFILES): Add gdb_regex.c.
6124 (COMMON_OBS): Add gdb_regex.o.
6125 * ada-lang.c (ada_add_standard_exceptions)
6126 (ada_add_exceptions_from_frame, name_matches_regex)
6127 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6128 parameter type to compiled_regex. Adjust.
6129 (ada_exceptions_list): Use compiled_regex.
6130 * break-catch-throw.c (exception_catchpoint::pattern): Now a
6131 std::unique_ptr<compiled_regex>.
6132 (exception_catchpoint::~exception_catchpoint): Remove regfree
6133 call.
6134 (check_status_exception_catchpoint): Adjust to use compiled_regex.
6135 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6136 * breakpoint.c (solib_catchpoint::compiled): Now a
6137 std::unique_ptr<compiled_regex>.
6138 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6139 (check_status_catch_solib): Adjust to use compiled_regex.
6140 (add_solib_catchpoint): Adjust to use compiled_regex.
6141 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6142 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6143 compiled_regex reference. Adjust to use it.
6144 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6145 declaration. Include "gdb_regex.h".
6146 (apropos_cmd): Change regex parameter to compiled_regex reference.
6147 * gdb_regex.c: New file.
6148 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6149 declarations.
6150 (class compiled_regex): New.
6151 * linux-tdep.c: Include "common/gdb_optional.h".
6152 (struct mapping_regexes): New, factored out from
6153 mapping_is_anonymous_p, and adjusted to use compiled_regex.
6154 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6155 gdb::optional and remove cleanups. Adjust to compiled_regex.
6156 * probe.c: Include "common/gdb_optional.h".
6157 (collect_probes): Use compiled_regex and gdb::optional and remove
6158 cleanups.
6159 * skip.c: Include "common/gdb_optional.h".
6160 (skiplist_entry::compiled_function_regexp): Now a
6161 gdb::optional<compiled_regex>.
6162 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6163 (free_skiplist_entry): Remove regfree call.
6164 (compile_skip_regexp, skip_rfunction_p): Adjust to use
6165 compiled_regex and gdb::optional.
6166 * symtab.c: Include "common/gdb_optional.h".
6167 (search_symbols): Use compiled_regex and gdb::optional.
6168 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6169 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
6170 to gdb_regex.c.
6171
50d6adef
AH
61722017-06-07 Alan Hayward <alan.hayward@arm.com>
6173
6174 * regcache.c (regcache::save): Avoid buffer use.
6175 (regcache::dump): Likewise.
6176
4a8a33c8
AH
61772017-06-07 Alan Hayward <alan.hayward@arm.com>
6178
6179 * sh-tdep.c (sh_pseudo_register_read): Remove
6180 MAX_REGISTER_SIZE.
6181 (sh_pseudo_register_write): Likewise.
6182 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6183 (sh64_pseudo_register_write): Likewise
6184
d1be909e
AH
61852017-06-07 Alan Hayward <alan.hayward@arm.com>
6186
6187 * aarch64-tdep.c (aarch64_store_return_value): Use
6188 V_REGISTER_SIZE.
6189 (aarch64_pseudo_read_value): Likewise.
6190 (aarch64_pseudo_write): Likewise.
6191
f4a65042
YQ
61922017-06-06 Yao Qi <yao.qi@linaro.org>
6193
6194 * regformats/regdef.h (set_register_cache): Remove the
6195 declaration.
6196
9f7fb0aa
AH
61972017-06-06 Alan Hayward <alan.hayward@arm.com>
6198
6199 * frame.c (frame_unwind_register_signed): Use
6200 frame_unwind_register_value.
6201
e1e01040
PA
62022017-06-06 Pedro Alves <palves@redhat.com>
6203
6204 PR breakpoints/21553
6205 * breakpoint.c (create_breakpoints_sal_default)
6206 (init_breakpoint_sal, create_breakpoint_sal): Use
6207 gdb::unique_xmalloc_ptr for string parameters.
6208 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6209 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
6210 (base_breakpoint_create_breakpoints_sal)
6211 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6212 (strace_marker_create_breakpoints_sal)
6213 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6214 string parameters.
6215 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6216 gdb::unique_xmalloc_ptr for string parameters.
6217 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6218 parameters.
6219
fbe654c8
AH
62202017-06-06 Alan Hayward <alan.hayward@arm.com>
6221
6222 * alpha-tdep.c (alpha_register_to_value): Use
6223 get_frame_register_value.
6224 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6225
ae0d01d6
AH
62262017-06-06 Alan Hayward <alan.hayward@arm.com>
6227
6228 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6229 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6230 (ia64_value_to_register): Likewise.
6231 (ia64_extract_return_value): Likewise.
6232 (ia64_store_return_value): Likewise.
6233 (ia64_push_dummy_call): Likewise.
6234
49cf576c
JB
62352017-06-04 Joel Brobecker <brobecker@adacore.com>
6236
6237 GDB 8.0 released.
6238
26b6a6ab
SM
62392017-06-03 Simon Marchi <simon.marchi@ericsson.com>
6240
6241 * x86-linux-nat.c (struct arch_lwp_info): Remove.
6242
22827c51
SM
62432017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
6244
6245 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6246 parameter.
6247 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6248
0e05cf3a
SM
62492017-06-02 Simon Marchi <simon.marchi@ericsson.com>
6250
6251 * event-loop.c (poll_timers): Unallocate timer using delete
6252 instead of xfree.
6253
c1fc2657
SM
62542017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6255
6256 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6257 (struct breakpoint) <~breakpoint>: New.
6258 (struct watchpoint): Inherit from breakpoint.
6259 <~watchpoint>: New.
6260 <base>: Remove.
6261 (struct tracepoint): Inherit from breakpoint.
6262 <base>: Remove.
6263 * breakpoint.c (longjmp_breakpoint_ops): Remove.
6264 (struct longjmp_breakpoint): Inherit from breakpoint.
6265 <~longjmp_breakpoint>: New.
6266 <base>: Remove.
6267 (new_breakpoint_from_type): Remove casts.
6268 (watchpoint_in_thread_scope): Remove reference to base field.
6269 (watchpoint_del_at_next_stop): Likewise.
6270 (update_watchpoint): Likewise.
6271 (watchpoint_check): Likewise.
6272 (bpstat_check_watchpoint): Likewise.
6273 (set_longjmp_breakpoint): Likewise.
6274 (struct fork_catchpoint): Inherit from breakpoint.
6275 <base>: Remove.
6276 (struct solib_catchpoint): Inherit from breakpoint.
6277 <~solib_catchpoint>: New.
6278 <base>: Remove.
6279 (dtor_catch_solib): Change to ...
6280 (solib_catchpoint::~solib_catchpoint): ... this.
6281 (breakpoint_hit_catch_solib): Remove reference to base field.
6282 (add_solib_catchpoint): Likewise.
6283 (create_fork_vfork_event_catchpoint): Likewise.
6284 (struct exec_catchpoint): Inherit from breakpoint.
6285 <~exec_catchpoint>: New.
6286 <base>: Remove.
6287 (dtor_catch_exec): Change to ...
6288 (exec_catchpoint::~exec_catchpoint): ... this.
6289 (dtor_watchpoint): Change to ...
6290 (watchpoint::~watchpoint): ... this.
6291 (watch_command_1): Remove reference to base field.
6292 (catch_exec_command_1): Likewise.
6293 (base_breakpoint_dtor): Change to ...
6294 (breakpoint::~breakpoint): ... this.
6295 (base_breakpoint_ops): Remove dtor field value.
6296 (longjmp_bkpt_dtor): Change to ...
6297 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6298 (strace_marker_create_breakpoints_sal): Remove reference to base
6299 field.
6300 (delete_breakpoint): Don't manually call breakpoint destructor.
6301 (create_tracepoint_from_upload): Remove reference to base field.
6302 (trace_pass_set_count): Likewise.
6303 (initialize_breakpoint_ops): Don't initialize
6304 momentary_breakpoint_ops, don't set dtors.
6305 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6306 <~ada_catchpoint>: New.
6307 <base>: Remove.
6308 (create_excep_cond_exprs): Remove reference to base field.
6309 (dtor_exception): Change to ...
6310 (ada_catchpoint::~ada_catchpoint): ... this.
6311 (dtor_catch_exception): Remove.
6312 (dtor_catch_exception_unhandled): Remove.
6313 (dtor_catch_assert): Remove.
6314 (create_ada_exception_catchpoint): Remove reference to base
6315 field.
6316 (initialize_ada_catchpoint_ops): Don't set dtors.
6317 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6318 breakpoint.
6319 <~signal_catchpoint>: New.
6320 <base>: Remove.
6321 (signal_catchpoint_dtor): Change to ...
6322 (signal_catchpoint::~signal_catchpoint): ... this.
6323 (create_signal_catchpoint): Remove reference to base field.
6324 (initialize_signal_catchpoint_ops): Don't set dtor.
6325 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6326 from breakpoint.
6327 <~syscall_catchpoint>: New.
6328 <base>: Remove.
6329 (dtor_catch_syscall): Change to ...
6330 (syscall_catchpoint::~syscall_catchpoint): ... this.
6331 (create_syscall_event_catchpoint): Remove reference to base
6332 field.
6333 (initialize_syscall_catchpoint_ops): Don't set dtor.
6334 * break-catch-throw.c (struct exception_catchpoint): Inherit
6335 from breakpoint.
6336 <~exception_catchpoint>: New.
6337 <base>: Remove.
6338 (dtor_exception_catchpoint): Change to ...
6339 (exception_catchpoint::~exception_catchpoint): ... this.
6340 (handle_gnu_v3_exceptions): Remove reference to base field.
6341 (initialize_throw_catchpoint_ops): Don't set dtor.
6342 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6343 field.
6344 * remote.c (remote_get_tracepoint_status): Likewise.
6345 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6346 * tracefile.c (tracefile_fetch_registers): Likewise.
6347 * tracepoint.c (actions_command): Likewise.
6348 (validate_actionline): Likewise.
6349 (tfind_1): Likewise.
6350 (get_traceframe_location): Likewise.
6351 (find_matching_tracepoint_location): Likewise.
6352 (parse_tracepoint_status): Likewise.
6353 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6354
3b0871f4
SM
63552017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6356
6357 * breakpoint.c (struct longjmp_breakpoint): New struct.
6358 (is_tracepoint_type): Change return type to bool.
6359 (is_longjmp_type): New function.
6360 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6361 (set_raw_breakpoint_without_location): Use
6362 new_breakpoint_from_type.
6363 (set_raw_breakpoint): Likewise.
6364
a5e364af
SM
63652017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6366
6367 * breakpoint.c (new_breakpoint_from_type): New function.
6368 (create_breakpoint_sal): Use new_breakpoint_from_type and
6369 unique_ptr.
6370 (create_breakpoint): Likewise.
6371
ae3b3f34
SM
63722017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6373
6374 * memattr.c (mem_info_command): Rename to ...
6375 (info_mem_command): ... this.
6376 (mem_enable_command): Rename to ...
6377 (enable_mem_command): ... this.
6378 (mem_disable_command): Rename to ...
6379 (disable_mem_command): ... this.
6380 (mem_delete_command): Rename to ...
6381 (delete_mem_command): ... this.
6382 (_initialize_mem): Adjust function names.
6383
13ace077
MM
63842017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6385
6386 * btrace.c (handle_pt_insn_events): New.
6387 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6388 STATUS. Split into this and ...
6389 (handle_pt_insn_event_flags): ... this.
6390
c56ccc05
MM
63912017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6392
6393 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6394 and struct pt_insn.resynced.
6395 * configure: Regenerated.
6396 * config.in: Regenerated.
6397
08c3f6d2
TW
63982017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6399
6400 * btrace.c (ftrace_find_call_by_number): New function.
6401 (ftrace_new_function): Store objects, not pointers.
6402 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6403 ftrace_new_gap, ftrace_update_function,
6404 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6405 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6406 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6407 btrace_ends_with_single_insn, btrace_call_get): Account for
6408 btrace_thread_info::functions now storing objects.
6409 * btrace.h (struct btrace_thread_info): Add constructor.
6410 (struct btrace_thread_info) <functions>: Make std::vector.
6411 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6412 Initialize with default values.
6413 * record-btrace.c (record_btrace_frame_sniffer): Account for
6414 btrace_thread_info::functions now storing objects.
6415
8ffd39f2
TW
64162017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6417
6418 * btrace.c: Remove typedef bfun_s.
6419 (ftrace_new_gap): Directly add gaps to the list of gaps.
6420 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6421 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6422 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6423 instead of gdb VEC.
6424
4aeb0dfc
TW
64252017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6426
6427 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6428 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6429 with btrace_thread_info::next_segment and
6430 btrace_thread_info::prev_segment.
6431 * btrace.h: Remove struct btrace_func_link.
6432 (struct btrace_function): Replace pair of function segment pointers
6433 with pair of indices.
6434 * python/py-record-btrace.c (btpy_call_prev_sibling,
6435 btpy_call_next_sibling): Replace references to
6436 btrace_thread_info::segment with btrace_thread_info::next_segment and
6437 btrace_thread_info::prev_segment.
6438 * record-btrace.c (record_btrace_frame_this_id): Use
6439 btrace_find_call_by_number.
6440
eb8f2b9c
TW
64412017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6442
6443 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6444 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6445 btrace_insn_next, btrace_insn_prev): Remove references to
6446 btrace_thread_info::flow.
6447 * btrace.h (struct btrace_function): Remove FLOW.
6448
42bfe59e
TW
64492017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6450
6451 * btrace.c (ftrace_find_call_by_number): New function.
6452 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6453 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6454 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6455 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6456 index.
6457 * btrace.h (struct btrace_function): Turn UP into an index.
6458 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6459 as an index.
6460 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6461 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6462 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6463
b54b03bd
TW
64642017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6465
6466 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6467 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6468 ftrace_update_function, ftrace_compute_global_level_offset,
6469 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6470 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6471 btrace_insn_end, btrace_is_empty): Remove references to
6472 btrace_thread_info::begin and btrace_thread_info::end.
6473 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6474 (struct btrace_thread_info) <functions>: Adjust comment.
6475 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6476 btrace_thread_info::begin.
6477
8286623c
TW
64782017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6479
6480 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6481 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6482 ftrace_update_function): Remove arguments that implicitly were always
6483 BTINFO->END.
6484 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6485 Don't pass BTINFO->END.
6486
a0f1b963
TW
64872017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6488
6489 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6490 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6491 btrace_find_insn_by_number): Replace function segment pointer with
6492 index.
6493 (btrace_insn_cmp): Simplify.
6494 * btrace.h: (struct btrace_insn_iterator) Rename index to
6495 insn_index. Replace function segment pointer with index into function
6496 segment vector.
6497 * record-btrace.c (record_btrace_call_history): Replace function
6498 segment pointer use with index.
6499 (record_btrace_frame_sniffer): Retrieve function call segment through
6500 vector.
6501 (record_btrace_set_replay): Remove defunc't safety check.
6502
f158f208
TW
65032017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6504
6505 * btrace.c (btrace_ends_with_single_insn): New function.
6506 (btrace_call_get, btrace_call_number, btrace_call_begin,
6507 btrace_call_end, btrace_call_next, btrace_call_prev,
6508 btrace_find_call_by_number): Use index into call segment vector
6509 instead of pointer.
6510 (btrace_call_cmp): Simplify.
6511 * btrace.h (struct btrace_call_iterator): Replace function call segment
6512 pointer with index into vector.
6513 * record-btrace.c (record_btrace_call_history): Use index instead of
6514 pointer.
6515
521103fd
TW
65162017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6517
6518 * btrace.c (btrace_insn_begin, btrace_insn_end,
6519 btrace_find_insn_by_number): Add btinfo to iterator.
6520 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6521
17b89b34
TW
65222017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6523
6524 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6525 and save pointers directly.
6526 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6527 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6528 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6529 changed signature of functions.
6530 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6531 (btrace_fetch): Remove code that adds btrace_function pointers to
6532 vector of btrace_functions.
6533 (btrace_clear): Simplify freeing vector of btrace_functions.
6534
2b51eddc
TW
65352017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6536
6537 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6538 Replace VEC_* with std::vector functions.
6539 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6540 (struct btrace_thread_info)<functions>: Change type to std::vector.
6541
db6be0d5
SM
65422017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6543
6544 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6545 "Removed targets and native configurations" up. Merge duplicate
6546 "New commands" sub-sections. Add "New options" sub-sections.
6547
b057297a
AH
65482017-05-26 Alan Hayward <alan.hayward@arm.com>
6549
6550 * defs.h (copy_integer_to_size): New declaration.
6551 * findvar.c (copy_integer_to_size): New function.
6552 (do_cint_test): New selftest function.
6553 (copy_integer_to_size_test): Likewise.
6554 (_initialize_findvar): Likewise.
6555 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6556 (mips_fbsd_collect_reg): Use raw_collect_integer.
6557 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6558 (mips64_fill_gregset): Use raw_collect_integer
6559 (mips64_fill_fpregset): Use raw_supply_integer.
6560 * regcache.c (regcache::raw_supply_integer): New function.
6561 (regcache::raw_collect_integer): Likewise.
6562 * regcache.h: (regcache::raw_supply_integer): New declaration.
6563 (regcache::raw_collect_integer): Likewise.
6564
b77b02a5
YQ
65652017-05-24 Yao Qi <yao.qi@linaro.org>
6566
6567 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6568 (COMMON_OBS): Add gdbarch-selftests.o.
6569 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6570 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6571 * gdbarch-selftests.c: New file.
6572 * regcache.h (regcache) <~regcache>: Mark it virtual if
6573 GDB_SELF_TEST.
6574 <raw_write>: Likewise.
6575
e521e87e
YQ
65762017-05-24 Yao Qi <yao.qi@linaro.org>
6577
6578 * regcache.c (current_regcache): Change it to
6579 regcache::current_regcache.
6580 (regcache_observer_target_changed): Update.
6581 (regcache_thread_ptid_changed): Make it a regcache static
6582 method.
6583 (regcache_thread_ptid_changed): Update.
6584 (class regcache_access): New.
6585 (current_regcache_test): Update.
6586 (_initialize_regcache): Update.
6587 * regcache.h: Include forward_list.
6588 (regcache): Declare regcache_thread_ptid_changed and declare
6589 registers_changed_ptid as friend.
6590
d8e07dda
YQ
65912017-05-24 Yao Qi <yao.qi@linaro.org>
6592
6593 * i387-tdep.c (i387_register_to_value): Use register_size
6594 instead of TYPE_LENGTH.
6595 * m68k-tdep.c (m68k_register_to_value): Likewise.
6596
8c8f9122
YQ
65972017-05-24 Yao Qi <yao.qi@linaro.org>
6598
6599 * i387-tdep.c (i387_convert_register_p): Return false if type
6600 code isn't TYPE_CODE_FLT.
6601
68fce50f
YQ
66022017-05-24 Yao Qi <yao.qi@linaro.org>
6603
6604 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6605 length is 4.
6606 (alpha_register_to_value): Remove type length check.
6607 (alpha_value_to_register): Likewise.
6608
88954b49
YQ
66092017-05-24 Yao Qi <yao.qi@linaro.org>
6610
6611 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6612 TYPE_CODE_FLT.
6613
e3ec9b69
YQ
66142017-05-24 Yao Qi <yao.qi@linaro.org>
6615
6616 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6617 TYPE_CODE_FLT or not.
6618
cdd238da
YQ
66192017-05-24 Yao Qi <yao.qi@linaro.org>
6620
6621 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6622 * avr-tdep.c (avr_gdbarch_init): Likewise.
6623 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6624 * cris-tdep.c (cris_gdbarch_init): Likewise.
6625 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6626 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6627 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6628 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6629 * mep-tdep.c (mep_gdbarch_init): Likewise.
6630 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6631 * mips-tdep.c (mips_gdbarch_init): Likewise.
6632 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6633 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6634 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6635 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6636 * v850-tdep.c (v850_gdbarch_init): Likewise.
6637
7a3929c4
YQ
66382017-05-24 Yao Qi <yao.qi@linaro.org>
6639
6640 * selftest-arch.c (tests_with_arch): Call registers_changed
6641 and reinit_frame_cache.
6642 * selftest.c (run_self_tests): Likewise.
6643
f4985dba
YQ
66442017-05-24 Yao Qi <yao.qi@linaro.org>
6645
6646 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6647 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6648
ab20fa4a
YQ
66492017-05-24 Yao Qi <yao.qi@linaro.org>
6650
6651 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6652 set_gdbarch_print_insn.
6653
f532ab94
YQ
66542017-05-24 Yao Qi <yao.qi@linaro.org>
6655
6656 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6657 set_gdbarch_print_insn.
6658
39503f82
YQ
66592017-05-24 Yao Qi <yao.qi@linaro.org>
6660
6661 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6662 set_gdbarch_print_insn.
6663 * arc-tdep.c (arc_gdbarch_init): Likewise.
6664 * arch-utils.c: include dis-asm.h.
6665 (default_print_insn): New function.
6666 * arch-utils.h (default_print_insn): Declare.
6667 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6668 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6669 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6670 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6671 * frv-tdep.c (frv_gdbarch_init): Likewise.
6672 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6673 * gdbarch.sh (print_insn): Use default_print_insn.
6674 * gdbarch.c: Regenerated.
6675 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6676 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6677 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6678 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6679 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6680 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6681 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6682 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6683 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6684 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6685 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6686 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6687 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6688 * mt-tdep.c (mt_gdbarch_init): Likewise.
6689 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6690 * nios2-tdep.c (nios2_print_insn): Remove.
6691 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6692 * rx-tdep.c (rx_gdbarch_init): Likewise.
6693 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6694 * score-tdep.c (score_print_insn): Remove.
6695 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6696 * sh-tdep.c (sh_gdbarch_init): Likewise.
6697 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6698 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6699 * tic6x-tdep.c (tic6x_print_insn): Remove.
6700 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6701 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6702 * v850-tdep.c (v850_gdbarch_init): Likewise.
6703 * vax-tdep.c (vax_gdbarch_init): Likewise.
6704 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6705 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6706
f7241d4f
JB
67072017-05-23 John Baldwin <jhb@FreeBSD.org>
6708
6709 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6710 (MIPS_FP0_REGNUM): Remove.
6711 (MIPS_FSR_REGNUM): Remove.
6712 (mips_fbsd_supply_fpregs): Use mips_regnum.
6713 (mips_fbsd_supply_gregs): Likewise.
6714 (mips_fbsd_collect_fpregs): Likewise.
6715 (mips_fbsd_collect_gregs): Likewise.
6716
d489d81d
JB
67172017-05-23 John Baldwin <jhb@FreeBSD.org>
6718
6719 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6720 (getpfpregs_supplies): New function.
6721 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6722 getfpregs_supplies.
6723 (mips_fbsd_store_inferior_registers): Likewise.
6724
e11b3cdc
PA
67252017-05-22 Pedro Alves <palves@redhat.com>
6726
6727 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6728 maintainer.
6729
0f068fb5
AH
67302017-05-22 Alan Hayward <alan.hayward@arm.com>
6731
6732 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6733 (store_register): Likewise.
6734 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6735 (get_decimal_float_return_value): Likewise.
6736 (do_ppc_sysv_return_value): Likewise.
6737 (ppc64_sysv_abi_push_integer): Likewise.
6738 (ppc64_sysv_abi_push_freg): Likewise.
6739 (ppc64_sysv_abi_return_value_base): Likewise.
6740 (ppc64_sysv_abi_return_value): Likewise.
6741 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6742 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6743 * rs6000-nat.c: Likewise.
6744 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6745 (rs6000_value_to_register): Likewise.
6746 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6747
e6cf65f2
TT
67482017-05-21 Tom Tromey <tom@tromey.com>
6749
6750 PR rust/21466:
6751 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6752 arrays as "[T]", not "[T; ]".
6753
43cc5389
TT
67542017-05-19 Tom Tromey <tom@tromey.com>
6755
6756 PR rust/21484:
6757 * rust-lang.c (exp_descriptor_rust): New function.
6758 (rust_language_defn): Use it.
6759 * p-lang.c (pascal_language_defn): Update.
6760 * opencl-lang.c (opencl_language_defn): Update.
6761 * objc-lang.c (objc_language_defn): Update.
6762 * m2-lang.c (m2_language_defn): Update.
6763 * language.h (struct language_defn)
6764 <la_watch_location_expression>: New member.
6765 * language.c (unknown_language_defn, auto_language_defn)
6766 (local_language_defn): Update.
6767 * go-lang.c (go_language_defn): Update.
6768 * f-lang.c (f_language_defn): Update.
6769 * d-lang.c (d_language_defn): Update.
6770 * c-lang.h (c_watch_location_expression): Declare.
6771 * c-lang.c (c_watch_location_expression): New function.
6772 (c_language_defn, cplus_language_defn, asm_language_defn)
6773 (minimal_language_defn): Use it.
6774 * breakpoint.c (watch_command_1): Call
6775 la_watch_location_expression.
6776 * ada-lang.c (ada_language_defn): Update.
6777
7a6e7fcc
RO
67782017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6779
6e7e1744
RO
6780 PR tui/21482
6781 * gdb_curses.h (NOMACROS): Define.
6782 (NCURSES_NOMACROS): Define.
6783
67842017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6785
6786 PR tui/21482
7a6e7fcc
RO
6787 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6788 arg to char *.
6789 * tui/tui-wingeneral.c (box_win): Likewise.
6790 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6791 (tui_show_source_line): Likewise.
6792 (tui_show_exec_info_content): Likewise.
6793
1933fd8e
VM
67942017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6795
6796 * sparc-tdep.c (sparc_structure_return_p)
6797 (sparc_arg_on_registers_p): New functions.
6798 (sparc32_store_arguments): Use them.
6799 * sparc64-tdep.c (sparc64_16_byte_align_p)
6800 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6801 Handle TYPE_CODE_ARRAY.
6802
21873064
YQ
68032017-05-17 Yao Qi <yao.qi@linaro.org>
6804
6805 * cli/cli-decode.c (add_alias_cmd): New function.
6806 * command.h (add_alias_cmd): Declare.
6807 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6808 instead call add_alias_cmd.
6809
2b351b19
PA
68102017-05-17 Pedro Alves <palves@redhat.com>
6811
6812 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6813 (nat_makefile_frag): ... this. All references updated.
6814 * configure.ac: Likewise.
6815 * configure.nat: Likewise. Enhance comments.
6816 * configure: Regenerate.
6817
5f2ad7a3
RO
68182017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6819
6820 * procfs.c (procfs_create_inferior): Change prototype to match
6821 definition.
6822
adf3dde5
EZ
68232017-05-13 Eli Zaretskii <eliz@gnu.org>
6824
6825 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6826 C++ compiler warning.
6827
6830f270
TT
68282017-05-12 Tom Tromey <tom@tromey.com>
6829
6830 PR rust/21483:
6831 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6832 recurse, just call value_struct_elt directly.
6833
68f2f2e3
TT
68342017-05-12 Tom Tromey <tom@tromey.com>
6835
6836 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6837 OP_RUST_ARRAY>: Fix.
6838
256afbc2
TT
68392017-05-12 Tom Tromey <tom@tromey.com>
6840
6841 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6842
94bb8dfe
YQ
68432017-05-09 Yao Qi <yao.qi@linaro.org>
6844
6845 * regcache.c: Include <forward_list>.
6846 (struct regcache_list): Remove.
6847 (current_regcache): Update.
6848 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6849 (regcache_thread_ptid_changed): Likewise.
6850 (registers_changed_ptid): Likewise.
6851 (current_regcache_size): Likewise.
6852
8248946c
YQ
68532017-05-09 Yao Qi <yao.qi@linaro.org>
6854
6855 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6856 (current_regcache_size): New function.
6857 (current_regcache_test): New function.
6858 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6859
313c5961
AH
68602017-05-08 Alan Hayward <alan.hayward@arm.com>
6861
6862 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6863 (print_gp_register_row): Use get_frame_register_value.
6864
27bfc1d1
AH
68652017-05-08 Alan Hayward <alan.hayward@arm.com>
6866
6867 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6868 (mips_supply_fpregset): Likewise.
6869 (mips64_supply_gregset): Likewise.
6870
146e6c5c
AH
68712017-05-08 Alan Hayward <alan.hayward@arm.com>
6872
6873 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6874 regcache->raw_supply_zeroed.
6875
e50f25ec
SDJ
68762017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6877
6878 * configure.nat: Rearrange 'case' statements to match
6879 host before cpu.
6880
21ea5acd
SDJ
68812017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6882
6883 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6884 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6885 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6886 "@nat_extra_makefile_frag@".
6887 (Makefile): Remove dependency on "@frags@".
6888 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6889 (data-directory/Makefile): Likewise.
6890 * config/aarch64/linux.mh: Deleted; moved contents to
6891 "gdb/configure.nat".
6892 * config/alpha/alpha-linux.mh: Likewise.
6893 * config/alpha/nbsd.mh: Likewise.
6894 * config/arm/linux.mh: Likewise.
6895 * config/arm/nbsdelf.mh: Likewise.
6896 * config/i386/cygwin.mh: Likewise.
6897 * config/i386/cygwin64.mh: Likewise.
6898 * config/i386/darwin.mh: Likewise.
6899 * config/i386/fbsd.mh: Likewise.
6900 * config/i386/fbsd64.mh: Likewise.
6901 * config/i386/go32.mh: Likewise.
6902 * config/i386/i386gnu.mh: Likewise.
6903 * config/i386/i386sol2.mh: Likewise.
6904 * config/i386/linux.mh: Likewise.
6905 * config/i386/linux64.mh: Likewise.
6906 * config/i386/mingw.mh: Likewise.
6907 * config/i386/mingw64.mh: Likewise.
6908 * config/i386/nbsd64.mh: Likewise.
6909 * config/i386/nbsdelf.mh: Likewise.
6910 * config/i386/nto.mh: Likewise.
6911 * config/i386/obsd.mh: Likewise.
6912 * config/i386/obsd64.mh: Likewise.
6913 * config/i386/sol2-64.mh: Likewise.
6914 * config/ia64/linux.mh: Likewise.
6915 * config/m32r/linux.mh: Likewise.
6916 * config/m68k/linux.mh: Likewise.
6917 * config/m68k/nbsdelf.mh: Likewise.
6918 * config/m68k/obsd.mh: Likewise.
6919 * config/m88k/obsd.mh: Likewise.
6920 * config/mips/fbsd.mh: Likewise.
6921 * config/mips/linux.mh: Likewise.
6922 * config/mips/nbsd.mh: Likewise.
6923 * config/mips/obsd64.mh: Likewise.
6924 * config/pa/linux.mh: Likewise.
6925 * config/pa/nbsd.mh: Likewise.
6926 * config/pa/obsd.mh: Likewise.
6927 * config/powerpc/aix.mh: Likewise.
6928 * config/powerpc/fbsd.mh: Likewise.
6929 * config/powerpc/linux.mh: Likewise.
6930 * config/powerpc/nbsd.mh: Likewise.
6931 * config/powerpc/obsd.mh: Likewise.
6932 * config/powerpc/ppc64-linux.mh: Likewise.
6933 * config/powerpc/spu-linux.mh: Likewise.
6934 * config/s390/linux.mh: Likewise.
6935 * config/sh/nbsd.mh: Likewise.
6936 * config/sparc/fbsd.mh: Likewise.
6937 * config/sparc/linux.mh: Likewise.
6938 * config/sparc/linux64.mh: Likewise.
6939 * config/sparc/nbsd64.mh: Likewise.
6940 * config/sparc/nbsdelf.mh: Likewise.
6941 * config/sparc/obsd64.mh: Likewise.
6942 * config/sparc/sol2.mh: Likewise.
6943 * config/tilegx/linux.mh: Likewise.
6944 * config/vax/nbsdelf.mh: Likewise.
6945 * config/vax/obsd.mh: Likewise.
6946 * config/xtensa/linux.mh: Likewise.
6947 * config/i386/i386gnu.mn: New file, with excerpts from
6948 "config/i386/i386gnu.mh".
6949 * configure: Regenerate.
6950 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6951 *.mh files under "gdb/config".
6952 * configure.nat: New file, with contents from the
6953 "gdb/config/*/*.mh" files.
6954
7ed1acaf
TW
69552017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6956
6957 * btrace.c (btrace_clear): Free insn vector.
6958
e13cb306
PA
69592017-05-05 Pedro Alves <palves@redhat.com>
6960
6961 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6962 * configure: Regenerate.
6963
5ed8105e
PA
69642017-05-04 Pedro Alves <palves@redhat.com>
6965
6966 * Makefile.in (SFILES): Add progspace-and-thread.c.
6967 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6968 (COMMON_OBS): Add progspace-and-thread.o.
6969 * breakpoint.c: Include "progspace-and-thread.h".
6970 (update_inserted_breakpoint_locations)
6971 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6972 Use scoped_restore_current_pspace_and_thread.
6973 (create_std_terminate_master_breakpoint): Use
6974 scoped_restore_current_program_space.
6975 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6976 (print_breakpoint_location): Use
6977 scoped_restore_current_program_space.
6978 (bp_loc_is_permanent): Use
6979 scoped_restore_current_pspace_and_thread.
6980 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6981 (download_tracepoint_locations): Use
6982 scoped_restore_current_pspace_and_thread.
6983 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6984 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6985 (enum step_over_calls_kind): Moved from inferior.h.
6986 (class scoped_restore_current_thread): New class.
6987 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6988 declaration.
6989 (scoped_restore_current_thread): New class.
6990 * infcmd.c: Include "common/gdb_optional.h".
6991 (continue_1, proceed_after_attach): Use
6992 scoped_restore_current_thread.
6993 (notice_new_inferior): Use scoped_restore_current_thread.
6994 * inferior.c: Include "progspace-and-thread.h".
6995 (restore_inferior, save_current_inferior): Delete.
6996 (add_inferior_command, clone_inferior_command): Use
6997 scoped_restore_current_pspace_and_thread.
6998 * inferior.h (scoped_restore_current_inferior): New class.
6999 * infrun.c: Include "progspace-and-thread.h" and
7000 "common/gdb_optional.h".
7001 (follow_fork_inferior): Use
7002 scoped_restore_current_pspace_and_thread.
7003 (scoped_restore_exited_inferior): New class.
7004 (handle_vfork_child_exec_or_exit): Use
7005 scoped_restore_exited_inferior,
7006 scoped_restore_current_pspace_and_thread,
7007 scoped_restore_current_thread and scoped_restore.
7008 (fetch_inferior_event): Use scoped_restore_current_thread.
7009 * linespec.c (decode_line_full, decode_line_1): Use
7010 scoped_restore_current_program_space.
7011 * mi/mi-main.c: Include "progspace-and-thread.h".
7012 (exec_continue): Use scoped_restore_current_thread.
7013 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7014 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7015 * proc-service.c (ps_pglobal_lookup): Use
7016 scoped_restore_current_program_space.
7017 * progspace-and-thread.c: New file.
7018 * progspace-and-thread.h: New file.
7019 * progspace.c (release_program_space, clone_program_space): Use
7020 scoped_restore_current_program_space.
7021 (restore_program_space, save_current_program_space)
7022 (save_current_space_and_thread): Delete.
7023 (switch_to_program_space_and_thread): Moved to
7024 progspace-and-thread.c.
7025 * progspace.h (save_current_program_space)
7026 (save_current_space_and_thread): Delete declarations.
7027 (scoped_restore_current_program_space): New class.
7028 * remote.c (remote_btrace_maybe_reopen): Use
7029 scoped_restore_current_thread.
7030 * symtab.c: Include "progspace-and-thread.h".
7031 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7032 * thread.c (print_thread_info_1): Use
7033 scoped_restore_current_thread.
7034 (struct current_thread_cleanup): Delete.
7035 (do_restore_current_thread_cleanup)
7036 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7037 (scoped_restore_current_thread::~scoped_restore_current_thread):
7038 ... this new dtor.
7039 (make_cleanup_restore_current_thread): Rename/convert to ...
7040 (scoped_restore_current_thread::scoped_restore_current_thread):
7041 ... this new ctor.
7042 (thread_apply_all_command): Use scoped_restore_current_thread.
7043 (thread_apply_command): Use scoped_restore_current_thread.
7044 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7045 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7046
f6223dbb
PA
70472017-05-04 Pedro Alves <palves@redhat.com>
7048
7049 * thread.c (make_cleanup_restore_current_thread): Move
7050 find_thread_ptid call before the is_stopped call. Assert that the
7051 thread is found. Replace is_stopped call by checking the thread's
7052 state directly. Remove unnecessary NULL-thread check.
7053
3c3ae77e
PA
70542017-05-04 Pedro Alves <palves@redhat.com>
7055
7056 * corelow.c (thread_section_name): New class.
7057 (get_core_register_section, get_core_siginfo): Use it.
7058
45eba0ab
AA
70592017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
7060
7061 * corelow.c (sniff_core_bfd): Remove extra semicolon.
7062 (get_core_register_section): Remove xfree of NULL pointer.
7063
f81fdd35
AH
70642017-05-03 Alan Hayward <alan.hayward@arm.com>
7065
7066 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7067 * regcache.c (regcache::raw_supply_zeroed): New function.
7068 * regcache.h (regcache::raw_supply_zeroed): New declaration.
7069
35837774
SM
70702017-05-03 Simon Marchi <simon.marchi@ericsson.com>
7071
7072 * gdbarch.sh: Remove commented out definition of
7073 TARGET_CHAR_BIT.
7074 * gdbarch.h: Re-generate.
7075
c94fee56
SDJ
70762017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7077
7078 * configure: Regenerate.
7079
d17f7b36
SM
70802017-05-02 Simon Marchi <simon.marchi@ericsson.com>
7081
7082 * solib-target.c (solib_target_relocate_section_addresses):
7083 Remove num_section_bases, num_bases, segment_bases variables.
7084
b560ebd6
SM
70852017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7086
7087 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7088
f2f46dfc
SM
70892017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7090
7091 * solib-target.c: Include <vector>
7092 (struct lm_info_target) <~lm_info_target>: Remove.
7093 <segment_bases, section_bases>: Change type to
7094 std::vector<CORE_ADDR>.
7095 (library_list_start_segment, library_list_start_section,
7096 library_list_end_library,
7097 solib_target_relocate_section_addresses): Adjust.
7098
a0ff9e1a
SM
70992017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7100
7101 * gdbarch.sh (software_single_step): Change return type to
7102 std::vector<CORE_ADDR>.
7103 * gdbarch.c, gdbarch.h: Re-generate.
7104 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7105 Adjust.
7106 (arm_deal_with_atomic_sequence_raw): Adjust.
7107 (thumb_get_next_pcs_raw): Adjust.
7108 (arm_get_next_pcs_raw): Adjust.
7109 (arm_get_next_pcs): Adjust.
7110 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7111 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7112 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7113 (alpha_software_single_step): Adjust.
7114 * alpha-tdep.h (alpha_software_single_step): Adjust.
7115 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7116 * arm-tdep.c (arm_software_single_step): Adjust.
7117 (arm_breakpoint_kind_from_current_state): Adjust.
7118 * arm-tdep.h (arm_software_single_step): Adjust.
7119 * breakpoint.c (insert_single_step_breakpoint): Adjust.
7120 * cris-tdep.c (cris_software_single_step): Adjust.
7121 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7122 (micromips_deal_with_atomic_sequence): Adjust.
7123 (deal_with_atomic_sequence): Adjust.
7124 (mips_software_single_step): Adjust.
7125 * mips-tdep.h (mips_software_single_step): Adjust.
7126 * moxie-tdep.c (moxie_software_single_step): Adjust.
7127 * nios2-tdep.c (nios2_software_single_step): Adjust.
7128 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7129 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7130 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7131 * s390-linux-tdep.c (s390_software_single_step): Adjust.
7132 * sparc-tdep.c (sparc_software_single_step): Adjust.
7133 * spu-tdep.c (spu_software_single_step): Adjust.
7134 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7135
ea480a30
SM
71362017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7137
7138 * gdbarch.sh: Use semi-colon as field separator instead of colon.
7139 * gdbarch.h: Re-generate.
7140
d050f7d7
TW
71412017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7142
7143 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7144 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7145 * python/py-instruction.c, python/py-instruction.h: New file.
7146 * python/py-record.c: Add py-instruction.h include.
7147 (gdbpy_initialize_record): Make gdb.Instruction a super class of
7148 gdb.RecordInstruction.
7149 * python/python-internal.h: Add gdbpy_initialize_instruction
7150 declaration.
7151 * python/python.c (do_start_initialization): Add
7152 gdbpy_initialize_instruction.
7153
14f819c8
TW
71542017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7155
7156 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7157 Remove.
7158 (btrace_func_from_recpy_func): New function.
7159 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7160 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7161 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7162 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7163 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7164 Also, use new helper functions.
7165 (btpy_list_item): Use new helper functions.
7166 (recpy_bt_function_call_history): Use new type name.
7167 (btpy_call_getset): Remove.
7168 (gdbpy_initialize_btrace): Remove code to initialize
7169 gdb.BtraceFunctionCall.
7170 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7171 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7172 recpy_bt_func_prev, recpy_bt_func_next): New export.
7173 * python/py-record.c (recpy_func_type): New static object.
7174 (recpy_func_new, recpy_func_level, recpy_func_symbol,
7175 recpy_func_instructions, recpy_func_up, recpy_func_prev,
7176 recpy_func_next): New function.
7177 (recpy_element_hash, recpy_element_richcompare): Updated comment.
7178 (recpy_func_getset): New static object.
7179 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7180 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7181
0ed5da75
TW
71822017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7183
7184 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7185 (btpy_object, btpy_insn_type, btpy_new): Remove.
7186 (btpy_list_object): Use gdb.RecordInstruction type instead of
7187 gdb.BtraceInstruction type.
7188 (btrace_insn_from_recpy_insn): New function.
7189 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7190 btpy_new.
7191 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7192 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7193 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7194 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7195 instead of btpy_object.
7196 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7197 btpy_insn_data, btpy_insn_decode): Rename to ...
7198 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7199 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7200 recpy_bt_insn_decode): This. Also, use new helper functions.
7201 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7202 recpy_insn_type.
7203 (btpy_insn_getset): Remove.
7204 (gdbpy_initialize_btrace): Remove code to initialize
7205 gdb.BtraceInstruction. Use recpy_element_object.
7206 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7207 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7208 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7209 * python/py-record.c (recpy_insn_type): New static object.
7210 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7211 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7212 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7213 New function.
7214 (recpy_insn_getset): New static object.
7215 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7216 * python/py-record.h (recpy_element_object): New typedef.
7217 (recpy_insn_type, recpy_insn_new): New export.
7218
913aeadd
TW
72192017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7220
7221 * py-record-btrace.c (btpy_insn_new): Removed.
7222 (btpy_insn_or_gap_new): New function.
7223 (btpy_insn_error): Removed.
7224 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7225 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7226 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7227 btpy_insn_or_gap_new instead of btpy_insn_new.
7228 (btpy_insn_getset): Remove btpy_insn_error.
7229 * py-record.c (recpy_gap_type): New static object.
7230 (recpy_gap_object): New typedef.
7231 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7232 recpy_gap_reason_string): New function.
7233 (recpy_gap_getset): New static object.
7234 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7235 * py-record.h (recpy_gap_new): New export.
7236
a3be24ad
TW
72372017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7238
7239 * python/py-record.c (recpy_ptid): Remove.
7240 (recpy_record_getset): Remove recpy_ptid.
7241
ae20e79a
TW
72422017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7243
7244 * btrace.c (btrace_fetch): Set inferior_ptid.
7245 * python/py-record-btrace.c: Add "py-record.h" include.
7246 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7247 recpy_bt_end, recpy_bt_instruction_history,
7248 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7249 in gdb.Record object instead of current ptid.
7250 * python/py-record.c: Include new "py-record.h" file.
7251 (recpy_record_object): Moved to py-record.h.
7252 * python/py-record.h: New file.
7253
8d0050ea
TW
72542017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7255
7256 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7257 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7258 indentation.
7259
3f380b50
JB
72602017-05-01 Joel Brobecker <brobecker@adacore.com>
7261
7262 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7263 the past maintainers section.
7264
07495424
YQ
72652017-04-28 Yao Qi <yao.qi@linaro.org>
7266
7267 * infcmd.c (get_return_value): Use regcache ctor, and remove
7268 cleanup.
7269
deb1fa3e
YQ
72702017-04-28 Yao Qi <yao.qi@linaro.org>
7271 Pedro Alves <palves@redhat.com>
7272
7273 * regcache.c (regcache::regcache): New tag dispatch ctor.
7274 (do_cooked_read): Moved above.
7275 (regcache_dup): Use the tag dispatch ctor..
7276 * regcache.h (regcache): Declare ctor, delete copy ctor and
7277 assignment operator, remove friend regcache_dup.
7278
b421c83c
YQ
72792017-04-28 Yao Qi <yao.qi@linaro.org>
7280
7281 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7282 call method save instead of regcache_cpy.
7283 * regcache.h (struct regcache): Make regcache_dup a friend.
7284
ef79d9a3
YQ
72852017-04-28 Yao Qi <yao.qi@linaro.org>
7286
7287 * regcache.c (struct regcache): Move to regcache.h
7288 (regcache::arch): New method.
7289 (regcache_get_ptid): Update.
7290 (get_regcache_arch): Call arch method.
7291 (get_regcache_aspace): Call method aspace.
7292 (register_buffer): Change it to method.
7293 (regcache_save): Change it to regcache::save.
7294 (regcache_restore): Likewise.
7295 (regcache_cpy_no_passthrough): Remove the declaration.
7296 (regcache_cpy): Call methods restore and cpy_no_passthrough.
7297 (regcache_cpy_no_passthrough): Change it to method
7298 cpy_no_passthrough.
7299 (regcache_register_status): Change it to method
7300 get_register_status.
7301 (regcache_invalidate): Change it to method invalidate.
7302 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7303 (regcache_raw_update): Change it to method raw_update.
7304 (regcache_raw_read): Likewise.
7305 (regcache_raw_read_signed): Likewise.
7306 (regcache_raw_read_unsigned): Likewise.
7307 (regcache_raw_write_signed): Likewise.
7308 (regcache_raw_write_unsigned): Likewise.
7309 (regcache_cooked_read): Likewise.
7310 (regcache_cooked_read_value): Likewise.
7311 (regcache_cooked_read_signed): Likewise.
7312 (regcache_cooked_read_unsigned): Likewise.
7313 (regcache_cooked_write_signed): Likewise.
7314 (regcache_cooked_write_unsigned): Likewise.
7315 (regcache_raw_set_cached_value): Likewise.
7316 (regcache_raw_write): Likewise.
7317 (regcache_cooked_write): Likewise.
7318 (regcache_xfer_part): Likewise.
7319 (regcache_raw_read_part): Likewise.
7320 (regcache_raw_write_part): Likewise.
7321 (regcache_cooked_read_part): Likewise.
7322 (regcache_cooked_write_part): Likewise.
7323 (regcache_raw_supply): Likewise.
7324 (regcache_raw_collect): Likewise.
7325 (regcache_transfer_regset): Likewise.
7326 (regcache_supply_regset): Likewise.
7327 (regcache_collect_regset): Likewise.
7328 (regcache_debug_print_register): Likewise.
7329 (enum regcache_dump_what): Move it to regcache.h.
7330 (regcache_dump): Change it to method dump.
7331 * regcache.h (enum regcache_dump_what): New.
7332 (class regcache): New.
7333 * target.c (target_fetch_registers): Call method
7334 debug_print_register.
7335 (target_store_registers): Likewise.
7336
f8fdb78e
SM
73372017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7338
7339 * windows-nat.c (struct lm_info_windows): Initialize field.
7340 (windows_make_so): Allocate lm_info_windows with new.
7341 (windows_free_so): Free lm_info_windows with delete.
7342
9ccbfd7b
SM
73432017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7344
7345 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7346 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7347 cleanup.
7348 (darwin_free_so): Free lm_info_darwin with delete.
7349
76e75227
SM
73502017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7351
7352 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7353 <l_addr_p>: Change type to bool.
7354 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7355 (svr4_free_so): Free lm_info_svr4 with delete.
7356 (svr4_copy_library_list): Replace memcpy with call to copy
7357 constructor.
7358 (library_list_start_library, svr4_default_sos): Allocate
7359 lm_info_svr4 with new.
7360
51046d9e
SM
73612017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7362
7363 * solib-target.c (struct lm_info_target): Add destructor,
7364 initialize fields.
7365 <name>: Change type to std::string.
7366 (library_list_start_library): Allocate lm_info_target with new.
7367 (solib_target_free_library_list): Free lm_info_target with
7368 delete.
7369 (solib_target_current_sos): Adapt to std::string.
7370 (solib_target_free_so): Free lm_info_target with delete.
7371
4023ae76
SM
73722017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7373
7374 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7375 fields.
7376 (frv_current_sos): Allocate lm_info_frv with new.
7377 (frv_relocate_main_executable): Free lm_info_frv with delete,
7378 allocate with new.
7379 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7380
af43057b
SM
73812017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7382
7383 * solib-frv.c (struct lm_info_frv): Fix indentation.
7384
b0911207
SM
73852017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7386
7387 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7388 map field.
7389 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7390 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7391 and allocate with new.
7392 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7393
6c401f72
SM
73942017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7395
7396 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7397 <filename, member_name>: Change type to std::string.
7398 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7399 (library_list_start_library): Allocate lm_info_aix with new.
7400 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7401 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7402 with copy constructor.
7403
d0e449a1
SM
74042017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7405
7406 * solist.h (struct lm_info): Remove.
7407 (struct lm_info_base): New class.
7408 (struct so_list) <lm_info>: Change type to lm_info_base *.
7409 * nto-tdep.c (struct lm_info): Remove.
7410 (lm_addr): Adjust.
7411 * solib-aix.c (struct lm_info): Rename to ...
7412 (struct lm_info_aix): ... this. Extend lm_info_base.
7413 (lm_info_p): Rename to ...
7414 (lm_info_aix_p): ... this, and adjust.
7415 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7416 solib_aix_parse_libraries, library_list_start_library,
7417 solib_aix_free_library_list, solib_aix_parse_libraries,
7418 solib_aix_get_library_list,
7419 solib_aix_relocate_section_addresses, solib_aix_free_so,
7420 solib_aix_get_section_offsets,
7421 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7422 Adjust.
7423 (struct solib_aix_inferior_data) <library_list>: Adjust.
7424 * solib-darwin.c (struct lm_info): Rename to ...
7425 (struct lm_info_darwin): ... this. Extend lm_info_base.
7426 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7427 * solib-dsbt.c (struct lm_info): Rename to ...
7428 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7429 (struct dsbt_info) <main_executable_lm_info): Adjust.
7430 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7431 dsbt_relocate_section_addresses): Adjust.
7432 * solib-frv.c (struct lm_info): Rename to ...
7433 (struct lm_info_frv): ... this. Extend lm_info_base.
7434 (main_executable_lm_info): Adjust.
7435 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7436 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7437 find_canonical_descriptor_in_load_object,
7438 frv_fdpic_find_canonical_descriptor): Adjust.
7439 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7440 to lm_info_svr4.
7441 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7442 svr4_clear_so, svr4_copy_library_list,
7443 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7444 svr4_current_sos, svr4_fetch_objfile_link_map,
7445 solist_update_incremental): Adjust.
7446 * solib-svr4.h (struct lm_info_svr4): Move here from
7447 solib-svr4.c.
7448 * solib-target.c (struct lm_info): Rename to ...
7449 (struct lm_info_target): ... this. Extend lm_info_base.
7450 (lm_info_p): Rename to ...
7451 (lm_info_target_p): ... this.
7452 (solib_target_parse_libraries, library_list_start_segment,
7453 library_list_start_section, library_list_start_library,
7454 library_list_end_library, solib_target_free_library_list,
7455 solib_target_current_sos, solib_target_free_so,
7456 solib_target_relocate_section_addresses): Adjust.
7457 * windows-nat.c (struct lm_info): Rename to ...
7458 (struct lm_info_windows): ... this. Extend lm_info_base.
7459 (windows_make_so, handle_load_dll, handle_unload_dll,
7460 windows_xfer_shared_libraries): Adjust.
7461
434a4023
SM
74622017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7463
7464 * solib-darwin.c (struct darwin_so_list): Remove.
7465 (darwin_current_sos): Allocate an so_list object instead of a
7466 darwin_so_list, separately allocate an lm_info object.
7467 (darwin_free_so): Free lm_info.
7468
428544e8
JB
74692017-04-28 John Baldwin <jhb@FreeBSD.org>
7470
7471 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7472 with fprintf_filtered.
7473
4621115f
YQ
74742017-04-28 Yao Qi <yao.qi@linaro.org>
7475
7476 * regcache.c (regcache::regcache): New function.
7477 (regcache::~regcache): New function.
7478 (regcache_xmalloc_1): Remove.
7479 (regcache_xmalloc): Call new regcache.
7480 (regcache_xfree): Call delete regcache.
7481 (get_thread_arch_aspace_regcache): Call new regcache.
7482
339053c2
YQ
74832017-04-28 Yao Qi <yao.qi@linaro.org>
7484
7485 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7486 lwp instead of ptid_get_lwp.
7487
7974a605
YQ
74882017-04-28 Yao Qi <yao.qi@linaro.org>
7489
7490 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7491 lwp_info instead of getting from inferior_ptid.
7492
e15c3eb4
KS
74932017-04-27 Keith Seitz <keiths@redhat.com>
7494
7495 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7496 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7497 (CV_CONVERSION_BADNESS): Define.
7498 (rank_one_type): Remove overly restrictive rvalue reference
7499 rank checks.
7500 Add cv-qualifier checks and subranks for type equality.
7501 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7502 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7503 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7504
72bc1d24
SM
75052017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7506
7507 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7508 count when creating the object.
7509
55bcecda
UW
75102017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7511 Ulrich Weigand <uweigand@de.ibm.com>
7512
7513 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7514 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7515 is used in AIX.
7516 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7517 (process_xcoff_symbol): Likewise.
7518 (scan_xcoff_symtab): Likewise.
7519
5c99fcf8
AH
75202017-04-26 Alan Hayward <alan.hayward@arm.com>
7521
7522 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7523 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7524 (ia64_access_reg): Use get_frame_register_unsigned.
7525 (ia64_access_rse_reg): Likewise.
7526 (ia64_libunwind_frame_prev_register): Likewise.
7527
b41c5a85
JW
75282017-04-26 Jiong Wang <jiong.wang@arm.com>
7529
7530 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7531 * gdbarch.c: Regenerated.
7532 * gdbarch.h: Regenerated.
7533 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7534 visibility external.
7535 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7536 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7537 (enum cfa_how_kind): Move to ...
7538 (struct dwarf2_frame_state_reg_info): Likewise.
7539 (struct dwarf2_frame_state): Likewise.
7540 * dwarf2-frame.h: ... here.
7541 (dwarf2_frame_state_alloc_regs): New declaration.
7542 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7543 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7544
c185f580
AH
75452017-04-26 Alan Hayward <alan.hayward@arm.com>
7546
7547 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7548 regcache_raw_read_unsigned.
7549 (xtensa_pseudo_register_write): Likewise.
7550
19c45594
AH
75512017-04-26 Alan Hayward <alan.hayward@arm.com>
7552
7553 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7554 (nds32_pseudo_register_write): Likewise.
7555
4658f12e
YQ
75562017-04-25 Yao Qi <yao.qi@linaro.org>
7557
7558 * regcache.c (struct regcache) <readonly_p>: Change its type
7559 to bool.
7560 (regcache_xmalloc_1): Update parameter type and callers update.
7561
d581dda8
YQ
75622017-04-25 Yao Qi <yao.qi@linaro.org>
7563
7564 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7565 set_gdbarch_wchar_bit.
7566 * arm-tdep.c (arm_gdbarch_init): Likewise.
7567
debed3db
PA
75682017-04-25 Pedro Alves <palves@redhat.com>
7569
7570 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7571 (BothAreRelocatable, memcopy, memmove): Don't define.
7572 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7573 macros.
7574
b0b92aeb
PA
75752017-04-25 Pedro Alves <palves@redhat.com>
7576
7577 * common/common-defs.h: Include "common/poison.h".
7578 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7579 and adjust.
7580 * common/poison.h: New file.
7581 * common/traits.h: Include <type_traits>.
7582 (Not, Or, Requires): New, moved from common/function-view.h.
7583
16c4d54a
PA
75842017-04-25 Pedro Alves <palves@redhat.com>
7585
7586 * breakpoint.h (struct breakpoint): In-class initialize all
7587 fields. Make boolean fields "bool".
7588 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7589 memset call and initializations no longer necessary.
7590
b5c36682
PA
75912017-04-25 Pedro Alves <palves@redhat.com>
7592
7593 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7594 reference.
7595 (pt_btrace_insn): New function.
7596 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7597
5625a286
PA
75982017-04-25 Pedro Alves <palves@redhat.com>
7599
7600 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7601 "base" field and inherit from "bp_location" instead. Add
7602 non-default ctor.
7603 (allocate_location_exception): Use new non-default ctor.
7604 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7605 (init_bp_location): Convert to ...
7606 (bp_location::bp_location): ... this new ctor, and remove memset
7607 call.
7608 (base_breakpoint_allocate_location): Use the new non-default ctor.
7609 * breakpoint.h (bp_location): Now a class. Declare default and
7610 non-default ctors. In-class initialize all members.
7611 (init_bp_location): Remove declaration.
7612
23bcc18f
PA
76132017-04-25 Pedro Alves <palves@redhat.com>
7614
7615 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7616 assignment operator.
7617
e1ba3053
YQ
76182017-04-24 Yao Qi <yao.qi@linaro.org>
7619
7620 * doublest.c (convert_doublest_to_floatformat): Call
7621 floatformat_totalsize_bytes.
7622
10f489e5
TT
76232017-04-22 Tom Tromey <tom@tromey.com>
7624
7625 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7626 ui_out_emit_list.
7627 * stack.c (print_frame): Use ui_out_emit_list.
7628 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7629 ui_out_emit_list.
7630 * mi/mi-main.c (print_one_inferior)
7631 (mi_cmd_data_list_register_names)
7632 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7633 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7634 ui_out_emit_list.
7635 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7636 (mi_output_solib_attribs): Use ui_out_emit_list,
7637 ui_out_emit_tuple.
7638 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7639 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7640 (mi_cmd_stack_list_args, list_args_or_locals): Use
7641 ui_out_emit_list.
7642 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7643 * breakpoint.c (print_solib_event, output_thread_groups): Use
7644 ui_out_emit_list.
7645
0092b74d
TT
76462017-04-22 Tom Tromey <tom@tromey.com>
7647
7648 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7649 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7650 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7651
a14a62dd
TT
76522017-04-22 Tom Tromey <tom@tromey.com>
7653
7654 * tracepoint.c (tvariables_info_1)
7655 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7656
46b9c129
TT
76572017-04-22 Tom Tromey <tom@tromey.com>
7658
7659 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7660 annotate_arg_emitter.
7661 * breakpoint.c (print_mention_watchpoint)
7662 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7663 * annotate.h (struct annotate_arg_emitter): New.
7664
2e783024
TT
76652017-04-22 Tom Tromey <tom@tromey.com>
7666
7667 * record-btrace.c (record_btrace_insn_history)
7668 (record_btrace_insn_history_range, record_btrace_call_history)
7669 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7670 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7671 ui_out_emit_tuple.
7672 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7673 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7674 * skip.c (skip_info): Use ui_out_emit_tuple.
7675 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7676 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7677 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7678 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7679 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7680 ui_out_emit_tuple.
7681 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7682 (output_register, mi_cmd_data_read_memory)
7683 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7684 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7685 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7686 Use ui_out_emit_tuple.
7687 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7688 ui_out_emit_tuple.
7689 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7690 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7691 * linux-thread-db.c (info_auto_load_libthread_db): Use
7692 ui_out_emit_tuple.
7693 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7694 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7695 * disasm.c (do_mixed_source_and_assembly_deprecated)
7696 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7697 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7698 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7699 * breakpoint.c (print_one_breakpoint_location)
7700 (print_one_breakpoint): Use ui_out_emit_tuple.
7701 * auto-load.c (print_script, info_auto_load_cmd): Use
7702 ui_out_emit_tuple.
7703 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7704
9be21bb4
SM
77052017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7706
7707 * thread.c (print_thread_info_1): Remove dead code.
7708
0d4c07af
JK
77092017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7710
7711 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7712 GDB_SELF_TEST.
7713 * arm-tdep.c (selftests::arm_record_test): Likewise.
7714
4daf993d
YQ
77152017-04-21 Yao Qi <yao.qi@linaro.org>
7716
7717 * regcache.c (regcache_restore): Remove argument 2. Replace
7718 argument 3 with regcache. Get register status from
7719 src->register_status and get register contents from
7720 register_buffer (src, regnum).
7721 (regcache_cpy): Update.
7722
a6c21d4a
PA
77232017-04-19 Pedro Alves <palves@redhat.com>
7724
7725 * gdbthread.h (thread): Add missing closing parenthesis in
7726 comment.
7727
3a3fd0fd
PA
77282017-04-19 Pedro Alves <palves@redhat.com>
7729
7730 * common/refcounted-object.h: New file.
7731 * gdbthread.h: Include "common/refcounted-object.h".
7732 (thread_info): Inherit from refcounted_object and add comments.
7733 (thread_info::incref, thread_info::decref)
7734 (thread_info::m_refcount): Delete.
7735 (thread_info::deletable): Use the refcounted_object::refcount()
7736 method.
7737 * inferior.c (current_inferior_): Add comment.
7738 (set_current_inferior): Increment/decrement refcounts.
7739 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7740 not-deletable instead of comparing with the current inferior.
7741 (initialize_inferiors): Increment the initial inferior's refcount.
7742 * inferior.h (struct inferior): Forward declare.
7743 Include "common/refcounted-object.h".
7744 (current_inferior, set_current_inferior): Move declaration to
7745 before struct inferior's definition, and fix comment.
7746 (inferior): Inherit from refcounted_object. Add comments.
7747 * thread.c (switch_to_thread_no_regs): Reference the thread's
7748 inferior pointer directly instead of doing a ptid lookup.
7749 (switch_to_no_thread): New function.
7750 (switch_to_thread(thread_info *)): New function, factored out
7751 from ...
7752 (switch_to_thread(ptid_t)): ... this.
7753 (restore_current_thread): Delete.
7754 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7755 fields, and add 'inf' field.
7756 (do_restore_current_thread_cleanup): Check whether old->inf is
7757 alive instead of looking up an inferior by ptid. Use
7758 switch_to_thread and switch_to_no_thread.
7759 (restore_current_thread_cleanup_dtor): Use old->inf directly
7760 instead of lookup up an inferior by id. Decref the inferior.
7761 Don't restore 'removable'.
7762 (make_cleanup_restore_current_thread): Same the inferior pointer
7763 in old, instead of the inferior number. Incref the inferior.
7764 Don't save/clear 'removable'.
7765
9bcb1f16
PA
77662017-04-19 Pedro Alves <palves@redhat.com>
7767
7768 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7769 unittests/scoped_restore-selftests.c.
7770 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7771 * common/scoped_restore.h (scoped_restore_base): Make "class".
7772 (scoped_restore_base::release): New public method.
7773 (scoped_restore_base::scoped_restore_base): New protected ctor.
7774 (scoped_restore_base::m_saved_var): New protected field.
7775 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7776 scoped_restore_base base class instead of m_saved_var directly.
7777 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7778 (scoped_restore_tmpl::scoped_restore_tmpl(const
7779 scoped_restore_tmpl<T>&)): Likewise.
7780 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7781 method.
7782 (scoped_restore_tmpl::saved_var): New method.
7783 (scoped_restore_tmpl::m_saved_var): Delete.
7784 * inferior.h (inferior::detaching): Now a bool.
7785 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7786 cleanup.
7787 * unittests/scoped_restore-selftests.c: New file.
7788
26fcd539
PA
77892017-04-19 Pedro Alves <palves@redhat.com>
7790
7791 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7792 Re-sort in alphabetic order.
7793
fdd243b0
PA
77942017-04-18 Pedro Alves <palves@redhat.com>
7795
7796 * xml-support.c (obstack_xml_printf): Delete.
7797 * xml-support.h (obstack_xml_printf): Delete.
7798
4895cde2
PA
77992017-04-18 Pedro Alves <palves@redhat.com>
7800
7801 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7802 vdebug, verror, body_text, start_element, end_element, name,
7803 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7804 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7805 is_xinclude>: Make private and add m_ prefix.
7806 (gdb_xml_parser::body_text): New method, based on ...
7807 (gdb_xml_body_text): ... this. Adjust.
7808 (gdb_xml_parser::vdebug): New method, based on ...
7809 (gdb_xml_debug): ... this. Adjust.
7810 (gdb_xml_parser::verror): New method, based on ...
7811 (gdb_xml_error): ... this. Adjust.
7812 (gdb_xml_parser::start_element): New method, based on ...
7813 (gdb_xml_start_element): ... this. Adjust.
7814 (gdb_xml_start_element_wrapper): Defer to
7815 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7816 (gdb_xml_parser::end_element): New method, based on ...
7817 (gdb_xml_end_element_wrapper): ... this. Adjust.
7818 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7819 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7820 (gdb_xml_parser::use_dtd): New method, based on ...
7821 (gdb_xml_use_dtd): ... this. Adjust.
7822 (gdb_xml_parser::parse): New method, based on ...
7823 (gdb_xml_parse): ... this. Adjust.
7824 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7825 (xinclude_start_include): Adjust to call the parser's name method.
7826 (xml_xinclude_default, xml_xinclude_start_doctype)
7827 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7828 method.
7829 (xml_process_xincludes): Adjust to call parser methods.
7830 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7831 declarations.
7832
bd8a901f
PA
78332017-04-18 Pedro Alves <palves@redhat.com>
7834
7835 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7836 gdb::optional<std::string>.
7837 * xml-support.c: Include <string>.
7838 (scope_level::scope_level(scope_level &&))
7839 (scope_level::~scope_level): Delete.
7840 (scope_level::body): Now a std::string.
7841 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7842 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7843 parameter.
7844 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7845 (xinclude_parsing_data::output): Now a std::string reference.
7846 (xinclude_start_include): Adjust.
7847 (xml_xinclude_default): Adjust.
7848 (xml_process_xincludes): Add 'output' parameter, and return bool.
7849 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7850 and return bool.
7851 * xml-tdesc.c: Include <unordered_map> and <string>.
7852 (tdesc_xml_cache): Delete.
7853 (tdesc_xml_cache_s): Delete.
7854 (xml_cache): Now an std::unordered_map.
7855 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7856 (target_fetch_description_xml): Change return type to
7857 gdb::optional<std::string>, and adjust.
7858 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7859 (target_fetch_description_xml): Change return type to
7860 gdb::optional<std::string>.
7861
d35d1958
PA
78622017-04-18 Pedro Alves <palves@redhat.com>
7863
7864 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7865 unittests/optional-selftests.c.
7866 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7867 * unittests/optional-selftests.c: New file.
7868 * unittests/optional/assignment/1.cc: New file.
7869 * unittests/optional/assignment/2.cc: New file.
7870 * unittests/optional/assignment/3.cc: New file.
7871 * unittests/optional/assignment/4.cc: New file.
7872 * unittests/optional/assignment/5.cc: New file.
7873 * unittests/optional/assignment/6.cc: New file.
7874 * unittests/optional/assignment/7.cc: New file.
7875 * unittests/optional/cons/copy.cc: New file.
7876 * unittests/optional/cons/default.cc: New file.
7877 * unittests/optional/cons/move.cc: New file.
7878 * unittests/optional/cons/value.cc: New file.
7879 * unittests/optional/in_place.cc: New file.
7880 * unittests/optional/observers/1.cc: New file.
7881 * unittests/optional/observers/2.cc: New file.
7882
22796e97
PA
78832017-04-18 Pedro Alves <palves@redhat.com>
7884
7885 * common/gdb_optional.h: Include common/traits.h.
7886 (in_place_t): New type.
7887 (in_place): New constexpr variable.
7888 (optional::optional): Remove member initialization of
7889 m_instantiated.
7890 (optional::optional(in_place_t...)): New constructor.
7891 (optional::~optional): Use reset.
7892 (optional::optional(const optional&)): New.
7893 (optional::optional(const optional&&)): New.
7894 (optional::optional(T &)): New.
7895 (optional::optional(T &&)): New.
7896 (operator::operator=(const optional &)): New.
7897 (operator::operator=(optional &&)): New.
7898 (operator::operator= (const T &))
7899 (operator::operator= (T &&))
7900 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7901 (operator::reset): New.
7902 (operator::m_instantiated):: Add in-class initializer.
7903 * common/traits.h: Include <type_traits>.
7904 (struct And): New types.
7905
a7fc9b61
PA
79062017-04-18 Pedro Alves <palves@redhat.com>
7907
7908 * xml-support.c: Include <vector>.
7909 (scope_level::scope_level(const gdb_xml_element *))
7910 (scope_level::scope_level(scope_level&&)): New.
7911 (scope_level::~scope_level): New.
7912 (scope_level_s): Delete.
7913 (gdb_xml_parser::scopes): Now a std::vector.
7914 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7915 Use std::vector.
7916 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7917 scope cleanup code.
7918 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7919 of the scopes member. Use std::vector::emplace_back.
7920
010151c9
PA
79212017-04-18 Pedro Alves <palves@redhat.com>
7922
7923 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7924 a bool.
7925 (gdb_xml_end_element): Change type of first parameter.
7926 (gdb_xml_cleanup): Rename to ...
7927 (gdb_xml_parser::~gdb_xml_parser): ... this.
7928 (gdb_xml_create_parser_and_cleanup): Delete with ...
7929 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7930 to this new ctor.
7931 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7932 using gdb_xml_create_parser_and_cleanup.
7933 (xinclude_parsing_data): Add ctor/dtor.
7934 (xml_xinclude_cleanup): Delete.
7935 (xml_process_xincludes): Create a local xinclude_parsing_data
7936 instead of heap-allocating one. Create a local gdb_xml_parser
7937 instead of heap-allocating one with
7938 gdb_xml_create_parser_and_cleanup.
7939
d56060f0
JB
79402017-04-18 John Baldwin <jhb@FreeBSD.org>
7941
7942 PR threads/20743
7943 * fbsd-nat.c (resume_one_thread_cb): Remove.
7944 (resume_all_threads_cb): Remove.
7945 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7946 iterate_over_threads.
7947
305d16a9
JB
79482017-04-17 Joel Brobecker <brobecker@adacore.com>
7949
7950 * NEWS: Create a new section for the next release branch.
7951 Rename the section of the current branch, now that it has
7952 been cut.
7953
8bb57231
JB
79542017-04-17 Joel Brobecker <brobecker@adacore.com>
7955
7956 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7957 * version.in: Bump version to 8.0.50.DATE-git.
7958
096c92dd
SDJ
79592017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7960
7961 PR gdb/21385
7962 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7963 independently of the host, and fix build breakage on Cygwin.
7964
0550c955
PA
79652017-04-13 Pedro Alves <palves@redhat.com>
7966
7967 * inferior.c (free_inferior): Convert to ...
7968 (inferior::~inferior): ... this dtor.
7969 (inferior::inferior): New ctor, factored out from ...
7970 (add_inferior_silent): ... here. Allocate the inferior with a new
7971 expression.
7972 (delete_inferior): Call delete instead of free_inferior.
7973 * inferior.h (gdb_environ, continuation): Forward declare.
7974 (inferior): Now a class. Add in-class initialization to all
7975 members. Make boolean fields bool, except 'detaching'.
7976 (inferior::inferior): New explicit ctor.
7977 (inferior::~inferior): New.
7978
e3d60dfc
PA
79792017-04-13 Pedro Alves <palves@redhat.com>
7980
7981 * inferior.c (init_inferior_list): Delete.
7982 * inferior.h (init_inferior_list): Delete.
7983
5fd69d0a
PA
79842017-04-13 Pedro Alves <palves@redhat.com>
7985
7986 PR threads/13217
7987 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7988 (top level): Call it twice, with different thread sets.
7989
c6609450
PA
79902017-04-13 Pedro Alves <palves@redhat.com>
7991
7992 * thread.c: Include <algorithm>.
7993 (thread_array_cleanup): Delete.
7994 (scoped_inc_dec_ref): New class.
7995 (live_threads_count): New function.
7996 (set_thread_refcount): Delete.
7997 (tp_array_compar_ascending): Now a bool.
7998 (tp_array_compar): Convert to a std::sort comparison function.
7999 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8000 and live_threads_count.
8001
2a00d7ce
PA
80022017-04-13 Pedro Alves <palves@redhat.com>
8003
8004 * infrun.c (follow_fork_inferior): Also switch the current
8005 inferior.
8006
441d7c93
PA
80072017-04-13 Pedro Alves <palves@redhat.com>
8008
8009 * breakpoint.c (watch_command_1): Save watchpoint-frame info
8010 before calling create_internal_breakpoint.
8011
808480f6
PA
80122017-04-13 Pedro Alves <palves@redhat.com>
8013
8014 * fork-child.c (execv_argv): New class.
8015 (breakup_args): Refactored as ...
8016 (execv_argv::init_for_no_shell): .. this method of execv_argv.
8017 Copy arguments to storage and replace separators with NULL
8018 terminators in place.
8019 (escape_bang_in_quoted_argument): Adjust to return bool.
8020 (execv_argv::execv_argv): New ctor.
8021 (execv_argv::init_for_shell): New method, factored out from
8022 fork_inferior. Don't strdup strings into the vector.
8023 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
8024 Remove free_vector_argv call.
8025
ad3d022a
YQ
80262017-04-13 Yao Qi <yao.qi@linaro.org>
8027
8028 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8029 tdep->rx_psw_type.
8030
e6ddc3bf
YQ
80312017-04-13 Yao Qi <yao.qi@linaro.org>
8032
8033 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8034 * rx-tdep.c (rx_gdbarch_init): Likewise.
8035
bfb8cf90
PA
80362017-04-13 Pedro Alves <palves@redhat.com>
8037
8038 * breakpoint.h (struct breakpoint): Reindent.
8039
f5336ca5
PA
80402017-04-13 Pedro Alves <palves@redhat.com>
8041
8042 * breakpoint.c (bp_location): Rename to ...
8043 (bp_locations): ... this. All references updated.
8044 (bp_location_count): Rename to ...
8045 (bp_locations_count): ... this. All references updated.
8046 (bp_location_placed_address_before_address_max): Rename to ...
8047 (bp_locations_placed_address_before_address_max): ... this. All
8048 references updated.
8049 (bp_location_shadow_len_after_address_max): Rename to ...
8050 (bp_locations_shadow_len_after_address_max): ... this. All
8051 references updated.
8052 (bp_location_compare_addrs): Rename to ...
8053 (bp_locations_compare_addrs): ... this. All references updated.
8054 (bp_location_compare):Rename to ...
8055 (bp_locations_compare): ... this. All references updated.
8056 (bp_location_target_extensions_update): Rename to ...
8057 (bp_locations_target_extensions_update): ... this. All references
8058 updated.
8059
be628ab8
SDJ
80602017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8061
8062 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8063 * common/common.m4: Check headers 'termios.h', 'termio.h' and
8064 'sgtty.h'.
8065 * common/gdb_termios.h: New file, with parts of "terminal.h".
8066 * inflow.c: Include "gdb_termios.h".
8067 * ser-unix.c: Include "gdb_termios.h".
8068 * terminal.h: Move terminal-related defines to
8069 "common/gdb_termios.h".
8070
8e9e35b1
TT
80712017-04-12 Tom Tromey <tom@tromey.com>
8072
8073 * probe.c (parse_probes): Update.
8074 * location.h (delete_event_location): Don't declare.
8075 (event_location_deleter::operator()): Update.
8076 * location.c (event_location_deleter::operator()): Rename from
8077 delete_event_location.
8078 * linespec.h (linespec_result) <location>: Change type to
8079 event_location_up.
8080 * linespec.c (canonicalize_linespec, event_location_to_sals)
8081 (decode_objc): Update.
8082 (linespec_result): Don't call delete_event_location.
8083 * breakpoint.c (create_breakpoints_sal)
8084 (bkpt_probe_create_sals_from_location)
8085 (strace_marker_create_sals_from_location): Update.
8086
16e802b9
TT
80872017-04-12 Tom Tromey <tom@tromey.com>
8088
8089 * linespec.h (struct linespec_result): Add constructor and
8090 destructor.
8091 (init_linespec_result, destroy_linespec_result)
8092 (make_cleanup_destroy_linespec_result): Don't declare.
8093 * linespec.c (init_linespec_result): Remove.
8094 (linespec_result::~linespec_result): Rename from
8095 destroy_linespec_result. Update.
8096 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8097 Remove.
8098 * breakpoint.c (create_breakpoint, break_range_command)
8099 (decode_location_default): Update.
8100 * ax-gdb.c (agent_command_1): Update.
8101
d28cd78a
TT
81022017-04-12 Tom Tromey <tom@tromey.com>
8103
8104 * remote.c (remote_download_tracepoint): Update.
8105 * python/py-breakpoint.c (bppy_get_location): Update.
8106 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8107 (gdbscm_breakpoint_location): Update.
8108 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8109 * breakpoint.h (struct breakpoint) <location, location_range_end>:
8110 Change type to event_location_up.
8111 * breakpoint.c (create_overlay_event_breakpoint)
8112 (create_longjmp_master_breakpoint)
8113 (create_std_terminate_master_breakpoint)
8114 (create_exception_master_breakpoint)
8115 (breakpoint_event_location_empty_p, print_breakpoint_location)
8116 (print_one_breakpoint_location, create_thread_event_breakpoint)
8117 (init_breakpoint_sal, create_breakpoint)
8118 (print_recreate_ranged_breakpoint, break_range_command)
8119 (init_ada_exception_breakpoint, say_where): Update.
8120 (base_breakpoint_dtor): Don't call delete_event_location.
8121 (bkpt_print_recreate, tracepoint_print_recreate)
8122 (dprintf_print_recreate, update_static_tracepoint)
8123 (breakpoint_re_set_default): Update.
8124
711799d5
TT
81252017-04-12 Tom Tromey <tom@tromey.com>
8126
8127 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8128 type of "to_do". Update.
8129 (compute_stack_depth): Use std::vector.
8130
52d214d3
TT
81312017-04-12 Tom Tromey <tom@tromey.com>
8132
8133 * printcmd.c (find_instruction_backward): Use std::vector.
8134
4c404b8b
TT
81352017-04-12 Tom Tromey <tom@tromey.com>
8136
8137 * symfile.c (objfilep): Remove typedef.
8138 (reread_symbols): Use a std::vector.
8139
156d9eab
TT
81402017-04-12 Tom Tromey <tom@tromey.com>
8141
8142 * mi/mi-main.c (exec_direction_forward): Remove.
8143 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8144 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8145 scoped_restore.
8146 * guile/guile.c (guile_repl_command, guile_command)
8147 (gdbscm_execute_gdb_command): Use scoped_restore.
8148 * go-exp.y (go_parse): Use scoped_restore.
8149 * d-exp.y (d_parse): Use scoped_restore.
8150 * cli/cli-decode.c (cmd_func): Use scoped_restore.
8151 * c-exp.y (c_parse): Use scoped_restore.
8152
4d89769a
TT
81532017-04-12 Tom Tromey <tom@tromey.com>
8154
8155 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8156 (mi_parse): Update return type.
8157 (mi_parse_free): Remove.
8158 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8159 (mi_parse::~mi_parse): Rename from mi_parse_free.
8160 (mi_parse_cleanup): Remove.
8161 (mi_parse): Return a unique_ptr. Use new.
8162 * mi/mi-main.c (mi_execute_command): Update.
8163
4b217cc7
TT
81642017-04-12 Tom Tromey <tom@tromey.com>
8165
8166 * location.c (explicit_location_lex_one): Return a
8167 unique_xmalloc_ptr.
8168 (string_to_explicit_location): Update. Remove cleanups.
8169
59d3651b
TT
81702017-04-12 Tom Tromey <tom@tromey.com>
8171
8172 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8173 (compare_value_and_voffset): Change type. Update.
8174 (compute_vtable_size): Change type of "offset_vec".
8175 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
8176 (gnuv3_get_typeid): Remove extraneous declaration.
8177
b24b0d6c
TT
81782017-04-12 Tom Tromey <tom@tromey.com>
8179
8180 * charset.h (wchar_iterator): Fix comment.
8181
80a3b8c5
TT
81822017-04-12 Tom Tromey <tom@tromey.com>
8183
8184 * charset.c (iconv_wrapper): New class.
8185 (cleanup_iconv): Remove.
8186 (convert_between_encodings): Use it.
8187
c83dd867
TT
81882017-04-12 Tom Tromey <tom@tromey.com>
8189
8190 * symfile.h (increment_reading_symtab): Update type.
8191 * symfile.c (decrement_reading_symtab): Remove.
8192 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8193 * psymtab.c (psymtab_to_symtab): Update.
8194 * dwarf2read.c (dw2_instantiate_symtab): Update.
8195
0e8621a0
TT
81962017-04-12 Tom Tromey <tom@tromey.com>
8197
8198 * jit.c (struct jit_reader): Declare separately. Add constructor
8199 and destructor. Change type of "handle".
8200 (loaded_jit_reader): Define separately.
8201 (jit_reader_load): Update. New "new".
8202 (jit_reader_unload_command): Use "delete".
8203 * gdb-dlfcn.h (struct dlclose_deleter): New.
8204 (gdb_dlhandle_up): New typedef.
8205 (gdb_dlopen, gdb_dlsym): Update types.
8206 (gdb_dlclose): Remove.
8207 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8208 (gdb_dlsym): Change type of "handle".
8209 (make_cleanup_dlclose): Remove.
8210 (dlclose_deleter::operator()): Rename from gdb_dlclose.
8211 * compile/compile-c-support.c (load_libcc): Update.
8212
67d89901
TT
82132017-04-12 Tom Tromey <tom@tromey.com>
8214
8215 * symtab.h (find_pcs_for_symtab_line): Change return type.
8216 * symtab.c (find_pcs_for_symtab_line): Change return type.
8217 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8218 type of "vec". Update.
8219 (ltpy_get_pcs_for_line): Update.
8220 * linespec.c (decode_digits_ordinary): Update.
8221
93921405
TT
82222017-04-12 Tom Tromey <tom@tromey.com>
8223
8224 * tracepoint.c (actions_command): Update.
8225 * python/python.c (python_command, python_interactive_command):
8226 Update.
8227 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8228 * guile/guile.c (guile_command): Update.
8229 * defs.h (read_command_lines, read_command_lines_1): Return
8230 command_line_up.
8231 (command_lines_deleter): New struct.
8232 (command_line_up): New typedef.
8233 * compile/compile.c (compile_code_command)
8234 (compile_print_command): Update.
8235 * cli/cli-script.h (get_command_line, copy_command_lines): Return
8236 command_line_up.
8237 (make_cleanup_free_command_lines): Remove.
8238 * cli/cli-script.c (get_command_line, read_command_lines_1)
8239 (copy_command_lines): Return command_line_up.
8240 (while_command, if_command, read_command_lines, define_command)
8241 (document_command): Update.
8242 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8243 Remove.
8244 * breakpoint.h (breakpoint_set_commands): Change type of
8245 "commands".
8246 * breakpoint.c (breakpoint_set_commands): Change type of
8247 "commands". Update.
8248 (do_map_commands_command, update_dprintf_command_list)
8249 (create_tracepoint_from_upload): Update.
8250
ffc2605c
TT
82512017-04-12 Tom Tromey <tom@tromey.com>
8252
8253 * tracepoint.c (scope_info): Update.
8254 * spu-tdep.c (spu_catch_start): Update.
8255 * python/python.c (gdbpy_decode_line): Update.
8256 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8257 * python/py-breakpoint.c (bppy_init): Update.
8258 * probe.c (parse_probes): Update.
8259 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8260 * location.h (event_location_deleter): New struct.
8261 (event_location_up): New typedef.
8262 (new_linespec_location, new_address_location, new_probe_location)
8263 (new_explicit_location, copy_event_location)
8264 (string_to_event_location, string_to_event_location_basic)
8265 (string_to_explicit_location): Update return type.
8266 (make_cleanup_delete_event_location): Remove.
8267 * location.c (new_linespec_location, new_address_location)
8268 (new_probe_location, new_explicit_location, copy_event_location):
8269 Return event_location_up.
8270 (delete_event_location_cleanup)
8271 (make_cleanup_delete_event_location): Remove.
8272 (string_to_explicit_location, string_to_event_location_basic)
8273 (string_to_event_location): Return event_location_up.
8274 * linespec.c (canonicalize_linespec, event_location_to_sals)
8275 (decode_line_with_current_source)
8276 (decode_line_with_last_displayed, decode_objc): Update.
8277 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8278 * completer.c (location_completer): Update.
8279 * cli/cli-cmds.c (edit_command, list_command): Update.
8280 * breakpoint.c (create_overlay_event_breakpoint)
8281 (create_longjmp_master_breakpoint)
8282 (create_std_terminate_master_breakpoint)
8283 (create_exception_master_breakpoint)
8284 (create_thread_event_breakpoint): Update.
8285 (init_breakpoint_sal): Update. Remove some dead code.
8286 (create_breakpoint_sal): Change type of "location". Update.
8287 (create_breakpoints_sal, create_breakpoint, break_command_1)
8288 (dprintf_command, break_range_command, until_break_command)
8289 (init_ada_exception_breakpoint)
8290 (strace_marker_create_sals_from_location)
8291 (update_static_tracepoint, trace_command, ftrace_command)
8292 (strace_command, create_tracepoint_from_upload): Update.
8293 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8294 * ax-gdb.c (agent_command_1): Update.
8295
8f10c932
PA
82962017-04-12 Pedro Alves <palves@redhat.com>
8297
8298 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8299 * configure.tgt: Handle i[34567]86-*-go32* and
8300 i[34567]86-*-msdosdjgpp*.
8301 * i386-tdep.c (i386_svr4_reg_to_regnum):
8302 Make extern.
8303 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8304 i386-go32-tdep.c.
8305 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8306 * i386-go32-tdep.c: New file.
8307 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8308 declarations.
8309
0a31ccfb
SM
83102017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8311
8312 * aix-thread.c (pd_status2str): Change return type to const char *.
8313
e9bb3fbb
PA
83142017-04-12 Pedro Alves <palves@redhat.com>
8315
8316 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8317 calls to set_gdbarch_gnu_triplet_regexp.
8318
53375380
PA
83192017-04-12 Pedro Alves <palves@redhat.com>
8320
8321 PR gdb/21323
8322 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8323 New enum value.
8324 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8325 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8326 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8327 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8328 * gdbarch.h, gdbarch.c: Regenerate.
8329 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8330 gdbarch_wchar_bit and gdbarch_wchar_signed.
8331 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8332 * arm-tdep.c (arm_gdbarch_init): Likewise.
8333 * avr-tdep.c (avr_gdbarch_init): Likewise.
8334 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8335 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8336 * i386-tdep.c (i386_go32_init_abi): Likewise.
8337 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8338 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8339 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8340 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8341 * sh-tdep.c (sh_gdbarch_init): Likewise.
8342 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8343 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8344 * windows-tdep.c (windows_init_abi): Likewise.
8345 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8346
53e710ac
PA
83472017-04-12 Pedro Alves <palves@redhat.com>
8348
8349 PR c++/21323
8350 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8351 cplus_primitive_type_char32_t>: New enum values.
8352 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8353 and cplus_primitive_type_char32_t.
8354 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8355 32, use the archtecture's built-in type for char16_t and char32_t,
8356 respectively. Otherwise, fallback to init_integer_type as before,
8357 but make the type unsigned, and issue a complaint.
8358 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8359
ab0538b8
AH
83602017-04-12 Alan Hayward <alan.hayward@arm.com>
8361
5e0e0422 8362 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
8363 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8364
5430098f
SDJ
83652017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8366
8367 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8368 'const char *'.
8369
7c5ded6a
SDJ
83702017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8371
8372 * common/common-utils.c (free_vector_argv): New function.
8373 * common/common-utils.h: Include <vector>.
8374 (free_vector_argv): New prototype.
8375 * darwin-nat.c (darwin_create_inferior): Rewrite function
8376 prototype in order to constify "exec_file" and accept a
8377 "std::string" for "allargs".
8378 * fork-child.c: Include <vector>.
8379 (breakup_args): Rewrite function, using C++.
8380 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8381 and accept "std::string" for "allargs". Update the code to
8382 calculate "argv" based on "allargs". Update calls to "exec_fun"
8383 and "execvp".
8384 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8385 order to constify "exec_file" and accept a "std::string" for
8386 "allargs".
8387 * go32-nat.c (go32_create_inferior): Likewise.
8388 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8389 * infcmd.c (run_command_1): Constify "exec_file". Use
8390 "std::string" for inferior arguments.
8391 * inferior.h (fork_inferior): Update prototype.
8392 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8393 prototype in order to constify "exec_file" and accept a
8394 "std::string" for "allargs".
8395 * nto-procfs.c (procfs_create_inferior): Likewise.
8396 * procfs.c (procfs_create_inferior): Likewise.
8397 * remote-sim.c (gdbsim_create_inferior): Likewise.
8398 * remote.c (extended_remote_run): Update code to accept
8399 "std::string" as argument.
8400 (extended_remote_create_inferior): Rewrite function prototype in
8401 order to constify "exec_file" and accept a "std::string" for
8402 "allargs".
8403 * rs6000-nat.c (super_create_inferior): Likewise.
8404 (rs6000_create_inferior): Likewise.
8405 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8406 * windows-nat.c (windows_create_inferior): Likewise.
8407
ae0eee42
PA
84082017-04-11 Pedro Alves <palves@redhat.com>
8409
8410 * thread.c: Fix whitespace throughout.
8411
a6acac06
PR
84122017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8413
8414 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8415
64403bd1
AH
84162017-04-11 Alan Hayward <alan.hayward@arm.com>
8417
8418 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8419
a5bef50f
SDJ
84202017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8421
8422 PR gdb/21364
8423 * osdata.c (info_osdata): Check if 'type' is an empty string
8424 instead of NULL.
8425
9295a5a9
PA
84262017-04-10 Pedro Alves <palves@redhat.com>
8427
8428 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8429 (ptid_to_global_thread_id, in_thread_list)
8430 (do_captured_list_thread_ids, set_resumed, set_running)
8431 (set_executing, set_stop_requested, finish_thread_state)
8432 (validate_registers_access, can_access_registers_ptid)
8433 (print_thread_info_1, switch_to_thread)
8434 (do_restore_current_thread_cleanup)
8435 (make_cleanup_restore_current_thread, thread_command)
8436 (thread_name_command): Use operator== instead of ptid_equal.
8437
996812e3
PA
84382017-04-10 Pedro Alves <palves@redhat.com>
8439
8440 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8441 (current_thread_cleanup_chain): Delete.
8442 (restore_current_thread_cleanup_dtor)
8443 (make_cleanup_restore_current_thread): Remove references to
8444 current_thread_cleanup_chain.
8445
845b344f
AH
84462017-04-10 Alan Hayward <alan.hayward@arm.com>
8447
8448 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8449 REG_UNKNOWN.
8450
803bdfe4
YQ
84512017-04-10 Yao Qi <yao.qi@linaro.org>
8452
8453 PR gdb/19942
8454 * gdbthread.h (thread_info::deletable): New method.
8455 (thread_info::incref): New method.
8456 (thread_info::decref): New method.
8457 (thread_info::refcount): Move it to private.
8458 * infrun.c (save_stop_context): Call inc_refcount.
8459 (release_stop_context_cleanup): Likewise.
8460 * thread.c (set_thread_exited): New function.
8461 (init_thread_list): Delete "tp" only it is deletable, otherwise
8462 call set_thread_exited.
8463 (delete_thread_1): Call set_thread_exited.
8464 (current_thread_cleanup) <inferior_pid>: Remove.
8465 <thread>: New field.
8466 (restore_current_thread_ptid_changed): Removed.
8467 (do_restore_current_thread_cleanup): Adjust.
8468 (restore_current_thread_cleanup_dtor): Don't call
8469 find_thread_ptid.
8470 (set_thread_refcount): Use dec_refcount.
8471 (make_cleanup_restore_current_thread): Adjust.
8472 (thread_apply_all_command): Call inc_refcount.
8473 (_initialize_thread): Don't call
8474 observer_attach_thread_ptid_changed.
8475
8c25b497
YQ
84762017-04-10 Yao Qi <yao.qi@linaro.org>
8477
8478 * thread.c (delete_thread_1): Hoist code on marking thread as
8479 exited.
8480
8473b447
SM
84812017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8482
8483 * windows-nat.c (windows_detach): Initialize ptid with
8484 minus_one_ptid.
8485
6670ec13
SM
84862017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8487
8488 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8489
ba2f91bb
AH
84902017-04-07 Alan Hayward <alan.hayward@arm.com>
8491
8492 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8493 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8494 (bfin_pseudo_register_write): Likewise
8495
436252de
SM
84962017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8497
8498 * common/ptid.h (struct ptid): Change to...
8499 (class ptid_t): ... this.
8500 <ptid_t>: New constructors.
8501 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8502 matches>: New methods.
8503 <make_null, make_minus_one>: New static methods.
8504 <pid>: Rename to...
8505 <m_pid>: ...this.
8506 <lwp>: Rename to...
8507 <m_lwp>: ...this.
8508 <tid>: Rename to...
8509 <m_tid>: ...this.
8510 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8511 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8512 as references, move comment to class ptid_t.
8513 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8514 ptid_t static methods.
8515 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8516 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8517 Take ptid arguments as references, implement using ptid_t methods.
8518 * unittests/ptid-selftests.c: New file.
8519 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8520 unittests/ptid-selftests.c.
8521 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8522
0dedf377
TP
85232017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8524
8525 * python/python.c (python_run_simple_file): Cast mode literal to
8526 non-const char pointer as expected by PyFile_FromString.
8527
4e9868d4
SM
85282017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8529
8530 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8531 minus_one_ptid and null_ptid.
8532
9bf2a700
PA
85332017-04-05 Pedro Alves <palves@redhat.com>
8534
8535 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8536 * configure: Regenerate.
8537
a121b7c1
PA
85382017-04-05 Pedro Alves <palves@redhat.com>
8539
8540 * ada-exp.y (yyerror): Constify.
8541 * ada-lang.c (bound_name, get_selections)
8542 (ada_variant_discrim_type)
8543 (ada_variant_discrim_name, ada_value_struct_elt)
8544 (ada_lookup_struct_elt_type, is_unchecked_variant)
8545 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8546 (catch_ada_exception_command_split)
8547 (catch_ada_assert_command_split, catch_assert_command)
8548 (ada_op_name): Constify.
8549 * ada-lang.h (ada_yyerror, get_selections)
8550 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8551 * arc-tdep.c (arc_print_frame_cache): Constify.
8552 * arm-tdep.c (arm_skip_stub): Constify.
8553 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8554 (gen_aggregate_elt_ref): Constify.
8555 * bcache.c (print_bcache_statistics): Constify.
8556 * bcache.h (print_bcache_statistics): Constify.
8557 * break-catch-throw.c (catch_exception_command_1):
8558 * breakpoint.c (struct ep_type_description::description):
8559 Constify.
8560 (add_solib_catchpoint): Constify.
8561 (catch_fork_command_1): Add cast.
8562 (add_catch_command): Constify.
8563 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8564 Constify.
8565 * bsd-uthread.c (bsd_uthread_state): Constify.
8566 * buildsym.c (patch_subfile_names): Constify.
8567 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8568 Constify.
8569 * c-exp.y (yyerror): Constify.
8570 (token::oper): Constify.
8571 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8572 * c-varobj.c (cplus_describe_child): Constify.
8573 * charset.c (find_charset_names): Add cast.
8574 (find_charset_names): Constify array and add const_cast.
8575 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8576 (edit_command): Constify.
8577 * cli/cli-decode.c (lookup_cmd): Constify.
8578 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8579 Constify.
8580 (struct dump_context): Constify.
8581 (add_dump_command, restore_command): Constify.
8582 * cli/cli-script.c (get_command_line): Constify.
8583 * cli/cli-script.h (get_command_line): Constify.
8584 * cli/cli-utils.c (check_for_argument): Constify.
8585 * cli/cli-utils.h (check_for_argument): Constify.
8586 * coff-pe-read.c (struct read_pe_section_data): Constify.
8587 * command.h (lookup_cmd): Constify.
8588 * common/print-utils.c (decimal2str): Constify.
8589 * completer.c (gdb_print_filename): Constify.
8590 * corefile.c (set_gnutarget): Constify.
8591 * cp-name-parser.y (yyerror): Constify.
8592 * cp-valprint.c (cp_print_class_member): Constify.
8593 * cris-tdep.c (cris_register_name, crisv32_register_name):
8594 Constify.
8595 * d-exp.y (yyerror): Constify.
8596 (struct token::oper): Constify.
8597 * d-lang.h (d_yyerror): Constify.
8598 * dbxread.c (struct header_file_location::name): Constify.
8599 (add_old_header_file, add_new_header_file, last_function_name)
8600 (dbx_next_symbol_text, add_bincl_to_list)
8601 (find_corresponding_bincl_psymtab, set_namestring)
8602 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8603 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8604 * defs.h (command_line_input, print_address_symbolic)
8605 (deprecated_readline_begin_hook): Constify.
8606 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8607 Constify.
8608 * event-top.c (handle_line_of_input): Constify and add cast.
8609 * exceptions.c (catch_errors): Constify.
8610 * exceptions.h (catch_errors): Constify.
8611 * expprint.c (print_subexp_standard, op_string, op_name)
8612 (op_name_standard, dump_raw_expression, dump_raw_expression):
8613 * expression.h (op_name, op_string, dump_raw_expression):
8614 Constify.
8615 * f-exp.y (yyerror): Constify.
8616 (struct token::oper): Constify.
8617 (struct f77_boolean_val::name): Constify.
8618 * f-lang.c (f_word_break_characters): Constify.
8619 * f-lang.h (f_yyerror): Constify.
8620 * fork-child.c (fork_inferior): Add cast.
8621 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8622 (new_variant): Constify.
8623 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8624 * gdbarch.c: Regenerate.
8625 * gdbcore.h (set_gnutarget): Constify.
8626 * go-exp.y (yyerror): Constify.
8627 (token::oper): Constify.
8628 * go-lang.h (go_yyerror): Constify.
8629 * go32-nat.c (go32_sysinfo): Constify.
8630 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8631 * guile/scm-cmd.c (cmdscm_function): Constify.
8632 * guile/scm-param.c (pascm_param_value): Constify.
8633 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8634 (h8300sx_register_name): Constify.
8635 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8636 Constify.
8637 * ia64-tdep.c (ia64_register_names): Constify.
8638 * infcmd.c (construct_inferior_arguments): Constify.
8639 (path_command, attach_post_wait): Constify.
8640 * language.c (show_range_command, show_case_command)
8641 (unk_lang_error): Constify.
8642 * language.h (language_defn::la_error)
8643 (language_defn::la_name_of_this): Constify.
8644 * linespec.c (decode_line_2): Constify.
8645 * linux-thread-db.c (thread_db_err_str): Constify.
8646 * lm32-tdep.c (lm32_register_name): Constify.
8647 * m2-exp.y (yyerror): Constify.
8648 * m2-lang.h (m2_yyerror): Constify.
8649 * m32r-tdep.c (m32r_register_names): Constify and make static.
8650 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8651 * m88k-tdep.c (m88k_register_name): Constify.
8652 * macroexp.c (appendmem): Constify.
8653 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8654 (upgrade_type, parse_external, parse_partial_symbols)
8655 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8656 (new_symbol): Constify.
8657 * memattr.c (mem_info_command): Constify.
8658 * mep-tdep.c (register_name_from_keyword): Constify.
8659 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8660 Constify.
8661 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8662 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8663 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8664 cast.
8665 (mi_execute_async_cli_command): Constify.
8666 * mips-tdep.c (mips_register_name): Constify.
8667 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8668 (am33_register_name, am33_2_register_name)
8669 * moxie-tdep.c (moxie_register_names): Constify.
8670 * nat/linux-osdata.c (osdata_type): Constify fields.
8671 * nto-tdep.c (nto_parse_redirection): Constify.
8672 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8673 (lookup_child_selector): Constify.
8674 (objc_methcall::name): Constify.
8675 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8676 (lookup_struct_typedef): Constify.
8677 * objfiles.c (pc_in_section): Constify.
8678 * objfiles.h (pc_in_section): Constify.
8679 * p-exp.y (struct token::oper): Constify.
8680 (yyerror): Constify.
8681 * p-lang.h (pascal_yyerror): Constify.
8682 * parser-defs.h (op_name_standard): Constify.
8683 (op_print::string): Constify.
8684 (exp_descriptor::op_name): Constify.
8685 * printcmd.c (print_address_symbolic): Constify.
8686 * psymtab.c (print_partial_symbols): Constify.
8687 * python/py-breakpoint.c (stop_func): Constify.
8688 (bppy_get_expression): Constify.
8689 * python/py-cmd.c (cmdpy_completer::name): Constify.
8690 (cmdpy_function): Constify.
8691 * python/py-event.c (evpy_add_attribute)
8692 (gdbpy_initialize_event_generic): Constify.
8693 * python/py-event.h (evpy_add_attribute)
8694 (gdbpy_initialize_event_generic): Constify.
8695 * python/py-evts.c (add_new_registry): Constify.
8696 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8697 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8698 * python/py-inferior.c (get_buffer): Add cast.
8699 * python/py-param.c (parm_constant::name): Constify.
8700 * python/py-unwind.c (fprint_frame_id): Constify.
8701 * python/python.c (gdbpy_parameter_value): Constify.
8702 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8703 * remote.c (memory_packet_config::name): Constify.
8704 (show_packet_config_cmd, remote_write_bytes)
8705 (remote_buffer_add_string):
8706 * reverse.c (exec_reverse_once): Constify.
8707 * rs6000-tdep.c (variant::name, variant::description): Constify.
8708 * rust-exp.y (rustyyerror): Constify.
8709 * rust-lang.c (rust_op_name): Constify.
8710 * rust-lang.h (rustyyerror): Constify.
8711 * serial.h (serial_ops::name): Constify.
8712 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8713 (sh_sh3e_register_name, sh_sh2e_register_name)
8714 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8715 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8716 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8717 (sh_sh4al_dsp_register_name): Constify.
8718 * sh64-tdep.c (sh64_register_name): Constify.
8719 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8720 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8721 * stabsread.c (patch_block_stabs, read_type_number)
8722 (ref_map::stabs, ref_add, process_reference)
8723 (symbol_reference_defined, define_symbol, define_symbol)
8724 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8725 (read_one_struct_field, read_struct_fields, read_baseclasses)
8726 (read_tilde_fields, read_struct_type, read_array_type)
8727 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8728 (read_huge_number, read_range_type, read_args, common_block_start)
8729 (find_name_end): Constify.
8730 * stabsread.h (common_block_start, define_symbol)
8731 (process_one_symbol, symbol_reference_defined, ref_add):
8732 * symfile.c (get_section_index, add_symbol_file_command):
8733 * symfile.h (get_section_index): Constify.
8734 * target-descriptions.c (tdesc_type::name): Constify.
8735 (tdesc_free_type): Add cast.
8736 * target.c (find_default_run_target):
8737 (add_deprecated_target_alias, find_default_run_target)
8738 (target_announce_detach): Constify.
8739 (do_option): Constify.
8740 * target.h (add_deprecated_target_alias): Constify.
8741 * thread.c (print_thread_info_1): Constify.
8742 * top.c (deprecated_readline_begin_hook, command_line_input):
8743 Constify.
8744 (init_main): Add casts.
8745 * top.h (handle_line_of_input): Constify.
8746 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8747 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8748 (tfind_command): Rename to ...
8749 (tfind_command_1): ... this and constify.
8750 (tfind_command): New function.
8751 (tfind_end_command, tfind_start_command): Adjust.
8752 (encode_source_string): Constify.
8753 * tracepoint.h (encode_source_string): Constify.
8754 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8755 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8756 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8757 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8758 * tui/tui-win.c (parse_scrolling_args): Constify.
8759 * tui/tui-windata.c (tui_erase_data_content): Constify.
8760 * tui/tui-windata.h (tui_erase_data_content): Constify.
8761 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8762 * tui/tui.c (tui_enable): Add cast.
8763 * utils.c (defaulted_query): Constify.
8764 (init_page_info): Add cast.
8765 (puts_debug, subset_compare): Constify.
8766 * utils.h (subset_compare): Constify.
8767 * varobj.c (varobj_format_string): Constify.
8768 * varobj.h (varobj_format_string): Constify.
8769 * vax-tdep.c (vax_register_name): Constify.
8770 * windows-nat.c (windows_detach): Constify.
8771 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8772 * xml-support.c (gdb_xml_end_element): Constify.
8773 * xml-tdesc.c (tdesc_start_reg): Constify.
8774 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8775 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8776 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8777
995816ba
PA
87782017-04-05 Pedro Alves <palves@redhat.com>
8779
8780 * proc-api.c (struct trans): Constify.
8781 (procfs_note): Constify.
8782 * proc-events.c (struct trans, syscall_table):
8783 * proc-flags.c (struct trans): Constify.
8784 * proc-utils.h (procfs_note): Constify.
8785 * proc-why.c (struct trans): Constify.
8786 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8787 (procfs_detach): Constify.
8788 * sol-thread.c (struct string_map): Constify.
8789 (td_err_string, td_state_string): Constify.
8790
3e83a920
PA
87912017-04-05 Pedro Alves <palves@redhat.com>
8792
8793 * proc-api.c (procfs_filename): Don't initialize
8794 procfs_filename.
8795 (prepare_to_trace): Assume procfs_filename is non-NULL.
8796 (_initialize_proc_api): Give procfs_filename a default value here.
8797
63160a43
PA
87982017-04-05 Pedro Alves <palves@redhat.com>
8799
8800 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8801 'cond_string' parameter.
8802 (extract_exception_regexp): Constify 'string' parameter.
8803 (catch_exception_command_1): Constify.
8804 * breakpoint.c (init_catchpoint)
8805 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8806 parameter.
8807 (ep_parse_optional_if_clause, catch_fork_command_1)
8808 (catch_exec_command_1): Constify.
8809 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8810 parameter.
8811 (ep_parse_optional_if_clause): Constify.
8812 * cli/cli-utils.c (remove_trailing_whitespace)
8813 (check_for_argument): Constify.
8814 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8815 non-const overload.
8816 (check_for_argument): Likewise.
8817
9b2eba3d
PA
88182017-04-05 Pedro Alves <palves@redhat.com>
8819
8820 * event-top.c (command_line_handler): Add cast to execute_command
8821 call.
8822 * record-btrace.c (cmd_record_btrace_bts_start)
8823 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8824 (cmd_record_btrace_start): Add cast to execute_command call.
8825 * record-full.c (record_full_goto_insn):
8826 * record.c (record_start, record_stop): Add cast to
8827 execute_command_to_string calls.
8828 (cmd_record_start): Add cast to execute_command calls.
8829
2adadf51
PA
88302017-04-05 Pedro Alves <palves@redhat.com>
8831
8832 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8833 static inline function.
8834 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8835 array and use gdb_PyArg_ParseTupleAndKeywords.
8836 * python/py-cmd.c (cmdpy_init): Likewise.
8837 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8838 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8839 (infpy_search_memory): Likewise.
8840 * python/py-objfile.c (objfpy_add_separate_debug_file)
8841 (gdbpy_lookup_objfile): Likewise.
8842 * python/py-symbol.c (gdbpy_lookup_symbol)
8843 (gdbpy_lookup_global_symbol): Likewise.
8844 * python/py-type.c (gdbpy_lookup_type): Likewise.
8845 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8846 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8847 Likewise.
8848
0d1f4ceb
PA
88492017-04-05 Pedro Alves <palves@redhat.com>
8850
8851 * python/python-internal.h (gdb_PyGetSetDef): New type.
8852 * python/py-block.c (block_object_getset)
8853 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8854 * python/py-event.c (event_object_getset)
8855 (finish_breakpoint_object_getset): Likewise.
8856 * python/py-inferior.c (inferior_object_getset): Likewise.
8857 * python/py-infthread.c (thread_object_getset): Likewise.
8858 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8859 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8860 * python/py-objfile.c (objfile_getset): Likewise.
8861 * python/py-progspace.c (pspace_getset): Likewise.
8862 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8863 Likewise.
8864 * python/py-record.c (recpy_record_getset): Likewise.
8865 * python/py-symbol.c (symbol_object_getset): Likewise.
8866 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8867 Likewise.
8868 * python/py-type.c (type_object_getset, field_object_getset):
8869 Likewise.
8870 * python/py-value.c (value_object_getset): Likewise.
8871
4d759979
PA
88722017-04-05 Pedro Alves <palves@redhat.com>
8873
8874 * python/python-internal.h (gdb_PyObject_CallMethod)
8875 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8876 New functions.
8877 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8878 (PySys_GetObject, PySys_SetPath): New macros.
8879
fdf9e36f
PA
88802017-04-05 Pedro Alves <palves@redhat.com>
8881
8882 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8883 info_osdata_command.
8884 * osdata.c (info_osdata_command): Rename to ...
8885 (info_osdata): ... this. Constify 'type' parameter, and remove
8886 the 'from_tty' parameter. Accept NULL TYPE.
8887 (info_osdata_command): New function.
8888 * osdata.h (info_osdata_command): Remove declaration.
8889 (info_osdata): New declaration.
8890
9f33b8b7
PA
88912017-04-05 Pedro Alves <palves@redhat.com>
8892
8893 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8894 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8895 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8896 parameter.
8897 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8898 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8899 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8900 parameter.
8901 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8902 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8903 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8904 (mi_cmd_file_list_exec_source_files)
8905 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8906 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8907 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8908 parameter.
8909 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8910 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8911 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8912 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8913 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8914 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8915 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8916 'command' parameter.
8917 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8918 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8919 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8920 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8921 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8922 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8923 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8924 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8925 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8926 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8927 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8928 parameter.
8929 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8930 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8931 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8932 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8933 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8934 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8935 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8936 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8937 (mi_cmd_data_list_changed_registers)
8938 (mi_cmd_data_write_register_values)
8939 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8940 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8941 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8942 (mi_cmd_list_features, mi_cmd_list_target_features)
8943 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8944 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8945 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8946 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8947 (mi_cmd_trace_frame_collected): Constify 'command'
8948 parameter.
8949 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8950 'command' parameter.
8951
67cb5b2d
PA
89522017-04-05 Pedro Alves <palves@redhat.com>
8953
8954 * ada-lang.c (ada_completer_word_break_characters): Now a const
8955 array.
8956 (ada_get_gdb_completer_word_break_characters): Constify.
8957 * completer.c (gdb_completer_command_word_break_characters)
8958 (gdb_completer_file_name_break_characters)
8959 (gdb_completer_quote_characters): Now const arrays.
8960 (get_gdb_completer_quote_characters): Constify.
8961 (set_rl_completer_word_break_characters): New function.
8962 (set_gdb_completion_word_break_characters)
8963 (complete_line_internal): Use it.
8964 * completer.h (get_gdb_completer_quote_characters): Constify.
8965 (set_rl_completer_word_break_characters): Declare.
8966 * f-lang.c (f_word_break_characters): Constify.
8967 * language.c (default_word_break_characters): Constify.
8968 * language.h (language_defn::la_word_break_characters): Constify.
8969 (default_word_break_characters): Constify.
8970 * top.c (init_main): Use set_rl_completer_word_break_characters.
8971
7a114964
PA
89722017-04-05 Pedro Alves <palves@redhat.com>
8973
8974 * aix-thread.c (aix_thread_pid_to_str)
8975 (aix_thread_extra_thread_info): Constify.
8976 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8977 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8978 (bsd_uthread_pid_to_str): Constify.
8979 * corelow.c (core_pid_to_str): Constify.
8980 * darwin-nat.c (darwin_pid_to_str): Constify.
8981 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8982 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8983 Constify.
8984 * gnu-nat.c (gnu_pid_to_str): Constify.
8985 * go32-nat.c (go32_pid_to_str): Constify.
8986 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8987 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8988 * inferior.c (inferior_pid_to_str): Constify.
8989 * linux-nat.c (linux_nat_pid_to_str): Constify.
8990 * linux-tdep.c (linux_core_pid_to_str): Constify.
8991 * linux-thread-db.c (thread_db_pid_to_str)
8992 (thread_db_extra_thread_info): Constify.
8993 * nto-tdep.c (nto_extra_thread_info): Constify.
8994 * nto-tdep.h (nto_extra_thread_info): Constify.
8995 * obsd-nat.c (obsd_pid_to_str): Constify.
8996 * procfs.c (procfs_pid_to_str): Constify.
8997 * ravenscar-thread.c (ravenscar_extra_thread_info)
8998 (ravenscar_pid_to_str): Constify.
8999 * remote-sim.c (gdbsim_pid_to_str): Constify.
9000 * remote.c (remote_threads_extra_info, remote_pid_to_str):
9001 Constify.
9002 * sol-thread.c (solaris_pid_to_str): Constify.
9003 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9004 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9005 * target.c (default_pid_to_str, target_pid_to_str)
9006 (normal_pid_to_str, default_pid_to_str): Constify.
9007 * target.h (target_ops::to_pid_to_str)
9008 (target_ops::to_extra_thread_info): Constify.
9009 (target_pid_to_str, normal_pid_to_str): Constify.
9010 * windows-nat.c (windows_pid_to_str): Constify.
9011 * gdbarch.sh (core_pid_to_str): Constify.
9012 * target-delegates.c: Regenerate.
9013 * gdbarch.h, gdbarch.c: Regenerate.
9014
69bbf465
PA
90152017-04-05 Pedro Alves <palves@redhat.com>
9016
9017 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9018 the memory of the temporary warning_pre_print override.
9019 * utils.c (warning_pre_print): Constify.
9020 * utils.h (warning_pre_print): Constify.
9021
be47f9e8
PA
90222017-04-05 Pedro Alves <palves@redhat.com>
9023
9024 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9025 (shell_command): New function.
9026 (make_command): Use std::string.
9027 (init_cli_cmds): Register shell_command instead of shell_escape.
9028
bde6261a
PA
90292017-04-05 Pedro Alves <palves@redhat.com>
9030
9031 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9032 * tracepoint.c (default_collect): Don't initialize.
9033
b38ef47f
PA
90342017-04-05 Pedro Alves <palves@redhat.com>
9035
9036 * macroexp.c (macro_buffer::shared): Now a bool.
9037 (init_buffer): Update.
9038 (init_shared_buffer): Constify 'addr' parameter.
9039 (substitute_args, expand, macro_expand, macro_expand_next): Remove
9040 casts.
9041
f995bbe8
PA
90422017-04-05 Pedro Alves <palves@redhat.com>
9043
9044 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9045 * disasm.c (set_disassembler_options): Constify local.
9046 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9047
4a596fe2
SDJ
90482017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
9049
9050 PR gdb/21352
9051 * tracefile.c (tsave_command): Fix argument parsing for '-r'
9052 option.
9053
2cad08ea
YQ
90542017-04-05 Yao Qi <yao.qi@linaro.org>
9055
9056 * frame.c (frame_unwind_register_unsigned): Call
9057 frame_unwind_register_value.
9058
55a98976
YQ
90592017-04-05 Yao Qi <yao.qi@linaro.org>
9060
9061 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9062 Use gdb_test_multiple, and don't match anchor.
9063
4ac40124
PA
90642017-04-05 Pedro Alves <palves@redhat.com>
9065
9066 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9067 (Write After Approval): Remove Simon Marchi.
9068
c053b654
PA
90692017-04-05 Pedro Alves <palves@redhat.com>
9070
9071 * common/gdb_optional.h (optional::optional): Make constexpr and
9072 initialize m_dummy.
9073
4c7bf4f9
JB
90742017-04-04 John Baldwin <jhb@FreeBSD.org>
9075
9076 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9077 (amd64fbsd_jmp_buf_reg_offset): Remove.
9078 (amd64fbsd_supply_uthread): Remove function.
9079 (amd64fbsd_collect_uthread): Remove function.
9080 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9081 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9082 (x86_64-*-freebsd*): Remove bsd-uthread.o.
9083 (fbsd-nat.c): Update comment.
9084 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9085 (i386fbsd_jmp_buf_reg_offset): Remove.
9086 (i386fbsd_supply_uthread): Remove function.
9087 (i386fbsd_collect_uthread): Remove function.
9088 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9089
1e1a8bef
JB
90902017-04-04 John Baldwin <jhb@FreeBSD.org>
9091
9092 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9093 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9094 * NEWS: Mention that support for FreeBSD/alpha was removed.
9095 * alpha-fbsd-tdep.c: Delete file.
9096 * config/alpha/fbsd.mh: Delete file.
9097 * configure.host: Delete alpha*-*-freebsd* and
9098 alpha*-*-kfreebsd*-gnu.
9099 * configure.tgt: Delete alpha*-*-freebsd* and
9100 alpha*-*-kfreebsd*-gnu.
9101
49907934
JB
91022017-04-04 John Baldwin <jhb@FreeBSD.org>
9103
9104 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9105 amd64bsd_store_inferior_registers): Use ptid from regcache.
9106
6f77053d
PA
91072017-04-04 Pedro Alves <palves@redhat.com>
9108
9109 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
9110 data fields, make them private and add "m_" prefixes.
9111 (lnp_state_machine::lnp_state_machine): New ctor.
9112 (record_line, check_line_address, handle_set_discriminator)
9113 (handle_set_address, handle_advance_pc, handle_special_opcode)
9114 (handle_advance_line, handle_set_file, handle_negate_stmt)
9115 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9116 (end_sequence, advance_line): New methods.
9117 (m_gdbarch, m_record_lines_p): New fields.
9118 (lnp_reader_state): Delete.
9119 (dwarf_record_line): Rename to ...
9120 (lnp_state_machine::record_line): ... adjust.
9121 (init_lnp_state_machine): Delete.
9122 (lnp_state_machine::lnp_state_machine): New.
9123 (check_line_address): Rename to ...
9124 (lnp_state_machine::check_line_address): This.
9125 (dwarf_decode_lines_1): Remove reference to "reader_state".
9126 Adjust lnp_state_machine having a non-default ctor. Use bool.
9127 State machine internal state manipulation moved to
9128 lnp_state_machine methods.
9129
9c541725
PA
91302017-04-04 Pedro Alves <palves@redhat.com>
9131
9132 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9133 unittests/offset-type-selftests.c.
9134 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9135 * common/offset-type.h: New file.
9136 * common/preprocessor.h: New file.
9137 * common/traits.h: New file.
9138 * common/valid-expr.h: New file.
9139 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
9140 sect_offset and cu_offset strong typedefs throughout.
9141 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9142 typedefs throughout.
9143 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
9144 sect_offset and cu_offset strong typedefs throughout.
9145 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9146 typedefs throughout.
9147 * gdbtypes.h: Include "common/offset-type.h".
9148 (cu_offset): Now an offset type (strong typedef) instead of a
9149 struct.
9150 (sect_offset): Likewise.
9151 (union call_site_parameter_u): Rename "param_offset" field to
9152 "param_cu_off".
9153 * unittests/offset-type-selftests.c: New file.
9154
ecfb656c
PA
91552017-04-04 Pedro Alves <palves@redhat.com>
9156
9157 * common/underlying.h: New file.
9158 * dwarf2read.c: Include "common/gdb_optional.h" and
9159 "common/underlying.h".
9160 (dir_index, file_name_index): New types.
9161 (file_entry): Use them.
9162 (file_entry::include): Use to_underlying.
9163 (line_header::add_file_name): Use dir_index.
9164 (read_formatted_entries): Use gdb::optional. Read form before
9165 writting to file_entry.
9166 (dwarf_decode_line_header): Use dir_index.
9167 (lnp_state_machine::current_file): Use to_underlying.
9168 (lnp_state_machine::file): Change type to file_name_index.
9169 (dwarf_record_line): Use to_underlying.
9170 (init_lnp_state_machine): Use file_name_index.
9171 (dwarf_decode_lines_1): Use dir_index and file_name_index.
9172
d194f1fe
PA
91732017-04-04 Pedro Alves <palves@redhat.com>
9174
9175 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9176 operator bool, has_value and get methods.
9177
fff8551c
PA
91782017-04-04 Pedro Alves <palves@redhat.com>
9179
9180 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9181 fields.
9182 (line_header): Initialize all data fields. Change type of
9183 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9184 Change type of include_dirs to std::vector<const char *>. Remove
9185 num_include_dirs, include_dirs_size. Change type of file_names to
9186 std::vector<file_entry>. Remove num_file_names, file_names_size.
9187 (line_header::line_header): New.
9188 (line_header::add_include_dir, line_header::add_file_name): New
9189 methods.
9190 (line_header::include_dir_at): Remove NULL check.
9191 (line_header::file_name_at): Add const overload.
9192 (line_header_up): New unique_ptr typedef.
9193 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
9194 std::vector. Remove free_line_header call.
9195 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
9196 free_line_header call.
9197 (free_cu_line_header): Delete.
9198 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9199 (setup_type_unit_groups): Use line_header_up instead of cleanups.
9200 Adjust to use std::vector.
9201 (free_line_header): Delete.
9202 (free_line_header_voidp): Use delete.
9203 (add_include_dir): Replace with ...
9204 (line_header::add_include_dir): ... this method. Use std::vector.
9205 (add_file_name): Replace with ...
9206 (line_header::add_file_name): ... this method. Use std::vector.
9207 (add_include_dir_stub): Delete.
9208 (read_formatted_entries): Remove memset.
9209 (dwarf_decode_line_header): Return a line_header_up instead of a
9210 raw pointer. Remove cleanup handling. Pass lambdas to
9211 read_formatted_entries. Adjust to use line_header methods.
9212 (dwarf_decode_lines_1): Adjust to use line_header methods.
9213 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9214 use std::vector.
9215
d62a8ae2
SM
92162017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
9217
9218 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9219 instead of struct ptid.
9220
db3a1dc7
AH
92212017-05-04 Alan Hayward <alan.hayward@arm.com>
9222
9223 * frame.c (get_frame_register_bytes): Unwind using value.
9224 (put_frame_register_bytes): Likewise.
9225
b1b45502
IB
92262017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
9227
9228 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9229 aggregate-like.
9230
ec13808e
JK
92312017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
9232
9233 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9234
12316564
YQ
92352017-03-29 Yao Qi <yao.qi@linaro.org>
9236
9237 * gdbthread.h (struct thread_info): Declare constructor and
9238 destructor. Add some in-class member initializers.
9239 * thread.c (free_thread): Remove.
9240 (init_thread_list): Call delete instead of free_thread.
9241 (new_thread): Call thread_info constructor.
9242 (thread_info::thread_info): New function.
9243 (thread_info::~thread_info): New function.
9244 (delete_thread_1): Call delete instead of free_thread.
9245 (make_cleanup_restore_current_thread): Move tp and frame to
9246 inner block.
9247
fe5f7374
AK
92482017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9249
9250 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9251 (arc_skip_prologue): Likewise.
9252 (arc_make_frame_cache): Likewise.
9253 (arc_pv_get_operand): New function.
9254 (arc_is_in_prologue): Likewise.
9255 (arc_analyze_prologue): Likewise.
9256 (arc_print_frame_cache): Likewise.
9257 (MAX_PROLOGUE_LENGTH): New constant.
9258
eea78757
AK
92592017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9260
9261 * configure.tgt: Add arc-insn.o.
9262 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9263 (dump_arc_instruction_command): New function.
9264 (arc_fprintf_disasm): Likewise.
9265 (arc_disassemble_info): Likewise.
9266 (arc_insn_get_operand_value): Likewise.
9267 (arc_insn_get_operand_value_signed): Likewise.
9268 (arc_insn_get_memory_base_reg): Likewise.
9269 (arc_insn_get_memory_offset): Likewise.
9270 (arc_insn_get_branch_target): Likewise.
9271 (arc_insn_dump): Likewise.
9272 (arc_insn_get_linear_next_pc): Likewise.
9273 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9274 (arc_disassemble_info): Likewise.
9275 (arc_insn_get_branch_target): Likewise.
9276 (arc_insn_get_linear_next_pc): Likewise.
9277 * NEWS: Mention new "maint print arc arc-instruction".
9278
3be78afd
AK
92792017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9280
9281 * arc-tdep (maintenance_print_arc_list): New variable.
9282 (maintenance_print_arc_command): New function.
9283
296ec4fa
AK
92842017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9285
9286 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9287 Add "limm" and "reserved".
9288 (arc_cannot_fetch_register, arc_cannot_store_register): Add
9289 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9290 * arc-tdep.h (arc_regnum): Likewise.
9291
f74f865e
MF
92922017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9293
9294 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9295 for THREADPTR register.
9296 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9297 register.
9298 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9299 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9300 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9301
0d0bf81a
MF
93022017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9303
9304 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9305 registers above gdbarch_num_regs (gdbarch) as privileged in
9306 call0 ABI.
9307
0ce4291e
MF
93082017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9309
9310 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9311 for a single specified register or for all registers in
9312 a0_base..a0_base + C0_NREGS range.
9313 (supply_gregset_reg): Call regcache_raw_supply for a single
9314 specified register or for all registers in a0_base..a0_base +
9315 C0_NREGS range.
9316
c56054f9
MF
93172017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9318
9319 * arch/xtensa.h (C0_NREGS): Add definition.
9320 * xtensa-tdep.c (C0_NREGS): Remove definition.
9321
a4398628
MF
93222017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9323
9324 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9325 Drop xtensa_default_isa initialization.
9326 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9327
8c43009f
PA
93282017-03-27 Pedro Alves <palves@redhat.com>
9329
9330 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9331 (file_entry::include_dir): New method.
9332 (line_header::include_dir_at, line_header::file_name_at): New
9333 methods.
9334 (setup_type_unit_groups, setup_type_unit_groups)
9335 (psymtab_include_file_name): Simplify using the new methods.
9336 (lnp_state_machine) <the_line_header>: New field.
9337 <file>: Add comment.
9338 (lnp_state_machine::current_file): New method.
9339 (dwarf_record_line): Simplify using the new methods.
9340 (init_lnp_state_machine): Initialize the "the_line_header" field.
9341 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9342 Simplify using the new methods.
9343
a7e80b9e
PA
93442017-03-27 Pedro Alves <palves@redhat.com>
9345
9346 * cp-name-parser.y (make_empty): Delete.
9347 (demangler_special, nested_name, ptr_operator, array_indicator)
9348 (direct_declarator, declarator_1): Use fill_comp instead of
9349 make_empty.
9350
21047726
PA
93512017-03-27 Pedro Alves <palves@redhat.com>
9352
9353 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9354 to ATTRIBUTE_PRINTF.
9355 * solib-target.c (library_list_start_list): Print "string" not
9356 "version".
9357 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9358 gdb_xml_error call.
9359
d721ba37
PA
93602017-03-27 Pedro Alves <palves@redhat.com>
9361
9362 * dwarf2read.c (struct file_and_directory): New.
9363 (dwarf2_get_dwz_file): Adjust to use std::string.
9364 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9365 (find_file_and_directory): Adjust to return a file_and_directory
9366 object.
9367 (read_file_scope): Adjust to use file_and_directory. Remove
9368 make_cleanup/do_cleanups calls.
9369 (open_and_init_dwp_file): Adjust to use std::string. Remove
9370 make_cleanup/do_cleanups calls.
9371 * python/python.c (do_start_initialization): Adjust to ldirname
9372 returning a std::string.
9373 * utils.c (ldirname): Now returns a std::string.
9374 * utils.h (ldirname): Change return type to std::string.
9375 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9376 returning a std::string.
9377 * xml-tdesc.c (file_read_description_xml): Likewise.
9378
ed771251
AH
93792017-03-24 Alan Hayward <alan.hayward@arm.com>
9380
9381 * regcache.c (regcache_debug_print_register): New function.
9382 * regcache.h (regcache_debug_print_register): New declaration.
9383 * target.c (debug_print_register): Remove.
9384 (target_fetch_registers): Call regcache_debug_print_register.
9385 (target_store_registers): Likewise.
9386
568c1b9f
PB
93872017-03-24 Pádraig Brady <pbrady@fb.com>
9388
9389 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9390 reference beyond the 'lh->include_dirs' array before accessing to
9391 it.
9392 (psymtab_include_file_name): Likewise.
9393 (dwarf_decode_lines_1): Likewise.
9394 (dwarf_decode_lines): Likewise.
9395 (file_file_name): Likewise.
9396
3e00d44f
SM
93972017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9398
9399 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9400 inferior_ptid.
9401 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9402 ps_lsetfpregs): Likewise.
9403 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9404 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9405 ps_lsetfpregs): Likewise.
9406 * target.c (target_fetch_registers, target_store_registers):
9407 Remove asserts.
9408
077ae656
AH
94092017-03-23 Alan Hayward <alan.hayward@arm.com>
9410
9411 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9412
1e2b521d
YQ
94132017-03-23 Yao Qi <yao.qi@linaro.org>
9414
9415 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9416 (_initialize_aarch64_tdep): Register it.
9417 (aarch64_record_load_store): Handle PRFM instruction.
9418 (aarch64_process_record_test): New function.
9419
33877125
YQ
94202017-03-23 Yao Qi <yao.qi@linaro.org>
9421
9422 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9423 indentation.
9424
a0eef940
YQ
94252017-03-23 Yao Qi <yao.qi@linaro.org>
9426
9427 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9428
3f2a3564
PR
94292017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9430
9431 python/python.c (do_start_initialization): Fix memory leak.
9432
b67aeab0
SM
94332017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9434
9435 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9436 using get_ptrace_pid.
9437 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9438 inferior_ptid.
9439 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9440 inferior_ptid instead of pid.
9441
ffdbe864
YQ
94422017-03-22 Yao Qi <yao.qi@linaro.org>
9443
9444 * aarch64-tdep.c: Wrap locally used classes in anonymous
9445 namespace.
9446 * arm-tdep.c: Likewise.
9447 * linespec.c: Likewise.
9448 * ui-out.c: Likewise.
9449
9d736fbf
JG
94502017-03-22 Jonah Graham <jonah@kichwacoders.com>
9451
9452 PR gdb/19637
9453 * python/lib/gdb/printer/bound_registers.py: Import sys.
9454
3de88e9a
SM
94552017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9456
9457 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9458 windows_thread_info parameter and use it instead of
9459 current_thread.
9460 (windows_fetch_inferior_registers): Don't set current_thread,
9461 pass the thread to do_windows_fetch_inferior_registers. Use
9462 ptid from regcache instead of inferior_ptid.
9463 (do_windows_store_inferior_registers): Add windows_thread_info
9464 parameter and use it instead of current_thread.
9465 (windows_store_inferior_registers): Don't set current_thread,
9466 pass the thread to do_windows_store_inferior_registers. Use
9467 ptid from regcache instead of inferior_ptid.
9468
0e7b8f61
SM
94692017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9470
9471 * ser-mingw.c (ser_windows_raw): Remove reference to
9472 struct serial::current_timeout.
9473
5badf10a
IR
94742017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9475
9476 PR tdep/20928
9477 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9478 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9479 (sparc64_fsr_type): Fix %fsr decoding.
9480
cee59b3f
TW
94812017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9482
9483 * python/py-record-btrace.c (btpy_insn_data): Change return type
9484 for Python 2.
9485
639a9038
SM
94862017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9487
9488 * spu-linux-nat.c (spu_fetch_inferior_registers,
9489 spu_store_inferior_registers): Use ptid from regcache, set and
9490 restore inferior_ptid.
9491 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9492 Likewise.
9493
bcc0c096
SM
94942017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9495
9496 * i386-linux-nat.c (fetch_register, store_register,
9497 i386_linux_fetch_inferior_registers,
9498 i386_linux_store_inferior_registers): Use ptid from regcache.
9499 * ia64-linux-nat.c (ia64_linux_fetch_register,
9500 ia64_linux_store_register): Likewise.
9501 * inf-ptrace.c (inf_ptrace_fetch_register,
9502 inf_ptrace_store_register): Likewise.
9503 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9504 m32r_linux_store_inferior_registers): Likewise.
9505 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9506 m68kbsd_store_inferior_registers): Likewise.
9507 * m68k-linux-nat.c (fetch_register, store_register,
9508 m68k_linux_fetch_inferior_registers,
9509 m68k_linux_store_inferior_registers): Likewise.
9510 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9511 m88kbsd_store_inferior_registers): Likewise.
9512 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9513 mips_fbsd_store_inferior_registers): Likewise.
9514 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9515 mips64_linux_regsets_store_registers): Likewise.
9516 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9517 mipsnbsd_store_inferior_registers): Likewise.
9518 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9519 mips64obsd_store_inferior_registers): Likewise.
9520 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9521 Likewise.
9522 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9523 ppcfbsd_store_inferior_registers): Likewise.
9524 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9525 ppc_linux_store_inferior_registers): Likewise.
9526 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9527 ppcnbsd_store_inferior_registers): Likewise.
9528 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9529 ppcobsd_store_registers): Likewise.
9530 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9531 Likewise.
9532 * ravenscar-thread.c (ravenscar_fetch_registers,
9533 ravenscar_store_registers, ravenscar_prepare_to_store):
9534 Likewise.
9535 * record-btrace.c (record_btrace_fetch_registers,
9536 record_btrace_store_registers, record_btrace_prepare_to_store):
9537 Likewise.
9538 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9539 Lookup inferior using ptid from regcache, instead of
9540 current_inferior.
9541 * remote.c (remote_fetch_registers, remote_store_registers): Use
9542 ptid from regcache.
9543 * rs6000-nat.c (fetch_register, store_register): Likewise.
9544 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9545 s390_linux_store_inferior_registers): Likewise.
9546 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9547 shnbsd_store_inferior_registers): Likewise.
9548 * sol-thread.c (sol_thread_fetch_registers,
9549 sol_thread_store_registers): Likewise.
9550 * sparc-nat.c (sparc_fetch_inferior_registers,
9551 sparc_store_inferior_registers): Likewise.
9552 * tilegx-linux-nat.c (fetch_inferior_registers,
9553 store_inferior_registers): Likewise.
9554 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9555 vaxbsd_store_inferior_registers): Likewise.
9556 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9557 store_xtregs): Likewise.
9558
c0f55cc6
AV
95592017-03-20 Artemiy Volkov <artemiyv@acm.org>
9560
9561 PR gdb/14441
9562 * NEWS: Mention support for rvalue references in GDB and python.
9563 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9564 supports both lvalue and rvalue references.
9565
15c0a2a9
AV
95662017-03-20 Artemiy Volkov <artemiyv@acm.org>
9567
9568 PR gdb/14441
9569 * gdbtypes.c (rank_one_type): Implement overloading
9570 resolution rules regarding rvalue references.
9571
aa006118
AV
95722017-03-20 Artemiy Volkov <artemiyv@acm.org>
9573
9574 PR gdb/14441
9575 * aarch64-tdep.c (aarch64_type_align)
9576 (aarch64_extract_return_value, aarch64_store_return_value): Change
9577 lvalue reference type checks to general reference type checks.
9578 * amd64-tdep.c (amd64_classify): Likewise.
9579 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9580 Likewise.
9581 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9582 (arm_store_return_value): Likewise.
9583 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9584 * c-typeprint.c (c_print_type): Likewise.
9585 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9586 (cplus_number_of_children, cplus_describe_child): Likewise.
9587 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9588 * completer.c (expression_completer): Likewise.
9589 * cp-support.c (make_symbol_overload_list_adl_namespace):
9590 Likewise.
9591 * darwin-nat-info.c (info_mach_region_command): Likewise.
9592 * dwarf2loc.c (entry_data_value_coerce_ref)
9593 (value_of_dwarf_reg_entry): Likewise.
9594 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9595 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9596 Likewise.
9597 * findvar.c (extract_typed_address, store_typed_address):
9598 Likewise.
9599 * gdbtypes.c (rank_one_type): Likewise.
9600 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9601 * infcall.c (value_arg_coerce): Likewise.
9602 * language.c (pointer_type): Likewise.
9603 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9604 Likewise.
9605 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9606 * mn10300-tdep.c (mn10300_type_align): Likewise.
9607 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9608 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9609 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9610 Likewise.
9611 * printcmd.c (print_formatted, x_command): Likewise.
9612 * python/py-type.c (typy_get_composite, typy_template_argument):
9613 Likewise.
9614 * python/py-value.c (valpy_referenced_value)
9615 (valpy_get_dynamic_type, value_has_field): Likewise.
9616 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9617 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9618 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9619 * spu-tdep.c (spu_scalar_value_p): Likewise.
9620 * symtab.c (lookup_symbol_aux): Likewise.
9621 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9622 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9623 Likewise.
9624 * valops.c (value_cast_pointers, value_cast)
9625 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9626 (value_struct_elt, value_struct_elt_bitpos)
9627 (value_find_oload_method_list, find_overload_match)
9628 (value_rtti_indirect_type): Likewise.
9629 * valprint.c (val_print_scalar_type_p, generic_val_print):
9630 Likewise.
9631 * value.c (value_actual_type, value_as_address, unpack_long)
9632 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9633 (coerce_ref): Likewise.
9634 * varobj.c (varobj_get_value_type): Likewise.
9635
3fcf899d
AV
96362017-03-20 Artemiy Volkov <artemiyv@acm.org>
9637
9638 PR gdb/14441
9639 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9640 table of constants.
9641 * python/lib/gdb/command/explore.py: Support exploring values
9642 of rvalue reference types.
9643 * python/lib/gdb/types.py: Implement get_basic_type() for
9644 rvalue reference types.
9645 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9646 constant.
9647 * python/py-value.c (valpy_getitem): Add an rvalue reference
9648 check.
9649 (valpy_reference_value): Add new parameter "refcode".
9650 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9651 New wrappers for valpy_reference_value().
9652 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9653 (gdbpy_invoke_xmethod): Likewise.
9654
4297a3f0
AV
96552017-03-20 Artemiy Volkov <artemiyv@acm.org>
9656
9657 PR gdb/14441
9658 * dwarf2read.c (process_die, read_type_die_1): Handle the
9659 DW_TAG_rvalue_reference_type DIE.
9660 (read_tag_reference_type): Add new parameter "refcode".
9661
e1cb3213
AV
96622017-03-20 Artemiy Volkov <artemiyv@acm.org>
9663
9664 PR gdb/14441
9665 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9666 (c_type_print_modifier, c_type_print_varspec_suffix)
9667 (c_type_print_base): Support printing rvalue reference types.
9668 * c-valprint.c (c_val_print, c_value_print): Support printing
9669 rvalue reference values.
9670
e4347c89
AV
96712017-03-20 Artemiy Volkov <artemiyv@acm.org>
9672
9673 PR gdb/14441
9674 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9675 typename.
9676 * cp-support.c (replace_typedefs): Handle
9677 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9678 * python/py-type.c (typy_lookup_type): Likewise.
9679
53cc15f5
AV
96802017-03-20 Artemiy Volkov <artemiyv@acm.org>
9681
9682 PR gdb/14441
9683 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9684 * parse.c (insert_type): Change assert statement.
9685 (follow_types): Handle rvalue reference types.
9686 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9687 constant.
9688
a65cfae5
AV
96892017-03-20 Artemiy Volkov <artemiyv@acm.org>
9690
9691 PR gdb/14441
9692 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9693 value_ref() interface.
9694 * c-valprint.c (c_value_print): Likewise.
9695 * infcall.c (value_arg_coerce): Likewise.
9696 * python/py-value.c (valpy_reference_value): Likewise.
9697 * valops.c (value_cast, value_reinterpret_cast)
9698 (value_dynamic_cast, typecmp): Likewise.
9699 (value_ref): Parameterize by kind of return value reference type.
9700 * value.h (value_ref): Add new parameter "refcode".
9701
3b224330
AV
97022017-03-20 Artemiy Volkov <artemiyv@acm.org>
9703
9704 PR gdb/14441
9705 * dwarf2read.c (read_tag_reference_type): Use
9706 lookup_lvalue_reference_type() instead of lookup_reference_type().
9707 * eval.c (evaluate_subexp_standard): Likewise.
9708 * f-exp.y: Likewise.
9709 * gdbtypes.c (make_reference_type, lookup_reference_type):
9710 Generalize with rvalue reference types.
9711 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9712 convenience wrappers for lookup_reference_type().
9713 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9714 reference kind parameter.
9715 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9716 wrappers for lookup_reference_type().
9717 * guile/scm-type.c (gdbscm_type_reference): Use
9718 lookup_lvalue_reference_type() instead of lookup_reference_type().
9719 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9720 * parse.c (follow_types): Likewise.
9721 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9722 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9723 Likewise.
9724 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9725 (gdbpy_invoke_xmethod): Likewise.
9726 * stabsread.c: Provide extra argument to make_reference_type()
9727 call.
9728 * valops.c (value_ref, value_rtti_indirect_type): Use
9729 lookup_lvalue_reference_type() instead of lookup_reference_type().
9730
f9aeb8d4
AV
97312017-03-20 Artemiy Volkov <artemiyv@acm.org>
9732
9733 PR gdb/14441
9734 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9735 (TYPE_IS_REFERENCE): New macro.
9736 (struct type): Add rvalue_reference_type field.
9737 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9738
51457a05
MAL
97392017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9740
9741 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9742 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9743 New function definition.
9744 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9745 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9746 New function declaration.
9747 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9748 * mi/mi-interp.h: New file.
9749 * solib.c (info_sharedlibrary_command): Replace for loop with
9750 ALL_SO_LIBS macro
9751 * solib.h (update_solib_list): New function declaration.
9752 (so_list_head): Move macro.
9753 * solist.h (ALL_SO_LIBS): New macro.
9754
e696b3ad
MAL
97552017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9756
9757 * infcmd.c (post_create_inferior): Remove unused argument in
9758 call to solib_add.
9759 * remote.c (remote_start_remote): Likewise.
9760 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9761 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9762 (enable_break): Likewise.
9763 * solib.c (update_solib_list): Remove unused target argument
9764 and its documentation.
9765 (solib_add): Remove unused target argument. Remove unused
9766 argument in call to update_solib_list.
9767 (info_sharedlibrary_command): Remove unused argument in call
9768 to update_solib_list.
9769 (sharedlibrary_command): Remove unused argument in call to
9770 solib_add.
9771 (handle_solib_event): Likewise.
9772 (reload_shared_libraries): Likewise.
9773 * solib.h (solib_add): Remove unused target argument.
9774
dcb84eda
AA
97752017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9776
9777 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9778 (s390_displaced_step_fixup): Cover relative branches with the
9779 default fixup handling. This fixes lack of support for some
9780 relative branch instructions.
9781
d9cb6cdc
SM
97822017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9783
9784 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9785 ptid from regcache.
9786
1afaf9f4
SM
97872017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9788
9789 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9790 i386_darwin_store_inferior_registers): Use ptid from regcache.
9791
aac12e24
SM
97922017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9793
9794 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9795 i386bsd_store_inferior_registers): Use ptid from regcache.
9796
bbe1eef1
SM
97972017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9798
9799 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9800 hppaobsd_store_registers): Use ptid from regcache.
9801
10799020
SM
98022017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9803
9804 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9805 hppanbsd_store_registers): Use ptid from regcache.
9806
00204cf7
SM
98072017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9808
9809 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9810 from regcache. Use get_ptrace_pid.
9811
11a33714
SM
98122017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9813
9814 * corelow.c (get_core_register_section): Use ptid from regcache,
9815 update doc.
9816
317cd492
SM
98172017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9818
9819 * bsd-uthread.c (bsd_uthread_fetch_registers,
9820 bsd_uthread_store_registers): Use ptid from regcache, set and
9821 restore inferior_ptid.
9822
9ac8a7c2
SM
98232017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9824
9825 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9826 fetch_fp_regs, store_register, store_regs, store_fp_register,
9827 store_fp_regs): Use ptid from regcache.
9828
4ac4bb6a
SM
98292017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9830
9831 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9832 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9833 store_vfp_regs): Use ptid from regcache.
9834
9bcbdca8
PA
98352017-03-17 Pedro Alves <palves@redhat.com>
9836
9837 PR remote/21188
9838 * ser-base.c (ser_base_wait_for): Add comment.
9839 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9840 version.
9841 * ser-unix.c (hardwire_raw): Remove reference to
9842 scb->current_timeout.
9843 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9844 (hardwire_ops): Install ser_base_readchar instead of
9845 hardwire_readchar.
9846 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9847 Remove fields.
9848
7503099f
JG
98492017-03-17 Jonah Graham <jonah@kichwacoders.com>
9850
9851 PR gdb/19637
9852 * python/lib/gdb/printer/bound_registers.py: Add support for
9853 Python 3.
9854
7942e96e
AA
98552017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9856
9857 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9858 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9859 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9860 byte_offset to subobj_byte_offset. Fix the handling of
9861 DWARF_VALUE_STACK on big-endian targets when coming via an
9862 implicit pointer.
9863 (dwarf2_evaluate_loc_desc): Adjust call to
9864 dwarf2_evaluate_loc_desc_full.
9865 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9866 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9867
ba14f379
YQ
98682017-03-16 Yao Qi <yao.qi@linaro.org>
9869
9870 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9871 and REVSH instructions.
9872
b121eeb9
YQ
98732017-03-16 Yao Qi <yao.qi@linaro.org>
9874
9875 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9876 (arm_record_test): Declare.
9877 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9878 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9879 align with the manual.
9880 (thumb_record_misc): Adjust the code order to align with the
9881 manual.
9882 (thumb2_record_decode_insn_handler): Fix instruction matching.
9883 (instruction_reader_thumb): New class.
9884 (arm_record_test): New function.
9885
728a7913
YQ
98862017-03-16 Yao Qi <yao.qi@linaro.org>
9887
9888 * arm-tdep.c (abstract_memory_reader): New class.
9889 (instruction_reader): New class.
9890 (extract_arm_insn): Add argument 'reader'. Callers updated.
9891 (decode_insn): Likewise.
9892
34b43320
DE
98932017-03-16 Doug Evans <dje@google.com>
9894
a7c0469f
DE
9895 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9896 member. Change type of TYPE member to SCM. All uses updated.
9897 (lsscm_make_lazy_string_smob): Add assert.
9898 (lsscm_make_lazy_string): Flag bad length values.
9899 (lsscm_elt_type): New function.
9900 (gdbscm_lazy_string_to_value): Rewrite to use
9901 lsscm_safe_lazy_string_to_value.
9902 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9903 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9904 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9905 in incoming type.
9906 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9907 * guile/scm-type.c (tyscm_scm_to_type): New function.
9908
99092017-03-15 Doug Evans <dje@google.com>
9910
34b43320
DE
9911 PR python/17728, python/18439, python/18779
9912 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9913 member. Change type of TYPE member to PyObject *. All uses updated.
9914 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9915 (gdbpy_create_lazy_string_object): Flag bad length values.
9916 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9917 Handle typedefs in incoming type.
9918 (stpy_lazy_string_elt_type): New function.
9919 (gdbpy_extract_lazy_string): Call it.
9920 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9921 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9922 typedefs in incoming type.
9923
a3a5fecc
DE
99242017-03-16 Doug Evans <dje@google.com>
9925
9926 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9927 * guile/scm-type.c (tyscm_scm_to_type): New function.
9928
28f1c605
JW
99292017-03-16 Jiong Wang <jiong.wang@arm.com>
9930
9931 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9932 "ULONGEST" for "skip".
9933
87c336f6
AA
99342017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9935
9936 PR gdb/21220
9937 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9938 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9939 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9940 over ptrace peek/poke until end of buffer or error.
9941
cf81cf60
SM
99422017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9943
9944 * parse.c (length_of_subexp): Make static.
9945 * parser-defs.h (length_of_subexp): Remove.
9946
a379284a
AA
99472017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9948
9949 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9950 as well.
9951
8a6200ba
PA
99522017-03-14 Pedro Alves <palves@redhat.com>
9953
9954 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9955 (main): Use std::unique_ptr. Remove calls to
9956 cp_demangled_name_parse_free.
9957
f79ec206
SM
99582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9959
9960 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9961 alphabsd_store_inferior_registers): Use regcache->ptid instead
9962 of inferior_ptid.
9963
edb5fb00
SM
99642017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9965
9966 * aix-thread.c (aix_thread_fetch_registers,
9967 aix_thread_store_registers): Use regcache->ptid instead of
9968 inferior_ptid.
9969
55119686
SM
99702017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9971
9972 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9973 store_gregs_to_thread, fetch_fpregs_from_thread,
9974 store_fpregs_to_thread): Use regcache->ptid instead of
9975 inferior_ptid.
9976
6a06fbb7
SM
99772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9978
9979 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9980 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9981 instead of inferior_ptid.
9982
c6386875
SM
99832017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9984
9985 * target.c (target_fetch_registers, target_store_registers): Add
9986 assert.
9987
ddaaf0fb
SM
99882017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9989
9990 * regcache.h (regcache_get_ptid): New function.
9991 * regcache.c (regcache_get_ptid): New function.
9992
b9da89d1 99932017-03-13 Mark Wielaard <mark@klomp.org>
9994
9995 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9996
5f4d1085
KS
99972017-03-10 Keith Seitz <keiths@redhat.com>
9998
9999 PR c++/8218
10000 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10001
c65d6b55
PA
100022017-03-08 Pedro Alves <palves@redhat.com>
10003
10004 PR gdb/18360
10005 * infrun.c (start_step_over, do_target_resume, resume)
10006 (restart_threads): Assert we're not resuming a thread that is
10007 meant to be stopped.
10008 (infrun_thread_stop_requested_callback): Delete.
10009 (infrun_thread_stop_requested): If the thread is internally
10010 stopped, queue a pending stop event and clear the thread's
10011 inline-frame state.
10012 (handle_stop_requested): New function.
10013 (handle_syscall_event, handle_inferior_event_1): Use
10014 handle_stop_requested.
10015 (handle_stop_requested): New function.
10016 (handle_signal_stop): Set the thread's stop_signal here instead of
10017 at caller.
10018 (finish_step_over): Clear step over info unconditionally.
10019 (handle_signal_stop): If the user had interrupted the event
10020 thread, consider the stop a random signal.
10021 (handle_signal_stop) <signal arrived while stepping over
10022 breakpoint>: Don't restart threads here.
10023 (stop_waiting): Don't clear step-over info here.
10024
15c22686
PA
100252017-03-08 Pedro Alves <palves@redhat.com>
10026
10027 PR 21206
10028 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10029 goes to argument 2, not 1.
10030
6e5d74e7
PA
100312017-03-08 Pedro Alves <palves@redhat.com>
10032
10033 PR cli/21218
10034 * top.c (gdb_readline_wrapper): Avoid passing NULL to
10035 display_gdb_prompt.
10036 (command_line_input): Add comment.
10037
9753a2f6
PA
100382017-03-08 Pedro Alves <palves@redhat.com>
10039
10040 PR tui/21216
10041 * tui/tui-file.c (tui_file::write): New.
10042 * tui/tui-file.h (tui_file): Override "write".
10043 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10044 factored out from ...
10045 (tui_puts): ... here.
10046 (tui_putc): Use them.
10047 (tui_write): New function.
10048 * tui/tui-io.h (tui_write): Declare.
10049
1672e0d9
SDJ
100502017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
10051
10052 * Makefile.in (SFILES): Replace "environ.c" with
10053 "common/environ.c".
10054 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10055 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
10056 to...
10057 * common/environ.c: ... here.
10058 * environ.h: Moved to...
10059 * common/environ.h: ... here.
10060
f7bb4e3a
PB
100612017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10062
10063 * gdbarch.sh (pstring_ptr): New static function.
10064 (gdbarch_disassembler_options): Use it.
10065 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10066 not valid_disassembler_option->name.
10067 * gdbarch.c: Regenerate.
10068
e45ced6c
PB
100692017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10070
10071 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10072
5f6fd321
PA
100732017-03-07 Pedro Alves <palves@redhat.com>
10074
10075 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10076
6dbb839a 100772017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
10078
10079 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10080 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10081 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 10082 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 10083
d274ecf4
SM
100842017-03-06 Simon Marchi <simon.marchi@ericsson.com>
10085
10086 * xtensa-linux-nat.c (fetch_gregs): Remove const.
10087
df97be55
SM
100882017-03-03 Simon Marchi <simon.marchi@ericsson.com>
10089
10090 * remote.c (remote_add_target_side_commands): Use range-based
10091 for loop.
10092
7d45f3df
YQ
100932017-03-03 Yao Qi <yao.qi@linaro.org>
10094
10095 PR gdb/21165
10096 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10097 value is lazy.
10098 * valprint.c (common_val_print): Likewise.
10099
65b48a81
PB
101002017-02-28 Peter Bergner <bergner@vnet.ibm.com>
10101
10102 * NEWS: Mention new set/show disassembler-options commands.
10103 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10104 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10105 (prospective_options): New static variable.
10106 (gdb_disassembler::gdb_disassembler): Initialize
10107 m_di.disassembler_options.
10108 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10109 (get_disassembler_options): New function.
10110 (set_disassembler_options): Likewise.
10111 (set_disassembler_options_sfunc): Likewise.
10112 (show_disassembler_options_sfunc): Likewise.
10113 (disassembler_options_completer): Likewise.
10114 (_initialize_disasm): Likewise.
10115 * disasm.h (get_disassembler_options): New prototype.
10116 (set_disassembler_options): Likewise.
10117 * gdbarch.sh (gdbarch_disassembler_options): New variable.
10118 (gdbarch_verify_disassembler_options): Likewise.
10119 * gdbarch.c: Regenerate.
10120 * gdbarch.h: Likewise.
10121 * arm-tdep.c (num_disassembly_options): Delete.
10122 (set_disassembly_style): Likewise.
10123 (arm_disassembler_options): New static variable.
10124 (set_disassembly_style_sfunc): Convert short style name into long
10125 option name. Call set_disassembler_options.
10126 (show_disassembly_style_sfunc): New function.
10127 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10128 set_gdbarch_verify_disassembler_options.
10129 (_initialize_arm_tdep): Delete regnames variable and update callers.
10130 (arm_disassembler_options): Initialize.
10131 (disasm_options): New variable.
10132 (num_disassembly_options): Rename from this...
10133 (num_disassembly_styles): ...to this. Compute by scanning through
10134 disasm_options.
10135 (valid_disassembly_styles): Initialize using disasm_options.
10136 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10137 set_arm_regname_option.
10138 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10139 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10140 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10141 set_gdbarch_verify_disassembler_options.
10142 * s390-tdep.c (s390_disassembler_options): New static variable.
10143 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10144 set_gdbarch_verify_disassembler_options.
10145
d538e36d
SM
101462017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10147
10148 * remote.c (remote_add_target_side_condition): Remove "struct"
10149 keyword from range-based for loop.
10150
83621223
SM
101512017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10152
10153 * remote.c (remote_add_target_side_condition): Use range-based
10154 for loop. Update comment.
10155
2123df0e
YQ
101562017-02-27 Yao Qi <yao.qi@linaro.org>
10157
10158 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10159
8e368124
AH
101602017-02-26 Alan Hayward <alan.hayward@arm.com>
10161
10162 * regcache.c (regcache_raw_update): New function.
10163 (regcache_raw_read): Move code to regcache_raw_update.
10164 * regcache.h (regcache_raw_update): New declaration.
10165 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10166
a49dd8dd
JK
101672017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
10168
10169 * dwarf2read.c (create_debug_type_hash_table): Initialize
10170 header.signature and header.type_offset_in_tu.
10171
34e4bae9
PA
101722017-02-24 Pedro Alves <palves@redhat.com>
10173
10174 * symtab.c (make_file_symbol_completion_list_1): Use
10175 add_symtab_completions.
10176
b0e4b369
AH
101772017-02-24 Alan Hayward <alan.hayward@arm.com>
10178
10179 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10180
975c21ab
AH
101812017-02-24 Alan Hayward <alan.hayward@arm.com>
10182
10183 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10184 I386_MAX_REGISTER_SIZE.
10185 (i386_pseudo_register_write): Likewise.
10186 (i386_process_record): Likewise.
10187 * i387-tdep.c (i387_supply_xsave): Likewise.
10188 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10189 (store_register): Likewise.
10190
14bc53a8
PA
101912017-02-23 Pedro Alves <palves@redhat.com>
10192
10193 * ada-lang.c: Include "common/function-view.h".
10194 (ada_iterate_over_symbols): Adjust to use function_view as
10195 callback type.
10196 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10197 (ada_make_symbol_completion_list): Use a lambda.
10198 (ada_exc_search_name_matches): Delete.
10199 (name_matches_regex): New.
10200 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10201 * compile/compile-c-support.c: Include "common/function-view.h".
10202 (print_one_macro): Change prototype to accept a ui_file pointer.
10203 (write_macro_definitions): Use a lambda.
10204 * dwarf2read.c: Include "common/function-view.h".
10205 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10206 (dw2_expand_symtabs_matching): Adjust to use function_view as
10207 callback type.
10208 * language.h: Include "common/function-view.h".
10209 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10210 function_view as callback type.
10211 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10212 * linespec.c: Include "common/function-view.h".
10213 (collect_info::add_symbol): New method.
10214 (struct symbol_and_data_callback, iterate_inline_only, struct
10215 symbol_matcher_data, iterate_name_matcher): Delete.
10216 (iterate_over_all_matching_symtabs): Adjust to use function_view
10217 as callback type and lambdas.
10218 (iterate_over_file_blocks): Adjust to use function_view as
10219 callback type.
10220 (decode_compound_collector): Now a class with private fields.
10221 (decode_compound_collector::release_symbols): New method.
10222 (collect_one_symbol): Rename to...
10223 (decode_compound_collector::operator()): ... this and adjust.
10224 (lookup_prefix_sym): decode_compound_collector construction bits
10225 move to decode_compound_collector ctor. Pass the
10226 decode_compound_collector object directly as callback. Remove
10227 cleanups and use decode_compound_collector::release_symbols
10228 instead.
10229 (symtab_collector): Now a class with private fields.
10230 (symtab_collector::release_symtabs): New method.
10231 (add_symtabs_to_list): Rename to...
10232 (symtab_collector::operator()): ... this and adjust.
10233 (collect_symtabs_from_filename): symtab_collector construction
10234 bits move to symtab_collector ctor. Pass the symtab_collector
10235 object directly as callback. Remove cleanups and use
10236 symtab_collector::release_symtabs instead.
10237 (collect_symbols): Delete.
10238 (add_matching_symbols_to_info): Use lambdas.
10239 * macrocmd.c (print_macro_callback): Delete.
10240 (info_macro_command): Use a lambda.
10241 (info_macros_command): Pass print_macro_definition as callable
10242 directly.
10243 (print_one_macro): Remove 'ignore' parameter.
10244 (macro_list_command): Adjust.
10245 * macrotab.c (macro_for_each_data::fn): Now a function_view.
10246 (macro_for_each_data::user_data): Delete field.
10247 (foreach_macro): Adjust to call the function_view.
10248 (macro_for_each): Adjust to use function_view as callback type.
10249 (foreach_macro_in_scope): Adjust to call the function_view.
10250 (macro_for_each_in_scope): Adjust to use function_view as callback
10251 type.
10252 * macrotab.h: Include "common/function-view.h".
10253 (macro_callback_fn): Declare a prototype instead of a pointer.
10254 Remove "user_data" parameter.
10255 (macro_for_each, macro_for_each_in_scope): Adjust to use
10256 function_view as callback type.
10257 * psymtab.c (partial_map_expand_apply)
10258 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10259 Adjust to use function_view as callback type and to return bool.
10260 (psym_expand_symtabs_matching): Adjust to use function_view as
10261 callback types.
10262 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10263 to use function_view as callback type and to return bool.
10264 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10265 callback types.
10266 * symfile.c (expand_symtabs_matching): Adjust to use function_view
10267 as callback types.
10268 * symfile.h: Include "common/function-view.h".
10269 (expand_symtabs_file_matcher_ftype)
10270 (expand_symtabs_symbol_matcher_ftype)
10271 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10272 return bool.
10273 (quick_symbol_functions::map_symtabs_matching_filename)
10274 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10275 function_view as callback type and return bool.
10276 (expand_symtabs_matching): Adjust to use function_view as callback
10277 type.
10278 (maintenance_expand_name_matcher)
10279 (maintenance_expand_file_matcher): Delete.
10280 (maintenance_expand_symtabs): Use lambdas.
10281 * symtab.c (iterate_over_some_symtabs): Adjust to use
10282 function_view as callback types and return bool.
10283 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
10284 of a cleanup.
10285 (lookup_symtab_callback): Delete.
10286 (lookup_symtab): Use a lambda.
10287 (iterate_over_symbols): Adjust to use function_view as callback
10288 type.
10289 (struct search_symbols_data, search_symbols_file_matches)
10290 (search_symbols_name_matches): Delete.
10291 (search_symbols): Use a pair of lambdas.
10292 (struct add_name_data, add_macro_name, symbol_completion_matcher)
10293 (symtab_expansion_callback): Delete.
10294 (default_make_symbol_completion_list_break_on_1): Use lambdas.
10295 * symtab.h: Include "common/function-view.h".
10296 (iterate_over_some_symtabs): Adjust to use function_view as
10297 callback type and return bool.
10298 (iterate_over_symtabs): Adjust to use function_view as callback
10299 type.
10300 (symbol_found_callback_ftype): Remove 'data' parameter and return
10301 bool.
10302 (iterate_over_symbols): Adjust to use function_view as callback
10303 type.
10304
07e253aa
PA
103052017-02-23 Pedro Alves <palves@redhat.com>
10306
10307 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10308 (%.o) <unittests/%.c>: New pattern.
10309 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10310 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10311 * common/function-view.h: New file.
10312 * unittests/function-view-selftests.c: New file.
10313 * configure: Regenerate.
10314
8eaf5320
SM
103152017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10316
10317 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10318 inferior_ptid.
10319 * go32-nat.c (go32_thread_alive): Likewise.
10320
38768751
YQ
103212017-02-23 Yao Qi <yao.qi@linaro.org>
10322
10323 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10324 delete.
10325
0a8beaba
YQ
103262017-02-23 Yao Qi <yao.qi@linaro.org>
10327
10328 * varobj.c (varobj_clear_saved_item): Use delete instead of
10329 xfree.
10330 (update_dynamic_varobj_children): Likewise.
10331
58fdfd2c
JK
103322017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10333
10334 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10335
1b90b139
SM
103362017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10337
10338 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10339 m_enum_value to 0 in default constructor.
10340
2039d74e
EBM
103412017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10342
10343 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10344 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10345 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10346 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10347 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10348 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10349 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10350 IS_STORE_CONDITIONAL_INSN.
10351
7814882a
JK
103522017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10353
10354 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10355
0ae60b63
JK
103562017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10357
10358 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10359
0224619f
JK
103602017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10361
10362 * dwarf2read.c (skip_one_die, read_attribute_value)
10363 (dwarf2_const_value_attr, dump_die_shallow)
10364 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10365 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10366
0af92d60
JK
103672017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10368
10369 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10370 (dwarf_parse_macro_header): Accept DWARF version 5.
10371 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10372
216f72a1
JK
103732017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10374
10375 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10376 DW_AT_GNU_*.
10377 * common/common-exceptions.h (enum errors): Likewise.
10378 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10379 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10380 (dwarf_expr_context::execute_stack_op): Likewise.
10381 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10382 Likewise.
10383 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10384 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10385 (show_entry_values_debug, call_site_to_target_addr)
10386 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10387 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10388 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10389 (value_of_dwarf_block_entry, indirect_pieced_value)
10390 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10391 (disassemble_dwarf_expression): Likewise.
10392 * dwarf2read.c (process_die, inherit_abstract_dies)
10393 (read_call_site_scope): Likewise.
10394 * gdbtypes.h (struct func_type, struct call_site_parameter)
10395 (struct call_site): Likewise.
10396 * stack.c (read_frame_arg): Likewise.
10397 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10398
43988095
JK
103992017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10400
10401 * defs.h (read_unsigned_leb128): New declaration.
10402 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10403 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10404 (dwarf2_find_location_expression): Call also
10405 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10406 * dwarf2loc.h (dwarf2_version): New declaration.
10407 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10408 rnglists.
10409 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10410 .debug_rnglists.
10411 (struct dwop_section_names): Add loclists_dwo.
10412 (dwop_section_names): Add .debug_loclists.dwo.
10413 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10414 (struct dwarf2_per_cu_data): Add dwarf_version.
10415 (struct dwo_sections): Add loclists.
10416 (struct attr_abbrev): Add implicit_const.
10417 (read_indirect_line_string): New declaration.
10418 (read_unsigned_leb128): Delete declaration.
10419 (rcuh_kind): New definition.
10420 (read_and_check_comp_unit_head): Change parameter
10421 is_debug_types_section to section_kind.
10422 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10423 (read_comp_unit_head): Change parameter abfd to section, add parameter
10424 section_kind. Handle DWARF-5.
10425 (error_check_comp_unit_head): Accept also DWARF version 5.
10426 (read_and_check_comp_unit_head): Change parameter
10427 is_debug_types_section to section_kind.
10428 (read_and_check_type_unit_head): Delete function.
10429 (read_abbrev_offset): Handle DWARF-5.
10430 (create_debug_type_hash_table): Add parameter section_kind. Process
10431 only DW_UT_type. Use signature and type_offset_in_tu from struct
10432 comp_unit_head.
10433 (create_debug_types_hash_table): Update create_debug_type_hash_table
10434 caller.
10435 (create_all_type_units): Call create_debug_type_hash_table.
10436 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10437 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10438 caller.
10439 (skip_one_die): Handle DW_FORM_implicit_const.
10440 (dwarf2_rnglists_process): New function.
10441 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10442 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10443 (read_attribute_value): Handle DW_FORM_implicit_const,
10444 DW_FORM_line_strp.
10445 (read_attribute): Handle DW_FORM_implicit_const.
10446 (read_indirect_string_at_offset_from): New function from
10447 read_indirect_string_at_offset.
10448 (read_indirect_string_at_offset): Call
10449 read_indirect_string_at_offset_from.
10450 (read_indirect_line_string_at_offset): New function.
10451 (read_indirect_string): New function comment.
10452 (read_indirect_line_string): New function.
10453 (read_unsigned_leb128): Make it global.
10454 (dwarf2_string_attr): Handle DWARF-5.
10455 (add_include_dir_stub, read_formatted_entries): New functions.
10456 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10457 Handle DWARF-5.
10458 (per_cu_header_read_in): Update read_comp_unit_head caller.
10459 (dwarf2_version): New function.
10460 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10461 rnglists.
10462 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10463 fields.
10464
22d2f3ab
JK
104652017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10466
10467 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10468
5f46c5a5
JK
104692017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10470
10471 * dwarf2read.c (dwarf2_ranges_process): New function from
10472 dwarf2_ranges_read.
10473 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10474 dwarf2_ranges_process.
10475
78d4d2c5
JK
104762017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10477
10478 * dwarf2read.c (create_debug_type_hash_table): New function from
10479 create_debug_types_hash_table.
10480 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10481 (create_all_type_units, open_and_init_dwo_file): Update
10482 create_debug_types_hash_table callers.
10483
1b076f25
SDJ
104842017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10485
10486 PR gdb/16188
10487 * fork-child.c (trace_start_error): Fix thinko. va_end should
10488 refer to 'ap', not 'args'.
10489
0db8980c
SDJ
104902017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10491 Pedro Alves <palves@redhat.com>
10492
10493 PR gdb/16188
10494 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10495 calls succeeded.
10496 * fork-child.c (trace_start_error): New function.
10497 (trace_start_error_with_name): Likewise.
10498 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10499 * inf-ptrace.c (inf_ptrace_me): Likewise.
10500 * inferior.h (trace_start_error): New prototype.
10501 (trace_start_error_with_name): Likewise.
10502
99e8a4f9
SDJ
105032017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10504
10505 PR gdb/21164
10506 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10507 NULL before using it.
10508 * symmisc.c (maintenance_print_symbols): Likewise.
10509 (maintenance_print_msymbols): Likewise.
10510
4e746bb6
TW
105112017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10512
10513 * NEWS: Add record Python bindings entry.
10514
105152017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10516
10517 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10518 py-record-full.o.
10519 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10520 * python/py-record-btrace.c, python/py-record-btrace.h,
10521 python/py-record-full.c, python/py-record-full.h: New file.
10522 * python/py-record.c: Add include for py-record-btrace.h and
10523 py-record-full.h.
10524 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10525 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10526 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10527 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10528 New definition.
10529 (gdbpy_initialize_btrace): New export.
10530 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10531
105322017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10533
10534 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10535 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10536 * python/py-record.c: New file.
10537 * python/python-internal.h (gdbpy_start_recording,
10538 gdbpy_current_recording, gdpy_stop_recording,
10539 gdbpy_initialize_record): New export.
10540 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10541 (python_GdbMethods): Add gdbpy_start_recording,
10542 gdbpy_current_recording and gdbpy_stop_recording.
10543
105442017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10545
10546 * record-btrace.c (record_btrace_record_method): New function.
10547 (init_record_btrace_ops): Initialize to_record_method.
10548 * record-full.c (record_full_record_method): New function.
10549 (init_record_full_ops, init_record_full_core_ops): Add
10550 record_full_record_method.
10551 * record.h (enum record_method): New enum.
10552 * target-debug.h (target_debug_print_enum_record_method: New define.
10553 * target-delegates.c: Regenerate.
10554 * target.c (target_record_method): New function.
10555 * target.h: Include record.h.
10556 (struct target_ops) <to_record_method>: New field.
10557 (target_record_method): New export.
10558
105592017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10560
10561 * record.h (record_start, record_stop): New export.
10562 * record.c (record_start, record_stop): New function.
10563
105642017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10565
10566 * btrace.c (btrace_fetch): Copy function call segments pointer
10567 into a vector.
10568 (btrace_clear): Clear the vector.
10569 (btrace_find_insn_by_number): Use binary search to find the correct
10570 function call segment.
10571 * btrace.h (brace_fun_p): New typedef.
10572 (struct btrace_thread_info) <functions>: New field.
10573
105742017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10575
10576 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10577 * btrace.c (btrace_decode_error): ... here. New function.
10578 * btrace.h (btrace_decode_error): New export.
10579
105802017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10581
10582 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10583 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10584 btrace_find_insn_by_number): Remove special case for gaps.
10585 * btrace.h (btrace_insn_get_error): New export.
10586 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10587 * record-btrace.c (btrace_insn_history): Print number for gaps.
10588 (record_btrace_info, record_btrace_goto): Handle gaps.
10589
3f77c769
TT
105902017-02-14 Tom Tromey <tom@tromey.com>
10591
10592 PR python/13598:
10593 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10594 event.
10595 * python/py-evts.c (gdbpy_initialize_py_events): Add
10596 before_prompt registry.
10597 * python/py-events.h (events_object) <before_prompt>: New field.
10598
4c2c7ac6
MM
105992017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10600
10601 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10602
5cf30ebf
LM
106032017-02-13 Luis Machado <lgustavo@codesourcery.com>
10604
10605 * symfile (_initialize_symfile): Add usage text to the load command's
10606 help text.
10607
26a06916
SM
106082017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10609
10610 * utils.c (defaulted_query): Don't query on secondary UIs.
10611
0b145e37
TT
106122017-02-10 Tom Tromey <tom@tromey.com>
10613
10614 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10615
2d8365c4
TT
106162017-02-10 Tom Tromey <tom@tromey.com>
10617
10618 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10619 "cleanup" local.
10620 * python/py-type.c (typy_legacy_template_argument): Remove
10621 unnecessary "cleanup" local.
10622
2bb8f231
TT
106232017-02-10 Tom Tromey <tom@tromey.com>
10624
10625 * python/python.c (do_start_initialization): New function, from
10626 _initialize_python.
10627 (_initialize_python): Call do_start_initialization.
10628 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10629 goto.
10630
1bdfaf42
TT
106312017-02-10 Tom Tromey <tom@tromey.com>
10632
10633 * python/py-prettyprint.c (pretty_print_one_value): Use
10634 gdbpy_ref.
10635
88b6faea
TT
106362017-02-10 Tom Tromey <tom@tromey.com>
10637
10638 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10639 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10640 gdbpy_ref.
10641 * python/py-type.c (field_new): Use gdbpy_ref.
10642 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10643 gdbpy_ref.
10644 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10645 (py_free_pspace): Likewise.
10646 (pspace_to_pspace_object): Likewise.
10647 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10648 (py_free_objfile): Likewise.
10649 (objfile_to_objfile_object): Likewise.
10650 * python/py-inferior.c (delete_thread_object): Use
10651 gdbpy_ref.
10652 (infpy_read_memory): Likewise.
10653 (py_free_inferior): Likewise.
10654 * python/py-evtregistry.c (create_eventregistry_object): Use
10655 gdbpy_ref.
10656 * python/py-event.c (create_event_object): Use gdbpy_ref.
10657
7780f186
TT
106582017-02-10 Tom Tromey <tom@tromey.com>
10659
10660 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10661 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10662 used.
10663 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10664 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10665 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10666 python/py-framefilter.c, python/py-function.c,
10667 python/py-inferior.c, python/py-infevents.c,
10668 python/py-linetable.c, python/py-newobjfileevent.c,
10669 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10670 python/py-signalevent.c, python/py-stopevent.c,
10671 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10672 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10673 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10674 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10675
d4b0bb18
TT
106762017-02-10 Tom Tromey <tom@tromey.com>
10677
10678 * ui-out.h (ui_out_emit_type): New class.
10679 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10680 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10681 and ui_out_emit_tuple.
10682 (enumerate_locals): Likewise.
10683 (py_mi_print_variables, py_print_locals, py_print_args): Use
10684 ui_out_emit_list.
10685 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10686 ui_out_emit_list.
10687 * common/gdb_optional.h: New file.
10688
f67f945c
MG
106892017-02-10 Martin Galvan <martingalvan@sourceware.org>
10690
10691 * MAINTAINERS (Write After Approval): Update my e-mail address.
10692
18da0c51
MG
106932017-02-10 Martin Galvan <martingalvan@sourceware.org>
10694
10695 PR gdb/21122
10696 * breakpoint.c (_initialize_breakpoint): Update the help description
10697 of the 'commands' command to indicate that it takes a list argument.
10698
62c14536
SM
106992017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10700
10701 * interps.c (current_interp_set_logging): Remove "return".
10702
ff6fa247
GB
107032017-02-09 Gary Benson <gbenson@redhat.com>
10704
10705 * symtab.c (add_symtab_completions): Prevent NULL pointer
10706 dereference.
10707
a474bd8e
PA
107082017-02-08 Pedro Alves <palves@redhat.com>
10709
10710 * interps.c (interp::interp): Remove reference to quiet_p.
10711 (interp_set): Make static. Remove dead "Switching to" output
10712 code.
10713 (interp_quiet_p, interp_set_quiet): Delete.
10714 (interpreter_exec_cmd): Don't set the interpreter quiet.
10715 * interps.h (interp_quiet_p): Make static.
10716 (class interp) <quiet_p>: Remove field
10717
3d7b173c
JG
107182017-02-08 Jerome Guitton <guitton@adacore.com>
10719
604c4576
JG
10720 * cli/cli-decode.c (find_command_name_length): Make it extern.
10721 * cli/cli-decode.h (find_command_name_length): Declare.
10722 * cli/cli-script.c (command_name_equals, line_first_arg):
10723 New functions.
10724 (process_next_line): Use cli-decode to parse command names.
10725 (build_command_line): Make args a constant pointer.
10726
107272017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 10728
3d7b173c
JG
10729 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10730 Remove case-insensitive search.
10731
1291063d
JM
107322017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10733
10734 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10735 at the end of the line. Avoids an ARI warning.
10736
20b477a7
LM
107372017-02-06 Luis Machado <lgustavo@codesourcery.com>
10738
10739 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10740 rdseed instructions.
10741 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10742
3f7b46f2
IR
107432017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10744
10745 PR tdep/20936
10746 Provide and use sparc32 and sparc64 target description XML files.
10747 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10748 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10749 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10750 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10751 * features/sparc/sparc32-solaris.xml: New file.
10752 * features/sparc/sparc64-solaris.xml: New file.
10753 * features/sparc/sparc32-solaris.c: Generated.
10754 * features/sparc/sparc64-solaris.c: Generated.
10755 * sparc-tdep.h: Account for differences in target descriptions.
10756 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10757 (sparc32_register_type): Use target provided registers.
10758 (validate_tdesc_registers): New function.
10759 (sparc32_gdbarch_init): Use tdesc_has_registers.
10760 Set pseudoregister functions.
10761 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10762 (sparc64_register_type): Use target provided registers.
10763 (sparc64_init_abi): Set pseudoregister functions.
10764
f0fd41c1
TT
107652017-02-03 Tom Tromey <tom@tromey.com>
10766
10767 PR rust/21097:
10768 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10769 with a single member.
10770
d6f9b0fb
PA
107712017-02-03 Pedro Alves <palves@redhat.com>
10772
10773 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10774 (cli_interp_base::~cli_interp_base): New.
10775 (cli_interp): New struct.
10776 (as_cli_interp): Cast the interp itself to cli_interp.
10777 (cli_interpreter_pre_command_loop): Rename to ...
10778 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10779 parameter.
10780 (cli_interpreter_init): Rename to ...
10781 (cli_interp::init): ... this. Remove 'self' parameter. Use
10782 boolean. Make extern.
10783 (cli_interpreter_resume): Rename to ...
10784 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10785 extern.
10786 (cli_interpreter_suspend): Rename to ...
10787 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10788 extern.
10789 (cli_interpreter_exec): Rename to ...
10790 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10791 extern.
10792 (cli_interpreter_supports_command_editing): Rename to ...
10793 (cli_interp_base::supports_command_editing): ... this. Remove
10794 'interp' parameter. Make extern.
10795 (cli_ui_out): Rename to ...
10796 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10797 Make extern.
10798 (cli_set_logging): Rename to ...
10799 (cli_interp_base::set_logging): ... this. Remove 'interp'
10800 parameter. Make extern.
10801 (cli_interp_procs): Delete.
10802 (cli_interp_factory): Adjust to use "new".
10803 * cli/cli-interp.h: Include "interps.h".
10804 (struct cli_interp_base): New struct.
10805 * interps.c (struct interp): Delete. Fields moved to interps.h.
10806 (interp_new): Delete.
10807 (interp::interp, interp::~interp): New.
10808 (interp_set): Use bool, and return void. Assume the interpreter
10809 has suspend, init and resume methods, and that the all return
10810 void.
10811 (set_top_level_interpreter): interp_set returns void.
10812 (interp_ui_out): Adapt.
10813 (current_interp_set_logging): Adapt.
10814 (interp_data): Delete.
10815 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10816 (interp_exec): Adapt.
10817 (top_level_interpreter_data): Delete.
10818 * interps.h (interp_init_ftype, interp_resume_ftype)
10819 (interp_suspend_ftype, interp_exec_ftype)
10820 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10821 (class interp): New.
10822 (interp_new): Delete.
10823 (interp_set): Now returns void. Use bool.
10824 (interp_data, top_level_interpreter_data): Delete.
10825 * mi/mi-common.h: Include interps.h.
10826 (class mi_interp): Inherit from interp. Define a ctor. Declare
10827 init, resume, suspect, exec, interp_ui_out, set_logging and
10828 pre_command_loop methods.
10829 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10830 (mi_interpreter_init): Rename to ...
10831 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10832 bool, return void and make extern. Adjust.
10833 (mi_interpreter_resume): ... Rename to ...
10834 (mi_interp::resume): ... this. Remove the 'data' parameter,
10835 return void and make extern. Adjust.
10836 (mi_interpreter_suspend): ... Rename to ...
10837 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10838 return void and make extern. Adjust.
10839 (mi_interpreter_exec): ... Rename to ...
10840 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10841 extern. Adjust.
10842 (mi_interpreter_pre_command_loop): ... Rename to ...
10843 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10844 parameter and make extern.
10845 (mi_on_normal_stop_1): Adjust.
10846 (mi_ui_out): Rename to ...
10847 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10848 parameter and make extern. Adjust.
10849 (mi_set_logging): Rename to ...
10850 (mi_interp::set_logging): ... this. Remove the 'interp'
10851 parameter and make extern. Adjust.
10852 (mi_interp_procs): Delete.
10853 (mi_interp_factory): Adjust to use 'new'.
10854 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10855 (mi_print_exception, mi_execute_command, mi_load_progress):
10856 Adjust.
10857 * tui/tui-interp.c (tui_interp): New class.
10858 (as_tui_interp): Return a tui_interp pointer.
10859 (tui_on_normal_stop, tui_on_signal_received)
10860 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10861 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10862 to use interp::interp_ui_out.
10863 (tui_init): Rename to ...
10864 (tui_interp::init): ... this. Remove the 'self' parameter, use
10865 bool, return void and make extern. Adjust.
10866 (tui_resume): Rename to ...
10867 (tui_interp::resume): ... this. Remove the 'data' parameter,
10868 return void and make extern. Adjust.
10869 (tui_suspend): Rename to ...
10870 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10871 return void and make extern. Adjust.
10872 (tui_ui_out): Rename to ...
10873 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10874 parameter, and make extern. Adjust.
10875 (tui_exec): Rename to ...
10876 (tui_interp::exec): ... this. Remove the 'data' parameter and
10877 make extern.
10878 (tui_interp_procs): Delete.
10879 (tui_interp_factory): Use "new".
10880
65c40c95
TT
108812017-02-02 Tom Tromey <tom@tromey.com>
10882
10883 * rust-exp.y (ends_raw_string, space_then_number)
10884 (rust_identifier_start_p): Return bool.
10885 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10886 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10887 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10888 (rust_chartype_p): Return bool.
10889 (val_print_struct, rust_print_struct_def, rust_print_type):
10890 Update.
10891 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10892 Return bool.
10893
b50f188d
TT
108942017-02-02 Tom Tromey <tom@tromey.com>
10895
10896 * rust-lang.c: Reindent.
10897
03c85b11
TT
108982017-02-02 Tom Tromey <tom@tromey.com>
10899
10900 * rust-lang.h (rust_crate_for_block): Update.
10901 * rust-lang.c (rust_crate_for_block): Return std::string.
10902 (rust_get_disr_info): Use std:;string, not
10903 gdb::unique_xmalloc_ptr.
10904 * rust-exp.y (crate_name): Update.
10905
9b6da501
PA
109062017-02-02 Pedro Alves <palves@redhat.com>
10907
10908 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10909 field out of gdb_disassembler_test and make it static.
10910
ec4cb20b
PA
109112017-02-02 Pedro Alves <palves@redhat.com>
10912
10913 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10914 mi1_interp and mi_interp fields.
10915
5be5dbf0
PA
109162017-02-02 Pedro Alves <palves@redhat.com>
10917
616268b6
PA
10918 * cli/cli-interp.c (struct saved_output_files, saved_output):
10919 Moved from cli/cli-logging.c.
10920 (cli_set_logging): New function.
10921 (cli_interp_procs): Install cli_set_logging.
10922 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10923 Declare.
10924 * cli/cli-logging.c (struct saved_output_files, saved_output):
10925 Moved to cli/cli-interp.c.
10926 (pop_output_files): Don't save outputs here.
10927 (make_logging_output): New function.
10928 (handle_redirections): Don't build tee nor save previous outputs
10929 here.
10930 * interps.c (current_interp_set_logging): Change prototype.
10931 Assume there's always a set_logging_proc method installed.
10932 * interps.h (interp_set_logging_ftype): Change prototype.
10933 (current_interp_set_logging): Change prototype and adjust comment.
10934 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10935 use make_logging_output.
10936 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
109372017-02-02 Pedro Alves <palves@redhat.com>
10938
5be5dbf0
PA
10939 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10940 from ...
10941 (set_logging_overwrite): ... here.
10942 (logging_no_redirect_file): Delete.
10943 (set_logging_redirect): Don't handle redirection on the fly.
10944 Instead warn that "logging off" / "logging on" is necessary.
10945 (pop_output_files): Delete references to logging_no_redirect_file.
10946 (show_logging_command): Always speak in terms of what will happen
10947 once logging is reenabled.
10948
c99cc448
PA
109492017-02-02 Pedro Alves <palves@redhat.com>
10950
10951 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10952
8b172ce7
PA
109532017-02-02 Pedro Alves <palves@redhat.com>
10954
10955 * disasm.c (gdb_pretty_print_insn): Rename to ...
10956 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10957 Remove gdbarch parameter. Adapt to clear the object's buffers
10958 instead of allocating new buffers, and to print using the object's
10959 gdb_disassembler instead of calling gdb_print_insn.
10960 (dump_insns): Use gdb_pretty_print_disassembler.
10961 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10962 (gdb_pretty_print_disassembler): New class.
10963 * record-btrace.c (btrace_insn_history): Use
10964 gdb_pretty_print_disassembler.
10965
d7e74731
PA
109662017-02-02 Pedro Alves <palves@redhat.com>
10967
10968 * ada-lang.c (type_as_string): Use string_file.
10969 * ada-valprint.c (ada_print_floating): Use string_file.
10970 * ada-varobj.c (ada_varobj_scalar_image)
10971 (ada_varobj_get_value_image): Use string_file.
10972 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10973 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10974 * breakpoint.c (update_inserted_breakpoint_locations)
10975 (insert_breakpoint_locations, reattach_breakpoints)
10976 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10977 (print_it_watchpoint): Use string_file.
10978 (save_breakpoints): Use stdio_file.
10979 * c-exp.y (oper): Use string_file.
10980 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10981 tee_file.
10982 (pop_output_files): Use delete.
10983 (handle_redirections): Use stdio_file and tee_file.
10984 * cli/cli-setshow.c (do_show_command): Use string_file.
10985 * compile/compile-c-support.c (c_compute_program): Use
10986 string_file.
10987 * compile/compile-c-symbols.c (generate_vla_size): Take a
10988 'string_file &' instead of a 'ui_file *'.
10989 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10990 of a 'ui_file *'. Use string_file.
10991 (generate_c_for_variable_locations): Take a 'string_file &'
10992 instead of a 'ui_file *'.
10993 * compile/compile-internal.h (generate_c_for_for_one_variable):
10994 Take a 'string_file &' instead of a 'ui_file *'.
10995 * compile/compile-loc2c.c (push, pushf, unary, binary)
10996 (print_label, pushf_register_address, pushf_register)
10997 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10998 'ui_file *'. Adjust.
10999 * compile/compile.c (compile_to_object): Use string_file.
11000 * compile/compile.h (compile_dwarf_expr_to_c)
11001 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11002 'ui_file *'.
11003 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11004 (replace_typedefs_qualified_name): Use string_file and
11005 obstack_copy0.
11006 * disasm.c (gdb_pretty_print_insn): Use string_file.
11007 (gdb_disassembly): Adjust reference the null_stream global.
11008 (do_ui_file_delete): Delete.
11009 (gdb_insn_length): Use null_stream.
11010 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11011 * dwarf2loc.c (dwarf2_compile_property_to_c)
11012 (locexpr_generate_c_location, loclist_generate_c_location): Take a
11013 'string_file &' instead of a 'ui_file *'.
11014 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11015 * dwarf2read.c (do_ui_file_peek_last): Delete.
11016 (dwarf2_compute_name): Use string_file.
11017 * event-top.c (gdb_setup_readline): Use stdio_file.
11018 * gdbarch.sh (verify_gdbarch): Use string_file.
11019 * gdbtypes.c (safe_parse_type): Use null_stream.
11020 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11021 string_file.
11022 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11023 'string_file *' instead of a 'ui_file *'.
11024 (gdbscm_arch_disassemble): Use string_file.
11025 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11026 * guile/scm-ports.c (class ioscm_file_port): Now a class that
11027 inherits from ui_file.
11028 (ioscm_file_port_delete, ioscm_file_port_rewind)
11029 (ioscm_file_port_put): Delete.
11030 (ioscm_file_port_write): Rename to ...
11031 (ioscm_file_port::write): ... this. Remove file_port_magic
11032 checks.
11033 (ioscm_file_port_new): Delete.
11034 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11035 ui_file_up.
11036 * guile/scm-type.c (tyscm_type_name): Use string_file.
11037 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11038 Use string_file.
11039 * infcmd.c (print_return_value_1): Use string_file.
11040 * infrun.c (print_target_wait_results): Use string_file.
11041 * language.c (add_language): Use string_file.
11042 * location.c (explicit_to_string_internal): Use string_file.
11043 * main.c (captured_main_1): Use null_file.
11044 * maint.c (maintenance_print_architecture): Use stdio_file.
11045 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11046 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11047 event_channel>: Change type to mi_console_file pointer.
11048 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11049 (mi_console_file_delete): Delete.
11050 (struct mi_console_file): Delete.
11051 (mi_console_file_magic): Delete.
11052 (mi_console_file_new): Delete.
11053 (mi_console_file::mi_console_file): New.
11054 (mi_console_file_delete): Delete.
11055 (mi_console_file_fputs): Delete.
11056 (mi_console_file::write): New.
11057 (mi_console_raw_packet): Delete.
11058 (mi_console_file::flush): New.
11059 (mi_console_file_flush): Delete.
11060 (mi_console_set_raw): Rename to ...
11061 (mi_console_file::set_raw): ... this.
11062 * mi/mi-console.h (class mi_console_file): New class.
11063 (mi_console_file_new, mi_console_set_raw): Delete.
11064 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11065 (mi_set_logging): Use delete and tee_file. Adjust.
11066 * mi/mi-main.c (output_register): Use string_file.
11067 (mi_cmd_data_evaluate_expression): Use string_file.
11068 (mi_cmd_data_read_memory): Use string_file.
11069 (mi_cmd_execute, print_variable_or_computed): Use string_file.
11070 * mi/mi-out.c (mi_ui_out::main_stream): New.
11071 (mi_ui_out::rewind): Use main_stream and
11072 string_file.
11073 (mi_ui_out::put): Use main_stream and string_file.
11074 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11075 Allocate a 'string_file' instead.
11076 (mi_out_new): Don't allocate a mem_fileopen stream here.
11077 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11078 (mi_ui_out::main_stream): Declare method.
11079 * printcmd.c (eval_command): Use string_file.
11080 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11081 * python/py-arch.c (archpy_disassemble): Use string_file.
11082 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11083 * python/py-frame.c (frapy_str): Use string_file.
11084 * python/py-framefilter.c (py_print_type, py_print_single_arg):
11085 Use string_file.
11086 * python/py-type.c (typy_str): Use string_file.
11087 * python/py-unwind.c (unwind_infopy_str): Use string_file.
11088 * python/py-value.c (valpy_str): Use string_file.
11089 * record-btrace.c (btrace_insn_history): Use string_file.
11090 * regcache.c (regcache_print): Use stdio_file.
11091 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11092 * remote.c (escape_buffer): Use string_file.
11093 * rust-lang.c (rust_get_disr_info): Use string_file.
11094 * serial.c (serial_open_ops_1): Use stdio_file.
11095 (do_serial_close): Use delete.
11096 * stack.c (print_frame_arg): Use string_file.
11097 (print_frame_args): Remove local mem_fileopen stream, not used.
11098 (print_frame): Use string_file.
11099 * symmisc.c (maintenance_print_symbols): Use stdio_file.
11100 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11101 Take a 'string_file *' instead of a 'ui_file *'.
11102 * top.c (new_ui): Use stdio_file and stderr_file.
11103 (free_ui): Use delete.
11104 (execute_command_to_string): Use string_file.
11105 (quit_confirm): Use string_file.
11106 * tracepoint.c (collection_list::append_exp): Use string_file.
11107 * tui/tui-disasm.c (tui_disassemble): Use string_file.
11108 * tui/tui-file.c: Don't include "ui-file.h".
11109 (enum streamtype, struct tui_stream): Delete.
11110 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11111 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11112 (tui_file::tui_file): New method.
11113 (tui_file_fputs): Delete.
11114 (tui_file_get_strbuf): Delete.
11115 (tui_file::puts): New method.
11116 (tui_file_adjust_strbuf): Delete.
11117 (tui_file_flush): Delete.
11118 (tui_file::flush): New method.
11119 * tui/tui-file.h: Tweak intro comment.
11120 Include ui-file.h.
11121 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11122 (tui_file_adjust_strbuf): Delete declarations.
11123 (class tui_file): New class.
11124 * tui/tui-io.c (tui_initialize_io): Use tui_file.
11125 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11126 (tui_register_format): Use string_stream.
11127 * tui/tui-stack.c (tui_make_status_line): Use string_file.
11128 (tui_get_function_from_frame): Use string_file.
11129 * typeprint.c (type_to_string): Use string_file.
11130 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11131 (null_stream): New global.
11132 (ui_file_delete): Delete.
11133 (ui_file::ui_file): New.
11134 (null_file_isatty): Delete.
11135 (ui_file::~ui_file): New.
11136 (null_file_rewind): Delete.
11137 (ui_file::printf): New.
11138 (null_file_put): Delete.
11139 (null_file_flush): Delete.
11140 (ui_file::putstr): New.
11141 (null_file_write): Delete.
11142 (ui_file::putstrn): New.
11143 (null_file_read): Delete.
11144 (ui_file::putc): New.
11145 (null_file_fputs): Delete.
11146 (null_file_write_async_safe): Delete.
11147 (ui_file::vprintf): New.
11148 (null_file_delete): Delete.
11149 (null_file::write): New.
11150 (null_file_fseek): Delete.
11151 (null_file::puts): New.
11152 (ui_file_data): Delete.
11153 (null_file::write_async_safe): New.
11154 (gdb_flush, ui_file_isatty): Adjust.
11155 (ui_file_put, ui_file_rewind): Delete.
11156 (ui_file_write): Adjust.
11157 (ui_file_write_for_put): Delete.
11158 (ui_file_write_async_safe, ui_file_read): Adjust.
11159 (ui_file_fseek): Delete.
11160 (fputs_unfiltered): Adjust.
11161 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11162 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11163 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11164 (set_ui_file_data): Delete.
11165 (string_file::~string_file, string_file::write)
11166 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11167 (do_ui_file_as_string, ui_file_as_string): Delete.
11168 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11169 (struct mem_file): Delete.
11170 (mem_file_new): Delete.
11171 (stdio_file::stdio_file): New.
11172 (mem_file_delete): Delete.
11173 (stdio_file::stdio_file): New.
11174 (mem_fileopen): Delete.
11175 (stdio_file::~stdio_file): New.
11176 (mem_file_rewind): Delete.
11177 (stdio_file::set_stream): New.
11178 (mem_file_put): Delete.
11179 (stdio_file::open): New.
11180 (mem_file_write): Delete.
11181 (stdio_file_magic, struct stdio_file): Delete.
11182 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11183 (stdio_file::flush): New.
11184 (stdio_file_read): Rename to ...
11185 (stdio_file::read): ... this. Adjust.
11186 (stdio_file_write): Rename to ...
11187 (stdio_file::write): ... this. Adjust.
11188 (stdio_file_write_async_safe): Rename to ...
11189 (stdio_file::write_async_safe) ... this. Adjust.
11190 (stdio_file_fputs): Rename to ...
11191 (stdio_file::puts) ... this. Adjust.
11192 (stdio_file_isatty): Delete.
11193 (stdio_file_fseek): Delete.
11194 (stdio_file::isatty): New.
11195 (stderr_file_write): Rename to ...
11196 (stderr_file::write) ... this. Adjust.
11197 (stderr_file_fputs): Rename to ...
11198 (stderr_file::puts) ... this. Adjust.
11199 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11200 (stderr_file::stderr_file): New.
11201 (tee_file_magic): Delete.
11202 (struct tee_file): Delete.
11203 (tee_file::tee_file): New.
11204 (tee_file_new): Delete.
11205 (tee_file::~tee_file): New.
11206 (tee_file_delete): Delete.
11207 (tee_file_flush): Rename to ...
11208 (tee_file::flush): ... this. Adjust.
11209 (tee_file_write): Rename to ...
11210 (tee_file::write): ... this. Adjust.
11211 (tee_file::write_async_safe): New.
11212 (tee_file_fputs): Rename to ...
11213 (tee_file::puts): ... this. Adjust.
11214 (tee_file_isatty): Rename to ...
11215 (tee_file::isatty): ... this. Adjust.
11216 * ui-file.h (struct obstack, struct ui_file): Don't
11217 forward-declare.
11218 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11219 (ui_file_write_ftype)
11220 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11221 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11222 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11223 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11224 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11225 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11226 (set_ui_file_fseek): Delete.
11227 (ui_file_data, ui_file_delete, ui_file_rewind)
11228 (struct ui_file): New.
11229 (ui_file_up): New.
11230 (class null_file): New.
11231 (null_stream): Declare.
11232 (ui_file_write_for_put, ui_file_put): Delete.
11233 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11234 Delete.
11235 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11236 (gdb_fopen, tee_file_new): Delete.
11237 (struct string_file): New.
11238 (struct stdio_file): New.
11239 (stdio_file_up): New.
11240 (struct stderr_file): New.
11241 (class tee_file): New.
11242 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11243 of a 'ui_file *'. Adjust.
11244 * ui-out.h (class ui_out) <field_stream>: Likewise.
11245 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11246 (null_stream): Delete.
11247 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11248 Adjust.
11249 * utils.h (struct ui_file): Delete forward declaration..
11250 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11251 (error_stream): Take a 'string_file &' instead of a
11252 'ui_file *'.
11253 * varobj.c (varobj_value_get_print_value): Use string_file.
11254 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11255 * gdbarch.c: Regenerate.
11256
187808b0
PA
112572017-02-02 Pedro Alves <palves@redhat.com>
11258
11259 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11260 (gdb_pretty_print_insn): ... this. Now a free function. Add back
11261 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
11262 Adjust to call gdb_print_insn instead of
11263 gdb_disassembler::print_insn.
11264 (dump_insns, do_mixed_source_and_assembly_deprecated)
11265 (do_mixed_source_and_assembly, do_assembly_only): Add back a
11266 'gdbarch' parameter. Remove gdb_disassembler parameter.
11267 (gdb_disassembly): Don't allocate a gdb_disassembler here.
11268 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11269 declaration.
11270 (gdb_pretty_print_insn): Re-add declaration.
11271 * record-btrace.c (btrace_insn_history): Don't allocate a
11272 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
11273
7a8eb317
SM
112742017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
11275
11276 * disasm.h (gdb_disassembly): Remove file_string parameter.
11277 * disasm.c (gdb_disassembly): Likewise.
11278 * cli/cli-cmds.c (print_disassembly): Adapt.
11279 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11280 * stack.c (do_gdb_disassembly): Likewise.
11281
7346ef59
AA
112822017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
11283
11284 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11285 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11286 targets. And if the implicit value is longer than needed, extract
11287 the first bytes instead of the "least significant" ones.
11288
cd4007e4
MM
112892017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11290
11291 * btrace.c (btrace_enable): Do not call btrace_add_pc for
11292 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11293 (btrace_fetch): Assert can_access_registers_ptid.
11294 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11295 validate_registers_access.
11296
cf77c34e
MM
112972017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11298
11299 * gdbthread.h (can_access_registers_ptid): New.
11300 * thread.c (can_access_registers_ptid): New.
11301
be85ce7d
PA
113022017-02-01 Pedro Alves <palves@redhat.com>
11303
11304 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11305
29b0b251
PA
113062017-01-31 Pedro Alves <palves@redhat.com>
11307
11308 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11309 Fix typos.
11310
289b5b24
PA
113112017-01-31 Pedro Alves <palves@redhat.com>
11312
11313 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11314 not used.
11315
b47413b4
PA
113162017-01-31 Pedro Alves <palves@redhat.com>
11317
11318 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11319
60adb36c
PA
113202017-01-31 Pedro Alves <palves@redhat.com>
11321
11322 * common/scoped_restore.h
11323 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11324 change the value's parameter type to T2.
11325 (make_scoped_restore): Likewise.
11326
2735833d
WT
113272017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11328 Richard Henderson <rth@redhat.com>
11329
11330 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11331 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11332 GS_BASE for older kernels.
11333 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11334 GS_BASE for older kernels.
11335 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11336 and GS_BASE to the offset table.
11337 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11338 system register group.
11339 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11340 for older kernels.
11341 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11342 amd64 ABI.
11343 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11344 AMD64_GSBASE_REGNUM.
11345 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11346 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11347 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11348 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11349 i386/64bit-segments.xml in those rules.
11350 * features/i386/64bit-segments.xml: New file.
11351 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11352 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11353 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11354 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11355 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11356 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11357 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11358 * features/i386/amd64-avx-linux.c: Regenerated.
11359 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11360 * features/i386/amd64-avx-mpx.c: Regenerated.
11361 * features/i386/amd64-avx512-linux.c: Regenerated.
11362 * features/i386/amd64-linux.c: Regenerated.
11363 * features/i386/amd64-mpx-linux.c: Regenerated.
11364 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11365 * features/i386/i386-avx-mpx.c: Regenerated.
11366 * features/i386/x32-avx-linux.c: Regenerated.
11367 * features/i386/x32-avx512-linux.c: Regenerated.
11368 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11369 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11370 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11371 * regformats/i386/amd64-linux.dat: Regenerated.
11372 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11373 * regformats/i386/x32-avx-linux.dat: Regenerated.
11374 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11375 * regformats/i386/x32-linux.dat: Regenerated.
11376
8884e97e
WT
113772017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11378
11379 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11380 Set to AMD64_NUM_REGS.
11381
7005d26a
WT
113822017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11383
11384 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11385 that checks validity of a register number.
11386
4bd2e1b2
KC
113872017-01-27 Kees Cook <keescook@google.com>
11388
11389 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11390 fetch_fpregs if target has fpa registers.
11391 (arm_linux_store_inferior_registers): Call store_fpregs if target
11392 has fpa registers.
11393
7cf1de6c
AA
113942017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11395
11396 * cris-tdep.c (cris_gdbarch_init): Remove check for
11397 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11398
874a1c8c
AT
113992017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11400
11401 * corelow.c (get_core_register_section): Check for regset
11402 existence before checking for REGSET_VARIABLE_SIZE.
11403
d8b49cf0
YQ
114042017-01-26 Yao Qi <yao.qi@linaro.org>
11405 Pedro Alves <palves@redhat.com>
11406
11407 PR gdb/20939
11408 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11409 call memory_error, save memaddr instead.
11410 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11411 negative, cal memory_error.
11412 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11413
658ca58c
YQ
114142017-01-26 Yao Qi <yao.qi@linaro.org>
11415
11416 * disasm-selftests.c (memory_error_test): New function.
11417 (_initialize_disasm_selftests): Register memory_error_test.
11418
79843d45
YQ
114192017-01-26 Yao Qi <yao.qi@linaro.org>
11420
11421 * Makefile.in (SFILES): Add disasm-selftests.c and
11422 selftest-arch.c.
11423 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11424 * disasm-selftests.c: New file.
11425 * selftest-arch.c: New file.
11426 * selftest-arch.h: New file.
11427
8cafda32
YQ
114282017-01-26 Yao Qi <yao.qi@linaro.org>
11429
11430 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11431 to bfd_arch_mep. Don't return 0 if section is not
11432 found. Call print_insn_mep.
11433
e47ad6c0
YQ
114342017-01-26 Pedro Alves <palves@redhat.com>
11435 Yao Qi <yao.qi@linaro.org>
11436
11437 * arm-tdep.c: Include "disasm.h".
11438 (gdb_print_insn_arm): Update code to get gdbarch.
11439 * disasm.c (dis_asm_read_memory): Change it to
11440 gdb_disassembler::dis_asm_read_memory.
11441 (dis_asm_memory_error): Likewise.
11442 (dis_asm_print_address): Likewise.
11443 (gdb_pretty_print_insn): Change it to
11444 gdb_disassembler::pretty_print_insn.
11445 (dump_insns): Add one argument gdb_disassemlber. All
11446 callers updated.
11447 (do_mixed_source_and_assembly_deprecated): Likewise.
11448 (do_mixed_source_and_assembly): Likewise.
11449 (do_assembly_only): Likewise.
11450 (gdb_disassembler::gdb_disassembler): New.
11451 (gdb_disassembler::print_insn): New.
11452 * disasm.h (class gdb_disassembler): New.
11453 (gdb_pretty_print_insn): Remove declaration.
11454 (gdb_disassemble_info): Likewise.
11455 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11456 (gdbscm_disasm_read_memory_worker): Update.
11457 (gdbscm_disasm_read_memory): Update.
11458 (gdbscm_disasm_memory_error): Remove.
11459 (gdbscm_disasm_print_address): Remove.
11460 (gdbscm_disassembler::gdbscm_disassembler): New.
11461 (gdbscm_print_insn_from_port): Update.
11462 * mips-tdep.c: Include disasm.h.
11463 (gdb_print_insn_mips): Update code to get gdbarch.
11464 * record-btrace.c (btrace_insn_history): Update.
11465 * spu-tdep.c: Include disasm.h.
11466 (struct spu_dis_asm_data): Remove.
11467 (struct spu_dis_asm_info): New.
11468 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11469 SPU id.
11470 (gdb_print_insn_spu): Cast disassemble_info to
11471 spu_dis_asm_info.
11472
80d75874
YQ
114732017-01-26 Yao Qi <yao.qi@linaro.org>
11474
11475 * disasm.c (do_ui_file_delete): Delete.
11476 (gdb_insn_length): Move code creating stream to ...
11477 * utils.c (null_stream): ... here. New function.
11478 * utils.h (null_stream): Declare.
11479
60685cd0
SM
114802017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11481
11482 * python/py-inferior.c (find_thread_object): Return directly
11483 from the loop. Remove "found" variable.
11484
eb1cdb62
JB
114852017-01-21 Joel Brobecker <brobecker@adacore.com>
11486
11487 GDB 7.12.1 released.
11488
b1ce6568
SM
114892017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11490
11491 * python/py-function.c (fnpy_call): Reorder declarations to have
11492 the gdbpy_enter object declared first.
11493 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11494
6f8b0407
SM
114952017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11496
fec93fb1 11497 PR python/21068
6f8b0407
SM
11498 * python/python-internal.h (PyMem_RawMalloc): Define for
11499 Python < 3.4.
11500 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11501 PyMem_RawMalloc instead of PyMem_Malloc.
11502
78cbbba8
LM
115032017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11504 Luis Machado <lgustavo@codesourcery.com>
11505
11506 * NEWS (New commands): Mention flash-erase.
11507 (New MI commands): Mention target-flash-erase.
11508 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11509 command.
11510 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11511 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11512 * target.c (flash_erase_command): New function.
11513 (initialize_targets): Add new flash-erase command.
11514 * target.h (flash_erase_command): New declaration.
11515
2132fe85
JB
115162017-01-20 Joel Brobecker <brobecker@adacore.com>
11517
11518 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11519 HAVE_SYS_PROCFS_H is defined.
11520
d1dff226
AH
115212017-01-18 Alan Hayward <alan.hayward@arm.com>
11522
11523 * remote.c (struct cached_reg): Change data into a pointer.
11524 * (stop_reply_dtr): Free data pointers before deleting vector.
11525 (process_stop_reply): Likewise.
11526 (remote_parse_stop_reply): Allocate space for data
11527
9890e433
AH
115282017-01-18 Alan Hayward <alan.hayward@arm.com>
11529
11530 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11531 MAX_REGISTER_SIZE.
11532 (amd64_pseudo_register_read_value): Likewise.
11533 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11534 (store_register_using_P): Likewise.
11535 * regcache.c (regcache_xfer_part): Likewise.
11536
7a36499a
IR
115372017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11538
11539 Split real and pseudo registers.
11540 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11541 (sparc32_pseudo_regnum): New enum.
11542 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11543 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11544 (SPARC32_CP0_REGISTERS): New macro.
11545 (sparc32_pseudo_register_name): New function.
11546 (sparc32_register_name): Use sparc32_pseudo_register_name.
11547 (sparc32_pseudo_register_type): New function.
11548 (sparc32_register_type): Use sparc32_pseudo_register_type.
11549 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11550 pseudo register numbers.
11551 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11552 (SPARC64_CP0_REGISTERS): New macro.
11553 (sparc64_pseudo_register_name): New function.
11554 (sparc64_register_name): Use sparc64_pseudo_register_name.
11555 (sparc64_pseudo_register_type): New function.
11556 (sparc64_register_type): Use sparc64_pseudo_register_type.
11557 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11558 pseudo register numbers.
11559 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11560 sparc64_store_arguments): Handle pseudo register numbers.
11561
6f8976bf
YQ
115622017-01-13 Yao Qi <yao.qi@linaro.org>
11563
11564 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11565 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11566 output.
11567 (getpkt_or_notif_sane_1): Likewise.
11568
e4241ace
YQ
115692017-01-13 Yao Qi <yao.qi@linaro.org>
11570
11571 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11572 of CC. Pass "-x c++-header" instead of "-x c".
11573
3015c064
SM
115742017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11575
11576 * remote.c (remote_can_async_p): Update comment.
11577
fde1b17d
SM
115782017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11579
11580 * linux-nat.c (linux_nat_can_async_p): Update comment.
11581
ca1ca08b
SM
115822017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11583
11584 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11585
4ad2da73
SM
115862017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11587
11588 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11589
c8b23b3f
TT
115902017-01-10 Tom Tromey <tom@tromey.com>
11591
11592 * python/py-type.c (typy_legacy_template_argument): Update.
11593 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11594 ~demangle_parse_info): Declare new members.
11595 (cp_demangled_name_to_comp): Return unique_ptr.
11596 (cp_demangled_name_parse_free)
11597 (make_cleanup_cp_demangled_name_parse_free)
11598 (cp_new_demangle_parse_info): Remove.
11599 * cp-support.c (do_demangled_name_parse_free_cleanup)
11600 (make_cleanup_cp_demangled_name_parse_free): Remove.
11601 (inspect_type, cp_canonicalize_string_full)
11602 (cp_canonicalize_string): Update.
11603 (mangled_name_to_comp): Change return type.
11604 (cp_class_name_from_physname, method_name_from_physname)
11605 (cp_func_name, cp_remove_params): Update.
11606 * cp-name-parser.y (demangle_parse_info): New constructor, from
11607 cp_new_demangle_parse_info.
11608 (~demangle_parse_info): New destructor, from
11609 cp_demangled_name_parse_free.
11610 (cp_merge_demangle_parse_infos): Update.
11611 (cp_demangled_name_to_comp): Change return type.
11612
1ac32117
TT
116132017-01-10 Tom Tromey <tom@tromey.com>
11614
11615 * top.c (prevent_dont_repeat): Change return type.
11616 * python/python.c (execute_gdb_command): Use std::string.
11617 Update.
11618 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11619 * command.h (prevent_dont_repeat): Change return type.
11620 * breakpoint.c (bpstat_do_actions_1): Update.
11621
0cf08227
TT
116222017-01-10 Tom Tromey <tom@tromey.com>
11623
11624 * value.h (scoped_value_mark::~scoped_value_mark): Call
11625 free_to_mark.
11626 (scoped_value_mark::free_to_mark): New method.
11627 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11628 scoped_value_mark.
11629
eb115069
TT
116302017-01-10 Tom Tromey <tom@tromey.com>
11631
11632 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11633 (valpy_reference_value, valpy_const_value, valpy_get_address)
11634 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11635 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11636 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11637 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11638 scoped_value_mark.
11639 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11640 * value.h (scoped_value_mark): New class.
11641
906768f9
TT
116422017-01-10 Tom Tromey <tom@tromey.com>
11643
11644 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11645 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11646 * psymtab.c (discard_psymtabs_upto): Remove.
11647 (make_cleanup_discard_psymtabs): Remove.
11648 (struct psymtab_state): Remove.
11649
bef155c3
TT
116502017-01-10 Tom Tromey <tom@tromey.com>
11651
11652 * record-full.c (record_full_save_cleanups): Remove.
11653 (record_full_save): Use gdb::unlinker.
11654 * gcore.c (do_bfd_delete_cleanup): Remove.
11655 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11656 cleanups.
11657 * dwarf2read.c (unlink_if_set): Remove.
11658 (write_psymtabs_to_index): Use gdb::unlinker.
11659 * common/gdb_unlinker.h: New file.
11660
192b62ce
TT
116612017-01-10 Tom Tromey <tom@tromey.com>
11662
11663 * windows-tdep.c (windows_xfer_shared_library): Update.
11664 * windows-nat.c (windows_make_so): Update.
11665 * utils.h (make_cleanup_bfd_unref): Remove.
11666 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11667 * symfile.h (symfile_bfd_open)
11668 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11669 * symfile.c (read_symbols, symbol_file_add)
11670 (separate_debug_file_exists): Update.
11671 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11672 (generic_load, reread_symbols): Update.
11673 * symfile-mem.c (symbol_file_add_from_memory): Update.
11674 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11675 (spu_symbol_file_add_from_memory): Update.
11676 * solist.h (struct target_so_ops) <bfd_open>: Return
11677 gdb_bfd_ref_ptr.
11678 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11679 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11680 gdb_bfd_ref_ptr.
11681 (solib_map_sections, reload_shared_libraries_1): Update.
11682 * solib-svr4.c (enable_break): Update.
11683 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11684 * solib-frv.c (enable_break2): Update.
11685 * solib-dsbt.c (enable_break): Update.
11686 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11687 gdb_bfd_ref_ptr.
11688 (darwin_solib_get_all_image_info_addr_at_init): Update.
11689 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11690 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11691 * record-full.c (record_full_save): Update.
11692 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11693 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11694 * minidebug.c (find_separate_debug_file_in_section): Return
11695 gdb_bfd_ref_ptr.
11696 * machoread.c (macho_add_oso_symfile): Change abfd to
11697 gdb_bfd_ref_ptr.
11698 (macho_symfile_read_all_oso): Update.
11699 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11700 (macho_symfile_read): Update.
11701 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11702 (jit_bfd_try_read_symtab): Update.
11703 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11704 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11705 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11706 gdb_bfd_ref_ptr.
11707 (gdb_bfd_ref_policy): New struct.
11708 (gdb_bfd_ref_ptr): New typedef.
11709 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11710 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11711 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11712 gdb_bfd_ref_ptr.
11713 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11714 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11715 (gcore_command): Update.
11716 * exec.c (exec_file_attach): Update.
11717 * elfread.c (elf_symfile_read): Update.
11718 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11719 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11720 (open_and_init_dwo_file): Update.
11721 (open_dwp_file): Return gdb_bfd_ref_ptr.
11722 (open_and_init_dwp_file): Update.
11723 * corelow.c (core_open): Update.
11724 * compile/compile-object-load.c (compile_object_load): Update.
11725 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11726 * coffread.c (coff_symfile_read): Update.
11727 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11728 gdb_bfd_ref_ptr. Rename.
11729 (dump_bfd_file, restore_command): Update.
11730 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11731 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11732 (find_separate_debug_file_by_buildid): Update.
11733
50315b21
TT
117342017-01-10 Tom Tromey <tom@tromey.com>
11735
11736 * common/gdb_ref_ptr.h: New file.
11737 * python/py-ref.h (struct gdbpy_ref_policy): New.
11738 (gdbpy_ref): Now a typedef.
11739
fc4007c9
TT
117402017-01-10 Tom Tromey <tom@tromey.com>
11741
11742 * utils.h (make_cleanup_htab_delete): Don't declare.
11743 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11744 Remove.
11745 * linespec.c (decode_compound_collector): Add constructor,
11746 destructor.
11747 (lookup_prefix_sym): Remove cleanup.
11748 (symtab_collector): Add constructor, destructor.
11749 (collect_symtabs_from_filename): Remove cleanup.
11750 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11751 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11752 Use htab_up.
11753 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11754 * dwarf2read.c (dw2_expand_symtabs_matching)
11755 (dw2_map_symbol_filenames, dwarf_decode_macros)
11756 (write_psymtabs_to_index): Use htab_up.
11757 * dwarf2loc.c (func_verify_no_selftailcall)
11758 (call_site_find_chain_1, func_verify_no_selftailcall)
11759 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11760 std::vector, gdb::unique_xmalloc_ptr.
11761 (call_sitep): Remove typedef.
11762 (dwarf2_locexpr_baton_eval): Remove unused variable.
11763
8dbcee67
TT
117642017-01-10 Tom Tromey <tom@tromey.com>
11765
11766 * python/python-internal.h (make_cleanup_py_decref)
11767 (make_cleanup_py_xdecref): Don't declare.
11768 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11769 (py_xdecref, make_cleanup_py_xdecref): Remove.
11770
13df46cc
TT
117712017-01-10 Tom Tromey <tom@tromey.com>
11772
11773 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11774 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11775
06fc9bf7
TT
117762017-01-10 Tom Tromey <tom@tromey.com>
11777
11778 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11779
830a4934
TT
117802017-01-10 Tom Tromey <tom@tromey.com>
11781
11782 * python/py-utils.c (unicode_to_encoded_string)
11783 (python_string_to_target_string)
11784 (python_string_to_target_python_string)
11785 (python_string_to_host_string, gdbpy_obj_to_string)
11786 (get_addr_from_python): Use gdbpy_ref.
11787
4586d543
TT
117882017-01-10 Tom Tromey <tom@tromey.com>
11789
11790 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11791 gdbpy_ref.
11792
59876f8f
TT
117932017-01-10 Tom Tromey <tom@tromey.com>
11794
11795 * python/python.c (eval_python_command, gdbpy_decode_line)
11796 (gdbpy_run_events, gdbpy_start_type_printers)
11797 (gdbpy_apply_type_printers): Use gdbpy_ref.
11798
97d83487
TT
117992017-01-10 Tom Tromey <tom@tromey.com>
11800
11801 * python/py-param.c (get_doc_string, compute_enum_values): Use
11802 gdbpy_ref.
11803
9205649a
TT
118042017-01-10 Tom Tromey <tom@tromey.com>
11805
11806 * python/py-inferior.c (find_thread_object, build_inferior_list):
11807 Use gdbpy_ref.
11808
74c49d45
TT
118092017-01-10 Tom Tromey <tom@tromey.com>
11810
11811 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11812
16361ffb
TT
118132017-01-10 Tom Tromey <tom@tromey.com>
11814
11815 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11816 gdbpy_ref.
11817
905f2cca
TT
118182017-01-10 Tom Tromey <tom@tromey.com>
11819
11820 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11821 extra incref.
11822 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11823 Use gdbpy_ref.
11824
64081434
TT
118252017-01-10 Tom Tromey <tom@tromey.com>
11826
11827 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11828 gdbpy_ref.
11829
59e9e831
TT
118302017-01-10 Tom Tromey <tom@tromey.com>
11831
11832 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11833 decref results of PyArg_ParseTupleAndKeywords.
11834
9de10f6d
TT
118352017-01-10 Tom Tromey <tom@tromey.com>
11836
11837 * python/python.c (python_run_simple_file): Use
11838 unique_xmalloc_ptr, gdbpy_ref.
11839
2bd5759d
TT
118402017-01-10 Tom Tromey <tom@tromey.com>
11841
11842 * python/py-prettyprint.c (print_stack_unless_memory_error)
11843 (print_string_repr, print_children): Use gdbpy_ref.
11844 (dummy_python_frame): New class.
11845 (dummy_python_frame::dummy_python_frame): Rename from
11846 push_dummy_python_frame.
11847 (py_restore_tstate): Remove.
11848
3b4e0e01
TT
118492017-01-10 Tom Tromey <tom@tromey.com>
11850
11851 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11852
17a22718
TT
118532017-01-10 Tom Tromey <tom@tromey.com>
11854
11855 * python/python.c (ensure_python_env, restore_python_env):
11856 Remove.
11857 * python/python-internal.h (ensure_python_env): Don't declare.
11858 * varobj.h (varobj_ensure_python_env): Don't declare.
11859 * varobj.c (varobj_ensure_python_env): Remove.
11860
68cdc557
TT
118612017-01-10 Tom Tromey <tom@tromey.com>
11862
11863 * varobj.c (varobj_value_get_print_value): Use
11864 gdbpy_enter_varobj.
11865
1eba6383
TT
118662017-01-10 Tom Tromey <tom@tromey.com>
11867
11868 * python/py-prettyprint.c (print_string_repr, print_children):
11869 Update.
11870 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11871 of "encoding".
11872 * varobj.c (varobj_value_get_print_value): Update.
11873 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11874
bde7b3e3
TT
118752017-01-10 Tom Tromey <tom@tromey.com>
11876
11877 * varobj.c (varobj_get_display_hint)
11878 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11879 (varobj_set_visualizer, free_variable): Use
11880 gdbpy_enter_varobj.
11881
a7785f8c
TT
118822017-01-10 Tom Tromey <tom@tromey.com>
11883
11884 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11885 (do_finish_initialization): New function. Use gdbpy_ref.
11886 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11887 do_finish_initialization.
11888
2865bfce
TT
118892017-01-10 Tom Tromey <tom@tromey.com>
11890
11891 * python/py-param.c (get_set_value, get_show_value): Use
11892 gdbpy_enter, gdbpy_ref.
11893
0e9dcc75
TT
118942017-01-10 Tom Tromey <tom@tromey.com>
11895
11896 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11897
12a5cedd
TT
118982017-01-10 Tom Tromey <tom@tromey.com>
11899
11900 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11901
788f2586
TT
119022017-01-10 Tom Tromey <tom@tromey.com>
11903
11904 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11905 Use gdbpy_enter_varobj.
11906
6cd67bea
TT
119072017-01-10 Tom Tromey <tom@tromey.com>
11908
11909 * varobj.c (gdbpy_enter_varobj): New constructor.
11910 * python/python-internal.h (gdbpy_enter_varobj): New class.
11911 * python/py-varobj.c (py_varobj_get_iterator): Use
11912 gdbpy_enter_varobj.
11913
14b122bf
TT
119142017-01-10 Tom Tromey <tom@tromey.com>
11915
11916 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11917 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11918 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11919 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11920 unique_xmalloc_ptr.
11921 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11922
bf1ca3b9
TT
119232017-01-10 Tom Tromey <tom@tromey.com>
11924
11925 * python/py-xmethods.c (invoke_match_method): Use
11926 gdbpy_ref.
11927
572a5524
TT
119282017-01-10 Tom Tromey <tom@tromey.com>
11929
11930 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11931 gdbpy_enter, gdbpy_ref.
11932
396a78b6
TT
119332017-01-10 Tom Tromey <tom@tromey.com>
11934
11935 * python/python.c (python_interactive_command): Use gdbpy_enter.
11936
a88b13c7
TT
119372017-01-10 Tom Tromey <tom@tromey.com>
11938
11939 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11940 gdbpy_ref.
11941
e9f0c363
TT
119422017-01-10 Tom Tromey <tom@tromey.com>
11943
11944 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11945 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11946
6349f452
TT
119472017-01-10 Tom Tromey <tom@tromey.com>
11948
11949 * utils.h (htab_deleter): New struct.
11950 (htab_up): New typedef.
11951 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11952 gdbpy_enter, gdbpy_ref, htab_up.
11953
c0171de6
TT
119542017-01-10 Tom Tromey <tom@tromey.com>
11955
11956 * python/py-unwind.c (pending_frame_invalidate): Remove.
11957 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11958
f18e226f
TT
119592017-01-10 Tom Tromey <tom@tromey.com>
11960
11961 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11962 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11963
c57af3f1
TT
119642017-01-10 Tom Tromey <tom@tromey.com>
11965
11966 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11967
60e600ec
TT
119682017-01-10 Tom Tromey <tom@tromey.com>
11969
11970 * python/python.c (gdbpy_eval_from_control_command)
11971 (gdbpy_source_script, gdbpy_run_events)
11972 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11973 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11974 gdbpy_enter.
11975
bf7da5b0
TT
119762017-01-10 Tom Tromey <tom@tromey.com>
11977
11978 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11979
2d38bced
TT
119802017-01-10 Tom Tromey <tom@tromey.com>
11981
11982 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11983
07bc7329
TT
119842017-01-10 Tom Tromey <tom@tromey.com>
11985
11986 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11987 (python_on_inferior_call_pre, python_on_inferior_call_post)
11988 (python_on_memory_change, python_on_register_change)
11989 (python_inferior_exit, python_new_objfile, add_thread_object)
11990 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11991
6e7c365e
TT
119922017-01-10 Tom Tromey <tom@tromey.com>
11993
11994 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11995 (bpfinishpy_handle_exit): Use gdbpy_enter.
11996
6ba0cd40
TT
119972017-01-10 Tom Tromey <tom@tromey.com>
11998
11999 * python/py-cmd.c (cmdpy_destroyer)
12000 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12001 gdbpy_enter.
12002
de2dc875
TT
120032017-01-10 Tom Tromey <tom@tromey.com>
12004
12005 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12006 gdbpy_enter.
12007 (gdbpy_breakpoint_has_cond): Likewise.
12008
4ecee2c4
TT
120092017-01-10 Tom Tromey <tom@tromey.com>
12010
12011 * python/python.c (gdbpy_enter): New constructor.
12012 (~gdbpy_enter): New destructor.
12013 (restore_python_env, ensure_python_env): Rewrite.
12014 * python/python-internal.h (gdbpy_enter): New class.
12015
37fce74f
TT
120162017-01-10 Tom Tromey <tom@tromey.com>
12017
12018 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12019
53a0cca3
TT
120202017-01-10 Tom Tromey <tom@tromey.com>
12021
12022 * python/py-value.c (value_has_field, get_field_flag)
12023 (get_field_type, valpy_getitem, convert_value_from_python): Use
12024 gdbpy_ref.
12025
ff3724f5
TT
120262017-01-10 Tom Tromey <tom@tromey.com>
12027
12028 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12029 gdbpy_ref.
12030
0700aea5
TT
120312017-01-10 Tom Tromey <tom@tromey.com>
12032
12033 * python/py-prettyprint.c (search_pp_list)
12034 (find_pretty_printer_from_objfiles)
12035 (find_pretty_printer_from_progspace)
12036 (find_pretty_printer_from_gdb, find_pretty_printer)
12037 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12038 gdbpy_ref.
12039
1bb44c9f
TT
120402017-01-10 Tom Tromey <tom@tromey.com>
12041
12042 * python/py-param.c (call_doc_function): Use gdbpy_ref.
12043
87ce03fd
TT
120442017-01-10 Tom Tromey <tom@tromey.com>
12045
12046 * python/py-linetable.c (build_line_table_tuple_from_pcs)
12047 (ltpy_get_all_source_lines): Use gdbpy_ref.
12048
ee0a3fb8
TT
120492017-01-10 Tom Tromey <tom@tromey.com>
12050
12051 * python/py-framefilter.c (extract_sym, extract_value)
12052 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12053 gdbpy_ref.
12054
bf2a52fa
TT
120552017-01-10 Tom Tromey <tom@tromey.com>
12056
12057 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12058
f59fe7f8
TT
120592017-01-10 Tom Tromey <tom@tromey.com>
12060
12061 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12062
80bd970a
TT
120632017-01-10 Tom Tromey <tom@tromey.com>
12064
12065 * python/py-function.c (convert_values_to_python, fnpy_init): Use
12066 gdbpy_ref.
12067
d1b3de2e
TT
120682017-01-10 Tom Tromey <tom@tromey.com>
12069
12070 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12071
3bb43384
TT
120722017-01-10 Tom Tromey <tom@tromey.com>
12073
12074 * python/py-type.c (convert_field, make_fielditem, typy_fields)
12075 (typy_range): Use gdbpy_ref.
12076
abf5651e
TT
120772017-01-10 Tom Tromey <tom@tromey.com>
12078
12079 * python/py-threadevent.c (create_thread_event_object): Use
12080 gdbpy_ref.
12081 * python/py-stopevent.c (create_stop_event_object): Simplify.
12082 (emit_stop_event): Use gdbpy_ref.
12083 * python/py-signalevent.c (create_signal_event_object): Use
12084 gdbpy_ref.
12085 * python/py-newobjfileevent.c (create_new_objfile_event_object)
12086 (emit_new_objfile_event, create_clear_objfiles_event_object)
12087 (emit_clear_objfiles_event): Use gdbpy_ref.
12088 * python/py-infevents.c (create_inferior_call_event_object)
12089 (create_register_changed_event_object)
12090 (create_memory_changed_event_object, emit_inferior_call_event)
12091 (emit_memory_changed_event, emit_register_changed_event): Use
12092 gdbpy_ref.
12093 * python/py-exitedevent.c (create_exited_event_object)
12094 (emit_exited_event): Use gdbpy_ref.
12095 * python/py-event.h (evpy_emit_event): Remove
12096 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12097 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12098 * python/py-continueevent.c (emit_continue_event): Use
12099 gdbpy_ref.
12100 * python/py-breakpoint.c (gdbpy_breakpoint_created)
12101 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12102 gdbpy_ref.
12103 * python/py-bpevent.c (create_breakpoint_event_object): Use
12104 gdbpy_ref.
12105
a68ff33e
TT
121062017-01-10 Tom Tromey <tom@tromey.com>
12107
12108 * python/py-ref.h: New file.
12109
7becfd03
SM
121102017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12111
12112 * cli-out.c (cli_ui_out::do_redirect): Change return type to
12113 void.
12114 * cli-out.h (cli_ui_out::do_redirect): Likewise.
12115 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12116 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12117 * ui-out.c (ui_out::redirect): Likewise.
12118 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12119 * cli/cli-logging.c (set_logging_redirect): Update call site of
12120 ui_out::redirect.
12121 (handle_redirections): Likewise.
12122 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12123 * top.c (execute_command_to_string): Likewise.
12124 * utils.c (do_ui_out_redirect_pop): Likewise.
12125
df294654
SM
121262017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12127
12128 * stack.c (_initialize_stack): Update "frame" command help message.
12129
f5e6296e
IB
121302017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
12131
12132 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12133
0e2d6fa6
YQ
121342017-01-06 Yao Qi <yao.qi@linaro.org>
12135
12136 * x86-linux-nat.h: Include gdb_proc_service.h.
12137
44d6d3f9
YQ
121382017-01-06 Yao Qi <yao.qi@linaro.org>
12139
12140 * ser-base.h: Include serial.h.
12141
656731fe
YQ
121422017-01-06 Yao Qi <yao.qi@linaro.org>
12143
12144 * ppc-linux-tdep.h: Include ppc-tdep.h.
12145
1ca8f924
YQ
121462017-01-06 Yao Qi <yao.qi@linaro.org>
12147
12148 * nat/amd64-linux-siginfo.h: Include signal.h.
12149
bc3008c4
YQ
121502017-01-06 Yao Qi <yao.qi@linaro.org>
12151
12152 * nat/aarch64-linux-hw-point.h: Include break-common.h.
12153
66c80d03
YQ
121542017-01-06 Yao Qi <yao.qi@linaro.org>
12155
12156 * mi/mi-parse.h: Include mi-cmds.h.
12157
051d2dda
YQ
121582017-01-06 Yao Qi <yao.qi@linaro.org>
12159
12160 * inf-loop.c: Don't include "target.h".
12161 * inf-loop.h: Include it here.
12162
8018d34f
YQ
121632017-01-06 Yao Qi <yao.qi@linaro.org>
12164
12165 * dfp.h: Include "dboulest.h" and "expression.h".
12166
c0b8369c
YQ
121672017-01-06 Yao Qi <yao.qi@linaro.org>
12168
12169 * ax-gdb.h: Include "ax.h".
12170
ad5cba2a
YQ
121712017-01-06 Yao Qi <yao.qi@linaro.org>
12172
12173 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12174 with nat/gdb_ptrace.h.
12175
1c33cd7f
YQ
121762017-01-05 Yao Qi <yao.qi@linaro.org>
12177
12178 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12179 new line.
12180 (mips64_fbsd_sigframe_init): Likewise.
12181
c988ac1d
JB
121822017-01-04 John Baldwin <jhb@FreeBSD.org>
12183
12184 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12185 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12186
b268007c
JB
121872017-01-04 John Baldwin <jhb@FreeBSD.org>
12188
12189 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12190 * NEWS: Mention new FreeBSD/mips native configuration.
12191 * config/mips/fbsd.mh: New file.
12192 * configure.host: Add mips*-*-freebsd*.
12193 * mips-fbsd-nat.c: New file.
12194
387360da
JB
121952017-01-04 John Baldwin <jhb@FreeBSD.org>
12196
12197 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12198 (ALLDEPFILES): Add mips-fbsd-tdep.c.
12199 * NEWS: Mention new FreeBSD/mips target.
12200 * configure.tgt: Add mips*-*-freebsd*.
12201 * mips-fbsd-tdep.c: New file.
12202 * mips-fbsd-tdep.h: New file.
12203
2aaaf250
YQ
122042017-01-04 Yao Qi <yao.qi@linaro.org>
12205
12206 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12207 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12208
61baf725
JB
122092017-01-01 Joel Brobecker <brobecker@adacore.com>
12210
6dbb839a 12211 Update copyright year range in all GDB files.
61baf725 12212
c113e7ff 122132017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 12214
c113e7ff 12215 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 12216
c113e7ff 12217For older changes see ChangeLog-2016.
c906108c
SS
12218\f
12219Local Variables:
12220mode: change-log
12221left-margin: 8
12222fill-column: 74
12223version-control: never
57da7796 12224coding: utf-8
c906108c 12225End:
This page took 2.591042 seconds and 4 git commands to generate.