]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Remove cleanups from mi_cmd_break_insert_1
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
784c453a
TT
12017-09-29 Tom Tromey <tom@tromey.com>
2
3 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4 (mi_cmd_break_insert_1): Update.
5
a9bc57b9
TT
62017-09-29 Tom Tromey <tom@tromey.com>
7
8 * target.h (make_scoped_defer_target_commit_resume): Update.
9 * target.c (make_scoped_defer_target_commit_resume): Rename from
10 make_cleanup_defer_target_commit_resume. Return a
11 scoped_restore.
12 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
13
9754d8c4
TT
142017-09-29 Tom Tromey <tom@tromey.com>
15
16 * main.c (captured_main_1): Remove unused declaration.
17 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
18
99ef965c
TT
192017-09-29 Tom Tromey <tom@tromey.com>
20
21 * symtab.c (search_symbols): Remove unused outer cleanup.
22 (make_source_files_completion_list): Remove unused declaration.
23
42518ba7
TT
242017-09-29 Tom Tromey <tom@tromey.com>
25
26 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
27
726b2169
TT
282017-09-29 Tom Tromey <tom@tromey.com>
29
30 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
31 gdb::byte_vector.
32
55b06432
TT
332017-09-29 Tom Tromey <tom@tromey.com>
34
35 * complaints.c (vcomplaint): Use std::string.
36
8abcee91
TT
372017-09-29 Tom Tromey <tom@tromey.com>
38
39 * tracepoint.c (trace_variable_command): Use std::string.
40 (encode_actions_1): Remove unused declarations.
41 (create_tsv_from_upload): Use std::string.
42
6ad94bc7
TT
432017-09-29 Tom Tromey <tom@tromey.com>
44
45 * cp-support.c (gdb_demangle): Use std::string.
46
2003f3d8
TT
472017-09-29 Tom Tromey <tom@tromey.com>
48
49 * stack.c (parse_frame_specification): Use std::string
50 (info_frame_command): Use gdb::unique_xmalloc_ptr.
51
8f8accb5
TT
522017-09-29 Tom Tromey <tom@tromey.com>
53
54 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
55
200aa7b1
TT
562017-09-29 Tom Tromey <tom@tromey.com>
57
58 * utils.c (vfprintf_maybe_filtered): Use std::string.
59 (vfprintf_unfiltered): Likewise.
60
606aae8a
TT
612017-09-29 Tom Tromey <tom@tromey.com>
62
63 * event-top.c (top_level_prompt): Return std::string.
64 (display_gdb_prompt): Update.
65
bd413795
TT
662017-09-29 Tom Tromey <tom@tromey.com>
67
68 * unittests/common-utils-selftests.c (format): New function.
69 (string_vprintf_tests): New function.
70 (_initialize_common_utils_selftests): Register new tests.
71 * common/common-utils.c (string_vprintf): New function.
72 * common/common-utils.h (string_vprintf): Declare.
73
256642e8
PA
742017-09-29 Pedro Alves <palves@redhat.com>
75
76 * common/rsp-low.c (unpack_varlen_hex): Constify.
77 * common/rsp-low.h (unpack_varlen_hex): Constify.
78 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
79 Constify.
80 * remote.c (remote_set_permissions, read_ptid)
81 (remote_current_thread, remote_get_threads_with_qthreadinfo)
82 (remote_static_tracepoint_marker_at)
83 (remote_static_tracepoint_markers_by_strid)
84 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
85 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
86 (parse_tracepoint_definition, parse_tsv_definition)
87 (parse_static_tracepoint_marker_definition): Constify.
88 * tracepoint.h (parse_static_tracepoint_marker_definition)
89 (parse_trace_status, parse_tracepoint_status)
90 (parse_tracepoint_definition, parse_tsv_definition): Constify.
91
b6bb3468
PA
922017-09-29 Pedro Alves <palves@redhat.com>
93
94 * remote.c (target_buf, target_buf_size): Delete.
95 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
96 Use the connection's packet buffer instead.
97 All callers adjusted.
98 (_initialize_remote): Remove references to target_buf and
99 target_buf_size.
100
b2f8eb7a
PA
1012017-09-28 Pedro Alves <palves@redhat.com>
102
103 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
104 unittests/common-utils-selftests.c.
105 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
106 (COMMON_OBS): Remove utils-selftests.o.
107 * utils-selftests.c: Move to ...
108 * unittests/common-utils-selftests.c: ... here and rename self
109 test to "string_printf".
110
08302ed2
DE
1112017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
112
113 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
114 having NULL cus or tus.
115
96a5a1d3
UW
1162017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
117
118 * arm-tdep.c: (convert_from_extended): Remove.
119 (convert_to_extended): Likewise.
120 (arm_extract_return_value): Use convert_typed_floating.
121 (arm_store_return_value): Likewise.
122
123 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
124 * sh-tdep.c: Do not include "floatformat.h".
125 (sh_littlebyte_bigword_type): New function.
126 (sh_register_convert_to_virtual): Use convert_typed_floating.
127 (sh_register_convert_to_raw): Likewise.
128 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
129 (sh64_littlebyte_bigword_type): New function.
130 (sh64_extract_return_value): Use convert_typed_floating.
131 (sh64_register_convert_to_virtual): Likewise.
132 (sh64_register_convert_to_raw): Likewise.
133
0db7851f
UW
1342017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
135
136 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
137 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
138
139 * gdbtypes.h (union type_specific): Make field floatformat hold
140 just a single struct floatformat, not an array.
141 (floatformat_from_type): Move here.
142 * gdbtypes.c (floatformat_from_type): Move here. Update to
143 changed TYPE_FLOATFORMAT definition.
144 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
145 (recursive_dump_type): Likewise.
146 (init_float_type): Install correct floatformat for byte order.
147 (arch_float_type): Likewise.
148
77b7c781
UW
1492017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
150
151 * gdbtypes.c (init_type): Change incoming argument from
152 length-in-bytes to length-in-bits. Assert length is a
153 multiple of TARGET_CHAR_BITS.
154 (arch_type, arch_flags_type): Likewise.
155 (init_integer_type): Update call to init_type.
156 (init_character_type): Likewise.
157 (init_boolean_type): Likewise.
158 (init_float_type): Likewise.
159 (init_decfloat_type): Likewise.
160 (init_complex_type): Likewise.
161 (init_pointer_type): Likewise.
162 (objfile_type): Likewise.
163 (arch_integer_type): Update call to arch_type.
164 (arch_character_type): Likewise.
165 (arch_boolean_type): Likewise.
166 (arch_float_type): Likewise.
167 (arch_decfloat_type): Likewise.
168 (arch_complex_type): Likewise.
169 (arch_pointer_type): Likewise.
170 (gdbtypes_post_init): Likewise.
171
172 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
173 (read_base_type): Likewise.
174 * mdebugread.c (basic_type): Likewise.
175 * stabsread.c (dbx_init_float_type): Likewise.
176 (rs6000_builtin_type): Likewise.
177 (read_range_type): Likewise. Also, fix call to init_integer_type
178 with erroneous length argument.
179
180 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
181 * d-lang.c (build_d_types): Likewise.
182 * f-lang.c (build_fortran_types): Likewise.
183 * go-lang.c (build_go_types): Likewise.
184 * opencl-lang.c (build_opencl_types): Likewise.
185 * jit.c (finalize_symtab): Likewise.
186 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
187 (build_std_type_info_type): Likewise.
188 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
189 update call to arch_flags_type.
190
191 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
192 arch_type.
193 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
194 * windows-tdep.c (windows_get_tlb_type): Likewise.
195
196 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
197 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
198 * m32c-tdep.c (make_types): Likewise.
199 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
200 (rl78_psw_type): Update call to arch_flags_type.
201 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
202 * rx-tdep.c (rx_psw_type): Likewise.
203 (rx_fpsw_type): Likewise.
204 * sparc-tdep.c (sparc_psr_type): Likewise.
205 (sparc_fsr_type): Likewise.
206 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
207 (sparc64_ccr_type): Likewise.
208 (sparc64_fsr_type): Likewise.
209 (sparc64_fprs_type): Likewise.
210
f21b4d5c
TT
2112017-09-27 Tom Tromey <tom@tromey.com>
212
213 * findcmd.c (find_command): Constify.
214
643c2ffa
TT
2152017-09-27 Tom Tromey <tom@tromey.com>
216
217 * ada-tasks.c (task_command_1, task_command): Constify.
218
510e5e56
TT
2192017-09-27 Tom Tromey <tom@tromey.com>
220
221 * symtab.c (maintenance_print_symbol_cache)
222 (maintenance_flush_symbol_cache)
223 (maintenance_print_symbol_cache_statistics): Constify.
224
e503b191
TT
2252017-09-27 Tom Tromey <tom@tromey.com>
226
227 * inferior.c (detach_inferior_command, kill_inferior_command)
228 (inferior_command): Constify.
229
4e001312
TT
2302017-09-27 Tom Tromey <tom@tromey.com>
231
232 * regcache.c (regcache_print, maintenance_print_registers)
233 (maintenance_print_raw_registers)
234 (maintenance_print_cooked_registers)
235 (maintenance_print_register_groups)
236 (maintenance_print_remote_registers): Constify.
237
77763700
TT
2382017-09-27 Tom Tromey <tom@tromey.com>
239
240 * printcmd.c (map_display_numbers, undisplay_command)
241 (enable_disable_display_command, enable_display_command)
242 (disable_display_command): Constify.
243
4495129a
TT
2442017-09-27 Tom Tromey <tom@tromey.com>
245
246 * breakpoint.h (delete_command): Don't declare.
247 * breakpoint.c (delete_command, enable_once_command)
248 (enable_count_command, enable_delete_command, breakpoint_1)
249 (maintenance_info_breakpoints, stopin_command, stopat_command)
250 (delete_command, delete_trace_command, save_breakpoints)
251 (save_breakpoints_command, save_tracepoints_command): Constify.
252
3088cf40
TT
2532017-09-27 Tom Tromey <tom@tromey.com>
254
255 * macrocmd.c (macro_expand_command, macro_expand_once_command)
256 (skip_ws, extract_identifier, macro_define_command)
257 (macro_undef_command, macro_list_command): Constify.
258
69f476a3
TT
2592017-09-27 Tom Tromey <tom@tromey.com>
260
261 * infcmd.c (environment_info, set_environment_command)
262 (unset_environment_command, path_info, info_proc_cmd_1)
263 (info_proc_cmd_mappings, info_proc_cmd_stat)
264 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
265 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
266
c4a3e68e
TT
2672017-09-27 Tom Tromey <tom@tromey.com>
268
269 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
270 Constify.
271
c9d31bd6
TT
2722017-09-27 Tom Tromey <tom@tromey.com>
273
274 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
275
1f3f85eb
TT
2762017-09-27 Tom Tromey <tom@tromey.com>
277
278 * demangle.c (demangle_command): Constify.
279
9c504b5d
TT
2802017-09-27 Tom Tromey <tom@tromey.com>
281
282 * progspace.c (maintenance_info_program_spaces_command):
283 Constify.
284
6663cf91
TT
2852017-09-27 Tom Tromey <tom@tromey.com>
286
287 * compile/compile.c (check_raw_argument, compile_file_command)
288 (compile_code_command, compile_print_command): Constify.
289
34e5fa26
TT
2902017-09-27 Tom Tromey <tom@tromey.com>
291
292 * reggroups.c (maintenance_print_reggroups): Constify.
293
8384c356
TT
2942017-09-27 Tom Tromey <tom@tromey.com>
295
296 * dwarf2read.c (save_gdb_index_command): Constify.
297
884beb0c
TT
2982017-09-27 Tom Tromey <tom@tromey.com>
299
300 * stap-probe.c (info_probes_stap_command): Constify.
301
e0b2930c
TT
3022017-09-27 Tom Tromey <tom@tromey.com>
303
304 * fork-child.c (unset_exec_wrapper_command): Constify.
305
f938677d
TT
3062017-09-27 Tom Tromey <tom@tromey.com>
307
308 * btrace.c (get_uint, get_context_size, no_chunk)
309 (maint_btrace_packet_history_cmd)
310 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
311 (maint_info_btrace_cmd): Constify.
312
8949cb87
TT
3132017-09-27 Tom Tromey <tom@tromey.com>
314
315 * reverse.c (delete_bookmark_command): Constify.
316
ac88e2de
TT
3172017-09-27 Tom Tromey <tom@tromey.com>
318
319 * remote.c (set_memory_packet_size)
320 (set_memory_write_packet_size, show_memory_write_packet_size)
321 (set_memory_read_packet_size, show_memory_read_packet_size)
322 (compare_sections_command, packet_command, remote_put_command)
323 (remote_get_command, remote_delete_command): Constify.
324
bd4c9dfe
TT
3252017-09-27 Tom Tromey <tom@tromey.com>
326
327 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
328 (set_mipsfpu_double_command, set_mipsfpu_none_command)
329 (set_mipsfpu_auto_command): Constify.
330
5e93d4c6
TT
3312017-09-27 Tom Tromey <tom@tromey.com>
332
333 * cli/cli-cmds.h (cd_command): Constify.
334 * cli/cli-cmds.c (cd_command): Constify.
335
fc41a75b
TT
3362017-09-27 Tom Tromey <tom@tromey.com>
337
338 * thread.c (thread_name_command, thread_find_command): Constify.
339
67810076
TT
3402017-09-27 Tom Tromey <tom@tromey.com>
341
342 * probe.c (enable_probes_command, disable_probes_command):
343 Constify.
344
1d8b34a7
TT
3452017-09-27 Tom Tromey <tom@tromey.com>
346
347 * symfile.c (symbol_file_command): Constify.
348 * gdbcore.h (deprecated_file_changed_hook): Constify.
349 * exec.c (deprecated_file_changed_hook, exec_file_command)
350 (file_command): Constify.
351 * defs.h (symbol_file_command): Constify.
352
442019e1
TT
3532017-09-27 Tom Tromey <tom@tromey.com>
354
355 * remote-fileio.c (set_system_call_allowed)
356 (show_system_call_allowed): Constify.
357
2983f7cb
TT
3582017-09-27 Tom Tromey <tom@tromey.com>
359
360 * tracepoint.c (delete_trace_variable_command)
361 (tfind_end_command, tfind_start_command, tfind_pc_command)
362 (tfind_tracepoint_command, tfind_line_command)
363 (tfind_range_command, tfind_outside_command): Constify.
364
4fd41b24
TT
3652017-09-27 Tom Tromey <tom@tromey.com>
366
367 * ax-gdb.c (maint_agent_printf_command, agent_command)
368 (agent_eval_command): Constify.
369
f2fc3015
TT
3702017-09-27 Tom Tromey <tom@tromey.com>
371
372 * tracepoint.c (info_scope_command): Constify.
373 * python/python.c (gdbpy_decode_line): Constify.
374 * python/py-breakpoint.c (bppy_init): Constify.
375 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
376 * location.h: (new_linespec_location)
377 (string_to_event_location_basic, string_to_event_location):
378 Constify.
379 * location.c (new_linespec_location)
380 (string_to_event_location_basic, string_to_event_location):
381 Constify.
382 * linespec.h (decode_line_with_current_source)
383 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
384 * linespec.c (linespec_lex_to_end)
385 (decode_line_with_current_source)
386 (decode_line_with_last_displayed): Constify.
387 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
388 Constify.
389 * cli/cli-cmds.c (edit_command, list_command): Constify.
390 * breakpoint.h (until_break_command, watch_command_wrapper)
391 (awatch_command_wrapper, rwatch_command_wrapper)
392 (init_ada_exception_breakpoint): Constify.
393 * breakpoint.c (break_command_1, dprintf_command)
394 (break_range_command, watch_command_wrapper)
395 (rwatch_command_wrapper, awatch_command_wrapper)
396 (until_break_command, init_ada_exception_breakpoint)
397 (strace_marker_create_sals_from_location, trace_command)
398 (ftrace_command, strace_command, struct tracepoint): Constify.
399 * ax-gdb.c (agent_command_1): Constify.
400 * ada-lang.c (ada_exception_sal): Constify.
401
8c2f95f4
TT
4022017-09-27 Tom Tromey <tom@tromey.com>
403
404 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
405 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
406 (get_context_size, no_chunk, get_insn_history_modifiers)
407 (cmd_record_insn_history, get_call_history_modifiers)
408 (cmd_record_call_history): Constify.
409
a0d65762
TT
4102017-09-27 Tom Tromey <tom@tromey.com>
411
412 * source.c (show_substitute_path_command)
413 (unset_substitute_path_command, set_substitute_path_command):
414 Constify.
415
58971144
TT
4162017-09-27 Tom Tromey <tom@tromey.com>
417
418 * typeprint.c (maintenance_print_type): Constify.
419 * maint.c (maintenance_dump_me, maintenance_demangle)
420 (maintenance_time_display, maintenance_info_sections)
421 (maintenance_print_statistics, maintenance_deprecate)
422 (maintenance_undeprecate): Constify.
423 (maintenance_do_deprecate): Constify. Use std::string.
424 (maintenance_selftest): Constify.
425 * gdbtypes.h (maintenance_print_type): Constify.
426
c482f52c
TT
4272017-09-27 Tom Tromey <tom@tromey.com>
428
429 * hppa-tdep.c (unwind_command): Constify.
430
e100df1a
TT
4312017-09-27 Tom Tromey <tom@tromey.com>
432
433 * target-descriptions.c (unset_tdesc_filename_cmd)
434 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
435 Constify.
436
31d56ade
TT
4372017-09-27 Tom Tromey <tom@tromey.com>
438
439 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
440
b961da0b
TT
4412017-09-27 Tom Tromey <tom@tromey.com>
442
443 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
444
e2d8ae16
TT
4452017-09-27 Tom Tromey <tom@tromey.com>
446
447 * tui/tui-regs.c (tui_reg_command): Constify.
448
863779b0
TT
4492017-09-27 Tom Tromey <tom@tromey.com>
450
451 * skip.c (skip_file_command, skip_function_command)
452 (skip_enable_command, skip_disable_command, skip_delete_command):
453 Constify.
454
cdb34d4a
TT
4552017-09-27 Tom Tromey <tom@tromey.com>
456
457 * record-btrace.c (cmd_record_btrace_bts_start)
458 (cmd_record_btrace_pt_start): Constify.
459
e99c83e7
TT
4602017-09-27 Tom Tromey <tom@tromey.com>
461
462 * symmisc.c (maintenance_print_symbols)
463 (maintenance_print_msymbols, maintenance_print_objfiles)
464 (maintenance_info_symtabs, maintenance_check_symtabs)
465 (maintenance_expand_symtabs, maintenance_info_line_tables):
466 Constify.
467
32faf971
TT
4682017-09-27 Tom Tromey <tom@tromey.com>
469
470 * top.c (new_ui_command): Constify.
471
2cf311eb
TT
4722017-09-27 Tom Tromey <tom@tromey.com>
473
474 * symfile.c (add_symbol_file_command)
475 (remove_symbol_file_command, list_overlays_command)
476 (map_overlay_command, unmap_overlay_command)
477 (overlay_auto_command, overlay_manual_command)
478 (overlay_off_command, overlay_load_command): Constify.
479
e6738699
TT
4802017-09-27 Tom Tromey <tom@tromey.com>
481
482 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
483 (info_spu_mailbox_command, info_spu_dma_command)
484 (info_spu_proxydma_command): Constify.
485
aa360cd5
TT
4862017-09-27 Tom Tromey <tom@tromey.com>
487
488 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
489
898241a5
TT
4902017-09-27 Tom Tromey <tom@tromey.com>
491
492 * cli/cli-script.c (user_defined_command): Constify.
493
2d0ac106
TT
4942017-09-27 Tom Tromey <tom@tromey.com>
495
496 * cli/cli-dump.c (dump_memory_command, dump_value_command)
497 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
498 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
499 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
500 (dump_binary_value, append_binary_memory, append_binary_value):
501 Constify.
502 (struct dump_context) <func>: Constify.
503 (add_dump_command): Update.
504
dede02ce
TT
5052017-09-27 Tom Tromey <tom@tromey.com>
506
507 * cli/cli-cmds.c (show_version, show_configuration)
508 (source_command, show_user): Constify.
509
d3cb6b99
TT
5102017-09-27 Tom Tromey <tom@tromey.com>
511
512 * target.c (maintenance_print_target_stack): Constify.
513
1970a12f
TT
5142017-09-27 Tom Tromey <tom@tromey.com>
515
516 * interps.c (interpreter_exec_cmd): Constify.
517
41243651
TT
5182017-09-27 Tom Tromey <tom@tromey.com>
519
520 * record-full.c (cmd_record_full_restore): Constify.
521
4465d9db
TT
5222017-09-27 Tom Tromey <tom@tromey.com>
523
524 * memattr.c (enable_mem_command, disable_mem_command)
525 (delete_mem_command): Constify.
526
ad25e423
TT
5272017-09-27 Tom Tromey <tom@tromey.com>
528
529 * value.c (show_convenience): Constify.
530
d64097b1
TT
5312017-09-27 Tom Tromey <tom@tromey.com>
532
533 * gdbcore.h (core_file_command): Update.
534 * corefile.c (core_file_command): Constify.
535
4d4589ef
TT
5362017-09-27 Tom Tromey <tom@tromey.com>
537
538 * user-regs.c (maintenance_print_user_registers): Constify.
539
32a7bf17
TT
5402017-09-27 Tom Tromey <tom@tromey.com>
541
542 * cp-namespace.c (maintenance_cplus_namespace): Constify.
543
4a475551
TT
5442017-09-27 Tom Tromey <tom@tromey.com>
545
546 * cp-support.c (first_component_command): Constify.
547
990b9f9f
TT
5482017-09-27 Tom Tromey <tom@tromey.com>
549
550 * psymtab.c (maintenance_print_psymbols)
551 (maintenance_info_psymtabs, maintenance_check_psymtabs):
552 Constify.
553
c281872e
TT
5542017-09-27 Tom Tromey <tom@tromey.com>
555
556 * windows-tdep.c (display_tib): Constify.
557
5b64bf74
TT
5582017-09-27 Tom Tromey <tom@tromey.com>
559
560 * linux-fork.c (delete_checkpoint_command)
561 (detach_checkpoint_command): Constify.
562
4ada038f
TT
5632017-09-27 Tom Tromey <tom@tromey.com>
564
565 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
566
57f5a81b
TT
5672017-09-27 Tom Tromey <tom@tromey.com>
568
569 * arc-tdep.c (dump_arc_instruction_command): Constify.
570
b0a8e6c4
TT
5712017-09-27 Tom Tromey <tom@tromey.com>
572
573 * valprint.c (set_radix, show_radix): Constify.
574
8d97dc1c
TT
5752017-09-27 Tom Tromey <tom@tromey.com>
576
577 * dtrace-probe.c (info_probes_dtrace_command): Constify.
578
eb7c454d
TT
5792017-09-27 Tom Tromey <tom@tromey.com>
580
581 * command.h (not_just_help_class_command): Update.
582 * cli/cli-decode.h (not_just_help_class_command): Update.
583 * cli/cli-decode.c (not_just_help_class_command): Constify.
584
e4e33335
TT
5852017-09-27 Tom Tromey <tom@tromey.com>
586
587 * gdb_bfd.c (maintenance_info_bfds): Constify.
588
0450cc4c
TT
5892017-09-27 Tom Tromey <tom@tromey.com>
590
591 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
592 overloads.
593 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
594 (do_const_cfunc): New function.
595 (cmd_cfunc_eq): New overload.
596 (cli_user_command_p): Check do_const_cfunc.
597 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
598 const_cfunc.
599 * command.h (add_cmd): Add const overload and no-function
600 overload.
601 (set_cmd_cfunc): Add const overload.
602 (cmd_const_cfunc_ftype): Declare.
603 (cmd_cfunc_eq): Add const overload.
604 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
605 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
606 overload.
607
a9bbfbd8
TT
6082017-09-27 Tom Tromey <tom@tromey.com>
609
610 * macroexp.c (get_next_token_for_substitution): New function.
611 (substitute_args): Call it. Check for __VA_OPT__.
612
5230b05a
WT
6132017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
614 Pedro Alves <palves@redhat.com>
615
616 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
617 producer_is_icc_lt_14.
618 (producer_is_icc_lt_14): New function.
619 (check_producer): Add code for checking version of ICC.
620 (producer_is_icc): Move to producer.c.
621 (read_structure_type): Restrict ICC workaround to ICC<14.
622 * producer.c: Include selftest.h.
623 (producer_is_icc, producer_parsing_tests, _initialize_producer):
624 New functions.
625 * producer.h (producer_is_icc): New declaration.
626
b32b108a
WT
6272017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
628
629 * Makefile.in (SFILES): Add producer.c.
630 (COMMON_OBS): Add producer.o
631 * amd64-tdep.c (producer.h): Add new include.
632 * dwarf2read.c (producer.h): Add new include.
633 * producer.c: New file.
634 * producer.h: New file.
635 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
636 producer.c.
637 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
638 producer.h.
639
5007d765
MK
6402017-09-26 Matthias Klose <doko@ubuntu.com>
641
642 * configure.ac: Search ncursesw before ncurses.
643 Check ncursesw/ncurses.h before ncurses/ncurses.h.
644 * gdb_curses.h: Include <ncursesw/ncurses.h>
645 * config.in, configure: Regenerate.
646
281c4447
RO
6472017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
648
649 PR gdb/22185
650 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
651 obsolete.
652 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
653 Remove i386sol2 support.
654 * configure.nat <i386sol2>: Remove.
655 <sol2-64>: Fold into ...
656 <sol2>: ... this.
657 Move common settings to default section.
658 Add sol-thread.o.
659 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
660 x86_64-*-solaris2.1[0-9]*>: Rename to ...
661 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
662 <i[34567]86-*-solaris*>: Remove.
663 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
664
665 * configure.ac: Remove wctype in libw check.
666 (_MSE_INT_H): Don't define on Solaris 7-9.
667 <solaris*>: Remove libthread_db.so.1 check.
668 * configure: Regenerate.
669 * config.in: Regenerate.
670
671 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
672 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
673 (gdb_ps_size_t): Remove.
674 Use base types in users.
675 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
676
677 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
678
39b06c20
RO
6792017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
680
681 PR build/22206
682 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
683 (adi_is_addr_mapped): Likewise.
684 (PSR_ICC): Don't redefine.
685 (PSR_IMPL): Likewise.
686
6c3e20f1
TT
6872017-09-25 Tom Tromey <tom@tromey.com>
688
689 * regcache.c (regcache::dump): Use string_printf.
690
b292235f
TT
6912017-09-25 Tom Tromey <tom@tromey.com>
692
693 * regcache.c (class regcache_invalidator): New.
694 (struct register_to_invalidate): Remove.
695 (make_cleanup_regcache_invalidate): Remove.
696 (regcache::raw_write): Use regcache_invalidator.
697
9ac86b52
TT
6982017-09-25 Tom Tromey <tom@tromey.com>
699
700 * spu-tdep.c (spu2ppu_sniffer): Update.
701 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
702 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
703 Remove.
704 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
705 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
706 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
707 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
708 (frame_pop): Update.
709
c0e383c6
TT
7102017-09-25 Tom Tromey <tom@tromey.com>
711
712 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
713 * regcache.h (regcache_xfree): Don't declare.
714 * regcache.c (regcache_xfree): Remove.
715 (do_regcache_xfree): Use delete.
716 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
717 * linux-fork.c (free_fork): Use delete.
718 (fork_save_infrun_state): Likewise.
719 * jit.c (jit_dealloc_cache): Use delete.
720 * infrun.c (discard_infcall_suspend_state): Use delete.
721
791199cc
TT
7222017-09-25 Tom Tromey <tom@tromey.com>
723
724 * regcache.h (regcache_xmalloc): Don't declare.
725 (regcache_raw_set_cached_value): Update comment.
726 * regcache.c (regcache_xmalloc): Remove.
727 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
728 * jit.c (jit_frame_sniffer): Use new.
729 * frame.c (frame_save_as_regcache): Use new.
730
289e23aa
AA
7312017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
732
733 * NEWS: Advertise support for guarded-storage registers on IBM z.
734
1b63490c
AA
7352017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
736
737 * s390-linux-nat.c (have_regset_gs): New static variable.
738 (s390_linux_fetch_inferior_registers): Handle guarded-storage
739 control block and guarded-storage broadcast control regsets.
740 (s390_read_description): Detect whether the target has
741 guarded-storage support, return appropriate tdesc.
742 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
743 (features/s390x-gs-linux64.c): Likewise.
744 (struct gdbarch_tdep) <have_gs>: New field.
745 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
746 (s390_gsbc_regset): New variables.
747 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
748 and s390_gsbc_regset, if applicable.
749 (s390_core_read_description): Check whether core file was from a
750 target with guarded-storage support; include appropriate regsets.
751 (s390_gdbarch_init): Add registers for guarded-storage support.
752 (_initialize_s390_tdep): Initialize new target descriptions that
753 include registers for guarded-storage support.
754 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
755 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
756 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
757 (S390_NUM_REGS): Adjust macro definition.
758 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
759 (tdesc_s390x_gs_linux64): New declarations.
760
96235dc1
AA
7612017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
762
763 * features/s390-gs-linux64.xml: New file.
764 * features/s390-gs.xml: New file.
765 * features/s390-gsbc.xml: New file.
766 * features/s390x-gs-linux64.xml: New file.
767 * features/Makefile (WHICH): Add s390-gs-linux64 and
768 s390x-gs-linux64.
769 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
770 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
771 * features/s390-gs-linux64.c: New generated file.
772 * features/s390x-gs-linux64.c: New file.
773 * regformats/s390-gs-linux64.dat: New file.
774 * regformats/s390x-gs-linux64.dat: New file.
775
b4a7c699
TT
7762017-09-23 Tom Tromey <tom@tromey.com>
777
778 * defs.h (make_cleanup_override_quit_handler): Don't declare.
779
c2f97536
TT
7802017-09-22 Tom Tromey <tom@tromey.com>
781
782 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
783 type to scoped_restore_tmpl.
784 <scoped_input_handler>: Initialize m_quit_handler directly.
785
43573013
SDJ
7862017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
787
788 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
789 (cd_command): Likewise. Free "current_directory" before
790 assigning to it.
791 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
792 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
793 * top.c (gdb_dirbuf): Remove global declaration.
794 * top.h (gdb_dirbuf): Likewise.
795
6ec2e0f5
SDJ
7962017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
797
798 * gnulib/aclocal.m4: Regenerate.
799 * gnulib/config.in: Regenerate.
800 * gnulib/configure: Regenerate.
801 * gnulib/import/Makefile.am: Regenerate.
802 * gnulib/import/Makefile.in: Regenerate.
803 * gnulib/import/assure.h: New file.
804 * gnulib/import/at-func.c: Likewise
805 * gnulib/import/chdir-long.c: New file.
806 * gnulib/import/chdir-long.h: New file.
807 * gnulib/import/cloexec.c: New file.
808 * gnulib/import/cloexec.h: New file.
809 * gnulib/import/close.c: New file.
810 * gnulib/import/closedir.c: New file.
811 * gnulib/import/dirent-private.h: New file.
812 * gnulib/import/dup-safer.c: New file.
813 * gnulib/import/dup.c: New file.
814 * gnulib/import/dup2.c: New file.
815 * gnulib/import/error.c: New file.
816 * gnulib/import/error.h: New file.
817 * gnulib/import/exitfail.c: New file.
818 * gnulib/import/exitfail.h: New file.
819 * gnulib/import/fchdir.c: New file.
820 * gnulib/import/fcntl.c: New file.
821 * gnulib/import/fcntl.in.h: New file.
822 * gnulib/import/fd-hook.c: New file.
823 * gnulib/import/fd-hook.h: New file.
824 * gnulib/import/fd-safer.c: New file.
825 * gnulib/import/fdopendir.c: New file.
826 * gnulib/import/filename.h: New file.
827 * gnulib/import/filenamecat-lgpl.c: New file.
828 * gnulib/import/filenamecat.h: New file.
829 * gnulib/import/fstat.c: New file.
830 * gnulib/import/fstatat.c: New file.
831 * gnulib/import/getcwd-lgpl.c: New file.
832 * gnulib/import/getcwd.c: New file.
833 * gnulib/import/getdtablesize.c: New file.
834 * gnulib/import/getlogin_r.c: New file.
835 * gnulib/import/getprogname.c: New file.
836 * gnulib/import/getprogname.h: New file.
837 * gnulib/import/gettext.h: New file.
838 * gnulib/import/glob-libc.h: New file.
839 * gnulib/import/glob.c: New file.
840 * gnulib/import/glob.in.h: New file.
841 * gnulib/import/intprops.h: New file.
842 * gnulib/import/m4/chdir-long.m4: New file.
843 * gnulib/import/m4/close.m4: New file.
844 * gnulib/import/m4/closedir.m4: New file.
845 * gnulib/import/m4/d-ino.m4: New file.
846 * gnulib/import/m4/d-type.m4: New file.
847 * gnulib/import/m4/dup.m4: New file.
848 * gnulib/import/m4/dup2.m4: New file.
849 * gnulib/import/m4/error.m4: New file.
850 * gnulib/import/m4/fchdir.m4: New file.
851 * gnulib/import/m4/fcntl.m4: New file.
852 * gnulib/import/m4/fcntl_h.m4: New file.
853 * gnulib/import/m4/fdopendir.m4: New file.
854 * gnulib/import/m4/filenamecat.m4: New file.
855 * gnulib/import/m4/fstat.m4: New file.
856 * gnulib/import/m4/fstatat.m4: New file.
857 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
858 * gnulib/import/m4/getcwd-path-max.m4: New file.
859 * gnulib/import/m4/getcwd.m4: New file.
860 * gnulib/import/m4/getdtablesize.m4: New file.
861 * gnulib/import/m4/getlogin_r.m4: New file.
862 * gnulib/import/m4/getprogname.m4: New file.
863 * gnulib/import/m4/glob.m4: New file.
864 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
865 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
866 * gnulib/import/m4/mempcpy.m4: New file.
867 * gnulib/import/m4/memrchr.m4: New file.
868 * gnulib/import/m4/mode_t.m4: New file.
869 * gnulib/import/m4/msvc-inval.m4: New file.
870 * gnulib/import/m4/msvc-nothrow.m4: New file.
871 * gnulib/import/m4/open.m4: New file.
872 * gnulib/import/m4/openat.m4: New file.
873 * gnulib/import/m4/opendir.m4: New file.
874 * gnulib/import/m4/readdir.m4: New file.
875 * gnulib/import/m4/realloc.m4: New file.
876 * gnulib/import/m4/rewinddir.m4: New file.
877 * gnulib/import/m4/save-cwd.m4: New file.
878 * gnulib/import/m4/strdup.m4: New file.
879 * gnulib/import/m4/strerror.m4: New file.
880 * gnulib/import/m4/unistd-safer.m4: New file.
881 * gnulib/import/mempcpy.c: New file.
882 * gnulib/import/memrchr.c: New file.
883 * gnulib/import/msvc-inval.c: New file.
884 * gnulib/import/msvc-inval.h: New file.
885 * gnulib/import/msvc-nothrow.c: New file.
886 * gnulib/import/msvc-nothrow.h: New file.
887 * gnulib/import/open.c: New file.
888 * gnulib/import/openat-die.c: New file.
889 * gnulib/import/openat-priv.h: New file.
890 * gnulib/import/openat-proc.c: New file.
891 * gnulib/import/openat.c: New file.
892 * gnulib/import/openat.h: New file.
893 * gnulib/import/opendir.c: New file.
894 * gnulib/import/pipe-safer.c: New file.
895 * gnulib/import/readdir.c: New file.
896 * gnulib/import/realloc.c: New file.
897 * gnulib/import/rewinddir.c: New file.
898 * gnulib/import/save-cwd.c: New file.
899 * gnulib/import/save-cwd.h: New file.
900 * gnulib/import/strdup.c: New file.
901 * gnulib/import/strerror-override.c: New file.
902 * gnulib/import/strerror-override.h: New file.
903 * gnulib/import/strerror.c: New file.
904 * gnulib/import/unistd--.h: New file.
905 * gnulib/import/unistd-safer.h: New file.
906 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
907 "getcwd" and "glob".
908 * ser-tcp.c: Undefine "close" before redefining it.
909
432ae719
SM
9102017-09-21 Simon Marchi <simon.marchi@ericsson.com>
911
912 * guile/scm-value.c (gdbscm_value_address): Initialize address,
913 get rid of res_val.
914
4fa7574e
RO
9152017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
916
917 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
918 <sol2,sparc>: Likewise.
919 <sol2-64,i386>: Likewise.
920
921 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
922 -Wdeprecated-declarations on *-*-solaris*.
923 * configure: Regenerate.
924
925 * procfs.c: Include "nat/inferior.h".
926 (procfs_info_proc): Fix typo.
927
f6327dcb
KB
9282017-09-21 Kevin Buettner <kevinb@redhat.com>
929
930 * remote.c (vector): Include.
931 (struct private_thread_info): Add field, thread_handle.
932 (free_private_thread_info): Deallocate storage associated with
933 thread handle.
934 (get_private_info_thread): Initialize `thread_handle' field.
935 (struct thread_item): Add field, thread_handle.
936 (clear_threads_listing_context): Deallocate storage associated
937 with thread handle.
938 (start_thread): Add support for "handle" attribute.
939 (thread_attributes): Add "handle".
940 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
941 field.
942 (remote_update_thread_list): Update thread_handle.
943 (remote_thread_handle_to_thread_info): New function.
944 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
945
fbbe5337
KB
9462017-09-21 Kevin Buettner <kevinb@redhat.com>
947
948 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
949 function.
950 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
951 * python/python-internal.h (thread_object_type): Declare.
952
e04ee09e
KB
9532017-09-21 Kevin Buettner <kevinb@redhat.com>
954
955 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
956 (target_thread_handle_to_thread_info): Declare.
957 * target.c (target_thread_handle_to_thread_info): New function.
958 * target-delegates.c: Regenerate.
959 * gdbthread.h (find_thread_by_handle): Declare.
960 * thread.c (find_thread_by_handle): New function.
961 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
962 function.
963 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
964
1e5b66ed
SM
9652017-09-21 Simon Marchi <simon.marchi@ericsson.com>
966
967 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
968
ebe48ba0
SM
9692017-09-21 Simon Marchi <simon.marchi@ericsson.com>
970
971 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
972
0a0bf5dc
YQ
9732017-09-21 Yao Qi <yao.qi@linaro.org>
974
975 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
976 to gdb_target_obs.
977
d1b0a7bf
TT
9782017-09-20 Tom Tromey <tom@tromey.com>
979
980 * breakpoint.c (struct counted_command_line): Remove.
981 (breakpoint_commands): Update.
982 (alloc_counted_command_line, incref_counted_command_line)
983 (decref_counted_command_line, do_cleanup_counted_command_line)
984 (make_cleanup_decref_counted_command_line): Remove.
985 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
986 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
987 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
988 (save_breakpoints): Update.
989 * breakpoint.h (counted_command_line): Now a typedef to
990 shared_ptr.
991 (struct breakpoint) <commands>: Now a counted_command_line.
992 (struct bpstats) <command>: Likewise.
993
48649e1b
TT
9942017-09-20 Tom Tromey <tom@tromey.com>
995
996 * breakpoint.c (struct commands_info, do_map_commands_command):
997 Remove.
998 (commands_command_1): Update.
999 (iterate_over_related_breakpoints): Take a function_view.
1000 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1001 (delete_command): Update.
1002 (map_breakpoint_numbers): Take a function_view.
1003 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1004 (disable_command): Update.
1005 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1006 (enable_command): Update.
1007 (struct disp_data, do_enable_breakpoint_disp)
1008 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1009 (do_map_enable_delete_breakpoint): Remove.
1010 (enable_once_command, enable_count_command, enable_delete_command)
1011 (delete_trace_variable_command): Update.
1012
04afa70c
TT
10132017-09-20 Tom Tromey <tom@tromey.com>
1014
1015 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
1016 (bpstat_clear): Use delete.
1017 (bpstats): New constructors.
1018 (bpstat_copy, bpstat_stop_status): Use new.
1019 (dprintf_after_condition_true): Update.
1020 * breakpoint.h (bpstats::bpstats): Add constructors.
1021 (bpstats::~bpstats): Add destructor.
1022
c83833f4
PA
10232017-09-20 Pedro Alves <palves@redhat.com>
1024
1025 * eval.c (make_params): Delete, refactored as ...
1026 (class fake_method): ... this new type's ctor.
1027 (fake_method::~fake_method): New.
1028 (evaluate_subexp_standard): Use 'fake_method'.
1029
223ffa71
TT
10302017-09-20 Tom Tromey <tom@tromey.com>
1031
1032 * windows-nat.c (get_windows_debug_event, windows_wait)
1033 (do_initial_windows_stuff, windows_attach): Update.
1034 * utils.c (vwarning, internal_vproblem): Update.
1035 (ui_unregister_input_event_handler_cleanup)
1036 (prepare_to_handle_input): Remove.
1037 (class scoped_input_handler): New.
1038 (defaulted_query, prompt_for_continue): Update.
1039 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1040 Update.
1041 * top.c (undo_terminal_modifications_before_exit): Update.
1042 * target/target.h (target_terminal_init, target_terminal_inferior)
1043 (target_terminal_ours): Don't declare.
1044 (class target_terminal): New.
1045 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1046 (target_terminal_ours_for_output)
1047 (make_cleanup_restore_target_terminal): Don't declare.
1048 (target_terminal_info): Remove.
1049 * target.c (enum terminal_state, terminal_state): Remove.
1050 (target_terminal::terminal_state): Define.
1051 (target_terminal::init): Rename from target_terminal_init.
1052 (target_terminal::inferior): Rename from
1053 target_terminal_inferior.
1054 (target_terminal::ours): Rename from target_terminal_ours.
1055 (target_terminal::ours_for_output): Rename from
1056 target_terminal_ours_for_output.
1057 (target_terminal::info): New method.
1058 (cleanup_restore_target_terminal)
1059 (make_cleanup_restore_target_terminal): Remove.
1060 * solib.c (handle_solib_event): Update.
1061 * remote.c (remote_serial_quit_handler): Update.
1062 (remote_terminal_inferior, remote_wait_as): Update.
1063 * record-full.c (record_full_wait_1): Update.
1064 * nto-procfs.c (procfs_create_inferior): Update.
1065 * nat/fork-inferior.c (startup_inferior): Update.
1066 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1067 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1068 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1069 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1070 (mi_breakpoint_created, mi_breakpoint_deleted)
1071 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1072 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1073 (mi_user_selected_context_changed, report_initial_inferior):
1074 Update.
1075 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1076 (linux_nat_terminal_inferior): Update.
1077 * infrun.c (follow_fork_inferior)
1078 (handle_vfork_child_exec_or_exit, do_target_resume)
1079 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1080 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1081 Update.
1082 * inflow.c (child_terminal_init, info_terminal_command): Update.
1083 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1084 (attach_command): Update.
1085 * infcall.c (call_thread_fsm_should_stop): Update.
1086 * gnu-nat.c (gnu_attach): Update.
1087 * extension.c (struct active_ext_lang_state)
1088 (restore_active_ext_lang): Update.
1089 * exceptions.c (print_flush): Update.
1090 * event-top.c (async_enable_stdin, default_quit_handler): Update.
1091 (struct quit_handler_cleanup_data, restore_quit_handler)
1092 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1093 Remove.
1094 * cp-support.c (gdb_demangle): Update.
1095 * breakpoint.c (update_inserted_breakpoint_locations)
1096 (insert_breakpoint_locations, handle_jit_event)
1097 (disable_breakpoints_in_unloaded_shlib): Update.
1098 * annotate.c (annotate_breakpoints_invalid)
1099 (annotate_frames_invalid): Update.
1100
013af3fc
TT
11012017-09-20 Tom Tromey <tom@tromey.com>
1102
1103 * main.c (catch_command_errors): Rename from
1104 catch_command_errors_const.
1105 (captured_main_1): Update.
1106
06871ae8
PA
11072017-09-20 Pedro Alves <palves@redhat.com>
1108
1109 * cli/cli-cmds.c (list_command): Use print_sal_location.
1110 (print_sal_location): New function.
1111 (ambiguous_line_spec): Use print_sal_location.
1112 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1113 * symtab.c (find_function_start_sal): Likewise.
1114 * symtab.h (symtab_and_line::symbol): New field.
1115
e5f25bc5
PA
11162017-09-20 Pedro Alves <palves@redhat.com>
1117
1118 * linespec.c (minsym_found): Handle non-text minsyms.
1119 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1120
1b7fa39e
WT
11212017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1122
1123 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1124 backslash.
1125
37dd0825
WT
11262017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1127
1128 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1129 vmovups instead vmovaps.
1130 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1131
4e5a4f58
JB
11322017-09-19 John Baldwin <jhb@FreeBSD.org>
1133
1134 * NEWS (Changes since GDB 8.0): Add starti.
1135 * infcmd.c (enum run_break): New.
1136 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1137 case.
1138 (run_command): Use enum run_how.
1139 (start_command): Likewise.
1140 (starti_command): New function.
1141 (RUN_ARGS_HELP): New macro.
1142 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1143 commands. Add starti command.
1144
aa70c9f1
YQ
11452017-09-19 Yao Qi <yao.qi@linaro.org>
1146
1147 * Makefile.in (monitor.o): Remove the rule.
1148
d6541620
YQ
11492017-09-19 Yao Qi <yao.qi@linaro.org>
1150
1151 * annotate.h (struct annotate_arg_emitter): Use
1152 DISABLE_COPY_AND_ASSIGN.
1153 * common/refcounted-object.h (refcounted_object): Likewise.
1154 * completer.h (struct completion_result): Likewise.
1155 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1156 * filename-seen-cache.h (filename_seen_cache): Likewise.
1157 * gdbcore.h (thread_section_name): Likewise.
1158 * gdb_regex.h (compiled_regex): Likewise.
1159 * gdbthread.h (scoped_restore_current_thread): Likewise.
1160 * inferior.h (scoped_restore_current_inferior): Likewise.
1161 * jit.c (jit_reader): Likewise.
1162 * linespec.h (struct linespec_result): Likewise.
1163 * mi/mi-parse.h (struct mi_parse): Likewise.
1164 * nat/fork-inferior.c (execv_argv): Likewise.
1165 * progspace.h (scoped_restore_current_program_space): Likewise.
1166 * python/python-internal.h (class gdbpy_enter): Likewise.
1167 * regcache.h (regcache): Likewise.
1168 * target-descriptions.c (struct tdesc_reg): Likewise.
1169 (struct tdesc_type): Likewise.
1170 (struct tdesc_feature): Likewise.
1171 * ui-out.h (ui_out_emit_type): Likewise.
1172
0615127c
SM
11732017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1174
1175 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1176 label abort_expression.
1177
5e187554
SM
11782017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1179
1180 * common/buffer.c (buffer_xml_printf): Adjust.
1181 * common/xml-utils.c (xml_escape_text): Change return type to
1182 std::string, update code accordingly.
1183 * common/xml-utils.h (xml_escape_text): Change return type to
1184 std::string.
1185 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1186 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1187 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1188 Adjust.
1189
c3d7b541
SM
11902017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1191
1192 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1193 (SUBDIR_UNITTESTS_OBS): Add new object file.
1194 * unittests/xml-utils-selftests.c: New file.
1195
1526853e
SM
11962017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1197
1198 * common/selftest.h (selftest): New struct/interface.
1199 (register_test): Add name parameter, add new overload.
1200 (run_tests): Add filter parameter.
1201 (for_each_selftest_ftype): New typedef.
1202 (for_each_selftest): New declaration.
1203 * common/selftest.c (tests): Change type to
1204 map<string, unique_ptr<selftest>>.
1205 (simple_selftest): New struct.
1206 (register_test): New function.
1207 (register_test): Add name parameter and use it.
1208 (run_tests): Add filter parameter and use it. Add prints.
1209 Adjust to vector -> map change.
1210 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1211 registering selftests.
1212 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1213 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1214 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1215 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1216 * findvar.c (_initialize_findvar): Likewise.
1217 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1218 * maint.c (maintenance_selftest): Update call to run_tests.
1219 (maintenance_info_selftests): New function.
1220 (_initialize_maint_cmds): Register "maintenance info selftests"
1221 command. Update "maintenance selftest" doc.
1222 * regcache.c (_initialize_regcache): Add names when registering
1223 selftests.
1224 * rust-exp.y (_initialize_rust_exp): Likewise.
1225 * selftest-arch.c (gdbarch_selftest): New struct.
1226 (gdbarch_tests): Remove.
1227 (register_test_foreach_arch): Add name parameter. Call
1228 register_test.
1229 (tests_with_arch): Remove, move most content to
1230 gdbarch_selftest::operator().
1231 (_initialize_selftests_foreach_arch): Remove.
1232 * selftest-arch.h (register_test_foreach_arch): Add name
1233 parameter.
1234 (run_tests_with_arch): New declaration.
1235 * utils-selftests.c (_initialize_utils_selftests): Add names
1236 when registering selftests.
1237 * utils.c (_initialize_utils): Likewise.
1238 * unittests/array-view-selftests.c
1239 (_initialize_array_view_selftests): Likewise.
1240 * unittests/environ-selftests.c (_initialize_environ_selftests):
1241 Likewise.
1242 * unittests/function-view-selftests.c
1243 (_initialize_function_view_selftests): Likewise.
1244 * unittests/offset-type-selftests.c
1245 (_initialize_offset_type_selftests): Likewise.
1246 * unittests/optional-selftests.c
1247 (_initialize_optional_selftests): Likewise.
1248 * unittests/scoped_restore-selftests.c
1249 (_initialize_scoped_restore_selftests): Likewise.
1250 * NEWS: Document "maintenance selftest" and "maint info
1251 selftests".
1252
5846367a
SM
12532017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1254
1255 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1256 scoped_restore.
1257
bd77e8ff
SM
12582017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1259
1260 * mi/mi-main.c (mi_load_progress): Make uiout variable
1261 a unique_ptr.
1262
26a67918
PA
12632017-09-15 Pedro Alves <palves@redhat.com>
1264
1265 * compile/compile-c-types.c (convert_enum, convert_int)
1266 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1267
3f8a7804
SM
12682017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1269
1270 * dwarf2read.c (copy_string): Remove.
1271 (parse_macro_definition): Replace copy_string with savestring.
1272
8d200706
YQ
12732017-09-15 Yao Qi <yao.qi@linaro.org>
1274
1275 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1276 gdb_target_obs.
1277 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1278 Likewise.
1279 (i[34567]86-*-linux*): Likewise.
1280
d185219d
SM
12812017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1282
1283 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1284 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1285 <stack>: Change type to std::vector.
1286 <stack_len, stack_allocated>: Remove.
1287 <grow_stack>: Remove.
1288 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1289 (dwarf_expr_context::~dwarf_expr_context): Remove.
1290 (dwarf_expr_context::grow_stack): Remove.
1291 (dwarf_expr_context::push): Adjust.
1292 (dwarf_expr_context::pop): Adjust.
1293 (dwarf_expr_context::fetch): Adjust.
1294 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1295 (dwarf_expr_context::stack_empty_p): Adjust.
1296 (dwarf_expr_context::execute_stack_op): Adjust.
1297
eccd80d6
SM
12982017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1299
1300 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1301 return type to bool.
1302 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1303
69009882
SM
13042017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1305
1306 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1307 Change type to bool.
1308 (dwarf_stack_value) <in_stack_memory>: Likewise.
1309 (dwarf_expr_context) <push_address>: Change parameter type to
1310 bool.
1311 <fetch_in_stack_memory>: Change return type to bool.
1312 <push>: Change parameter type to bool.
1313 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1314 to bool.
1315 (dwarf_expr_context::push_address): Likewise.
1316 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1317 to bool.
1318 (dwarf_expr_context::execute_stack_op): Adjust.
1319 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1320
1e467161
SM
13212017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1322
1323 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1324 (struct dwarf_expr_context) <n_pieces>: Remove.
1325 <pieces>: Change type to std::vector.
1326 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1327 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1328 pieces.
1329 (dwarf_expr_context::add_piece): Adjust.
1330 * dwarf2loc.c (struct piece_closure): Initialize fields.
1331 <n_pieces>: Remove.
1332 <pieces>: Change type to std::vector.
1333 (allocate_piece_closure): Adjust, change parameter to
1334 std::vector rvalue and std::move it to piece_closure.
1335 (rw_pieced_value): Adjust.
1336 (check_pieced_synthetic_pointer): Adjust.
1337 (indirect_synthetic_pointer): Adjust.
1338 (coerce_pieced_ref): Adjust.
1339 (free_pieced_value_closure): Adjust. Use delete to free
1340 piece_closure.
1341 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1342 to allocate_piece_closure.
1343 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1344
0782db84
SM
13452017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1346
1347 * probe.h (probe_ops_cp): Remove typedef.
1348 (DEF_VEC_P (probe_ops_cp)): Remove.
1349 (all_probe_ops): Change type to std::vector.
1350 * probe.c (info_probes_for_ops): Adjust to vector change.
1351 (probe_linespec_to_ops): Likewise.
1352 (all_probe_ops): Change type to std::vector.
1353 (_initialize_probe): Adjust to vector change.
1354 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1355 * elfread.c (elf_get_probes): Likewise.
1356 * stap-probe.c (_initialize_stap_probe): Likewise.
1357
1eac6bea
SM
13582017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1359
1360 * probe.h (struct bound_probe): Define constructors.
1361 * probe.c (bound_probe_s): Remove typedef.
1362 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1363 (collect_probes): Change return type to std::vector, remove
1364 cleanup.
1365 (compare_probes): Return bool, change parameter type. Change
1366 semantic to "less than".
1367 (gen_ui_out_table_header_info): Change parameter to std::vector
1368 and update.
1369 (exists_probe_with_pops): Likewise.
1370 (info_probes_for_ops): Update to std::vector change.
1371 (enable_probes_command): Likewise.
1372 (disable_probes_command): Likewise.
1373
aaa63a31
SM
13742017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1375
1376 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1377 vec to std::vector.
1378 * probe.c (parse_probes_in_pspace): Update.
1379 (find_probes_in_objfile): Update.
1380 (find_probe_by_pc): Update.
1381 (collect_probes): Update.
1382 (probe_any_get_probes): Update.
1383 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1384 return type to reference to std::vector.
1385 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1386 std::vector and update.
1387 (dtrace_process_dof): Likewise.
1388 (dtrace_get_probes): Likewise.
1389 * elfread.c (elf_get_probes): Change return type to std::vector,
1390 store an std::vector in bfd_data.
1391 (probe_key_free): Update to std::vector.
1392 * stap-probe.c (handle_stap_probe): Change parameter to
1393 std::vector and update.
1394 (stap_get_probes): Likewise.
1395 * symfile-debug.c (debug_sym_get_probes): Change return type to
1396 std::vector and update.
1397
cb85b21b
TT
13982017-09-11 Tom Tromey <tom@tromey.com>
1399
1400 * breakpoint.c (program_breakpoint_here_p): Update.
1401 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1402 from make_show_memory_breakpoints_cleanup. Return a
1403 scoped_restore_tmpl<int>.
1404 (restore_show_memory_breakpoints): Remove.
1405 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1406 * mem-break.c (memory_validate_breakpoint): Update.
1407 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1408 (ia64_memory_remove_breakpoint): Update.
1409 (ia64_breakpoint_from_pc): Update.
1410 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1411 from make_show_memory_breakpoints_cleanup.
1412
8fbc99ef
TT
14132017-09-11 Tom Tromey <tom@tromey.com>
1414
1415 * d-namespace.c (d_lookup_symbol): Use std::string.
1416 (find_symbol_in_baseclass): Likewise.
1417
50feb4bd
TT
14182017-09-11 Tom Tromey <tom@tromey.com>
1419
1420 * ctf.c (ctf_start): Use std::string.
1421
c6dc63a1
TT
14222017-09-11 Tom Tromey <tom@tromey.com>
1423
1424 * ada-lang.c (is_known_support_routine): Update.
1425 (ada_unhandled_exception_name_addr_from_raise): Update.
1426 * guile/scm-frame.c (gdbscm_frame_name): Update.
1427 * python/py-frame.c (frapy_name): Update.
1428 (frapy_function): Update.
1429 * stack.h (find_frame_funname): Update.
1430 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1431 (print_frame): Update.
1432
d6b9b80f
TT
14332017-09-11 Tom Tromey <tom@tromey.com>
1434
1435 * findcmd.c (put_bits): Take a gdb::byte_vector.
1436 (parse_find_args): Return gdb::byte_vector. "args" now const.
1437 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1438 cleanups.
1439 (find_command): Update.
1440
a9921622
TT
14412017-09-11 Tom Tromey <tom@tromey.com>
1442
1443 * cli/cli-script.c (class scoped_restore_hook_in): New.
1444 (clear_hook_in_cleanup): Remove.
1445 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1446 scoped_restore_hook_in.
1447
be0d7abb
TT
14482017-09-11 Tom Tromey <tom@tromey.com>
1449
1450 * cli/cli-script.c (restore_interp): Remove.
1451 (read_command_lines): Use scoped_restore_interp.
1452 * interps.c (scoped_restore_interp::set_temp): Rename from
1453 interp_set_temp.
1454 * interps.h (class scoped_restore_interp): New.
1455 (interp_set_temp): Remove.
1456
00f675ff
TT
14572017-09-11 Tom Tromey <tom@tromey.com>
1458
1459 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1460 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1461 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1462 scoped_restore.
1463 (mi_cmd_break_insert_1): Update.
1464 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1465 scoped_restore.
1466
cb791d59
TT
14672017-09-11 Tom Tromey <tom@tromey.com>
1468
1469 * demangle.c (demangle_command): Update.
1470 * breakpoint.c (disable_command): Update.
1471 (enable_command): Update.
1472 (find_location_by_number): Make "number" const. Use
1473 get_number_trailer.
1474 * cli/cli-utils.c (extract_arg): Return std::string.
1475 * probe.c (parse_probe_linespec): Update. Change types.
1476 (collect_probes): Take string arguments.
1477 (parse_probe_linespec): Likewise.
1478 (info_probes_for_ops): Update.
1479 (enable_probes_command): Update.
1480 (disable_probes_command): Update.
1481 * break-catch-sig.c (catch_signal_split_args): Update.
1482 * mi/mi-parse.c (mi_parse): Update.
1483
2039bd9f
TT
14842017-09-11 Tom Tromey <tom@tromey.com>
1485
1486 * language.h (language_enum): Make argument const.
1487 * language.c (language_enum): Make argument const.
1488
f1735a53
TT
14892017-09-11 Tom Tromey <tom@tromey.com>
1490
1491 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1492 as function.
1493 (skip_to_space): Rename from skip_to_space_const.
1494 * common/common-utils.c (skip_to_space): New function.
1495 (skip_to_space): Rename from skip_to_space_const.
1496 * cli/cli-utils.h (get_number): Rename from get_number_const.
1497 (extract_arg): Rename from extract_arg_const.
1498 * cli/cli-utils.c (get_number): Rename from get_number_const.
1499 (extract_arg): Rename from extract_arg_const.
1500 (number_or_range_parser::get_number): Use ::get_number.
1501 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1502 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1503 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1504 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1505 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1506 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1507 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1508 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1509
7d221d74
TT
15102017-09-11 Tom Tromey <tom@tromey.com>
1511
1512 * python/python.c (do_start_initialization): Use
1513 py-event-types.def to initialize types.
1514 Define all object type structures.
1515 * python/python-internal.h: Don't declare event initialization
1516 functions.
1517 * python/py-threadevent.c (thread_event_object_type): Don't
1518 define.
1519 * python/py-stopevent.c (stop_event_object_type): Don't define.
1520 * python/py-signalevent.c (signal_event_object_type): Don't
1521 declare or define.
1522 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1523 (clear_objfiles_event_object_type): Don't declare or define.
1524 * python/py-infevents.c (inferior_call_pre_event_object_type)
1525 (inferior_call_post_event_object_type)
1526 (register_changed_event_object_type)
1527 (memory_changed_event_object_type): Don't declare or define.
1528 * python/py-inferior.c (new_thread_event_object_type)
1529 (new_inferior_event_object_type)
1530 (inferior_deleted_event_object_type): Don't declare or define.
1531 * python/py-exitedevent.c (exited_event_object_type): Don't
1532 declare or define.
1533 * python/py-evts.c (gdbpy_initialize_py_events): Use
1534 py-all-events.def.
1535 * python/py-events.h (thread_event_object_type): Don't declare.
1536 (events_object): Use py-all-events.def.
1537 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1538 py-event-types.def.
1539 * python/py-event-types.def: New file.
1540 * python/py-continueevent.c (create_continue_event_object): Don't
1541 declare or define.
1542 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1543 declare or define.
1544 * python/py-all-events.def: New file.
1545
35c61a1d
TT
15462017-09-11 Tom Tromey <tom@tromey.com>
1547
1548 * python/py-threadevent.c (create_thread_event_object): Return
1549 gdbpy_ref.
1550 * python/py-stopevent.h (create_stop_event_object)
1551 (create_breakpoint_event_object, create_signal_event_object):
1552 Update.
1553 * python/py-stopevent.c (create_stop_event_object): Return
1554 gdbpy_ref.
1555 (emit_stop_event): Update.
1556 * python/py-signalevent.c (create_signal_event_object): Return
1557 gdbpy_ref.
1558 * python/py-infevents.c (create_inferior_call_event_object):
1559 Update.
1560 * python/py-event.h (create_event_object)
1561 (create_thread_event_object): Update.
1562 * python/py-event.c (create_event_object): Return gdbpy_ref.
1563 * python/py-continueevent.c: Return gdbpy_ref.
1564 * python/py-bpevent.c (create_breakpoint_event_object): Return
1565 gdbpy_ref.
1566
7c96f8c1
TT
15672017-09-11 Tom Tromey <tom@tromey.com>
1568
1569 PR python/15622:
1570 * NEWS: Add entry.
1571 * python/python.c (do_start_initialization): Initialize new event
1572 types.
1573 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1574 (gdbpy_initialize_inferior_deleted_event)
1575 (gdbpy_initialize_new_thread_event): Declare.
1576 * python/py-threadevent.c (create_thread_event_object): Add option
1577 "thread" parameter.
1578 * python/py-inferior.c (new_thread_event_object_type)
1579 (new_inferior_event_object_type)
1580 (inferior_deleted_event_object_type): Declare.
1581 (python_new_inferior, python_inferior_deleted): New functions.
1582 (add_thread_object): Emit new_thread event.
1583 (gdbpy_initialize_inferior): Attach new functions to corresponding
1584 observers.
1585 (new_thread, new_inferior, inferior_deleted): Define new event
1586 types.
1587 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1588 registries.
1589 * python/py-events.h (events_object) <new_inferior,
1590 inferior_deleted, new_thread>: New fields.
1591 * python/py-event.h (create_thread_event_breakpoint): Add optional
1592 "thread" parameter.
1593
72542b8e
AB
15942017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1595
1596 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1597 check current_ui instead.
1598 (internal_vproblem): Likewise.
1599
0d64823e
SM
16002017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1601
1602 * thread.c (print_thread_info_1): Remove unnecessary calls to
1603 uiout->is_mi_like_p.
1604
eb1e02fd
TT
16052017-09-09 Tom Tromey <tom@tromey.com>
1606
1607 * namespace.h (add_using_directive): Update.
1608 * namespace.c (add_using_directive): Change type of excludes to
1609 std::vector.
1610 * dwarf2read.c (read_import_statement): Use std::vector.
1611 (read_namespace): Update.
1612 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1613
0fc21fd8
TT
16142017-09-09 Tom Tromey <tom@tromey.com>
1615
1616 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1617
49663d05
TT
16182017-09-09 Tom Tromey <tom@tromey.com>
1619
1620 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1621
0b868b60
TT
16222017-09-09 Tom Tromey <tom@tromey.com>
1623
1624 * stack.c (func_command): Use gdb::def_vector.
1625
c0470d48
TT
16262017-09-09 Tom Tromey <tom@tromey.com>
1627
1628 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1629 ui_out_emit_list, ui_out_emit_tuple.
1630 (mi_cmd_var_update): Likewise.
1631
ca5909c7
TT
16322017-09-09 Tom Tromey <tom@tromey.com>
1633
1634 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1635 ui_out_redirect_pop.
1636 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1637 ui_out_redirect_pop.
1638 * utils.c (do_ui_out_redirect_pop)
1639 (make_cleanup_ui_out_redirect_pop): Remove.
1640 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1641 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1642 * ui-out.h (ui_out_redirect_pop): New class.
1643
e6a2252a
TT
16442017-09-09 Tom Tromey <tom@tromey.com>
1645
1646 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1647 (list_available_thread_groups, mi_cmd_list_thread_groups)
1648 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1649 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1650 Likewise.
1651
393702cd
TT
16522017-09-09 Tom Tromey <tom@tromey.com>
1653
1654 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1655 ui_out_emit_tuple.
1656
76f9c9cf
TT
16572017-09-09 Tom Tromey <tom@tromey.com>
1658
1659 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1660 * stack.c (print_frame): Use ui_out_emit_tuple.
1661 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1662 (info_spu_mailbox_command, info_spu_dma_command)
1663 (info_spu_proxydma_command): Likewise.
1664 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1665 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1666 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1667 ui_out_emit_tuple.
1668 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1669
dc9fe180
TT
16702017-09-09 Tom Tromey <tom@tromey.com>
1671
1672 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1673 (class ui_out_emit_table): Update comment.
1674 * ui-out.c (do_cleanup_table_end)
1675 (make_cleanup_ui_out_table_begin_end): Remove.
1676 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1677 (info_spu_dma_cmdlist): Likewise.
1678 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1679 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1680 ui_out_emit_table.
1681
f8cc3da6
TT
16822017-09-09 Tom Tromey <tom@tromey.com>
1683
1684 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1685 ui_out_emit_list, gdb::optional.
1686
481695ed
JB
16872017-09-09 John Baldwin <jhb@FreeBSD.org>
1688
1689 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1690 prototype.
1691 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1692 prototype.
1693 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1694 prototype.
1695 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1696 * ada-exp.y: Remove _initialize_ada_exp prototype.
1697 * ada-lang.c: Remove _initialize_ada_language prototype.
1698 * ada-tasks.c: Remove _initialize_tasks prototype.
1699 * addrmap.c: Remove _initialize_addrmap prototype.
1700 * agent.c: Remove _initialize_agent prototype.
1701 * aix-thread.c: Remove _initialize_aix_thread prototype.
1702 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1703 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1704 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1705 prototype.
1706 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1707 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1708 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1709 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1710 prototype.
1711 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1712 prototype.
1713 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1714 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1715 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1716 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1717 prototype.
1718 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1719 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1720 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1721 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1722 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1723 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1724 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1725 prototype.
1726 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1727 prototype.
1728 * annotate.c: Remove _initialize_annotate prototype.
1729 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1730 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1731 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1732 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1733 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1734 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1735 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1736 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1737 prototype.
1738 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1739 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1740 * auto-load.c: Remove _initialize_auto_load prototype.
1741 * auxv.c: Remove _initialize_auxv prototype.
1742 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1743 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1744 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1745 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1746 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1747 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1748 prototype.
1749 * break-catch-throw.c: Remove _initialize_break_catch_throw
1750 prototype.
1751 * breakpoint.c: Remove _initialize_breakpoint prototype.
1752 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1753 * btrace.c: Remove _initialize_btrace prototype.
1754 * charset.c: Remove _initialize_charset prototype.
1755 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1756 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1757 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1758 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1759 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1760 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1761 * coffread.c: Remove _initialize_coffread prototype.
1762 * compile/compile.c: Remove _initialize_compile prototype.
1763 * complaints.c: Remove _initialize_complaints prototype.
1764 * completer.c: Remove _initialize_completer prototype.
1765 * copying.awk: Remove _initialize_copying prototype.
1766 * copying.c: Regenerate.
1767 * core-regset.c: Remove _initialize_core_regset prototype.
1768 * corefile.c: Remove _initialize_core prototype.
1769 * corelow.c: Remove _initialize_corelow prototype.
1770 * cp-abi.c: Remove _initialize_cp_abi prototype.
1771 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1772 * cp-support.c: Remove _initialize_cp_support prototype.
1773 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1774 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1775 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1776 * ctf.c: Remove _initialize_ctf prototype.
1777 * d-lang.c: Remove _initialize_d_language prototype.
1778 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1779 prototype.
1780 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1781 * dbxread.c: Remove _initialize_dbxread prototype.
1782 * dcache.c: Remove _initialize_dcache prototype.
1783 * demangle.c: Remove _initialize_demangler prototype.
1784 * disasm-selftests.c: Remove _initialize_disasm_selftests
1785 prototype.
1786 * disasm.c: Remove _initialize_disasm prototype.
1787 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1788 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1789 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1790 prototype.
1791 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1792 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1793 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1794 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1795 * elfread.c: Remove _initialize_elfread prototype.
1796 * exec.c: Remove _initialize_exec prototype.
1797 * extension.c: Remove _initialize_extension prototype.
1798 * f-lang.c: Remove _initialize_f_language prototype.
1799 * f-valprint.c: Remove _initialize_f_valprint prototype.
1800 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1801 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1802 * filesystem.c: Remove _initialize_filesystem prototype.
1803 * findcmd.c: Remove _initialize_mem_search prototype.
1804 * fork-child.c: Remove _initialize_fork_child prototype.
1805 * frame-base.c: Remove _initialize_frame_base prototype.
1806 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1807 * frame.c: Remove _initialize_frame prototype.
1808 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1809 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1810 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1811 * gcore.c: Remove _initialize_gcore prototype.
1812 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1813 * gdbarch.c: Regenerate.
1814 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1815 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1816 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1817 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1818 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1819 * go-lang.c: Remove _initialize_go_language prototype.
1820 * go32-nat.c: Remove _initialize_go32_nat prototype.
1821 * guile/guile.c: Remove _initialize_guile prototype.
1822 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1823 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1824 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1825 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1826 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1827 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1828 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1829 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1830 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1831 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1832 prototype.
1833 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1834 prototype.
1835 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1836 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1837 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1838 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1839 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1840 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1841 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1842 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1843 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1844 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1845 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1846 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1847 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1848 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1849 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1850 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1851 prototype.
1852 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1853 prototype.
1854 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1855 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1856 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1857 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1858 * infcall.c: Remove _initialize_infcall prototype.
1859 * infcmd.c: Remove _initialize_infcmd prototype.
1860 * inferior.c: Remove _initialize_inferiors prototype.
1861 * inflow.c: Remove _initialize_inflow prototype.
1862 * infrun.c: Remove _initialize_infrun prototype.
1863 * interps.c: Remove _initialize_interpreter prototype.
1864 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1865 * jit.c: Remove _initialize_jit prototype.
1866 * language.c: Remove _initialize_language prototype.
1867 * linux-fork.c: Remove _initialize_linux_fork prototype.
1868 * linux-nat.c: Remove _initialize_linux_nat prototype.
1869 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1870 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1871 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1872 * m2-lang.c: Remove _initialize_m2_language prototype.
1873 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1874 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1875 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1876 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1877 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1878 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1879 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1880 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1881 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1882 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1883 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1884 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1885 * machoread.c: Remove _initialize_machoread prototype.
1886 * macrocmd.c: Remove _initialize_macrocmd prototype.
1887 * macroscope.c: Remove _initialize_macroscope prototype.
1888 * maint.c: Remove _initialize_maint_cmds prototype.
1889 * mdebugread.c: Remove _initialize_mdebugread prototype.
1890 * memattr.c: Remove _initialize_mem prototype.
1891 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1892 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1893 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1894 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1895 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1896 * microblaze-linux-tdep.c: Remove
1897 _initialize_microblaze_linux_tdep prototype.
1898 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1899 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1900 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1901 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1902 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1903 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1904 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1905 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1906 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1907 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1908 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1909 prototype.
1910 * mipsread.c: Remove _initialize_mipsread prototype.
1911 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1912 prototype.
1913 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1914 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1915 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1916 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1917 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1918 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1919 prototype.
1920 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1921 * nto-procfs.c: Remove _initialize_procfs prototype.
1922 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1923 * objc-lang.c: Remove _initialize_objc_language prototype.
1924 * objfiles.c: Remove _initialize_objfiles prototype.
1925 * observer.c: Remove observer_test_first_notification_function,
1926 observer_test_second_notification_function,
1927 observer_test_third_notification_function, and
1928 _initialize_observer prototypes.
1929 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1930 * osabi.c: Remove _initialize_gdb_osabi prototype.
1931 * osdata.c: Remove _initialize_osdata prototype.
1932 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1933 * parse.c: Remove _initialize_parse prototype.
1934 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1935 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1936 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1937 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1938 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1939 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1940 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1941 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1942 * printcmd.c: Remove _initialize_printcmd prototype.
1943 * probe.c: Remove _initialize_probe prototype.
1944 * proc-api.c: Remove _initialize_proc_api prototype.
1945 * proc-events.c: Remove _initialize_proc_events prototype.
1946 * proc-service.c: Remove _initialize_proc_service prototype.
1947 * procfs.c: Remove _initialize_procfs prototype.
1948 * psymtab.c: Remove _initialize_psymtab prototype.
1949 * python/python.c: Remove _initialize_python prototype.
1950 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1951 * record-btrace.c: Remove _initialize_record_btrace prototype.
1952 * record-full.c: Remove _initialize_record_full prototype.
1953 * record.c: Remove _initialize_record prototype.
1954 * regcache.c: Remove _initialize_regcache prototype.
1955 * reggroups.c: Remove _initialize_reggroup prototype.
1956 * remote-notif.c: Remove _initialize_notif prototype.
1957 * remote-sim.c: Remove _initialize_remote_sim prototype.
1958 * remote.c: Remove _initialize_remote prototype.
1959 * reverse.c: Remove _initialize_reverse prototype.
1960 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1961 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1962 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1963 prototype.
1964 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1965 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1966 * rust-exp.y: Remove _initialize_rust_exp prototype.
1967 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1968 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1969 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1970 * score-tdep.c: Remove _initialize_score_tdep prototype.
1971 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1972 prototype.
1973 * ser-go32.c: Remove _initialize_ser_dos prototype.
1974 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1975 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1976 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1977 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1978 * serial.c: Remove _initialize_serial prototype.
1979 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1980 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1981 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1982 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1983 * skip.c: Remove _initialize_step_skip prototype.
1984 * sol-thread.c: Remove _initialize_sol_thread prototype.
1985 * solib-aix.c: Remove _initialize_solib_aix prototype.
1986 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1987 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1988 * solib-frv.c: Remove _initialize_frv_solib prototype.
1989 * solib-spu.c: Remove _initialize_spu_solib prototype.
1990 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1991 * solib-target.c: Remove _initialize_solib_target prototype.
1992 * solib.c: Remove _initialize_solib prototype.
1993 * source.c: Remove _initialize_source prototype.
1994 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1995 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1996 prototype.
1997 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1998 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1999 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2000 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2001 prototype.
2002 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2003 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2004 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2005 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2006 prototype.
2007 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2008 prototype.
2009 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2010 prototype.
2011 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2012 prototype.
2013 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2014 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2015 prototype.
2016 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2017 prototype.
2018 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2019 prototype.
2020 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2021 prototype.
2022 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2023 prototype.
2024 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2025 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2026 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2027 * stabsread.c: Remove _initialize_stabsread prototype.
2028 * stack.c: Remove _initialize_stack prototype.
2029 * stap-probe.c: Remove _initialize_stap_probe prototype.
2030 * std-regs.c: Remove _initialize_frame_reg prototype.
2031 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2032 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2033 * symfile.c: Remove _initialize_symfile prototype.
2034 * symmisc.c: Remove _initialize_symmisc prototype.
2035 * symtab.c: Remove _initialize_symtab prototype.
2036 * target-dcache.c: Remove _initialize_target_dcache prototype.
2037 * target-descriptions.c: Remove _initialize_target_descriptions
2038 prototype.
2039 * thread.c: Remove _initialize_thread prototype.
2040 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2041 prototype.
2042 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2043 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2044 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2045 prototype.
2046 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2047 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2048 * tracefile.c: Remove _initialize_tracefile prototype.
2049 * tracepoint.c: Remove _initialize_tracepoint prototype.
2050 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2051 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2052 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2053 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2054 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2055 * tui/tui-win.c: Remove _initialize_tui_win prototype.
2056 * tui/tui.c: Remove _initialize_tui prototype.
2057 * typeprint.c: Remove _initialize_typeprint prototype.
2058 * user-regs.c: Remove _initialize_user_regs prototype.
2059 * utils.c: Remove _initialize_utils prototype.
2060 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2061 * valarith.c: Remove _initialize_valarith prototype.
2062 * valops.c: Remove _initialize_valops prototype.
2063 * valprint.c: Remove _initialize_valprint prototype.
2064 * value.c: Remove _initialize_values prototype.
2065 * varobj.c: Remove _initialize_varobj prototype.
2066 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2067 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2068 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2069 * windows-nat.c: Remove _initialize_windows_nat,
2070 _initialize_check_for_gdb_ini, and _initialize_loadable
2071 prototypes.
2072 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2073 * xcoffread.c: Remove _initialize_xcoffread prototype.
2074 * xml-support.c: Remove _initialize_xml_support prototype.
2075 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2076 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2077 prototype.
2078 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2079 prototype.
2080 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2081
a611b5cb
KS
20822017-09-08 Keith Seitz <keiths@redhat.com>
2083
2084 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2085 field.
2086
469412dd
CW
20872017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
2088
2089 * f-valprint.c (f_val_print): Remove check for one byte
2090 sized integers. Remove printing of character type.
2091
a5ad232b
FP
20922017-09-08 Frank Penczek <frank.penczek@intel.com>
2093 Christoph Weinmann <christoph.t.weinmann@intel.com>
2094 Bernhard Heckel <bernhard.heckel@intel.com>
2095
2096 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2097 to maintain proper indentation when printing pointers/refs.
2098
e5014227
JB
20992017-09-07 Joel Brobecker <brobecker@adacore.com>
2100
2101 GDB 8.0.1 released.
2102
63c99141
JB
21032017-09-07 Joel Brobecker <brobecker@adacore.com>
2104
2105 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2106
69c1e056
TT
21072017-09-05 Tom Tromey <tom@tromey.com>
2108
2109 * parse.c (funcall_chain): Now a std::vector.
2110 (start_arglist, end_arglist): Simplify.
2111 (free_funcalls): Remove.
2112 (parse_exp_in_context_1): Remove cleanup.
2113
fef704bf
TT
21142017-09-05 Tom Tromey <tom@tromey.com>
2115
2116 * go-exp.y (go_parse): Don't create a cleanup.
2117
5613c585
TT
21182017-09-05 Tom Tromey <tom@tromey.com>
2119
2120 * d-exp.y (PrimaryExpression): Use std::string.
2121 (d_parse): Don't create a cleanup.
2122
eae49211
TT
21232017-09-05 Tom Tromey <tom@tromey.com>
2124
2125 * utils.c (do_clear_parser_state): Remove.
2126 (make_cleanup_clear_parser_state): Remove.
2127 * p-exp.y (pascal_parse): Use scoped_restore.
2128 * m2-exp.y (m2_parse): Use scoped_restore.
2129 * f-exp.y (f_parse): Use scoped_restore.
2130 * d-exp.y (d_parse): Use scoped_restore.
2131 * c-exp.y (c_parse): Use scoped_restore.
2132 * ada-exp.y (ada_parse): Use scoped_restore.
2133 * utils.h (make_cleanup_clear_parser_state): Remove.
2134
73b9be8b
KS
21352017-09-06 Keith Seitz <keiths@redhat.com>
2136
2137 * dwarf2read.c (dw2_linkage_name_attr): New function.
2138 (dw2_linkage_name): New function.
2139 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2140 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2141 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2142
a102602b
KR
21432017-09-06 Kamil Rytarowski <n54@gmx.com>
2144
2145 * config/djgpp/djconfig.sh: Correct shell portability issue.
2146
28ad437d
KR
21472017-09-06 Kamil Rytarowski <n54@gmx.com>
2148
2149 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2150
351787dd
JB
21512017-09-06 John Baldwin <jhb@FreeBSD.org>
2152
2153 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2154 * NEWS: Mention new FreeBSD/mips native configuration.
2155 * configure.host: Add aarch64*-*-freebsd*.
2156 * configure.nat: Likewise.
2157 * aarch64-fbsd-nat.c: New file.
2158
c0f84956
JB
21592017-09-06 John Baldwin <jhb@FreeBSD.org>
2160
2161 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2162 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2163 * NEWS: Mention new FreeBSD/aarch64 target.
2164 * configure.tgt: Add aarch64*-*-freebsd*.
2165 * aarch64-fbsd-tdep.c: New file.
2166 * aarch64-fbsd-tdep.h: New file.
2167
7610297a
KR
21682017-09-06 Kamil Rytarowski <n54@gmx.com>
2169
2170 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2171
fbd1b771
JK
21722017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2173
2174 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2175 of TLS symbols.
2176
5ca79eae
PW
21772017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2178
2179 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2180 call.
2181
bf93d7ba
SM
21822017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2183
2184 * infrun.c (follow_exec): Call add_thread after
2185 target_find_description.
2186
1bb7c059
SM
21872017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2188
2189 * infrun.c (handle_inferior_event_1): When exec'ing, read
2190 stop_pc after follow_exec.
2191
fc809827
SM
21922017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2193
2194 * remote.c (process_g_packet): Update error message.
2195
d2fcdd85
YQ
21962017-09-05 Yao Qi <yao.qi@linaro.org>
2197
2198 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2199 targets.
2200
e69570ee
PA
22012017-09-05 Pedro Alves <palves@redhat.com>
2202
2203 * eval.c (eval_call, evaluate_funcall): New functions, factored
2204 out from ...
2205 (evaluate_subexp_standard): ... this.
2206
22916b07
YQ
22072017-09-05 Yao Qi <yao.qi@linaro.org>
2208
2209 * amd64-tdep.c (amd64_target_description): Create target
2210 descriptions.
2211 (_initialize_amd64_tdep): Don't call functions
2212 initialize_tdesc_amd64_*. Add self tests.
2213 * arch/amd64.c (amd64_create_target_description): Add parameter
2214 is_linux. Call set_tdesc_osabi if is_linux is true.
2215 * arch/amd64.h (amd64_create_target_description): Update the
2216 declaration.
2217 * arch/i386.c (i386_create_target_description): Add parameter
2218 is_linux. Call set_tdesc_osabi if is_linux is true.
2219 * arch/i386.h (i386_create_target_description): Update
2220 declaration.
2221 * configure.tgt: Add i386.o to gdb_target_obs.
2222 * features/Makefile (XMLTOC): Remove i386/*.xml.
2223 * features/i386/amd64-avx-avx512.c: Remove.
2224 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2225 * features/i386/amd64-avx-mpx.c: Remove.
2226 * features/i386/amd64-avx.c: Remove.
2227 * features/i386/amd64-mpx.c: Remove.
2228 * features/i386/amd64.c: Remove.
2229 * features/i386/i386-avx-avx512.c: Remove.
2230 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2231 * features/i386/i386-avx-mpx.c: Remove.
2232 * features/i386/i386-avx.c: Remove.
2233 * features/i386/i386-mmx.c: Remove.
2234 * features/i386/i386-mpx.c: Remove.
2235 * features/i386/i386.c: Remove.
2236 * i386-tdep.c: Don't include features/i386/i386*.c., include
2237 target-descriptions.h and arch/i386.h.
2238 (i386_target_description): Create target descriptions.
2239 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2240 functions. Do self tests.
2241
0854b7b1
YQ
22422017-09-05 Yao Qi <yao.qi@linaro.org>
2243
2244 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2245 * features/i386/amd64-avx-avx512-linux.c: Removed.
2246 * features/i386/amd64-avx-linux.c: Removed.
2247 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2248 * features/i386/amd64-avx-mpx-linux.c: Removed.
2249 * features/i386/amd64-linux.c: Removed.
2250 * features/i386/amd64-mpx-linux.c: Removed.
2251 * features/i386/x32-avx-avx512-linux.c: Removed.
2252 * features/i386/x32-avx-linux.c: Removed.
2253 * features/i386/x32-linux.c: Removed.
2254
b4570e4b
YQ
22552017-09-05 Yao Qi <yao.qi@linaro.org>
2256
2257 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2258 features/i386/*.c.
2259 (amd64_linux_read_description): Call
2260 amd64_create_target_description.
2261 * arch/amd64.c: New file.
2262 * arch/amd64.h: New file.
2263 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2264 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2265
6c73f67f
YQ
22662017-09-05 Yao Qi <yao.qi@linaro.org>
2267
2268 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2269 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2270 (amd64_linux_read_description): Create target descriptions.
2271 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2272 functions. Add unit tests.
2273 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2274 x32-core.xml.
2275 * features/i386/64bit-avx.c: Generated.
2276 * features/i386/64bit-avx512.c: Generated.
2277 * features/i386/64bit-core.c: Generated.
2278 * features/i386/64bit-linux.c: Generated.
2279 * features/i386/64bit-mpx.c: Generated.
2280 * features/i386/64bit-pkeys.c: Generated.
2281 * features/i386/64bit-segments.c: Generated.
2282 * features/i386/64bit-sse.c: Generated.
2283 * features/i386/x32-core.c: Generated.
2284 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2285 c files for amd64-linux and x32-linux.
2286
9d3d478b
YQ
22872017-09-05 Yao Qi <yao.qi@linaro.org>
2288
2289 * amd64-linux-tdep.c (amd64_linux_read_description): New
2290 function.
2291 (amd64_linux_core_read_description): Call
2292 amd64_linux_read_description.
2293 (amd64_linux_init_abi): Likewise.
2294 (amd64_x32_linux_init_abi): Likewise.
2295 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2296 * x86-linux-nat.c (x86_linux_read_description): Call
2297 amd64_linux_read_description.
2298
b9f1d50f
YQ
22992017-09-05 Yao Qi <yao.qi@linaro.org>
2300
2301 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2302 comments.
2303
188c9e6d
YQ
23042017-09-05 Yao Qi <yao.qi@linaro.org>
2305
2306 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2307 * features/i386/i386-avx-avx512-linux.c: Remove.
2308 * features/i386/i386-avx-linux.c: Remove.
2309 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2310 * features/i386/i386-avx-mpx-linux.c: Remove.
2311 * features/i386/i386-linux.c: Remove.
2312 * features/i386/i386-mmx-linux.c: Remove.
2313 * features/i386/i386-mpx-linux.c: Remove.
2314
5f035c07
YQ
23152017-09-05 Yao Qi <yao.qi@linaro.org>
2316
2317 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2318 (SFILES): Add arch/i386.c.
2319 (HFILES_NO_SRCDIR): Add arch/i386.h.
2320 * arch/i386.c: New file.
2321 * arch/i386.h: New file.
2322 * arch/tdesc.h (allocate_target_description): Declare.
2323 (set_tdesc_architecture): Declare.
2324 (set_tdesc_osabi): Declare.
2325 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2326 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2327 include arch/i386.h.
2328 (i386_linux_read_description): Remove code and call
2329 i386_create_target_description.
2330 (set_tdesc_architecture): New function.
2331 (set_tdesc_osabi): New function.
2332 * target-descriptions.h (allocate_target_description): Remove.
2333
0abe8a89
YQ
23342017-09-05 Yao Qi <yao.qi@linaro.org>
2335
2336 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2337 * target-descriptions.c (tdesc_create_feature): Likewise, and
2338 adjust code.
2339 * features/i386/32bit-avx.c: Re-generated.
2340 * features/i386/32bit-avx512.c: Re-generated.
2341 * features/i386/32bit-core.c: Re-generated.
2342 * features/i386/32bit-linux.c: Re-generated.
2343 * features/i386/32bit-mpx.c: Re-generated.
2344 * features/i386/32bit-pkeys.c: Re-generated.
2345 * features/i386/32bit-sse.c: Re-generated.
2346
0a188386
YQ
23472017-09-05 Yao Qi <yao.qi@linaro.org>
2348
2349 * regformats/regdef.h (struct reg): Override operator == and !=.
2350
f49ff000
YQ
23512017-09-05 Yao Qi <yao.qi@linaro.org>
2352
2353 * arch/tdesc.h: New file.
2354 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2355 * target-descriptions.c: Update comments.
2356 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2357 declarations.
2358 * features/i386/32bit-avx.c: Re-generated.
2359 * features/i386/32bit-avx512.c: Re-generated.
2360 * features/i386/32bit-core.c: Re-generated.
2361 * features/i386/32bit-linux.c: Re-generated.
2362 * features/i386/32bit-mpx.c: Re-generated.
2363 * features/i386/32bit-pkeys.c: Re-generated.
2364 * features/i386/32bit-sse.c: Re-generated.
2365
f7000548
YQ
23662017-09-05 Yao Qi <yao.qi@linaro.org>
2367
2368 * regformats/regdat.sh: Update generated code.
2369
c9a5e2a5
YQ
23702017-09-05 Yao Qi <yao.qi@linaro.org>
2371
2372 * regformats/regdat.sh: Adjust code order.
2373
d6b687ac
SM
23742017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2375
2376 * expprint.c (dump_subexp_body_standard): Use constant format
2377 string in fprintf_filtered call.
2378
a379bfd0
JB
23792017-09-04 John Baldwin <jhb@FreeBSD.org>
2380
2381 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2382 NetBSD/i386.
2383 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2384
f7efc967
JB
23852017-09-04 John Baldwin <jhb@FreeBSD.org>
2386
2387 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2388
c49fbc6c
JB
23892017-09-04 John Baldwin <jhb@FreeBSD.org>
2390
2391 * bsd-kvm.o: Define _KMEMUSER.
2392 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2393 * configure: Regenerate.
2394
26562e73
JB
23952017-09-04 John Baldwin <jhb@FreeBSD.org>
2396
2397 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2398 * i386-fbsd-nat.c: Likewise.
2399
31cf1487
JB
24002017-09-04 John Baldwin <jhb@FreeBSD.org>
2401
2402 * unittests/array-view-selftests.c: Add include of <array>.
2403
5b9f8a7c
JB
24042017-09-04 John Baldwin <jhb@FreeBSD.org>
2405
2406 * spu-tdep.c (flush_ea_cache): Add missing argument to
2407 call_function_by_hand.
2408
d69cf9b2
PA
24092017-09-04 Pedro Alves <palves@redhat.com>
2410
2411 * NEWS (Safer support for debugging with no debug info): New.
2412
3693fdb3
PA
24132017-09-04 Pedro Alves <palves@redhat.com>
2414
2415 * c-exp.y (function_method, function_method_void): Add current
2416 instance flags to TYPE_INSTANCE.
2417 * dwarf2read.c (check_modifier): New.
2418 (compute_delayed_physnames): Assert that only C++ adds delayed
2419 physnames. Mark fn_fields as const/volatile depending on
2420 physname.
2421 * eval.c (make_params): New type_instance_flags parameter. Use
2422 it as the new type's instance flags.
2423 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2424 flags element and pass it to make_params.
2425 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2426 instance flags element.
2427 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2428 * gdbtypes.h: Include "enum-flags.h".
2429 (type_instance_flags): New enum-flags type.
2430 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2431 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2432 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2433 (follow_type_instance_flags): New function.
2434 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2435 * parser-defs.h (follow_type_instance_flags): Declare.
2436 * valops.c (value_struct_elt_for_reference): const/volatile must
2437 match too.
2438
e68cb8e0
PA
24392017-09-04 Pedro Alves <palves@redhat.com>
2440
2441 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2442 function/method scopes; lookup the nested name as a function local
2443 static variable.
2444
858be34c
PA
24452017-09-04 Pedro Alves <palves@redhat.com>
2446
2447 (%type <voidval>): Add function_method.
2448 * c-exp.y (exp): New production for calls with no arguments.
2449 (function_method, function_method_void_or_typelist): New
2450 productions.
2451 (exp): New production for "method()::static_var".
2452 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2453 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2454 Handle OP_FUNC_STATIC_VAR.
2455 * parse.c (operator_length_standard):
2456 Handle OP_FUNC_STATIC_VAR.
2457
dd5901a6
PA
24582017-09-04 Pedro Alves <palves@redhat.com>
2459
2460 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2461 handling.
2462 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2463 Ditto.
2464 * parse.c (operator_length_standard, operator_check_standard):
2465 Ditto.
2466 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2467
46a4882b
PA
24682017-09-04 Pedro Alves <palves@redhat.com>
2469
2470 * ax-gdb.c: Include "typeprint.h".
2471 (gen_expr_for_cast): New function.
2472 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2473 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2474 type is unknown.
2475 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2476 nodebug_data_symbol.
2477 * eval.c: Include "typeprint.h".
2478 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2479 Error out if symbol has unknown type.
2480 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2481 evaluate_subexp_for_cast.
2482 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2483 OP_VAR_MSYM_VALUE.
2484 (evaluate_subexp_for_cast): New function.
2485 * gdbtypes.c (init_nodebug_var_type): New function.
2486 (objfile_type): Use it to initialize types of variables with no
2487 debug info.
2488 * typeprint.c (error_unknown_type): New.
2489 * typeprint.h (error_unknown_type): New declaration.
2490 * compile/compile-c-types.c (convert_type_basic): Handle
2491 TYPE_CODE_ERROR; warn and fallback to int for variables with
2492 unknown type.
2493
fe13dfec
PA
24942017-09-04 Pedro Alves <palves@redhat.com>
2495
2496 * eval.c (evaluate_var_value): New function, factored out from ...
2497 (evaluate_subexp_standard): ... here.
2498
d008ee21
PA
24992017-09-04 Pedro Alves <palves@redhat.com>
2500
2501 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2502 Remove useless assignments to 'op'.
2503
827d0c51
PA
25042017-09-04 Pedro Alves <palves@redhat.com>
2505
2506 * eval.c (eval_skip_value): New function.
2507 (evaluate_subexp_standard): Use it.
2508
2c5a2be1
PA
25092017-09-04 Pedro Alves <palves@redhat.com>
2510
2511 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2512 function name from symbol/minsym and pass it to
2513 error_call_unknown_return_type.
2514
74ea4be4
PA
25152017-09-04 Pedro Alves <palves@redhat.com>
2516
2517 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2518 * ax-gdb.c (gen_msym_var_ref): New function.
2519 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2520 * eval.c (evaluate_var_msym_value): New function.
2521 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2522 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2523 to call_function_by_hand.
2524 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2525 Handle OP_VAR_MSYM_VALUE.
2526 (union exp_element) <msymbol>: New field.
2527 * minsyms.h (struct type): Forward declare.
2528 (find_minsym_type_and_address): Declare.
2529 * parse.c (write_exp_elt_msym): New function.
2530 (write_exp_msymbol): Delete, refactored as ...
2531 (find_minsym_type_and_address): ... this new function.
2532 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2533 (operator_length_standard, operator_check_standard): Handle
2534 OP_VAR_MSYM_VALUE.
2535 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2536
7022349d
PA
25372017-09-04 Pedro Alves <palves@redhat.com>
2538
2539 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2540 TYPE_GNU_IFUNC specially here. Throw error if return type is
2541 unknown.
2542 * ada-typeprint.c (print_func_type): Handle functions with unknown
2543 return type.
2544 * c-typeprint.c (c_type_print_base): Handle functions and methods
2545 with unknown return type.
2546 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2547 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2548 * compile/compile-c-types.c: Include "objfiles.h".
2549 (convert_func): For functions with unknown return type, warn and
2550 default to int.
2551 * compile/compile-object-run.c (compile_object_run): Adjust call
2552 to call_function_by_hand_dummy.
2553 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2554 call_function_by_hand.
2555 * eval.c (evaluate_subexp_standard): Adjust calls to
2556 call_function_by_hand. Handle functions and methods with unknown
2557 return type. Pass expect_type to call_function_by_hand.
2558 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2559 return type.
2560 * gcore.c (call_target_sbrk): Adjust call to
2561 call_function_by_hand.
2562 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2563 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2564 an integer address type instead of nodebug.
2565 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2566 call_function_by_hand.
2567 * infcall.c (error_call_unknown_return_type): New function.
2568 (call_function_by_hand): New "default_return_type" parameter.
2569 Pass it down.
2570 (call_function_by_hand_dummy): New "default_return_type"
2571 parameter. Use it instead of defaulting to int. If there's no
2572 default and the return type is unknown, throw an error. If
2573 there's a default return type, and the called function has no
2574 debug info, then assume the function is prototyped.
2575 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2576 New "default_return_type" parameter.
2577 (error_call_unknown_return_type): New declaration.
2578 * linux-fork.c (call_lseek): Cast return type of lseek.
2579 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2580 call_function_by_hand.
2581 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2582 calls to call_function_by_hand.
2583 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2584 return type.
2585 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2586 (value_nsstring, print_object_command): Adjust calls to
2587 call_function_by_hand.
2588 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2589 functions with unknown return type.
2590 (pascal_type_print_func_varspec_suffix): New function.
2591 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2592 TYPE_CODE_METHOD>: Use it.
2593 * python/py-value.c (valpy_call): Adjust call to
2594 call_function_by_hand.
2595 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2596 call_function_by_hand.
2597 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2598 call_function_by_hand.
2599 * valops.c (value_allocate_space_in_inferior): Adjust call to
2600 call_function_by_hand.
2601 * typeprint.c (type_print_unknown_return_type): New function.
2602 * typeprint.h (type_print_unknown_return_type): New declaration.
2603
54990598
PA
26042017-09-04 Pedro Alves <palves@redhat.com>
2605
2606 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2607 types with more than one parameter as prototyped.
2608
9a24775b
PA
26092017-09-04 Pedro Alves <palves@redhat.com>
2610
2611 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2612 (disassemble_command): Use gdb_disassembly_flags instead of bare
2613 int.
2614 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2615 (dump_insns, do_mixed_source_and_assembly_deprecated)
2616 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2617 Use gdb_disassembly_flags instead of bare int.
2618 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2619 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2620 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2621 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2622 (enum gdb_disassembly_flag): ... values of this new enumeration.
2623 (gdb_disassembly_flags): Define.
2624 (gdb_disassembly)
2625 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2626 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2627 gdb_disassembly_flags instead of bare int.
2628 * record-btrace.c (btrace_insn_history)
2629 (record_btrace_insn_history, record_btrace_insn_history_range)
2630 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2631 instead of bare int.
2632 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2633 Use gdb_disassembly_flags instead of bare int.
2634 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2635 Define.
2636 * target-delegates.c: Regenerate.
2637 * target.c (target_insn_history, target_insn_history_from)
2638 (target_insn_history_range): Use gdb_disassembly_flags instead of
2639 bare int.
2640 * target.h: Include "disasm.h".
2641 (struct target_ops) <to_insn_history, to_insn_history_from,
2642 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2643 int.
2644 (target_insn_history, target_insn_history_from)
2645 (target_insn_history_range): Use gdb_disassembly_flags instead of
2646 bare int.
2647
80a65e9b
SM
26482017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2649
2650 * cli/cli-script.c (build_command_line): For if/while commands,
2651 check whether args is empty.
2652
6b66338c
SM
26532017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2654
2655 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2656 (enum command_control_type): Likewise.
2657 (struct command_line): Likewise.
2658 (free_command_lines): Likewise.
2659 (struct command_lines_deleter): Likewise.
2660 (command_line_up): Likewise.
2661 (read_command_lines): Likewise.
2662 (read_command_lines_1): Likewise.
2663 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2664 (enum command_control_type): Likewise.
2665 (struct command_line): Likewise.
2666 (free_command_lines): Likewise.
2667 (struct command_lines_deleter): Likewise.
2668 (command_line_up): Likewise.
2669 (read_command_lines): Likewise.
2670 (read_command_lines_1): Likewise.
2671 * breakpoint.h: Include cli/cli-script.h.
2672 * extension-priv.h: Likewise.
2673 * gdbcmd.h: Likewise.
2674
51abb421
PA
26752017-09-04 Pedro Alves <palves@redhat.com>
2676
2677 * ada-lang.c (is_known_support_routine): Move sal declaration to
2678 where it is initialized.
2679 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2680 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2681 (clear_command, update_static_tracepoint): Remove init_sal
2682 references. Move declarations closer to initializations.
2683 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2684 initializations.
2685 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2686 references. Move sal declarations closer to initializations.
2687 * frame.c (find_frame_sal): Return a symtab_and_line via function
2688 return instead of output parameter. Remove init_sal references.
2689 * frame.h (find_frame_sal): Return a symtab_and_line via function
2690 return instead of output parameter.
2691 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2692 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2693 instead of memset.
2694 (gdbscm_find_pc_line): Remove init_sal reference.
2695 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2696 references. Move declarations closer to initializations.
2697 * infcmd.c (set_step_frame): Update. Move declarations closer to
2698 initializations.
2699 (finish_backward): Remove init_sal references. Move declarations
2700 closer to initializations.
2701 * infrun.c (process_event_stop_test, handle_step_into_function)
2702 (insert_hp_step_resume_breakpoint_at_frame)
2703 (insert_step_resume_breakpoint_at_caller): Likewise.
2704 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2705 (symbol_to_sal): Likewise.
2706 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2707 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2708 to its initialization.
2709 * reverse.c (save_bookmark_command): Use new/delete. Remove
2710 init_sal references. Move declarations closer to initializations.
2711 * source.c (get_current_source_symtab_and_line): Remove brace
2712 initialization.
2713 (set_current_source_symtab_and_line): Now takes the sal by const
2714 reference. Remove brace initialization.
2715 (line_info): Remove init_sal reference.
2716 * source.h (set_current_source_symtab_and_line): Now takes a
2717 symtab_and_line via const reference.
2718 * stack.c (set_current_sal_from_frame): Adjust.
2719 (print_frame_info): Adjust.
2720 (get_last_displayed_sal): Return the sal via function return
2721 instead of via output parameter. Simplify.
2722 (frame_info): Adjust.
2723 * stack.h (get_last_displayed_sal): Return the sal via function
2724 return instead of via output parameter.
2725 * symtab.c (init_sal): Delete.
2726 (find_pc_sect_line): Remove init_sal references. Move
2727 declarations closer to initializations.
2728 (find_function_start_sal): Remove init_sal references. Move
2729 declarations closer to initializations.
2730 * symtab.h (struct symtab_and_line): In-class initialize all
2731 fields.
2732 * tracepoint.c (set_traceframe_context)
2733 (print_one_static_tracepoint_marker): Remove init_sal references.
2734 Move declarations closer to initializations.
2735 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2736 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2737 declarations closer to initializations.
2738 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2739 init_sal references. Adjust.
2740
6c5b2ebe
PA
27412017-09-04 Pedro Alves <palves@redhat.com>
2742
2743 * ax-gdb.c (agent_command_1): Use range-for.
2744 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2745 * breakpoint.c: Include "common/array-view.h".
2746 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2747 parameter from struct symtabs_and_lines to
2748 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2749 (breakpoint_sals_to_pc): Change sals parameter from struct
2750 symtabs_and_lines to std::vector reference.
2751 (check_fast_tracepoint_sals): Change sals parameter from struct
2752 symtabs_and_lines to std::array_view. Use range-for.
2753 (decode_static_tracepoint_spec): Return a std::vector instead of
2754 symtabs_and_lines. Update.
2755 (create_breakpoint): Update.
2756 (break_range_command, until_break_command, clear_command): Update.
2757 (base_breakpoint_decode_location, bkpt_decode_location)
2758 (bkpt_probe_create_sals_from_location)
2759 (bkpt_probe_decode_location, tracepoint_decode_location)
2760 (tracepoint_probe_decode_location)
2761 (strace_marker_create_sals_from_location): Return a std::vector
2762 instead of symtabs_and_lines.
2763 (strace_marker_create_breakpoints_sal): Update.
2764 (strace_marker_decode_location): Return a std::vector instead of
2765 symtabs_and_lines. Update.
2766 (update_breakpoint_locations): Change struct symtabs_and_lines
2767 parameters to gdb::array_view. Adjust.
2768 (location_to_sals): Return a std::vector instead of
2769 symtabs_and_lines. Update.
2770 (breakpoint_re_set_default): Use std::vector instead of struct
2771 symtabs_and_lines.
2772 (decode_location_default): Return a std::vector instead of
2773 symtabs_and_lines. Update.
2774 * breakpoint.h: Include "common/array-view.h".
2775 (struct breakpoint_ops) <decode_location>: Now returns a
2776 std::vector instead of returning a symtabs_and_lines via output
2777 parameter.
2778 (update_breakpoint_locations): Change sals parameters to use
2779 gdb::array_view.
2780 * cli/cli-cmds.c (edit_command, list_command): Update to use
2781 std::vector and gdb::array_view.
2782 (ambiguous_line_spec): Adjust to use gdb::array_view and
2783 range-for.
2784 (compare_symtabs): Rename to ...
2785 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2786 const reference and adjust.
2787 (filter_sals): Rewrite using std::vector and standard algorithms.
2788 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2789 (jump_command): Update to use std::vector.
2790 * linespec.c (struct linespec_state) <canonical_names>: Update
2791 comment.
2792 (add_sal_to_sals_basic): Delete.
2793 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2794 (decode_line_2, create_sals_line_offset)
2795 (convert_address_location_to_sals, convert_linespec_to_sals)
2796 (convert_explicit_location_to_sals, parse_linespec)
2797 (event_location_to_sals, decode_line_full, decode_line_1)
2798 (decode_line_with_current_source)
2799 (decode_line_with_last_displayed, decode_objc)
2800 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2801 (linespec_result::~linespec_result): Adjust to use std::vector
2802 instead of symtabs_and_lines.
2803 * linespec.h (linespec_sals::sals): Now a std::vector.
2804 (struct linespec_result): Use std::vector, bool, and in-class
2805 initialization.
2806 (decode_line_1, decode_line_with_current_source)
2807 (decode_line_with_last_displayed): Return std::vector.
2808 * macrocmd.c (info_macros_command): Use std::vector.
2809 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2810 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2811 std::vector.
2812 * probe.h (parse_probes): Return a std::vector.
2813 * python/python.c (gdbpy_decode_line): Use std::vector and
2814 gdb::array_view.
2815 * source.c (select_source_symtab, line_info): Use std::vector.
2816 * stack.c (func_command): Use std::vector.
2817 * symtab.h (struct symtabs_and_lines): Delete.
2818 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2819
7c44b49c
PA
28202017-09-04 Pedro Alves <palves@redhat.com>
2821
2822 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2823 unittests/array-view-selftests.c.
2824 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2825 * common/array-view.h: New file.
2826 * unittests/array-view-selftests.c: New file.
2827
e439fa14
PA
28282017-09-04 Pedro Alves <palves@redhat.com>
2829
2830 * cli/cli-cmds.c (edit_command): Pass message to
2831 ambiguous_line_spec.
2832 (list_command): Pass message to ambiguous_line_spec. Say
2833 "first"/"last" instead of "start" and "end" to be consistent with
2834 the manual.
2835 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2836 them to print formatted message.
2837
7525b645
PA
28382017-09-04 Pedro Alves <palves@redhat.com>
2839
2840 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2841 ftrace_update_insns by reference instead of pointer.
2842
badc0020
YQ
28432017-09-04 Yao Qi <yao.qi@linaro.org>
2844
2845 * i386-go32-tdep.c: Include x86-xstate.h.
2846 (i386_go32_init_abi): Call i386_target_description.
2847 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2848 if xcr0 is X86_XSTATE_X87_MASK.
2849 * i386-tdep.h (tdesc_i386): Remove the declaration.
2850 (tdesc_i386_mmx): Likewise.
2851
d78bdb54
YQ
28522017-09-04 Yao Qi <yao.qi@linaro.org>
2853
2854 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2855 X86_XSTATE_SSE_MASK instead of 0.
2856
ca1fa5ee
YQ
28572017-09-04 Yao Qi <yao.qi@linaro.org>
2858
2859 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2860 i386_target_description.
2861 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2862 i386_target_description.
2863 * i386-tdep.c (i386_gdbarch_init): Likewise.
2864
2434b019
YQ
28652017-09-04 Yao Qi <yao.qi@linaro.org>
2866
2867 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2868 (x86_darwin_init_abi_64): Call amd64_target_description.
2869 * amd64-dicos-tdep.c: Likewise.
2870 * amd64-fbsd-nat.c: Likewise.
2871 * amd64-fbsd-tdep.c: Likewise.
2872 * amd64-nbsd-tdep.c: Likewise.
2873 * amd64-obsd-tdep.c: Likewise.
2874 * amd64-sol2-tdep.c: Likewise.
2875 * amd64-windows-tdep.c: Likewise.
2876 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2877
0860c437
SM
28782017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2879
2880 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2881 (btrace_function) <insn>: Change type to use std::vector.
2882 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2883 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2884 ftrace_update_insns, ftrace_compute_global_level_offset,
2885 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2886 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2887 change to std::vector.
2888 (ftrace_update_insns): Adjust to change to std::vector, change
2889 type of INSN parameter.
2890 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2891 * record-btrace.c (btrace_call_history_insn_range,
2892 btrace_compute_src_line_range,
2893 record_btrace_frame_prev_register): Adjust to change to
2894 std::vector.
2895 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2896 to change to std::vector.
2897
0638b7f9
TT
28982017-09-03 Tom Tromey <tom@tromey.com>
2899
2900 * corefile.c (reopen_exec_file): Use std::string.
2901
8f84fb0e
TT
29022017-09-03 Tom Tromey <tom@tromey.com>
2903
2904 * compile/compile.c (compile_register_name_mangled): Return
2905 std::string.
2906 * compile/compile-loc2c.c (pushf_register_address): Update.
2907 (pushf_register): Update.
2908 * compile/compile-c-types.c (convert_array): Update.
2909 * compile/compile-c-symbols.c (generate_vla_size): Update.
2910 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2911 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2912 (convert_one_symbol): Update.
2913 (generate_c_for_for_one_variable): Update.
2914 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2915 std::string.
2916 (generate_register_struct): Update.
2917 * compile/compile-internal.h (c_get_range_decl_name): Return a
2918 std::string.
2919 (compile_register_name_mangled): Return std::string.
2920
18e9961f
TT
29212017-09-03 Tom Tromey <tom@tromey.com>
2922
2923 * utils.c (perror_string): Return a std::string.
2924 (throw_perror_with_name, perror_warning_with_name): Update.
2925
45343786
TT
29262017-09-03 Tom Tromey <tom@tromey.com>
2927
2928 * demangle.c (demangle_command): Use std::string,
2929 unique_xmalloc_ptr.
2930
b57af503
TT
29312017-09-03 Tom Tromey <tom@tromey.com>
2932
2933 * cli/cli-setshow.c (do_set_command): Use std::string.
2934
6eecf35f
TT
29352017-09-03 Tom Tromey <tom@tromey.com>
2936
2937 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2938
56496dd4
TT
29392017-09-03 Tom Tromey <tom@tromey.com>
2940
2941 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2942
e91a1fa7
TT
29432017-09-03 Tom Tromey <tom@tromey.com>
2944
2945 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2946 gdb::unique_xmalloc_ptr.
2947
7ffd83d7
TT
29482017-09-03 Tom Tromey <tom@tromey.com>
2949
2950 * thread.c (print_thread_info_1): Use string_printf.
2951 (thread_apply_command, thread_apply_all_command): Use
2952 std::string.
2953
1ccbe998
TT
29542017-09-03 Tom Tromey <tom@tromey.com>
2955
2956 * valprint.c (val_print_string): Update.
2957 * gdbcore.h (memory_error_message): Return std::string.
2958 * corefile.c (memory_error_message): Return std::string.
2959 (memory_error): Update.
2960 * breakpoint.c (insert_bp_location): Update.
2961
23fdd69e
SM
29622017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2963
2964 * target/waitstatus.h (target_waitstatus_to_string): Change
2965 return type to std::string.
2966 * target/waitstatus.c (target_waitstatus_to_string): Return
2967 std::string.
2968 * target.h (target_waitstatus_to_string): Remove declaration.
2969 * infrun.c (resume, clear_proceed_status_thread,
2970 print_target_wait_results, do_target_wait, save_waitstatus,
2971 stop_all_threads): Adjust.
2972 * record-btrace.c (record_btrace_wait): Adjust.
2973 * target-debug.h
2974 (target_debug_print_struct_target_waitstatus_p): Adjust.
2975
5c811d30
JK
29762017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2977
2978 PR gdb/22046
2979 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2980 detection.
2981
0a2dde4a
SDJ
29822017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2983
2984 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2985 for setting/unsetting environment variables on the remote target.
2986 (New remote packets): Add entries for QEnvironmentHexEncoded,
2987 QEnvironmentUnset and QEnvironmentReset.
2988 * common/environ.c (gdb_environ::operator=): Extend method to
2989 handle m_user_set_env_list and m_user_unset_env_list.
2990 (gdb_environ::clear): Likewise.
2991 (match_var_in_string): Change type of first parameter from 'char
2992 *' to 'const char *'.
2993 (gdb_environ::set): Extend method to handle
2994 m_user_set_env_list and m_user_unset_env_list.
2995 (gdb_environ::unset): Likewise.
2996 (gdb_environ::clear_user_set_env): New method.
2997 (gdb_environ::user_set_envp): Likewise.
2998 (gdb_environ::user_unset_envp): Likewise.
2999 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3000 m_user_unset_env_list on move constructor/assignment.
3001 (unset): Add new default parameter 'update_unset_list = true'.
3002 (clear_user_set_env): New method.
3003 (user_set_envp): Likewise.
3004 (user_unset_envp): Likewise.
3005 (m_user_set_env_list): New std::set.
3006 (m_user_unset_env_list): Likewise.
3007 * common/rsp-low.c (hex2str): New function.
3008 (bin2hex): New overload for bin2hex function.
3009 * common/rsp-low.c (hex2str): New prototype.
3010 (str2hex): New overload prototype.
3011 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3012 QEnvironmentUnset and QEnvironmentReset.
3013 (remote_protocol_features): Add QEnvironmentHexEncoded,
3014 QEnvironmentUnset and QEnvironmentReset packets.
3015 (send_environment_packet): New function.
3016 (extended_remote_environment_support): Likewise.
3017 (extended_remote_create_inferior): Call
3018 extended_remote_environment_support.
3019 (_initialize_remote): Add QEnvironmentHexEncoded,
3020 QEnvironmentUnset and QEnvironmentReset packet configs.
3021 * unittests/environ-selftests.c (gdb_selftest_env_var):
3022 New variable.
3023 (test_vector_initialization): New function.
3024 (test_init_from_host_environ): Likewise.
3025 (test_reinit_from_host_environ): Likewise.
3026 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3027 Likewise.
3028 (test_unset_set_empty_vector): Likewise.
3029 (test_vector_clear): Likewise.
3030 (test_std_move): Likewise.
3031 (test_move_constructor):
3032 (test_self_move): Likewise.
3033 (test_set_unset_reset): Likewise.
3034 (run_tests): Rewrite in terms of the functions above.
3035
654670a4
WP
30362017-08-31 Weimin Pan <weimin.pan@oracle.com>
3037
3038 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3039 (adi_available): Use a temp variable of type CORE_ADDR as argument
3040 3 when calling target_auxv_search.
3041 (adi_normalize_address): Use masks and xor operators to calculate
3042 normalized address.
3043 (adi_read_versions, adi_write_versions, adi_print_versions)
3044 (do_examine, do_assign): Use paddress.
3045
7755ddb7
JB
30462017-08-29 John Baldwin <jhb@FreeBSD.org>
3047
3048 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3049 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3050 out of loop and add supply of FIR.
3051 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3052 add collect of FIR.
3053
fd437cbc
SM
30542017-08-28 Simon Marchi <simon.marchi@ericsson.com>
3055
3804a343 3056 PR gdb/21827
fd437cbc
SM
3057 * cli/cli-script.c (define_command): Don't convert command name
3058 to lower case.
3059
988f6b3d
JB
30602017-08-25 Joel Brobecker <brobecker@adacore.com>
3061
3062 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3063 Update all callers accordingly. Remove all code blocks handling
3064 the case where DISPP is not NULL.
3065
663c44ac
JK
30662017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3067
3068 PR symtab/22003
3069 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3070 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3071 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3072
f1902523
JK
30732017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3074
3075 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3076 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3077 (read_comp_units_from_section): New parameter abbrev_section, use
3078 read_and_check_comp_unit_head, allocate signatured_type if needed.
3079 (create_all_comp_units): Update read_comp_units_from_section caller.
3080
87215ad1
SDJ
30812017-08-23 Pedro Alves <palves@redhat.com>
3082
3083 PR remote/21852
3084 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3085 to null_ptid and switch to thread without reading the registers
3086 after adding the inferior.
3087
6e41ddec
JK
30882017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3089
3090 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3091 compile-gcc.
3092 * compile/compile.c (compile_gcc, show_compile_gcc): New.
3093 (compile_to_object): Implement compile_gcc.
3094 (_initialize_compile): Install "set compile-gcc". Initialize
3095 compile_gcc.
3096
e68c32d5
JK
30972017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3098
3099 * compile/compile.c (compile_to_object): Conditionally call
3100 set_verbose. Conditionally call compile or compile_v0.
3101
58afddc6
WP
31022017-08-07 Weimin Pan <weimin.pan@oracle.com>
3103
3104 * sparc64-tdep.h: (adi_normalize_address): New export.
3105 * sparc-nat.h: (open_adi_tag_fd): New export.
3106 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3107 * sparc64-linux-tdep.c:
3108 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3109 (sparc64_linux_handle_segmentation_fault): New function.
3110 (sparc64_linux_init_abi): Register
3111 sparc64_linux_handle_segmentation_fault
3112 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3113 (sparc64_addr_bits_remove): New function.
3114 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3115 (MAX_PROC_NAME_SIZE): New macro.
3116 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3117 (sparc64adilist): New variable.
3118 (adi_proc_list): New variable.
3119 (find_adi_info): New function.
3120 (add_adi_info): New function.
3121 (get_adi_info_proc): New function.
3122 (get_adi_info): New function.
3123 (info_adi_command): New function.
3124 (read_maps_entry): New function.
3125 (adi_available): New function.
3126 (adi_normalize_address): New function.
3127 (adi_align_address): New function.
3128 (adi_convert_byte_count): New function.
3129 (adi_tag_fd): New function.
3130 (adi_is_addr_mapped): New function.
3131 (adi_read_versions): New function.
3132 (adi_write_versions): New function.
3133 (adi_print_versions): New function.
3134 (do_examine): New function.
3135 (do_assign): New function.
3136 (adi_examine_command): New function.
3137 (adi_assign_command): New function.
3138 (_initialize_sparc64_adi_tdep): New function.
3139
11db9430
SM
31402017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3141
3142 * breakpoint.c (breakpoints_info): Rename to ...
3143 (info_breakpoints_command): ... this.
3144 (watchpoints_info): Rename to ...
3145 (info_watchpoints_command): ... this.
3146 (tracepoints_info): Rename to ...
3147 (info_tracepoints_command): ... this.
3148 (_initialize_breakpoint): Adjust.
3149 * dcache.c (dcache_info): Rename to ...
3150 (info_display_command): ... this.
3151 (_initialize_dcache): Adjust.
3152 * frame.h (args_info): Rename to ...
3153 (info_args_command): ... this.
3154 (locals_info): Rename to ...
3155 (info_locals_command): ... this.
3156 * infcmd.c (nofp_registers_info): Rename to ...
3157 (info_registers_command): ... this.
3158 (float_info): Rename to ...
3159 (info_float_command): ... this.
3160 (program_info): Rename to ...
3161 (info_program_command): ... this.
3162 (all_registers_info): Rename to ...
3163 (info_all_registers_command): ... this.
3164 (vector_info): Rename to ...
3165 (info_vector_command): ... this.
3166 (float_info): Rename to ...
3167 (info_float_command): ... this.
3168 (_initialize_infcmd): Adjust.
3169 * inferior.h (term_info): Rename to ...
3170 (info_terminal_command): ... this.
3171 * inflow.c (term_info): Rename to ...
3172 (info_terminal_command): ... this.
3173 (_initialize_inflow): Adjust.
3174 * infrun.c (signals_info): Rename to ...
3175 (info_signals_command): ... this.
3176 (_initialize_infrun): Adjust.
3177 * objc-lang.c (classes_info): Rename to ...
3178 (info_classes_command): ... this.
3179 (selectors_info): Rename to ...
3180 (info_selectors_command): ... this.
3181 (_initialize_objc_language): Adjust.
3182 * printcmd.c (sym_info): Rename to ...
3183 (info_symbol_command): ... this.
3184 (address_info): Rename to ...
3185 (info_address_command): ... this.
3186 (display_info): Rename to ...
3187 (info_display_command): ... this.
3188 (_initialize_printcmd): Adjust.
3189 * reverse.c (bookmarks_info): Rename to ...
3190 (info_breakpoints_command): ... this.
3191 (_initialize_reverse): Adjust.
3192 * ser-go32.c (dos_info): Rename to ...
3193 (info_serial_command): ... this.
3194 (_initialize_ser_dos): Adjust.
3195 * skip.c (skip_info): Rename to ...
3196 (info_skip_command): ... this.
3197 (_initialize_step_skip): Adjust.
3198 * source.c (line_info): Rename to ...
3199 (info_line_command): ... this.
3200 (source_info): Rename to ...
3201 (info_source_command)
3202 * stack.c (frame_info): Rename to ...
3203 (info_frame_command): ... this.
3204 (locals_info): Rename to ...
3205 (info_locals_command): ... this.
3206 (args_info): Rename to ...
3207 (info_args_command): ... this.
3208 (_initialize_stack): Adjust.
3209 * symtab.c (sources_info): Rename to ...
3210 (info_sources_command): ... this.
3211 (variables_info): Rename to ...
3212 (info_variables_command): ... this.
3213 (functions_info): Rename to ...
3214 (info_functions_command): ... this.
3215 (types_info): Rename to ...
3216 (info_types_command): ... this.
3217 (_initialize_symtab): Adjust.
3218 * target.c (target_info): Rename to ...
3219 (info_target_command): ... this.
3220 (initialize_targets): Adjust.
3221 * tracepoint.c (tvariables_info): Rename to ...
3222 (info_tvariables_command): ... this.
3223 (scope_info): Rename to ...
3224 (info_scope_command): ... this.
3225 (trace_dump_actions): Adjust.
3226 (_initialize_tracepoint): Adjust.
3227
b270e6f9
TT
32282017-08-22 Tom Tromey <tom@tromey.com>
3229
3230 * breakpoint.h (install_breakpoint): Update.
3231 * breakpoint.c (add_solib_catchpoint): Update.
3232 (install_breakpoint): Change argument to a std::unique_ptr.
3233 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3234 (create_breakpoint_sal, create_breakpoint): Update.
3235 (watch_command_1, catch_exec_command_1)
3236 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3237 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3238 Return the breakpoint.
3239 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3240 (new_single_step_breakpoint): Update.
3241 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3242 std::unique_ptr.
3243 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3244 std::unique_ptr.
3245 * break-catch-sig.c (create_signal_catchpoint): Use
3246 std::unique_ptr.
3247 * ada-lang.c (create_ada_exception_catchpoint): Use
3248 std::unique_ptr.
3249
36bd8eaa
TT
32502017-08-22 Tom Tromey <tom@tromey.com>
3251
3252 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3253
56f37645
TT
32542017-08-22 Tom Tromey <tom@tromey.com>
3255
3256 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3257 (lookup_partial_symbol): Update.
3258
0b581c69
TT
32592017-08-22 Tom Tromey <tom@tromey.com>
3260
3261 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3262 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3263 (find_and_open_source, symtab_to_fullname): Update.
3264 * psymtab.c (psymtab_to_fullname): Update.
3265
14278e1f
TT
32662017-08-22 Tom Tromey <tom@tromey.com>
3267
3268 * exec.c (exec_file_attach): Update.
3269 * linux-thread-db.c (try_thread_db_load): Update.
3270 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3271 * utils.c (gdb_realpath): Change return type.
3272 (gdb_realpath_keepfile): Update.
3273 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3274 (_initialize_utils): Register the new self test.
3275 * source.c (openp): Update.
3276 (find_and_open_source): Update.
3277 * nto-tdep.c (nto_find_and_open_solib): Update.
3278 * main.c (set_gdb_data_directory): Update.
3279 (captured_main_1): Update.
3280 * dwarf2read.c (dwarf2_get_dwz_file): Update
3281 (dw2_map_symbol_filenames): Update.
3282 * auto-load.c (auto_load_safe_path_vec_update): Update.
3283 (filename_is_in_auto_load_safe_path_vec): Change type of
3284 "filename_realp".
3285 (auto_load_objfile_script): Update.
3286 (file_is_auto_load_safe): Update. Use std::string.
3287 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3288
4971c9a7
TT
32892017-08-22 Tom Tromey <tom@tromey.com>
3290
3291 * utils.c (gdb_realpath_keepfile): Return a
3292 gdb::unique_xmalloc_ptr.
3293 * exec.c (exec_file_attach): Update.
3294 * utils.h (gdb_realpath_keepfile): Return a
3295 gdb::unique_xmalloc_ptr.
3296
e3e41d58
TT
32972017-08-22 Tom Tromey <tom@tromey.com>
3298
3299 * compile/compile.c (compile_file_command): Use
3300 gdb::unique_xmalloc_ptr, std::string.
3301 * utils.c (gdb_abspath): Change return type.
3302 * source.c (openp): Update.
3303 * objfiles.c (allocate_objfile): Update.
3304 * main.c (set_gdb_data_directory): Update.
3305 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3306
0d999a6e
ZZ
33072017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3308
3309 * cli-cmds.c (list_commands): List actual code around more than
3310 one location.
3311
329d5e7e
JB
33122017-08-21 John Baldwin <jhb@FreeBSD.org>
3313
3314 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3315
bf223d3e
PA
33162017-08-21 Pedro Alves <palves@redhat.com>
3317
3318 PR gdb/19487
3319 * c-exp.y (variable production): Handle function aliases.
3320 * minsyms.c (msymbol_is_text): New function.
3321 * minsyms.h (msymbol_is_text): Declare.
3322 * symtab.c (find_function_alias_target): New function.
3323 * symtab.h (find_function_alias_target): Declare.
3324
c973d0aa
PA
33252017-08-21 Pedro Alves <palves@redhat.com>
3326
3327 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3328 typedefs.
3329 * typeprint.c (whatis_exp): If handling "whatis", and expression
3330 is OP_TYPE, strip one typedef level. Otherwise don't strip
3331 typedefs here.
3332 * valops.c (value_cast): Save "to" type before resolving
3333 stubs/typedefs. Use that type as resulting value's type.
3334
2989a365
TT
33352017-08-18 Tom Tromey <tom@tromey.com>
3336 Pedro Alves <palves@redhat.com>
3337
3338 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3339 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3340 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3341 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3342 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3343 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3344 (linux_get_siginfo_data): Add "thread" argument. Use
3345 scoped_restore.
3346 * linux-nat.c (linux_child_follow_fork)
3347 (check_stopped_by_watchpoint): Use scoped_restore.
3348 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3349 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3350 (restore_inferior_ptid, save_inferior_ptid): Remove.
3351 * btrace.c (btrace_fetch): Use scoped_restore.
3352 * bsd-uthread.c (bsd_uthread_fetch_registers)
3353 (bsd_uthread_store_registers): Use scoped_restore.
3354 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3355 scoped_restore.
3356 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3357 (aix_thread_xfer_partial): Use scoped_restore.
3358 * inferior.h (save_inferior_ptid): Remove.
3359
e60eb288
YQ
33602017-08-18 Yao Qi <yao.qi@linaro.org>
3361
3362 PR tdep/21818
3363 * arm-tdep.c (gdb_print_insn_arm): Mark
3364 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3365
6d580b63
YQ
33662017-08-18 Yao Qi <yao.qi@linaro.org>
3367
3368 * NEWS: Mention GDBserver's new option "--selftest".
3369 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3370 * selftest.c: Move it to common/selftest.c.
3371 * selftest.h: Move it to common/selftest.h.
3372 * selftest-arch.c (reset): New function.
3373 (tests_with_arch): Call reset.
3374
86dcbf50
YQ
33752017-08-18 Yao Qi <yao.qi@linaro.org>
3376
3377 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3378 instead of exception_fprintf and printf_filtered.
3379
7649770c
YQ
33802017-08-18 Yao Qi <yao.qi@linaro.org>
3381
3382 * selftest.c (register_self_test): Rename it to
3383 selftests::register_test.
3384 (run_self_tests): selftest::run_tests.
3385 * selftest.h: Update declarations.
3386 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3387 selftests::register_test_foreach_arch.
3388 * selftest-arch.h: Update declaration.
3389 * aarch64-tdep.c: Update.
3390 * arm-tdep.c: Likewise.
3391 * disasm-selftests.c: Likewise.
3392 * dwarf2loc.c: Likewise.
3393 * dwarf2-frame.c: Likewise.
3394 * findvar.c: Likewise.
3395 * gdbarch-selftests.c: Likewise.
3396 * maint.c (maintenance_selftest): Likewise.
3397 * regcache.c: Likewise.
3398 * rust-exp.y: Likewise.
3399 * selftest-arch.c: Likewise.
3400 * unittests/environ-selftests.c: Likewise.
3401 * unittests/function-view-selftests.c: Likewise.
3402 * unittests/offset-type-selftests.c: Likewise.
3403 * unittests/optional-selftests.c: Likewise.
3404 * unittests/scoped_restore-selftests.c: Likewise.
3405 * utils-selftests.c: Likewise.
3406
b0cba12e
PA
34072017-08-17 Pedro Alves <palves@redhat.com>
3408
3409 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3410 local.
3411
4c8aa72d
PA
34122017-08-17 Pedro Alves <palves@redhat.com>
3413
3414 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3415 field.
3416 (reset_die_in_process): Delete, replaced by ...
3417 (process_die_scope): ... this new class. Make it responsible for
3418 freeing cu->line_header too.
3419 (process_die): Use process_die_scope.
3420 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3421 cu->line_header_die_owner. Don't release the line header if it's
3422 owned by the CU.
3423 (setup_type_unit_groups): Make the CU/DIE own the line header.
3424 Don't release the line header here.
3425
ba713918
AL
34262017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3427
3428 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3429
44d0fb3a
RK
34302017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3431
3432 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3433 Single-Key mode
3434
a5afdb16
RK
34352017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3436
3437 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3438 mode command list.
3439
47613aeb
SH
34402017-08-15 Stafford Horne <shorne@gmail.com>
3441
3442 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3443
9c3cc999
SH
34442017-08-15 Stafford Horne <shorne@gmail.com>
3445
3446 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3447
206726fb
SDJ
34482017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3449
3450 PR gdb/21954
3451 * infcmd.c (unset_environment_command): Use the 'clear' method on
3452 the environment instead of resetting it.
3453
0335ac6d
JB
34542017-08-15 John Baldwin <jhb@FreeBSD.org>
3455
3456 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3457 platforms.
3458
d3abe1c8
TT
34592017-08-14 Tom Tromey <tom@tromey.com>
3460
3461 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3462 (print_binary_chars): Likewise.
3463 (BITS_IN_BYTES): Remove.
3464
d6382fff
TT
34652017-08-14 Tom Tromey <tom@tromey.com>
3466
3467 PR gdb/21675
3468 * valprint.c (LOW_ZERO): Change value to 034.
3469 (print_octal_chars): Add static_asserts for octal constants.
3470 * printcmd.c (print_scalar_formatted): Add 'd' case.
3471
f978cb06
TT
34722017-08-11 Tom Tromey <tom@tromey.com>
3473
3474 * symfile.c (add_symbol_file_command): Use std::vector.
3475
2f5404b3
TT
34762017-08-14 Tom Tromey <tom@tromey.com>
3477
3478 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3479 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3480 std::move.
3481 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3482
de7985c3
PA
34832017-08-11 Pedro Alves <palves@redhat.com>
3484
3485 * infrun.c (process_event_stop_test): Adjust
3486 function_name_is_marked_for_skip call.
3487 * skip.c: Include <list>.
3488 (skiplist_entry): Make it a class with private fields, and
3489 getters/setters.
3490 (skiplist_entry_chain): Delete.
3491 (skiplist_entries): New.
3492 (skiplist_entry_count): Delete.
3493 (highest_skiplist_entry_num): New.
3494 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3495 (add_skiplist_entry): Delete.
3496 (skiplist_entry::skiplist_entry): New.
3497 (skiplist_entry::add_entry): New.
3498 (skip_file_command, skip_function): Adjust.
3499 (compile_skip_regexp): Delete.
3500 (skip_command): Don't compile regexp here. Adjust to use
3501 skiplist_entry::add_entry.
3502 (skip_info): Adjust to use range-for and getters.
3503 (skip_enable_command, skip_disable_command): Adjust to use
3504 range-for and setters.
3505 (skip_delete_command): Adjust to use std::list.
3506 (add_skiplist_entry): Delete.
3507 (skip_file_p): Delete, refactored as ...
3508 (skiplist_entry::do_skip_file_p): ... this new method.
3509 (skip_gfile_p): Delete, refactored as ...
3510 (skiplist_entry::do_gskip_file_p): ... this new method.
3511 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3512 (skiplist_entry::skip_function_p): ... this new method.
3513 (function_name_is_marked_for_skip): Now returns bool, and takes
3514 the function sal by const reference. Adjust to use range-for and
3515 skiplist_entry methods.
3516 (_initialize_step_skip): Remove references to
3517 skiplist_entry_chain, skiplist_entry_count.
3518 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3519 takes the function sal by const reference.
3520
be7d3cd5
YQ
35212017-08-11 Yao Qi <yao.qi@linaro.org>
3522
3523 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3524 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3525 (dwarf2_frame_cache):
3526 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3527 RETURN_MASK_ALL and set *this_case to NULL.
3528 * frame-unwind.h: Update comments.
3529
1c90d9f0
YQ
35302017-08-11 Yao Qi <yao.qi@linaro.org>
3531
3532 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3533 (dwarf2_frame_state_copy_regs): Remove.
3534 (dwarf2_frame_state_free_regs): Remove.
3535 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3536 (dwarf2_restore_rule): Call method .alloc_regs instead of
3537 dwarf2_frame_state_alloc_regs.
3538 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3539 constructor. Call std::move.
3540 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3541 (dwarf2_frame_cache): Likewise.
3542
3543 [GDB_SELF_TEST]: Include selftest.h and
3544 selftest-arch.h.
3545 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3546 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3547 execute_cfa_program_test.
3548
3549 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3550 copy ctor, assignment operator, move assignment.
3551 <alloc_regs>: New method.
3552 <swap>: New method.
3553 (struct dwarf2_frame_state): Delete dtor.
3554 (dwarf2_frame_state_alloc_regs): Remove declaration.
3555 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3556 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3557
afe37d6b
YQ
35582017-08-11 Yao Qi <yao.qi@linaro.org>
3559
3560 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3561 (dwarf2_frame_state::dwarf2_frame_state): New.
3562 (dwarf2_frame_state::~dwarf2_frame_state): New.
3563 (dwarf2_fetch_cfa_info): Update.
3564 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3565 rather than a pointer. Update code.
3566 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3567 dtor.
3568 <data_align, code_align, retaddr_column>: Change them to const.
3569 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3570 to bool.
3571
b348037f
YQ
35722017-08-11 Yao Qi <yao.qi@linaro.org>
3573
3574 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3575 <loc.exp>: New field.
3576 * dwarf2-frame.c (execute_cfa_program): Update.
3577 (dwarf2_frame_prev_register): Update.
3578
e7c9de26
PA
35792017-08-10 Pedro Alves <palves@redhat.com>
3580
3581 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3582
e8c6b620
JB
35832017-08-09 John Baldwin <jhb@FreeBSD.org>
3584
3585 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3586 (fbsd_pending_children): Use std::list.
3587 (fbsd_remember_child): Likewise.
3588 (fbsd_is_child_pending): Likewise.
3589 (fbsd_pending_vfork_done): Use std::forward_list.
3590 (fbsd_add_vfork_done): Likewise.
3591 (fbsd_is_vfork_done_pending): Likewise.
3592 (fbsd_next_vfork_done): Likewise.
3593
e4a26669
JB
35942017-08-09 John Baldwin <jhb@FreeBSD.org>
3595
3596 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3597 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3598 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3599 for `mapfilename'.
3600 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 3601 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 3602
142311d3
JB
36032017-08-09 John Baldwin <jhb@FreeBSD.org>
3604
3605 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3606 "filestuff.h".
3607 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3608
42fa2e0e
TT
36092017-08-09 Tom Tromey <tom@tromey.com>
3610
3611 * skip.c (skiplist_entry): New constructor.
3612 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3613 (skiplist_entry::file_is_glob): Now bool.
3614 (skiplist_entry::file, skiplist_entry::function): Now
3615 std::string.
3616 (make_skip_entry): Return a unique_ptr. Use new.
3617 (free_skiplist_entry, free_skiplist_entry_cleanup)
3618 (make_free_skiplist_entry_cleanup): Remove.
3619 (skip_command, skip_disable_command, add_skiplist_entry)
3620 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3621 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3622 (function_name_is_marked_for_skip): Update.
3623 (skip_delete_command): Update. Use delete.
3624
cd3af38d
JW
36252017-08-09 Jiong Wang <jiong.wang@arm.com>
3626
3627 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3628 (aarch64_linux_core_read_description): New function.
3629 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3630
29592bde
PA
36312017-08-09 Pedro Alves <palves@redhat.com>
3632
3633 * cp-name-parser.y (cp_comp_to_string): Return a
3634 gdb::unique_xmalloc_ptr<char>.
3635 * cp-support.c (replace_typedefs_qualified_name)
3636 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3637 (cp_canonicalize_string_full): Use op= instead of explicit
3638 convertion.
3639 (cp_class_name_from_physname, method_name_from_physname)
3640 (cp_func_name, cp_remove_params): Adjust to use
3641 gdb::unique_xmalloc_ptr<char>.
3642 * cp-support.h (cp_comp_to_string): Return a
3643 gdb::unique_xmalloc_ptr<char>.
3644 * python/py-type.c (typy_lookup_type): Adjust to use
3645 gdb::unique_xmalloc_ptr<char>.
3646
b3340438
L
36472017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3648
3649 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3650
e88e8651
YQ
36512017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3652 Yao Qi <yao.qi@linaro.org>
3653
3654 * cp-support.c (cp_canonicalize_string_full): Use
3655 gdb::unique_xmalloc_ptr<char>.
3656 (cp_canonicalize_string): Likewise.
3657
f5a29eb0
YQ
36582017-08-09 Yao Qi <yao.qi@linaro.org>
3659
3660 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3661 * regformats/i386/amd64-avx-avx512.dat: Remove.
3662 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3663 * regformats/i386/amd64-avx-mpx.dat:Remove.
3664 * regformats/i386/amd64-avx.dat: Remove.
3665 * regformats/i386/amd64-mpx.dat: Remove.
3666 * regformats/i386/i386-avx-avx512.dat: Remove.
3667 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3668 * regformats/i386/i386-avx-mpx.dat: Remove.
3669 * regformats/i386/i386-mmx.dat: Remove.
3670 * regformats/i386/i386-mpx.dat: Remove.
3671
57757c2f
YQ
36722017-08-09 Yao Qi <yao.qi@linaro.org>
3673
3674 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3675 * amd64-tdep.c: Don't include features/i386/x32*.c.
3676 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3677 functions.
3678 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3679 and i386/x32-avx-avx512.
3680 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3681 and i386/x32.xml.
3682 * features/i386/x32-avx-avx512.c: Removed.
3683 * features/i386/x32-avx-avx512.xml: Removed.
3684 * features/i386/x32-avx.c: Removed.
3685 * features/i386/x32-avx.xml: Removed.
3686 * features/i386/x32.c: Removed.
3687 * features/i386/x32.xml: Removed.
3688 * regformats/i386/x32-avx-avx512.dat: Removed.
3689 * regformats/i386/x32-avx.dat: Removed.
3690 * regformats/i386/x32.dat: Removed.
3691
ba7b109b
MR
36922017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3693
3694 PR breakpoints/21886
3695 * mem-break.c (default_memory_insert_breakpoint): Use
3696 `->placed_address' rather than `->reqstd_address' for the
3697 breakpoint location.
3698
e347efc3
MR
36992017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3700
3701 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3702 assertions.
3703
0dba2a6c
MR
37042017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3705
3706 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3707 a union of `tdep_info', `tdesc_data' and `id'.
3708 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3709 rather than `info.tdep_info'.
3710 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3711 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3712 * i386-tdep.c (i386_gdbarch_init): Likewise.
3713 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3714 * mips-tdep.c (mips_gdbarch_init): Likewise.
3715 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3716 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3717 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3718 `info.tdep_info'.
3719 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3720 `info.tdep_info'.
3721 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3722 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3723 `info.tdep_info'.
3724 * spu-tdep.c (spu_gdbarch_init): Likewise.
3725 * gdbarch.h: Regenerate.
3726
16eb6b2d
LS
37272017-08-07 Leszek Swirski <leszeks@google.com>
3728
7b005726 3729 PR symtab/20899
16eb6b2d
LS
3730 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3731
74cbb09e
SM
37322017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3733
3734 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3735 (gdbsim_open): Rename gdb_argv args object to argv.
3736
ee0c3293
TT
37372017-08-05 Tom Tromey <tom@tromey.com>
3738
3739 * compile/compile-object-load.c (compile_object_load): Use
3740 gdb::unique_xmalloc_ptr.
3741 * cli/cli-dump.c (scan_filename): Rename from
3742 scan_filename_with_cleanup. Change return type.
3743 (scan_expression): Rename from scan_expression_with_cleanup.
3744 Change return type.
3745 (dump_memory_to_file, dump_value_to_file, restore_command):
3746 Use gdb::unique_xmalloc_ptr. Update.
3747 * cli/cli-cmds.c (find_and_open_script): Use
3748 gdb::unique_xmalloc_ptr.
3749 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3750 * symmisc.c (maintenance_print_symbols)
3751 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3752 * symfile.c (symfile_bfd_open, generic_load)
3753 (add_symbol_file_command, remove_symbol_file_command): Use
3754 gdb::unique_xmalloc_ptr.
3755 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3756 * psymtab.c (maintenance_print_psymbols): Use
3757 gdb::unique_xmalloc_ptr.
3758 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3759 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3760 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3761 (reload_shared_libraries_1): Likewise.
3762
3232fabd
TT
37632017-08-05 Tom Tromey <tom@tromey.com>
3764
3765 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3766 (rust_op_vector, rust_set_vector): New typedefs.
3767 (current_parser): New global.
3768 (work_obstack): Change to pointer type. Update all users.
3769 (rust_ast, pstate): Remove globals.
3770 (struct rust_parser): New.
3771 (%union) <params, field_inits>: Change type.
3772 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3773 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3774 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3775 (convert_params_to_types, convert_params_to_expression): Change
3776 type of "params".
3777 (ast_string): Change type of "fields".
3778 (rust_parse): Make a rust_parser. Remove cleanups.
3779 (rust_lex_tests): Make and install an auto_obstack.
3780
f02fd774
YQ
37812017-08-04 Yao Qi <yao.qi@linaro.org>
3782
3783 * configure.srv (ipa_x32_linux_regobj): New.
3784 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3785 instead of X86_TDESC_AVX512.
3786 (initialize_low_tracepoint): Call
3787 init_registers_x32_avx_avx512_linux.
3788
91975afd
YQ
37892017-08-04 Yao Qi <yao.qi@linaro.org>
3790
3791 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3792
2331fa3a
RK
37932017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3794
3795 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3796
744e4fe1
TT
37972017-08-03 Tom Tromey <tom@tromey.com>
3798
3799 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3800 Remove.
3801 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3802
1c034b67
TT
38032017-08-03 Tom Tromey <tom@tromey.com>
3804
3805 * python/py-param.c (compute_enum_values): Use gdb_argv.
3806
773a1edc
TT
38072017-08-03 Tom Tromey <tom@tromey.com>
3808
3809 * utils.h (struct gdb_argv_deleter): New.
3810 (gdb_argv): New class.
3811 * utils.c (gdb_argv::reset): New method.
3812 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3813 * tracefile.c (tsave_command): Use gdb_argv.
3814 * top.c (new_ui_command): Use gdb_argv.
3815 * symmisc.c (maintenance_print_symbols)
3816 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3817 * symfile.c (symbol_file_command, generic_load)
3818 (remove_symbol_file_command): Use gdb_argv.
3819 * stack.c (backtrace_command): Use gdb_argv.
3820 * source.c (add_path, show_substitute_path_command)
3821 (unset_substitute_path_command, set_substitute_path_command):
3822 Use gdb_argv.
3823 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3824 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3825 * remote.c (extended_remote_run, remote_put_command)
3826 (remote_get_command, remote_delete_command): Use gdb_argv.
3827 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3828 (gdbsim_open): Use gdb_argv.
3829 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3830 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3831 * procfs.c (procfs_info_proc): Use gdb_argv.
3832 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3833 * infrun.c (handle_command): Use gdb_argv.
3834 * inferior.c (add_inferior_command, clone_inferior_command):
3835 Use gdb_argv.
3836 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3837 * exec.c (exec_file_command): Use gdb_argv.
3838 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3839 * compile/compile.c (build_argc_argv): Use gdb_argv.
3840
0d50bde3
TT
38412017-08-03 Tom Tromey <tom@tromey.com>
3842
3843 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3844
7f968c89
TT
38452017-08-03 Tom Tromey <tom@tromey.com>
3846
3847 * python/python.c (compute_python_string): Return std::string.
3848 (gdbpy_eval_from_control_command): Update.
3849 (do_start_initialization): Use std::string.
3850 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3851 xstrprintf.
3852 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3853 xstrprintf.
3854
3c9ebddd
TT
38552017-08-03 Tom Tromey <tom@tromey.com>
3856
3857 * top.h (do_restore_instream_cleanup): Remove.
3858 * top.c (do_restore_instream_cleanup): Remove.
3859 (read_command_file): Use scoped_restore.
3860 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3861
b51b225e
TT
38622017-08-03 Tom Tromey <tom@tromey.com>
3863
3864 * cli/cli-script.c (execute_user_command)
3865 (execute_control_command): Use scoped_restore.
3866
ac991630
TT
38672017-08-03 Tom Tromey <tom@tromey.com>
3868
3869 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3870 (execute_user_command): Remove user_call_depth; use
3871 user_args_stack's size instead.
3872
898e0c8e
TT
38732017-08-03 Tom Tromey <tom@tromey.com>
3874
3875 * top.h (in_user_command): Remove.
3876 * top.c (in_user_command): Remove.
3877 * cli/cli-script.c (do_restore_user_call_depth)
3878 (execute_user_command): Update.
3879
26fcd5d7
TT
38802017-08-03 Tom Tromey <tom@tromey.com>
3881
3882 * valops.c (search_struct_method): Use gdb::byte_vector.
3883 * valarith.c (value_concat): Use std::vector.
3884 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3885 (simple_search_memory): Likewise.
3886 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3887 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3888 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3889 * elfread.c (elf_rel_plt_read): Use std::string.
3890 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3891 * cli/cli-dump.c (restore_section_callback): Use
3892 gdb::byte_vector.
3893
7c218e6c
TT
38942017-08-03 Tom Tromey <tom@tromey.com>
3895
3896 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3897
31b68d4a
TT
38982017-08-03 Tom Tromey <tom@tromey.com>
3899
3900 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3901 (tui_register_format): Use scoped_restore.
3902
2ec845e7
TT
39032017-08-03 Tom Tromey <tom@tromey.com>
3904
3905 * reverse.c (exec_direction_default): Remove.
3906 (exec_reverse_once): Use scoped_restore.
3907 * remote.c (restore_remote_timeout): Remove.
3908 (remote_flash_erase, remote_flash_write, remote_flash_done)
3909 (readchar, remote_serial_write): Use scoped_restore.
3910 * cli/cli-script.c (struct source_cleanup_lines_args)
3911 (source_cleanup_lines): Remove.
3912 (script_from_file): Use scoped_restore.
3913 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3914 (source_command): Use scoped_restore.
3915
b3bc8453
TT
39162017-08-03 Tom Tromey <tom@tromey.com>
3917
3918 * utils.h (make_cleanup_free_so): Remove.
3919 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3920 * solist.h (struct so_deleter): New.
3921 (so_list_up): New typedef.
3922 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3923
e3ad2841
TT
39242017-08-03 Tom Tromey <tom@tromey.com>
3925
3926 * utils.h (make_cleanup_restore_current_language): Remove.
3927 * utils.c (do_restore_current_language)
3928 (make_cleanup_restore_current_language): Remove.
3929 * parse.c (parse_exp_in_context_1)
3930 (parse_expression_with_language): Use
3931 scoped_restore_current_language.
3932 * mi/mi-main.c (mi_cmd_execute): Use
3933 scoped_restore_current_language.
3934 * language.h (scoped_restore_current_language): New class.
3935
b80cf838
TT
39362017-08-03 Tom Tromey <tom@tromey.com>
3937
3938 * compile/compile.c (cleanup_unlink_file): Remove.
3939 (compile_to_object): Use gdb::unlinker.
3940 (eval_compile_command): Likewise.
3941
fad0444a
TT
39422017-08-03 Tom Tromey <tom@tromey.com>
3943
3944 * utils.h (make_cleanup_fclose): Remove.
3945 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3946
6e7bc05c
TT
39472017-08-03 Tom Tromey <tom@tromey.com>
3948
3949 * top.c (open_terminal_stream): Return gdb_file_up.
3950 (new_ui_command): Update.
3951
4a45905b
TT
39522017-08-03 Tom Tromey <tom@tromey.com>
3953
3954 * source.c (print_source_lines_base, forward_search_command)
3955 (reverse_search_command): Use gdb_file_up.
3956
7cd06d6e
TT
39572017-08-03 Tom Tromey <tom@tromey.com>
3958
3959 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3960
ed166945
TT
39612017-08-03 Tom Tromey <tom@tromey.com>
3962
3963 * cli/cli-cmds.c (find_and_open_script): Change return type.
3964 Remove "streamp" and "full_path" parameters.
3965 (source_script_with_search): Update.
3966 * auto-load.c (source_script_file): Update.
3967 * cli/cli-cmds.h (find_and_open_script): Change type.
3968 (open_script): New struct.
3969
d419f42d
TT
39702017-08-03 Tom Tromey <tom@tromey.com>
3971
3972 * xml-support.c (xml_fetch_content_from_file): Update.
3973 * ui-file.c (stdio_file::open): Update.
3974 * tracefile-tfile.c (tfile_start): Update.
3975 * remote.c (remote_file_put, remote_file_get): Update.
3976 * nat/linux-procfs.c (linux_proc_get_int)
3977 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3978 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3979 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3980 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3981 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3982 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3983 * linux-nat.c (linux_proc_pending_signals): Update.
3984 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3985 (file_closer): Remove.
3986 * compile/compile.c (compile_to_object): Update.
3987 * common/filestuff.h (struct gdb_file_deleter): New.
3988 (gdb_file_up): New typedef.
3989 (gdb_fopen_cloexec): Change return type.
3990 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3991 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3992 (dump_binary_file, restore_binary_file): Update.
3993 * auto-load.c (auto_load_objfile_script_1): Update.
3994
4a2b031d
TT
39952017-08-03 Tom Tromey <tom@tromey.com>
3996
3997 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3998 (info_static_tracepoint_markers_command): Likewise.
3999 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4000 * skip.c (skip_info): Use ui_out_emit_table.
4001 * progspace.c (print_program_space): Use ui_out_emit_table.
4002 * osdata.c (info_osdata): Use ui_out_emit_table.
4003 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4004 ui_out_emit_table.
4005 * linux-thread-db.c (info_auto_load_libthread_db): Use
4006 ui_out_emit_table.
4007 * inferior.c (print_inferior): Use ui_out_emit_table.
4008 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4009 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4010 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4011 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4012 * ui-out.h (class ui_out_emit_table): New.
4013
a4f320fd
MR
40142017-08-02 Maciej W. Rozycki <macro@imgtec.com>
4015
4016 * mips-tdep.c (mips_fpu_type_str): New function.
4017 (mips_dump_tdep): Call it.
4018
a2f1f308
MR
40192017-08-01 Maciej W. Rozycki <macro@imgtec.com>
4020
4021 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4022 `->mips_fpu_type'.
4023
7e5ed83b
XR
40242017-07-31 Xavier Roirand <roirand@adacore.com>
4025
4026 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4027
4c9dc811
XR
40282017-07-27 Xavier Roirand <roirand@adacore.com>
4029
4030 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4031
27d41eac
YQ
40322017-07-26 Yao Qi <yao.qi@linaro.org>
4033
4034 * cli/cli-cmds.c (maintenancechecklist): New variable.
4035 * gdbcmd.h (maintenancechecklist): Declare it.
4036 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4037 Call i386_linux_read_description with different masks.
4038 * maint.c (maintenance_check_command): New function.
4039 (_initialize_maint_cmds): Call add_prefix_cmd.
4040 * target-descriptions.c (tdesc_reg): override operator != and ==.
4041 (tdesc_type): Likewise.
4042 (tdesc_feature): Likewise.
4043 (target_desc): Likewise.
4044 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4045 (maintenance_check_xml_descriptions): New function.
4046 (_initialize_target_descriptions) Add command "xml-descriptions".
4047 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4048
ea03d0d3
YQ
40492017-07-26 Yao Qi <yao.qi@linaro.org>
4050
4051 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4052 Include features/i386/32bit-*.c.
4053 (i386_linux_read_description): Generate target description if it
4054 doesn't exist.
4055 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4056 functions.
4057 * features/i386/32bit-linux.c: Re-generated.
4058 * features/i386/32bit-sse.c: Likewise.
4059 * target-descriptions.c (print_c_feature::visit): Print code to
4060 set register number if needed.
4061 (print_c_feature) <m_next_regnum>: New field.
4062
25aa13e5
YQ
40632017-07-26 Yao Qi <yao.qi@linaro.org>
4064
4065 * features/Makefile (CFILES): Rename with TDESC_CFILES.
4066 (FEATURE_XMLFILES): New.
4067 (FEATURE_CFILES): New.
4068 New rules.
4069 (clean-cfiles): Remove generated c files.
4070 * features/i386/32bit-avx.c: Generated.
4071 * features/i386/32bit-avx512.c: Generated.
4072 * features/i386/32bit-core.c: Generated.
4073 * features/i386/32bit-linux.c: Generated.
4074 * features/i386/32bit-mpx.c: Generated.
4075 * features/i386/32bit-pkeys.c: Generated.
4076 * features/i386/32bit-sse.c: Generated.
4077 * target-descriptions.c: Include algorithm.
4078 (tdesc_element_visitor): Add method visit_end.
4079 (print_c_tdesc): Implement visit_end.
4080 (print_c_tdesc:: m_filename_after_features): Move it to
4081 protected.
4082 (print_c_feature): New class.
4083 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4084 name starts with "i386/32bit-".
4085
6eb1e6a8
YQ
40862017-07-26 Yao Qi <yao.qi@linaro.org>
4087
4088 * target-descriptions.c (tdesc_element_visitor): New class.
4089 (tdesc_element): New class.
4090 (tdesc_reg): Inherit from tdesc_element.
4091 (tdesc_reg::accept): New function.
4092 (tdesc_type): Inherit from tdesc_element.
4093 (tdesc_type::accept): New function.
4094 (tdesc_feature): Inherit from tdesc_element.
4095 (tdesc_feature::accept): New function.
4096 (target_desc): Inherit from tdesc_element.
4097 (target_desc::target_desc): New.
4098 (target_desc::~target_desc): New.
4099 (target_desc::accept): New.
4100 (allocate_target_description): Use new.
4101 (free_target_description): Use delete.
4102 (print_c_tdesc): New class.
4103 (maint_print_c_tdesc_cmd): Adjust.
4104
4105 * features/aarch64.c: Re-generated.
4106 * features/arc-arcompact.c: Re-generated.
4107 * features/arc-v2.c: Re-generated.
4108 * features/arm/arm-with-iwmmxt.c: Re-generated.
4109 * features/arm/arm-with-m.c: Re-generated.
4110 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4111 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4112 * features/arm/arm-with-neon.c: Re-generated.
4113 * features/arm/arm-with-vfpv2.c: Re-generated.
4114 * features/arm/arm-with-vfpv3.c: Re-generated.
4115 * features/i386/amd64-avx-avx512.c: Re-generated.
4116 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4117 * features/i386/amd64-avx.c: Re-generated.
4118 * features/i386/amd64-avx-linux.c: Re-generated.
4119 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4120 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4121 * features/i386/amd64-avx-mpx.c: Re-generated.
4122 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4123 * features/i386/amd64.c: Re-generated.
4124 * features/i386/amd64-linux.c: Re-generated.
4125 * features/i386/amd64-mpx.c: Re-generated.
4126 * features/i386/amd64-mpx-linux.c: Re-generated.
4127 * features/i386/i386-avx-avx512.c: Re-generated.
4128 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4129 * features/i386/i386-avx.c: Re-generated.
4130 * features/i386/i386-avx-linux.c: Re-generated.
4131 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4132 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4133 * features/i386/i386-avx-mpx.c: Re-generated.
4134 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4135 * features/i386/i386.c: Re-generated.
4136 * features/i386/i386-linux.c: Re-generated.
4137 * features/i386/i386-mmx.c: Re-generated.
4138 * features/i386/i386-mmx-linux.c: Re-generated.
4139 * features/i386/i386-mpx.c: Re-generated.
4140 * features/i386/i386-mpx-linux.c: Re-generated.
4141 * features/i386/x32-avx-avx512.c: Re-generated.
4142 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4143 * features/i386/x32-avx.c: Re-generated.
4144 * features/i386/x32-avx-linux.c: Re-generated.
4145 * features/i386/x32.c: Re-generated.
4146 * features/i386/x32-linux.c: Re-generated.
4147 * features/microblaze.c: Re-generated.
4148 * features/microblaze-with-stack-protect.c: Re-generated.
4149 * features/mips64-dsp-linux.c: Re-generated.
4150 * features/mips64-linux.c: Re-generated.
4151 * features/mips-dsp-linux.c: Re-generated.
4152 * features/mips-linux.c: Re-generated.
4153 * features/nds32.c: Re-generated.
4154 * features/nios2.c: Re-generated.
4155 * features/nios2-linux.c: Re-generated.
4156 * features/rs6000/powerpc-32.c: Re-generated.
4157 * features/rs6000/powerpc-32l.c: Re-generated.
4158 * features/rs6000/powerpc-403.c: Re-generated.
4159 * features/rs6000/powerpc-403gc.c : Re-generated.
4160 * features/rs6000/powerpc-405.c: Re-generated.
4161 * features/rs6000/powerpc-505.c: Re-generated.
4162 * features/rs6000/powerpc-601.c: Re-generated.
4163 * features/rs6000/powerpc-602.c: Re-generated.
4164 * features/rs6000/powerpc-603.c: Re-generated.
4165 * features/rs6000/powerpc-604.c: Re-generated.
4166 * features/rs6000/powerpc-64.c: Re-generated.
4167 * features/rs6000/powerpc-64l.c: Re-generated.
4168 * features/rs6000/powerpc-7400.c: Re-generated.
4169 * features/rs6000/powerpc-750.c: Re-generated.
4170 * features/rs6000/powerpc-860.c: Re-generated.
4171 * features/rs6000/powerpc-altivec32.c: Re-generated.
4172 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4173 * features/rs6000/powerpc-altivec64.c: Re-generated.
4174 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4175 * features/rs6000/powerpc-cell32l.c: Re-generated.
4176 * features/rs6000/powerpc-cell64l.c: Re-generated.
4177 * features/rs6000/powerpc-e500.c: Re-generated.
4178 * features/rs6000/powerpc-e500l.c: Re-generated.
4179 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4180 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4181 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4182 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4183 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4184 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4185 * features/rs6000/powerpc-vsx32.c: Re-generated.
4186 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4187 * features/rs6000/powerpc-vsx64.c: Re-generated.
4188 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4189 * features/rs6000/rs6000.c: Re-generated.
4190 * features/s390-linux32.c: Re-generated.
4191 * features/s390-linux32v1.c: Re-generated.
4192 * features/s390-linux32v2.c: Re-generated.
4193 * features/s390-linux64.c: Re-generated.
4194 * features/s390-linux64v1.c: Re-generated.
4195 * features/s390-linux64v2.c: Re-generated.
4196 * features/s390-te-linux64.c: Re-generated.
4197 * features/s390-tevx-linux64.c: Re-generated.
4198 * features/s390-vx-linux64.c: Re-generated.
4199 * features/s390x-linux64.c: Re-generated.
4200 * features/s390x-linux64v1.c: Re-generated.
4201 * features/s390x-linux64v2.c: Re-generated.
4202 * features/s390x-te-linux64.c: Re-generated.
4203 * features/s390x-tevx-linux64.c: Re-generated.
4204 * features/s390x-vx-linux64.c: Re-generated.
4205 * features/sparc/sparc32-solaris.c: Re-generated.
4206 * features/sparc/sparc64-solaris.c: Re-generated.
4207 * features/tic6x-c62x.c: Re-generated.
4208 * features/tic6x-c62x-linux.c: Re-generated.
4209 * features/tic6x-c64x.c: Re-generated.
4210 * features/tic6x-c64x-linux.c: Re-generated.
4211 * features/tic6x-c64xp.c: Re-generated.
4212 * features/tic6x-c64xp-linux.c: Re-generated.
4213
35b4818d
YQ
42142017-07-26 Yao Qi <yao.qi@linaro.org>
4215
4216 * i386-linux-tdep.c (i386_linux_read_description): New function.
4217 (i386_linux_core_read_description): Call
4218 i386_linux_read_description.
4219 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4220 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4221 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4222 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4223 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4224 * x86-linux-nat.c (x86_linux_read_description): Call
4225 i386_linux_read_description.
4226
8e2141c6
YQ
42272017-07-26 Yao Qi <yao.qi@linaro.org>
4228
4229 * NEWS: Mention it.
4230 * features/Makefile (%.c: %.xml): Pass the xml file name to
4231 command "maint print c-tdesc".
4232 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4233 name from 'arg'.
4234
b468ff4c
YQ
42352017-07-26 Yao Qi <yao.qi@linaro.org>
4236
4237 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4238 in-class initialization.
4239 (tdesc_create_feature): Call new instead of XCNEW.
4240 (free_target_description): Ue delete.
4241
b9c0e1b4
JB
42422017-07-25 John Baldwin <jhb@FreeBSD.org>
4243
4244 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4245
a04b5337
YQ
42462017-07-25 Yao Qi <yao.qi@linaro.org>
4247
4248 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4249 constant.
4250 (amd64_x32_init_abi): Likewise.
4251 * amd64-tdep.h (amd64_init_abi): Update declaration.
4252 (amd64_x32_init_abi): Likewise.
4253
02ad7fc2
YQ
42542017-07-25 Yao Qi <yao.qi@linaro.org>
4255
4256 PR tdep/21717
4257 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4258 condition for FPSCR.
4259 (arm_linux_store_inferior_registers): Likewise.
4260
b6f48cb0
TT
42612017-07-22 Tom Tromey <tom@tromey.com>
4262
4263 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4264 <syscalls_counts>: Now a std::vector.
4265 (get_catch_syscall_inferior_data): Use "new".
4266 (catch_syscall_inferior_data_cleanup): Use "delete".
4267 (insert_catch_syscall, remove_catch_syscall)
4268 (clear_syscall_counts): Update.
4269
e12c9b7a
TT
42702017-07-22 Tom Tromey <tom@tromey.com>
4271
4272 * break-catch-syscall.c (syscall_catchpoint)
4273 <syscalls_to_be_caught>: Now a std::vector<int>
4274 (~syscall_catchpoint): Remove.
4275 (insert_catch_syscall, remove_catch_syscall)
4276 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4277 (print_mention_catch_syscall, print_recreate_catch_syscall):
4278 Update.
4279 (create_syscall_event_catchpoint): Change type of "filter"
4280 parameter.
4281 (catch_syscall_split_args): Return a std::vector.
4282 (catch_syscall_command_1, catching_syscall_number_1): Update.
4283
4fa8aeac
TT
42842017-07-22 Tom Tromey <tom@tromey.com>
4285
4286 * break-catch-throw.c (struct exception_catchpoint)
4287 <exception_rx>: Now a std::string.
4288 (~exception_catchpoint): Remove.
4289 (print_one_detail_exception_catchpoint): Update.
4290 (handle_gnu_v3_exceptions): Change type of except_rx.
4291 (extract_exception_regexp): Return a std::string.
4292 (catch_exception_command_1): Update.
4293
f746a154
TT
42942017-07-22 Tom Tromey <tom@tromey.com>
4295
4296 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4297 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4298 std::vector.
4299 <catch_all>: Now a bool.
4300 (~signal_catchpoint): Remove.
4301 (signal_catchpoint_insert_location)
4302 (signal_catchpoint_remove_location)
4303 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4304 (signal_catchpoint_print_mention)
4305 (signal_catchpoint_print_recreate)
4306 (signal_catchpoint_explains_signal): Update.
4307 (create_signal_catchpoint): Change type of "filter" and
4308 "catch_all".
4309 (catch_signal_split_args): Return a std::vector. Change type of
4310 "catch_all".
4311 (catch_signal_command): Update.
4312
47e77640
PA
43132017-07-20 Pedro Alves <palves@redhat.com>
4314
4315 * ada-lang.c (ada_language_defn): Make extern.
4316 (_initialize_ada_language): Remove add_language call.
4317 * c-lang.c (c_language_defn, cplus_language_defn)
4318 (asm_language_defn, minimal_language_defn): Make extern.
4319 (_initialize_c_language): Delete.
4320 * completer.c (compare_cstrings): Delete, moved to utils.h.
4321 * d-lang.c (d_language_defn): Make extern.
4322 (_initialize_d_language): Remove add_language calls.
4323 * defs.h (enum language): Add comment.
4324 * f-lang.c (f_language_defn): Make extern.
4325 (_initialize_f_language): Remove add_language call.
4326 * go-lang.c (go_language_defn): Make extern.
4327 (_initialize_go_language): Remove add_language call.
4328 * language.c: Include <algorithm>.
4329 (languages): Redefine as const array.
4330 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4331 (set_language_command): Handle "local". Use for-range loop.
4332 (set_language): Remove loop.
4333 (language_enum): Rewrite.
4334 (language_def, language_str): Remove loops.
4335 (add_language): Delete.
4336 (add_set_language_command): New, based on add_languages.
4337 (skip_language_trampoline): Adjust.
4338 (local_language_defn): Delete.
4339 (language_gdbarch_post_init): Adjust.
4340 (_initialize_language): Remove add_language calls. Call
4341 add_set_language_command.
4342 * language.h (add_language): Delete.
4343 (auto_language_defn)
4344 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4345 (asm_language_defn, c_language_defn, cplus_language_defn)
4346 (d_language_defn, f_language_defn, go_language_defn)
4347 (m2_language_defn, objc_language_defn, opencl_language_defn)
4348 (pascal_language_defn, rust_language_defn): Declare.
4349 * m2-lang.c (m2_language_defn): Make extern.
4350 (_initialize_m2_language): Remove add_language call.
4351 * objc-lang.c (objc_language_defn): Make extern.
4352 (_initialize_objc_language): Remove add_language call.
4353 * opencl-lang.c (opencl_language_defn): Make extern.
4354 (_initialize_opencl_language): Remove add_language call.
4355 * p-lang.c (pascal_language_defn): Make extern.
4356 (_initialize_pascal_language): Delete.
4357 * rust-lang.c (rust_language_defn): Make extern.
4358 (_initialize_rust_language): Delete.
4359 * utils.h (compare_cstrings): New static inline function.
4360
edb0c9cb
PA
43612017-07-20 Pedro Alves <palves@redhat.com>
4362
4363 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4364 (get_var_value): Constify parameters.
4365 (get_int_var_value): Change prototype.
4366 (to_fixed_range_type): Adjust.
4367 * ada-lang.h (get_int_var_value): Change prototype.
4368
a778f165
PA
43692017-07-20 Pedro Alves <palves@redhat.com>
4370
4371 * dwarf2read.c (dw2_lookup_symbol): Use
4372 SYMBOL_MATCHES_SEARCH_NAME.
4373 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4374
42edd901
PA
43752017-07-20 Pedro Alves <palves@redhat.com>
4376
4377 * block.c (block_iter_name_step, block_iter_name_first)
4378 (block_iter_name_next): Delete.
4379 (block_lookup_symbol_primary): Adjust to use
4380 dict_iter_match_first/dict_iter_match_next.
4381 * block.h (block_iter_name_first, block_iter_name_next): Delete
4382 declarations.
4383 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4384 dict_iter_match_first/dict_iter_match_next.
4385
cf325299
PA
43862017-07-20 Pedro Alves <palves@redhat.com>
4387
4388 * cp-support.c (cp_find_first_component_aux): Add missing case for
4389 end of string.
4390
c5ed0576
DB
43912017-07-18 David Blaikie <dblaikie@gmail.com>
4392
4393 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4394 of dwo_cu's dwo_file.
4395
27841e76
YQ
43962017-07-18 Yao Qi <yao.qi@linaro.org>
4397
4398 * remote.c (store_registers_using_G): Remove one line comment.
4399
cfb7e58b
YQ
44002017-07-18 Yao Qi <yao.qi@linaro.org>
4401
4402 * regcache.c (regcache_cpy): Simplify it.
4403 (regcache::cpy_no_passthrough): Remove it.
4404 * regcache.h (cpy_no_passthrough): Remove it.
4405 (regcache_dup, regcache_cpy): Update comments.
4406
386535dd
PA
44072017-07-18 Pedro Alves <palves@redhat.com>
4408
4409 * remote-sim.c (sim_command_completer): Adjust to work with a
4410 completion_tracker instead of a VEC.
4411
c45ec17c
PA
44122017-07-17 Pedro Alves <palves@redhat.com>
4413
4414 * completer.c (complete_source_filenames): New function.
4415 (complete_address_and_linespec_locations): New function.
4416 (location_completer): Use complete_address_and_linespec_locations.
4417 (completion_tracker::build_completion_result): Honor the tracker's
4418 request to suppress append.
4419 * completer.h (completion_tracker::suppress_append_ws)
4420 (completion_tracker::set_suppress_append_ws): New methods.
4421 (completion_tracker::m_suppress_append_ws): New field.
4422 (complete_source_filenames): New declaration.
4423 * linespec.c (linespec_complete_what): New.
4424 (struct ls_parser) <complete_what, completion_word,
4425 completion_quote_char, completion_quote_end, completion_tracker>:
4426 New fields.
4427 (string_find_incomplete_keyword_at_end): New.
4428 (linespec_lexer_lex_string): Record quote char. If in completion
4429 mode, don't throw.
4430 (linespec_lexer_consume_token): Advance the completion word point.
4431 (linespec_lexer_peek_token): Save/restore completion info.
4432 (save_stream_and_consume_token): New.
4433 (set_completion_after_number): New.
4434 (linespec_parse_basic): Set what to complete next depending on
4435 token. Handle function and label completions specially.
4436 (parse_linespec): Disable objc shortcut in completion mode. Set
4437 what to complete next depending on token type. Skip keyword if in
4438 completion mode.
4439 (complete_linespec_component, linespec_complete): New.
4440 * linespec.h (linespec_complete): Declare.
4441
be966d42
PA
44422017-07-17 Pedro Alves <palves@redhat.com>
4443
4444 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4445 Handle 'operator<' / 'operator<<'.
4446
a2459270
PA
44472017-07-17 Pedro Alves <palves@redhat.com>
4448
4449 * completer.c (collect_explicit_location_matches): Handle
4450 MATCH_LABEL.
4451 (convert_explicit_location_to_linespec): New, factored out from
4452 ...
4453 (convert_explicit_location_to_sals): ... this.
4454 (complete_label): New.
4455 (linespec_complete_label, find_label_symbols_in_block): New.
4456 (find_label_symbols): Add completion_mode parameter and adjust to
4457 call find_label_symbols_in_block.
4458 * linespec.h (linespec_complete_label): Declare.
4459
c6756f62
PA
44602017-07-17 Pedro Alves <palves@redhat.com>
4461
4462 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4463 complete_symbol_mode parameter.
4464 * cli/cli-cmds.c (complete_command): Get the completion result out
4465 of the handle_brkchars tracker if used a custom word point.
4466 * completer.c: Include "linespec.h".
4467 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4468 (advance_to_expression_complete_word_point): New.
4469 (completion_tracker::completes_to_completion_word): New.
4470 (complete_files_symbols): Pass down
4471 complete_symbol_mode::EXPRESSION.
4472 (explicit_options, probe_options): New.
4473 (collect_explicit_location_matches): Complete on the
4474 explictit_loc->foo instead of word. Use
4475 linespec_complete_function. Handle MATCH_LINE. Handle offering
4476 keyword and options completions.
4477 (backup_text_ptr): Delete.
4478 (skip_keyword): New.
4479 (complete_explicit_location): Remove 'word' parameter. Add
4480 language, quoted_arg_start and quoted_arg_end parameters.
4481 Rewrite, parsing left to right.
4482 (location_completer): Rewrite.
4483 (location_completer_handle_brkchars): New function.
4484 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4485 (enum complete_line_internal_reason): Adjust comments.
4486 (completion_tracker::discard_completions): New.
4487 (completer_handle_brkchars_func_for_completer): Handle
4488 location_completer.
4489 (gdb_custom_word_point_brkchars)
4490 (gdb_org_rl_basic_quote_characters): New.
4491 (gdb_completion_word_break_characters_throw)
4492 (completion_find_completion_word): Handle trackers that use a
4493 custom word point.
4494 (completion_tracker::advance_custom_word_point_by): New.
4495 (completion_tracker::build_completion_result): Don't rely on
4496 readline appending the quote char.
4497 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4498 use a custom word point.
4499 (gdb_rl_attempted_completion_function): Restore
4500 rl_basic_quote_characters.
4501 * completer.h (class completion_tracker): Extend intro comment.
4502 (completion_tracker::set_quote_char)
4503 (completion_tracker::quote_char)
4504 (completion_tracker::set_use_custom_word_point)
4505 (completion_tracker::use_custom_word_point)
4506 (completion_tracker::custom_word_point)
4507 (completion_tracker::set_custom_word_point)
4508 (completion_tracker::advance_custom_word_point_by)
4509 (completion_tracker::completes_to_completion_word)
4510 (completion_tracker::discard_completions): New methods.
4511 (completion_tracker::m_quote_char)
4512 (completion_tracker::m_use_custom_word_point)
4513 (completion_tracker::m_custom_word_point): New fields.
4514 (advance_to_expression_complete_word_point): Declare.
4515 * f-lang.c (f_collect_symbol_completion_matches): Add
4516 complete_symbol_mode parameter.
4517 * language.h (struct language_defn)
4518 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4519 parameter.
4520 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4521 (linespec_complete_function): New function.
4522 (linespec_lexer_lex_keyword): Adjust.
4523 * linespec.h (linespec_keywords, linespec_complete_function): New
4524 declarations.
4525 * location.c (find_end_quote): New function.
4526 (explicit_location_lex_one): Add explicit_completion_info
4527 parameter. Save quoting info. Don't throw if being called for
4528 completion. Don't handle Ada operators here.
4529 (is_cp_operator, skip_op_false_positives, first_of)
4530 (explicit_location_lex_one_function): New function.
4531 (string_to_explicit_location): Replace 'dont_throw' parameter with
4532 an explicit_completion_info pointer parameter. Handle it. Don't
4533 use explicit_location_lex_one to lex function names. Use
4534 explicit_location_lex_one_function instead.
4535 * location.h (struct explicit_completion_info): New.
4536 (string_to_explicit_location): Replace 'dont_throw' parameter with
4537 an explicit_completion_info pointer parameter.
4538 * symtab.c (default_collect_symbol_completion_matches_break_on):
4539 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4540 (default_collect_symbol_completion_matches)
4541 (collect_symbol_completion_matches): Add complete_symbol_mode
4542 parameter.
4543 (collect_symbol_completion_matches_type): Pass down
4544 complete_symbol_mode::EXPRESSION.
4545 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4546 parameter. Handle LINESPEC mode.
4547 * symtab.h (complete_symbol_mode): New.
4548 (default_collect_symbol_completion_matches_break_on)
4549 (default_collect_symbol_completion_matches)
4550 (collect_symbol_completion_matches)
4551 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4552 parameter.
4553
1d550c82
PA
45542017-07-17 Pedro Alves <palves@redhat.com>
4555
4556 * utils.c (enum class strncmp_iw_mode): New.
4557 (strcmp_iw): Rename to ...
4558 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4559 parameters. Handle them.
4560 (strncmp_iw): New.
4561 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4562 * utils.h (strncmp_iw): Declare.
4563 (strcmp_iw): Move describing comments here.
4564
8090b426
PA
45652017-07-17 Pedro Alves <palves@redhat.com>
4566
4567 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4568 CP_OPERATOR_STR.
4569 * c-typeprint.c (is_type_conversion_operator): Use
4570 CP_OPERATOR_STR.
4571 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4572 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4573 CP_OPERATOR_LEN.
4574 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4575 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4576 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4577 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4578 CP_OPERATOR_STR.
4579 * location.c: Include "cp-support.h".
4580 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4581 CP_OPERATOR_STR.
4582 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4583 CP_OPERATOR_LEN.
4584
6a2c1b87
PA
45852017-07-17 Pedro Alves <palves@redhat.com>
4586
4587 * cli/cli-cmds.c (complete_command): Use a completion tracker
4588 along with completion_find_completion_word for handle_brkchars
4589 phase.
4590 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4591 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4592 (struct gdb_rl_completion_word_info): New.
4593 (gdb_rl_find_completion_word): New.
4594 (completion_find_completion_word): New.
4595 * completer.h (completion_find_completion_word): Declare.
4596
eb3ff9a5
PA
45972017-07-17 Pedro Alves <palves@redhat.com>
4598
4599 * ada-lang.c (symbol_completion_match): Adjust comments.
4600 (symbol_completion_add): Replace vector parameter with
4601 completion_tracker parameter. Use it.
4602 (ada_make_symbol_completion_list): Rename to...
4603 (ada_collect_symbol_completion_matches): ... this. Add
4604 completion_tracker parameter and use it.
4605 (ada_language_defn): Adjust.
4606 * break-catch-syscall.c (catch_syscall_completer): Adjust
4607 prototype and work with completion_tracker instead of VEC.
4608 * breakpoint.c (condition_completer): Adjust prototype and work
4609 with completion_tracker instead of VEC.
4610 * c-lang.c (c_language_defn, cplus_language_defn)
4611 (asm_language_defn, minimal_language_defn): Adjust to renames.
4612 * cli/cli-cmds.c (complete_command): Rework using
4613 completion_tracker. Catch exceptions when completing.
4614 * cli/cli-decode.c (integer_unlimited_completer)
4615 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4616 with completion_tracker instead of VEC.
4617 * command.h (struct completion_tracker): Forward declare.
4618 (completer_ftype, completer_handle_brkchars_ftype): Change
4619 types.
4620 (complete_on_cmdlist, complete_on_enum): Adjust.
4621 * completer.c: Include <algorithm>.
4622 (struct gdb_completer_state): New.
4623 (current_completion): New global.
4624 (readline_line_completion_function): Delete.
4625 (noop_completer, filename_completer)
4626 (filename_completer_handle_brkchars, complete_files_symbols)
4627 (linespec_location_completer): Adjust to work with a
4628 completion_tracker instead of a VEC.
4629 (string_or_empty): New.
4630 (collect_explicit_location_matches): Adjust to work with a
4631 completion_tracker instead of a VEC.
4632 (explicit_location_completer): Rename to ...
4633 (complete_explicit_location): ... this and adjust to work with a
4634 completion_tracker instead of a VEC.
4635 (location_completer): Adjust to work with a completion_tracker
4636 instead of a VEC.
4637 (add_struct_fields): Adjust to work with a completion_list instead
4638 of VEC.
4639 (expression_completer): Rename to ...
4640 (complete_expression): ... this and adjust to work with a
4641 completion_tracker instead of a VEC. Use complete_files_symbols.
4642 (expression_completer): Reimplement on top of complete_expression.
4643 (symbol_completer): Adjust to work with a completion_tracker
4644 instead of a VEC.
4645 (enum complete_line_internal_reason): Add describing comments.
4646 (complete_line_internal_normal_command): Adjust to work with a
4647 completion_tracker instead of a VEC.
4648 (complete_line_internal): Rename to ...
4649 (complete_line_internal_1): ... this and adjust to work with a
4650 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4651 handle_brkchars phase.
4652 (new_completion_tracker): Delete.
4653 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4654 complete_line_internal_1.
4655 (free_completion_tracker): Delete.
4656 (INITIAL_COMPLETION_HTAB_SIZE): New.
4657 (completion_tracker::completion_tracker)
4658 (completion_tracker::~completion_tracker): New.
4659 (maybe_add_completion): Delete.
4660 (completion_tracker::maybe_add_completion)
4661 (completion_tracker::add_completion)
4662 (completion_tracker::add_completions): New.
4663 (throw_max_completions_reached_error): Delete.
4664 (complete_line): Adjust to work with a completion_tracker instead
4665 of a VEC. Don't create a completion_tracker_t or check for max
4666 completions here.
4667 (command_completer, command_completer_handle_brkchars)
4668 (signal_completer, reg_or_group_completer_1)
4669 (reg_or_group_completer, default_completer_handle_brkchars):
4670 Adjust to work with a completion_tracker.
4671 (gdb_completion_word_break_characters_throw): New.
4672 (gdb_completion_word_break_characters): Reimplement.
4673 (line_completion_function): Delete.
4674 (completion_tracker::recompute_lowest_common_denominator)
4675 (expand_preserving_ws)
4676 (completion_tracker::build_completion_result)
4677 (completion_result::completion_result)
4678 (completion_result::completion_result)
4679 (completion_result::~completion_result)
4680 (completion_result::completion_result)
4681 (completion_result::release_match_list, compare_cstrings)
4682 (completion_result::sort_match_list)
4683 (completion_result::reset_match_list)
4684 (gdb_rl_attempted_completion_function_throw)
4685 (gdb_rl_attempted_completion_function): New.
4686 * completer.h (completion_list, struct completion_result)
4687 (class completion_tracker): New.
4688 (complete_line): Add completion_tracker parameter.
4689 (readline_line_completion_function): Delete.
4690 (gdb_rl_attempted_completion_function): New.
4691 (noop_completer, filename_completer, expression_completer)
4692 (location_completer, symbol_completer, command_completer)
4693 (signal_completer, reg_or_group_completer): Update prototypes.
4694 (completion_tracker_t, new_completion_tracker)
4695 (make_cleanup_free_completion_tracker): Delete.
4696 (enum maybe_add_completion_enum): Delete.
4697 (maybe_add_completion): Delete.
4698 (throw_max_completions_reached_error): Delete.
4699 * corefile.c (complete_set_gnutarget): Adjust to work with a
4700 completion_tracker instead of a VEC.
4701 * cp-abi.c (cp_abi_completer): Adjust to work with a
4702 completion_tracker instead of a VEC.
4703 * d-lang.c (d_language_defn): Adjust.
4704 * disasm.c (disassembler_options_completer): Adjust to work with a
4705 completion_tracker instead of a VEC.
4706 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4707 (f_collect_symbol_completion_matches): ... this. Adjust to work
4708 with a completion_tracker instead of a VEC.
4709 (f_language_defn): Adjust.
4710 * go-lang.c (go_language_defn): Adjust.
4711 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4712 Adjust to work with a completion_tracker instead of a VEC.
4713 * infrun.c (handle_completer): Likewise.
4714 * interps.c (interpreter_completer): Likewise.
4715 * interps.h (interpreter_completer): Likewise.
4716 * language.c (unknown_language_defn, auto_language_defn)
4717 (local_language_defn): Adjust.
4718 * language.h (language_defn::la_make_symbol_completion_list):
4719 Rename to ...
4720 (language_defn::la_collect_symbol_completion_matches): ... this
4721 and adjust to work with a completion_tracker instead of a VEC.
4722 * m2-lang.c (m2_language_defn): Adjust.
4723 * objc-lang.c (objc_language_defn): Adjust.
4724 * opencl-lang.c (opencl_language_defn): Adjust.
4725 * p-lang.c (pascal_language_defn): Adjust.
4726 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4727 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4728 with a completion_tracker.
4729 * rust-lang.c (rust_language_defn): Adjust.
4730 * symtab.c (free_completion_list, do_free_completion_list)
4731 (return_val, completion_tracker): Delete.
4732 (completion_list_add_name, completion_list_add_symbol)
4733 (completion_list_add_msymbol, completion_list_objc_symbol)
4734 (completion_list_add_fields, add_symtab_completions): Add
4735 completion_tracker parameter and use it.
4736 (default_make_symbol_completion_list_break_on_1): Rename to...
4737 (default_collect_symbol_completion_matches_break_on): ... this.
4738 Add completion_tracker parameter and use it instead of allocating
4739 a completion tracker here.
4740 (default_make_symbol_completion_list_break_on): Delete old
4741 implementation.
4742 (default_make_symbol_completion_list): Delete.
4743 (default_collect_symbol_completion_matches): New.
4744 (make_symbol_completion_list): Delete.
4745 (collect_symbol_completion_matches): New.
4746 (make_symbol_completion_type): Rename to ...
4747 (collect_symbol_completion_matches_type): ... this. Add
4748 completion_tracker parameter and use it instead of VEC.
4749 (make_file_symbol_completion_list_1): Rename to...
4750 (collect_file_symbol_completion_matches): ... this. Add
4751 completion_tracker parameter and use it instead of VEC.
4752 (make_file_symbol_completion_list): Delete.
4753 (add_filename_to_list): Use completion_list instead of a VEC.
4754 (add_partial_filename_data::list): Now a completion_list.
4755 (make_source_files_completion_list): Work with a completion_list
4756 instead of a VEC.
4757 * symtab.h: Include "completer.h".
4758 (default_make_symbol_completion_list_break_on)
4759 (default_make_symbol_completion_list, make_symbol_completion_list)
4760 (make_symbol_completion_type, make_file_symbol_completion_list)
4761 (make_source_files_completion_list): Delete.
4762 (default_collect_symbol_completion_matches_break_on)
4763 (default_collect_symbol_completion_matches)
4764 (collect_symbol_completion_matches)
4765 (collect_symbol_completion_matches_type)
4766 (collect_file_symbol_completion_matches)
4767 (make_source_files_completion_list): New.
4768 * top.c (init_main): Don't install a rl_completion_entry_function
4769 hook. Install a rl_attempted_completion_function hook instead.
4770 * tui/tui-layout.c (layout_completer): Adjust to work with a
4771 completion_tracker.
4772 * tui/tui-regs.c (tui_reggroup_completer):
4773 * tui/tui-win.c (window_name_completer, focus_completer)
4774 (winheight_completer): Adjust to work with a completion_tracker.
4775 * value.c: Include "completer.h".
4776 (complete_internalvar): Adjust to work with a completion_tracker.
4777 * value.h (complete_internalvar): Likewise.
4778
6e1dbf8c
PA
47792017-07-17 Pedro Alves <palves@redhat.com>
4780
4781 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4782 renames.
4783 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4784 comments to completer_ftype's declaration.
4785 <completer_handle_brkchars>: Change type to
4786 completer_handle_brkchars_ftype.
4787 * command.h (completer_ftype): Add describing comment and give
4788 names to parameters.
4789 (completer_ftype_void): Rename to ...
4790 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4791 (set_cmd_completer_handle_brkchars): Adjust.
4792 * completer.c (filename_completer_handle_brkchars): New function.
4793 (complete_line_internal_normal_command): New function, factored
4794 out from ...
4795 (complete_line_internal): ... here.
4796 (command_completer_handle_brkchars)
4797 (default_completer_handle_brkchars)
4798 (completer_handle_brkchars_func_for_completer): New functions.
4799 * completer.h (set_gdb_completion_word_break_characters): Delete
4800 declaration.
4801 (completer_handle_brkchars_func_for_completer): New declaration.
4802 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4803 completer_handle_brkchars_func_for_completer.
4804
78b13106
PA
48052017-07-17 Pedro Alves <palves@redhat.com>
4806
4807 * completer.c (symbol_completer): New function, based on
4808 make_symbol_completion_list_fn.
4809 * completer.h (symbol_completer): New declaration.
4810 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4811 * python/py-cmd.c (completers): Adjust.
4812 * symtab.c (make_symbol_completion_list_fn): Delete.
4813 * symtab.h (make_symbol_completion_list_fn): Delete.
4814 * cli/cli-decode.c (add_cmd): Adjust.
4815
bbf2f4df
PA
48162017-07-17 Pedro Alves <palves@redhat.com>
4817
4818 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4819 * dwarf2read.c: Include "filename-seen-cache.h".
4820 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4821 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4822 * filename-seen-cache.c: New file.
4823 * filename-seen-cache.h: New file.
4824 * symtab.c: Include "filename-seen-cache.h".
4825 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4826 (create_filename_seen_cache, clear_filename_seen_cache)
4827 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4828 to filename-seen-cache.h/filename-seen-cache.c.
4829 (output_source_filename, sources_info)
4830 (maybe_add_partial_symtab_filename)
4831 (make_source_files_completion_list): Adjust to use
4832 filename_seen_cache.
4833
330cdd98
PA
48342017-07-17 Pedro Alves <palves@redhat.com>
4835
4836 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4837 fields.
4838 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4839 dwarf2_debug_sections*)): New.
4840 (dwarf2_per_objfile::dwarf2_per_objfile(const
4841 dwarf2_per_objfile&)): Declare as deleted.
4842 (dwarf2_per_objfile::operator=): Declare as deleted.
4843 (dwarf2_per_objfile::dwarf2_per_objfile)
4844 (dwarf2_per_objfile::~dwarf2_per_objfile)
4845 (dwarf2_per_objfile::free_cached_comp_units): New.
4846 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4847 ctor. Call dwarf2_per_objfile's ctor manually.
4848 (dwarf2_locate_sections): Deleted/refactored as ...
4849 (dwarf2_per_objfile::locate_sections): ... this new method.
4850 (free_cached_comp_units): Defer to
4851 dwarf2_per_objfile::free_cached_comp_units.
4852 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4853
8880f2a9
TT
48542017-07-14 Tom Tromey <tom@tromey.com>
4855
4856 PR rust/21764:
4857 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4858 parameter.
4859 <UNOP_SIZEOF>: Split into separate case.
4860 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4861
65547233
TT
48622017-07-14 Tom Tromey <tom@tromey.com>
4863
4864 PR rust/21763:
4865 * symtab.c (symbol_matches_domain): Add language_rust to special
4866 case.
4867 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4868 treat LOC_TYPEDEF symbols as variables.
4869
8f14146e
PA
48702017-07-14 Pedro Alves <palves@redhat.com>
4871
4872 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4873 symtabs matching all symtabs with SRCFILE as file name instead of
4874 only considering the first hit, with lookup_symtab.
4875
2347965c
SM
48762017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4877
4878 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4879 operator_name parameters.
4880 (gen_expr): Update function call.
4881
40f4af28
SM
48822017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4883
4884 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4885 parameter.
4886 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4887 Likewise.
4888 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4889 parameter, use agent_expr::gdbarch instead, update function
4890 calls.
4891 (locexpr_tracepoint_var_ref): Likewise.
4892 (loclist_tracepoint_var_ref): Likewise.
4893 * ax-gdb.c (gen_trace_static_fields): Likewise.
4894 (gen_traced_pop): Likewise.
4895 (gen_frame_args_address): Likewise.
4896 (gen_frame_locals_address): Likewise.
4897 (gen_var_ref): Likewise.
4898 (gen_struct_ref_recursive): Likewise.
4899 (gen_static_field): Likewise.
4900 (gen_maybe_namespace_elt): Likewise.
4901 (gen_expr): Likewise.
4902 (gen_trace_for_var): Likewise.
4903 (gen_trace_for_expr): Likewise.
4904 (gen_trace_for_return_address): Likewise.
4905
053f8057
SM
49062017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4907
4908 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4909 parameter.
4910 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4911
6661ad48
SM
49122017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4913
4914 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4915 from ax, update calls.
4916 (gen_usual_arithmetic): Likewise.
4917 (gen_integral_promotions): Likewise.
4918 (gen_bitfield_ref): Likewise.
4919 (gen_primitive_field): Likewise.
4920 (gen_struct_ref_recursive): Likewise.
4921 (gen_struct_ref): Likewise.
4922 (gen_maybe_namespace_elt): Likewise.
4923 (gen_struct_elt_for_reference): Likewise.
4924 (gen_namespace_elt): Likewise.
4925 (gen_aggregate_elt_ref): Likewise.
4926 (gen_expr): Get gdbarch from ax, update calls.
4927 (gen_expr_binop_rest): Likewise.
4928
c55a47e7
PA
49292017-07-13 Pedro Alves <palves@redhat.com>
4930
4931 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4932 as default tdesc.
4933 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4934 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4935 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4936 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4937 tdep.
4938 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4939 Get final tdesc from the tdep.
4940 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4941 default tdesc.
4942 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4943 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4944 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4945 Use it as default tdesc.
4946 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4947 down to amd_init_abi. No longer handle fallback tdesc here.
4948 * amd64-tdep.h (tdesc_x32): Declare.
4949 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4950 parameter.
4951 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4952 as default tdesc.
4953
55efceab
AA
49542017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4955
4956 * s390-linux-tdep.c (s390_process_record): Add support for
4957 instructions new in arch12.
4958
0aa37b65
JB
49592017-07-11 John Baldwin <jhb@FreeBSD.org>
4960
4961 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4962 PT_GETFSBASE and PT_GETGSBASE.
4963 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4964 PT_SETGSBASE.
4965
48aeef91
JB
49662017-07-11 John Baldwin <jhb@FreeBSD.org>
4967
4968 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4969 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4970 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4971 those rules.
4972 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4973 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4974 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4975 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4976 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4977 * features/i386/amd64.xml: Add 64bit-segments.xml.
4978 * features/i386/amd64-avx-avx512.c: Regenerated.
4979 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4980 * features/i386/amd64-avx-mpx.c: Regenerated.
4981 * features/i386/amd64-avx.c: Regenerated.
4982 * features/i386/amd64-mpx.c: Regenerated.
4983 * features/i386/amd64.c: Regenerated.
4984 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4985 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4986 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4987 * regformats/i386/amd64-avx.dat: Regenerated.
4988 * regformats/i386/amd64-mpx.dat: Regenerated.
4989 * regformats/i386/amd64.dat: Regenerated.
4990
77c501bc
YQ
49912017-07-10 Yao Qi <yao.qi@linaro.org>
4992
4993 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4994 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4995
6dc8d757
AK
49962017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4997
4998 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4999 unsetenv.
5000 * gnulib/aclocal.m4: Regenerate.
5001 * gnulib/config.in: Regenerate.
5002 * gnulib/configure: Regenerate.
5003 * gnulib/import/Makefile.am: Regenerate.
5004 * gnulib/import/Makefile.in: Regenerate.
5005 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5006 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5007 * gnulib/import/m4/environ.m4: New file.
5008 * gnulib/import/m4/setenv.m4: New file.
5009 * gnulib/import/setenv.c: New file.
5010 * gnulib/import/unsetenv.c: New file.
5011
266934d1
SM
50122017-07-09 Simon Marchi <simon.marchi@ericsson.com>
5013
5014 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5015 address when op is DW_OP_addr.
5016
03278692
TT
50172017-07-09 Tom Tromey <tom@tromey.com>
5018
5019 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5020 check and apply to outer type.
5021
4b654465
JB
50222017-07-07 John Baldwin <jhb@FreeBSD.org>
5023
5024 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5025 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5026 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5027 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5028
2af9fc44
JB
50292017-07-07 John Baldwin <jhb@FreeBSD.org>
5030
5031 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5032
382b69bb
JB
50332017-07-07 John Baldwin <jhb@FreeBSD.org>
5034
5035 * corelow.c (get_core_siginfo): Remove.
5036 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5037 instead of get_core_siginfo.
5038 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5039 * gdbarch.h: Re-generate.
5040 * gdbarch.c: Re-generate.
5041 * linux-tdep.c (linux_core_xfer_siginfo): New.
5042 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5043
6e5eab33
JB
50442017-07-07 John Baldwin <jhb@FreeBSD.org>
5045
5046 * corelow.c (thread_section_name): Move to ...
5047 * gdbcore.h (thread_section_name): ... here.
5048
929edea9
JB
50492017-07-07 John Baldwin <jhb@FreeBSD.org>
5050
5051 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5052 (struct siginfo32): New.
5053 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5054 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5055 via ptrace(PT_LWPINFO).
5056
762c974a
JB
50572017-07-07 John Baldwin <jhb@FreeBSD.org>
5058
5059 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5060 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5061 (fbsd_get_siginfo_type): New.
5062 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5063 (_initialize_fbsd_tdep): New.
5064
33c5cd75
DB
50652017-07-06 David Blaikie <dblaikie@gmail.com>
5066
5067 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5068 a singular dwo_unit*) to support multiple CUs in the same way that
5069 multiple TUs are supported.
5070 (create_cus_hash_table): Replace create_dwo_cu with a function for
5071 parsing multiple CUs from a DWO file.
5072 (open_and_init_dwo_file): Use create_cus_hash_table rather than
5073 create_dwo_cu.
5074 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5075 htab_find, rather than comparing the signature to a singleton CU in
5076 the dwo_file.
5077
8455d262
PA
50782017-07-06 Pedro Alves <palves@redhat.com>
5079
5080 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5081
4da3eb35
PA
50822017-07-04 Pedro Alves <palves@redhat.com>
5083
5084 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5085 * gdbtypes.h (TYPE_STATIC): Delete.
5086 (struct fn_field) <is_public, is_abstract, is_static, is_final,
5087 is_synchronized, is_native>: Delete.
5088 <dummy>: Bump.
5089 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5090 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5091 (TYPE_FN_FIELD_ABSTRACT): Delete.
5092
5bfd255c
SM
50932017-07-03 Simon Marchi <simon.marchi@ericsson.com>
5094
5095 * buffer.h (buffer_finish): Fix spelling mistakes.
5096
25c54127
EZ
50972017-07-01 Eli Zaretskii <eliz@gnu.org>
5098
5099 * .dir-locals.el: Automatically switch to C-style comments in
5100 versions of Emacs that support the feature.
5101
dc4bde35
SDJ
51022017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5103 Pedro Alves <palves@redhat.com>
5104
5105 PR cli/21688
5106 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5107 (process_next_line): New variable 'inline_cmd'.
5108 Adjust 'if' clauses for "python", "compile" and "guile" to use
5109 'command_name_equals' and check for '!inline_cmd'.
5110
51ed89aa
SDJ
51112017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5112
5113 PR cli/21688
5114 * cli/cli-script.c (command_name_equals_not_inline): New function.
5115 (process_next_line): Adjust 'if' clauses for "python", "compile"
5116 and "guile" to use command_name_equals_not_inline.
5117
eb17d413
PA
51182017-06-29 Pedro Alves <palves@redhat.com>
5119
5120 * completer.c (expression_completer): Call
5121 linespec_location_completer instead of location_completer.
5122
195bcdd5
PA
51232017-06-29 Pedro Alves <palves@redhat.com>
5124
5125 * completer.c (expression_completer): Remove code that recomputes
5126 'text' from 'word'.
5127
adc764e7
YQ
51282017-06-29 Yao Qi <yao.qi@linaro.org>
5129
5130 * regformats/regdat.sh: Generate code with
5131 "ifndef IN_PROCESS_AGENT".
5132
6e75794e
PA
51332017-06-28 Pedro Alves <palves@redhat.com>
5134
5135 * command.h: Include "common/scoped_restore.h".
5136
bc491f2e
YQ
51372017-06-28 Yao Qi <yao.qi@linaro.org>
5138
5139 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5140 instead of obstack_grow.
5141
41664b45
DG
51422017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5143
5144 PR gdb/21337
5145 * symfile.c (reread_symbols): Call objfiles_changed just before
5146 read_symbols.
5147
6da67eb1
PA
51482017-06-27 Pedro Alves <palves@redhat.com>
5149
5150 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5151 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5152 (completion_list_add_symbol, completion_list_add_msymbol):
5153 ... these new functions.
5154 (add_symtab_completions)
5155 (default_make_symbol_completion_list_break_on_1): Adjust.
5156
23732b1e
PA
51572017-06-27 Pedro Alves <palves@redhat.com>
5158
5159 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5160 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5161 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5162 dtor.
5163 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5164 'storage_obstack' field an auto_obstack. In-class initialize all
5165 non-bitfield fields. Make minsyms_read bool.
5166 * symfile.c (read_symbols): Adjust.
5167
a4d1e79a
AH
51682017-06-27 Alan Hayward <alan.hayward@arm.com>
5169
5170 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5171 (gdbsim_store_register): Likewise.
5172
8268c778
PA
51732017-06-27 Pedro Alves <palves@redhat.com>
5174
5175 * c-exp.y (name_obstack): Now an auto_obstack.
5176 (yylex): Use auto_obstack::clear.
5177 (c_parse): Use auto_obstack::clear instead of reinitializing and
5178 freeing the obstack.
5179 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5180 * d-exp.y (name_obstack): Now an auto_obstack.
5181 (yylex): Use auto_obstack::clear.
5182 (d_parse): Use auto_obstack::clear instead of reinitializing and
5183 freeing the obstack.
5184 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5185 auto_obstack.
5186 * dwarf2read.c (create_addrmap_from_index)
5187 (dwarf2_build_psymtabs_hard)
5188 (update_enumeration_type_from_children): Likewise.
5189 * gdb_obstack.h (auto_obstack): New type.
5190 * go-exp.y (name_obstack): Now an auto_obstack.
5191 (build_packaged_name): Use auto_obstack::clear.
5192 (go_parse): Use auto_obstack::clear instead of reinitializing and
5193 freeing the obstack.
5194 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5195 auto_obstack.
5196 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5197 * rust-exp.y (work_obstack): Now an auto_obstack.
5198 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5199 reinitializing and freeing the obstack.
5200 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5201 (host_char_to_target): Use auto_obstack.
5202 * utils.h (make_cleanup_obstack_free): Delete declaration.
5203 * valprint.c (generic_emit_char, generic_printstr): Use
5204 auto_obstack.
5205
db665f42
SM
52062017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5207
5208 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5209 thread.
5210 (darwin_init_thread_list): Don't update dummy thread.
5211 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5212
873c0814
SM
52132017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5214
5215 * record-full.c (netorder16): Remove.
5216
8b5a7a6e
SM
52172017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5218
5219 * common/diagnostics.h: Define macros for GCC.
5220 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5221 * common/vec.h: Include diagnostics.h.
5222 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5223 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5224 warning.
5225
d1435379
SM
52262017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5227
5228 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5229 New macro.
5230 * ada-lex.l: Ignore deprecated register warnings.
5231
cc75e0fd
SM
52322017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5233
5234 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5235 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5236
07809eaf
SM
52372017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5238
5239 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5240 its own line.
5241
f076f034
SM
52422017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5243
5244 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5245
0dd5cbc5
AH
52462017-06-23 Alan Hayward <alan.hayward@arm.com>
5247
5248 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5249 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5250 (xtensa_register_read_masked): Likewise.
5251
d4c6ce5b
SDJ
52522017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5253
5254 * common/environ.c (gdb_environ::unset): Update comment.
5255
16892a03
AH
52562017-06-22 Alan Hayward <alan.hayward@arm.com>
5257
5258 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5259 registers.
5260
d7dcbefc
AH
52612017-06-22 Alan Hayward <alan.hayward@arm.com>
5262
5263 * record-full.c (record_full_exec_insn): Use byte_vector.
5264
b30ff123
YQ
52652017-06-22 Yao Qi <yao.qi@linaro.org>
5266
5267 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5268 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5269
4fa847d7
AH
52702017-06-22 Alan Hayward <alan.hayward@arm.com>
5271
5272 * remote.c (cached_reg): Move from here...
5273 * regcache.h (cached_reg): ...to here.
5274 * python/py-unwind.c (struct reg_info): Remove.
5275 (cached_frame_info): Use cached_reg_t.
5276 (pyuw_prev_register): Likewise.
5277 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5278 (pyuw_dealloc_cache): Free all registers.
5279
f4906a9a
PA
52802017-06-22 Pedro Alves <palves@redhat.com>
5281 Simon Marchi <simon.marchi@ericsson.com>
5282
5283 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5284 warning.
5285 * common/diagnostics.h: New file.
5286
b45a1208
PA
52872017-06-22 Pedro Alves <palves@redhat.com>
5288
5289 * common/agent.h: Add include guards.
5290
e4da2c61
SM
52912017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5292
5293 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5294 talk about addressable units instead of bytes.
5295
96160d60
SDJ
52962017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5297
5298 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5299 of '::const_iterator'.
5300
9a6c7d9c
SDJ
53012017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5302
5303 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5304 'unittests/environ-selftests.c'.
5305 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5306 * charset.c (find_charset_names): Declare object 'iconv_env'.
5307 Update code to use 'iconv_env' object. Remove call to
5308 'free_environ'.
5309 * common/environ.c: Include <utility>.
5310 (make_environ): Delete function.
5311 (free_environ): Delete function.
5312 (gdb_environ::clear): New function.
5313 (gdb_environ::operator=): New function.
5314 (gdb_environ::get): Likewise.
5315 (environ_vector): Delete function.
5316 (set_in_environ): Delete function.
5317 (gdb_environ::set): New function.
5318 (unset_in_environ): Delete function.
5319 (gdb_environ::unset): New function.
5320 (gdb_environ::envp): Likewise.
5321 * common/environ.h: Include <vector>.
5322 (struct gdb_environ): Delete; transform into...
5323 (class gdb_environ): ... this class.
5324 (free_environ): Delete prototype.
5325 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5326 environ_vector): Likewise.
5327 * infcmd.c (run_command_1): Update code to call
5328 'envp' from 'gdb_environ' class.
5329 (environment_info): Update code to call methods from 'gdb_environ'
5330 class.
5331 (unset_environment_command): Likewise.
5332 (path_info): Likewise.
5333 (path_command): Likewise.
5334 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5335 (inferior::inferior): Initialize 'environment' using the host's
5336 information.
5337 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5338 Include "environ.h".
5339 (class inferior) <environment>: Change type from 'struct
5340 gdb_environ' to 'gdb_environ'.
5341 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5342 methods from 'gdb_environ' class.
5343 * solib.c (solib_find_1): Likewise
5344 * unittests/environ-selftests.c: New file.
5345
75c554cf
YQ
53462017-06-20 Yao Qi <yao.qi@linaro.org>
5347
5348 * features/i386/i386-linux.xml: Exchange the order of including
5349 32bit-linux.xml and 32bit-sse.xml.
5350 * features/i386/i386-linux.c: Regenerated.
5351
72ddacb7
YQ
53522017-06-20 Yao Qi <yao.qi@linaro.org>
5353
5354 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5355 Delete copy ctor and assignment operator.
5356 (tdesc_type): Likewise.
5357 (tdesc_feature): Likewise.
5358 (tdesc_free_reg): Remove.
5359 (tdesc_create_reg): Use new.
5360 (tdesc_free_type): Remove.
5361 (tdesc_create_vector): Use new.
5362 (tdesc_create_union): Likewise.
5363 (tdesc_create_flags): Likewise.
5364 (tdesc_create_enum): Likewise.
5365 (tdesc_free_feature): Delete.
5366 (free_target_description): Use delete.
5367
325c9fd4
JB
53682017-06-19 John Baldwin <jhb@FreeBSD.org>
5369
5370 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5371 registers.
5372
16b7a719
PA
53732017-06-19 Pedro Alves <palves@redhat.com>
5374
5375 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5376 after gdb::unlinker.
5377
1c8e01c9
SDJ
53782017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5379
5380 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5381 gdb_environ to access an environment variable.
5382
ffce45d2
TP
53832017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5384
5385 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5386 gdb_byte*.
5387
1d4fbac9
SM
53882017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5389
5390 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5391
8465943a
SM
53922017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5393
5394 * configure: Re-generate.
5395 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5396
3e019bdc
SM
53972017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5398
5399 * configure: Re-generate.
5400 * warning.m4: Pass -Werror to compiler when checking for
5401 supported warning flags.
5402
cf0dd6f0
SM
54032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5404
5405 * Makefile.in (COMPILE.pre): Add "-x c++".
5406
6f98355c
YQ
54072017-06-16 Alan Hayward <alan.hayward@arm.com>
5408 Pedro Alves <palves@redhat.com>
5409 Yao Qi <yao.qi@linaro.org>
5410
5411 * defs.h (RequireLongest): New.
5412 (extract_integer): Declare function template.
5413 (extract_signed_integer): Remove the declaration, but define it
5414 static inline.
5415 (extract_unsigned_integer): Likewise.
5416 (store_integer): Declare function template.
5417 (store_signed_integer): Remove the declaration, but define it
5418 static inline.
5419 (store_unsigned_integer): Likewise.
5420 * findvar.c (extract_integer): New function template.
5421 (extract_signed_integer): Remove.
5422 (extract_unsigned_integer): Remove.
5423 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5424 instantiations.
5425 (store_integer): New function template.
5426 (store_signed_integer): Remove.
5427 (store_unsigned_integer): Remove.
5428 (store_integer): Explicit instantiations.
5429 * regcache.c (regcache_raw_read_signed): Update.
5430 (regcache::raw_read): New function.
5431 (regcache::raw_read_signed): Remove.
5432 (regcache::raw_read_unsigned): Remove.
5433 (regcache_raw_read_unsigned): Update.
5434 (regcache_raw_write_unsigned): Update.
5435 (regcache::raw_write_signed): Remove.
5436 (regcache::raw_write): New function.
5437 (regcache_cooked_read_signed): Update.
5438 (regcache::raw_write_unsigned): Remove.
5439 (regcache::cooked_read_signed): Remove.
5440 (regcache_cooked_read_unsigned): Update.
5441 (regcache::cooked_read_unsigned): Remove.
5442 (regcache_cooked_write_signed): Update.
5443 (regcache_cooked_write_unsigned): Update.
5444 * regcache.h (regcache) <raw_read_signed>: Remove.
5445 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5446 <raw_read, raw_write>: New.
5447 <cooked_read_signed, cooked_write_signed>: Remove.
5448 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5449 <cooked_read, cooked_write>: New.
5450 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5451 (sh64_pseudo_register_write): Update.
5452
a87dc45a
AK
54532017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5454
5455 * arc-tdep.c (arc_disassembler_options): New variable.
5456 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5457 of default_print_insn.
5458 (arc_delayed_print_insn): Set info->section when needed,
5459 use default_print_insn to retrieve a disassembler.
5460
45159d6a
SDJ
54612017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5462
5463 PR gdb/21574
5464 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5465 to mention $SHELL and startup-with-shell.
5466
b46c4cf0
MF
54672017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5468
5469 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5470
6394c606
YQ
54712017-06-14 Yao Qi <yao.qi@linaro.org>
5472
5473 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5474 default_print_insn instead of print_insn_aarch64.
5475 * arm-tdep.c (gdb_print_insn_arm): Call
5476 default_print_insn instead of print_insn_big_arm
5477 and print_insn_little_arm.
5478 * i386-tdep.c (i386_print_insn): Call default_print_insn
5479 instead of print_insn_i386.
5480 * ia64-tdep.c (ia64_print_insn): Call
5481 default_print_insn instead of print_insn_ia64.
5482 * mips-tdep.c (gdb_print_insn_mips): Call
5483 default_print_insn instead of print_insn_big_mips
5484 and print_insn_little_mips.
5485 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5486 instead of print_insn_spu.
5487
d5722aa2
PA
54882017-06-14 Pedro Alves <palves@redhat.com>
5489
5490 * ada-lang.c: Include "common/byte-vector.h".
5491 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5492 * charset.c (wchar_iterator::iterate): Resize the vector instead
5493 of reserving it.
5494 * common/byte-vector.h: Include "common/def-vector.h".
5495 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5496 * cli/cli-dump.c: Include "common/byte-vector.h".
5497 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5498 * common/byte-vector.h: New file.
5499 * common/def-vector.h: New file.
5500 * common/default-init-alloc.h: New file.
5501 * dwarf2loc.c: Include "common/byte-vector.h".
5502 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5503 instead of reserving it.
5504 * dwarf2read.c: Include "common/byte-vector.h".
5505 (data_buf::m_vec): Now a gdb::byte_vector.
5506 * gdb_regex.c: Include "common/def-vector.h".
5507 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5508 * mi/mi-main.c: Include "common/byte-vector.h".
5509 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5510 * printcmd.c: Include "common/byte-vector.h".
5511 (print_scalar_formatted): Use gdb::byte_vector.
5512 * valprint.c: Include "common/byte-vector.h".
5513 (maybe_negate_by_bytes, print_decimal_chars): Use
5514 gdb::byte_vector.
5515
01ec7a27
SM
55162017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5517
5518 * darwin-nat.c: Include "nat/fork-inferior.h".
5519
848d9074
SM
55202017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5521
5522 * configure.nat: Factor out Darwin bits that are not
5523 architecture-specific. Add fork-inferior.o.
5524
3b912944
SM
55252017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5526
5527 * configure.nat: Factor out AIX bits that are not
5528 architecture-specific. Add fork-inferior.o.
5529
55acdf22
AA
55302017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5531
5532 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5533 (read_pieced_value, write_pieced_value): ...here. Reduce to
5534 wrappers that just call rw_pieced_value.
5535
f65e2044
AA
55362017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5537
5538 * dwarf2loc.c (write_pieced_value): When writing the data for a
5539 memory piece, use write_memory_with_notification instead of
5540 write_memory.
5541
23f945bf
AA
55422017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5543
5544 * valops.c (read_value_memory): Change embedded_offset to
5545 represent a bit offset instead of a byte offset.
5546 * value.h (read_value_memory): Adjust comment.
5547
f236533e
AA
55482017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5549
5550 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5551 dest_offset_bits and source_offset_bits.
5552 (write_pieced_value): Likewise.
5553
65d84b76
AA
55542017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5555
5556 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5557 given by DW_OP_bit_piece.
5558 (write_pieced_value): Likewise.
5559
242d31ab
AA
55602017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5561
5562 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5563 some other preparations to the places where sufficient information
5564 is available.
5565 (write_pieced_value): Likewise.
5566
03c8af18
AA
55672017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5568
5569 * dwarf2loc.c (bits_to_bytes): New function.
5570 (read_pieced_value): Fix offset calculations for register pieces
5571 on big-endian targets.
5572 (write_pieced_value): Likewise.
5573
840989c1
AA
55742017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5575
5576 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5577 (write_pieced_value): Likewise.
5578
359b19bb
AA
55792017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5580
5581 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5582 transfer the source value's least significant bits, instead of its
5583 lowest-addressed ones. Rename type_len to max_offset.
5584 (read_pieced_value): Mirror above changes to write_pieced_value as
5585 applicable.
5586
07c9ca3b
AA
55872017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5588
5589 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5590 truncate full bytes from dest_offset_bits before using it as an
5591 offset into the buffer.
5592
f1cc9874
AA
55932017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5594
5595 * dwarf2loc.c (write_pieced_value): Include transfer size in
5596 byte-wise check.
5597
cdaac320
AA
55982017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5599
5600 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5601 calculation of this_size.
5602
af547a96
AA
56032017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5604
5605 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5606 when targeting a bit-field.
5607 (write_pieced_value): Likewise.
5608
ddd7882a
AA
56092017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5610
5611 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5612 (allocate_piece_closure): Drop addr_size parameter.
5613 (dwarf2_evaluate_loc_desc_full): Adjust call to
5614 allocate_piece_closure.
5615
e9352324
AA
56162017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5617
5618 PR gdb/21226
5619 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5620 the LSB end, independent of endianness.
5621
d5d1163e
AA
56222017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5623
5624 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5625 size capping.
5626
032bb6ea
YQ
56272017-06-13 Yao Qi <yao.qi@linaro.org>
5628
5629 * mips-linux-nat.c: Move include features/mips*-linux.c to
5630 mips-linux-tdep.c.
5631 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5632 to mips-linux-tdep.c.
5633 * mips-linux-tdep.c: Include features/mips*-linux.c
5634 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5635 functions.
5636 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5637 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5638 (tdesc_mips64_dsp_linux): Declare.
5639
f12f6bad
TT
56402017-06-12 Tom Tromey <tom@tromey.com>
5641
5642 * valprint.h (val_print_type_code_int): Remove.
5643 * valprint.c (generic_val_print_int): Always call
5644 val_print_scalar_formatted.
5645 (val_print_type_code_int): Remove.
5646 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5647 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5648 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5649 * ada-valprint.c (ada_val_print_num): Use
5650 val_print_scalar_formatted.
5651
d9109c80
TT
56522017-06-12 Tom Tromey <tom@tromey.com>
5653
5654 * printcmd.c (print_scalar_formatted): Unify the two switches.
5655 Don't convert scalars to LONGEST.
5656
4ac0cb1c
TT
56572017-06-12 Tom Tromey <tom@tromey.com>
5658
5659 PR exp/16225:
5660 * valprint.h (print_decimal_chars): Update.
5661 * valprint.c (maybe_negate_by_bytes): New function.
5662 (print_decimal_chars): Add "is_signed" argument.
5663 * printcmd.c (print_scalar_formatted): Update.
5664
30a25466
TT
56652017-06-12 Tom Tromey <tom@tromey.com>
5666
5667 PR exp/16225:
5668 * valprint.h (print_binary_chars, print_hex_chars): Update.
5669 * valprint.c (val_print_type_code_int): Update.
5670 (print_binary_chars): Add "zero_pad" argument.
5671 (emit_octal_digit): New function.
5672 (print_octal_chars): Don't zero-pad.
5673 (print_decimal_chars): Likewise.
5674 (print_hex_chars): Add "zero_pad" argument.
5675 * sh64-tdep.c (sh64_do_fp_register): Update.
5676 * regcache.c (regcache::dump): Update.
5677 * printcmd.c (print_scalar_formatted): Update.
5678 * infcmd.c (default_print_one_register_info): Update.
5679
b3464d03
PA
56802017-06-12 Pedro Alves <palves@redhat.com>
5681 Alan Hayward <alan.hayward@arm.com>
5682
5683 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5684 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5685 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5686 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5687 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5688
4b76cda9
PA
56892017-06-12 Pedro Alves <palves@redhat.com>
5690
5691 * dwarf2read.c (mapped_symtab::data): Now a vector of
5692 symtab_index_entry instead of vector of
5693 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5694 whether an element's name is NULL instead of checking whether the
5695 element itself is NULL.
5696 (find_slot): Change return type. Adjust.
5697 (hash_expand, , add_index_entry, uniquify_cu_indices)
5698 (write_hash_table): Adjust.
5699
e8f8bcb3
PA
57002017-06-12 Pedro Alves <palves@redhat.com>
5701
5702 * dwarf2read.c (recursively_count_psymbols): New function.
5703 (write_psymtabs_to_index): Call it to compute number of psyms and
5704 pass estimate size of psyms_seen to unordered_set's ctor.
5705
70a1152b
PA
57062017-06-12 Pedro Alves <palves@redhat.com>
5707
5708 * dwarf2read.c (write_hash_table): Check if key already exists
5709 before emplacing.
5710
c2f134ac
PA
57112017-06-12 Pedro Alves <palves@redhat.com>
5712
5713 * dwarf2read.c (data_buf::append_space): Rename to...
5714 (data_buf::grow): ... this, and make private. Adjust all callers.
5715 (data_buf::append_uint): New method.
5716 (add_address_entry, write_one_signatured_type)
5717 (write_psymtabs_to_index): Use it.
5718
a81e6d4d
PA
57192017-06-12 Pedro Alves <palves@redhat.com>
5720
5721 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5722 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5723 (data_buf::file_write): Call ::fwrite directly.
5724
6fd931f2
PA
57252017-06-12 Pedro Alves <palves@redhat.com>
5726
5727 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5728 std::vector::erase.
5729
bc8f2430
JK
57302017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5731
5732 Code cleanup: C++ify .gdb_index producer.
5733 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5734 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5735 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5736 (create_strtab, add_string): Remove.
5737 (file_write, data_buf): New.
5738 (struct symtab_index_entry): Use std::vector for cu_indices.
5739 (struct mapped_symtab): Use std::vector for data.
5740 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5741 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5742 Remove.
5743 (find_slot): Change return type. Update it to the new data structures.
5744 (hash_expand, add_index_entry): Update it to the new data structures.
5745 (offset_type_compare): Remove.
5746 (uniquify_cu_indices): Update it to the new data structures.
5747 (c_str_view, c_str_view_hasher, vector_hasher): New.
5748 (add_indices_to_cpool): Remove.
5749 (write_hash_table): Update it to the new data structures.
5750 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5751 (eq_psymtab_cu_index): Remove.
5752 (psym_index_map): New typedef.
5753 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5754 reference and std::unordered_map for cu_index_htab.
5755 (add_address_entry, add_address_entry_worker, write_address_map)
5756 (write_psymbols): Update it to the new data structures.
5757 (write_obstack): Remove.
5758 (struct signatured_type_index_data): Change types_list to a data_buf
5759 reference and psyms_seen to a std::unordered_set reference.
5760 (write_one_signatured_type, recursively_write_psymbols)
5761 (write_psymtabs_to_index): Update it to the new data structures.
5762
c4dcb155
SM
57632017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5764
5765 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5766 separate-debug-file commands.
5767 * symfile.h (separate_debug_file_debug): New global.
5768 * symfile.c (separate_debug_file_debug): New global.
5769 (separate_debug_file_exists, find_separate_debug_file): Add
5770 debug output.
5771 (_initialize_symfile): Add "set debug separate-debug-file"
5772 command.
5773 * build-id.c (build_id_to_debug_bfd,
5774 find_separate_debug_file_by_buildid): Add debug output.
5775
6d45d4b4
SM
57762017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5777
5778 * gdbarch.sh (displaced_step_free_closure): Remove.
5779 * gdbarch.h, gdbarch.c: Re-generate.
5780 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5781 displaced_step_free_closure.
5782 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5783 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5784 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5785 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5786 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5787 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5788 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5789 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5790 * infrun.c (displaced_step_clear): Call xfree instead of
5791 gdbarch_displaced_step_free_closure.
5792
2f91880f
SDJ
57932017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5794
5795 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5796 NULL".
5797
b8b6e72f
AH
57982017-06-08 Alan Hayward <alan.hayward@arm.com>
5799
5800 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5801 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5802 (mn10300_push_dummy_call): Likewise.
5803
5369082e
AH
58042017-06-08 Alan Hayward <alan.hayward@arm.com>
5805
5806 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5807
ff4ca5ac
AH
58082017-06-08 Alan Hayward <alan.hayward@arm.com>
5809
5810 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5811
aefd8b33
SDJ
58122017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5813
5814 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5815 able to start inferiors using a shell.
5816 (New remote packets): Announce new packet "QStartupWithShell".
5817 * remote.c: Add PACKET_QStartupWithShell.
5818 (extended_remote_create_inferior): Handle new
5819 PACKET_QStartupWithShell.
5820 (remote_protocol_features) <QStartupWithShell>: New entry for
5821 PACKET_QStartupWithShell.
5822 (_initialize_remote): Call "add_packet_config_cmd" for
5823 QStartupShell.
5824
2090129c
SDJ
58252017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5826 Pedro Alves <palves@redhat.com>
5827
5828 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5829 and "nat/fork-inferior.h".
5830 * common/common-inferior.h: New file, with contents from
5831 "gdb/inferior.h".
5832 * commom/common-utils.c: Include "common-utils.h".
5833 (stringify_argv): New function.
5834 * common/common-utils.h (stringify_argv): New prototype.
5835 * configure.nat: Add "fork-inferior.o" as a dependency for
5836 "*linux*", "fbsd*" and "nbsd*" hosts.
5837 * corefile.c (get_exec_file): Update comment.
5838 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5839 instead of "startup_inferior".
5840 (darwin_create_inferior): Call "add_thread_silent" after
5841 "fork_inferior".
5842 * fork-child.c: Cleanup unnecessary includes.
5843 (SHELL_FILE): Move to "common/common-fork-child.c".
5844 (environ): Likewise.
5845 (exec_wrapper): Initialize.
5846 (get_exec_wrapper): New function.
5847 (breakup_args): Move to "common/common-fork-child.c"; rename to
5848 "breakup_args_for_exec".
5849 (escape_bang_in_quoted_argument): Move to
5850 "common/common-fork-child.c".
5851 (saved_ui): New variable.
5852 (prefork_hook): New function.
5853 (postfork_hook): Likewise.
5854 (postfork_child_hook): Likewise.
5855 (gdb_startup_inferior): Likewise.
5856 (fork_inferior): Move to "common/common-fork-child.c". Update
5857 function to support gdbserver.
5858 (startup_inferior): Likewise.
5859 * gdbcore.h (get_exec_file): Remove declaration.
5860 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5861 instead of "startup_inferior". Call "add_thread_silent" after
5862 "fork_inferior".
5863 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5864 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5865 instead of "startup_inferior". Call "add_thread_silent" after
5866 "fork_inferior".
5867 * inferior.h: Include "common-inferior.h".
5868 (trace_start_error): Move to "common/common-utils.h".
5869 (trace_start_error_with_name): Likewise.
5870 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5871 (startup_inferior): Likewise.
5872 (gdb_startup_inferior): New prototype.
5873 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5874 * nat/fork-inferior.h: New file.
5875 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5876 instead of "startup_inferior". Call "add_thread_silent" after
5877 "fork_inferior".
5878 * target.h (target_terminal_init): Move prototype to
5879 "target/target.h".
5880 (target_terminal_inferior): Likewise.
5881 (target_terminal_ours): Likewise.
5882 * target/target.h (target_terminal_init): New prototype, moved
5883 from "target.h".
5884 (target_terminal_inferior): Likewise.
5885 (target_terminal_ours): Likewise.
5886 * utils.c (gdb_flush_out_err): New function.
5887
043a4934
SDJ
58882017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5889
5890 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5891 * common/common-gdbthread.h: New file, with parts from
5892 "gdb/gdbthread.h".
5893 * gdbthread.h: Include "common-gdbthread.h".
5894 (switch_to_thread): Moved to "common/common-gdbthread.h".
5895
15652511
SDJ
58962017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5897
5898 * Makefile.in (SFILES): Add "common/job-control.c".
5899 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5900 (COMMON_OBS): Add "job-control.o".
5901 * common/job-control.c: New file, with contents from
5902 "gdb/inflow.c".
5903 * common/job-control.h: New file, with contents from "terminal.h".
5904 * fork-child.c: Include "job-control.h".
5905 * inflow.c: Include "job-control.h".
5906 (gdb_setpgid): Move to "common/common-inflow.c".
5907 (_initialize_inflow): Move setting of "job_control" to
5908 "handle_job_control".
5909 * terminal.h (job_control): Moved to "common/common-terminal.h".
5910 (gdb_setpgid): Likewise.
5911 * top.c: Include "job_control.h".
5912 * utils.c: Likewise.
5913 (job_control): Moved to "job-control.c".
5914
2d7cc5c7
PA
59152017-06-07 Pedro Alves <palves@redhat.com>
5916
5917 * Makefile.in (SFILES): Add gdb_regex.c.
5918 (COMMON_OBS): Add gdb_regex.o.
5919 * ada-lang.c (ada_add_standard_exceptions)
5920 (ada_add_exceptions_from_frame, name_matches_regex)
5921 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5922 parameter type to compiled_regex. Adjust.
5923 (ada_exceptions_list): Use compiled_regex.
5924 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5925 std::unique_ptr<compiled_regex>.
5926 (exception_catchpoint::~exception_catchpoint): Remove regfree
5927 call.
5928 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5929 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5930 * breakpoint.c (solib_catchpoint::compiled): Now a
5931 std::unique_ptr<compiled_regex>.
5932 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5933 (check_status_catch_solib): Adjust to use compiled_regex.
5934 (add_solib_catchpoint): Adjust to use compiled_regex.
5935 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5936 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5937 compiled_regex reference. Adjust to use it.
5938 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5939 declaration. Include "gdb_regex.h".
5940 (apropos_cmd): Change regex parameter to compiled_regex reference.
5941 * gdb_regex.c: New file.
5942 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5943 declarations.
5944 (class compiled_regex): New.
5945 * linux-tdep.c: Include "common/gdb_optional.h".
5946 (struct mapping_regexes): New, factored out from
5947 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5948 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5949 gdb::optional and remove cleanups. Adjust to compiled_regex.
5950 * probe.c: Include "common/gdb_optional.h".
5951 (collect_probes): Use compiled_regex and gdb::optional and remove
5952 cleanups.
5953 * skip.c: Include "common/gdb_optional.h".
5954 (skiplist_entry::compiled_function_regexp): Now a
5955 gdb::optional<compiled_regex>.
5956 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5957 (free_skiplist_entry): Remove regfree call.
5958 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5959 compiled_regex and gdb::optional.
5960 * symtab.c: Include "common/gdb_optional.h".
5961 (search_symbols): Use compiled_regex and gdb::optional.
5962 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5963 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5964 to gdb_regex.c.
5965
50d6adef
AH
59662017-06-07 Alan Hayward <alan.hayward@arm.com>
5967
5968 * regcache.c (regcache::save): Avoid buffer use.
5969 (regcache::dump): Likewise.
5970
4a8a33c8
AH
59712017-06-07 Alan Hayward <alan.hayward@arm.com>
5972
5973 * sh-tdep.c (sh_pseudo_register_read): Remove
5974 MAX_REGISTER_SIZE.
5975 (sh_pseudo_register_write): Likewise.
5976 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5977 (sh64_pseudo_register_write): Likewise
5978
d1be909e
AH
59792017-06-07 Alan Hayward <alan.hayward@arm.com>
5980
5981 * aarch64-tdep.c (aarch64_store_return_value): Use
5982 V_REGISTER_SIZE.
5983 (aarch64_pseudo_read_value): Likewise.
5984 (aarch64_pseudo_write): Likewise.
5985
f4a65042
YQ
59862017-06-06 Yao Qi <yao.qi@linaro.org>
5987
5988 * regformats/regdef.h (set_register_cache): Remove the
5989 declaration.
5990
9f7fb0aa
AH
59912017-06-06 Alan Hayward <alan.hayward@arm.com>
5992
5993 * frame.c (frame_unwind_register_signed): Use
5994 frame_unwind_register_value.
5995
e1e01040
PA
59962017-06-06 Pedro Alves <palves@redhat.com>
5997
5998 PR breakpoints/21553
5999 * breakpoint.c (create_breakpoints_sal_default)
6000 (init_breakpoint_sal, create_breakpoint_sal): Use
6001 gdb::unique_xmalloc_ptr for string parameters.
6002 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6003 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
6004 (base_breakpoint_create_breakpoints_sal)
6005 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6006 (strace_marker_create_breakpoints_sal)
6007 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6008 string parameters.
6009 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6010 gdb::unique_xmalloc_ptr for string parameters.
6011 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6012 parameters.
6013
fbe654c8
AH
60142017-06-06 Alan Hayward <alan.hayward@arm.com>
6015
6016 * alpha-tdep.c (alpha_register_to_value): Use
6017 get_frame_register_value.
6018 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6019
ae0d01d6
AH
60202017-06-06 Alan Hayward <alan.hayward@arm.com>
6021
6022 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6023 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6024 (ia64_value_to_register): Likewise.
6025 (ia64_extract_return_value): Likewise.
6026 (ia64_store_return_value): Likewise.
6027 (ia64_push_dummy_call): Likewise.
6028
49cf576c
JB
60292017-06-04 Joel Brobecker <brobecker@adacore.com>
6030
6031 GDB 8.0 released.
6032
26b6a6ab
SM
60332017-06-03 Simon Marchi <simon.marchi@ericsson.com>
6034
6035 * x86-linux-nat.c (struct arch_lwp_info): Remove.
6036
22827c51
SM
60372017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
6038
6039 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6040 parameter.
6041 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6042
0e05cf3a
SM
60432017-06-02 Simon Marchi <simon.marchi@ericsson.com>
6044
6045 * event-loop.c (poll_timers): Unallocate timer using delete
6046 instead of xfree.
6047
c1fc2657
SM
60482017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6049
6050 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6051 (struct breakpoint) <~breakpoint>: New.
6052 (struct watchpoint): Inherit from breakpoint.
6053 <~watchpoint>: New.
6054 <base>: Remove.
6055 (struct tracepoint): Inherit from breakpoint.
6056 <base>: Remove.
6057 * breakpoint.c (longjmp_breakpoint_ops): Remove.
6058 (struct longjmp_breakpoint): Inherit from breakpoint.
6059 <~longjmp_breakpoint>: New.
6060 <base>: Remove.
6061 (new_breakpoint_from_type): Remove casts.
6062 (watchpoint_in_thread_scope): Remove reference to base field.
6063 (watchpoint_del_at_next_stop): Likewise.
6064 (update_watchpoint): Likewise.
6065 (watchpoint_check): Likewise.
6066 (bpstat_check_watchpoint): Likewise.
6067 (set_longjmp_breakpoint): Likewise.
6068 (struct fork_catchpoint): Inherit from breakpoint.
6069 <base>: Remove.
6070 (struct solib_catchpoint): Inherit from breakpoint.
6071 <~solib_catchpoint>: New.
6072 <base>: Remove.
6073 (dtor_catch_solib): Change to ...
6074 (solib_catchpoint::~solib_catchpoint): ... this.
6075 (breakpoint_hit_catch_solib): Remove reference to base field.
6076 (add_solib_catchpoint): Likewise.
6077 (create_fork_vfork_event_catchpoint): Likewise.
6078 (struct exec_catchpoint): Inherit from breakpoint.
6079 <~exec_catchpoint>: New.
6080 <base>: Remove.
6081 (dtor_catch_exec): Change to ...
6082 (exec_catchpoint::~exec_catchpoint): ... this.
6083 (dtor_watchpoint): Change to ...
6084 (watchpoint::~watchpoint): ... this.
6085 (watch_command_1): Remove reference to base field.
6086 (catch_exec_command_1): Likewise.
6087 (base_breakpoint_dtor): Change to ...
6088 (breakpoint::~breakpoint): ... this.
6089 (base_breakpoint_ops): Remove dtor field value.
6090 (longjmp_bkpt_dtor): Change to ...
6091 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6092 (strace_marker_create_breakpoints_sal): Remove reference to base
6093 field.
6094 (delete_breakpoint): Don't manually call breakpoint destructor.
6095 (create_tracepoint_from_upload): Remove reference to base field.
6096 (trace_pass_set_count): Likewise.
6097 (initialize_breakpoint_ops): Don't initialize
6098 momentary_breakpoint_ops, don't set dtors.
6099 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6100 <~ada_catchpoint>: New.
6101 <base>: Remove.
6102 (create_excep_cond_exprs): Remove reference to base field.
6103 (dtor_exception): Change to ...
6104 (ada_catchpoint::~ada_catchpoint): ... this.
6105 (dtor_catch_exception): Remove.
6106 (dtor_catch_exception_unhandled): Remove.
6107 (dtor_catch_assert): Remove.
6108 (create_ada_exception_catchpoint): Remove reference to base
6109 field.
6110 (initialize_ada_catchpoint_ops): Don't set dtors.
6111 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6112 breakpoint.
6113 <~signal_catchpoint>: New.
6114 <base>: Remove.
6115 (signal_catchpoint_dtor): Change to ...
6116 (signal_catchpoint::~signal_catchpoint): ... this.
6117 (create_signal_catchpoint): Remove reference to base field.
6118 (initialize_signal_catchpoint_ops): Don't set dtor.
6119 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6120 from breakpoint.
6121 <~syscall_catchpoint>: New.
6122 <base>: Remove.
6123 (dtor_catch_syscall): Change to ...
6124 (syscall_catchpoint::~syscall_catchpoint): ... this.
6125 (create_syscall_event_catchpoint): Remove reference to base
6126 field.
6127 (initialize_syscall_catchpoint_ops): Don't set dtor.
6128 * break-catch-throw.c (struct exception_catchpoint): Inherit
6129 from breakpoint.
6130 <~exception_catchpoint>: New.
6131 <base>: Remove.
6132 (dtor_exception_catchpoint): Change to ...
6133 (exception_catchpoint::~exception_catchpoint): ... this.
6134 (handle_gnu_v3_exceptions): Remove reference to base field.
6135 (initialize_throw_catchpoint_ops): Don't set dtor.
6136 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6137 field.
6138 * remote.c (remote_get_tracepoint_status): Likewise.
6139 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6140 * tracefile.c (tracefile_fetch_registers): Likewise.
6141 * tracepoint.c (actions_command): Likewise.
6142 (validate_actionline): Likewise.
6143 (tfind_1): Likewise.
6144 (get_traceframe_location): Likewise.
6145 (find_matching_tracepoint_location): Likewise.
6146 (parse_tracepoint_status): Likewise.
6147 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6148
3b0871f4
SM
61492017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6150
6151 * breakpoint.c (struct longjmp_breakpoint): New struct.
6152 (is_tracepoint_type): Change return type to bool.
6153 (is_longjmp_type): New function.
6154 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6155 (set_raw_breakpoint_without_location): Use
6156 new_breakpoint_from_type.
6157 (set_raw_breakpoint): Likewise.
6158
a5e364af
SM
61592017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6160
6161 * breakpoint.c (new_breakpoint_from_type): New function.
6162 (create_breakpoint_sal): Use new_breakpoint_from_type and
6163 unique_ptr.
6164 (create_breakpoint): Likewise.
6165
ae3b3f34
SM
61662017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6167
6168 * memattr.c (mem_info_command): Rename to ...
6169 (info_mem_command): ... this.
6170 (mem_enable_command): Rename to ...
6171 (enable_mem_command): ... this.
6172 (mem_disable_command): Rename to ...
6173 (disable_mem_command): ... this.
6174 (mem_delete_command): Rename to ...
6175 (delete_mem_command): ... this.
6176 (_initialize_mem): Adjust function names.
6177
13ace077
MM
61782017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6179
6180 * btrace.c (handle_pt_insn_events): New.
6181 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6182 STATUS. Split into this and ...
6183 (handle_pt_insn_event_flags): ... this.
6184
c56ccc05
MM
61852017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6186
6187 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6188 and struct pt_insn.resynced.
6189 * configure: Regenerated.
6190 * config.in: Regenerated.
6191
08c3f6d2
TW
61922017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6193
6194 * btrace.c (ftrace_find_call_by_number): New function.
6195 (ftrace_new_function): Store objects, not pointers.
6196 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6197 ftrace_new_gap, ftrace_update_function,
6198 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6199 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6200 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6201 btrace_ends_with_single_insn, btrace_call_get): Account for
6202 btrace_thread_info::functions now storing objects.
6203 * btrace.h (struct btrace_thread_info): Add constructor.
6204 (struct btrace_thread_info) <functions>: Make std::vector.
6205 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6206 Initialize with default values.
6207 * record-btrace.c (record_btrace_frame_sniffer): Account for
6208 btrace_thread_info::functions now storing objects.
6209
8ffd39f2
TW
62102017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6211
6212 * btrace.c: Remove typedef bfun_s.
6213 (ftrace_new_gap): Directly add gaps to the list of gaps.
6214 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6215 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6216 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6217 instead of gdb VEC.
6218
4aeb0dfc
TW
62192017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6220
6221 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6222 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6223 with btrace_thread_info::next_segment and
6224 btrace_thread_info::prev_segment.
6225 * btrace.h: Remove struct btrace_func_link.
6226 (struct btrace_function): Replace pair of function segment pointers
6227 with pair of indices.
6228 * python/py-record-btrace.c (btpy_call_prev_sibling,
6229 btpy_call_next_sibling): Replace references to
6230 btrace_thread_info::segment with btrace_thread_info::next_segment and
6231 btrace_thread_info::prev_segment.
6232 * record-btrace.c (record_btrace_frame_this_id): Use
6233 btrace_find_call_by_number.
6234
eb8f2b9c
TW
62352017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6236
6237 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6238 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6239 btrace_insn_next, btrace_insn_prev): Remove references to
6240 btrace_thread_info::flow.
6241 * btrace.h (struct btrace_function): Remove FLOW.
6242
42bfe59e
TW
62432017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6244
6245 * btrace.c (ftrace_find_call_by_number): New function.
6246 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6247 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6248 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6249 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6250 index.
6251 * btrace.h (struct btrace_function): Turn UP into an index.
6252 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6253 as an index.
6254 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6255 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6256 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6257
b54b03bd
TW
62582017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6259
6260 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6261 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6262 ftrace_update_function, ftrace_compute_global_level_offset,
6263 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6264 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6265 btrace_insn_end, btrace_is_empty): Remove references to
6266 btrace_thread_info::begin and btrace_thread_info::end.
6267 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6268 (struct btrace_thread_info) <functions>: Adjust comment.
6269 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6270 btrace_thread_info::begin.
6271
8286623c
TW
62722017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6273
6274 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6275 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6276 ftrace_update_function): Remove arguments that implicitly were always
6277 BTINFO->END.
6278 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6279 Don't pass BTINFO->END.
6280
a0f1b963
TW
62812017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6282
6283 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6284 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6285 btrace_find_insn_by_number): Replace function segment pointer with
6286 index.
6287 (btrace_insn_cmp): Simplify.
6288 * btrace.h: (struct btrace_insn_iterator) Rename index to
6289 insn_index. Replace function segment pointer with index into function
6290 segment vector.
6291 * record-btrace.c (record_btrace_call_history): Replace function
6292 segment pointer use with index.
6293 (record_btrace_frame_sniffer): Retrieve function call segment through
6294 vector.
6295 (record_btrace_set_replay): Remove defunc't safety check.
6296
f158f208
TW
62972017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6298
6299 * btrace.c (btrace_ends_with_single_insn): New function.
6300 (btrace_call_get, btrace_call_number, btrace_call_begin,
6301 btrace_call_end, btrace_call_next, btrace_call_prev,
6302 btrace_find_call_by_number): Use index into call segment vector
6303 instead of pointer.
6304 (btrace_call_cmp): Simplify.
6305 * btrace.h (struct btrace_call_iterator): Replace function call segment
6306 pointer with index into vector.
6307 * record-btrace.c (record_btrace_call_history): Use index instead of
6308 pointer.
6309
521103fd
TW
63102017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6311
6312 * btrace.c (btrace_insn_begin, btrace_insn_end,
6313 btrace_find_insn_by_number): Add btinfo to iterator.
6314 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6315
17b89b34
TW
63162017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6317
6318 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6319 and save pointers directly.
6320 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6321 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6322 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6323 changed signature of functions.
6324 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6325 (btrace_fetch): Remove code that adds btrace_function pointers to
6326 vector of btrace_functions.
6327 (btrace_clear): Simplify freeing vector of btrace_functions.
6328
2b51eddc
TW
63292017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6330
6331 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6332 Replace VEC_* with std::vector functions.
6333 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6334 (struct btrace_thread_info)<functions>: Change type to std::vector.
6335
db6be0d5
SM
63362017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6337
6338 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6339 "Removed targets and native configurations" up. Merge duplicate
6340 "New commands" sub-sections. Add "New options" sub-sections.
6341
b057297a
AH
63422017-05-26 Alan Hayward <alan.hayward@arm.com>
6343
6344 * defs.h (copy_integer_to_size): New declaration.
6345 * findvar.c (copy_integer_to_size): New function.
6346 (do_cint_test): New selftest function.
6347 (copy_integer_to_size_test): Likewise.
6348 (_initialize_findvar): Likewise.
6349 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6350 (mips_fbsd_collect_reg): Use raw_collect_integer.
6351 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6352 (mips64_fill_gregset): Use raw_collect_integer
6353 (mips64_fill_fpregset): Use raw_supply_integer.
6354 * regcache.c (regcache::raw_supply_integer): New function.
6355 (regcache::raw_collect_integer): Likewise.
6356 * regcache.h: (regcache::raw_supply_integer): New declaration.
6357 (regcache::raw_collect_integer): Likewise.
6358
b77b02a5
YQ
63592017-05-24 Yao Qi <yao.qi@linaro.org>
6360
6361 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6362 (COMMON_OBS): Add gdbarch-selftests.o.
6363 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6364 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6365 * gdbarch-selftests.c: New file.
6366 * regcache.h (regcache) <~regcache>: Mark it virtual if
6367 GDB_SELF_TEST.
6368 <raw_write>: Likewise.
6369
e521e87e
YQ
63702017-05-24 Yao Qi <yao.qi@linaro.org>
6371
6372 * regcache.c (current_regcache): Change it to
6373 regcache::current_regcache.
6374 (regcache_observer_target_changed): Update.
6375 (regcache_thread_ptid_changed): Make it a regcache static
6376 method.
6377 (regcache_thread_ptid_changed): Update.
6378 (class regcache_access): New.
6379 (current_regcache_test): Update.
6380 (_initialize_regcache): Update.
6381 * regcache.h: Include forward_list.
6382 (regcache): Declare regcache_thread_ptid_changed and declare
6383 registers_changed_ptid as friend.
6384
d8e07dda
YQ
63852017-05-24 Yao Qi <yao.qi@linaro.org>
6386
6387 * i387-tdep.c (i387_register_to_value): Use register_size
6388 instead of TYPE_LENGTH.
6389 * m68k-tdep.c (m68k_register_to_value): Likewise.
6390
8c8f9122
YQ
63912017-05-24 Yao Qi <yao.qi@linaro.org>
6392
6393 * i387-tdep.c (i387_convert_register_p): Return false if type
6394 code isn't TYPE_CODE_FLT.
6395
68fce50f
YQ
63962017-05-24 Yao Qi <yao.qi@linaro.org>
6397
6398 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6399 length is 4.
6400 (alpha_register_to_value): Remove type length check.
6401 (alpha_value_to_register): Likewise.
6402
88954b49
YQ
64032017-05-24 Yao Qi <yao.qi@linaro.org>
6404
6405 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6406 TYPE_CODE_FLT.
6407
e3ec9b69
YQ
64082017-05-24 Yao Qi <yao.qi@linaro.org>
6409
6410 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6411 TYPE_CODE_FLT or not.
6412
cdd238da
YQ
64132017-05-24 Yao Qi <yao.qi@linaro.org>
6414
6415 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6416 * avr-tdep.c (avr_gdbarch_init): Likewise.
6417 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6418 * cris-tdep.c (cris_gdbarch_init): Likewise.
6419 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6420 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6421 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6422 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6423 * mep-tdep.c (mep_gdbarch_init): Likewise.
6424 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6425 * mips-tdep.c (mips_gdbarch_init): Likewise.
6426 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6427 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6428 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6429 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6430 * v850-tdep.c (v850_gdbarch_init): Likewise.
6431
7a3929c4
YQ
64322017-05-24 Yao Qi <yao.qi@linaro.org>
6433
6434 * selftest-arch.c (tests_with_arch): Call registers_changed
6435 and reinit_frame_cache.
6436 * selftest.c (run_self_tests): Likewise.
6437
f4985dba
YQ
64382017-05-24 Yao Qi <yao.qi@linaro.org>
6439
6440 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6441 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6442
ab20fa4a
YQ
64432017-05-24 Yao Qi <yao.qi@linaro.org>
6444
6445 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6446 set_gdbarch_print_insn.
6447
f532ab94
YQ
64482017-05-24 Yao Qi <yao.qi@linaro.org>
6449
6450 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6451 set_gdbarch_print_insn.
6452
39503f82
YQ
64532017-05-24 Yao Qi <yao.qi@linaro.org>
6454
6455 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6456 set_gdbarch_print_insn.
6457 * arc-tdep.c (arc_gdbarch_init): Likewise.
6458 * arch-utils.c: include dis-asm.h.
6459 (default_print_insn): New function.
6460 * arch-utils.h (default_print_insn): Declare.
6461 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6462 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6463 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6464 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6465 * frv-tdep.c (frv_gdbarch_init): Likewise.
6466 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6467 * gdbarch.sh (print_insn): Use default_print_insn.
6468 * gdbarch.c: Regenerated.
6469 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6470 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6471 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6472 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6473 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6474 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6475 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6476 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6477 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6478 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6479 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6480 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6481 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6482 * mt-tdep.c (mt_gdbarch_init): Likewise.
6483 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6484 * nios2-tdep.c (nios2_print_insn): Remove.
6485 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6486 * rx-tdep.c (rx_gdbarch_init): Likewise.
6487 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6488 * score-tdep.c (score_print_insn): Remove.
6489 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6490 * sh-tdep.c (sh_gdbarch_init): Likewise.
6491 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6492 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6493 * tic6x-tdep.c (tic6x_print_insn): Remove.
6494 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6495 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6496 * v850-tdep.c (v850_gdbarch_init): Likewise.
6497 * vax-tdep.c (vax_gdbarch_init): Likewise.
6498 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6499 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6500
f7241d4f
JB
65012017-05-23 John Baldwin <jhb@FreeBSD.org>
6502
6503 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6504 (MIPS_FP0_REGNUM): Remove.
6505 (MIPS_FSR_REGNUM): Remove.
6506 (mips_fbsd_supply_fpregs): Use mips_regnum.
6507 (mips_fbsd_supply_gregs): Likewise.
6508 (mips_fbsd_collect_fpregs): Likewise.
6509 (mips_fbsd_collect_gregs): Likewise.
6510
d489d81d
JB
65112017-05-23 John Baldwin <jhb@FreeBSD.org>
6512
6513 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6514 (getpfpregs_supplies): New function.
6515 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6516 getfpregs_supplies.
6517 (mips_fbsd_store_inferior_registers): Likewise.
6518
e11b3cdc
PA
65192017-05-22 Pedro Alves <palves@redhat.com>
6520
6521 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6522 maintainer.
6523
0f068fb5
AH
65242017-05-22 Alan Hayward <alan.hayward@arm.com>
6525
6526 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6527 (store_register): Likewise.
6528 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6529 (get_decimal_float_return_value): Likewise.
6530 (do_ppc_sysv_return_value): Likewise.
6531 (ppc64_sysv_abi_push_integer): Likewise.
6532 (ppc64_sysv_abi_push_freg): Likewise.
6533 (ppc64_sysv_abi_return_value_base): Likewise.
6534 (ppc64_sysv_abi_return_value): Likewise.
6535 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6536 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6537 * rs6000-nat.c: Likewise.
6538 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6539 (rs6000_value_to_register): Likewise.
6540 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6541
e6cf65f2
TT
65422017-05-21 Tom Tromey <tom@tromey.com>
6543
6544 PR rust/21466:
6545 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6546 arrays as "[T]", not "[T; ]".
6547
43cc5389
TT
65482017-05-19 Tom Tromey <tom@tromey.com>
6549
6550 PR rust/21484:
6551 * rust-lang.c (exp_descriptor_rust): New function.
6552 (rust_language_defn): Use it.
6553 * p-lang.c (pascal_language_defn): Update.
6554 * opencl-lang.c (opencl_language_defn): Update.
6555 * objc-lang.c (objc_language_defn): Update.
6556 * m2-lang.c (m2_language_defn): Update.
6557 * language.h (struct language_defn)
6558 <la_watch_location_expression>: New member.
6559 * language.c (unknown_language_defn, auto_language_defn)
6560 (local_language_defn): Update.
6561 * go-lang.c (go_language_defn): Update.
6562 * f-lang.c (f_language_defn): Update.
6563 * d-lang.c (d_language_defn): Update.
6564 * c-lang.h (c_watch_location_expression): Declare.
6565 * c-lang.c (c_watch_location_expression): New function.
6566 (c_language_defn, cplus_language_defn, asm_language_defn)
6567 (minimal_language_defn): Use it.
6568 * breakpoint.c (watch_command_1): Call
6569 la_watch_location_expression.
6570 * ada-lang.c (ada_language_defn): Update.
6571
7a6e7fcc
RO
65722017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6573
6e7e1744
RO
6574 PR tui/21482
6575 * gdb_curses.h (NOMACROS): Define.
6576 (NCURSES_NOMACROS): Define.
6577
65782017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6579
6580 PR tui/21482
7a6e7fcc
RO
6581 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6582 arg to char *.
6583 * tui/tui-wingeneral.c (box_win): Likewise.
6584 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6585 (tui_show_source_line): Likewise.
6586 (tui_show_exec_info_content): Likewise.
6587
1933fd8e
VM
65882017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6589
6590 * sparc-tdep.c (sparc_structure_return_p)
6591 (sparc_arg_on_registers_p): New functions.
6592 (sparc32_store_arguments): Use them.
6593 * sparc64-tdep.c (sparc64_16_byte_align_p)
6594 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6595 Handle TYPE_CODE_ARRAY.
6596
21873064
YQ
65972017-05-17 Yao Qi <yao.qi@linaro.org>
6598
6599 * cli/cli-decode.c (add_alias_cmd): New function.
6600 * command.h (add_alias_cmd): Declare.
6601 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6602 instead call add_alias_cmd.
6603
2b351b19
PA
66042017-05-17 Pedro Alves <palves@redhat.com>
6605
6606 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6607 (nat_makefile_frag): ... this. All references updated.
6608 * configure.ac: Likewise.
6609 * configure.nat: Likewise. Enhance comments.
6610 * configure: Regenerate.
6611
5f2ad7a3
RO
66122017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6613
6614 * procfs.c (procfs_create_inferior): Change prototype to match
6615 definition.
6616
adf3dde5
EZ
66172017-05-13 Eli Zaretskii <eliz@gnu.org>
6618
6619 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6620 C++ compiler warning.
6621
6830f270
TT
66222017-05-12 Tom Tromey <tom@tromey.com>
6623
6624 PR rust/21483:
6625 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6626 recurse, just call value_struct_elt directly.
6627
68f2f2e3
TT
66282017-05-12 Tom Tromey <tom@tromey.com>
6629
6630 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6631 OP_RUST_ARRAY>: Fix.
6632
256afbc2
TT
66332017-05-12 Tom Tromey <tom@tromey.com>
6634
6635 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6636
94bb8dfe
YQ
66372017-05-09 Yao Qi <yao.qi@linaro.org>
6638
6639 * regcache.c: Include <forward_list>.
6640 (struct regcache_list): Remove.
6641 (current_regcache): Update.
6642 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6643 (regcache_thread_ptid_changed): Likewise.
6644 (registers_changed_ptid): Likewise.
6645 (current_regcache_size): Likewise.
6646
8248946c
YQ
66472017-05-09 Yao Qi <yao.qi@linaro.org>
6648
6649 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6650 (current_regcache_size): New function.
6651 (current_regcache_test): New function.
6652 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6653
313c5961
AH
66542017-05-08 Alan Hayward <alan.hayward@arm.com>
6655
6656 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6657 (print_gp_register_row): Use get_frame_register_value.
6658
27bfc1d1
AH
66592017-05-08 Alan Hayward <alan.hayward@arm.com>
6660
6661 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6662 (mips_supply_fpregset): Likewise.
6663 (mips64_supply_gregset): Likewise.
6664
146e6c5c
AH
66652017-05-08 Alan Hayward <alan.hayward@arm.com>
6666
6667 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6668 regcache->raw_supply_zeroed.
6669
e50f25ec
SDJ
66702017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6671
6672 * configure.nat: Rearrange 'case' statements to match
6673 host before cpu.
6674
21ea5acd
SDJ
66752017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6676
6677 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6678 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6679 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6680 "@nat_extra_makefile_frag@".
6681 (Makefile): Remove dependency on "@frags@".
6682 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6683 (data-directory/Makefile): Likewise.
6684 * config/aarch64/linux.mh: Deleted; moved contents to
6685 "gdb/configure.nat".
6686 * config/alpha/alpha-linux.mh: Likewise.
6687 * config/alpha/nbsd.mh: Likewise.
6688 * config/arm/linux.mh: Likewise.
6689 * config/arm/nbsdelf.mh: Likewise.
6690 * config/i386/cygwin.mh: Likewise.
6691 * config/i386/cygwin64.mh: Likewise.
6692 * config/i386/darwin.mh: Likewise.
6693 * config/i386/fbsd.mh: Likewise.
6694 * config/i386/fbsd64.mh: Likewise.
6695 * config/i386/go32.mh: Likewise.
6696 * config/i386/i386gnu.mh: Likewise.
6697 * config/i386/i386sol2.mh: Likewise.
6698 * config/i386/linux.mh: Likewise.
6699 * config/i386/linux64.mh: Likewise.
6700 * config/i386/mingw.mh: Likewise.
6701 * config/i386/mingw64.mh: Likewise.
6702 * config/i386/nbsd64.mh: Likewise.
6703 * config/i386/nbsdelf.mh: Likewise.
6704 * config/i386/nto.mh: Likewise.
6705 * config/i386/obsd.mh: Likewise.
6706 * config/i386/obsd64.mh: Likewise.
6707 * config/i386/sol2-64.mh: Likewise.
6708 * config/ia64/linux.mh: Likewise.
6709 * config/m32r/linux.mh: Likewise.
6710 * config/m68k/linux.mh: Likewise.
6711 * config/m68k/nbsdelf.mh: Likewise.
6712 * config/m68k/obsd.mh: Likewise.
6713 * config/m88k/obsd.mh: Likewise.
6714 * config/mips/fbsd.mh: Likewise.
6715 * config/mips/linux.mh: Likewise.
6716 * config/mips/nbsd.mh: Likewise.
6717 * config/mips/obsd64.mh: Likewise.
6718 * config/pa/linux.mh: Likewise.
6719 * config/pa/nbsd.mh: Likewise.
6720 * config/pa/obsd.mh: Likewise.
6721 * config/powerpc/aix.mh: Likewise.
6722 * config/powerpc/fbsd.mh: Likewise.
6723 * config/powerpc/linux.mh: Likewise.
6724 * config/powerpc/nbsd.mh: Likewise.
6725 * config/powerpc/obsd.mh: Likewise.
6726 * config/powerpc/ppc64-linux.mh: Likewise.
6727 * config/powerpc/spu-linux.mh: Likewise.
6728 * config/s390/linux.mh: Likewise.
6729 * config/sh/nbsd.mh: Likewise.
6730 * config/sparc/fbsd.mh: Likewise.
6731 * config/sparc/linux.mh: Likewise.
6732 * config/sparc/linux64.mh: Likewise.
6733 * config/sparc/nbsd64.mh: Likewise.
6734 * config/sparc/nbsdelf.mh: Likewise.
6735 * config/sparc/obsd64.mh: Likewise.
6736 * config/sparc/sol2.mh: Likewise.
6737 * config/tilegx/linux.mh: Likewise.
6738 * config/vax/nbsdelf.mh: Likewise.
6739 * config/vax/obsd.mh: Likewise.
6740 * config/xtensa/linux.mh: Likewise.
6741 * config/i386/i386gnu.mn: New file, with excerpts from
6742 "config/i386/i386gnu.mh".
6743 * configure: Regenerate.
6744 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6745 *.mh files under "gdb/config".
6746 * configure.nat: New file, with contents from the
6747 "gdb/config/*/*.mh" files.
6748
7ed1acaf
TW
67492017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6750
6751 * btrace.c (btrace_clear): Free insn vector.
6752
e13cb306
PA
67532017-05-05 Pedro Alves <palves@redhat.com>
6754
6755 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6756 * configure: Regenerate.
6757
5ed8105e
PA
67582017-05-04 Pedro Alves <palves@redhat.com>
6759
6760 * Makefile.in (SFILES): Add progspace-and-thread.c.
6761 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6762 (COMMON_OBS): Add progspace-and-thread.o.
6763 * breakpoint.c: Include "progspace-and-thread.h".
6764 (update_inserted_breakpoint_locations)
6765 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6766 Use scoped_restore_current_pspace_and_thread.
6767 (create_std_terminate_master_breakpoint): Use
6768 scoped_restore_current_program_space.
6769 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6770 (print_breakpoint_location): Use
6771 scoped_restore_current_program_space.
6772 (bp_loc_is_permanent): Use
6773 scoped_restore_current_pspace_and_thread.
6774 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6775 (download_tracepoint_locations): Use
6776 scoped_restore_current_pspace_and_thread.
6777 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6778 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6779 (enum step_over_calls_kind): Moved from inferior.h.
6780 (class scoped_restore_current_thread): New class.
6781 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6782 declaration.
6783 (scoped_restore_current_thread): New class.
6784 * infcmd.c: Include "common/gdb_optional.h".
6785 (continue_1, proceed_after_attach): Use
6786 scoped_restore_current_thread.
6787 (notice_new_inferior): Use scoped_restore_current_thread.
6788 * inferior.c: Include "progspace-and-thread.h".
6789 (restore_inferior, save_current_inferior): Delete.
6790 (add_inferior_command, clone_inferior_command): Use
6791 scoped_restore_current_pspace_and_thread.
6792 * inferior.h (scoped_restore_current_inferior): New class.
6793 * infrun.c: Include "progspace-and-thread.h" and
6794 "common/gdb_optional.h".
6795 (follow_fork_inferior): Use
6796 scoped_restore_current_pspace_and_thread.
6797 (scoped_restore_exited_inferior): New class.
6798 (handle_vfork_child_exec_or_exit): Use
6799 scoped_restore_exited_inferior,
6800 scoped_restore_current_pspace_and_thread,
6801 scoped_restore_current_thread and scoped_restore.
6802 (fetch_inferior_event): Use scoped_restore_current_thread.
6803 * linespec.c (decode_line_full, decode_line_1): Use
6804 scoped_restore_current_program_space.
6805 * mi/mi-main.c: Include "progspace-and-thread.h".
6806 (exec_continue): Use scoped_restore_current_thread.
6807 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6808 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6809 * proc-service.c (ps_pglobal_lookup): Use
6810 scoped_restore_current_program_space.
6811 * progspace-and-thread.c: New file.
6812 * progspace-and-thread.h: New file.
6813 * progspace.c (release_program_space, clone_program_space): Use
6814 scoped_restore_current_program_space.
6815 (restore_program_space, save_current_program_space)
6816 (save_current_space_and_thread): Delete.
6817 (switch_to_program_space_and_thread): Moved to
6818 progspace-and-thread.c.
6819 * progspace.h (save_current_program_space)
6820 (save_current_space_and_thread): Delete declarations.
6821 (scoped_restore_current_program_space): New class.
6822 * remote.c (remote_btrace_maybe_reopen): Use
6823 scoped_restore_current_thread.
6824 * symtab.c: Include "progspace-and-thread.h".
6825 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6826 * thread.c (print_thread_info_1): Use
6827 scoped_restore_current_thread.
6828 (struct current_thread_cleanup): Delete.
6829 (do_restore_current_thread_cleanup)
6830 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6831 (scoped_restore_current_thread::~scoped_restore_current_thread):
6832 ... this new dtor.
6833 (make_cleanup_restore_current_thread): Rename/convert to ...
6834 (scoped_restore_current_thread::scoped_restore_current_thread):
6835 ... this new ctor.
6836 (thread_apply_all_command): Use scoped_restore_current_thread.
6837 (thread_apply_command): Use scoped_restore_current_thread.
6838 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6839 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6840
f6223dbb
PA
68412017-05-04 Pedro Alves <palves@redhat.com>
6842
6843 * thread.c (make_cleanup_restore_current_thread): Move
6844 find_thread_ptid call before the is_stopped call. Assert that the
6845 thread is found. Replace is_stopped call by checking the thread's
6846 state directly. Remove unnecessary NULL-thread check.
6847
3c3ae77e
PA
68482017-05-04 Pedro Alves <palves@redhat.com>
6849
6850 * corelow.c (thread_section_name): New class.
6851 (get_core_register_section, get_core_siginfo): Use it.
6852
45eba0ab
AA
68532017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6854
6855 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6856 (get_core_register_section): Remove xfree of NULL pointer.
6857
f81fdd35
AH
68582017-05-03 Alan Hayward <alan.hayward@arm.com>
6859
6860 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6861 * regcache.c (regcache::raw_supply_zeroed): New function.
6862 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6863
35837774
SM
68642017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6865
6866 * gdbarch.sh: Remove commented out definition of
6867 TARGET_CHAR_BIT.
6868 * gdbarch.h: Re-generate.
6869
c94fee56
SDJ
68702017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6871
6872 * configure: Regenerate.
6873
d17f7b36
SM
68742017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6875
6876 * solib-target.c (solib_target_relocate_section_addresses):
6877 Remove num_section_bases, num_bases, segment_bases variables.
6878
b560ebd6
SM
68792017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6880
6881 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6882
f2f46dfc
SM
68832017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6884
6885 * solib-target.c: Include <vector>
6886 (struct lm_info_target) <~lm_info_target>: Remove.
6887 <segment_bases, section_bases>: Change type to
6888 std::vector<CORE_ADDR>.
6889 (library_list_start_segment, library_list_start_section,
6890 library_list_end_library,
6891 solib_target_relocate_section_addresses): Adjust.
6892
a0ff9e1a
SM
68932017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6894
6895 * gdbarch.sh (software_single_step): Change return type to
6896 std::vector<CORE_ADDR>.
6897 * gdbarch.c, gdbarch.h: Re-generate.
6898 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6899 Adjust.
6900 (arm_deal_with_atomic_sequence_raw): Adjust.
6901 (thumb_get_next_pcs_raw): Adjust.
6902 (arm_get_next_pcs_raw): Adjust.
6903 (arm_get_next_pcs): Adjust.
6904 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6905 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6906 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6907 (alpha_software_single_step): Adjust.
6908 * alpha-tdep.h (alpha_software_single_step): Adjust.
6909 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6910 * arm-tdep.c (arm_software_single_step): Adjust.
6911 (arm_breakpoint_kind_from_current_state): Adjust.
6912 * arm-tdep.h (arm_software_single_step): Adjust.
6913 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6914 * cris-tdep.c (cris_software_single_step): Adjust.
6915 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6916 (micromips_deal_with_atomic_sequence): Adjust.
6917 (deal_with_atomic_sequence): Adjust.
6918 (mips_software_single_step): Adjust.
6919 * mips-tdep.h (mips_software_single_step): Adjust.
6920 * moxie-tdep.c (moxie_software_single_step): Adjust.
6921 * nios2-tdep.c (nios2_software_single_step): Adjust.
6922 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6923 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6924 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6925 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6926 * sparc-tdep.c (sparc_software_single_step): Adjust.
6927 * spu-tdep.c (spu_software_single_step): Adjust.
6928 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6929
ea480a30
SM
69302017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6931
6932 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6933 * gdbarch.h: Re-generate.
6934
d050f7d7
TW
69352017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6936
6937 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6938 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6939 * python/py-instruction.c, python/py-instruction.h: New file.
6940 * python/py-record.c: Add py-instruction.h include.
6941 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6942 gdb.RecordInstruction.
6943 * python/python-internal.h: Add gdbpy_initialize_instruction
6944 declaration.
6945 * python/python.c (do_start_initialization): Add
6946 gdbpy_initialize_instruction.
6947
14f819c8
TW
69482017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6949
6950 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6951 Remove.
6952 (btrace_func_from_recpy_func): New function.
6953 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6954 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6955 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6956 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6957 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6958 Also, use new helper functions.
6959 (btpy_list_item): Use new helper functions.
6960 (recpy_bt_function_call_history): Use new type name.
6961 (btpy_call_getset): Remove.
6962 (gdbpy_initialize_btrace): Remove code to initialize
6963 gdb.BtraceFunctionCall.
6964 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6965 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6966 recpy_bt_func_prev, recpy_bt_func_next): New export.
6967 * python/py-record.c (recpy_func_type): New static object.
6968 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6969 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6970 recpy_func_next): New function.
6971 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6972 (recpy_func_getset): New static object.
6973 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6974 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6975
0ed5da75
TW
69762017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6977
6978 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6979 (btpy_object, btpy_insn_type, btpy_new): Remove.
6980 (btpy_list_object): Use gdb.RecordInstruction type instead of
6981 gdb.BtraceInstruction type.
6982 (btrace_insn_from_recpy_insn): New function.
6983 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6984 btpy_new.
6985 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6986 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6987 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6988 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6989 instead of btpy_object.
6990 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6991 btpy_insn_data, btpy_insn_decode): Rename to ...
6992 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6993 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6994 recpy_bt_insn_decode): This. Also, use new helper functions.
6995 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6996 recpy_insn_type.
6997 (btpy_insn_getset): Remove.
6998 (gdbpy_initialize_btrace): Remove code to initialize
6999 gdb.BtraceInstruction. Use recpy_element_object.
7000 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7001 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7002 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7003 * python/py-record.c (recpy_insn_type): New static object.
7004 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7005 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7006 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7007 New function.
7008 (recpy_insn_getset): New static object.
7009 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7010 * python/py-record.h (recpy_element_object): New typedef.
7011 (recpy_insn_type, recpy_insn_new): New export.
7012
913aeadd
TW
70132017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7014
7015 * py-record-btrace.c (btpy_insn_new): Removed.
7016 (btpy_insn_or_gap_new): New function.
7017 (btpy_insn_error): Removed.
7018 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7019 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7020 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7021 btpy_insn_or_gap_new instead of btpy_insn_new.
7022 (btpy_insn_getset): Remove btpy_insn_error.
7023 * py-record.c (recpy_gap_type): New static object.
7024 (recpy_gap_object): New typedef.
7025 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7026 recpy_gap_reason_string): New function.
7027 (recpy_gap_getset): New static object.
7028 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7029 * py-record.h (recpy_gap_new): New export.
7030
a3be24ad
TW
70312017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7032
7033 * python/py-record.c (recpy_ptid): Remove.
7034 (recpy_record_getset): Remove recpy_ptid.
7035
ae20e79a
TW
70362017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7037
7038 * btrace.c (btrace_fetch): Set inferior_ptid.
7039 * python/py-record-btrace.c: Add "py-record.h" include.
7040 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7041 recpy_bt_end, recpy_bt_instruction_history,
7042 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7043 in gdb.Record object instead of current ptid.
7044 * python/py-record.c: Include new "py-record.h" file.
7045 (recpy_record_object): Moved to py-record.h.
7046 * python/py-record.h: New file.
7047
8d0050ea
TW
70482017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7049
7050 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7051 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7052 indentation.
7053
3f380b50
JB
70542017-05-01 Joel Brobecker <brobecker@adacore.com>
7055
7056 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7057 the past maintainers section.
7058
07495424
YQ
70592017-04-28 Yao Qi <yao.qi@linaro.org>
7060
7061 * infcmd.c (get_return_value): Use regcache ctor, and remove
7062 cleanup.
7063
deb1fa3e
YQ
70642017-04-28 Yao Qi <yao.qi@linaro.org>
7065 Pedro Alves <palves@redhat.com>
7066
7067 * regcache.c (regcache::regcache): New tag dispatch ctor.
7068 (do_cooked_read): Moved above.
7069 (regcache_dup): Use the tag dispatch ctor..
7070 * regcache.h (regcache): Declare ctor, delete copy ctor and
7071 assignment operator, remove friend regcache_dup.
7072
b421c83c
YQ
70732017-04-28 Yao Qi <yao.qi@linaro.org>
7074
7075 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7076 call method save instead of regcache_cpy.
7077 * regcache.h (struct regcache): Make regcache_dup a friend.
7078
ef79d9a3
YQ
70792017-04-28 Yao Qi <yao.qi@linaro.org>
7080
7081 * regcache.c (struct regcache): Move to regcache.h
7082 (regcache::arch): New method.
7083 (regcache_get_ptid): Update.
7084 (get_regcache_arch): Call arch method.
7085 (get_regcache_aspace): Call method aspace.
7086 (register_buffer): Change it to method.
7087 (regcache_save): Change it to regcache::save.
7088 (regcache_restore): Likewise.
7089 (regcache_cpy_no_passthrough): Remove the declaration.
7090 (regcache_cpy): Call methods restore and cpy_no_passthrough.
7091 (regcache_cpy_no_passthrough): Change it to method
7092 cpy_no_passthrough.
7093 (regcache_register_status): Change it to method
7094 get_register_status.
7095 (regcache_invalidate): Change it to method invalidate.
7096 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7097 (regcache_raw_update): Change it to method raw_update.
7098 (regcache_raw_read): Likewise.
7099 (regcache_raw_read_signed): Likewise.
7100 (regcache_raw_read_unsigned): Likewise.
7101 (regcache_raw_write_signed): Likewise.
7102 (regcache_raw_write_unsigned): Likewise.
7103 (regcache_cooked_read): Likewise.
7104 (regcache_cooked_read_value): Likewise.
7105 (regcache_cooked_read_signed): Likewise.
7106 (regcache_cooked_read_unsigned): Likewise.
7107 (regcache_cooked_write_signed): Likewise.
7108 (regcache_cooked_write_unsigned): Likewise.
7109 (regcache_raw_set_cached_value): Likewise.
7110 (regcache_raw_write): Likewise.
7111 (regcache_cooked_write): Likewise.
7112 (regcache_xfer_part): Likewise.
7113 (regcache_raw_read_part): Likewise.
7114 (regcache_raw_write_part): Likewise.
7115 (regcache_cooked_read_part): Likewise.
7116 (regcache_cooked_write_part): Likewise.
7117 (regcache_raw_supply): Likewise.
7118 (regcache_raw_collect): Likewise.
7119 (regcache_transfer_regset): Likewise.
7120 (regcache_supply_regset): Likewise.
7121 (regcache_collect_regset): Likewise.
7122 (regcache_debug_print_register): Likewise.
7123 (enum regcache_dump_what): Move it to regcache.h.
7124 (regcache_dump): Change it to method dump.
7125 * regcache.h (enum regcache_dump_what): New.
7126 (class regcache): New.
7127 * target.c (target_fetch_registers): Call method
7128 debug_print_register.
7129 (target_store_registers): Likewise.
7130
f8fdb78e
SM
71312017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7132
7133 * windows-nat.c (struct lm_info_windows): Initialize field.
7134 (windows_make_so): Allocate lm_info_windows with new.
7135 (windows_free_so): Free lm_info_windows with delete.
7136
9ccbfd7b
SM
71372017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7138
7139 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7140 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7141 cleanup.
7142 (darwin_free_so): Free lm_info_darwin with delete.
7143
76e75227
SM
71442017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7145
7146 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7147 <l_addr_p>: Change type to bool.
7148 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7149 (svr4_free_so): Free lm_info_svr4 with delete.
7150 (svr4_copy_library_list): Replace memcpy with call to copy
7151 constructor.
7152 (library_list_start_library, svr4_default_sos): Allocate
7153 lm_info_svr4 with new.
7154
51046d9e
SM
71552017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7156
7157 * solib-target.c (struct lm_info_target): Add destructor,
7158 initialize fields.
7159 <name>: Change type to std::string.
7160 (library_list_start_library): Allocate lm_info_target with new.
7161 (solib_target_free_library_list): Free lm_info_target with
7162 delete.
7163 (solib_target_current_sos): Adapt to std::string.
7164 (solib_target_free_so): Free lm_info_target with delete.
7165
4023ae76
SM
71662017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7167
7168 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7169 fields.
7170 (frv_current_sos): Allocate lm_info_frv with new.
7171 (frv_relocate_main_executable): Free lm_info_frv with delete,
7172 allocate with new.
7173 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7174
af43057b
SM
71752017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7176
7177 * solib-frv.c (struct lm_info_frv): Fix indentation.
7178
b0911207
SM
71792017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7180
7181 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7182 map field.
7183 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7184 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7185 and allocate with new.
7186 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7187
6c401f72
SM
71882017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7189
7190 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7191 <filename, member_name>: Change type to std::string.
7192 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7193 (library_list_start_library): Allocate lm_info_aix with new.
7194 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7195 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7196 with copy constructor.
7197
d0e449a1
SM
71982017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7199
7200 * solist.h (struct lm_info): Remove.
7201 (struct lm_info_base): New class.
7202 (struct so_list) <lm_info>: Change type to lm_info_base *.
7203 * nto-tdep.c (struct lm_info): Remove.
7204 (lm_addr): Adjust.
7205 * solib-aix.c (struct lm_info): Rename to ...
7206 (struct lm_info_aix): ... this. Extend lm_info_base.
7207 (lm_info_p): Rename to ...
7208 (lm_info_aix_p): ... this, and adjust.
7209 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7210 solib_aix_parse_libraries, library_list_start_library,
7211 solib_aix_free_library_list, solib_aix_parse_libraries,
7212 solib_aix_get_library_list,
7213 solib_aix_relocate_section_addresses, solib_aix_free_so,
7214 solib_aix_get_section_offsets,
7215 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7216 Adjust.
7217 (struct solib_aix_inferior_data) <library_list>: Adjust.
7218 * solib-darwin.c (struct lm_info): Rename to ...
7219 (struct lm_info_darwin): ... this. Extend lm_info_base.
7220 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7221 * solib-dsbt.c (struct lm_info): Rename to ...
7222 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7223 (struct dsbt_info) <main_executable_lm_info): Adjust.
7224 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7225 dsbt_relocate_section_addresses): Adjust.
7226 * solib-frv.c (struct lm_info): Rename to ...
7227 (struct lm_info_frv): ... this. Extend lm_info_base.
7228 (main_executable_lm_info): Adjust.
7229 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7230 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7231 find_canonical_descriptor_in_load_object,
7232 frv_fdpic_find_canonical_descriptor): Adjust.
7233 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7234 to lm_info_svr4.
7235 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7236 svr4_clear_so, svr4_copy_library_list,
7237 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7238 svr4_current_sos, svr4_fetch_objfile_link_map,
7239 solist_update_incremental): Adjust.
7240 * solib-svr4.h (struct lm_info_svr4): Move here from
7241 solib-svr4.c.
7242 * solib-target.c (struct lm_info): Rename to ...
7243 (struct lm_info_target): ... this. Extend lm_info_base.
7244 (lm_info_p): Rename to ...
7245 (lm_info_target_p): ... this.
7246 (solib_target_parse_libraries, library_list_start_segment,
7247 library_list_start_section, library_list_start_library,
7248 library_list_end_library, solib_target_free_library_list,
7249 solib_target_current_sos, solib_target_free_so,
7250 solib_target_relocate_section_addresses): Adjust.
7251 * windows-nat.c (struct lm_info): Rename to ...
7252 (struct lm_info_windows): ... this. Extend lm_info_base.
7253 (windows_make_so, handle_load_dll, handle_unload_dll,
7254 windows_xfer_shared_libraries): Adjust.
7255
434a4023
SM
72562017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7257
7258 * solib-darwin.c (struct darwin_so_list): Remove.
7259 (darwin_current_sos): Allocate an so_list object instead of a
7260 darwin_so_list, separately allocate an lm_info object.
7261 (darwin_free_so): Free lm_info.
7262
428544e8
JB
72632017-04-28 John Baldwin <jhb@FreeBSD.org>
7264
7265 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7266 with fprintf_filtered.
7267
4621115f
YQ
72682017-04-28 Yao Qi <yao.qi@linaro.org>
7269
7270 * regcache.c (regcache::regcache): New function.
7271 (regcache::~regcache): New function.
7272 (regcache_xmalloc_1): Remove.
7273 (regcache_xmalloc): Call new regcache.
7274 (regcache_xfree): Call delete regcache.
7275 (get_thread_arch_aspace_regcache): Call new regcache.
7276
339053c2
YQ
72772017-04-28 Yao Qi <yao.qi@linaro.org>
7278
7279 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7280 lwp instead of ptid_get_lwp.
7281
7974a605
YQ
72822017-04-28 Yao Qi <yao.qi@linaro.org>
7283
7284 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7285 lwp_info instead of getting from inferior_ptid.
7286
e15c3eb4
KS
72872017-04-27 Keith Seitz <keiths@redhat.com>
7288
7289 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7290 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7291 (CV_CONVERSION_BADNESS): Define.
7292 (rank_one_type): Remove overly restrictive rvalue reference
7293 rank checks.
7294 Add cv-qualifier checks and subranks for type equality.
7295 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7296 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7297 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7298
72bc1d24
SM
72992017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7300
7301 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7302 count when creating the object.
7303
55bcecda
UW
73042017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7305 Ulrich Weigand <uweigand@de.ibm.com>
7306
7307 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7308 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7309 is used in AIX.
7310 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7311 (process_xcoff_symbol): Likewise.
7312 (scan_xcoff_symtab): Likewise.
7313
5c99fcf8
AH
73142017-04-26 Alan Hayward <alan.hayward@arm.com>
7315
7316 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7317 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7318 (ia64_access_reg): Use get_frame_register_unsigned.
7319 (ia64_access_rse_reg): Likewise.
7320 (ia64_libunwind_frame_prev_register): Likewise.
7321
b41c5a85
JW
73222017-04-26 Jiong Wang <jiong.wang@arm.com>
7323
7324 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7325 * gdbarch.c: Regenerated.
7326 * gdbarch.h: Regenerated.
7327 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7328 visibility external.
7329 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7330 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7331 (enum cfa_how_kind): Move to ...
7332 (struct dwarf2_frame_state_reg_info): Likewise.
7333 (struct dwarf2_frame_state): Likewise.
7334 * dwarf2-frame.h: ... here.
7335 (dwarf2_frame_state_alloc_regs): New declaration.
7336 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7337 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7338
c185f580
AH
73392017-04-26 Alan Hayward <alan.hayward@arm.com>
7340
7341 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7342 regcache_raw_read_unsigned.
7343 (xtensa_pseudo_register_write): Likewise.
7344
19c45594
AH
73452017-04-26 Alan Hayward <alan.hayward@arm.com>
7346
7347 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7348 (nds32_pseudo_register_write): Likewise.
7349
4658f12e
YQ
73502017-04-25 Yao Qi <yao.qi@linaro.org>
7351
7352 * regcache.c (struct regcache) <readonly_p>: Change its type
7353 to bool.
7354 (regcache_xmalloc_1): Update parameter type and callers update.
7355
d581dda8
YQ
73562017-04-25 Yao Qi <yao.qi@linaro.org>
7357
7358 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7359 set_gdbarch_wchar_bit.
7360 * arm-tdep.c (arm_gdbarch_init): Likewise.
7361
debed3db
PA
73622017-04-25 Pedro Alves <palves@redhat.com>
7363
7364 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7365 (BothAreRelocatable, memcopy, memmove): Don't define.
7366 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7367 macros.
7368
b0b92aeb
PA
73692017-04-25 Pedro Alves <palves@redhat.com>
7370
7371 * common/common-defs.h: Include "common/poison.h".
7372 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7373 and adjust.
7374 * common/poison.h: New file.
7375 * common/traits.h: Include <type_traits>.
7376 (Not, Or, Requires): New, moved from common/function-view.h.
7377
16c4d54a
PA
73782017-04-25 Pedro Alves <palves@redhat.com>
7379
7380 * breakpoint.h (struct breakpoint): In-class initialize all
7381 fields. Make boolean fields "bool".
7382 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7383 memset call and initializations no longer necessary.
7384
b5c36682
PA
73852017-04-25 Pedro Alves <palves@redhat.com>
7386
7387 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7388 reference.
7389 (pt_btrace_insn): New function.
7390 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7391
5625a286
PA
73922017-04-25 Pedro Alves <palves@redhat.com>
7393
7394 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7395 "base" field and inherit from "bp_location" instead. Add
7396 non-default ctor.
7397 (allocate_location_exception): Use new non-default ctor.
7398 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7399 (init_bp_location): Convert to ...
7400 (bp_location::bp_location): ... this new ctor, and remove memset
7401 call.
7402 (base_breakpoint_allocate_location): Use the new non-default ctor.
7403 * breakpoint.h (bp_location): Now a class. Declare default and
7404 non-default ctors. In-class initialize all members.
7405 (init_bp_location): Remove declaration.
7406
23bcc18f
PA
74072017-04-25 Pedro Alves <palves@redhat.com>
7408
7409 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7410 assignment operator.
7411
e1ba3053
YQ
74122017-04-24 Yao Qi <yao.qi@linaro.org>
7413
7414 * doublest.c (convert_doublest_to_floatformat): Call
7415 floatformat_totalsize_bytes.
7416
10f489e5
TT
74172017-04-22 Tom Tromey <tom@tromey.com>
7418
7419 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7420 ui_out_emit_list.
7421 * stack.c (print_frame): Use ui_out_emit_list.
7422 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7423 ui_out_emit_list.
7424 * mi/mi-main.c (print_one_inferior)
7425 (mi_cmd_data_list_register_names)
7426 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7427 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7428 ui_out_emit_list.
7429 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7430 (mi_output_solib_attribs): Use ui_out_emit_list,
7431 ui_out_emit_tuple.
7432 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7433 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7434 (mi_cmd_stack_list_args, list_args_or_locals): Use
7435 ui_out_emit_list.
7436 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7437 * breakpoint.c (print_solib_event, output_thread_groups): Use
7438 ui_out_emit_list.
7439
0092b74d
TT
74402017-04-22 Tom Tromey <tom@tromey.com>
7441
7442 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7443 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7444 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7445
a14a62dd
TT
74462017-04-22 Tom Tromey <tom@tromey.com>
7447
7448 * tracepoint.c (tvariables_info_1)
7449 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7450
46b9c129
TT
74512017-04-22 Tom Tromey <tom@tromey.com>
7452
7453 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7454 annotate_arg_emitter.
7455 * breakpoint.c (print_mention_watchpoint)
7456 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7457 * annotate.h (struct annotate_arg_emitter): New.
7458
2e783024
TT
74592017-04-22 Tom Tromey <tom@tromey.com>
7460
7461 * record-btrace.c (record_btrace_insn_history)
7462 (record_btrace_insn_history_range, record_btrace_call_history)
7463 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7464 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7465 ui_out_emit_tuple.
7466 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7467 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7468 * skip.c (skip_info): Use ui_out_emit_tuple.
7469 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7470 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7471 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7472 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7473 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7474 ui_out_emit_tuple.
7475 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7476 (output_register, mi_cmd_data_read_memory)
7477 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7478 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7479 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7480 Use ui_out_emit_tuple.
7481 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7482 ui_out_emit_tuple.
7483 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7484 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7485 * linux-thread-db.c (info_auto_load_libthread_db): Use
7486 ui_out_emit_tuple.
7487 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7488 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7489 * disasm.c (do_mixed_source_and_assembly_deprecated)
7490 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7491 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7492 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7493 * breakpoint.c (print_one_breakpoint_location)
7494 (print_one_breakpoint): Use ui_out_emit_tuple.
7495 * auto-load.c (print_script, info_auto_load_cmd): Use
7496 ui_out_emit_tuple.
7497 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7498
9be21bb4
SM
74992017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7500
7501 * thread.c (print_thread_info_1): Remove dead code.
7502
0d4c07af
JK
75032017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7504
7505 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7506 GDB_SELF_TEST.
7507 * arm-tdep.c (selftests::arm_record_test): Likewise.
7508
4daf993d
YQ
75092017-04-21 Yao Qi <yao.qi@linaro.org>
7510
7511 * regcache.c (regcache_restore): Remove argument 2. Replace
7512 argument 3 with regcache. Get register status from
7513 src->register_status and get register contents from
7514 register_buffer (src, regnum).
7515 (regcache_cpy): Update.
7516
a6c21d4a
PA
75172017-04-19 Pedro Alves <palves@redhat.com>
7518
7519 * gdbthread.h (thread): Add missing closing parenthesis in
7520 comment.
7521
3a3fd0fd
PA
75222017-04-19 Pedro Alves <palves@redhat.com>
7523
7524 * common/refcounted-object.h: New file.
7525 * gdbthread.h: Include "common/refcounted-object.h".
7526 (thread_info): Inherit from refcounted_object and add comments.
7527 (thread_info::incref, thread_info::decref)
7528 (thread_info::m_refcount): Delete.
7529 (thread_info::deletable): Use the refcounted_object::refcount()
7530 method.
7531 * inferior.c (current_inferior_): Add comment.
7532 (set_current_inferior): Increment/decrement refcounts.
7533 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7534 not-deletable instead of comparing with the current inferior.
7535 (initialize_inferiors): Increment the initial inferior's refcount.
7536 * inferior.h (struct inferior): Forward declare.
7537 Include "common/refcounted-object.h".
7538 (current_inferior, set_current_inferior): Move declaration to
7539 before struct inferior's definition, and fix comment.
7540 (inferior): Inherit from refcounted_object. Add comments.
7541 * thread.c (switch_to_thread_no_regs): Reference the thread's
7542 inferior pointer directly instead of doing a ptid lookup.
7543 (switch_to_no_thread): New function.
7544 (switch_to_thread(thread_info *)): New function, factored out
7545 from ...
7546 (switch_to_thread(ptid_t)): ... this.
7547 (restore_current_thread): Delete.
7548 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7549 fields, and add 'inf' field.
7550 (do_restore_current_thread_cleanup): Check whether old->inf is
7551 alive instead of looking up an inferior by ptid. Use
7552 switch_to_thread and switch_to_no_thread.
7553 (restore_current_thread_cleanup_dtor): Use old->inf directly
7554 instead of lookup up an inferior by id. Decref the inferior.
7555 Don't restore 'removable'.
7556 (make_cleanup_restore_current_thread): Same the inferior pointer
7557 in old, instead of the inferior number. Incref the inferior.
7558 Don't save/clear 'removable'.
7559
9bcb1f16
PA
75602017-04-19 Pedro Alves <palves@redhat.com>
7561
7562 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7563 unittests/scoped_restore-selftests.c.
7564 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7565 * common/scoped_restore.h (scoped_restore_base): Make "class".
7566 (scoped_restore_base::release): New public method.
7567 (scoped_restore_base::scoped_restore_base): New protected ctor.
7568 (scoped_restore_base::m_saved_var): New protected field.
7569 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7570 scoped_restore_base base class instead of m_saved_var directly.
7571 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7572 (scoped_restore_tmpl::scoped_restore_tmpl(const
7573 scoped_restore_tmpl<T>&)): Likewise.
7574 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7575 method.
7576 (scoped_restore_tmpl::saved_var): New method.
7577 (scoped_restore_tmpl::m_saved_var): Delete.
7578 * inferior.h (inferior::detaching): Now a bool.
7579 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7580 cleanup.
7581 * unittests/scoped_restore-selftests.c: New file.
7582
26fcd539
PA
75832017-04-19 Pedro Alves <palves@redhat.com>
7584
7585 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7586 Re-sort in alphabetic order.
7587
fdd243b0
PA
75882017-04-18 Pedro Alves <palves@redhat.com>
7589
7590 * xml-support.c (obstack_xml_printf): Delete.
7591 * xml-support.h (obstack_xml_printf): Delete.
7592
4895cde2
PA
75932017-04-18 Pedro Alves <palves@redhat.com>
7594
7595 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7596 vdebug, verror, body_text, start_element, end_element, name,
7597 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7598 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7599 is_xinclude>: Make private and add m_ prefix.
7600 (gdb_xml_parser::body_text): New method, based on ...
7601 (gdb_xml_body_text): ... this. Adjust.
7602 (gdb_xml_parser::vdebug): New method, based on ...
7603 (gdb_xml_debug): ... this. Adjust.
7604 (gdb_xml_parser::verror): New method, based on ...
7605 (gdb_xml_error): ... this. Adjust.
7606 (gdb_xml_parser::start_element): New method, based on ...
7607 (gdb_xml_start_element): ... this. Adjust.
7608 (gdb_xml_start_element_wrapper): Defer to
7609 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7610 (gdb_xml_parser::end_element): New method, based on ...
7611 (gdb_xml_end_element_wrapper): ... this. Adjust.
7612 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7613 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7614 (gdb_xml_parser::use_dtd): New method, based on ...
7615 (gdb_xml_use_dtd): ... this. Adjust.
7616 (gdb_xml_parser::parse): New method, based on ...
7617 (gdb_xml_parse): ... this. Adjust.
7618 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7619 (xinclude_start_include): Adjust to call the parser's name method.
7620 (xml_xinclude_default, xml_xinclude_start_doctype)
7621 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7622 method.
7623 (xml_process_xincludes): Adjust to call parser methods.
7624 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7625 declarations.
7626
bd8a901f
PA
76272017-04-18 Pedro Alves <palves@redhat.com>
7628
7629 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7630 gdb::optional<std::string>.
7631 * xml-support.c: Include <string>.
7632 (scope_level::scope_level(scope_level &&))
7633 (scope_level::~scope_level): Delete.
7634 (scope_level::body): Now a std::string.
7635 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7636 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7637 parameter.
7638 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7639 (xinclude_parsing_data::output): Now a std::string reference.
7640 (xinclude_start_include): Adjust.
7641 (xml_xinclude_default): Adjust.
7642 (xml_process_xincludes): Add 'output' parameter, and return bool.
7643 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7644 and return bool.
7645 * xml-tdesc.c: Include <unordered_map> and <string>.
7646 (tdesc_xml_cache): Delete.
7647 (tdesc_xml_cache_s): Delete.
7648 (xml_cache): Now an std::unordered_map.
7649 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7650 (target_fetch_description_xml): Change return type to
7651 gdb::optional<std::string>, and adjust.
7652 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7653 (target_fetch_description_xml): Change return type to
7654 gdb::optional<std::string>.
7655
d35d1958
PA
76562017-04-18 Pedro Alves <palves@redhat.com>
7657
7658 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7659 unittests/optional-selftests.c.
7660 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7661 * unittests/optional-selftests.c: New file.
7662 * unittests/optional/assignment/1.cc: New file.
7663 * unittests/optional/assignment/2.cc: New file.
7664 * unittests/optional/assignment/3.cc: New file.
7665 * unittests/optional/assignment/4.cc: New file.
7666 * unittests/optional/assignment/5.cc: New file.
7667 * unittests/optional/assignment/6.cc: New file.
7668 * unittests/optional/assignment/7.cc: New file.
7669 * unittests/optional/cons/copy.cc: New file.
7670 * unittests/optional/cons/default.cc: New file.
7671 * unittests/optional/cons/move.cc: New file.
7672 * unittests/optional/cons/value.cc: New file.
7673 * unittests/optional/in_place.cc: New file.
7674 * unittests/optional/observers/1.cc: New file.
7675 * unittests/optional/observers/2.cc: New file.
7676
22796e97
PA
76772017-04-18 Pedro Alves <palves@redhat.com>
7678
7679 * common/gdb_optional.h: Include common/traits.h.
7680 (in_place_t): New type.
7681 (in_place): New constexpr variable.
7682 (optional::optional): Remove member initialization of
7683 m_instantiated.
7684 (optional::optional(in_place_t...)): New constructor.
7685 (optional::~optional): Use reset.
7686 (optional::optional(const optional&)): New.
7687 (optional::optional(const optional&&)): New.
7688 (optional::optional(T &)): New.
7689 (optional::optional(T &&)): New.
7690 (operator::operator=(const optional &)): New.
7691 (operator::operator=(optional &&)): New.
7692 (operator::operator= (const T &))
7693 (operator::operator= (T &&))
7694 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7695 (operator::reset): New.
7696 (operator::m_instantiated):: Add in-class initializer.
7697 * common/traits.h: Include <type_traits>.
7698 (struct And): New types.
7699
a7fc9b61
PA
77002017-04-18 Pedro Alves <palves@redhat.com>
7701
7702 * xml-support.c: Include <vector>.
7703 (scope_level::scope_level(const gdb_xml_element *))
7704 (scope_level::scope_level(scope_level&&)): New.
7705 (scope_level::~scope_level): New.
7706 (scope_level_s): Delete.
7707 (gdb_xml_parser::scopes): Now a std::vector.
7708 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7709 Use std::vector.
7710 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7711 scope cleanup code.
7712 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7713 of the scopes member. Use std::vector::emplace_back.
7714
010151c9
PA
77152017-04-18 Pedro Alves <palves@redhat.com>
7716
7717 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7718 a bool.
7719 (gdb_xml_end_element): Change type of first parameter.
7720 (gdb_xml_cleanup): Rename to ...
7721 (gdb_xml_parser::~gdb_xml_parser): ... this.
7722 (gdb_xml_create_parser_and_cleanup): Delete with ...
7723 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7724 to this new ctor.
7725 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7726 using gdb_xml_create_parser_and_cleanup.
7727 (xinclude_parsing_data): Add ctor/dtor.
7728 (xml_xinclude_cleanup): Delete.
7729 (xml_process_xincludes): Create a local xinclude_parsing_data
7730 instead of heap-allocating one. Create a local gdb_xml_parser
7731 instead of heap-allocating one with
7732 gdb_xml_create_parser_and_cleanup.
7733
d56060f0
JB
77342017-04-18 John Baldwin <jhb@FreeBSD.org>
7735
7736 PR threads/20743
7737 * fbsd-nat.c (resume_one_thread_cb): Remove.
7738 (resume_all_threads_cb): Remove.
7739 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7740 iterate_over_threads.
7741
305d16a9
JB
77422017-04-17 Joel Brobecker <brobecker@adacore.com>
7743
7744 * NEWS: Create a new section for the next release branch.
7745 Rename the section of the current branch, now that it has
7746 been cut.
7747
8bb57231
JB
77482017-04-17 Joel Brobecker <brobecker@adacore.com>
7749
7750 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7751 * version.in: Bump version to 8.0.50.DATE-git.
7752
096c92dd
SDJ
77532017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7754
7755 PR gdb/21385
7756 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7757 independently of the host, and fix build breakage on Cygwin.
7758
0550c955
PA
77592017-04-13 Pedro Alves <palves@redhat.com>
7760
7761 * inferior.c (free_inferior): Convert to ...
7762 (inferior::~inferior): ... this dtor.
7763 (inferior::inferior): New ctor, factored out from ...
7764 (add_inferior_silent): ... here. Allocate the inferior with a new
7765 expression.
7766 (delete_inferior): Call delete instead of free_inferior.
7767 * inferior.h (gdb_environ, continuation): Forward declare.
7768 (inferior): Now a class. Add in-class initialization to all
7769 members. Make boolean fields bool, except 'detaching'.
7770 (inferior::inferior): New explicit ctor.
7771 (inferior::~inferior): New.
7772
e3d60dfc
PA
77732017-04-13 Pedro Alves <palves@redhat.com>
7774
7775 * inferior.c (init_inferior_list): Delete.
7776 * inferior.h (init_inferior_list): Delete.
7777
5fd69d0a
PA
77782017-04-13 Pedro Alves <palves@redhat.com>
7779
7780 PR threads/13217
7781 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7782 (top level): Call it twice, with different thread sets.
7783
c6609450
PA
77842017-04-13 Pedro Alves <palves@redhat.com>
7785
7786 * thread.c: Include <algorithm>.
7787 (thread_array_cleanup): Delete.
7788 (scoped_inc_dec_ref): New class.
7789 (live_threads_count): New function.
7790 (set_thread_refcount): Delete.
7791 (tp_array_compar_ascending): Now a bool.
7792 (tp_array_compar): Convert to a std::sort comparison function.
7793 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7794 and live_threads_count.
7795
2a00d7ce
PA
77962017-04-13 Pedro Alves <palves@redhat.com>
7797
7798 * infrun.c (follow_fork_inferior): Also switch the current
7799 inferior.
7800
441d7c93
PA
78012017-04-13 Pedro Alves <palves@redhat.com>
7802
7803 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7804 before calling create_internal_breakpoint.
7805
808480f6
PA
78062017-04-13 Pedro Alves <palves@redhat.com>
7807
7808 * fork-child.c (execv_argv): New class.
7809 (breakup_args): Refactored as ...
7810 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7811 Copy arguments to storage and replace separators with NULL
7812 terminators in place.
7813 (escape_bang_in_quoted_argument): Adjust to return bool.
7814 (execv_argv::execv_argv): New ctor.
7815 (execv_argv::init_for_shell): New method, factored out from
7816 fork_inferior. Don't strdup strings into the vector.
7817 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7818 Remove free_vector_argv call.
7819
ad3d022a
YQ
78202017-04-13 Yao Qi <yao.qi@linaro.org>
7821
7822 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7823 tdep->rx_psw_type.
7824
e6ddc3bf
YQ
78252017-04-13 Yao Qi <yao.qi@linaro.org>
7826
7827 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7828 * rx-tdep.c (rx_gdbarch_init): Likewise.
7829
bfb8cf90
PA
78302017-04-13 Pedro Alves <palves@redhat.com>
7831
7832 * breakpoint.h (struct breakpoint): Reindent.
7833
f5336ca5
PA
78342017-04-13 Pedro Alves <palves@redhat.com>
7835
7836 * breakpoint.c (bp_location): Rename to ...
7837 (bp_locations): ... this. All references updated.
7838 (bp_location_count): Rename to ...
7839 (bp_locations_count): ... this. All references updated.
7840 (bp_location_placed_address_before_address_max): Rename to ...
7841 (bp_locations_placed_address_before_address_max): ... this. All
7842 references updated.
7843 (bp_location_shadow_len_after_address_max): Rename to ...
7844 (bp_locations_shadow_len_after_address_max): ... this. All
7845 references updated.
7846 (bp_location_compare_addrs): Rename to ...
7847 (bp_locations_compare_addrs): ... this. All references updated.
7848 (bp_location_compare):Rename to ...
7849 (bp_locations_compare): ... this. All references updated.
7850 (bp_location_target_extensions_update): Rename to ...
7851 (bp_locations_target_extensions_update): ... this. All references
7852 updated.
7853
be628ab8
SDJ
78542017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7855
7856 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7857 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7858 'sgtty.h'.
7859 * common/gdb_termios.h: New file, with parts of "terminal.h".
7860 * inflow.c: Include "gdb_termios.h".
7861 * ser-unix.c: Include "gdb_termios.h".
7862 * terminal.h: Move terminal-related defines to
7863 "common/gdb_termios.h".
7864
8e9e35b1
TT
78652017-04-12 Tom Tromey <tom@tromey.com>
7866
7867 * probe.c (parse_probes): Update.
7868 * location.h (delete_event_location): Don't declare.
7869 (event_location_deleter::operator()): Update.
7870 * location.c (event_location_deleter::operator()): Rename from
7871 delete_event_location.
7872 * linespec.h (linespec_result) <location>: Change type to
7873 event_location_up.
7874 * linespec.c (canonicalize_linespec, event_location_to_sals)
7875 (decode_objc): Update.
7876 (linespec_result): Don't call delete_event_location.
7877 * breakpoint.c (create_breakpoints_sal)
7878 (bkpt_probe_create_sals_from_location)
7879 (strace_marker_create_sals_from_location): Update.
7880
16e802b9
TT
78812017-04-12 Tom Tromey <tom@tromey.com>
7882
7883 * linespec.h (struct linespec_result): Add constructor and
7884 destructor.
7885 (init_linespec_result, destroy_linespec_result)
7886 (make_cleanup_destroy_linespec_result): Don't declare.
7887 * linespec.c (init_linespec_result): Remove.
7888 (linespec_result::~linespec_result): Rename from
7889 destroy_linespec_result. Update.
7890 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7891 Remove.
7892 * breakpoint.c (create_breakpoint, break_range_command)
7893 (decode_location_default): Update.
7894 * ax-gdb.c (agent_command_1): Update.
7895
d28cd78a
TT
78962017-04-12 Tom Tromey <tom@tromey.com>
7897
7898 * remote.c (remote_download_tracepoint): Update.
7899 * python/py-breakpoint.c (bppy_get_location): Update.
7900 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7901 (gdbscm_breakpoint_location): Update.
7902 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7903 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7904 Change type to event_location_up.
7905 * breakpoint.c (create_overlay_event_breakpoint)
7906 (create_longjmp_master_breakpoint)
7907 (create_std_terminate_master_breakpoint)
7908 (create_exception_master_breakpoint)
7909 (breakpoint_event_location_empty_p, print_breakpoint_location)
7910 (print_one_breakpoint_location, create_thread_event_breakpoint)
7911 (init_breakpoint_sal, create_breakpoint)
7912 (print_recreate_ranged_breakpoint, break_range_command)
7913 (init_ada_exception_breakpoint, say_where): Update.
7914 (base_breakpoint_dtor): Don't call delete_event_location.
7915 (bkpt_print_recreate, tracepoint_print_recreate)
7916 (dprintf_print_recreate, update_static_tracepoint)
7917 (breakpoint_re_set_default): Update.
7918
711799d5
TT
79192017-04-12 Tom Tromey <tom@tromey.com>
7920
7921 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7922 type of "to_do". Update.
7923 (compute_stack_depth): Use std::vector.
7924
52d214d3
TT
79252017-04-12 Tom Tromey <tom@tromey.com>
7926
7927 * printcmd.c (find_instruction_backward): Use std::vector.
7928
4c404b8b
TT
79292017-04-12 Tom Tromey <tom@tromey.com>
7930
7931 * symfile.c (objfilep): Remove typedef.
7932 (reread_symbols): Use a std::vector.
7933
156d9eab
TT
79342017-04-12 Tom Tromey <tom@tromey.com>
7935
7936 * mi/mi-main.c (exec_direction_forward): Remove.
7937 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7938 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7939 scoped_restore.
7940 * guile/guile.c (guile_repl_command, guile_command)
7941 (gdbscm_execute_gdb_command): Use scoped_restore.
7942 * go-exp.y (go_parse): Use scoped_restore.
7943 * d-exp.y (d_parse): Use scoped_restore.
7944 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7945 * c-exp.y (c_parse): Use scoped_restore.
7946
4d89769a
TT
79472017-04-12 Tom Tromey <tom@tromey.com>
7948
7949 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7950 (mi_parse): Update return type.
7951 (mi_parse_free): Remove.
7952 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7953 (mi_parse::~mi_parse): Rename from mi_parse_free.
7954 (mi_parse_cleanup): Remove.
7955 (mi_parse): Return a unique_ptr. Use new.
7956 * mi/mi-main.c (mi_execute_command): Update.
7957
4b217cc7
TT
79582017-04-12 Tom Tromey <tom@tromey.com>
7959
7960 * location.c (explicit_location_lex_one): Return a
7961 unique_xmalloc_ptr.
7962 (string_to_explicit_location): Update. Remove cleanups.
7963
59d3651b
TT
79642017-04-12 Tom Tromey <tom@tromey.com>
7965
7966 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7967 (compare_value_and_voffset): Change type. Update.
7968 (compute_vtable_size): Change type of "offset_vec".
7969 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7970 (gnuv3_get_typeid): Remove extraneous declaration.
7971
b24b0d6c
TT
79722017-04-12 Tom Tromey <tom@tromey.com>
7973
7974 * charset.h (wchar_iterator): Fix comment.
7975
80a3b8c5
TT
79762017-04-12 Tom Tromey <tom@tromey.com>
7977
7978 * charset.c (iconv_wrapper): New class.
7979 (cleanup_iconv): Remove.
7980 (convert_between_encodings): Use it.
7981
c83dd867
TT
79822017-04-12 Tom Tromey <tom@tromey.com>
7983
7984 * symfile.h (increment_reading_symtab): Update type.
7985 * symfile.c (decrement_reading_symtab): Remove.
7986 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7987 * psymtab.c (psymtab_to_symtab): Update.
7988 * dwarf2read.c (dw2_instantiate_symtab): Update.
7989
0e8621a0
TT
79902017-04-12 Tom Tromey <tom@tromey.com>
7991
7992 * jit.c (struct jit_reader): Declare separately. Add constructor
7993 and destructor. Change type of "handle".
7994 (loaded_jit_reader): Define separately.
7995 (jit_reader_load): Update. New "new".
7996 (jit_reader_unload_command): Use "delete".
7997 * gdb-dlfcn.h (struct dlclose_deleter): New.
7998 (gdb_dlhandle_up): New typedef.
7999 (gdb_dlopen, gdb_dlsym): Update types.
8000 (gdb_dlclose): Remove.
8001 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8002 (gdb_dlsym): Change type of "handle".
8003 (make_cleanup_dlclose): Remove.
8004 (dlclose_deleter::operator()): Rename from gdb_dlclose.
8005 * compile/compile-c-support.c (load_libcc): Update.
8006
67d89901
TT
80072017-04-12 Tom Tromey <tom@tromey.com>
8008
8009 * symtab.h (find_pcs_for_symtab_line): Change return type.
8010 * symtab.c (find_pcs_for_symtab_line): Change return type.
8011 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8012 type of "vec". Update.
8013 (ltpy_get_pcs_for_line): Update.
8014 * linespec.c (decode_digits_ordinary): Update.
8015
93921405
TT
80162017-04-12 Tom Tromey <tom@tromey.com>
8017
8018 * tracepoint.c (actions_command): Update.
8019 * python/python.c (python_command, python_interactive_command):
8020 Update.
8021 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8022 * guile/guile.c (guile_command): Update.
8023 * defs.h (read_command_lines, read_command_lines_1): Return
8024 command_line_up.
8025 (command_lines_deleter): New struct.
8026 (command_line_up): New typedef.
8027 * compile/compile.c (compile_code_command)
8028 (compile_print_command): Update.
8029 * cli/cli-script.h (get_command_line, copy_command_lines): Return
8030 command_line_up.
8031 (make_cleanup_free_command_lines): Remove.
8032 * cli/cli-script.c (get_command_line, read_command_lines_1)
8033 (copy_command_lines): Return command_line_up.
8034 (while_command, if_command, read_command_lines, define_command)
8035 (document_command): Update.
8036 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8037 Remove.
8038 * breakpoint.h (breakpoint_set_commands): Change type of
8039 "commands".
8040 * breakpoint.c (breakpoint_set_commands): Change type of
8041 "commands". Update.
8042 (do_map_commands_command, update_dprintf_command_list)
8043 (create_tracepoint_from_upload): Update.
8044
ffc2605c
TT
80452017-04-12 Tom Tromey <tom@tromey.com>
8046
8047 * tracepoint.c (scope_info): Update.
8048 * spu-tdep.c (spu_catch_start): Update.
8049 * python/python.c (gdbpy_decode_line): Update.
8050 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8051 * python/py-breakpoint.c (bppy_init): Update.
8052 * probe.c (parse_probes): Update.
8053 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8054 * location.h (event_location_deleter): New struct.
8055 (event_location_up): New typedef.
8056 (new_linespec_location, new_address_location, new_probe_location)
8057 (new_explicit_location, copy_event_location)
8058 (string_to_event_location, string_to_event_location_basic)
8059 (string_to_explicit_location): Update return type.
8060 (make_cleanup_delete_event_location): Remove.
8061 * location.c (new_linespec_location, new_address_location)
8062 (new_probe_location, new_explicit_location, copy_event_location):
8063 Return event_location_up.
8064 (delete_event_location_cleanup)
8065 (make_cleanup_delete_event_location): Remove.
8066 (string_to_explicit_location, string_to_event_location_basic)
8067 (string_to_event_location): Return event_location_up.
8068 * linespec.c (canonicalize_linespec, event_location_to_sals)
8069 (decode_line_with_current_source)
8070 (decode_line_with_last_displayed, decode_objc): Update.
8071 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8072 * completer.c (location_completer): Update.
8073 * cli/cli-cmds.c (edit_command, list_command): Update.
8074 * breakpoint.c (create_overlay_event_breakpoint)
8075 (create_longjmp_master_breakpoint)
8076 (create_std_terminate_master_breakpoint)
8077 (create_exception_master_breakpoint)
8078 (create_thread_event_breakpoint): Update.
8079 (init_breakpoint_sal): Update. Remove some dead code.
8080 (create_breakpoint_sal): Change type of "location". Update.
8081 (create_breakpoints_sal, create_breakpoint, break_command_1)
8082 (dprintf_command, break_range_command, until_break_command)
8083 (init_ada_exception_breakpoint)
8084 (strace_marker_create_sals_from_location)
8085 (update_static_tracepoint, trace_command, ftrace_command)
8086 (strace_command, create_tracepoint_from_upload): Update.
8087 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8088 * ax-gdb.c (agent_command_1): Update.
8089
8f10c932
PA
80902017-04-12 Pedro Alves <palves@redhat.com>
8091
8092 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8093 * configure.tgt: Handle i[34567]86-*-go32* and
8094 i[34567]86-*-msdosdjgpp*.
8095 * i386-tdep.c (i386_svr4_reg_to_regnum):
8096 Make extern.
8097 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8098 i386-go32-tdep.c.
8099 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8100 * i386-go32-tdep.c: New file.
8101 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8102 declarations.
8103
0a31ccfb
SM
81042017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8105
8106 * aix-thread.c (pd_status2str): Change return type to const char *.
8107
e9bb3fbb
PA
81082017-04-12 Pedro Alves <palves@redhat.com>
8109
8110 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8111 calls to set_gdbarch_gnu_triplet_regexp.
8112
53375380
PA
81132017-04-12 Pedro Alves <palves@redhat.com>
8114
8115 PR gdb/21323
8116 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8117 New enum value.
8118 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8119 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8120 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8121 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8122 * gdbarch.h, gdbarch.c: Regenerate.
8123 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8124 gdbarch_wchar_bit and gdbarch_wchar_signed.
8125 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8126 * arm-tdep.c (arm_gdbarch_init): Likewise.
8127 * avr-tdep.c (avr_gdbarch_init): Likewise.
8128 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8129 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8130 * i386-tdep.c (i386_go32_init_abi): Likewise.
8131 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8132 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8133 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8134 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8135 * sh-tdep.c (sh_gdbarch_init): Likewise.
8136 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8137 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8138 * windows-tdep.c (windows_init_abi): Likewise.
8139 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8140
53e710ac
PA
81412017-04-12 Pedro Alves <palves@redhat.com>
8142
8143 PR c++/21323
8144 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8145 cplus_primitive_type_char32_t>: New enum values.
8146 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8147 and cplus_primitive_type_char32_t.
8148 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8149 32, use the archtecture's built-in type for char16_t and char32_t,
8150 respectively. Otherwise, fallback to init_integer_type as before,
8151 but make the type unsigned, and issue a complaint.
8152 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8153
ab0538b8
AH
81542017-04-12 Alan Hayward <alan.hayward@arm.com>
8155
5e0e0422 8156 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
8157 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8158
5430098f
SDJ
81592017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8160
8161 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8162 'const char *'.
8163
7c5ded6a
SDJ
81642017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8165
8166 * common/common-utils.c (free_vector_argv): New function.
8167 * common/common-utils.h: Include <vector>.
8168 (free_vector_argv): New prototype.
8169 * darwin-nat.c (darwin_create_inferior): Rewrite function
8170 prototype in order to constify "exec_file" and accept a
8171 "std::string" for "allargs".
8172 * fork-child.c: Include <vector>.
8173 (breakup_args): Rewrite function, using C++.
8174 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8175 and accept "std::string" for "allargs". Update the code to
8176 calculate "argv" based on "allargs". Update calls to "exec_fun"
8177 and "execvp".
8178 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8179 order to constify "exec_file" and accept a "std::string" for
8180 "allargs".
8181 * go32-nat.c (go32_create_inferior): Likewise.
8182 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8183 * infcmd.c (run_command_1): Constify "exec_file". Use
8184 "std::string" for inferior arguments.
8185 * inferior.h (fork_inferior): Update prototype.
8186 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8187 prototype in order to constify "exec_file" and accept a
8188 "std::string" for "allargs".
8189 * nto-procfs.c (procfs_create_inferior): Likewise.
8190 * procfs.c (procfs_create_inferior): Likewise.
8191 * remote-sim.c (gdbsim_create_inferior): Likewise.
8192 * remote.c (extended_remote_run): Update code to accept
8193 "std::string" as argument.
8194 (extended_remote_create_inferior): Rewrite function prototype in
8195 order to constify "exec_file" and accept a "std::string" for
8196 "allargs".
8197 * rs6000-nat.c (super_create_inferior): Likewise.
8198 (rs6000_create_inferior): Likewise.
8199 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8200 * windows-nat.c (windows_create_inferior): Likewise.
8201
ae0eee42
PA
82022017-04-11 Pedro Alves <palves@redhat.com>
8203
8204 * thread.c: Fix whitespace throughout.
8205
a6acac06
PR
82062017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8207
8208 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8209
64403bd1
AH
82102017-04-11 Alan Hayward <alan.hayward@arm.com>
8211
8212 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8213
a5bef50f
SDJ
82142017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8215
8216 PR gdb/21364
8217 * osdata.c (info_osdata): Check if 'type' is an empty string
8218 instead of NULL.
8219
9295a5a9
PA
82202017-04-10 Pedro Alves <palves@redhat.com>
8221
8222 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8223 (ptid_to_global_thread_id, in_thread_list)
8224 (do_captured_list_thread_ids, set_resumed, set_running)
8225 (set_executing, set_stop_requested, finish_thread_state)
8226 (validate_registers_access, can_access_registers_ptid)
8227 (print_thread_info_1, switch_to_thread)
8228 (do_restore_current_thread_cleanup)
8229 (make_cleanup_restore_current_thread, thread_command)
8230 (thread_name_command): Use operator== instead of ptid_equal.
8231
996812e3
PA
82322017-04-10 Pedro Alves <palves@redhat.com>
8233
8234 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8235 (current_thread_cleanup_chain): Delete.
8236 (restore_current_thread_cleanup_dtor)
8237 (make_cleanup_restore_current_thread): Remove references to
8238 current_thread_cleanup_chain.
8239
845b344f
AH
82402017-04-10 Alan Hayward <alan.hayward@arm.com>
8241
8242 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8243 REG_UNKNOWN.
8244
803bdfe4
YQ
82452017-04-10 Yao Qi <yao.qi@linaro.org>
8246
8247 PR gdb/19942
8248 * gdbthread.h (thread_info::deletable): New method.
8249 (thread_info::incref): New method.
8250 (thread_info::decref): New method.
8251 (thread_info::refcount): Move it to private.
8252 * infrun.c (save_stop_context): Call inc_refcount.
8253 (release_stop_context_cleanup): Likewise.
8254 * thread.c (set_thread_exited): New function.
8255 (init_thread_list): Delete "tp" only it is deletable, otherwise
8256 call set_thread_exited.
8257 (delete_thread_1): Call set_thread_exited.
8258 (current_thread_cleanup) <inferior_pid>: Remove.
8259 <thread>: New field.
8260 (restore_current_thread_ptid_changed): Removed.
8261 (do_restore_current_thread_cleanup): Adjust.
8262 (restore_current_thread_cleanup_dtor): Don't call
8263 find_thread_ptid.
8264 (set_thread_refcount): Use dec_refcount.
8265 (make_cleanup_restore_current_thread): Adjust.
8266 (thread_apply_all_command): Call inc_refcount.
8267 (_initialize_thread): Don't call
8268 observer_attach_thread_ptid_changed.
8269
8c25b497
YQ
82702017-04-10 Yao Qi <yao.qi@linaro.org>
8271
8272 * thread.c (delete_thread_1): Hoist code on marking thread as
8273 exited.
8274
8473b447
SM
82752017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8276
8277 * windows-nat.c (windows_detach): Initialize ptid with
8278 minus_one_ptid.
8279
6670ec13
SM
82802017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8281
8282 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8283
ba2f91bb
AH
82842017-04-07 Alan Hayward <alan.hayward@arm.com>
8285
8286 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8287 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8288 (bfin_pseudo_register_write): Likewise
8289
436252de
SM
82902017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8291
8292 * common/ptid.h (struct ptid): Change to...
8293 (class ptid_t): ... this.
8294 <ptid_t>: New constructors.
8295 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8296 matches>: New methods.
8297 <make_null, make_minus_one>: New static methods.
8298 <pid>: Rename to...
8299 <m_pid>: ...this.
8300 <lwp>: Rename to...
8301 <m_lwp>: ...this.
8302 <tid>: Rename to...
8303 <m_tid>: ...this.
8304 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8305 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8306 as references, move comment to class ptid_t.
8307 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8308 ptid_t static methods.
8309 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8310 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8311 Take ptid arguments as references, implement using ptid_t methods.
8312 * unittests/ptid-selftests.c: New file.
8313 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8314 unittests/ptid-selftests.c.
8315 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8316
0dedf377
TP
83172017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8318
8319 * python/python.c (python_run_simple_file): Cast mode literal to
8320 non-const char pointer as expected by PyFile_FromString.
8321
4e9868d4
SM
83222017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8323
8324 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8325 minus_one_ptid and null_ptid.
8326
9bf2a700
PA
83272017-04-05 Pedro Alves <palves@redhat.com>
8328
8329 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8330 * configure: Regenerate.
8331
a121b7c1
PA
83322017-04-05 Pedro Alves <palves@redhat.com>
8333
8334 * ada-exp.y (yyerror): Constify.
8335 * ada-lang.c (bound_name, get_selections)
8336 (ada_variant_discrim_type)
8337 (ada_variant_discrim_name, ada_value_struct_elt)
8338 (ada_lookup_struct_elt_type, is_unchecked_variant)
8339 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8340 (catch_ada_exception_command_split)
8341 (catch_ada_assert_command_split, catch_assert_command)
8342 (ada_op_name): Constify.
8343 * ada-lang.h (ada_yyerror, get_selections)
8344 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8345 * arc-tdep.c (arc_print_frame_cache): Constify.
8346 * arm-tdep.c (arm_skip_stub): Constify.
8347 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8348 (gen_aggregate_elt_ref): Constify.
8349 * bcache.c (print_bcache_statistics): Constify.
8350 * bcache.h (print_bcache_statistics): Constify.
8351 * break-catch-throw.c (catch_exception_command_1):
8352 * breakpoint.c (struct ep_type_description::description):
8353 Constify.
8354 (add_solib_catchpoint): Constify.
8355 (catch_fork_command_1): Add cast.
8356 (add_catch_command): Constify.
8357 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8358 Constify.
8359 * bsd-uthread.c (bsd_uthread_state): Constify.
8360 * buildsym.c (patch_subfile_names): Constify.
8361 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8362 Constify.
8363 * c-exp.y (yyerror): Constify.
8364 (token::oper): Constify.
8365 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8366 * c-varobj.c (cplus_describe_child): Constify.
8367 * charset.c (find_charset_names): Add cast.
8368 (find_charset_names): Constify array and add const_cast.
8369 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8370 (edit_command): Constify.
8371 * cli/cli-decode.c (lookup_cmd): Constify.
8372 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8373 Constify.
8374 (struct dump_context): Constify.
8375 (add_dump_command, restore_command): Constify.
8376 * cli/cli-script.c (get_command_line): Constify.
8377 * cli/cli-script.h (get_command_line): Constify.
8378 * cli/cli-utils.c (check_for_argument): Constify.
8379 * cli/cli-utils.h (check_for_argument): Constify.
8380 * coff-pe-read.c (struct read_pe_section_data): Constify.
8381 * command.h (lookup_cmd): Constify.
8382 * common/print-utils.c (decimal2str): Constify.
8383 * completer.c (gdb_print_filename): Constify.
8384 * corefile.c (set_gnutarget): Constify.
8385 * cp-name-parser.y (yyerror): Constify.
8386 * cp-valprint.c (cp_print_class_member): Constify.
8387 * cris-tdep.c (cris_register_name, crisv32_register_name):
8388 Constify.
8389 * d-exp.y (yyerror): Constify.
8390 (struct token::oper): Constify.
8391 * d-lang.h (d_yyerror): Constify.
8392 * dbxread.c (struct header_file_location::name): Constify.
8393 (add_old_header_file, add_new_header_file, last_function_name)
8394 (dbx_next_symbol_text, add_bincl_to_list)
8395 (find_corresponding_bincl_psymtab, set_namestring)
8396 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8397 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8398 * defs.h (command_line_input, print_address_symbolic)
8399 (deprecated_readline_begin_hook): Constify.
8400 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8401 Constify.
8402 * event-top.c (handle_line_of_input): Constify and add cast.
8403 * exceptions.c (catch_errors): Constify.
8404 * exceptions.h (catch_errors): Constify.
8405 * expprint.c (print_subexp_standard, op_string, op_name)
8406 (op_name_standard, dump_raw_expression, dump_raw_expression):
8407 * expression.h (op_name, op_string, dump_raw_expression):
8408 Constify.
8409 * f-exp.y (yyerror): Constify.
8410 (struct token::oper): Constify.
8411 (struct f77_boolean_val::name): Constify.
8412 * f-lang.c (f_word_break_characters): Constify.
8413 * f-lang.h (f_yyerror): Constify.
8414 * fork-child.c (fork_inferior): Add cast.
8415 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8416 (new_variant): Constify.
8417 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8418 * gdbarch.c: Regenerate.
8419 * gdbcore.h (set_gnutarget): Constify.
8420 * go-exp.y (yyerror): Constify.
8421 (token::oper): Constify.
8422 * go-lang.h (go_yyerror): Constify.
8423 * go32-nat.c (go32_sysinfo): Constify.
8424 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8425 * guile/scm-cmd.c (cmdscm_function): Constify.
8426 * guile/scm-param.c (pascm_param_value): Constify.
8427 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8428 (h8300sx_register_name): Constify.
8429 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8430 Constify.
8431 * ia64-tdep.c (ia64_register_names): Constify.
8432 * infcmd.c (construct_inferior_arguments): Constify.
8433 (path_command, attach_post_wait): Constify.
8434 * language.c (show_range_command, show_case_command)
8435 (unk_lang_error): Constify.
8436 * language.h (language_defn::la_error)
8437 (language_defn::la_name_of_this): Constify.
8438 * linespec.c (decode_line_2): Constify.
8439 * linux-thread-db.c (thread_db_err_str): Constify.
8440 * lm32-tdep.c (lm32_register_name): Constify.
8441 * m2-exp.y (yyerror): Constify.
8442 * m2-lang.h (m2_yyerror): Constify.
8443 * m32r-tdep.c (m32r_register_names): Constify and make static.
8444 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8445 * m88k-tdep.c (m88k_register_name): Constify.
8446 * macroexp.c (appendmem): Constify.
8447 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8448 (upgrade_type, parse_external, parse_partial_symbols)
8449 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8450 (new_symbol): Constify.
8451 * memattr.c (mem_info_command): Constify.
8452 * mep-tdep.c (register_name_from_keyword): Constify.
8453 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8454 Constify.
8455 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8456 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8457 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8458 cast.
8459 (mi_execute_async_cli_command): Constify.
8460 * mips-tdep.c (mips_register_name): Constify.
8461 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8462 (am33_register_name, am33_2_register_name)
8463 * moxie-tdep.c (moxie_register_names): Constify.
8464 * nat/linux-osdata.c (osdata_type): Constify fields.
8465 * nto-tdep.c (nto_parse_redirection): Constify.
8466 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8467 (lookup_child_selector): Constify.
8468 (objc_methcall::name): Constify.
8469 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8470 (lookup_struct_typedef): Constify.
8471 * objfiles.c (pc_in_section): Constify.
8472 * objfiles.h (pc_in_section): Constify.
8473 * p-exp.y (struct token::oper): Constify.
8474 (yyerror): Constify.
8475 * p-lang.h (pascal_yyerror): Constify.
8476 * parser-defs.h (op_name_standard): Constify.
8477 (op_print::string): Constify.
8478 (exp_descriptor::op_name): Constify.
8479 * printcmd.c (print_address_symbolic): Constify.
8480 * psymtab.c (print_partial_symbols): Constify.
8481 * python/py-breakpoint.c (stop_func): Constify.
8482 (bppy_get_expression): Constify.
8483 * python/py-cmd.c (cmdpy_completer::name): Constify.
8484 (cmdpy_function): Constify.
8485 * python/py-event.c (evpy_add_attribute)
8486 (gdbpy_initialize_event_generic): Constify.
8487 * python/py-event.h (evpy_add_attribute)
8488 (gdbpy_initialize_event_generic): Constify.
8489 * python/py-evts.c (add_new_registry): Constify.
8490 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8491 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8492 * python/py-inferior.c (get_buffer): Add cast.
8493 * python/py-param.c (parm_constant::name): Constify.
8494 * python/py-unwind.c (fprint_frame_id): Constify.
8495 * python/python.c (gdbpy_parameter_value): Constify.
8496 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8497 * remote.c (memory_packet_config::name): Constify.
8498 (show_packet_config_cmd, remote_write_bytes)
8499 (remote_buffer_add_string):
8500 * reverse.c (exec_reverse_once): Constify.
8501 * rs6000-tdep.c (variant::name, variant::description): Constify.
8502 * rust-exp.y (rustyyerror): Constify.
8503 * rust-lang.c (rust_op_name): Constify.
8504 * rust-lang.h (rustyyerror): Constify.
8505 * serial.h (serial_ops::name): Constify.
8506 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8507 (sh_sh3e_register_name, sh_sh2e_register_name)
8508 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8509 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8510 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8511 (sh_sh4al_dsp_register_name): Constify.
8512 * sh64-tdep.c (sh64_register_name): Constify.
8513 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8514 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8515 * stabsread.c (patch_block_stabs, read_type_number)
8516 (ref_map::stabs, ref_add, process_reference)
8517 (symbol_reference_defined, define_symbol, define_symbol)
8518 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8519 (read_one_struct_field, read_struct_fields, read_baseclasses)
8520 (read_tilde_fields, read_struct_type, read_array_type)
8521 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8522 (read_huge_number, read_range_type, read_args, common_block_start)
8523 (find_name_end): Constify.
8524 * stabsread.h (common_block_start, define_symbol)
8525 (process_one_symbol, symbol_reference_defined, ref_add):
8526 * symfile.c (get_section_index, add_symbol_file_command):
8527 * symfile.h (get_section_index): Constify.
8528 * target-descriptions.c (tdesc_type::name): Constify.
8529 (tdesc_free_type): Add cast.
8530 * target.c (find_default_run_target):
8531 (add_deprecated_target_alias, find_default_run_target)
8532 (target_announce_detach): Constify.
8533 (do_option): Constify.
8534 * target.h (add_deprecated_target_alias): Constify.
8535 * thread.c (print_thread_info_1): Constify.
8536 * top.c (deprecated_readline_begin_hook, command_line_input):
8537 Constify.
8538 (init_main): Add casts.
8539 * top.h (handle_line_of_input): Constify.
8540 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8541 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8542 (tfind_command): Rename to ...
8543 (tfind_command_1): ... this and constify.
8544 (tfind_command): New function.
8545 (tfind_end_command, tfind_start_command): Adjust.
8546 (encode_source_string): Constify.
8547 * tracepoint.h (encode_source_string): Constify.
8548 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8549 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8550 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8551 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8552 * tui/tui-win.c (parse_scrolling_args): Constify.
8553 * tui/tui-windata.c (tui_erase_data_content): Constify.
8554 * tui/tui-windata.h (tui_erase_data_content): Constify.
8555 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8556 * tui/tui.c (tui_enable): Add cast.
8557 * utils.c (defaulted_query): Constify.
8558 (init_page_info): Add cast.
8559 (puts_debug, subset_compare): Constify.
8560 * utils.h (subset_compare): Constify.
8561 * varobj.c (varobj_format_string): Constify.
8562 * varobj.h (varobj_format_string): Constify.
8563 * vax-tdep.c (vax_register_name): Constify.
8564 * windows-nat.c (windows_detach): Constify.
8565 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8566 * xml-support.c (gdb_xml_end_element): Constify.
8567 * xml-tdesc.c (tdesc_start_reg): Constify.
8568 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8569 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8570 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8571
995816ba
PA
85722017-04-05 Pedro Alves <palves@redhat.com>
8573
8574 * proc-api.c (struct trans): Constify.
8575 (procfs_note): Constify.
8576 * proc-events.c (struct trans, syscall_table):
8577 * proc-flags.c (struct trans): Constify.
8578 * proc-utils.h (procfs_note): Constify.
8579 * proc-why.c (struct trans): Constify.
8580 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8581 (procfs_detach): Constify.
8582 * sol-thread.c (struct string_map): Constify.
8583 (td_err_string, td_state_string): Constify.
8584
3e83a920
PA
85852017-04-05 Pedro Alves <palves@redhat.com>
8586
8587 * proc-api.c (procfs_filename): Don't initialize
8588 procfs_filename.
8589 (prepare_to_trace): Assume procfs_filename is non-NULL.
8590 (_initialize_proc_api): Give procfs_filename a default value here.
8591
63160a43
PA
85922017-04-05 Pedro Alves <palves@redhat.com>
8593
8594 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8595 'cond_string' parameter.
8596 (extract_exception_regexp): Constify 'string' parameter.
8597 (catch_exception_command_1): Constify.
8598 * breakpoint.c (init_catchpoint)
8599 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8600 parameter.
8601 (ep_parse_optional_if_clause, catch_fork_command_1)
8602 (catch_exec_command_1): Constify.
8603 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8604 parameter.
8605 (ep_parse_optional_if_clause): Constify.
8606 * cli/cli-utils.c (remove_trailing_whitespace)
8607 (check_for_argument): Constify.
8608 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8609 non-const overload.
8610 (check_for_argument): Likewise.
8611
9b2eba3d
PA
86122017-04-05 Pedro Alves <palves@redhat.com>
8613
8614 * event-top.c (command_line_handler): Add cast to execute_command
8615 call.
8616 * record-btrace.c (cmd_record_btrace_bts_start)
8617 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8618 (cmd_record_btrace_start): Add cast to execute_command call.
8619 * record-full.c (record_full_goto_insn):
8620 * record.c (record_start, record_stop): Add cast to
8621 execute_command_to_string calls.
8622 (cmd_record_start): Add cast to execute_command calls.
8623
2adadf51
PA
86242017-04-05 Pedro Alves <palves@redhat.com>
8625
8626 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8627 static inline function.
8628 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8629 array and use gdb_PyArg_ParseTupleAndKeywords.
8630 * python/py-cmd.c (cmdpy_init): Likewise.
8631 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8632 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8633 (infpy_search_memory): Likewise.
8634 * python/py-objfile.c (objfpy_add_separate_debug_file)
8635 (gdbpy_lookup_objfile): Likewise.
8636 * python/py-symbol.c (gdbpy_lookup_symbol)
8637 (gdbpy_lookup_global_symbol): Likewise.
8638 * python/py-type.c (gdbpy_lookup_type): Likewise.
8639 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8640 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8641 Likewise.
8642
0d1f4ceb
PA
86432017-04-05 Pedro Alves <palves@redhat.com>
8644
8645 * python/python-internal.h (gdb_PyGetSetDef): New type.
8646 * python/py-block.c (block_object_getset)
8647 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8648 * python/py-event.c (event_object_getset)
8649 (finish_breakpoint_object_getset): Likewise.
8650 * python/py-inferior.c (inferior_object_getset): Likewise.
8651 * python/py-infthread.c (thread_object_getset): Likewise.
8652 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8653 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8654 * python/py-objfile.c (objfile_getset): Likewise.
8655 * python/py-progspace.c (pspace_getset): Likewise.
8656 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8657 Likewise.
8658 * python/py-record.c (recpy_record_getset): Likewise.
8659 * python/py-symbol.c (symbol_object_getset): Likewise.
8660 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8661 Likewise.
8662 * python/py-type.c (type_object_getset, field_object_getset):
8663 Likewise.
8664 * python/py-value.c (value_object_getset): Likewise.
8665
4d759979
PA
86662017-04-05 Pedro Alves <palves@redhat.com>
8667
8668 * python/python-internal.h (gdb_PyObject_CallMethod)
8669 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8670 New functions.
8671 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8672 (PySys_GetObject, PySys_SetPath): New macros.
8673
fdf9e36f
PA
86742017-04-05 Pedro Alves <palves@redhat.com>
8675
8676 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8677 info_osdata_command.
8678 * osdata.c (info_osdata_command): Rename to ...
8679 (info_osdata): ... this. Constify 'type' parameter, and remove
8680 the 'from_tty' parameter. Accept NULL TYPE.
8681 (info_osdata_command): New function.
8682 * osdata.h (info_osdata_command): Remove declaration.
8683 (info_osdata): New declaration.
8684
9f33b8b7
PA
86852017-04-05 Pedro Alves <palves@redhat.com>
8686
8687 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8688 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8689 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8690 parameter.
8691 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8692 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8693 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8694 parameter.
8695 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8696 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8697 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8698 (mi_cmd_file_list_exec_source_files)
8699 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8700 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8701 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8702 parameter.
8703 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8704 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8705 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8706 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8707 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8708 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8709 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8710 'command' parameter.
8711 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8712 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8713 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8714 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8715 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8716 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8717 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8718 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8719 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8720 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8721 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8722 parameter.
8723 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8724 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8725 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8726 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8727 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8728 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8729 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8730 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8731 (mi_cmd_data_list_changed_registers)
8732 (mi_cmd_data_write_register_values)
8733 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8734 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8735 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8736 (mi_cmd_list_features, mi_cmd_list_target_features)
8737 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8738 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8739 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8740 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8741 (mi_cmd_trace_frame_collected): Constify 'command'
8742 parameter.
8743 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8744 'command' parameter.
8745
67cb5b2d
PA
87462017-04-05 Pedro Alves <palves@redhat.com>
8747
8748 * ada-lang.c (ada_completer_word_break_characters): Now a const
8749 array.
8750 (ada_get_gdb_completer_word_break_characters): Constify.
8751 * completer.c (gdb_completer_command_word_break_characters)
8752 (gdb_completer_file_name_break_characters)
8753 (gdb_completer_quote_characters): Now const arrays.
8754 (get_gdb_completer_quote_characters): Constify.
8755 (set_rl_completer_word_break_characters): New function.
8756 (set_gdb_completion_word_break_characters)
8757 (complete_line_internal): Use it.
8758 * completer.h (get_gdb_completer_quote_characters): Constify.
8759 (set_rl_completer_word_break_characters): Declare.
8760 * f-lang.c (f_word_break_characters): Constify.
8761 * language.c (default_word_break_characters): Constify.
8762 * language.h (language_defn::la_word_break_characters): Constify.
8763 (default_word_break_characters): Constify.
8764 * top.c (init_main): Use set_rl_completer_word_break_characters.
8765
7a114964
PA
87662017-04-05 Pedro Alves <palves@redhat.com>
8767
8768 * aix-thread.c (aix_thread_pid_to_str)
8769 (aix_thread_extra_thread_info): Constify.
8770 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8771 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8772 (bsd_uthread_pid_to_str): Constify.
8773 * corelow.c (core_pid_to_str): Constify.
8774 * darwin-nat.c (darwin_pid_to_str): Constify.
8775 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8776 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8777 Constify.
8778 * gnu-nat.c (gnu_pid_to_str): Constify.
8779 * go32-nat.c (go32_pid_to_str): Constify.
8780 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8781 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8782 * inferior.c (inferior_pid_to_str): Constify.
8783 * linux-nat.c (linux_nat_pid_to_str): Constify.
8784 * linux-tdep.c (linux_core_pid_to_str): Constify.
8785 * linux-thread-db.c (thread_db_pid_to_str)
8786 (thread_db_extra_thread_info): Constify.
8787 * nto-tdep.c (nto_extra_thread_info): Constify.
8788 * nto-tdep.h (nto_extra_thread_info): Constify.
8789 * obsd-nat.c (obsd_pid_to_str): Constify.
8790 * procfs.c (procfs_pid_to_str): Constify.
8791 * ravenscar-thread.c (ravenscar_extra_thread_info)
8792 (ravenscar_pid_to_str): Constify.
8793 * remote-sim.c (gdbsim_pid_to_str): Constify.
8794 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8795 Constify.
8796 * sol-thread.c (solaris_pid_to_str): Constify.
8797 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8798 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8799 * target.c (default_pid_to_str, target_pid_to_str)
8800 (normal_pid_to_str, default_pid_to_str): Constify.
8801 * target.h (target_ops::to_pid_to_str)
8802 (target_ops::to_extra_thread_info): Constify.
8803 (target_pid_to_str, normal_pid_to_str): Constify.
8804 * windows-nat.c (windows_pid_to_str): Constify.
8805 * gdbarch.sh (core_pid_to_str): Constify.
8806 * target-delegates.c: Regenerate.
8807 * gdbarch.h, gdbarch.c: Regenerate.
8808
69bbf465
PA
88092017-04-05 Pedro Alves <palves@redhat.com>
8810
8811 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8812 the memory of the temporary warning_pre_print override.
8813 * utils.c (warning_pre_print): Constify.
8814 * utils.h (warning_pre_print): Constify.
8815
be47f9e8
PA
88162017-04-05 Pedro Alves <palves@redhat.com>
8817
8818 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8819 (shell_command): New function.
8820 (make_command): Use std::string.
8821 (init_cli_cmds): Register shell_command instead of shell_escape.
8822
bde6261a
PA
88232017-04-05 Pedro Alves <palves@redhat.com>
8824
8825 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8826 * tracepoint.c (default_collect): Don't initialize.
8827
b38ef47f
PA
88282017-04-05 Pedro Alves <palves@redhat.com>
8829
8830 * macroexp.c (macro_buffer::shared): Now a bool.
8831 (init_buffer): Update.
8832 (init_shared_buffer): Constify 'addr' parameter.
8833 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8834 casts.
8835
f995bbe8
PA
88362017-04-05 Pedro Alves <palves@redhat.com>
8837
8838 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8839 * disasm.c (set_disassembler_options): Constify local.
8840 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8841
4a596fe2
SDJ
88422017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8843
8844 PR gdb/21352
8845 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8846 option.
8847
2cad08ea
YQ
88482017-04-05 Yao Qi <yao.qi@linaro.org>
8849
8850 * frame.c (frame_unwind_register_unsigned): Call
8851 frame_unwind_register_value.
8852
55a98976
YQ
88532017-04-05 Yao Qi <yao.qi@linaro.org>
8854
8855 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8856 Use gdb_test_multiple, and don't match anchor.
8857
4ac40124
PA
88582017-04-05 Pedro Alves <palves@redhat.com>
8859
8860 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8861 (Write After Approval): Remove Simon Marchi.
8862
c053b654
PA
88632017-04-05 Pedro Alves <palves@redhat.com>
8864
8865 * common/gdb_optional.h (optional::optional): Make constexpr and
8866 initialize m_dummy.
8867
4c7bf4f9
JB
88682017-04-04 John Baldwin <jhb@FreeBSD.org>
8869
8870 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8871 (amd64fbsd_jmp_buf_reg_offset): Remove.
8872 (amd64fbsd_supply_uthread): Remove function.
8873 (amd64fbsd_collect_uthread): Remove function.
8874 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8875 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8876 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8877 (fbsd-nat.c): Update comment.
8878 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8879 (i386fbsd_jmp_buf_reg_offset): Remove.
8880 (i386fbsd_supply_uthread): Remove function.
8881 (i386fbsd_collect_uthread): Remove function.
8882 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8883
1e1a8bef
JB
88842017-04-04 John Baldwin <jhb@FreeBSD.org>
8885
8886 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8887 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8888 * NEWS: Mention that support for FreeBSD/alpha was removed.
8889 * alpha-fbsd-tdep.c: Delete file.
8890 * config/alpha/fbsd.mh: Delete file.
8891 * configure.host: Delete alpha*-*-freebsd* and
8892 alpha*-*-kfreebsd*-gnu.
8893 * configure.tgt: Delete alpha*-*-freebsd* and
8894 alpha*-*-kfreebsd*-gnu.
8895
49907934
JB
88962017-04-04 John Baldwin <jhb@FreeBSD.org>
8897
8898 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8899 amd64bsd_store_inferior_registers): Use ptid from regcache.
8900
6f77053d
PA
89012017-04-04 Pedro Alves <palves@redhat.com>
8902
8903 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8904 data fields, make them private and add "m_" prefixes.
8905 (lnp_state_machine::lnp_state_machine): New ctor.
8906 (record_line, check_line_address, handle_set_discriminator)
8907 (handle_set_address, handle_advance_pc, handle_special_opcode)
8908 (handle_advance_line, handle_set_file, handle_negate_stmt)
8909 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8910 (end_sequence, advance_line): New methods.
8911 (m_gdbarch, m_record_lines_p): New fields.
8912 (lnp_reader_state): Delete.
8913 (dwarf_record_line): Rename to ...
8914 (lnp_state_machine::record_line): ... adjust.
8915 (init_lnp_state_machine): Delete.
8916 (lnp_state_machine::lnp_state_machine): New.
8917 (check_line_address): Rename to ...
8918 (lnp_state_machine::check_line_address): This.
8919 (dwarf_decode_lines_1): Remove reference to "reader_state".
8920 Adjust lnp_state_machine having a non-default ctor. Use bool.
8921 State machine internal state manipulation moved to
8922 lnp_state_machine methods.
8923
9c541725
PA
89242017-04-04 Pedro Alves <palves@redhat.com>
8925
8926 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8927 unittests/offset-type-selftests.c.
8928 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8929 * common/offset-type.h: New file.
8930 * common/preprocessor.h: New file.
8931 * common/traits.h: New file.
8932 * common/valid-expr.h: New file.
8933 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8934 sect_offset and cu_offset strong typedefs throughout.
8935 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8936 typedefs throughout.
8937 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8938 sect_offset and cu_offset strong typedefs throughout.
8939 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8940 typedefs throughout.
8941 * gdbtypes.h: Include "common/offset-type.h".
8942 (cu_offset): Now an offset type (strong typedef) instead of a
8943 struct.
8944 (sect_offset): Likewise.
8945 (union call_site_parameter_u): Rename "param_offset" field to
8946 "param_cu_off".
8947 * unittests/offset-type-selftests.c: New file.
8948
ecfb656c
PA
89492017-04-04 Pedro Alves <palves@redhat.com>
8950
8951 * common/underlying.h: New file.
8952 * dwarf2read.c: Include "common/gdb_optional.h" and
8953 "common/underlying.h".
8954 (dir_index, file_name_index): New types.
8955 (file_entry): Use them.
8956 (file_entry::include): Use to_underlying.
8957 (line_header::add_file_name): Use dir_index.
8958 (read_formatted_entries): Use gdb::optional. Read form before
8959 writting to file_entry.
8960 (dwarf_decode_line_header): Use dir_index.
8961 (lnp_state_machine::current_file): Use to_underlying.
8962 (lnp_state_machine::file): Change type to file_name_index.
8963 (dwarf_record_line): Use to_underlying.
8964 (init_lnp_state_machine): Use file_name_index.
8965 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8966
d194f1fe
PA
89672017-04-04 Pedro Alves <palves@redhat.com>
8968
8969 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8970 operator bool, has_value and get methods.
8971
fff8551c
PA
89722017-04-04 Pedro Alves <palves@redhat.com>
8973
8974 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8975 fields.
8976 (line_header): Initialize all data fields. Change type of
8977 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8978 Change type of include_dirs to std::vector<const char *>. Remove
8979 num_include_dirs, include_dirs_size. Change type of file_names to
8980 std::vector<file_entry>. Remove num_file_names, file_names_size.
8981 (line_header::line_header): New.
8982 (line_header::add_include_dir, line_header::add_file_name): New
8983 methods.
8984 (line_header::include_dir_at): Remove NULL check.
8985 (line_header::file_name_at): Add const overload.
8986 (line_header_up): New unique_ptr typedef.
8987 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8988 std::vector. Remove free_line_header call.
8989 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8990 free_line_header call.
8991 (free_cu_line_header): Delete.
8992 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8993 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8994 Adjust to use std::vector.
8995 (free_line_header): Delete.
8996 (free_line_header_voidp): Use delete.
8997 (add_include_dir): Replace with ...
8998 (line_header::add_include_dir): ... this method. Use std::vector.
8999 (add_file_name): Replace with ...
9000 (line_header::add_file_name): ... this method. Use std::vector.
9001 (add_include_dir_stub): Delete.
9002 (read_formatted_entries): Remove memset.
9003 (dwarf_decode_line_header): Return a line_header_up instead of a
9004 raw pointer. Remove cleanup handling. Pass lambdas to
9005 read_formatted_entries. Adjust to use line_header methods.
9006 (dwarf_decode_lines_1): Adjust to use line_header methods.
9007 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9008 use std::vector.
9009
d62a8ae2
SM
90102017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
9011
9012 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9013 instead of struct ptid.
9014
db3a1dc7
AH
90152017-05-04 Alan Hayward <alan.hayward@arm.com>
9016
9017 * frame.c (get_frame_register_bytes): Unwind using value.
9018 (put_frame_register_bytes): Likewise.
9019
b1b45502
IB
90202017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
9021
9022 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9023 aggregate-like.
9024
ec13808e
JK
90252017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
9026
9027 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9028
12316564
YQ
90292017-03-29 Yao Qi <yao.qi@linaro.org>
9030
9031 * gdbthread.h (struct thread_info): Declare constructor and
9032 destructor. Add some in-class member initializers.
9033 * thread.c (free_thread): Remove.
9034 (init_thread_list): Call delete instead of free_thread.
9035 (new_thread): Call thread_info constructor.
9036 (thread_info::thread_info): New function.
9037 (thread_info::~thread_info): New function.
9038 (delete_thread_1): Call delete instead of free_thread.
9039 (make_cleanup_restore_current_thread): Move tp and frame to
9040 inner block.
9041
fe5f7374
AK
90422017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9043
9044 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9045 (arc_skip_prologue): Likewise.
9046 (arc_make_frame_cache): Likewise.
9047 (arc_pv_get_operand): New function.
9048 (arc_is_in_prologue): Likewise.
9049 (arc_analyze_prologue): Likewise.
9050 (arc_print_frame_cache): Likewise.
9051 (MAX_PROLOGUE_LENGTH): New constant.
9052
eea78757
AK
90532017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9054
9055 * configure.tgt: Add arc-insn.o.
9056 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9057 (dump_arc_instruction_command): New function.
9058 (arc_fprintf_disasm): Likewise.
9059 (arc_disassemble_info): Likewise.
9060 (arc_insn_get_operand_value): Likewise.
9061 (arc_insn_get_operand_value_signed): Likewise.
9062 (arc_insn_get_memory_base_reg): Likewise.
9063 (arc_insn_get_memory_offset): Likewise.
9064 (arc_insn_get_branch_target): Likewise.
9065 (arc_insn_dump): Likewise.
9066 (arc_insn_get_linear_next_pc): Likewise.
9067 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9068 (arc_disassemble_info): Likewise.
9069 (arc_insn_get_branch_target): Likewise.
9070 (arc_insn_get_linear_next_pc): Likewise.
9071 * NEWS: Mention new "maint print arc arc-instruction".
9072
3be78afd
AK
90732017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9074
9075 * arc-tdep (maintenance_print_arc_list): New variable.
9076 (maintenance_print_arc_command): New function.
9077
296ec4fa
AK
90782017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9079
9080 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9081 Add "limm" and "reserved".
9082 (arc_cannot_fetch_register, arc_cannot_store_register): Add
9083 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9084 * arc-tdep.h (arc_regnum): Likewise.
9085
f74f865e
MF
90862017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9087
9088 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9089 for THREADPTR register.
9090 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9091 register.
9092 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9093 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9094 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9095
0d0bf81a
MF
90962017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9097
9098 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9099 registers above gdbarch_num_regs (gdbarch) as privileged in
9100 call0 ABI.
9101
0ce4291e
MF
91022017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9103
9104 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9105 for a single specified register or for all registers in
9106 a0_base..a0_base + C0_NREGS range.
9107 (supply_gregset_reg): Call regcache_raw_supply for a single
9108 specified register or for all registers in a0_base..a0_base +
9109 C0_NREGS range.
9110
c56054f9
MF
91112017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9112
9113 * arch/xtensa.h (C0_NREGS): Add definition.
9114 * xtensa-tdep.c (C0_NREGS): Remove definition.
9115
a4398628
MF
91162017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9117
9118 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9119 Drop xtensa_default_isa initialization.
9120 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9121
8c43009f
PA
91222017-03-27 Pedro Alves <palves@redhat.com>
9123
9124 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9125 (file_entry::include_dir): New method.
9126 (line_header::include_dir_at, line_header::file_name_at): New
9127 methods.
9128 (setup_type_unit_groups, setup_type_unit_groups)
9129 (psymtab_include_file_name): Simplify using the new methods.
9130 (lnp_state_machine) <the_line_header>: New field.
9131 <file>: Add comment.
9132 (lnp_state_machine::current_file): New method.
9133 (dwarf_record_line): Simplify using the new methods.
9134 (init_lnp_state_machine): Initialize the "the_line_header" field.
9135 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9136 Simplify using the new methods.
9137
a7e80b9e
PA
91382017-03-27 Pedro Alves <palves@redhat.com>
9139
9140 * cp-name-parser.y (make_empty): Delete.
9141 (demangler_special, nested_name, ptr_operator, array_indicator)
9142 (direct_declarator, declarator_1): Use fill_comp instead of
9143 make_empty.
9144
21047726
PA
91452017-03-27 Pedro Alves <palves@redhat.com>
9146
9147 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9148 to ATTRIBUTE_PRINTF.
9149 * solib-target.c (library_list_start_list): Print "string" not
9150 "version".
9151 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9152 gdb_xml_error call.
9153
d721ba37
PA
91542017-03-27 Pedro Alves <palves@redhat.com>
9155
9156 * dwarf2read.c (struct file_and_directory): New.
9157 (dwarf2_get_dwz_file): Adjust to use std::string.
9158 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9159 (find_file_and_directory): Adjust to return a file_and_directory
9160 object.
9161 (read_file_scope): Adjust to use file_and_directory. Remove
9162 make_cleanup/do_cleanups calls.
9163 (open_and_init_dwp_file): Adjust to use std::string. Remove
9164 make_cleanup/do_cleanups calls.
9165 * python/python.c (do_start_initialization): Adjust to ldirname
9166 returning a std::string.
9167 * utils.c (ldirname): Now returns a std::string.
9168 * utils.h (ldirname): Change return type to std::string.
9169 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9170 returning a std::string.
9171 * xml-tdesc.c (file_read_description_xml): Likewise.
9172
ed771251
AH
91732017-03-24 Alan Hayward <alan.hayward@arm.com>
9174
9175 * regcache.c (regcache_debug_print_register): New function.
9176 * regcache.h (regcache_debug_print_register): New declaration.
9177 * target.c (debug_print_register): Remove.
9178 (target_fetch_registers): Call regcache_debug_print_register.
9179 (target_store_registers): Likewise.
9180
568c1b9f
PB
91812017-03-24 Pádraig Brady <pbrady@fb.com>
9182
9183 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9184 reference beyond the 'lh->include_dirs' array before accessing to
9185 it.
9186 (psymtab_include_file_name): Likewise.
9187 (dwarf_decode_lines_1): Likewise.
9188 (dwarf_decode_lines): Likewise.
9189 (file_file_name): Likewise.
9190
3e00d44f
SM
91912017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9192
9193 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9194 inferior_ptid.
9195 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9196 ps_lsetfpregs): Likewise.
9197 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9198 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9199 ps_lsetfpregs): Likewise.
9200 * target.c (target_fetch_registers, target_store_registers):
9201 Remove asserts.
9202
077ae656
AH
92032017-03-23 Alan Hayward <alan.hayward@arm.com>
9204
9205 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9206
1e2b521d
YQ
92072017-03-23 Yao Qi <yao.qi@linaro.org>
9208
9209 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9210 (_initialize_aarch64_tdep): Register it.
9211 (aarch64_record_load_store): Handle PRFM instruction.
9212 (aarch64_process_record_test): New function.
9213
33877125
YQ
92142017-03-23 Yao Qi <yao.qi@linaro.org>
9215
9216 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9217 indentation.
9218
a0eef940
YQ
92192017-03-23 Yao Qi <yao.qi@linaro.org>
9220
9221 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9222
3f2a3564
PR
92232017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9224
9225 python/python.c (do_start_initialization): Fix memory leak.
9226
b67aeab0
SM
92272017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9228
9229 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9230 using get_ptrace_pid.
9231 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9232 inferior_ptid.
9233 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9234 inferior_ptid instead of pid.
9235
ffdbe864
YQ
92362017-03-22 Yao Qi <yao.qi@linaro.org>
9237
9238 * aarch64-tdep.c: Wrap locally used classes in anonymous
9239 namespace.
9240 * arm-tdep.c: Likewise.
9241 * linespec.c: Likewise.
9242 * ui-out.c: Likewise.
9243
9d736fbf
JG
92442017-03-22 Jonah Graham <jonah@kichwacoders.com>
9245
9246 PR gdb/19637
9247 * python/lib/gdb/printer/bound_registers.py: Import sys.
9248
3de88e9a
SM
92492017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9250
9251 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9252 windows_thread_info parameter and use it instead of
9253 current_thread.
9254 (windows_fetch_inferior_registers): Don't set current_thread,
9255 pass the thread to do_windows_fetch_inferior_registers. Use
9256 ptid from regcache instead of inferior_ptid.
9257 (do_windows_store_inferior_registers): Add windows_thread_info
9258 parameter and use it instead of current_thread.
9259 (windows_store_inferior_registers): Don't set current_thread,
9260 pass the thread to do_windows_store_inferior_registers. Use
9261 ptid from regcache instead of inferior_ptid.
9262
0e7b8f61
SM
92632017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9264
9265 * ser-mingw.c (ser_windows_raw): Remove reference to
9266 struct serial::current_timeout.
9267
5badf10a
IR
92682017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9269
9270 PR tdep/20928
9271 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9272 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9273 (sparc64_fsr_type): Fix %fsr decoding.
9274
cee59b3f
TW
92752017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9276
9277 * python/py-record-btrace.c (btpy_insn_data): Change return type
9278 for Python 2.
9279
639a9038
SM
92802017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9281
9282 * spu-linux-nat.c (spu_fetch_inferior_registers,
9283 spu_store_inferior_registers): Use ptid from regcache, set and
9284 restore inferior_ptid.
9285 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9286 Likewise.
9287
bcc0c096
SM
92882017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9289
9290 * i386-linux-nat.c (fetch_register, store_register,
9291 i386_linux_fetch_inferior_registers,
9292 i386_linux_store_inferior_registers): Use ptid from regcache.
9293 * ia64-linux-nat.c (ia64_linux_fetch_register,
9294 ia64_linux_store_register): Likewise.
9295 * inf-ptrace.c (inf_ptrace_fetch_register,
9296 inf_ptrace_store_register): Likewise.
9297 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9298 m32r_linux_store_inferior_registers): Likewise.
9299 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9300 m68kbsd_store_inferior_registers): Likewise.
9301 * m68k-linux-nat.c (fetch_register, store_register,
9302 m68k_linux_fetch_inferior_registers,
9303 m68k_linux_store_inferior_registers): Likewise.
9304 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9305 m88kbsd_store_inferior_registers): Likewise.
9306 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9307 mips_fbsd_store_inferior_registers): Likewise.
9308 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9309 mips64_linux_regsets_store_registers): Likewise.
9310 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9311 mipsnbsd_store_inferior_registers): Likewise.
9312 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9313 mips64obsd_store_inferior_registers): Likewise.
9314 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9315 Likewise.
9316 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9317 ppcfbsd_store_inferior_registers): Likewise.
9318 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9319 ppc_linux_store_inferior_registers): Likewise.
9320 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9321 ppcnbsd_store_inferior_registers): Likewise.
9322 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9323 ppcobsd_store_registers): Likewise.
9324 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9325 Likewise.
9326 * ravenscar-thread.c (ravenscar_fetch_registers,
9327 ravenscar_store_registers, ravenscar_prepare_to_store):
9328 Likewise.
9329 * record-btrace.c (record_btrace_fetch_registers,
9330 record_btrace_store_registers, record_btrace_prepare_to_store):
9331 Likewise.
9332 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9333 Lookup inferior using ptid from regcache, instead of
9334 current_inferior.
9335 * remote.c (remote_fetch_registers, remote_store_registers): Use
9336 ptid from regcache.
9337 * rs6000-nat.c (fetch_register, store_register): Likewise.
9338 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9339 s390_linux_store_inferior_registers): Likewise.
9340 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9341 shnbsd_store_inferior_registers): Likewise.
9342 * sol-thread.c (sol_thread_fetch_registers,
9343 sol_thread_store_registers): Likewise.
9344 * sparc-nat.c (sparc_fetch_inferior_registers,
9345 sparc_store_inferior_registers): Likewise.
9346 * tilegx-linux-nat.c (fetch_inferior_registers,
9347 store_inferior_registers): Likewise.
9348 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9349 vaxbsd_store_inferior_registers): Likewise.
9350 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9351 store_xtregs): Likewise.
9352
c0f55cc6
AV
93532017-03-20 Artemiy Volkov <artemiyv@acm.org>
9354
9355 PR gdb/14441
9356 * NEWS: Mention support for rvalue references in GDB and python.
9357 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9358 supports both lvalue and rvalue references.
9359
15c0a2a9
AV
93602017-03-20 Artemiy Volkov <artemiyv@acm.org>
9361
9362 PR gdb/14441
9363 * gdbtypes.c (rank_one_type): Implement overloading
9364 resolution rules regarding rvalue references.
9365
aa006118
AV
93662017-03-20 Artemiy Volkov <artemiyv@acm.org>
9367
9368 PR gdb/14441
9369 * aarch64-tdep.c (aarch64_type_align)
9370 (aarch64_extract_return_value, aarch64_store_return_value): Change
9371 lvalue reference type checks to general reference type checks.
9372 * amd64-tdep.c (amd64_classify): Likewise.
9373 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9374 Likewise.
9375 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9376 (arm_store_return_value): Likewise.
9377 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9378 * c-typeprint.c (c_print_type): Likewise.
9379 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9380 (cplus_number_of_children, cplus_describe_child): Likewise.
9381 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9382 * completer.c (expression_completer): Likewise.
9383 * cp-support.c (make_symbol_overload_list_adl_namespace):
9384 Likewise.
9385 * darwin-nat-info.c (info_mach_region_command): Likewise.
9386 * dwarf2loc.c (entry_data_value_coerce_ref)
9387 (value_of_dwarf_reg_entry): Likewise.
9388 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9389 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9390 Likewise.
9391 * findvar.c (extract_typed_address, store_typed_address):
9392 Likewise.
9393 * gdbtypes.c (rank_one_type): Likewise.
9394 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9395 * infcall.c (value_arg_coerce): Likewise.
9396 * language.c (pointer_type): Likewise.
9397 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9398 Likewise.
9399 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9400 * mn10300-tdep.c (mn10300_type_align): Likewise.
9401 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9402 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9403 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9404 Likewise.
9405 * printcmd.c (print_formatted, x_command): Likewise.
9406 * python/py-type.c (typy_get_composite, typy_template_argument):
9407 Likewise.
9408 * python/py-value.c (valpy_referenced_value)
9409 (valpy_get_dynamic_type, value_has_field): Likewise.
9410 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9411 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9412 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9413 * spu-tdep.c (spu_scalar_value_p): Likewise.
9414 * symtab.c (lookup_symbol_aux): Likewise.
9415 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9416 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9417 Likewise.
9418 * valops.c (value_cast_pointers, value_cast)
9419 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9420 (value_struct_elt, value_struct_elt_bitpos)
9421 (value_find_oload_method_list, find_overload_match)
9422 (value_rtti_indirect_type): Likewise.
9423 * valprint.c (val_print_scalar_type_p, generic_val_print):
9424 Likewise.
9425 * value.c (value_actual_type, value_as_address, unpack_long)
9426 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9427 (coerce_ref): Likewise.
9428 * varobj.c (varobj_get_value_type): Likewise.
9429
3fcf899d
AV
94302017-03-20 Artemiy Volkov <artemiyv@acm.org>
9431
9432 PR gdb/14441
9433 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9434 table of constants.
9435 * python/lib/gdb/command/explore.py: Support exploring values
9436 of rvalue reference types.
9437 * python/lib/gdb/types.py: Implement get_basic_type() for
9438 rvalue reference types.
9439 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9440 constant.
9441 * python/py-value.c (valpy_getitem): Add an rvalue reference
9442 check.
9443 (valpy_reference_value): Add new parameter "refcode".
9444 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9445 New wrappers for valpy_reference_value().
9446 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9447 (gdbpy_invoke_xmethod): Likewise.
9448
4297a3f0
AV
94492017-03-20 Artemiy Volkov <artemiyv@acm.org>
9450
9451 PR gdb/14441
9452 * dwarf2read.c (process_die, read_type_die_1): Handle the
9453 DW_TAG_rvalue_reference_type DIE.
9454 (read_tag_reference_type): Add new parameter "refcode".
9455
e1cb3213
AV
94562017-03-20 Artemiy Volkov <artemiyv@acm.org>
9457
9458 PR gdb/14441
9459 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9460 (c_type_print_modifier, c_type_print_varspec_suffix)
9461 (c_type_print_base): Support printing rvalue reference types.
9462 * c-valprint.c (c_val_print, c_value_print): Support printing
9463 rvalue reference values.
9464
e4347c89
AV
94652017-03-20 Artemiy Volkov <artemiyv@acm.org>
9466
9467 PR gdb/14441
9468 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9469 typename.
9470 * cp-support.c (replace_typedefs): Handle
9471 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9472 * python/py-type.c (typy_lookup_type): Likewise.
9473
53cc15f5
AV
94742017-03-20 Artemiy Volkov <artemiyv@acm.org>
9475
9476 PR gdb/14441
9477 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9478 * parse.c (insert_type): Change assert statement.
9479 (follow_types): Handle rvalue reference types.
9480 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9481 constant.
9482
a65cfae5
AV
94832017-03-20 Artemiy Volkov <artemiyv@acm.org>
9484
9485 PR gdb/14441
9486 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9487 value_ref() interface.
9488 * c-valprint.c (c_value_print): Likewise.
9489 * infcall.c (value_arg_coerce): Likewise.
9490 * python/py-value.c (valpy_reference_value): Likewise.
9491 * valops.c (value_cast, value_reinterpret_cast)
9492 (value_dynamic_cast, typecmp): Likewise.
9493 (value_ref): Parameterize by kind of return value reference type.
9494 * value.h (value_ref): Add new parameter "refcode".
9495
3b224330
AV
94962017-03-20 Artemiy Volkov <artemiyv@acm.org>
9497
9498 PR gdb/14441
9499 * dwarf2read.c (read_tag_reference_type): Use
9500 lookup_lvalue_reference_type() instead of lookup_reference_type().
9501 * eval.c (evaluate_subexp_standard): Likewise.
9502 * f-exp.y: Likewise.
9503 * gdbtypes.c (make_reference_type, lookup_reference_type):
9504 Generalize with rvalue reference types.
9505 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9506 convenience wrappers for lookup_reference_type().
9507 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9508 reference kind parameter.
9509 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9510 wrappers for lookup_reference_type().
9511 * guile/scm-type.c (gdbscm_type_reference): Use
9512 lookup_lvalue_reference_type() instead of lookup_reference_type().
9513 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9514 * parse.c (follow_types): Likewise.
9515 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9516 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9517 Likewise.
9518 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9519 (gdbpy_invoke_xmethod): Likewise.
9520 * stabsread.c: Provide extra argument to make_reference_type()
9521 call.
9522 * valops.c (value_ref, value_rtti_indirect_type): Use
9523 lookup_lvalue_reference_type() instead of lookup_reference_type().
9524
f9aeb8d4
AV
95252017-03-20 Artemiy Volkov <artemiyv@acm.org>
9526
9527 PR gdb/14441
9528 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9529 (TYPE_IS_REFERENCE): New macro.
9530 (struct type): Add rvalue_reference_type field.
9531 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9532
51457a05
MAL
95332017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9534
9535 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9536 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9537 New function definition.
9538 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9539 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9540 New function declaration.
9541 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9542 * mi/mi-interp.h: New file.
9543 * solib.c (info_sharedlibrary_command): Replace for loop with
9544 ALL_SO_LIBS macro
9545 * solib.h (update_solib_list): New function declaration.
9546 (so_list_head): Move macro.
9547 * solist.h (ALL_SO_LIBS): New macro.
9548
e696b3ad
MAL
95492017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9550
9551 * infcmd.c (post_create_inferior): Remove unused argument in
9552 call to solib_add.
9553 * remote.c (remote_start_remote): Likewise.
9554 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9555 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9556 (enable_break): Likewise.
9557 * solib.c (update_solib_list): Remove unused target argument
9558 and its documentation.
9559 (solib_add): Remove unused target argument. Remove unused
9560 argument in call to update_solib_list.
9561 (info_sharedlibrary_command): Remove unused argument in call
9562 to update_solib_list.
9563 (sharedlibrary_command): Remove unused argument in call to
9564 solib_add.
9565 (handle_solib_event): Likewise.
9566 (reload_shared_libraries): Likewise.
9567 * solib.h (solib_add): Remove unused target argument.
9568
dcb84eda
AA
95692017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9570
9571 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9572 (s390_displaced_step_fixup): Cover relative branches with the
9573 default fixup handling. This fixes lack of support for some
9574 relative branch instructions.
9575
d9cb6cdc
SM
95762017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9577
9578 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9579 ptid from regcache.
9580
1afaf9f4
SM
95812017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9582
9583 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9584 i386_darwin_store_inferior_registers): Use ptid from regcache.
9585
aac12e24
SM
95862017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9587
9588 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9589 i386bsd_store_inferior_registers): Use ptid from regcache.
9590
bbe1eef1
SM
95912017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9592
9593 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9594 hppaobsd_store_registers): Use ptid from regcache.
9595
10799020
SM
95962017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9597
9598 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9599 hppanbsd_store_registers): Use ptid from regcache.
9600
00204cf7
SM
96012017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9602
9603 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9604 from regcache. Use get_ptrace_pid.
9605
11a33714
SM
96062017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9607
9608 * corelow.c (get_core_register_section): Use ptid from regcache,
9609 update doc.
9610
317cd492
SM
96112017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9612
9613 * bsd-uthread.c (bsd_uthread_fetch_registers,
9614 bsd_uthread_store_registers): Use ptid from regcache, set and
9615 restore inferior_ptid.
9616
9ac8a7c2
SM
96172017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9618
9619 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9620 fetch_fp_regs, store_register, store_regs, store_fp_register,
9621 store_fp_regs): Use ptid from regcache.
9622
4ac4bb6a
SM
96232017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9624
9625 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9626 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9627 store_vfp_regs): Use ptid from regcache.
9628
9bcbdca8
PA
96292017-03-17 Pedro Alves <palves@redhat.com>
9630
9631 PR remote/21188
9632 * ser-base.c (ser_base_wait_for): Add comment.
9633 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9634 version.
9635 * ser-unix.c (hardwire_raw): Remove reference to
9636 scb->current_timeout.
9637 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9638 (hardwire_ops): Install ser_base_readchar instead of
9639 hardwire_readchar.
9640 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9641 Remove fields.
9642
7503099f
JG
96432017-03-17 Jonah Graham <jonah@kichwacoders.com>
9644
9645 PR gdb/19637
9646 * python/lib/gdb/printer/bound_registers.py: Add support for
9647 Python 3.
9648
7942e96e
AA
96492017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9650
9651 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9652 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9653 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9654 byte_offset to subobj_byte_offset. Fix the handling of
9655 DWARF_VALUE_STACK on big-endian targets when coming via an
9656 implicit pointer.
9657 (dwarf2_evaluate_loc_desc): Adjust call to
9658 dwarf2_evaluate_loc_desc_full.
9659 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9660 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9661
ba14f379
YQ
96622017-03-16 Yao Qi <yao.qi@linaro.org>
9663
9664 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9665 and REVSH instructions.
9666
b121eeb9
YQ
96672017-03-16 Yao Qi <yao.qi@linaro.org>
9668
9669 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9670 (arm_record_test): Declare.
9671 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9672 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9673 align with the manual.
9674 (thumb_record_misc): Adjust the code order to align with the
9675 manual.
9676 (thumb2_record_decode_insn_handler): Fix instruction matching.
9677 (instruction_reader_thumb): New class.
9678 (arm_record_test): New function.
9679
728a7913
YQ
96802017-03-16 Yao Qi <yao.qi@linaro.org>
9681
9682 * arm-tdep.c (abstract_memory_reader): New class.
9683 (instruction_reader): New class.
9684 (extract_arm_insn): Add argument 'reader'. Callers updated.
9685 (decode_insn): Likewise.
9686
34b43320
DE
96872017-03-16 Doug Evans <dje@google.com>
9688
a7c0469f
DE
9689 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9690 member. Change type of TYPE member to SCM. All uses updated.
9691 (lsscm_make_lazy_string_smob): Add assert.
9692 (lsscm_make_lazy_string): Flag bad length values.
9693 (lsscm_elt_type): New function.
9694 (gdbscm_lazy_string_to_value): Rewrite to use
9695 lsscm_safe_lazy_string_to_value.
9696 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9697 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9698 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9699 in incoming type.
9700 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9701 * guile/scm-type.c (tyscm_scm_to_type): New function.
9702
97032017-03-15 Doug Evans <dje@google.com>
9704
34b43320
DE
9705 PR python/17728, python/18439, python/18779
9706 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9707 member. Change type of TYPE member to PyObject *. All uses updated.
9708 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9709 (gdbpy_create_lazy_string_object): Flag bad length values.
9710 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9711 Handle typedefs in incoming type.
9712 (stpy_lazy_string_elt_type): New function.
9713 (gdbpy_extract_lazy_string): Call it.
9714 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9715 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9716 typedefs in incoming type.
9717
a3a5fecc
DE
97182017-03-16 Doug Evans <dje@google.com>
9719
9720 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9721 * guile/scm-type.c (tyscm_scm_to_type): New function.
9722
28f1c605
JW
97232017-03-16 Jiong Wang <jiong.wang@arm.com>
9724
9725 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9726 "ULONGEST" for "skip".
9727
87c336f6
AA
97282017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9729
9730 PR gdb/21220
9731 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9732 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9733 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9734 over ptrace peek/poke until end of buffer or error.
9735
cf81cf60
SM
97362017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9737
9738 * parse.c (length_of_subexp): Make static.
9739 * parser-defs.h (length_of_subexp): Remove.
9740
a379284a
AA
97412017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9742
9743 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9744 as well.
9745
8a6200ba
PA
97462017-03-14 Pedro Alves <palves@redhat.com>
9747
9748 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9749 (main): Use std::unique_ptr. Remove calls to
9750 cp_demangled_name_parse_free.
9751
f79ec206
SM
97522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9753
9754 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9755 alphabsd_store_inferior_registers): Use regcache->ptid instead
9756 of inferior_ptid.
9757
edb5fb00
SM
97582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9759
9760 * aix-thread.c (aix_thread_fetch_registers,
9761 aix_thread_store_registers): Use regcache->ptid instead of
9762 inferior_ptid.
9763
55119686
SM
97642017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9765
9766 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9767 store_gregs_to_thread, fetch_fpregs_from_thread,
9768 store_fpregs_to_thread): Use regcache->ptid instead of
9769 inferior_ptid.
9770
6a06fbb7
SM
97712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9772
9773 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9774 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9775 instead of inferior_ptid.
9776
c6386875
SM
97772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9778
9779 * target.c (target_fetch_registers, target_store_registers): Add
9780 assert.
9781
ddaaf0fb
SM
97822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9783
9784 * regcache.h (regcache_get_ptid): New function.
9785 * regcache.c (regcache_get_ptid): New function.
9786
b9da89d1 97872017-03-13 Mark Wielaard <mark@klomp.org>
9788
9789 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9790
5f4d1085
KS
97912017-03-10 Keith Seitz <keiths@redhat.com>
9792
9793 PR c++/8218
9794 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9795
c65d6b55
PA
97962017-03-08 Pedro Alves <palves@redhat.com>
9797
9798 PR gdb/18360
9799 * infrun.c (start_step_over, do_target_resume, resume)
9800 (restart_threads): Assert we're not resuming a thread that is
9801 meant to be stopped.
9802 (infrun_thread_stop_requested_callback): Delete.
9803 (infrun_thread_stop_requested): If the thread is internally
9804 stopped, queue a pending stop event and clear the thread's
9805 inline-frame state.
9806 (handle_stop_requested): New function.
9807 (handle_syscall_event, handle_inferior_event_1): Use
9808 handle_stop_requested.
9809 (handle_stop_requested): New function.
9810 (handle_signal_stop): Set the thread's stop_signal here instead of
9811 at caller.
9812 (finish_step_over): Clear step over info unconditionally.
9813 (handle_signal_stop): If the user had interrupted the event
9814 thread, consider the stop a random signal.
9815 (handle_signal_stop) <signal arrived while stepping over
9816 breakpoint>: Don't restart threads here.
9817 (stop_waiting): Don't clear step-over info here.
9818
15c22686
PA
98192017-03-08 Pedro Alves <palves@redhat.com>
9820
9821 PR 21206
9822 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9823 goes to argument 2, not 1.
9824
6e5d74e7
PA
98252017-03-08 Pedro Alves <palves@redhat.com>
9826
9827 PR cli/21218
9828 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9829 display_gdb_prompt.
9830 (command_line_input): Add comment.
9831
9753a2f6
PA
98322017-03-08 Pedro Alves <palves@redhat.com>
9833
9834 PR tui/21216
9835 * tui/tui-file.c (tui_file::write): New.
9836 * tui/tui-file.h (tui_file): Override "write".
9837 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9838 factored out from ...
9839 (tui_puts): ... here.
9840 (tui_putc): Use them.
9841 (tui_write): New function.
9842 * tui/tui-io.h (tui_write): Declare.
9843
1672e0d9
SDJ
98442017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9845
9846 * Makefile.in (SFILES): Replace "environ.c" with
9847 "common/environ.c".
9848 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9849 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9850 to...
9851 * common/environ.c: ... here.
9852 * environ.h: Moved to...
9853 * common/environ.h: ... here.
9854
f7bb4e3a
PB
98552017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9856
9857 * gdbarch.sh (pstring_ptr): New static function.
9858 (gdbarch_disassembler_options): Use it.
9859 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9860 not valid_disassembler_option->name.
9861 * gdbarch.c: Regenerate.
9862
e45ced6c
PB
98632017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9864
9865 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9866
5f6fd321
PA
98672017-03-07 Pedro Alves <palves@redhat.com>
9868
9869 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9870
6dbb839a 98712017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
9872
9873 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9874 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9875 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 9876 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 9877
d274ecf4
SM
98782017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9879
9880 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9881
df97be55
SM
98822017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9883
9884 * remote.c (remote_add_target_side_commands): Use range-based
9885 for loop.
9886
7d45f3df
YQ
98872017-03-03 Yao Qi <yao.qi@linaro.org>
9888
9889 PR gdb/21165
9890 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9891 value is lazy.
9892 * valprint.c (common_val_print): Likewise.
9893
65b48a81
PB
98942017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9895
9896 * NEWS: Mention new set/show disassembler-options commands.
9897 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9898 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9899 (prospective_options): New static variable.
9900 (gdb_disassembler::gdb_disassembler): Initialize
9901 m_di.disassembler_options.
9902 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9903 (get_disassembler_options): New function.
9904 (set_disassembler_options): Likewise.
9905 (set_disassembler_options_sfunc): Likewise.
9906 (show_disassembler_options_sfunc): Likewise.
9907 (disassembler_options_completer): Likewise.
9908 (_initialize_disasm): Likewise.
9909 * disasm.h (get_disassembler_options): New prototype.
9910 (set_disassembler_options): Likewise.
9911 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9912 (gdbarch_verify_disassembler_options): Likewise.
9913 * gdbarch.c: Regenerate.
9914 * gdbarch.h: Likewise.
9915 * arm-tdep.c (num_disassembly_options): Delete.
9916 (set_disassembly_style): Likewise.
9917 (arm_disassembler_options): New static variable.
9918 (set_disassembly_style_sfunc): Convert short style name into long
9919 option name. Call set_disassembler_options.
9920 (show_disassembly_style_sfunc): New function.
9921 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9922 set_gdbarch_verify_disassembler_options.
9923 (_initialize_arm_tdep): Delete regnames variable and update callers.
9924 (arm_disassembler_options): Initialize.
9925 (disasm_options): New variable.
9926 (num_disassembly_options): Rename from this...
9927 (num_disassembly_styles): ...to this. Compute by scanning through
9928 disasm_options.
9929 (valid_disassembly_styles): Initialize using disasm_options.
9930 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9931 set_arm_regname_option.
9932 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9933 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9934 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9935 set_gdbarch_verify_disassembler_options.
9936 * s390-tdep.c (s390_disassembler_options): New static variable.
9937 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9938 set_gdbarch_verify_disassembler_options.
9939
d538e36d
SM
99402017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9941
9942 * remote.c (remote_add_target_side_condition): Remove "struct"
9943 keyword from range-based for loop.
9944
83621223
SM
99452017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9946
9947 * remote.c (remote_add_target_side_condition): Use range-based
9948 for loop. Update comment.
9949
2123df0e
YQ
99502017-02-27 Yao Qi <yao.qi@linaro.org>
9951
9952 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9953
8e368124
AH
99542017-02-26 Alan Hayward <alan.hayward@arm.com>
9955
9956 * regcache.c (regcache_raw_update): New function.
9957 (regcache_raw_read): Move code to regcache_raw_update.
9958 * regcache.h (regcache_raw_update): New declaration.
9959 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9960
a49dd8dd
JK
99612017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9962
9963 * dwarf2read.c (create_debug_type_hash_table): Initialize
9964 header.signature and header.type_offset_in_tu.
9965
34e4bae9
PA
99662017-02-24 Pedro Alves <palves@redhat.com>
9967
9968 * symtab.c (make_file_symbol_completion_list_1): Use
9969 add_symtab_completions.
9970
b0e4b369
AH
99712017-02-24 Alan Hayward <alan.hayward@arm.com>
9972
9973 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9974
975c21ab
AH
99752017-02-24 Alan Hayward <alan.hayward@arm.com>
9976
9977 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9978 I386_MAX_REGISTER_SIZE.
9979 (i386_pseudo_register_write): Likewise.
9980 (i386_process_record): Likewise.
9981 * i387-tdep.c (i387_supply_xsave): Likewise.
9982 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9983 (store_register): Likewise.
9984
14bc53a8
PA
99852017-02-23 Pedro Alves <palves@redhat.com>
9986
9987 * ada-lang.c: Include "common/function-view.h".
9988 (ada_iterate_over_symbols): Adjust to use function_view as
9989 callback type.
9990 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9991 (ada_make_symbol_completion_list): Use a lambda.
9992 (ada_exc_search_name_matches): Delete.
9993 (name_matches_regex): New.
9994 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9995 * compile/compile-c-support.c: Include "common/function-view.h".
9996 (print_one_macro): Change prototype to accept a ui_file pointer.
9997 (write_macro_definitions): Use a lambda.
9998 * dwarf2read.c: Include "common/function-view.h".
9999 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10000 (dw2_expand_symtabs_matching): Adjust to use function_view as
10001 callback type.
10002 * language.h: Include "common/function-view.h".
10003 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10004 function_view as callback type.
10005 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10006 * linespec.c: Include "common/function-view.h".
10007 (collect_info::add_symbol): New method.
10008 (struct symbol_and_data_callback, iterate_inline_only, struct
10009 symbol_matcher_data, iterate_name_matcher): Delete.
10010 (iterate_over_all_matching_symtabs): Adjust to use function_view
10011 as callback type and lambdas.
10012 (iterate_over_file_blocks): Adjust to use function_view as
10013 callback type.
10014 (decode_compound_collector): Now a class with private fields.
10015 (decode_compound_collector::release_symbols): New method.
10016 (collect_one_symbol): Rename to...
10017 (decode_compound_collector::operator()): ... this and adjust.
10018 (lookup_prefix_sym): decode_compound_collector construction bits
10019 move to decode_compound_collector ctor. Pass the
10020 decode_compound_collector object directly as callback. Remove
10021 cleanups and use decode_compound_collector::release_symbols
10022 instead.
10023 (symtab_collector): Now a class with private fields.
10024 (symtab_collector::release_symtabs): New method.
10025 (add_symtabs_to_list): Rename to...
10026 (symtab_collector::operator()): ... this and adjust.
10027 (collect_symtabs_from_filename): symtab_collector construction
10028 bits move to symtab_collector ctor. Pass the symtab_collector
10029 object directly as callback. Remove cleanups and use
10030 symtab_collector::release_symtabs instead.
10031 (collect_symbols): Delete.
10032 (add_matching_symbols_to_info): Use lambdas.
10033 * macrocmd.c (print_macro_callback): Delete.
10034 (info_macro_command): Use a lambda.
10035 (info_macros_command): Pass print_macro_definition as callable
10036 directly.
10037 (print_one_macro): Remove 'ignore' parameter.
10038 (macro_list_command): Adjust.
10039 * macrotab.c (macro_for_each_data::fn): Now a function_view.
10040 (macro_for_each_data::user_data): Delete field.
10041 (foreach_macro): Adjust to call the function_view.
10042 (macro_for_each): Adjust to use function_view as callback type.
10043 (foreach_macro_in_scope): Adjust to call the function_view.
10044 (macro_for_each_in_scope): Adjust to use function_view as callback
10045 type.
10046 * macrotab.h: Include "common/function-view.h".
10047 (macro_callback_fn): Declare a prototype instead of a pointer.
10048 Remove "user_data" parameter.
10049 (macro_for_each, macro_for_each_in_scope): Adjust to use
10050 function_view as callback type.
10051 * psymtab.c (partial_map_expand_apply)
10052 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10053 Adjust to use function_view as callback type and to return bool.
10054 (psym_expand_symtabs_matching): Adjust to use function_view as
10055 callback types.
10056 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10057 to use function_view as callback type and to return bool.
10058 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10059 callback types.
10060 * symfile.c (expand_symtabs_matching): Adjust to use function_view
10061 as callback types.
10062 * symfile.h: Include "common/function-view.h".
10063 (expand_symtabs_file_matcher_ftype)
10064 (expand_symtabs_symbol_matcher_ftype)
10065 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10066 return bool.
10067 (quick_symbol_functions::map_symtabs_matching_filename)
10068 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10069 function_view as callback type and return bool.
10070 (expand_symtabs_matching): Adjust to use function_view as callback
10071 type.
10072 (maintenance_expand_name_matcher)
10073 (maintenance_expand_file_matcher): Delete.
10074 (maintenance_expand_symtabs): Use lambdas.
10075 * symtab.c (iterate_over_some_symtabs): Adjust to use
10076 function_view as callback types and return bool.
10077 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
10078 of a cleanup.
10079 (lookup_symtab_callback): Delete.
10080 (lookup_symtab): Use a lambda.
10081 (iterate_over_symbols): Adjust to use function_view as callback
10082 type.
10083 (struct search_symbols_data, search_symbols_file_matches)
10084 (search_symbols_name_matches): Delete.
10085 (search_symbols): Use a pair of lambdas.
10086 (struct add_name_data, add_macro_name, symbol_completion_matcher)
10087 (symtab_expansion_callback): Delete.
10088 (default_make_symbol_completion_list_break_on_1): Use lambdas.
10089 * symtab.h: Include "common/function-view.h".
10090 (iterate_over_some_symtabs): Adjust to use function_view as
10091 callback type and return bool.
10092 (iterate_over_symtabs): Adjust to use function_view as callback
10093 type.
10094 (symbol_found_callback_ftype): Remove 'data' parameter and return
10095 bool.
10096 (iterate_over_symbols): Adjust to use function_view as callback
10097 type.
10098
07e253aa
PA
100992017-02-23 Pedro Alves <palves@redhat.com>
10100
10101 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10102 (%.o) <unittests/%.c>: New pattern.
10103 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10104 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10105 * common/function-view.h: New file.
10106 * unittests/function-view-selftests.c: New file.
10107 * configure: Regenerate.
10108
8eaf5320
SM
101092017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10110
10111 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10112 inferior_ptid.
10113 * go32-nat.c (go32_thread_alive): Likewise.
10114
38768751
YQ
101152017-02-23 Yao Qi <yao.qi@linaro.org>
10116
10117 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10118 delete.
10119
0a8beaba
YQ
101202017-02-23 Yao Qi <yao.qi@linaro.org>
10121
10122 * varobj.c (varobj_clear_saved_item): Use delete instead of
10123 xfree.
10124 (update_dynamic_varobj_children): Likewise.
10125
58fdfd2c
JK
101262017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10127
10128 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10129
1b90b139
SM
101302017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10131
10132 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10133 m_enum_value to 0 in default constructor.
10134
2039d74e
EBM
101352017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10136
10137 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10138 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10139 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10140 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10141 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10142 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10143 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10144 IS_STORE_CONDITIONAL_INSN.
10145
7814882a
JK
101462017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10147
10148 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10149
0ae60b63
JK
101502017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10151
10152 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10153
0224619f
JK
101542017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10155
10156 * dwarf2read.c (skip_one_die, read_attribute_value)
10157 (dwarf2_const_value_attr, dump_die_shallow)
10158 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10159 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10160
0af92d60
JK
101612017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10162
10163 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10164 (dwarf_parse_macro_header): Accept DWARF version 5.
10165 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10166
216f72a1
JK
101672017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10168
10169 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10170 DW_AT_GNU_*.
10171 * common/common-exceptions.h (enum errors): Likewise.
10172 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10173 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10174 (dwarf_expr_context::execute_stack_op): Likewise.
10175 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10176 Likewise.
10177 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10178 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10179 (show_entry_values_debug, call_site_to_target_addr)
10180 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10181 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10182 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10183 (value_of_dwarf_block_entry, indirect_pieced_value)
10184 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10185 (disassemble_dwarf_expression): Likewise.
10186 * dwarf2read.c (process_die, inherit_abstract_dies)
10187 (read_call_site_scope): Likewise.
10188 * gdbtypes.h (struct func_type, struct call_site_parameter)
10189 (struct call_site): Likewise.
10190 * stack.c (read_frame_arg): Likewise.
10191 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10192
43988095
JK
101932017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10194
10195 * defs.h (read_unsigned_leb128): New declaration.
10196 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10197 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10198 (dwarf2_find_location_expression): Call also
10199 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10200 * dwarf2loc.h (dwarf2_version): New declaration.
10201 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10202 rnglists.
10203 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10204 .debug_rnglists.
10205 (struct dwop_section_names): Add loclists_dwo.
10206 (dwop_section_names): Add .debug_loclists.dwo.
10207 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10208 (struct dwarf2_per_cu_data): Add dwarf_version.
10209 (struct dwo_sections): Add loclists.
10210 (struct attr_abbrev): Add implicit_const.
10211 (read_indirect_line_string): New declaration.
10212 (read_unsigned_leb128): Delete declaration.
10213 (rcuh_kind): New definition.
10214 (read_and_check_comp_unit_head): Change parameter
10215 is_debug_types_section to section_kind.
10216 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10217 (read_comp_unit_head): Change parameter abfd to section, add parameter
10218 section_kind. Handle DWARF-5.
10219 (error_check_comp_unit_head): Accept also DWARF version 5.
10220 (read_and_check_comp_unit_head): Change parameter
10221 is_debug_types_section to section_kind.
10222 (read_and_check_type_unit_head): Delete function.
10223 (read_abbrev_offset): Handle DWARF-5.
10224 (create_debug_type_hash_table): Add parameter section_kind. Process
10225 only DW_UT_type. Use signature and type_offset_in_tu from struct
10226 comp_unit_head.
10227 (create_debug_types_hash_table): Update create_debug_type_hash_table
10228 caller.
10229 (create_all_type_units): Call create_debug_type_hash_table.
10230 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10231 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10232 caller.
10233 (skip_one_die): Handle DW_FORM_implicit_const.
10234 (dwarf2_rnglists_process): New function.
10235 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10236 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10237 (read_attribute_value): Handle DW_FORM_implicit_const,
10238 DW_FORM_line_strp.
10239 (read_attribute): Handle DW_FORM_implicit_const.
10240 (read_indirect_string_at_offset_from): New function from
10241 read_indirect_string_at_offset.
10242 (read_indirect_string_at_offset): Call
10243 read_indirect_string_at_offset_from.
10244 (read_indirect_line_string_at_offset): New function.
10245 (read_indirect_string): New function comment.
10246 (read_indirect_line_string): New function.
10247 (read_unsigned_leb128): Make it global.
10248 (dwarf2_string_attr): Handle DWARF-5.
10249 (add_include_dir_stub, read_formatted_entries): New functions.
10250 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10251 Handle DWARF-5.
10252 (per_cu_header_read_in): Update read_comp_unit_head caller.
10253 (dwarf2_version): New function.
10254 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10255 rnglists.
10256 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10257 fields.
10258
22d2f3ab
JK
102592017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10260
10261 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10262
5f46c5a5
JK
102632017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10264
10265 * dwarf2read.c (dwarf2_ranges_process): New function from
10266 dwarf2_ranges_read.
10267 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10268 dwarf2_ranges_process.
10269
78d4d2c5
JK
102702017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10271
10272 * dwarf2read.c (create_debug_type_hash_table): New function from
10273 create_debug_types_hash_table.
10274 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10275 (create_all_type_units, open_and_init_dwo_file): Update
10276 create_debug_types_hash_table callers.
10277
1b076f25
SDJ
102782017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10279
10280 PR gdb/16188
10281 * fork-child.c (trace_start_error): Fix thinko. va_end should
10282 refer to 'ap', not 'args'.
10283
0db8980c
SDJ
102842017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10285 Pedro Alves <palves@redhat.com>
10286
10287 PR gdb/16188
10288 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10289 calls succeeded.
10290 * fork-child.c (trace_start_error): New function.
10291 (trace_start_error_with_name): Likewise.
10292 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10293 * inf-ptrace.c (inf_ptrace_me): Likewise.
10294 * inferior.h (trace_start_error): New prototype.
10295 (trace_start_error_with_name): Likewise.
10296
99e8a4f9
SDJ
102972017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10298
10299 PR gdb/21164
10300 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10301 NULL before using it.
10302 * symmisc.c (maintenance_print_symbols): Likewise.
10303 (maintenance_print_msymbols): Likewise.
10304
4e746bb6
TW
103052017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10306
10307 * NEWS: Add record Python bindings entry.
10308
103092017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10310
10311 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10312 py-record-full.o.
10313 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10314 * python/py-record-btrace.c, python/py-record-btrace.h,
10315 python/py-record-full.c, python/py-record-full.h: New file.
10316 * python/py-record.c: Add include for py-record-btrace.h and
10317 py-record-full.h.
10318 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10319 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10320 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10321 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10322 New definition.
10323 (gdbpy_initialize_btrace): New export.
10324 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10325
103262017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10327
10328 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10329 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10330 * python/py-record.c: New file.
10331 * python/python-internal.h (gdbpy_start_recording,
10332 gdbpy_current_recording, gdpy_stop_recording,
10333 gdbpy_initialize_record): New export.
10334 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10335 (python_GdbMethods): Add gdbpy_start_recording,
10336 gdbpy_current_recording and gdbpy_stop_recording.
10337
103382017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10339
10340 * record-btrace.c (record_btrace_record_method): New function.
10341 (init_record_btrace_ops): Initialize to_record_method.
10342 * record-full.c (record_full_record_method): New function.
10343 (init_record_full_ops, init_record_full_core_ops): Add
10344 record_full_record_method.
10345 * record.h (enum record_method): New enum.
10346 * target-debug.h (target_debug_print_enum_record_method: New define.
10347 * target-delegates.c: Regenerate.
10348 * target.c (target_record_method): New function.
10349 * target.h: Include record.h.
10350 (struct target_ops) <to_record_method>: New field.
10351 (target_record_method): New export.
10352
103532017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10354
10355 * record.h (record_start, record_stop): New export.
10356 * record.c (record_start, record_stop): New function.
10357
103582017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10359
10360 * btrace.c (btrace_fetch): Copy function call segments pointer
10361 into a vector.
10362 (btrace_clear): Clear the vector.
10363 (btrace_find_insn_by_number): Use binary search to find the correct
10364 function call segment.
10365 * btrace.h (brace_fun_p): New typedef.
10366 (struct btrace_thread_info) <functions>: New field.
10367
103682017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10369
10370 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10371 * btrace.c (btrace_decode_error): ... here. New function.
10372 * btrace.h (btrace_decode_error): New export.
10373
103742017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10375
10376 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10377 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10378 btrace_find_insn_by_number): Remove special case for gaps.
10379 * btrace.h (btrace_insn_get_error): New export.
10380 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10381 * record-btrace.c (btrace_insn_history): Print number for gaps.
10382 (record_btrace_info, record_btrace_goto): Handle gaps.
10383
3f77c769
TT
103842017-02-14 Tom Tromey <tom@tromey.com>
10385
10386 PR python/13598:
10387 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10388 event.
10389 * python/py-evts.c (gdbpy_initialize_py_events): Add
10390 before_prompt registry.
10391 * python/py-events.h (events_object) <before_prompt>: New field.
10392
4c2c7ac6
MM
103932017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10394
10395 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10396
5cf30ebf
LM
103972017-02-13 Luis Machado <lgustavo@codesourcery.com>
10398
10399 * symfile (_initialize_symfile): Add usage text to the load command's
10400 help text.
10401
26a06916
SM
104022017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10403
10404 * utils.c (defaulted_query): Don't query on secondary UIs.
10405
0b145e37
TT
104062017-02-10 Tom Tromey <tom@tromey.com>
10407
10408 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10409
2d8365c4
TT
104102017-02-10 Tom Tromey <tom@tromey.com>
10411
10412 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10413 "cleanup" local.
10414 * python/py-type.c (typy_legacy_template_argument): Remove
10415 unnecessary "cleanup" local.
10416
2bb8f231
TT
104172017-02-10 Tom Tromey <tom@tromey.com>
10418
10419 * python/python.c (do_start_initialization): New function, from
10420 _initialize_python.
10421 (_initialize_python): Call do_start_initialization.
10422 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10423 goto.
10424
1bdfaf42
TT
104252017-02-10 Tom Tromey <tom@tromey.com>
10426
10427 * python/py-prettyprint.c (pretty_print_one_value): Use
10428 gdbpy_ref.
10429
88b6faea
TT
104302017-02-10 Tom Tromey <tom@tromey.com>
10431
10432 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10433 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10434 gdbpy_ref.
10435 * python/py-type.c (field_new): Use gdbpy_ref.
10436 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10437 gdbpy_ref.
10438 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10439 (py_free_pspace): Likewise.
10440 (pspace_to_pspace_object): Likewise.
10441 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10442 (py_free_objfile): Likewise.
10443 (objfile_to_objfile_object): Likewise.
10444 * python/py-inferior.c (delete_thread_object): Use
10445 gdbpy_ref.
10446 (infpy_read_memory): Likewise.
10447 (py_free_inferior): Likewise.
10448 * python/py-evtregistry.c (create_eventregistry_object): Use
10449 gdbpy_ref.
10450 * python/py-event.c (create_event_object): Use gdbpy_ref.
10451
7780f186
TT
104522017-02-10 Tom Tromey <tom@tromey.com>
10453
10454 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10455 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10456 used.
10457 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10458 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10459 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10460 python/py-framefilter.c, python/py-function.c,
10461 python/py-inferior.c, python/py-infevents.c,
10462 python/py-linetable.c, python/py-newobjfileevent.c,
10463 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10464 python/py-signalevent.c, python/py-stopevent.c,
10465 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10466 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10467 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10468 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10469
d4b0bb18
TT
104702017-02-10 Tom Tromey <tom@tromey.com>
10471
10472 * ui-out.h (ui_out_emit_type): New class.
10473 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10474 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10475 and ui_out_emit_tuple.
10476 (enumerate_locals): Likewise.
10477 (py_mi_print_variables, py_print_locals, py_print_args): Use
10478 ui_out_emit_list.
10479 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10480 ui_out_emit_list.
10481 * common/gdb_optional.h: New file.
10482
f67f945c
MG
104832017-02-10 Martin Galvan <martingalvan@sourceware.org>
10484
10485 * MAINTAINERS (Write After Approval): Update my e-mail address.
10486
18da0c51
MG
104872017-02-10 Martin Galvan <martingalvan@sourceware.org>
10488
10489 PR gdb/21122
10490 * breakpoint.c (_initialize_breakpoint): Update the help description
10491 of the 'commands' command to indicate that it takes a list argument.
10492
62c14536
SM
104932017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10494
10495 * interps.c (current_interp_set_logging): Remove "return".
10496
ff6fa247
GB
104972017-02-09 Gary Benson <gbenson@redhat.com>
10498
10499 * symtab.c (add_symtab_completions): Prevent NULL pointer
10500 dereference.
10501
a474bd8e
PA
105022017-02-08 Pedro Alves <palves@redhat.com>
10503
10504 * interps.c (interp::interp): Remove reference to quiet_p.
10505 (interp_set): Make static. Remove dead "Switching to" output
10506 code.
10507 (interp_quiet_p, interp_set_quiet): Delete.
10508 (interpreter_exec_cmd): Don't set the interpreter quiet.
10509 * interps.h (interp_quiet_p): Make static.
10510 (class interp) <quiet_p>: Remove field
10511
3d7b173c
JG
105122017-02-08 Jerome Guitton <guitton@adacore.com>
10513
604c4576
JG
10514 * cli/cli-decode.c (find_command_name_length): Make it extern.
10515 * cli/cli-decode.h (find_command_name_length): Declare.
10516 * cli/cli-script.c (command_name_equals, line_first_arg):
10517 New functions.
10518 (process_next_line): Use cli-decode to parse command names.
10519 (build_command_line): Make args a constant pointer.
10520
105212017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 10522
3d7b173c
JG
10523 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10524 Remove case-insensitive search.
10525
1291063d
JM
105262017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10527
10528 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10529 at the end of the line. Avoids an ARI warning.
10530
20b477a7
LM
105312017-02-06 Luis Machado <lgustavo@codesourcery.com>
10532
10533 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10534 rdseed instructions.
10535 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10536
3f7b46f2
IR
105372017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10538
10539 PR tdep/20936
10540 Provide and use sparc32 and sparc64 target description XML files.
10541 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10542 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10543 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10544 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10545 * features/sparc/sparc32-solaris.xml: New file.
10546 * features/sparc/sparc64-solaris.xml: New file.
10547 * features/sparc/sparc32-solaris.c: Generated.
10548 * features/sparc/sparc64-solaris.c: Generated.
10549 * sparc-tdep.h: Account for differences in target descriptions.
10550 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10551 (sparc32_register_type): Use target provided registers.
10552 (validate_tdesc_registers): New function.
10553 (sparc32_gdbarch_init): Use tdesc_has_registers.
10554 Set pseudoregister functions.
10555 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10556 (sparc64_register_type): Use target provided registers.
10557 (sparc64_init_abi): Set pseudoregister functions.
10558
f0fd41c1
TT
105592017-02-03 Tom Tromey <tom@tromey.com>
10560
10561 PR rust/21097:
10562 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10563 with a single member.
10564
d6f9b0fb
PA
105652017-02-03 Pedro Alves <palves@redhat.com>
10566
10567 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10568 (cli_interp_base::~cli_interp_base): New.
10569 (cli_interp): New struct.
10570 (as_cli_interp): Cast the interp itself to cli_interp.
10571 (cli_interpreter_pre_command_loop): Rename to ...
10572 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10573 parameter.
10574 (cli_interpreter_init): Rename to ...
10575 (cli_interp::init): ... this. Remove 'self' parameter. Use
10576 boolean. Make extern.
10577 (cli_interpreter_resume): Rename to ...
10578 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10579 extern.
10580 (cli_interpreter_suspend): Rename to ...
10581 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10582 extern.
10583 (cli_interpreter_exec): Rename to ...
10584 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10585 extern.
10586 (cli_interpreter_supports_command_editing): Rename to ...
10587 (cli_interp_base::supports_command_editing): ... this. Remove
10588 'interp' parameter. Make extern.
10589 (cli_ui_out): Rename to ...
10590 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10591 Make extern.
10592 (cli_set_logging): Rename to ...
10593 (cli_interp_base::set_logging): ... this. Remove 'interp'
10594 parameter. Make extern.
10595 (cli_interp_procs): Delete.
10596 (cli_interp_factory): Adjust to use "new".
10597 * cli/cli-interp.h: Include "interps.h".
10598 (struct cli_interp_base): New struct.
10599 * interps.c (struct interp): Delete. Fields moved to interps.h.
10600 (interp_new): Delete.
10601 (interp::interp, interp::~interp): New.
10602 (interp_set): Use bool, and return void. Assume the interpreter
10603 has suspend, init and resume methods, and that the all return
10604 void.
10605 (set_top_level_interpreter): interp_set returns void.
10606 (interp_ui_out): Adapt.
10607 (current_interp_set_logging): Adapt.
10608 (interp_data): Delete.
10609 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10610 (interp_exec): Adapt.
10611 (top_level_interpreter_data): Delete.
10612 * interps.h (interp_init_ftype, interp_resume_ftype)
10613 (interp_suspend_ftype, interp_exec_ftype)
10614 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10615 (class interp): New.
10616 (interp_new): Delete.
10617 (interp_set): Now returns void. Use bool.
10618 (interp_data, top_level_interpreter_data): Delete.
10619 * mi/mi-common.h: Include interps.h.
10620 (class mi_interp): Inherit from interp. Define a ctor. Declare
10621 init, resume, suspect, exec, interp_ui_out, set_logging and
10622 pre_command_loop methods.
10623 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10624 (mi_interpreter_init): Rename to ...
10625 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10626 bool, return void and make extern. Adjust.
10627 (mi_interpreter_resume): ... Rename to ...
10628 (mi_interp::resume): ... this. Remove the 'data' parameter,
10629 return void and make extern. Adjust.
10630 (mi_interpreter_suspend): ... Rename to ...
10631 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10632 return void and make extern. Adjust.
10633 (mi_interpreter_exec): ... Rename to ...
10634 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10635 extern. Adjust.
10636 (mi_interpreter_pre_command_loop): ... Rename to ...
10637 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10638 parameter and make extern.
10639 (mi_on_normal_stop_1): Adjust.
10640 (mi_ui_out): Rename to ...
10641 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10642 parameter and make extern. Adjust.
10643 (mi_set_logging): Rename to ...
10644 (mi_interp::set_logging): ... this. Remove the 'interp'
10645 parameter and make extern. Adjust.
10646 (mi_interp_procs): Delete.
10647 (mi_interp_factory): Adjust to use 'new'.
10648 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10649 (mi_print_exception, mi_execute_command, mi_load_progress):
10650 Adjust.
10651 * tui/tui-interp.c (tui_interp): New class.
10652 (as_tui_interp): Return a tui_interp pointer.
10653 (tui_on_normal_stop, tui_on_signal_received)
10654 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10655 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10656 to use interp::interp_ui_out.
10657 (tui_init): Rename to ...
10658 (tui_interp::init): ... this. Remove the 'self' parameter, use
10659 bool, return void and make extern. Adjust.
10660 (tui_resume): Rename to ...
10661 (tui_interp::resume): ... this. Remove the 'data' parameter,
10662 return void and make extern. Adjust.
10663 (tui_suspend): Rename to ...
10664 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10665 return void and make extern. Adjust.
10666 (tui_ui_out): Rename to ...
10667 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10668 parameter, and make extern. Adjust.
10669 (tui_exec): Rename to ...
10670 (tui_interp::exec): ... this. Remove the 'data' parameter and
10671 make extern.
10672 (tui_interp_procs): Delete.
10673 (tui_interp_factory): Use "new".
10674
65c40c95
TT
106752017-02-02 Tom Tromey <tom@tromey.com>
10676
10677 * rust-exp.y (ends_raw_string, space_then_number)
10678 (rust_identifier_start_p): Return bool.
10679 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10680 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10681 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10682 (rust_chartype_p): Return bool.
10683 (val_print_struct, rust_print_struct_def, rust_print_type):
10684 Update.
10685 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10686 Return bool.
10687
b50f188d
TT
106882017-02-02 Tom Tromey <tom@tromey.com>
10689
10690 * rust-lang.c: Reindent.
10691
03c85b11
TT
106922017-02-02 Tom Tromey <tom@tromey.com>
10693
10694 * rust-lang.h (rust_crate_for_block): Update.
10695 * rust-lang.c (rust_crate_for_block): Return std::string.
10696 (rust_get_disr_info): Use std:;string, not
10697 gdb::unique_xmalloc_ptr.
10698 * rust-exp.y (crate_name): Update.
10699
9b6da501
PA
107002017-02-02 Pedro Alves <palves@redhat.com>
10701
10702 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10703 field out of gdb_disassembler_test and make it static.
10704
ec4cb20b
PA
107052017-02-02 Pedro Alves <palves@redhat.com>
10706
10707 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10708 mi1_interp and mi_interp fields.
10709
5be5dbf0
PA
107102017-02-02 Pedro Alves <palves@redhat.com>
10711
616268b6
PA
10712 * cli/cli-interp.c (struct saved_output_files, saved_output):
10713 Moved from cli/cli-logging.c.
10714 (cli_set_logging): New function.
10715 (cli_interp_procs): Install cli_set_logging.
10716 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10717 Declare.
10718 * cli/cli-logging.c (struct saved_output_files, saved_output):
10719 Moved to cli/cli-interp.c.
10720 (pop_output_files): Don't save outputs here.
10721 (make_logging_output): New function.
10722 (handle_redirections): Don't build tee nor save previous outputs
10723 here.
10724 * interps.c (current_interp_set_logging): Change prototype.
10725 Assume there's always a set_logging_proc method installed.
10726 * interps.h (interp_set_logging_ftype): Change prototype.
10727 (current_interp_set_logging): Change prototype and adjust comment.
10728 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10729 use make_logging_output.
10730 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
107312017-02-02 Pedro Alves <palves@redhat.com>
10732
5be5dbf0
PA
10733 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10734 from ...
10735 (set_logging_overwrite): ... here.
10736 (logging_no_redirect_file): Delete.
10737 (set_logging_redirect): Don't handle redirection on the fly.
10738 Instead warn that "logging off" / "logging on" is necessary.
10739 (pop_output_files): Delete references to logging_no_redirect_file.
10740 (show_logging_command): Always speak in terms of what will happen
10741 once logging is reenabled.
10742
c99cc448
PA
107432017-02-02 Pedro Alves <palves@redhat.com>
10744
10745 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10746
8b172ce7
PA
107472017-02-02 Pedro Alves <palves@redhat.com>
10748
10749 * disasm.c (gdb_pretty_print_insn): Rename to ...
10750 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10751 Remove gdbarch parameter. Adapt to clear the object's buffers
10752 instead of allocating new buffers, and to print using the object's
10753 gdb_disassembler instead of calling gdb_print_insn.
10754 (dump_insns): Use gdb_pretty_print_disassembler.
10755 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10756 (gdb_pretty_print_disassembler): New class.
10757 * record-btrace.c (btrace_insn_history): Use
10758 gdb_pretty_print_disassembler.
10759
d7e74731
PA
107602017-02-02 Pedro Alves <palves@redhat.com>
10761
10762 * ada-lang.c (type_as_string): Use string_file.
10763 * ada-valprint.c (ada_print_floating): Use string_file.
10764 * ada-varobj.c (ada_varobj_scalar_image)
10765 (ada_varobj_get_value_image): Use string_file.
10766 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10767 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10768 * breakpoint.c (update_inserted_breakpoint_locations)
10769 (insert_breakpoint_locations, reattach_breakpoints)
10770 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10771 (print_it_watchpoint): Use string_file.
10772 (save_breakpoints): Use stdio_file.
10773 * c-exp.y (oper): Use string_file.
10774 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10775 tee_file.
10776 (pop_output_files): Use delete.
10777 (handle_redirections): Use stdio_file and tee_file.
10778 * cli/cli-setshow.c (do_show_command): Use string_file.
10779 * compile/compile-c-support.c (c_compute_program): Use
10780 string_file.
10781 * compile/compile-c-symbols.c (generate_vla_size): Take a
10782 'string_file &' instead of a 'ui_file *'.
10783 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10784 of a 'ui_file *'. Use string_file.
10785 (generate_c_for_variable_locations): Take a 'string_file &'
10786 instead of a 'ui_file *'.
10787 * compile/compile-internal.h (generate_c_for_for_one_variable):
10788 Take a 'string_file &' instead of a 'ui_file *'.
10789 * compile/compile-loc2c.c (push, pushf, unary, binary)
10790 (print_label, pushf_register_address, pushf_register)
10791 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10792 'ui_file *'. Adjust.
10793 * compile/compile.c (compile_to_object): Use string_file.
10794 * compile/compile.h (compile_dwarf_expr_to_c)
10795 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10796 'ui_file *'.
10797 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10798 (replace_typedefs_qualified_name): Use string_file and
10799 obstack_copy0.
10800 * disasm.c (gdb_pretty_print_insn): Use string_file.
10801 (gdb_disassembly): Adjust reference the null_stream global.
10802 (do_ui_file_delete): Delete.
10803 (gdb_insn_length): Use null_stream.
10804 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10805 * dwarf2loc.c (dwarf2_compile_property_to_c)
10806 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10807 'string_file &' instead of a 'ui_file *'.
10808 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10809 * dwarf2read.c (do_ui_file_peek_last): Delete.
10810 (dwarf2_compute_name): Use string_file.
10811 * event-top.c (gdb_setup_readline): Use stdio_file.
10812 * gdbarch.sh (verify_gdbarch): Use string_file.
10813 * gdbtypes.c (safe_parse_type): Use null_stream.
10814 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10815 string_file.
10816 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10817 'string_file *' instead of a 'ui_file *'.
10818 (gdbscm_arch_disassemble): Use string_file.
10819 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10820 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10821 inherits from ui_file.
10822 (ioscm_file_port_delete, ioscm_file_port_rewind)
10823 (ioscm_file_port_put): Delete.
10824 (ioscm_file_port_write): Rename to ...
10825 (ioscm_file_port::write): ... this. Remove file_port_magic
10826 checks.
10827 (ioscm_file_port_new): Delete.
10828 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10829 ui_file_up.
10830 * guile/scm-type.c (tyscm_type_name): Use string_file.
10831 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10832 Use string_file.
10833 * infcmd.c (print_return_value_1): Use string_file.
10834 * infrun.c (print_target_wait_results): Use string_file.
10835 * language.c (add_language): Use string_file.
10836 * location.c (explicit_to_string_internal): Use string_file.
10837 * main.c (captured_main_1): Use null_file.
10838 * maint.c (maintenance_print_architecture): Use stdio_file.
10839 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10840 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10841 event_channel>: Change type to mi_console_file pointer.
10842 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10843 (mi_console_file_delete): Delete.
10844 (struct mi_console_file): Delete.
10845 (mi_console_file_magic): Delete.
10846 (mi_console_file_new): Delete.
10847 (mi_console_file::mi_console_file): New.
10848 (mi_console_file_delete): Delete.
10849 (mi_console_file_fputs): Delete.
10850 (mi_console_file::write): New.
10851 (mi_console_raw_packet): Delete.
10852 (mi_console_file::flush): New.
10853 (mi_console_file_flush): Delete.
10854 (mi_console_set_raw): Rename to ...
10855 (mi_console_file::set_raw): ... this.
10856 * mi/mi-console.h (class mi_console_file): New class.
10857 (mi_console_file_new, mi_console_set_raw): Delete.
10858 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10859 (mi_set_logging): Use delete and tee_file. Adjust.
10860 * mi/mi-main.c (output_register): Use string_file.
10861 (mi_cmd_data_evaluate_expression): Use string_file.
10862 (mi_cmd_data_read_memory): Use string_file.
10863 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10864 * mi/mi-out.c (mi_ui_out::main_stream): New.
10865 (mi_ui_out::rewind): Use main_stream and
10866 string_file.
10867 (mi_ui_out::put): Use main_stream and string_file.
10868 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10869 Allocate a 'string_file' instead.
10870 (mi_out_new): Don't allocate a mem_fileopen stream here.
10871 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10872 (mi_ui_out::main_stream): Declare method.
10873 * printcmd.c (eval_command): Use string_file.
10874 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10875 * python/py-arch.c (archpy_disassemble): Use string_file.
10876 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10877 * python/py-frame.c (frapy_str): Use string_file.
10878 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10879 Use string_file.
10880 * python/py-type.c (typy_str): Use string_file.
10881 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10882 * python/py-value.c (valpy_str): Use string_file.
10883 * record-btrace.c (btrace_insn_history): Use string_file.
10884 * regcache.c (regcache_print): Use stdio_file.
10885 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10886 * remote.c (escape_buffer): Use string_file.
10887 * rust-lang.c (rust_get_disr_info): Use string_file.
10888 * serial.c (serial_open_ops_1): Use stdio_file.
10889 (do_serial_close): Use delete.
10890 * stack.c (print_frame_arg): Use string_file.
10891 (print_frame_args): Remove local mem_fileopen stream, not used.
10892 (print_frame): Use string_file.
10893 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10894 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10895 Take a 'string_file *' instead of a 'ui_file *'.
10896 * top.c (new_ui): Use stdio_file and stderr_file.
10897 (free_ui): Use delete.
10898 (execute_command_to_string): Use string_file.
10899 (quit_confirm): Use string_file.
10900 * tracepoint.c (collection_list::append_exp): Use string_file.
10901 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10902 * tui/tui-file.c: Don't include "ui-file.h".
10903 (enum streamtype, struct tui_stream): Delete.
10904 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10905 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10906 (tui_file::tui_file): New method.
10907 (tui_file_fputs): Delete.
10908 (tui_file_get_strbuf): Delete.
10909 (tui_file::puts): New method.
10910 (tui_file_adjust_strbuf): Delete.
10911 (tui_file_flush): Delete.
10912 (tui_file::flush): New method.
10913 * tui/tui-file.h: Tweak intro comment.
10914 Include ui-file.h.
10915 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10916 (tui_file_adjust_strbuf): Delete declarations.
10917 (class tui_file): New class.
10918 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10919 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10920 (tui_register_format): Use string_stream.
10921 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10922 (tui_get_function_from_frame): Use string_file.
10923 * typeprint.c (type_to_string): Use string_file.
10924 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10925 (null_stream): New global.
10926 (ui_file_delete): Delete.
10927 (ui_file::ui_file): New.
10928 (null_file_isatty): Delete.
10929 (ui_file::~ui_file): New.
10930 (null_file_rewind): Delete.
10931 (ui_file::printf): New.
10932 (null_file_put): Delete.
10933 (null_file_flush): Delete.
10934 (ui_file::putstr): New.
10935 (null_file_write): Delete.
10936 (ui_file::putstrn): New.
10937 (null_file_read): Delete.
10938 (ui_file::putc): New.
10939 (null_file_fputs): Delete.
10940 (null_file_write_async_safe): Delete.
10941 (ui_file::vprintf): New.
10942 (null_file_delete): Delete.
10943 (null_file::write): New.
10944 (null_file_fseek): Delete.
10945 (null_file::puts): New.
10946 (ui_file_data): Delete.
10947 (null_file::write_async_safe): New.
10948 (gdb_flush, ui_file_isatty): Adjust.
10949 (ui_file_put, ui_file_rewind): Delete.
10950 (ui_file_write): Adjust.
10951 (ui_file_write_for_put): Delete.
10952 (ui_file_write_async_safe, ui_file_read): Adjust.
10953 (ui_file_fseek): Delete.
10954 (fputs_unfiltered): Adjust.
10955 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10956 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10957 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10958 (set_ui_file_data): Delete.
10959 (string_file::~string_file, string_file::write)
10960 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10961 (do_ui_file_as_string, ui_file_as_string): Delete.
10962 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10963 (struct mem_file): Delete.
10964 (mem_file_new): Delete.
10965 (stdio_file::stdio_file): New.
10966 (mem_file_delete): Delete.
10967 (stdio_file::stdio_file): New.
10968 (mem_fileopen): Delete.
10969 (stdio_file::~stdio_file): New.
10970 (mem_file_rewind): Delete.
10971 (stdio_file::set_stream): New.
10972 (mem_file_put): Delete.
10973 (stdio_file::open): New.
10974 (mem_file_write): Delete.
10975 (stdio_file_magic, struct stdio_file): Delete.
10976 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10977 (stdio_file::flush): New.
10978 (stdio_file_read): Rename to ...
10979 (stdio_file::read): ... this. Adjust.
10980 (stdio_file_write): Rename to ...
10981 (stdio_file::write): ... this. Adjust.
10982 (stdio_file_write_async_safe): Rename to ...
10983 (stdio_file::write_async_safe) ... this. Adjust.
10984 (stdio_file_fputs): Rename to ...
10985 (stdio_file::puts) ... this. Adjust.
10986 (stdio_file_isatty): Delete.
10987 (stdio_file_fseek): Delete.
10988 (stdio_file::isatty): New.
10989 (stderr_file_write): Rename to ...
10990 (stderr_file::write) ... this. Adjust.
10991 (stderr_file_fputs): Rename to ...
10992 (stderr_file::puts) ... this. Adjust.
10993 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10994 (stderr_file::stderr_file): New.
10995 (tee_file_magic): Delete.
10996 (struct tee_file): Delete.
10997 (tee_file::tee_file): New.
10998 (tee_file_new): Delete.
10999 (tee_file::~tee_file): New.
11000 (tee_file_delete): Delete.
11001 (tee_file_flush): Rename to ...
11002 (tee_file::flush): ... this. Adjust.
11003 (tee_file_write): Rename to ...
11004 (tee_file::write): ... this. Adjust.
11005 (tee_file::write_async_safe): New.
11006 (tee_file_fputs): Rename to ...
11007 (tee_file::puts): ... this. Adjust.
11008 (tee_file_isatty): Rename to ...
11009 (tee_file::isatty): ... this. Adjust.
11010 * ui-file.h (struct obstack, struct ui_file): Don't
11011 forward-declare.
11012 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11013 (ui_file_write_ftype)
11014 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11015 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11016 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11017 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11018 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11019 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11020 (set_ui_file_fseek): Delete.
11021 (ui_file_data, ui_file_delete, ui_file_rewind)
11022 (struct ui_file): New.
11023 (ui_file_up): New.
11024 (class null_file): New.
11025 (null_stream): Declare.
11026 (ui_file_write_for_put, ui_file_put): Delete.
11027 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11028 Delete.
11029 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11030 (gdb_fopen, tee_file_new): Delete.
11031 (struct string_file): New.
11032 (struct stdio_file): New.
11033 (stdio_file_up): New.
11034 (struct stderr_file): New.
11035 (class tee_file): New.
11036 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11037 of a 'ui_file *'. Adjust.
11038 * ui-out.h (class ui_out) <field_stream>: Likewise.
11039 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11040 (null_stream): Delete.
11041 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11042 Adjust.
11043 * utils.h (struct ui_file): Delete forward declaration..
11044 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11045 (error_stream): Take a 'string_file &' instead of a
11046 'ui_file *'.
11047 * varobj.c (varobj_value_get_print_value): Use string_file.
11048 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11049 * gdbarch.c: Regenerate.
11050
187808b0
PA
110512017-02-02 Pedro Alves <palves@redhat.com>
11052
11053 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11054 (gdb_pretty_print_insn): ... this. Now a free function. Add back
11055 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
11056 Adjust to call gdb_print_insn instead of
11057 gdb_disassembler::print_insn.
11058 (dump_insns, do_mixed_source_and_assembly_deprecated)
11059 (do_mixed_source_and_assembly, do_assembly_only): Add back a
11060 'gdbarch' parameter. Remove gdb_disassembler parameter.
11061 (gdb_disassembly): Don't allocate a gdb_disassembler here.
11062 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11063 declaration.
11064 (gdb_pretty_print_insn): Re-add declaration.
11065 * record-btrace.c (btrace_insn_history): Don't allocate a
11066 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
11067
7a8eb317
SM
110682017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
11069
11070 * disasm.h (gdb_disassembly): Remove file_string parameter.
11071 * disasm.c (gdb_disassembly): Likewise.
11072 * cli/cli-cmds.c (print_disassembly): Adapt.
11073 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11074 * stack.c (do_gdb_disassembly): Likewise.
11075
7346ef59
AA
110762017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
11077
11078 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11079 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11080 targets. And if the implicit value is longer than needed, extract
11081 the first bytes instead of the "least significant" ones.
11082
cd4007e4
MM
110832017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11084
11085 * btrace.c (btrace_enable): Do not call btrace_add_pc for
11086 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11087 (btrace_fetch): Assert can_access_registers_ptid.
11088 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11089 validate_registers_access.
11090
cf77c34e
MM
110912017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11092
11093 * gdbthread.h (can_access_registers_ptid): New.
11094 * thread.c (can_access_registers_ptid): New.
11095
be85ce7d
PA
110962017-02-01 Pedro Alves <palves@redhat.com>
11097
11098 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11099
29b0b251
PA
111002017-01-31 Pedro Alves <palves@redhat.com>
11101
11102 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11103 Fix typos.
11104
289b5b24
PA
111052017-01-31 Pedro Alves <palves@redhat.com>
11106
11107 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11108 not used.
11109
b47413b4
PA
111102017-01-31 Pedro Alves <palves@redhat.com>
11111
11112 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11113
60adb36c
PA
111142017-01-31 Pedro Alves <palves@redhat.com>
11115
11116 * common/scoped_restore.h
11117 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11118 change the value's parameter type to T2.
11119 (make_scoped_restore): Likewise.
11120
2735833d
WT
111212017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11122 Richard Henderson <rth@redhat.com>
11123
11124 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11125 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11126 GS_BASE for older kernels.
11127 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11128 GS_BASE for older kernels.
11129 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11130 and GS_BASE to the offset table.
11131 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11132 system register group.
11133 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11134 for older kernels.
11135 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11136 amd64 ABI.
11137 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11138 AMD64_GSBASE_REGNUM.
11139 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11140 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11141 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11142 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11143 i386/64bit-segments.xml in those rules.
11144 * features/i386/64bit-segments.xml: New file.
11145 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11146 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11147 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11148 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11149 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11150 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11151 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11152 * features/i386/amd64-avx-linux.c: Regenerated.
11153 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11154 * features/i386/amd64-avx-mpx.c: Regenerated.
11155 * features/i386/amd64-avx512-linux.c: Regenerated.
11156 * features/i386/amd64-linux.c: Regenerated.
11157 * features/i386/amd64-mpx-linux.c: Regenerated.
11158 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11159 * features/i386/i386-avx-mpx.c: Regenerated.
11160 * features/i386/x32-avx-linux.c: Regenerated.
11161 * features/i386/x32-avx512-linux.c: Regenerated.
11162 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11163 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11164 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11165 * regformats/i386/amd64-linux.dat: Regenerated.
11166 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11167 * regformats/i386/x32-avx-linux.dat: Regenerated.
11168 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11169 * regformats/i386/x32-linux.dat: Regenerated.
11170
8884e97e
WT
111712017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11172
11173 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11174 Set to AMD64_NUM_REGS.
11175
7005d26a
WT
111762017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11177
11178 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11179 that checks validity of a register number.
11180
4bd2e1b2
KC
111812017-01-27 Kees Cook <keescook@google.com>
11182
11183 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11184 fetch_fpregs if target has fpa registers.
11185 (arm_linux_store_inferior_registers): Call store_fpregs if target
11186 has fpa registers.
11187
7cf1de6c
AA
111882017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11189
11190 * cris-tdep.c (cris_gdbarch_init): Remove check for
11191 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11192
874a1c8c
AT
111932017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11194
11195 * corelow.c (get_core_register_section): Check for regset
11196 existence before checking for REGSET_VARIABLE_SIZE.
11197
d8b49cf0
YQ
111982017-01-26 Yao Qi <yao.qi@linaro.org>
11199 Pedro Alves <palves@redhat.com>
11200
11201 PR gdb/20939
11202 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11203 call memory_error, save memaddr instead.
11204 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11205 negative, cal memory_error.
11206 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11207
658ca58c
YQ
112082017-01-26 Yao Qi <yao.qi@linaro.org>
11209
11210 * disasm-selftests.c (memory_error_test): New function.
11211 (_initialize_disasm_selftests): Register memory_error_test.
11212
79843d45
YQ
112132017-01-26 Yao Qi <yao.qi@linaro.org>
11214
11215 * Makefile.in (SFILES): Add disasm-selftests.c and
11216 selftest-arch.c.
11217 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11218 * disasm-selftests.c: New file.
11219 * selftest-arch.c: New file.
11220 * selftest-arch.h: New file.
11221
8cafda32
YQ
112222017-01-26 Yao Qi <yao.qi@linaro.org>
11223
11224 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11225 to bfd_arch_mep. Don't return 0 if section is not
11226 found. Call print_insn_mep.
11227
e47ad6c0
YQ
112282017-01-26 Pedro Alves <palves@redhat.com>
11229 Yao Qi <yao.qi@linaro.org>
11230
11231 * arm-tdep.c: Include "disasm.h".
11232 (gdb_print_insn_arm): Update code to get gdbarch.
11233 * disasm.c (dis_asm_read_memory): Change it to
11234 gdb_disassembler::dis_asm_read_memory.
11235 (dis_asm_memory_error): Likewise.
11236 (dis_asm_print_address): Likewise.
11237 (gdb_pretty_print_insn): Change it to
11238 gdb_disassembler::pretty_print_insn.
11239 (dump_insns): Add one argument gdb_disassemlber. All
11240 callers updated.
11241 (do_mixed_source_and_assembly_deprecated): Likewise.
11242 (do_mixed_source_and_assembly): Likewise.
11243 (do_assembly_only): Likewise.
11244 (gdb_disassembler::gdb_disassembler): New.
11245 (gdb_disassembler::print_insn): New.
11246 * disasm.h (class gdb_disassembler): New.
11247 (gdb_pretty_print_insn): Remove declaration.
11248 (gdb_disassemble_info): Likewise.
11249 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11250 (gdbscm_disasm_read_memory_worker): Update.
11251 (gdbscm_disasm_read_memory): Update.
11252 (gdbscm_disasm_memory_error): Remove.
11253 (gdbscm_disasm_print_address): Remove.
11254 (gdbscm_disassembler::gdbscm_disassembler): New.
11255 (gdbscm_print_insn_from_port): Update.
11256 * mips-tdep.c: Include disasm.h.
11257 (gdb_print_insn_mips): Update code to get gdbarch.
11258 * record-btrace.c (btrace_insn_history): Update.
11259 * spu-tdep.c: Include disasm.h.
11260 (struct spu_dis_asm_data): Remove.
11261 (struct spu_dis_asm_info): New.
11262 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11263 SPU id.
11264 (gdb_print_insn_spu): Cast disassemble_info to
11265 spu_dis_asm_info.
11266
80d75874
YQ
112672017-01-26 Yao Qi <yao.qi@linaro.org>
11268
11269 * disasm.c (do_ui_file_delete): Delete.
11270 (gdb_insn_length): Move code creating stream to ...
11271 * utils.c (null_stream): ... here. New function.
11272 * utils.h (null_stream): Declare.
11273
60685cd0
SM
112742017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11275
11276 * python/py-inferior.c (find_thread_object): Return directly
11277 from the loop. Remove "found" variable.
11278
eb1cdb62
JB
112792017-01-21 Joel Brobecker <brobecker@adacore.com>
11280
11281 GDB 7.12.1 released.
11282
b1ce6568
SM
112832017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11284
11285 * python/py-function.c (fnpy_call): Reorder declarations to have
11286 the gdbpy_enter object declared first.
11287 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11288
6f8b0407
SM
112892017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11290
fec93fb1 11291 PR python/21068
6f8b0407
SM
11292 * python/python-internal.h (PyMem_RawMalloc): Define for
11293 Python < 3.4.
11294 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11295 PyMem_RawMalloc instead of PyMem_Malloc.
11296
78cbbba8
LM
112972017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11298 Luis Machado <lgustavo@codesourcery.com>
11299
11300 * NEWS (New commands): Mention flash-erase.
11301 (New MI commands): Mention target-flash-erase.
11302 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11303 command.
11304 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11305 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11306 * target.c (flash_erase_command): New function.
11307 (initialize_targets): Add new flash-erase command.
11308 * target.h (flash_erase_command): New declaration.
11309
2132fe85
JB
113102017-01-20 Joel Brobecker <brobecker@adacore.com>
11311
11312 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11313 HAVE_SYS_PROCFS_H is defined.
11314
d1dff226
AH
113152017-01-18 Alan Hayward <alan.hayward@arm.com>
11316
11317 * remote.c (struct cached_reg): Change data into a pointer.
11318 * (stop_reply_dtr): Free data pointers before deleting vector.
11319 (process_stop_reply): Likewise.
11320 (remote_parse_stop_reply): Allocate space for data
11321
9890e433
AH
113222017-01-18 Alan Hayward <alan.hayward@arm.com>
11323
11324 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11325 MAX_REGISTER_SIZE.
11326 (amd64_pseudo_register_read_value): Likewise.
11327 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11328 (store_register_using_P): Likewise.
11329 * regcache.c (regcache_xfer_part): Likewise.
11330
7a36499a
IR
113312017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11332
11333 Split real and pseudo registers.
11334 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11335 (sparc32_pseudo_regnum): New enum.
11336 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11337 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11338 (SPARC32_CP0_REGISTERS): New macro.
11339 (sparc32_pseudo_register_name): New function.
11340 (sparc32_register_name): Use sparc32_pseudo_register_name.
11341 (sparc32_pseudo_register_type): New function.
11342 (sparc32_register_type): Use sparc32_pseudo_register_type.
11343 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11344 pseudo register numbers.
11345 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11346 (SPARC64_CP0_REGISTERS): New macro.
11347 (sparc64_pseudo_register_name): New function.
11348 (sparc64_register_name): Use sparc64_pseudo_register_name.
11349 (sparc64_pseudo_register_type): New function.
11350 (sparc64_register_type): Use sparc64_pseudo_register_type.
11351 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11352 pseudo register numbers.
11353 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11354 sparc64_store_arguments): Handle pseudo register numbers.
11355
6f8976bf
YQ
113562017-01-13 Yao Qi <yao.qi@linaro.org>
11357
11358 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11359 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11360 output.
11361 (getpkt_or_notif_sane_1): Likewise.
11362
e4241ace
YQ
113632017-01-13 Yao Qi <yao.qi@linaro.org>
11364
11365 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11366 of CC. Pass "-x c++-header" instead of "-x c".
11367
3015c064
SM
113682017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11369
11370 * remote.c (remote_can_async_p): Update comment.
11371
fde1b17d
SM
113722017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11373
11374 * linux-nat.c (linux_nat_can_async_p): Update comment.
11375
ca1ca08b
SM
113762017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11377
11378 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11379
4ad2da73
SM
113802017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11381
11382 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11383
c8b23b3f
TT
113842017-01-10 Tom Tromey <tom@tromey.com>
11385
11386 * python/py-type.c (typy_legacy_template_argument): Update.
11387 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11388 ~demangle_parse_info): Declare new members.
11389 (cp_demangled_name_to_comp): Return unique_ptr.
11390 (cp_demangled_name_parse_free)
11391 (make_cleanup_cp_demangled_name_parse_free)
11392 (cp_new_demangle_parse_info): Remove.
11393 * cp-support.c (do_demangled_name_parse_free_cleanup)
11394 (make_cleanup_cp_demangled_name_parse_free): Remove.
11395 (inspect_type, cp_canonicalize_string_full)
11396 (cp_canonicalize_string): Update.
11397 (mangled_name_to_comp): Change return type.
11398 (cp_class_name_from_physname, method_name_from_physname)
11399 (cp_func_name, cp_remove_params): Update.
11400 * cp-name-parser.y (demangle_parse_info): New constructor, from
11401 cp_new_demangle_parse_info.
11402 (~demangle_parse_info): New destructor, from
11403 cp_demangled_name_parse_free.
11404 (cp_merge_demangle_parse_infos): Update.
11405 (cp_demangled_name_to_comp): Change return type.
11406
1ac32117
TT
114072017-01-10 Tom Tromey <tom@tromey.com>
11408
11409 * top.c (prevent_dont_repeat): Change return type.
11410 * python/python.c (execute_gdb_command): Use std::string.
11411 Update.
11412 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11413 * command.h (prevent_dont_repeat): Change return type.
11414 * breakpoint.c (bpstat_do_actions_1): Update.
11415
0cf08227
TT
114162017-01-10 Tom Tromey <tom@tromey.com>
11417
11418 * value.h (scoped_value_mark::~scoped_value_mark): Call
11419 free_to_mark.
11420 (scoped_value_mark::free_to_mark): New method.
11421 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11422 scoped_value_mark.
11423
eb115069
TT
114242017-01-10 Tom Tromey <tom@tromey.com>
11425
11426 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11427 (valpy_reference_value, valpy_const_value, valpy_get_address)
11428 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11429 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11430 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11431 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11432 scoped_value_mark.
11433 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11434 * value.h (scoped_value_mark): New class.
11435
906768f9
TT
114362017-01-10 Tom Tromey <tom@tromey.com>
11437
11438 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11439 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11440 * psymtab.c (discard_psymtabs_upto): Remove.
11441 (make_cleanup_discard_psymtabs): Remove.
11442 (struct psymtab_state): Remove.
11443
bef155c3
TT
114442017-01-10 Tom Tromey <tom@tromey.com>
11445
11446 * record-full.c (record_full_save_cleanups): Remove.
11447 (record_full_save): Use gdb::unlinker.
11448 * gcore.c (do_bfd_delete_cleanup): Remove.
11449 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11450 cleanups.
11451 * dwarf2read.c (unlink_if_set): Remove.
11452 (write_psymtabs_to_index): Use gdb::unlinker.
11453 * common/gdb_unlinker.h: New file.
11454
192b62ce
TT
114552017-01-10 Tom Tromey <tom@tromey.com>
11456
11457 * windows-tdep.c (windows_xfer_shared_library): Update.
11458 * windows-nat.c (windows_make_so): Update.
11459 * utils.h (make_cleanup_bfd_unref): Remove.
11460 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11461 * symfile.h (symfile_bfd_open)
11462 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11463 * symfile.c (read_symbols, symbol_file_add)
11464 (separate_debug_file_exists): Update.
11465 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11466 (generic_load, reread_symbols): Update.
11467 * symfile-mem.c (symbol_file_add_from_memory): Update.
11468 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11469 (spu_symbol_file_add_from_memory): Update.
11470 * solist.h (struct target_so_ops) <bfd_open>: Return
11471 gdb_bfd_ref_ptr.
11472 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11473 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11474 gdb_bfd_ref_ptr.
11475 (solib_map_sections, reload_shared_libraries_1): Update.
11476 * solib-svr4.c (enable_break): Update.
11477 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11478 * solib-frv.c (enable_break2): Update.
11479 * solib-dsbt.c (enable_break): Update.
11480 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11481 gdb_bfd_ref_ptr.
11482 (darwin_solib_get_all_image_info_addr_at_init): Update.
11483 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11484 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11485 * record-full.c (record_full_save): Update.
11486 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11487 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11488 * minidebug.c (find_separate_debug_file_in_section): Return
11489 gdb_bfd_ref_ptr.
11490 * machoread.c (macho_add_oso_symfile): Change abfd to
11491 gdb_bfd_ref_ptr.
11492 (macho_symfile_read_all_oso): Update.
11493 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11494 (macho_symfile_read): Update.
11495 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11496 (jit_bfd_try_read_symtab): Update.
11497 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11498 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11499 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11500 gdb_bfd_ref_ptr.
11501 (gdb_bfd_ref_policy): New struct.
11502 (gdb_bfd_ref_ptr): New typedef.
11503 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11504 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11505 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11506 gdb_bfd_ref_ptr.
11507 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11508 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11509 (gcore_command): Update.
11510 * exec.c (exec_file_attach): Update.
11511 * elfread.c (elf_symfile_read): Update.
11512 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11513 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11514 (open_and_init_dwo_file): Update.
11515 (open_dwp_file): Return gdb_bfd_ref_ptr.
11516 (open_and_init_dwp_file): Update.
11517 * corelow.c (core_open): Update.
11518 * compile/compile-object-load.c (compile_object_load): Update.
11519 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11520 * coffread.c (coff_symfile_read): Update.
11521 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11522 gdb_bfd_ref_ptr. Rename.
11523 (dump_bfd_file, restore_command): Update.
11524 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11525 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11526 (find_separate_debug_file_by_buildid): Update.
11527
50315b21
TT
115282017-01-10 Tom Tromey <tom@tromey.com>
11529
11530 * common/gdb_ref_ptr.h: New file.
11531 * python/py-ref.h (struct gdbpy_ref_policy): New.
11532 (gdbpy_ref): Now a typedef.
11533
fc4007c9
TT
115342017-01-10 Tom Tromey <tom@tromey.com>
11535
11536 * utils.h (make_cleanup_htab_delete): Don't declare.
11537 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11538 Remove.
11539 * linespec.c (decode_compound_collector): Add constructor,
11540 destructor.
11541 (lookup_prefix_sym): Remove cleanup.
11542 (symtab_collector): Add constructor, destructor.
11543 (collect_symtabs_from_filename): Remove cleanup.
11544 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11545 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11546 Use htab_up.
11547 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11548 * dwarf2read.c (dw2_expand_symtabs_matching)
11549 (dw2_map_symbol_filenames, dwarf_decode_macros)
11550 (write_psymtabs_to_index): Use htab_up.
11551 * dwarf2loc.c (func_verify_no_selftailcall)
11552 (call_site_find_chain_1, func_verify_no_selftailcall)
11553 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11554 std::vector, gdb::unique_xmalloc_ptr.
11555 (call_sitep): Remove typedef.
11556 (dwarf2_locexpr_baton_eval): Remove unused variable.
11557
8dbcee67
TT
115582017-01-10 Tom Tromey <tom@tromey.com>
11559
11560 * python/python-internal.h (make_cleanup_py_decref)
11561 (make_cleanup_py_xdecref): Don't declare.
11562 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11563 (py_xdecref, make_cleanup_py_xdecref): Remove.
11564
13df46cc
TT
115652017-01-10 Tom Tromey <tom@tromey.com>
11566
11567 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11568 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11569
06fc9bf7
TT
115702017-01-10 Tom Tromey <tom@tromey.com>
11571
11572 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11573
830a4934
TT
115742017-01-10 Tom Tromey <tom@tromey.com>
11575
11576 * python/py-utils.c (unicode_to_encoded_string)
11577 (python_string_to_target_string)
11578 (python_string_to_target_python_string)
11579 (python_string_to_host_string, gdbpy_obj_to_string)
11580 (get_addr_from_python): Use gdbpy_ref.
11581
4586d543
TT
115822017-01-10 Tom Tromey <tom@tromey.com>
11583
11584 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11585 gdbpy_ref.
11586
59876f8f
TT
115872017-01-10 Tom Tromey <tom@tromey.com>
11588
11589 * python/python.c (eval_python_command, gdbpy_decode_line)
11590 (gdbpy_run_events, gdbpy_start_type_printers)
11591 (gdbpy_apply_type_printers): Use gdbpy_ref.
11592
97d83487
TT
115932017-01-10 Tom Tromey <tom@tromey.com>
11594
11595 * python/py-param.c (get_doc_string, compute_enum_values): Use
11596 gdbpy_ref.
11597
9205649a
TT
115982017-01-10 Tom Tromey <tom@tromey.com>
11599
11600 * python/py-inferior.c (find_thread_object, build_inferior_list):
11601 Use gdbpy_ref.
11602
74c49d45
TT
116032017-01-10 Tom Tromey <tom@tromey.com>
11604
11605 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11606
16361ffb
TT
116072017-01-10 Tom Tromey <tom@tromey.com>
11608
11609 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11610 gdbpy_ref.
11611
905f2cca
TT
116122017-01-10 Tom Tromey <tom@tromey.com>
11613
11614 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11615 extra incref.
11616 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11617 Use gdbpy_ref.
11618
64081434
TT
116192017-01-10 Tom Tromey <tom@tromey.com>
11620
11621 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11622 gdbpy_ref.
11623
59e9e831
TT
116242017-01-10 Tom Tromey <tom@tromey.com>
11625
11626 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11627 decref results of PyArg_ParseTupleAndKeywords.
11628
9de10f6d
TT
116292017-01-10 Tom Tromey <tom@tromey.com>
11630
11631 * python/python.c (python_run_simple_file): Use
11632 unique_xmalloc_ptr, gdbpy_ref.
11633
2bd5759d
TT
116342017-01-10 Tom Tromey <tom@tromey.com>
11635
11636 * python/py-prettyprint.c (print_stack_unless_memory_error)
11637 (print_string_repr, print_children): Use gdbpy_ref.
11638 (dummy_python_frame): New class.
11639 (dummy_python_frame::dummy_python_frame): Rename from
11640 push_dummy_python_frame.
11641 (py_restore_tstate): Remove.
11642
3b4e0e01
TT
116432017-01-10 Tom Tromey <tom@tromey.com>
11644
11645 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11646
17a22718
TT
116472017-01-10 Tom Tromey <tom@tromey.com>
11648
11649 * python/python.c (ensure_python_env, restore_python_env):
11650 Remove.
11651 * python/python-internal.h (ensure_python_env): Don't declare.
11652 * varobj.h (varobj_ensure_python_env): Don't declare.
11653 * varobj.c (varobj_ensure_python_env): Remove.
11654
68cdc557
TT
116552017-01-10 Tom Tromey <tom@tromey.com>
11656
11657 * varobj.c (varobj_value_get_print_value): Use
11658 gdbpy_enter_varobj.
11659
1eba6383
TT
116602017-01-10 Tom Tromey <tom@tromey.com>
11661
11662 * python/py-prettyprint.c (print_string_repr, print_children):
11663 Update.
11664 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11665 of "encoding".
11666 * varobj.c (varobj_value_get_print_value): Update.
11667 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11668
bde7b3e3
TT
116692017-01-10 Tom Tromey <tom@tromey.com>
11670
11671 * varobj.c (varobj_get_display_hint)
11672 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11673 (varobj_set_visualizer, free_variable): Use
11674 gdbpy_enter_varobj.
11675
a7785f8c
TT
116762017-01-10 Tom Tromey <tom@tromey.com>
11677
11678 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11679 (do_finish_initialization): New function. Use gdbpy_ref.
11680 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11681 do_finish_initialization.
11682
2865bfce
TT
116832017-01-10 Tom Tromey <tom@tromey.com>
11684
11685 * python/py-param.c (get_set_value, get_show_value): Use
11686 gdbpy_enter, gdbpy_ref.
11687
0e9dcc75
TT
116882017-01-10 Tom Tromey <tom@tromey.com>
11689
11690 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11691
12a5cedd
TT
116922017-01-10 Tom Tromey <tom@tromey.com>
11693
11694 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11695
788f2586
TT
116962017-01-10 Tom Tromey <tom@tromey.com>
11697
11698 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11699 Use gdbpy_enter_varobj.
11700
6cd67bea
TT
117012017-01-10 Tom Tromey <tom@tromey.com>
11702
11703 * varobj.c (gdbpy_enter_varobj): New constructor.
11704 * python/python-internal.h (gdbpy_enter_varobj): New class.
11705 * python/py-varobj.c (py_varobj_get_iterator): Use
11706 gdbpy_enter_varobj.
11707
14b122bf
TT
117082017-01-10 Tom Tromey <tom@tromey.com>
11709
11710 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11711 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11712 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11713 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11714 unique_xmalloc_ptr.
11715 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11716
bf1ca3b9
TT
117172017-01-10 Tom Tromey <tom@tromey.com>
11718
11719 * python/py-xmethods.c (invoke_match_method): Use
11720 gdbpy_ref.
11721
572a5524
TT
117222017-01-10 Tom Tromey <tom@tromey.com>
11723
11724 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11725 gdbpy_enter, gdbpy_ref.
11726
396a78b6
TT
117272017-01-10 Tom Tromey <tom@tromey.com>
11728
11729 * python/python.c (python_interactive_command): Use gdbpy_enter.
11730
a88b13c7
TT
117312017-01-10 Tom Tromey <tom@tromey.com>
11732
11733 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11734 gdbpy_ref.
11735
e9f0c363
TT
117362017-01-10 Tom Tromey <tom@tromey.com>
11737
11738 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11739 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11740
6349f452
TT
117412017-01-10 Tom Tromey <tom@tromey.com>
11742
11743 * utils.h (htab_deleter): New struct.
11744 (htab_up): New typedef.
11745 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11746 gdbpy_enter, gdbpy_ref, htab_up.
11747
c0171de6
TT
117482017-01-10 Tom Tromey <tom@tromey.com>
11749
11750 * python/py-unwind.c (pending_frame_invalidate): Remove.
11751 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11752
f18e226f
TT
117532017-01-10 Tom Tromey <tom@tromey.com>
11754
11755 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11756 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11757
c57af3f1
TT
117582017-01-10 Tom Tromey <tom@tromey.com>
11759
11760 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11761
60e600ec
TT
117622017-01-10 Tom Tromey <tom@tromey.com>
11763
11764 * python/python.c (gdbpy_eval_from_control_command)
11765 (gdbpy_source_script, gdbpy_run_events)
11766 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11767 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11768 gdbpy_enter.
11769
bf7da5b0
TT
117702017-01-10 Tom Tromey <tom@tromey.com>
11771
11772 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11773
2d38bced
TT
117742017-01-10 Tom Tromey <tom@tromey.com>
11775
11776 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11777
07bc7329
TT
117782017-01-10 Tom Tromey <tom@tromey.com>
11779
11780 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11781 (python_on_inferior_call_pre, python_on_inferior_call_post)
11782 (python_on_memory_change, python_on_register_change)
11783 (python_inferior_exit, python_new_objfile, add_thread_object)
11784 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11785
6e7c365e
TT
117862017-01-10 Tom Tromey <tom@tromey.com>
11787
11788 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11789 (bpfinishpy_handle_exit): Use gdbpy_enter.
11790
6ba0cd40
TT
117912017-01-10 Tom Tromey <tom@tromey.com>
11792
11793 * python/py-cmd.c (cmdpy_destroyer)
11794 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11795 gdbpy_enter.
11796
de2dc875
TT
117972017-01-10 Tom Tromey <tom@tromey.com>
11798
11799 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11800 gdbpy_enter.
11801 (gdbpy_breakpoint_has_cond): Likewise.
11802
4ecee2c4
TT
118032017-01-10 Tom Tromey <tom@tromey.com>
11804
11805 * python/python.c (gdbpy_enter): New constructor.
11806 (~gdbpy_enter): New destructor.
11807 (restore_python_env, ensure_python_env): Rewrite.
11808 * python/python-internal.h (gdbpy_enter): New class.
11809
37fce74f
TT
118102017-01-10 Tom Tromey <tom@tromey.com>
11811
11812 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11813
53a0cca3
TT
118142017-01-10 Tom Tromey <tom@tromey.com>
11815
11816 * python/py-value.c (value_has_field, get_field_flag)
11817 (get_field_type, valpy_getitem, convert_value_from_python): Use
11818 gdbpy_ref.
11819
ff3724f5
TT
118202017-01-10 Tom Tromey <tom@tromey.com>
11821
11822 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11823 gdbpy_ref.
11824
0700aea5
TT
118252017-01-10 Tom Tromey <tom@tromey.com>
11826
11827 * python/py-prettyprint.c (search_pp_list)
11828 (find_pretty_printer_from_objfiles)
11829 (find_pretty_printer_from_progspace)
11830 (find_pretty_printer_from_gdb, find_pretty_printer)
11831 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11832 gdbpy_ref.
11833
1bb44c9f
TT
118342017-01-10 Tom Tromey <tom@tromey.com>
11835
11836 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11837
87ce03fd
TT
118382017-01-10 Tom Tromey <tom@tromey.com>
11839
11840 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11841 (ltpy_get_all_source_lines): Use gdbpy_ref.
11842
ee0a3fb8
TT
118432017-01-10 Tom Tromey <tom@tromey.com>
11844
11845 * python/py-framefilter.c (extract_sym, extract_value)
11846 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11847 gdbpy_ref.
11848
bf2a52fa
TT
118492017-01-10 Tom Tromey <tom@tromey.com>
11850
11851 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11852
f59fe7f8
TT
118532017-01-10 Tom Tromey <tom@tromey.com>
11854
11855 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11856
80bd970a
TT
118572017-01-10 Tom Tromey <tom@tromey.com>
11858
11859 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11860 gdbpy_ref.
11861
d1b3de2e
TT
118622017-01-10 Tom Tromey <tom@tromey.com>
11863
11864 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11865
3bb43384
TT
118662017-01-10 Tom Tromey <tom@tromey.com>
11867
11868 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11869 (typy_range): Use gdbpy_ref.
11870
abf5651e
TT
118712017-01-10 Tom Tromey <tom@tromey.com>
11872
11873 * python/py-threadevent.c (create_thread_event_object): Use
11874 gdbpy_ref.
11875 * python/py-stopevent.c (create_stop_event_object): Simplify.
11876 (emit_stop_event): Use gdbpy_ref.
11877 * python/py-signalevent.c (create_signal_event_object): Use
11878 gdbpy_ref.
11879 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11880 (emit_new_objfile_event, create_clear_objfiles_event_object)
11881 (emit_clear_objfiles_event): Use gdbpy_ref.
11882 * python/py-infevents.c (create_inferior_call_event_object)
11883 (create_register_changed_event_object)
11884 (create_memory_changed_event_object, emit_inferior_call_event)
11885 (emit_memory_changed_event, emit_register_changed_event): Use
11886 gdbpy_ref.
11887 * python/py-exitedevent.c (create_exited_event_object)
11888 (emit_exited_event): Use gdbpy_ref.
11889 * python/py-event.h (evpy_emit_event): Remove
11890 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11891 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11892 * python/py-continueevent.c (emit_continue_event): Use
11893 gdbpy_ref.
11894 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11895 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11896 gdbpy_ref.
11897 * python/py-bpevent.c (create_breakpoint_event_object): Use
11898 gdbpy_ref.
11899
a68ff33e
TT
119002017-01-10 Tom Tromey <tom@tromey.com>
11901
11902 * python/py-ref.h: New file.
11903
7becfd03
SM
119042017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11905
11906 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11907 void.
11908 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11909 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11910 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11911 * ui-out.c (ui_out::redirect): Likewise.
11912 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11913 * cli/cli-logging.c (set_logging_redirect): Update call site of
11914 ui_out::redirect.
11915 (handle_redirections): Likewise.
11916 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11917 * top.c (execute_command_to_string): Likewise.
11918 * utils.c (do_ui_out_redirect_pop): Likewise.
11919
df294654
SM
119202017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11921
11922 * stack.c (_initialize_stack): Update "frame" command help message.
11923
f5e6296e
IB
119242017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11925
11926 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11927
0e2d6fa6
YQ
119282017-01-06 Yao Qi <yao.qi@linaro.org>
11929
11930 * x86-linux-nat.h: Include gdb_proc_service.h.
11931
44d6d3f9
YQ
119322017-01-06 Yao Qi <yao.qi@linaro.org>
11933
11934 * ser-base.h: Include serial.h.
11935
656731fe
YQ
119362017-01-06 Yao Qi <yao.qi@linaro.org>
11937
11938 * ppc-linux-tdep.h: Include ppc-tdep.h.
11939
1ca8f924
YQ
119402017-01-06 Yao Qi <yao.qi@linaro.org>
11941
11942 * nat/amd64-linux-siginfo.h: Include signal.h.
11943
bc3008c4
YQ
119442017-01-06 Yao Qi <yao.qi@linaro.org>
11945
11946 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11947
66c80d03
YQ
119482017-01-06 Yao Qi <yao.qi@linaro.org>
11949
11950 * mi/mi-parse.h: Include mi-cmds.h.
11951
051d2dda
YQ
119522017-01-06 Yao Qi <yao.qi@linaro.org>
11953
11954 * inf-loop.c: Don't include "target.h".
11955 * inf-loop.h: Include it here.
11956
8018d34f
YQ
119572017-01-06 Yao Qi <yao.qi@linaro.org>
11958
11959 * dfp.h: Include "dboulest.h" and "expression.h".
11960
c0b8369c
YQ
119612017-01-06 Yao Qi <yao.qi@linaro.org>
11962
11963 * ax-gdb.h: Include "ax.h".
11964
ad5cba2a
YQ
119652017-01-06 Yao Qi <yao.qi@linaro.org>
11966
11967 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11968 with nat/gdb_ptrace.h.
11969
1c33cd7f
YQ
119702017-01-05 Yao Qi <yao.qi@linaro.org>
11971
11972 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11973 new line.
11974 (mips64_fbsd_sigframe_init): Likewise.
11975
c988ac1d
JB
119762017-01-04 John Baldwin <jhb@FreeBSD.org>
11977
11978 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11979 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11980
b268007c
JB
119812017-01-04 John Baldwin <jhb@FreeBSD.org>
11982
11983 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11984 * NEWS: Mention new FreeBSD/mips native configuration.
11985 * config/mips/fbsd.mh: New file.
11986 * configure.host: Add mips*-*-freebsd*.
11987 * mips-fbsd-nat.c: New file.
11988
387360da
JB
119892017-01-04 John Baldwin <jhb@FreeBSD.org>
11990
11991 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11992 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11993 * NEWS: Mention new FreeBSD/mips target.
11994 * configure.tgt: Add mips*-*-freebsd*.
11995 * mips-fbsd-tdep.c: New file.
11996 * mips-fbsd-tdep.h: New file.
11997
2aaaf250
YQ
119982017-01-04 Yao Qi <yao.qi@linaro.org>
11999
12000 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12001 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12002
61baf725
JB
120032017-01-01 Joel Brobecker <brobecker@adacore.com>
12004
6dbb839a 12005 Update copyright year range in all GDB files.
61baf725 12006
c113e7ff 120072017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 12008
c113e7ff 12009 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 12010
c113e7ff 12011For older changes see ChangeLog-2016.
c906108c
SS
12012\f
12013Local Variables:
12014mode: change-log
12015left-margin: 8
12016fill-column: 74
12017version-control: never
57da7796 12018coding: utf-8
c906108c 12019End: