]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
gdbserver/libthread_db: Don't ignore memory reading failures
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
b2f8eb7a
PA
12017-09-28 Pedro Alves <palves@redhat.com>
2
3 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4 unittests/common-utils-selftests.c.
5 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
6 (COMMON_OBS): Remove utils-selftests.o.
7 * utils-selftests.c: Move to ...
8 * unittests/common-utils-selftests.c: ... here and rename self
9 test to "string_printf".
10
08302ed2
DE
112017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
12
13 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
14 having NULL cus or tus.
15
96a5a1d3
UW
162017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
17
18 * arm-tdep.c: (convert_from_extended): Remove.
19 (convert_to_extended): Likewise.
20 (arm_extract_return_value): Use convert_typed_floating.
21 (arm_store_return_value): Likewise.
22
23 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
24 * sh-tdep.c: Do not include "floatformat.h".
25 (sh_littlebyte_bigword_type): New function.
26 (sh_register_convert_to_virtual): Use convert_typed_floating.
27 (sh_register_convert_to_raw): Likewise.
28 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
29 (sh64_littlebyte_bigword_type): New function.
30 (sh64_extract_return_value): Use convert_typed_floating.
31 (sh64_register_convert_to_virtual): Likewise.
32 (sh64_register_convert_to_raw): Likewise.
33
0db7851f
UW
342017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
35
36 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
37 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
38
39 * gdbtypes.h (union type_specific): Make field floatformat hold
40 just a single struct floatformat, not an array.
41 (floatformat_from_type): Move here.
42 * gdbtypes.c (floatformat_from_type): Move here. Update to
43 changed TYPE_FLOATFORMAT definition.
44 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
45 (recursive_dump_type): Likewise.
46 (init_float_type): Install correct floatformat for byte order.
47 (arch_float_type): Likewise.
48
77b7c781
UW
492017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
50
51 * gdbtypes.c (init_type): Change incoming argument from
52 length-in-bytes to length-in-bits. Assert length is a
53 multiple of TARGET_CHAR_BITS.
54 (arch_type, arch_flags_type): Likewise.
55 (init_integer_type): Update call to init_type.
56 (init_character_type): Likewise.
57 (init_boolean_type): Likewise.
58 (init_float_type): Likewise.
59 (init_decfloat_type): Likewise.
60 (init_complex_type): Likewise.
61 (init_pointer_type): Likewise.
62 (objfile_type): Likewise.
63 (arch_integer_type): Update call to arch_type.
64 (arch_character_type): Likewise.
65 (arch_boolean_type): Likewise.
66 (arch_float_type): Likewise.
67 (arch_decfloat_type): Likewise.
68 (arch_complex_type): Likewise.
69 (arch_pointer_type): Likewise.
70 (gdbtypes_post_init): Likewise.
71
72 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
73 (read_base_type): Likewise.
74 * mdebugread.c (basic_type): Likewise.
75 * stabsread.c (dbx_init_float_type): Likewise.
76 (rs6000_builtin_type): Likewise.
77 (read_range_type): Likewise. Also, fix call to init_integer_type
78 with erroneous length argument.
79
80 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
81 * d-lang.c (build_d_types): Likewise.
82 * f-lang.c (build_fortran_types): Likewise.
83 * go-lang.c (build_go_types): Likewise.
84 * opencl-lang.c (build_opencl_types): Likewise.
85 * jit.c (finalize_symtab): Likewise.
86 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
87 (build_std_type_info_type): Likewise.
88 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
89 update call to arch_flags_type.
90
91 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
92 arch_type.
93 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
94 * windows-tdep.c (windows_get_tlb_type): Likewise.
95
96 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
97 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
98 * m32c-tdep.c (make_types): Likewise.
99 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
100 (rl78_psw_type): Update call to arch_flags_type.
101 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
102 * rx-tdep.c (rx_psw_type): Likewise.
103 (rx_fpsw_type): Likewise.
104 * sparc-tdep.c (sparc_psr_type): Likewise.
105 (sparc_fsr_type): Likewise.
106 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
107 (sparc64_ccr_type): Likewise.
108 (sparc64_fsr_type): Likewise.
109 (sparc64_fprs_type): Likewise.
110
f21b4d5c
TT
1112017-09-27 Tom Tromey <tom@tromey.com>
112
113 * findcmd.c (find_command): Constify.
114
643c2ffa
TT
1152017-09-27 Tom Tromey <tom@tromey.com>
116
117 * ada-tasks.c (task_command_1, task_command): Constify.
118
510e5e56
TT
1192017-09-27 Tom Tromey <tom@tromey.com>
120
121 * symtab.c (maintenance_print_symbol_cache)
122 (maintenance_flush_symbol_cache)
123 (maintenance_print_symbol_cache_statistics): Constify.
124
e503b191
TT
1252017-09-27 Tom Tromey <tom@tromey.com>
126
127 * inferior.c (detach_inferior_command, kill_inferior_command)
128 (inferior_command): Constify.
129
4e001312
TT
1302017-09-27 Tom Tromey <tom@tromey.com>
131
132 * regcache.c (regcache_print, maintenance_print_registers)
133 (maintenance_print_raw_registers)
134 (maintenance_print_cooked_registers)
135 (maintenance_print_register_groups)
136 (maintenance_print_remote_registers): Constify.
137
77763700
TT
1382017-09-27 Tom Tromey <tom@tromey.com>
139
140 * printcmd.c (map_display_numbers, undisplay_command)
141 (enable_disable_display_command, enable_display_command)
142 (disable_display_command): Constify.
143
4495129a
TT
1442017-09-27 Tom Tromey <tom@tromey.com>
145
146 * breakpoint.h (delete_command): Don't declare.
147 * breakpoint.c (delete_command, enable_once_command)
148 (enable_count_command, enable_delete_command, breakpoint_1)
149 (maintenance_info_breakpoints, stopin_command, stopat_command)
150 (delete_command, delete_trace_command, save_breakpoints)
151 (save_breakpoints_command, save_tracepoints_command): Constify.
152
3088cf40
TT
1532017-09-27 Tom Tromey <tom@tromey.com>
154
155 * macrocmd.c (macro_expand_command, macro_expand_once_command)
156 (skip_ws, extract_identifier, macro_define_command)
157 (macro_undef_command, macro_list_command): Constify.
158
69f476a3
TT
1592017-09-27 Tom Tromey <tom@tromey.com>
160
161 * infcmd.c (environment_info, set_environment_command)
162 (unset_environment_command, path_info, info_proc_cmd_1)
163 (info_proc_cmd_mappings, info_proc_cmd_stat)
164 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
165 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
166
c4a3e68e
TT
1672017-09-27 Tom Tromey <tom@tromey.com>
168
169 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
170 Constify.
171
c9d31bd6
TT
1722017-09-27 Tom Tromey <tom@tromey.com>
173
174 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
175
1f3f85eb
TT
1762017-09-27 Tom Tromey <tom@tromey.com>
177
178 * demangle.c (demangle_command): Constify.
179
9c504b5d
TT
1802017-09-27 Tom Tromey <tom@tromey.com>
181
182 * progspace.c (maintenance_info_program_spaces_command):
183 Constify.
184
6663cf91
TT
1852017-09-27 Tom Tromey <tom@tromey.com>
186
187 * compile/compile.c (check_raw_argument, compile_file_command)
188 (compile_code_command, compile_print_command): Constify.
189
34e5fa26
TT
1902017-09-27 Tom Tromey <tom@tromey.com>
191
192 * reggroups.c (maintenance_print_reggroups): Constify.
193
8384c356
TT
1942017-09-27 Tom Tromey <tom@tromey.com>
195
196 * dwarf2read.c (save_gdb_index_command): Constify.
197
884beb0c
TT
1982017-09-27 Tom Tromey <tom@tromey.com>
199
200 * stap-probe.c (info_probes_stap_command): Constify.
201
e0b2930c
TT
2022017-09-27 Tom Tromey <tom@tromey.com>
203
204 * fork-child.c (unset_exec_wrapper_command): Constify.
205
f938677d
TT
2062017-09-27 Tom Tromey <tom@tromey.com>
207
208 * btrace.c (get_uint, get_context_size, no_chunk)
209 (maint_btrace_packet_history_cmd)
210 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
211 (maint_info_btrace_cmd): Constify.
212
8949cb87
TT
2132017-09-27 Tom Tromey <tom@tromey.com>
214
215 * reverse.c (delete_bookmark_command): Constify.
216
ac88e2de
TT
2172017-09-27 Tom Tromey <tom@tromey.com>
218
219 * remote.c (set_memory_packet_size)
220 (set_memory_write_packet_size, show_memory_write_packet_size)
221 (set_memory_read_packet_size, show_memory_read_packet_size)
222 (compare_sections_command, packet_command, remote_put_command)
223 (remote_get_command, remote_delete_command): Constify.
224
bd4c9dfe
TT
2252017-09-27 Tom Tromey <tom@tromey.com>
226
227 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
228 (set_mipsfpu_double_command, set_mipsfpu_none_command)
229 (set_mipsfpu_auto_command): Constify.
230
5e93d4c6
TT
2312017-09-27 Tom Tromey <tom@tromey.com>
232
233 * cli/cli-cmds.h (cd_command): Constify.
234 * cli/cli-cmds.c (cd_command): Constify.
235
fc41a75b
TT
2362017-09-27 Tom Tromey <tom@tromey.com>
237
238 * thread.c (thread_name_command, thread_find_command): Constify.
239
67810076
TT
2402017-09-27 Tom Tromey <tom@tromey.com>
241
242 * probe.c (enable_probes_command, disable_probes_command):
243 Constify.
244
1d8b34a7
TT
2452017-09-27 Tom Tromey <tom@tromey.com>
246
247 * symfile.c (symbol_file_command): Constify.
248 * gdbcore.h (deprecated_file_changed_hook): Constify.
249 * exec.c (deprecated_file_changed_hook, exec_file_command)
250 (file_command): Constify.
251 * defs.h (symbol_file_command): Constify.
252
442019e1
TT
2532017-09-27 Tom Tromey <tom@tromey.com>
254
255 * remote-fileio.c (set_system_call_allowed)
256 (show_system_call_allowed): Constify.
257
2983f7cb
TT
2582017-09-27 Tom Tromey <tom@tromey.com>
259
260 * tracepoint.c (delete_trace_variable_command)
261 (tfind_end_command, tfind_start_command, tfind_pc_command)
262 (tfind_tracepoint_command, tfind_line_command)
263 (tfind_range_command, tfind_outside_command): Constify.
264
4fd41b24
TT
2652017-09-27 Tom Tromey <tom@tromey.com>
266
267 * ax-gdb.c (maint_agent_printf_command, agent_command)
268 (agent_eval_command): Constify.
269
f2fc3015
TT
2702017-09-27 Tom Tromey <tom@tromey.com>
271
272 * tracepoint.c (info_scope_command): Constify.
273 * python/python.c (gdbpy_decode_line): Constify.
274 * python/py-breakpoint.c (bppy_init): Constify.
275 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
276 * location.h: (new_linespec_location)
277 (string_to_event_location_basic, string_to_event_location):
278 Constify.
279 * location.c (new_linespec_location)
280 (string_to_event_location_basic, string_to_event_location):
281 Constify.
282 * linespec.h (decode_line_with_current_source)
283 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
284 * linespec.c (linespec_lex_to_end)
285 (decode_line_with_current_source)
286 (decode_line_with_last_displayed): Constify.
287 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
288 Constify.
289 * cli/cli-cmds.c (edit_command, list_command): Constify.
290 * breakpoint.h (until_break_command, watch_command_wrapper)
291 (awatch_command_wrapper, rwatch_command_wrapper)
292 (init_ada_exception_breakpoint): Constify.
293 * breakpoint.c (break_command_1, dprintf_command)
294 (break_range_command, watch_command_wrapper)
295 (rwatch_command_wrapper, awatch_command_wrapper)
296 (until_break_command, init_ada_exception_breakpoint)
297 (strace_marker_create_sals_from_location, trace_command)
298 (ftrace_command, strace_command, struct tracepoint): Constify.
299 * ax-gdb.c (agent_command_1): Constify.
300 * ada-lang.c (ada_exception_sal): Constify.
301
8c2f95f4
TT
3022017-09-27 Tom Tromey <tom@tromey.com>
303
304 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
305 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
306 (get_context_size, no_chunk, get_insn_history_modifiers)
307 (cmd_record_insn_history, get_call_history_modifiers)
308 (cmd_record_call_history): Constify.
309
a0d65762
TT
3102017-09-27 Tom Tromey <tom@tromey.com>
311
312 * source.c (show_substitute_path_command)
313 (unset_substitute_path_command, set_substitute_path_command):
314 Constify.
315
58971144
TT
3162017-09-27 Tom Tromey <tom@tromey.com>
317
318 * typeprint.c (maintenance_print_type): Constify.
319 * maint.c (maintenance_dump_me, maintenance_demangle)
320 (maintenance_time_display, maintenance_info_sections)
321 (maintenance_print_statistics, maintenance_deprecate)
322 (maintenance_undeprecate): Constify.
323 (maintenance_do_deprecate): Constify. Use std::string.
324 (maintenance_selftest): Constify.
325 * gdbtypes.h (maintenance_print_type): Constify.
326
c482f52c
TT
3272017-09-27 Tom Tromey <tom@tromey.com>
328
329 * hppa-tdep.c (unwind_command): Constify.
330
e100df1a
TT
3312017-09-27 Tom Tromey <tom@tromey.com>
332
333 * target-descriptions.c (unset_tdesc_filename_cmd)
334 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
335 Constify.
336
31d56ade
TT
3372017-09-27 Tom Tromey <tom@tromey.com>
338
339 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
340
b961da0b
TT
3412017-09-27 Tom Tromey <tom@tromey.com>
342
343 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
344
e2d8ae16
TT
3452017-09-27 Tom Tromey <tom@tromey.com>
346
347 * tui/tui-regs.c (tui_reg_command): Constify.
348
863779b0
TT
3492017-09-27 Tom Tromey <tom@tromey.com>
350
351 * skip.c (skip_file_command, skip_function_command)
352 (skip_enable_command, skip_disable_command, skip_delete_command):
353 Constify.
354
cdb34d4a
TT
3552017-09-27 Tom Tromey <tom@tromey.com>
356
357 * record-btrace.c (cmd_record_btrace_bts_start)
358 (cmd_record_btrace_pt_start): Constify.
359
e99c83e7
TT
3602017-09-27 Tom Tromey <tom@tromey.com>
361
362 * symmisc.c (maintenance_print_symbols)
363 (maintenance_print_msymbols, maintenance_print_objfiles)
364 (maintenance_info_symtabs, maintenance_check_symtabs)
365 (maintenance_expand_symtabs, maintenance_info_line_tables):
366 Constify.
367
32faf971
TT
3682017-09-27 Tom Tromey <tom@tromey.com>
369
370 * top.c (new_ui_command): Constify.
371
2cf311eb
TT
3722017-09-27 Tom Tromey <tom@tromey.com>
373
374 * symfile.c (add_symbol_file_command)
375 (remove_symbol_file_command, list_overlays_command)
376 (map_overlay_command, unmap_overlay_command)
377 (overlay_auto_command, overlay_manual_command)
378 (overlay_off_command, overlay_load_command): Constify.
379
e6738699
TT
3802017-09-27 Tom Tromey <tom@tromey.com>
381
382 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
383 (info_spu_mailbox_command, info_spu_dma_command)
384 (info_spu_proxydma_command): Constify.
385
aa360cd5
TT
3862017-09-27 Tom Tromey <tom@tromey.com>
387
388 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
389
898241a5
TT
3902017-09-27 Tom Tromey <tom@tromey.com>
391
392 * cli/cli-script.c (user_defined_command): Constify.
393
2d0ac106
TT
3942017-09-27 Tom Tromey <tom@tromey.com>
395
396 * cli/cli-dump.c (dump_memory_command, dump_value_command)
397 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
398 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
399 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
400 (dump_binary_value, append_binary_memory, append_binary_value):
401 Constify.
402 (struct dump_context) <func>: Constify.
403 (add_dump_command): Update.
404
dede02ce
TT
4052017-09-27 Tom Tromey <tom@tromey.com>
406
407 * cli/cli-cmds.c (show_version, show_configuration)
408 (source_command, show_user): Constify.
409
d3cb6b99
TT
4102017-09-27 Tom Tromey <tom@tromey.com>
411
412 * target.c (maintenance_print_target_stack): Constify.
413
1970a12f
TT
4142017-09-27 Tom Tromey <tom@tromey.com>
415
416 * interps.c (interpreter_exec_cmd): Constify.
417
41243651
TT
4182017-09-27 Tom Tromey <tom@tromey.com>
419
420 * record-full.c (cmd_record_full_restore): Constify.
421
4465d9db
TT
4222017-09-27 Tom Tromey <tom@tromey.com>
423
424 * memattr.c (enable_mem_command, disable_mem_command)
425 (delete_mem_command): Constify.
426
ad25e423
TT
4272017-09-27 Tom Tromey <tom@tromey.com>
428
429 * value.c (show_convenience): Constify.
430
d64097b1
TT
4312017-09-27 Tom Tromey <tom@tromey.com>
432
433 * gdbcore.h (core_file_command): Update.
434 * corefile.c (core_file_command): Constify.
435
4d4589ef
TT
4362017-09-27 Tom Tromey <tom@tromey.com>
437
438 * user-regs.c (maintenance_print_user_registers): Constify.
439
32a7bf17
TT
4402017-09-27 Tom Tromey <tom@tromey.com>
441
442 * cp-namespace.c (maintenance_cplus_namespace): Constify.
443
4a475551
TT
4442017-09-27 Tom Tromey <tom@tromey.com>
445
446 * cp-support.c (first_component_command): Constify.
447
990b9f9f
TT
4482017-09-27 Tom Tromey <tom@tromey.com>
449
450 * psymtab.c (maintenance_print_psymbols)
451 (maintenance_info_psymtabs, maintenance_check_psymtabs):
452 Constify.
453
c281872e
TT
4542017-09-27 Tom Tromey <tom@tromey.com>
455
456 * windows-tdep.c (display_tib): Constify.
457
5b64bf74
TT
4582017-09-27 Tom Tromey <tom@tromey.com>
459
460 * linux-fork.c (delete_checkpoint_command)
461 (detach_checkpoint_command): Constify.
462
4ada038f
TT
4632017-09-27 Tom Tromey <tom@tromey.com>
464
465 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
466
57f5a81b
TT
4672017-09-27 Tom Tromey <tom@tromey.com>
468
469 * arc-tdep.c (dump_arc_instruction_command): Constify.
470
b0a8e6c4
TT
4712017-09-27 Tom Tromey <tom@tromey.com>
472
473 * valprint.c (set_radix, show_radix): Constify.
474
8d97dc1c
TT
4752017-09-27 Tom Tromey <tom@tromey.com>
476
477 * dtrace-probe.c (info_probes_dtrace_command): Constify.
478
eb7c454d
TT
4792017-09-27 Tom Tromey <tom@tromey.com>
480
481 * command.h (not_just_help_class_command): Update.
482 * cli/cli-decode.h (not_just_help_class_command): Update.
483 * cli/cli-decode.c (not_just_help_class_command): Constify.
484
e4e33335
TT
4852017-09-27 Tom Tromey <tom@tromey.com>
486
487 * gdb_bfd.c (maintenance_info_bfds): Constify.
488
0450cc4c
TT
4892017-09-27 Tom Tromey <tom@tromey.com>
490
491 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
492 overloads.
493 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
494 (do_const_cfunc): New function.
495 (cmd_cfunc_eq): New overload.
496 (cli_user_command_p): Check do_const_cfunc.
497 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
498 const_cfunc.
499 * command.h (add_cmd): Add const overload and no-function
500 overload.
501 (set_cmd_cfunc): Add const overload.
502 (cmd_const_cfunc_ftype): Declare.
503 (cmd_cfunc_eq): Add const overload.
504 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
505 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
506 overload.
507
a9bbfbd8
TT
5082017-09-27 Tom Tromey <tom@tromey.com>
509
510 * macroexp.c (get_next_token_for_substitution): New function.
511 (substitute_args): Call it. Check for __VA_OPT__.
512
5230b05a
WT
5132017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
514 Pedro Alves <palves@redhat.com>
515
516 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
517 producer_is_icc_lt_14.
518 (producer_is_icc_lt_14): New function.
519 (check_producer): Add code for checking version of ICC.
520 (producer_is_icc): Move to producer.c.
521 (read_structure_type): Restrict ICC workaround to ICC<14.
522 * producer.c: Include selftest.h.
523 (producer_is_icc, producer_parsing_tests, _initialize_producer):
524 New functions.
525 * producer.h (producer_is_icc): New declaration.
526
b32b108a
WT
5272017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
528
529 * Makefile.in (SFILES): Add producer.c.
530 (COMMON_OBS): Add producer.o
531 * amd64-tdep.c (producer.h): Add new include.
532 * dwarf2read.c (producer.h): Add new include.
533 * producer.c: New file.
534 * producer.h: New file.
535 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
536 producer.c.
537 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
538 producer.h.
539
5007d765
MK
5402017-09-26 Matthias Klose <doko@ubuntu.com>
541
542 * configure.ac: Search ncursesw before ncurses.
543 Check ncursesw/ncurses.h before ncurses/ncurses.h.
544 * gdb_curses.h: Include <ncursesw/ncurses.h>
545 * config.in, configure: Regenerate.
546
281c4447
RO
5472017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
548
549 PR gdb/22185
550 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
551 obsolete.
552 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
553 Remove i386sol2 support.
554 * configure.nat <i386sol2>: Remove.
555 <sol2-64>: Fold into ...
556 <sol2>: ... this.
557 Move common settings to default section.
558 Add sol-thread.o.
559 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
560 x86_64-*-solaris2.1[0-9]*>: Rename to ...
561 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
562 <i[34567]86-*-solaris*>: Remove.
563 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
564
565 * configure.ac: Remove wctype in libw check.
566 (_MSE_INT_H): Don't define on Solaris 7-9.
567 <solaris*>: Remove libthread_db.so.1 check.
568 * configure: Regenerate.
569 * config.in: Regenerate.
570
571 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
572 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
573 (gdb_ps_size_t): Remove.
574 Use base types in users.
575 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
576
577 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
578
39b06c20
RO
5792017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
580
581 PR build/22206
582 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
583 (adi_is_addr_mapped): Likewise.
584 (PSR_ICC): Don't redefine.
585 (PSR_IMPL): Likewise.
586
6c3e20f1
TT
5872017-09-25 Tom Tromey <tom@tromey.com>
588
589 * regcache.c (regcache::dump): Use string_printf.
590
b292235f
TT
5912017-09-25 Tom Tromey <tom@tromey.com>
592
593 * regcache.c (class regcache_invalidator): New.
594 (struct register_to_invalidate): Remove.
595 (make_cleanup_regcache_invalidate): Remove.
596 (regcache::raw_write): Use regcache_invalidator.
597
9ac86b52
TT
5982017-09-25 Tom Tromey <tom@tromey.com>
599
600 * spu-tdep.c (spu2ppu_sniffer): Update.
601 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
602 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
603 Remove.
604 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
605 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
606 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
607 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
608 (frame_pop): Update.
609
c0e383c6
TT
6102017-09-25 Tom Tromey <tom@tromey.com>
611
612 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
613 * regcache.h (regcache_xfree): Don't declare.
614 * regcache.c (regcache_xfree): Remove.
615 (do_regcache_xfree): Use delete.
616 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
617 * linux-fork.c (free_fork): Use delete.
618 (fork_save_infrun_state): Likewise.
619 * jit.c (jit_dealloc_cache): Use delete.
620 * infrun.c (discard_infcall_suspend_state): Use delete.
621
791199cc
TT
6222017-09-25 Tom Tromey <tom@tromey.com>
623
624 * regcache.h (regcache_xmalloc): Don't declare.
625 (regcache_raw_set_cached_value): Update comment.
626 * regcache.c (regcache_xmalloc): Remove.
627 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
628 * jit.c (jit_frame_sniffer): Use new.
629 * frame.c (frame_save_as_regcache): Use new.
630
289e23aa
AA
6312017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
632
633 * NEWS: Advertise support for guarded-storage registers on IBM z.
634
1b63490c
AA
6352017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
636
637 * s390-linux-nat.c (have_regset_gs): New static variable.
638 (s390_linux_fetch_inferior_registers): Handle guarded-storage
639 control block and guarded-storage broadcast control regsets.
640 (s390_read_description): Detect whether the target has
641 guarded-storage support, return appropriate tdesc.
642 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
643 (features/s390x-gs-linux64.c): Likewise.
644 (struct gdbarch_tdep) <have_gs>: New field.
645 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
646 (s390_gsbc_regset): New variables.
647 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
648 and s390_gsbc_regset, if applicable.
649 (s390_core_read_description): Check whether core file was from a
650 target with guarded-storage support; include appropriate regsets.
651 (s390_gdbarch_init): Add registers for guarded-storage support.
652 (_initialize_s390_tdep): Initialize new target descriptions that
653 include registers for guarded-storage support.
654 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
655 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
656 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
657 (S390_NUM_REGS): Adjust macro definition.
658 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
659 (tdesc_s390x_gs_linux64): New declarations.
660
96235dc1
AA
6612017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
662
663 * features/s390-gs-linux64.xml: New file.
664 * features/s390-gs.xml: New file.
665 * features/s390-gsbc.xml: New file.
666 * features/s390x-gs-linux64.xml: New file.
667 * features/Makefile (WHICH): Add s390-gs-linux64 and
668 s390x-gs-linux64.
669 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
670 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
671 * features/s390-gs-linux64.c: New generated file.
672 * features/s390x-gs-linux64.c: New file.
673 * regformats/s390-gs-linux64.dat: New file.
674 * regformats/s390x-gs-linux64.dat: New file.
675
b4a7c699
TT
6762017-09-23 Tom Tromey <tom@tromey.com>
677
678 * defs.h (make_cleanup_override_quit_handler): Don't declare.
679
c2f97536
TT
6802017-09-22 Tom Tromey <tom@tromey.com>
681
682 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
683 type to scoped_restore_tmpl.
684 <scoped_input_handler>: Initialize m_quit_handler directly.
685
43573013
SDJ
6862017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
687
688 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
689 (cd_command): Likewise. Free "current_directory" before
690 assigning to it.
691 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
692 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
693 * top.c (gdb_dirbuf): Remove global declaration.
694 * top.h (gdb_dirbuf): Likewise.
695
6ec2e0f5
SDJ
6962017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
697
698 * gnulib/aclocal.m4: Regenerate.
699 * gnulib/config.in: Regenerate.
700 * gnulib/configure: Regenerate.
701 * gnulib/import/Makefile.am: Regenerate.
702 * gnulib/import/Makefile.in: Regenerate.
703 * gnulib/import/assure.h: New file.
704 * gnulib/import/at-func.c: Likewise
705 * gnulib/import/chdir-long.c: New file.
706 * gnulib/import/chdir-long.h: New file.
707 * gnulib/import/cloexec.c: New file.
708 * gnulib/import/cloexec.h: New file.
709 * gnulib/import/close.c: New file.
710 * gnulib/import/closedir.c: New file.
711 * gnulib/import/dirent-private.h: New file.
712 * gnulib/import/dup-safer.c: New file.
713 * gnulib/import/dup.c: New file.
714 * gnulib/import/dup2.c: New file.
715 * gnulib/import/error.c: New file.
716 * gnulib/import/error.h: New file.
717 * gnulib/import/exitfail.c: New file.
718 * gnulib/import/exitfail.h: New file.
719 * gnulib/import/fchdir.c: New file.
720 * gnulib/import/fcntl.c: New file.
721 * gnulib/import/fcntl.in.h: New file.
722 * gnulib/import/fd-hook.c: New file.
723 * gnulib/import/fd-hook.h: New file.
724 * gnulib/import/fd-safer.c: New file.
725 * gnulib/import/fdopendir.c: New file.
726 * gnulib/import/filename.h: New file.
727 * gnulib/import/filenamecat-lgpl.c: New file.
728 * gnulib/import/filenamecat.h: New file.
729 * gnulib/import/fstat.c: New file.
730 * gnulib/import/fstatat.c: New file.
731 * gnulib/import/getcwd-lgpl.c: New file.
732 * gnulib/import/getcwd.c: New file.
733 * gnulib/import/getdtablesize.c: New file.
734 * gnulib/import/getlogin_r.c: New file.
735 * gnulib/import/getprogname.c: New file.
736 * gnulib/import/getprogname.h: New file.
737 * gnulib/import/gettext.h: New file.
738 * gnulib/import/glob-libc.h: New file.
739 * gnulib/import/glob.c: New file.
740 * gnulib/import/glob.in.h: New file.
741 * gnulib/import/intprops.h: New file.
742 * gnulib/import/m4/chdir-long.m4: New file.
743 * gnulib/import/m4/close.m4: New file.
744 * gnulib/import/m4/closedir.m4: New file.
745 * gnulib/import/m4/d-ino.m4: New file.
746 * gnulib/import/m4/d-type.m4: New file.
747 * gnulib/import/m4/dup.m4: New file.
748 * gnulib/import/m4/dup2.m4: New file.
749 * gnulib/import/m4/error.m4: New file.
750 * gnulib/import/m4/fchdir.m4: New file.
751 * gnulib/import/m4/fcntl.m4: New file.
752 * gnulib/import/m4/fcntl_h.m4: New file.
753 * gnulib/import/m4/fdopendir.m4: New file.
754 * gnulib/import/m4/filenamecat.m4: New file.
755 * gnulib/import/m4/fstat.m4: New file.
756 * gnulib/import/m4/fstatat.m4: New file.
757 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
758 * gnulib/import/m4/getcwd-path-max.m4: New file.
759 * gnulib/import/m4/getcwd.m4: New file.
760 * gnulib/import/m4/getdtablesize.m4: New file.
761 * gnulib/import/m4/getlogin_r.m4: New file.
762 * gnulib/import/m4/getprogname.m4: New file.
763 * gnulib/import/m4/glob.m4: New file.
764 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
765 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
766 * gnulib/import/m4/mempcpy.m4: New file.
767 * gnulib/import/m4/memrchr.m4: New file.
768 * gnulib/import/m4/mode_t.m4: New file.
769 * gnulib/import/m4/msvc-inval.m4: New file.
770 * gnulib/import/m4/msvc-nothrow.m4: New file.
771 * gnulib/import/m4/open.m4: New file.
772 * gnulib/import/m4/openat.m4: New file.
773 * gnulib/import/m4/opendir.m4: New file.
774 * gnulib/import/m4/readdir.m4: New file.
775 * gnulib/import/m4/realloc.m4: New file.
776 * gnulib/import/m4/rewinddir.m4: New file.
777 * gnulib/import/m4/save-cwd.m4: New file.
778 * gnulib/import/m4/strdup.m4: New file.
779 * gnulib/import/m4/strerror.m4: New file.
780 * gnulib/import/m4/unistd-safer.m4: New file.
781 * gnulib/import/mempcpy.c: New file.
782 * gnulib/import/memrchr.c: New file.
783 * gnulib/import/msvc-inval.c: New file.
784 * gnulib/import/msvc-inval.h: New file.
785 * gnulib/import/msvc-nothrow.c: New file.
786 * gnulib/import/msvc-nothrow.h: New file.
787 * gnulib/import/open.c: New file.
788 * gnulib/import/openat-die.c: New file.
789 * gnulib/import/openat-priv.h: New file.
790 * gnulib/import/openat-proc.c: New file.
791 * gnulib/import/openat.c: New file.
792 * gnulib/import/openat.h: New file.
793 * gnulib/import/opendir.c: New file.
794 * gnulib/import/pipe-safer.c: New file.
795 * gnulib/import/readdir.c: New file.
796 * gnulib/import/realloc.c: New file.
797 * gnulib/import/rewinddir.c: New file.
798 * gnulib/import/save-cwd.c: New file.
799 * gnulib/import/save-cwd.h: New file.
800 * gnulib/import/strdup.c: New file.
801 * gnulib/import/strerror-override.c: New file.
802 * gnulib/import/strerror-override.h: New file.
803 * gnulib/import/strerror.c: New file.
804 * gnulib/import/unistd--.h: New file.
805 * gnulib/import/unistd-safer.h: New file.
806 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
807 "getcwd" and "glob".
808 * ser-tcp.c: Undefine "close" before redefining it.
809
432ae719
SM
8102017-09-21 Simon Marchi <simon.marchi@ericsson.com>
811
812 * guile/scm-value.c (gdbscm_value_address): Initialize address,
813 get rid of res_val.
814
4fa7574e
RO
8152017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
816
817 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
818 <sol2,sparc>: Likewise.
819 <sol2-64,i386>: Likewise.
820
821 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
822 -Wdeprecated-declarations on *-*-solaris*.
823 * configure: Regenerate.
824
825 * procfs.c: Include "nat/inferior.h".
826 (procfs_info_proc): Fix typo.
827
f6327dcb
KB
8282017-09-21 Kevin Buettner <kevinb@redhat.com>
829
830 * remote.c (vector): Include.
831 (struct private_thread_info): Add field, thread_handle.
832 (free_private_thread_info): Deallocate storage associated with
833 thread handle.
834 (get_private_info_thread): Initialize `thread_handle' field.
835 (struct thread_item): Add field, thread_handle.
836 (clear_threads_listing_context): Deallocate storage associated
837 with thread handle.
838 (start_thread): Add support for "handle" attribute.
839 (thread_attributes): Add "handle".
840 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
841 field.
842 (remote_update_thread_list): Update thread_handle.
843 (remote_thread_handle_to_thread_info): New function.
844 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
845
fbbe5337
KB
8462017-09-21 Kevin Buettner <kevinb@redhat.com>
847
848 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
849 function.
850 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
851 * python/python-internal.h (thread_object_type): Declare.
852
e04ee09e
KB
8532017-09-21 Kevin Buettner <kevinb@redhat.com>
854
855 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
856 (target_thread_handle_to_thread_info): Declare.
857 * target.c (target_thread_handle_to_thread_info): New function.
858 * target-delegates.c: Regenerate.
859 * gdbthread.h (find_thread_by_handle): Declare.
860 * thread.c (find_thread_by_handle): New function.
861 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
862 function.
863 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
864
1e5b66ed
SM
8652017-09-21 Simon Marchi <simon.marchi@ericsson.com>
866
867 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
868
ebe48ba0
SM
8692017-09-21 Simon Marchi <simon.marchi@ericsson.com>
870
871 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
872
0a0bf5dc
YQ
8732017-09-21 Yao Qi <yao.qi@linaro.org>
874
875 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
876 to gdb_target_obs.
877
d1b0a7bf
TT
8782017-09-20 Tom Tromey <tom@tromey.com>
879
880 * breakpoint.c (struct counted_command_line): Remove.
881 (breakpoint_commands): Update.
882 (alloc_counted_command_line, incref_counted_command_line)
883 (decref_counted_command_line, do_cleanup_counted_command_line)
884 (make_cleanup_decref_counted_command_line): Remove.
885 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
886 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
887 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
888 (save_breakpoints): Update.
889 * breakpoint.h (counted_command_line): Now a typedef to
890 shared_ptr.
891 (struct breakpoint) <commands>: Now a counted_command_line.
892 (struct bpstats) <command>: Likewise.
893
48649e1b
TT
8942017-09-20 Tom Tromey <tom@tromey.com>
895
896 * breakpoint.c (struct commands_info, do_map_commands_command):
897 Remove.
898 (commands_command_1): Update.
899 (iterate_over_related_breakpoints): Take a function_view.
900 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
901 (delete_command): Update.
902 (map_breakpoint_numbers): Take a function_view.
903 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
904 (disable_command): Update.
905 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
906 (enable_command): Update.
907 (struct disp_data, do_enable_breakpoint_disp)
908 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
909 (do_map_enable_delete_breakpoint): Remove.
910 (enable_once_command, enable_count_command, enable_delete_command)
911 (delete_trace_variable_command): Update.
912
04afa70c
TT
9132017-09-20 Tom Tromey <tom@tromey.com>
914
915 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
916 (bpstat_clear): Use delete.
917 (bpstats): New constructors.
918 (bpstat_copy, bpstat_stop_status): Use new.
919 (dprintf_after_condition_true): Update.
920 * breakpoint.h (bpstats::bpstats): Add constructors.
921 (bpstats::~bpstats): Add destructor.
922
c83833f4
PA
9232017-09-20 Pedro Alves <palves@redhat.com>
924
925 * eval.c (make_params): Delete, refactored as ...
926 (class fake_method): ... this new type's ctor.
927 (fake_method::~fake_method): New.
928 (evaluate_subexp_standard): Use 'fake_method'.
929
223ffa71
TT
9302017-09-20 Tom Tromey <tom@tromey.com>
931
932 * windows-nat.c (get_windows_debug_event, windows_wait)
933 (do_initial_windows_stuff, windows_attach): Update.
934 * utils.c (vwarning, internal_vproblem): Update.
935 (ui_unregister_input_event_handler_cleanup)
936 (prepare_to_handle_input): Remove.
937 (class scoped_input_handler): New.
938 (defaulted_query, prompt_for_continue): Update.
939 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
940 Update.
941 * top.c (undo_terminal_modifications_before_exit): Update.
942 * target/target.h (target_terminal_init, target_terminal_inferior)
943 (target_terminal_ours): Don't declare.
944 (class target_terminal): New.
945 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
946 (target_terminal_ours_for_output)
947 (make_cleanup_restore_target_terminal): Don't declare.
948 (target_terminal_info): Remove.
949 * target.c (enum terminal_state, terminal_state): Remove.
950 (target_terminal::terminal_state): Define.
951 (target_terminal::init): Rename from target_terminal_init.
952 (target_terminal::inferior): Rename from
953 target_terminal_inferior.
954 (target_terminal::ours): Rename from target_terminal_ours.
955 (target_terminal::ours_for_output): Rename from
956 target_terminal_ours_for_output.
957 (target_terminal::info): New method.
958 (cleanup_restore_target_terminal)
959 (make_cleanup_restore_target_terminal): Remove.
960 * solib.c (handle_solib_event): Update.
961 * remote.c (remote_serial_quit_handler): Update.
962 (remote_terminal_inferior, remote_wait_as): Update.
963 * record-full.c (record_full_wait_1): Update.
964 * nto-procfs.c (procfs_create_inferior): Update.
965 * nat/fork-inferior.c (startup_inferior): Update.
966 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
967 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
968 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
969 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
970 (mi_breakpoint_created, mi_breakpoint_deleted)
971 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
972 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
973 (mi_user_selected_context_changed, report_initial_inferior):
974 Update.
975 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
976 (linux_nat_terminal_inferior): Update.
977 * infrun.c (follow_fork_inferior)
978 (handle_vfork_child_exec_or_exit, do_target_resume)
979 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
980 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
981 Update.
982 * inflow.c (child_terminal_init, info_terminal_command): Update.
983 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
984 (attach_command): Update.
985 * infcall.c (call_thread_fsm_should_stop): Update.
986 * gnu-nat.c (gnu_attach): Update.
987 * extension.c (struct active_ext_lang_state)
988 (restore_active_ext_lang): Update.
989 * exceptions.c (print_flush): Update.
990 * event-top.c (async_enable_stdin, default_quit_handler): Update.
991 (struct quit_handler_cleanup_data, restore_quit_handler)
992 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
993 Remove.
994 * cp-support.c (gdb_demangle): Update.
995 * breakpoint.c (update_inserted_breakpoint_locations)
996 (insert_breakpoint_locations, handle_jit_event)
997 (disable_breakpoints_in_unloaded_shlib): Update.
998 * annotate.c (annotate_breakpoints_invalid)
999 (annotate_frames_invalid): Update.
1000
013af3fc
TT
10012017-09-20 Tom Tromey <tom@tromey.com>
1002
1003 * main.c (catch_command_errors): Rename from
1004 catch_command_errors_const.
1005 (captured_main_1): Update.
1006
06871ae8
PA
10072017-09-20 Pedro Alves <palves@redhat.com>
1008
1009 * cli/cli-cmds.c (list_command): Use print_sal_location.
1010 (print_sal_location): New function.
1011 (ambiguous_line_spec): Use print_sal_location.
1012 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1013 * symtab.c (find_function_start_sal): Likewise.
1014 * symtab.h (symtab_and_line::symbol): New field.
1015
e5f25bc5
PA
10162017-09-20 Pedro Alves <palves@redhat.com>
1017
1018 * linespec.c (minsym_found): Handle non-text minsyms.
1019 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1020
1b7fa39e
WT
10212017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1022
1023 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1024 backslash.
1025
37dd0825
WT
10262017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1027
1028 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1029 vmovups instead vmovaps.
1030 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1031
4e5a4f58
JB
10322017-09-19 John Baldwin <jhb@FreeBSD.org>
1033
1034 * NEWS (Changes since GDB 8.0): Add starti.
1035 * infcmd.c (enum run_break): New.
1036 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1037 case.
1038 (run_command): Use enum run_how.
1039 (start_command): Likewise.
1040 (starti_command): New function.
1041 (RUN_ARGS_HELP): New macro.
1042 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1043 commands. Add starti command.
1044
aa70c9f1
YQ
10452017-09-19 Yao Qi <yao.qi@linaro.org>
1046
1047 * Makefile.in (monitor.o): Remove the rule.
1048
d6541620
YQ
10492017-09-19 Yao Qi <yao.qi@linaro.org>
1050
1051 * annotate.h (struct annotate_arg_emitter): Use
1052 DISABLE_COPY_AND_ASSIGN.
1053 * common/refcounted-object.h (refcounted_object): Likewise.
1054 * completer.h (struct completion_result): Likewise.
1055 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1056 * filename-seen-cache.h (filename_seen_cache): Likewise.
1057 * gdbcore.h (thread_section_name): Likewise.
1058 * gdb_regex.h (compiled_regex): Likewise.
1059 * gdbthread.h (scoped_restore_current_thread): Likewise.
1060 * inferior.h (scoped_restore_current_inferior): Likewise.
1061 * jit.c (jit_reader): Likewise.
1062 * linespec.h (struct linespec_result): Likewise.
1063 * mi/mi-parse.h (struct mi_parse): Likewise.
1064 * nat/fork-inferior.c (execv_argv): Likewise.
1065 * progspace.h (scoped_restore_current_program_space): Likewise.
1066 * python/python-internal.h (class gdbpy_enter): Likewise.
1067 * regcache.h (regcache): Likewise.
1068 * target-descriptions.c (struct tdesc_reg): Likewise.
1069 (struct tdesc_type): Likewise.
1070 (struct tdesc_feature): Likewise.
1071 * ui-out.h (ui_out_emit_type): Likewise.
1072
0615127c
SM
10732017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1074
1075 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1076 label abort_expression.
1077
5e187554
SM
10782017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1079
1080 * common/buffer.c (buffer_xml_printf): Adjust.
1081 * common/xml-utils.c (xml_escape_text): Change return type to
1082 std::string, update code accordingly.
1083 * common/xml-utils.h (xml_escape_text): Change return type to
1084 std::string.
1085 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1086 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1087 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1088 Adjust.
1089
c3d7b541
SM
10902017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1091
1092 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1093 (SUBDIR_UNITTESTS_OBS): Add new object file.
1094 * unittests/xml-utils-selftests.c: New file.
1095
1526853e
SM
10962017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1097
1098 * common/selftest.h (selftest): New struct/interface.
1099 (register_test): Add name parameter, add new overload.
1100 (run_tests): Add filter parameter.
1101 (for_each_selftest_ftype): New typedef.
1102 (for_each_selftest): New declaration.
1103 * common/selftest.c (tests): Change type to
1104 map<string, unique_ptr<selftest>>.
1105 (simple_selftest): New struct.
1106 (register_test): New function.
1107 (register_test): Add name parameter and use it.
1108 (run_tests): Add filter parameter and use it. Add prints.
1109 Adjust to vector -> map change.
1110 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1111 registering selftests.
1112 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1113 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1114 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1115 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1116 * findvar.c (_initialize_findvar): Likewise.
1117 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1118 * maint.c (maintenance_selftest): Update call to run_tests.
1119 (maintenance_info_selftests): New function.
1120 (_initialize_maint_cmds): Register "maintenance info selftests"
1121 command. Update "maintenance selftest" doc.
1122 * regcache.c (_initialize_regcache): Add names when registering
1123 selftests.
1124 * rust-exp.y (_initialize_rust_exp): Likewise.
1125 * selftest-arch.c (gdbarch_selftest): New struct.
1126 (gdbarch_tests): Remove.
1127 (register_test_foreach_arch): Add name parameter. Call
1128 register_test.
1129 (tests_with_arch): Remove, move most content to
1130 gdbarch_selftest::operator().
1131 (_initialize_selftests_foreach_arch): Remove.
1132 * selftest-arch.h (register_test_foreach_arch): Add name
1133 parameter.
1134 (run_tests_with_arch): New declaration.
1135 * utils-selftests.c (_initialize_utils_selftests): Add names
1136 when registering selftests.
1137 * utils.c (_initialize_utils): Likewise.
1138 * unittests/array-view-selftests.c
1139 (_initialize_array_view_selftests): Likewise.
1140 * unittests/environ-selftests.c (_initialize_environ_selftests):
1141 Likewise.
1142 * unittests/function-view-selftests.c
1143 (_initialize_function_view_selftests): Likewise.
1144 * unittests/offset-type-selftests.c
1145 (_initialize_offset_type_selftests): Likewise.
1146 * unittests/optional-selftests.c
1147 (_initialize_optional_selftests): Likewise.
1148 * unittests/scoped_restore-selftests.c
1149 (_initialize_scoped_restore_selftests): Likewise.
1150 * NEWS: Document "maintenance selftest" and "maint info
1151 selftests".
1152
5846367a
SM
11532017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1154
1155 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1156 scoped_restore.
1157
bd77e8ff
SM
11582017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1159
1160 * mi/mi-main.c (mi_load_progress): Make uiout variable
1161 a unique_ptr.
1162
26a67918
PA
11632017-09-15 Pedro Alves <palves@redhat.com>
1164
1165 * compile/compile-c-types.c (convert_enum, convert_int)
1166 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1167
3f8a7804
SM
11682017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1169
1170 * dwarf2read.c (copy_string): Remove.
1171 (parse_macro_definition): Replace copy_string with savestring.
1172
8d200706
YQ
11732017-09-15 Yao Qi <yao.qi@linaro.org>
1174
1175 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1176 gdb_target_obs.
1177 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1178 Likewise.
1179 (i[34567]86-*-linux*): Likewise.
1180
d185219d
SM
11812017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1182
1183 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1184 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1185 <stack>: Change type to std::vector.
1186 <stack_len, stack_allocated>: Remove.
1187 <grow_stack>: Remove.
1188 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1189 (dwarf_expr_context::~dwarf_expr_context): Remove.
1190 (dwarf_expr_context::grow_stack): Remove.
1191 (dwarf_expr_context::push): Adjust.
1192 (dwarf_expr_context::pop): Adjust.
1193 (dwarf_expr_context::fetch): Adjust.
1194 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1195 (dwarf_expr_context::stack_empty_p): Adjust.
1196 (dwarf_expr_context::execute_stack_op): Adjust.
1197
eccd80d6
SM
11982017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1199
1200 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1201 return type to bool.
1202 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1203
69009882
SM
12042017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1205
1206 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1207 Change type to bool.
1208 (dwarf_stack_value) <in_stack_memory>: Likewise.
1209 (dwarf_expr_context) <push_address>: Change parameter type to
1210 bool.
1211 <fetch_in_stack_memory>: Change return type to bool.
1212 <push>: Change parameter type to bool.
1213 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1214 to bool.
1215 (dwarf_expr_context::push_address): Likewise.
1216 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1217 to bool.
1218 (dwarf_expr_context::execute_stack_op): Adjust.
1219 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1220
1e467161
SM
12212017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1222
1223 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1224 (struct dwarf_expr_context) <n_pieces>: Remove.
1225 <pieces>: Change type to std::vector.
1226 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1227 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1228 pieces.
1229 (dwarf_expr_context::add_piece): Adjust.
1230 * dwarf2loc.c (struct piece_closure): Initialize fields.
1231 <n_pieces>: Remove.
1232 <pieces>: Change type to std::vector.
1233 (allocate_piece_closure): Adjust, change parameter to
1234 std::vector rvalue and std::move it to piece_closure.
1235 (rw_pieced_value): Adjust.
1236 (check_pieced_synthetic_pointer): Adjust.
1237 (indirect_synthetic_pointer): Adjust.
1238 (coerce_pieced_ref): Adjust.
1239 (free_pieced_value_closure): Adjust. Use delete to free
1240 piece_closure.
1241 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1242 to allocate_piece_closure.
1243 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1244
0782db84
SM
12452017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1246
1247 * probe.h (probe_ops_cp): Remove typedef.
1248 (DEF_VEC_P (probe_ops_cp)): Remove.
1249 (all_probe_ops): Change type to std::vector.
1250 * probe.c (info_probes_for_ops): Adjust to vector change.
1251 (probe_linespec_to_ops): Likewise.
1252 (all_probe_ops): Change type to std::vector.
1253 (_initialize_probe): Adjust to vector change.
1254 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1255 * elfread.c (elf_get_probes): Likewise.
1256 * stap-probe.c (_initialize_stap_probe): Likewise.
1257
1eac6bea
SM
12582017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1259
1260 * probe.h (struct bound_probe): Define constructors.
1261 * probe.c (bound_probe_s): Remove typedef.
1262 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1263 (collect_probes): Change return type to std::vector, remove
1264 cleanup.
1265 (compare_probes): Return bool, change parameter type. Change
1266 semantic to "less than".
1267 (gen_ui_out_table_header_info): Change parameter to std::vector
1268 and update.
1269 (exists_probe_with_pops): Likewise.
1270 (info_probes_for_ops): Update to std::vector change.
1271 (enable_probes_command): Likewise.
1272 (disable_probes_command): Likewise.
1273
aaa63a31
SM
12742017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1275
1276 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1277 vec to std::vector.
1278 * probe.c (parse_probes_in_pspace): Update.
1279 (find_probes_in_objfile): Update.
1280 (find_probe_by_pc): Update.
1281 (collect_probes): Update.
1282 (probe_any_get_probes): Update.
1283 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1284 return type to reference to std::vector.
1285 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1286 std::vector and update.
1287 (dtrace_process_dof): Likewise.
1288 (dtrace_get_probes): Likewise.
1289 * elfread.c (elf_get_probes): Change return type to std::vector,
1290 store an std::vector in bfd_data.
1291 (probe_key_free): Update to std::vector.
1292 * stap-probe.c (handle_stap_probe): Change parameter to
1293 std::vector and update.
1294 (stap_get_probes): Likewise.
1295 * symfile-debug.c (debug_sym_get_probes): Change return type to
1296 std::vector and update.
1297
cb85b21b
TT
12982017-09-11 Tom Tromey <tom@tromey.com>
1299
1300 * breakpoint.c (program_breakpoint_here_p): Update.
1301 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1302 from make_show_memory_breakpoints_cleanup. Return a
1303 scoped_restore_tmpl<int>.
1304 (restore_show_memory_breakpoints): Remove.
1305 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1306 * mem-break.c (memory_validate_breakpoint): Update.
1307 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1308 (ia64_memory_remove_breakpoint): Update.
1309 (ia64_breakpoint_from_pc): Update.
1310 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1311 from make_show_memory_breakpoints_cleanup.
1312
8fbc99ef
TT
13132017-09-11 Tom Tromey <tom@tromey.com>
1314
1315 * d-namespace.c (d_lookup_symbol): Use std::string.
1316 (find_symbol_in_baseclass): Likewise.
1317
50feb4bd
TT
13182017-09-11 Tom Tromey <tom@tromey.com>
1319
1320 * ctf.c (ctf_start): Use std::string.
1321
c6dc63a1
TT
13222017-09-11 Tom Tromey <tom@tromey.com>
1323
1324 * ada-lang.c (is_known_support_routine): Update.
1325 (ada_unhandled_exception_name_addr_from_raise): Update.
1326 * guile/scm-frame.c (gdbscm_frame_name): Update.
1327 * python/py-frame.c (frapy_name): Update.
1328 (frapy_function): Update.
1329 * stack.h (find_frame_funname): Update.
1330 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1331 (print_frame): Update.
1332
d6b9b80f
TT
13332017-09-11 Tom Tromey <tom@tromey.com>
1334
1335 * findcmd.c (put_bits): Take a gdb::byte_vector.
1336 (parse_find_args): Return gdb::byte_vector. "args" now const.
1337 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1338 cleanups.
1339 (find_command): Update.
1340
a9921622
TT
13412017-09-11 Tom Tromey <tom@tromey.com>
1342
1343 * cli/cli-script.c (class scoped_restore_hook_in): New.
1344 (clear_hook_in_cleanup): Remove.
1345 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1346 scoped_restore_hook_in.
1347
be0d7abb
TT
13482017-09-11 Tom Tromey <tom@tromey.com>
1349
1350 * cli/cli-script.c (restore_interp): Remove.
1351 (read_command_lines): Use scoped_restore_interp.
1352 * interps.c (scoped_restore_interp::set_temp): Rename from
1353 interp_set_temp.
1354 * interps.h (class scoped_restore_interp): New.
1355 (interp_set_temp): Remove.
1356
00f675ff
TT
13572017-09-11 Tom Tromey <tom@tromey.com>
1358
1359 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1360 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1361 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1362 scoped_restore.
1363 (mi_cmd_break_insert_1): Update.
1364 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1365 scoped_restore.
1366
cb791d59
TT
13672017-09-11 Tom Tromey <tom@tromey.com>
1368
1369 * demangle.c (demangle_command): Update.
1370 * breakpoint.c (disable_command): Update.
1371 (enable_command): Update.
1372 (find_location_by_number): Make "number" const. Use
1373 get_number_trailer.
1374 * cli/cli-utils.c (extract_arg): Return std::string.
1375 * probe.c (parse_probe_linespec): Update. Change types.
1376 (collect_probes): Take string arguments.
1377 (parse_probe_linespec): Likewise.
1378 (info_probes_for_ops): Update.
1379 (enable_probes_command): Update.
1380 (disable_probes_command): Update.
1381 * break-catch-sig.c (catch_signal_split_args): Update.
1382 * mi/mi-parse.c (mi_parse): Update.
1383
2039bd9f
TT
13842017-09-11 Tom Tromey <tom@tromey.com>
1385
1386 * language.h (language_enum): Make argument const.
1387 * language.c (language_enum): Make argument const.
1388
f1735a53
TT
13892017-09-11 Tom Tromey <tom@tromey.com>
1390
1391 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1392 as function.
1393 (skip_to_space): Rename from skip_to_space_const.
1394 * common/common-utils.c (skip_to_space): New function.
1395 (skip_to_space): Rename from skip_to_space_const.
1396 * cli/cli-utils.h (get_number): Rename from get_number_const.
1397 (extract_arg): Rename from extract_arg_const.
1398 * cli/cli-utils.c (get_number): Rename from get_number_const.
1399 (extract_arg): Rename from extract_arg_const.
1400 (number_or_range_parser::get_number): Use ::get_number.
1401 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1402 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1403 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1404 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1405 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1406 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1407 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1408 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1409
7d221d74
TT
14102017-09-11 Tom Tromey <tom@tromey.com>
1411
1412 * python/python.c (do_start_initialization): Use
1413 py-event-types.def to initialize types.
1414 Define all object type structures.
1415 * python/python-internal.h: Don't declare event initialization
1416 functions.
1417 * python/py-threadevent.c (thread_event_object_type): Don't
1418 define.
1419 * python/py-stopevent.c (stop_event_object_type): Don't define.
1420 * python/py-signalevent.c (signal_event_object_type): Don't
1421 declare or define.
1422 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1423 (clear_objfiles_event_object_type): Don't declare or define.
1424 * python/py-infevents.c (inferior_call_pre_event_object_type)
1425 (inferior_call_post_event_object_type)
1426 (register_changed_event_object_type)
1427 (memory_changed_event_object_type): Don't declare or define.
1428 * python/py-inferior.c (new_thread_event_object_type)
1429 (new_inferior_event_object_type)
1430 (inferior_deleted_event_object_type): Don't declare or define.
1431 * python/py-exitedevent.c (exited_event_object_type): Don't
1432 declare or define.
1433 * python/py-evts.c (gdbpy_initialize_py_events): Use
1434 py-all-events.def.
1435 * python/py-events.h (thread_event_object_type): Don't declare.
1436 (events_object): Use py-all-events.def.
1437 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1438 py-event-types.def.
1439 * python/py-event-types.def: New file.
1440 * python/py-continueevent.c (create_continue_event_object): Don't
1441 declare or define.
1442 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1443 declare or define.
1444 * python/py-all-events.def: New file.
1445
35c61a1d
TT
14462017-09-11 Tom Tromey <tom@tromey.com>
1447
1448 * python/py-threadevent.c (create_thread_event_object): Return
1449 gdbpy_ref.
1450 * python/py-stopevent.h (create_stop_event_object)
1451 (create_breakpoint_event_object, create_signal_event_object):
1452 Update.
1453 * python/py-stopevent.c (create_stop_event_object): Return
1454 gdbpy_ref.
1455 (emit_stop_event): Update.
1456 * python/py-signalevent.c (create_signal_event_object): Return
1457 gdbpy_ref.
1458 * python/py-infevents.c (create_inferior_call_event_object):
1459 Update.
1460 * python/py-event.h (create_event_object)
1461 (create_thread_event_object): Update.
1462 * python/py-event.c (create_event_object): Return gdbpy_ref.
1463 * python/py-continueevent.c: Return gdbpy_ref.
1464 * python/py-bpevent.c (create_breakpoint_event_object): Return
1465 gdbpy_ref.
1466
7c96f8c1
TT
14672017-09-11 Tom Tromey <tom@tromey.com>
1468
1469 PR python/15622:
1470 * NEWS: Add entry.
1471 * python/python.c (do_start_initialization): Initialize new event
1472 types.
1473 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1474 (gdbpy_initialize_inferior_deleted_event)
1475 (gdbpy_initialize_new_thread_event): Declare.
1476 * python/py-threadevent.c (create_thread_event_object): Add option
1477 "thread" parameter.
1478 * python/py-inferior.c (new_thread_event_object_type)
1479 (new_inferior_event_object_type)
1480 (inferior_deleted_event_object_type): Declare.
1481 (python_new_inferior, python_inferior_deleted): New functions.
1482 (add_thread_object): Emit new_thread event.
1483 (gdbpy_initialize_inferior): Attach new functions to corresponding
1484 observers.
1485 (new_thread, new_inferior, inferior_deleted): Define new event
1486 types.
1487 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1488 registries.
1489 * python/py-events.h (events_object) <new_inferior,
1490 inferior_deleted, new_thread>: New fields.
1491 * python/py-event.h (create_thread_event_breakpoint): Add optional
1492 "thread" parameter.
1493
72542b8e
AB
14942017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1495
1496 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1497 check current_ui instead.
1498 (internal_vproblem): Likewise.
1499
0d64823e
SM
15002017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1501
1502 * thread.c (print_thread_info_1): Remove unnecessary calls to
1503 uiout->is_mi_like_p.
1504
eb1e02fd
TT
15052017-09-09 Tom Tromey <tom@tromey.com>
1506
1507 * namespace.h (add_using_directive): Update.
1508 * namespace.c (add_using_directive): Change type of excludes to
1509 std::vector.
1510 * dwarf2read.c (read_import_statement): Use std::vector.
1511 (read_namespace): Update.
1512 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1513
0fc21fd8
TT
15142017-09-09 Tom Tromey <tom@tromey.com>
1515
1516 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1517
49663d05
TT
15182017-09-09 Tom Tromey <tom@tromey.com>
1519
1520 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1521
0b868b60
TT
15222017-09-09 Tom Tromey <tom@tromey.com>
1523
1524 * stack.c (func_command): Use gdb::def_vector.
1525
c0470d48
TT
15262017-09-09 Tom Tromey <tom@tromey.com>
1527
1528 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1529 ui_out_emit_list, ui_out_emit_tuple.
1530 (mi_cmd_var_update): Likewise.
1531
ca5909c7
TT
15322017-09-09 Tom Tromey <tom@tromey.com>
1533
1534 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1535 ui_out_redirect_pop.
1536 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1537 ui_out_redirect_pop.
1538 * utils.c (do_ui_out_redirect_pop)
1539 (make_cleanup_ui_out_redirect_pop): Remove.
1540 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1541 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1542 * ui-out.h (ui_out_redirect_pop): New class.
1543
e6a2252a
TT
15442017-09-09 Tom Tromey <tom@tromey.com>
1545
1546 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1547 (list_available_thread_groups, mi_cmd_list_thread_groups)
1548 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1549 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1550 Likewise.
1551
393702cd
TT
15522017-09-09 Tom Tromey <tom@tromey.com>
1553
1554 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1555 ui_out_emit_tuple.
1556
76f9c9cf
TT
15572017-09-09 Tom Tromey <tom@tromey.com>
1558
1559 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1560 * stack.c (print_frame): Use ui_out_emit_tuple.
1561 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1562 (info_spu_mailbox_command, info_spu_dma_command)
1563 (info_spu_proxydma_command): Likewise.
1564 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1565 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1566 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1567 ui_out_emit_tuple.
1568 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1569
dc9fe180
TT
15702017-09-09 Tom Tromey <tom@tromey.com>
1571
1572 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1573 (class ui_out_emit_table): Update comment.
1574 * ui-out.c (do_cleanup_table_end)
1575 (make_cleanup_ui_out_table_begin_end): Remove.
1576 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1577 (info_spu_dma_cmdlist): Likewise.
1578 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1579 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1580 ui_out_emit_table.
1581
f8cc3da6
TT
15822017-09-09 Tom Tromey <tom@tromey.com>
1583
1584 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1585 ui_out_emit_list, gdb::optional.
1586
481695ed
JB
15872017-09-09 John Baldwin <jhb@FreeBSD.org>
1588
1589 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1590 prototype.
1591 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1592 prototype.
1593 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1594 prototype.
1595 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1596 * ada-exp.y: Remove _initialize_ada_exp prototype.
1597 * ada-lang.c: Remove _initialize_ada_language prototype.
1598 * ada-tasks.c: Remove _initialize_tasks prototype.
1599 * addrmap.c: Remove _initialize_addrmap prototype.
1600 * agent.c: Remove _initialize_agent prototype.
1601 * aix-thread.c: Remove _initialize_aix_thread prototype.
1602 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1603 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1604 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1605 prototype.
1606 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1607 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1608 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1609 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1610 prototype.
1611 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1612 prototype.
1613 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1614 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1615 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1616 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1617 prototype.
1618 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1619 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1620 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1621 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1622 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1623 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1624 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1625 prototype.
1626 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1627 prototype.
1628 * annotate.c: Remove _initialize_annotate prototype.
1629 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1630 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1631 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1632 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1633 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1634 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1635 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1636 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1637 prototype.
1638 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1639 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1640 * auto-load.c: Remove _initialize_auto_load prototype.
1641 * auxv.c: Remove _initialize_auxv prototype.
1642 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1643 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1644 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1645 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1646 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1647 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1648 prototype.
1649 * break-catch-throw.c: Remove _initialize_break_catch_throw
1650 prototype.
1651 * breakpoint.c: Remove _initialize_breakpoint prototype.
1652 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1653 * btrace.c: Remove _initialize_btrace prototype.
1654 * charset.c: Remove _initialize_charset prototype.
1655 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1656 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1657 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1658 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1659 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1660 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1661 * coffread.c: Remove _initialize_coffread prototype.
1662 * compile/compile.c: Remove _initialize_compile prototype.
1663 * complaints.c: Remove _initialize_complaints prototype.
1664 * completer.c: Remove _initialize_completer prototype.
1665 * copying.awk: Remove _initialize_copying prototype.
1666 * copying.c: Regenerate.
1667 * core-regset.c: Remove _initialize_core_regset prototype.
1668 * corefile.c: Remove _initialize_core prototype.
1669 * corelow.c: Remove _initialize_corelow prototype.
1670 * cp-abi.c: Remove _initialize_cp_abi prototype.
1671 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1672 * cp-support.c: Remove _initialize_cp_support prototype.
1673 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1674 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1675 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1676 * ctf.c: Remove _initialize_ctf prototype.
1677 * d-lang.c: Remove _initialize_d_language prototype.
1678 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1679 prototype.
1680 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1681 * dbxread.c: Remove _initialize_dbxread prototype.
1682 * dcache.c: Remove _initialize_dcache prototype.
1683 * demangle.c: Remove _initialize_demangler prototype.
1684 * disasm-selftests.c: Remove _initialize_disasm_selftests
1685 prototype.
1686 * disasm.c: Remove _initialize_disasm prototype.
1687 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1688 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1689 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1690 prototype.
1691 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1692 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1693 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1694 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1695 * elfread.c: Remove _initialize_elfread prototype.
1696 * exec.c: Remove _initialize_exec prototype.
1697 * extension.c: Remove _initialize_extension prototype.
1698 * f-lang.c: Remove _initialize_f_language prototype.
1699 * f-valprint.c: Remove _initialize_f_valprint prototype.
1700 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1701 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1702 * filesystem.c: Remove _initialize_filesystem prototype.
1703 * findcmd.c: Remove _initialize_mem_search prototype.
1704 * fork-child.c: Remove _initialize_fork_child prototype.
1705 * frame-base.c: Remove _initialize_frame_base prototype.
1706 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1707 * frame.c: Remove _initialize_frame prototype.
1708 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1709 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1710 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1711 * gcore.c: Remove _initialize_gcore prototype.
1712 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1713 * gdbarch.c: Regenerate.
1714 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1715 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1716 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1717 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1718 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1719 * go-lang.c: Remove _initialize_go_language prototype.
1720 * go32-nat.c: Remove _initialize_go32_nat prototype.
1721 * guile/guile.c: Remove _initialize_guile prototype.
1722 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1723 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1724 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1725 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1726 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1727 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1728 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1729 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1730 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1731 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1732 prototype.
1733 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1734 prototype.
1735 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1736 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1737 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1738 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1739 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1740 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1741 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1742 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1743 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1744 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1745 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1746 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1747 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1748 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1749 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1750 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1751 prototype.
1752 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1753 prototype.
1754 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1755 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1756 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1757 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1758 * infcall.c: Remove _initialize_infcall prototype.
1759 * infcmd.c: Remove _initialize_infcmd prototype.
1760 * inferior.c: Remove _initialize_inferiors prototype.
1761 * inflow.c: Remove _initialize_inflow prototype.
1762 * infrun.c: Remove _initialize_infrun prototype.
1763 * interps.c: Remove _initialize_interpreter prototype.
1764 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1765 * jit.c: Remove _initialize_jit prototype.
1766 * language.c: Remove _initialize_language prototype.
1767 * linux-fork.c: Remove _initialize_linux_fork prototype.
1768 * linux-nat.c: Remove _initialize_linux_nat prototype.
1769 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1770 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1771 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1772 * m2-lang.c: Remove _initialize_m2_language prototype.
1773 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1774 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1775 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1776 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1777 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1778 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1779 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1780 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1781 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1782 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1783 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1784 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1785 * machoread.c: Remove _initialize_machoread prototype.
1786 * macrocmd.c: Remove _initialize_macrocmd prototype.
1787 * macroscope.c: Remove _initialize_macroscope prototype.
1788 * maint.c: Remove _initialize_maint_cmds prototype.
1789 * mdebugread.c: Remove _initialize_mdebugread prototype.
1790 * memattr.c: Remove _initialize_mem prototype.
1791 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1792 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1793 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1794 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1795 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1796 * microblaze-linux-tdep.c: Remove
1797 _initialize_microblaze_linux_tdep prototype.
1798 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1799 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1800 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1801 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1802 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1803 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1804 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1805 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1806 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1807 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1808 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1809 prototype.
1810 * mipsread.c: Remove _initialize_mipsread prototype.
1811 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1812 prototype.
1813 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1814 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1815 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1816 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1817 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1818 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1819 prototype.
1820 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1821 * nto-procfs.c: Remove _initialize_procfs prototype.
1822 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1823 * objc-lang.c: Remove _initialize_objc_language prototype.
1824 * objfiles.c: Remove _initialize_objfiles prototype.
1825 * observer.c: Remove observer_test_first_notification_function,
1826 observer_test_second_notification_function,
1827 observer_test_third_notification_function, and
1828 _initialize_observer prototypes.
1829 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1830 * osabi.c: Remove _initialize_gdb_osabi prototype.
1831 * osdata.c: Remove _initialize_osdata prototype.
1832 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1833 * parse.c: Remove _initialize_parse prototype.
1834 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1835 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1836 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1837 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1838 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1839 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1840 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1841 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1842 * printcmd.c: Remove _initialize_printcmd prototype.
1843 * probe.c: Remove _initialize_probe prototype.
1844 * proc-api.c: Remove _initialize_proc_api prototype.
1845 * proc-events.c: Remove _initialize_proc_events prototype.
1846 * proc-service.c: Remove _initialize_proc_service prototype.
1847 * procfs.c: Remove _initialize_procfs prototype.
1848 * psymtab.c: Remove _initialize_psymtab prototype.
1849 * python/python.c: Remove _initialize_python prototype.
1850 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1851 * record-btrace.c: Remove _initialize_record_btrace prototype.
1852 * record-full.c: Remove _initialize_record_full prototype.
1853 * record.c: Remove _initialize_record prototype.
1854 * regcache.c: Remove _initialize_regcache prototype.
1855 * reggroups.c: Remove _initialize_reggroup prototype.
1856 * remote-notif.c: Remove _initialize_notif prototype.
1857 * remote-sim.c: Remove _initialize_remote_sim prototype.
1858 * remote.c: Remove _initialize_remote prototype.
1859 * reverse.c: Remove _initialize_reverse prototype.
1860 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1861 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1862 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1863 prototype.
1864 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1865 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1866 * rust-exp.y: Remove _initialize_rust_exp prototype.
1867 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1868 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1869 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1870 * score-tdep.c: Remove _initialize_score_tdep prototype.
1871 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1872 prototype.
1873 * ser-go32.c: Remove _initialize_ser_dos prototype.
1874 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1875 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1876 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1877 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1878 * serial.c: Remove _initialize_serial prototype.
1879 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1880 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1881 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1882 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1883 * skip.c: Remove _initialize_step_skip prototype.
1884 * sol-thread.c: Remove _initialize_sol_thread prototype.
1885 * solib-aix.c: Remove _initialize_solib_aix prototype.
1886 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1887 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1888 * solib-frv.c: Remove _initialize_frv_solib prototype.
1889 * solib-spu.c: Remove _initialize_spu_solib prototype.
1890 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1891 * solib-target.c: Remove _initialize_solib_target prototype.
1892 * solib.c: Remove _initialize_solib prototype.
1893 * source.c: Remove _initialize_source prototype.
1894 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1895 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1896 prototype.
1897 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1898 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1899 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1900 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1901 prototype.
1902 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1903 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1904 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1905 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1906 prototype.
1907 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1908 prototype.
1909 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1910 prototype.
1911 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1912 prototype.
1913 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1914 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1915 prototype.
1916 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1917 prototype.
1918 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1919 prototype.
1920 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1921 prototype.
1922 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1923 prototype.
1924 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1925 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1926 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1927 * stabsread.c: Remove _initialize_stabsread prototype.
1928 * stack.c: Remove _initialize_stack prototype.
1929 * stap-probe.c: Remove _initialize_stap_probe prototype.
1930 * std-regs.c: Remove _initialize_frame_reg prototype.
1931 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1932 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1933 * symfile.c: Remove _initialize_symfile prototype.
1934 * symmisc.c: Remove _initialize_symmisc prototype.
1935 * symtab.c: Remove _initialize_symtab prototype.
1936 * target-dcache.c: Remove _initialize_target_dcache prototype.
1937 * target-descriptions.c: Remove _initialize_target_descriptions
1938 prototype.
1939 * thread.c: Remove _initialize_thread prototype.
1940 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1941 prototype.
1942 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1943 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1944 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1945 prototype.
1946 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1947 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1948 * tracefile.c: Remove _initialize_tracefile prototype.
1949 * tracepoint.c: Remove _initialize_tracepoint prototype.
1950 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1951 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1952 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1953 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1954 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1955 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1956 * tui/tui.c: Remove _initialize_tui prototype.
1957 * typeprint.c: Remove _initialize_typeprint prototype.
1958 * user-regs.c: Remove _initialize_user_regs prototype.
1959 * utils.c: Remove _initialize_utils prototype.
1960 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1961 * valarith.c: Remove _initialize_valarith prototype.
1962 * valops.c: Remove _initialize_valops prototype.
1963 * valprint.c: Remove _initialize_valprint prototype.
1964 * value.c: Remove _initialize_values prototype.
1965 * varobj.c: Remove _initialize_varobj prototype.
1966 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1967 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1968 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1969 * windows-nat.c: Remove _initialize_windows_nat,
1970 _initialize_check_for_gdb_ini, and _initialize_loadable
1971 prototypes.
1972 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1973 * xcoffread.c: Remove _initialize_xcoffread prototype.
1974 * xml-support.c: Remove _initialize_xml_support prototype.
1975 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1976 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1977 prototype.
1978 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1979 prototype.
1980 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1981
a611b5cb
KS
19822017-09-08 Keith Seitz <keiths@redhat.com>
1983
1984 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1985 field.
1986
469412dd
CW
19872017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1988
1989 * f-valprint.c (f_val_print): Remove check for one byte
1990 sized integers. Remove printing of character type.
1991
a5ad232b
FP
19922017-09-08 Frank Penczek <frank.penczek@intel.com>
1993 Christoph Weinmann <christoph.t.weinmann@intel.com>
1994 Bernhard Heckel <bernhard.heckel@intel.com>
1995
1996 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1997 to maintain proper indentation when printing pointers/refs.
1998
e5014227
JB
19992017-09-07 Joel Brobecker <brobecker@adacore.com>
2000
2001 GDB 8.0.1 released.
2002
63c99141
JB
20032017-09-07 Joel Brobecker <brobecker@adacore.com>
2004
2005 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2006
69c1e056
TT
20072017-09-05 Tom Tromey <tom@tromey.com>
2008
2009 * parse.c (funcall_chain): Now a std::vector.
2010 (start_arglist, end_arglist): Simplify.
2011 (free_funcalls): Remove.
2012 (parse_exp_in_context_1): Remove cleanup.
2013
fef704bf
TT
20142017-09-05 Tom Tromey <tom@tromey.com>
2015
2016 * go-exp.y (go_parse): Don't create a cleanup.
2017
5613c585
TT
20182017-09-05 Tom Tromey <tom@tromey.com>
2019
2020 * d-exp.y (PrimaryExpression): Use std::string.
2021 (d_parse): Don't create a cleanup.
2022
eae49211
TT
20232017-09-05 Tom Tromey <tom@tromey.com>
2024
2025 * utils.c (do_clear_parser_state): Remove.
2026 (make_cleanup_clear_parser_state): Remove.
2027 * p-exp.y (pascal_parse): Use scoped_restore.
2028 * m2-exp.y (m2_parse): Use scoped_restore.
2029 * f-exp.y (f_parse): Use scoped_restore.
2030 * d-exp.y (d_parse): Use scoped_restore.
2031 * c-exp.y (c_parse): Use scoped_restore.
2032 * ada-exp.y (ada_parse): Use scoped_restore.
2033 * utils.h (make_cleanup_clear_parser_state): Remove.
2034
73b9be8b
KS
20352017-09-06 Keith Seitz <keiths@redhat.com>
2036
2037 * dwarf2read.c (dw2_linkage_name_attr): New function.
2038 (dw2_linkage_name): New function.
2039 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2040 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2041 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2042
a102602b
KR
20432017-09-06 Kamil Rytarowski <n54@gmx.com>
2044
2045 * config/djgpp/djconfig.sh: Correct shell portability issue.
2046
28ad437d
KR
20472017-09-06 Kamil Rytarowski <n54@gmx.com>
2048
2049 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2050
351787dd
JB
20512017-09-06 John Baldwin <jhb@FreeBSD.org>
2052
2053 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2054 * NEWS: Mention new FreeBSD/mips native configuration.
2055 * configure.host: Add aarch64*-*-freebsd*.
2056 * configure.nat: Likewise.
2057 * aarch64-fbsd-nat.c: New file.
2058
c0f84956
JB
20592017-09-06 John Baldwin <jhb@FreeBSD.org>
2060
2061 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2062 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2063 * NEWS: Mention new FreeBSD/aarch64 target.
2064 * configure.tgt: Add aarch64*-*-freebsd*.
2065 * aarch64-fbsd-tdep.c: New file.
2066 * aarch64-fbsd-tdep.h: New file.
2067
7610297a
KR
20682017-09-06 Kamil Rytarowski <n54@gmx.com>
2069
2070 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2071
fbd1b771
JK
20722017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2073
2074 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2075 of TLS symbols.
2076
5ca79eae
PW
20772017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2078
2079 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2080 call.
2081
bf93d7ba
SM
20822017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2083
2084 * infrun.c (follow_exec): Call add_thread after
2085 target_find_description.
2086
1bb7c059
SM
20872017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2088
2089 * infrun.c (handle_inferior_event_1): When exec'ing, read
2090 stop_pc after follow_exec.
2091
fc809827
SM
20922017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2093
2094 * remote.c (process_g_packet): Update error message.
2095
d2fcdd85
YQ
20962017-09-05 Yao Qi <yao.qi@linaro.org>
2097
2098 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2099 targets.
2100
e69570ee
PA
21012017-09-05 Pedro Alves <palves@redhat.com>
2102
2103 * eval.c (eval_call, evaluate_funcall): New functions, factored
2104 out from ...
2105 (evaluate_subexp_standard): ... this.
2106
22916b07
YQ
21072017-09-05 Yao Qi <yao.qi@linaro.org>
2108
2109 * amd64-tdep.c (amd64_target_description): Create target
2110 descriptions.
2111 (_initialize_amd64_tdep): Don't call functions
2112 initialize_tdesc_amd64_*. Add self tests.
2113 * arch/amd64.c (amd64_create_target_description): Add parameter
2114 is_linux. Call set_tdesc_osabi if is_linux is true.
2115 * arch/amd64.h (amd64_create_target_description): Update the
2116 declaration.
2117 * arch/i386.c (i386_create_target_description): Add parameter
2118 is_linux. Call set_tdesc_osabi if is_linux is true.
2119 * arch/i386.h (i386_create_target_description): Update
2120 declaration.
2121 * configure.tgt: Add i386.o to gdb_target_obs.
2122 * features/Makefile (XMLTOC): Remove i386/*.xml.
2123 * features/i386/amd64-avx-avx512.c: Remove.
2124 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2125 * features/i386/amd64-avx-mpx.c: Remove.
2126 * features/i386/amd64-avx.c: Remove.
2127 * features/i386/amd64-mpx.c: Remove.
2128 * features/i386/amd64.c: Remove.
2129 * features/i386/i386-avx-avx512.c: Remove.
2130 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2131 * features/i386/i386-avx-mpx.c: Remove.
2132 * features/i386/i386-avx.c: Remove.
2133 * features/i386/i386-mmx.c: Remove.
2134 * features/i386/i386-mpx.c: Remove.
2135 * features/i386/i386.c: Remove.
2136 * i386-tdep.c: Don't include features/i386/i386*.c., include
2137 target-descriptions.h and arch/i386.h.
2138 (i386_target_description): Create target descriptions.
2139 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2140 functions. Do self tests.
2141
0854b7b1
YQ
21422017-09-05 Yao Qi <yao.qi@linaro.org>
2143
2144 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2145 * features/i386/amd64-avx-avx512-linux.c: Removed.
2146 * features/i386/amd64-avx-linux.c: Removed.
2147 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2148 * features/i386/amd64-avx-mpx-linux.c: Removed.
2149 * features/i386/amd64-linux.c: Removed.
2150 * features/i386/amd64-mpx-linux.c: Removed.
2151 * features/i386/x32-avx-avx512-linux.c: Removed.
2152 * features/i386/x32-avx-linux.c: Removed.
2153 * features/i386/x32-linux.c: Removed.
2154
b4570e4b
YQ
21552017-09-05 Yao Qi <yao.qi@linaro.org>
2156
2157 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2158 features/i386/*.c.
2159 (amd64_linux_read_description): Call
2160 amd64_create_target_description.
2161 * arch/amd64.c: New file.
2162 * arch/amd64.h: New file.
2163 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2164 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2165
6c73f67f
YQ
21662017-09-05 Yao Qi <yao.qi@linaro.org>
2167
2168 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2169 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2170 (amd64_linux_read_description): Create target descriptions.
2171 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2172 functions. Add unit tests.
2173 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2174 x32-core.xml.
2175 * features/i386/64bit-avx.c: Generated.
2176 * features/i386/64bit-avx512.c: Generated.
2177 * features/i386/64bit-core.c: Generated.
2178 * features/i386/64bit-linux.c: Generated.
2179 * features/i386/64bit-mpx.c: Generated.
2180 * features/i386/64bit-pkeys.c: Generated.
2181 * features/i386/64bit-segments.c: Generated.
2182 * features/i386/64bit-sse.c: Generated.
2183 * features/i386/x32-core.c: Generated.
2184 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2185 c files for amd64-linux and x32-linux.
2186
9d3d478b
YQ
21872017-09-05 Yao Qi <yao.qi@linaro.org>
2188
2189 * amd64-linux-tdep.c (amd64_linux_read_description): New
2190 function.
2191 (amd64_linux_core_read_description): Call
2192 amd64_linux_read_description.
2193 (amd64_linux_init_abi): Likewise.
2194 (amd64_x32_linux_init_abi): Likewise.
2195 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2196 * x86-linux-nat.c (x86_linux_read_description): Call
2197 amd64_linux_read_description.
2198
b9f1d50f
YQ
21992017-09-05 Yao Qi <yao.qi@linaro.org>
2200
2201 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2202 comments.
2203
188c9e6d
YQ
22042017-09-05 Yao Qi <yao.qi@linaro.org>
2205
2206 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2207 * features/i386/i386-avx-avx512-linux.c: Remove.
2208 * features/i386/i386-avx-linux.c: Remove.
2209 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2210 * features/i386/i386-avx-mpx-linux.c: Remove.
2211 * features/i386/i386-linux.c: Remove.
2212 * features/i386/i386-mmx-linux.c: Remove.
2213 * features/i386/i386-mpx-linux.c: Remove.
2214
5f035c07
YQ
22152017-09-05 Yao Qi <yao.qi@linaro.org>
2216
2217 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2218 (SFILES): Add arch/i386.c.
2219 (HFILES_NO_SRCDIR): Add arch/i386.h.
2220 * arch/i386.c: New file.
2221 * arch/i386.h: New file.
2222 * arch/tdesc.h (allocate_target_description): Declare.
2223 (set_tdesc_architecture): Declare.
2224 (set_tdesc_osabi): Declare.
2225 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2226 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2227 include arch/i386.h.
2228 (i386_linux_read_description): Remove code and call
2229 i386_create_target_description.
2230 (set_tdesc_architecture): New function.
2231 (set_tdesc_osabi): New function.
2232 * target-descriptions.h (allocate_target_description): Remove.
2233
0abe8a89
YQ
22342017-09-05 Yao Qi <yao.qi@linaro.org>
2235
2236 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2237 * target-descriptions.c (tdesc_create_feature): Likewise, and
2238 adjust code.
2239 * features/i386/32bit-avx.c: Re-generated.
2240 * features/i386/32bit-avx512.c: Re-generated.
2241 * features/i386/32bit-core.c: Re-generated.
2242 * features/i386/32bit-linux.c: Re-generated.
2243 * features/i386/32bit-mpx.c: Re-generated.
2244 * features/i386/32bit-pkeys.c: Re-generated.
2245 * features/i386/32bit-sse.c: Re-generated.
2246
0a188386
YQ
22472017-09-05 Yao Qi <yao.qi@linaro.org>
2248
2249 * regformats/regdef.h (struct reg): Override operator == and !=.
2250
f49ff000
YQ
22512017-09-05 Yao Qi <yao.qi@linaro.org>
2252
2253 * arch/tdesc.h: New file.
2254 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2255 * target-descriptions.c: Update comments.
2256 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2257 declarations.
2258 * features/i386/32bit-avx.c: Re-generated.
2259 * features/i386/32bit-avx512.c: Re-generated.
2260 * features/i386/32bit-core.c: Re-generated.
2261 * features/i386/32bit-linux.c: Re-generated.
2262 * features/i386/32bit-mpx.c: Re-generated.
2263 * features/i386/32bit-pkeys.c: Re-generated.
2264 * features/i386/32bit-sse.c: Re-generated.
2265
f7000548
YQ
22662017-09-05 Yao Qi <yao.qi@linaro.org>
2267
2268 * regformats/regdat.sh: Update generated code.
2269
c9a5e2a5
YQ
22702017-09-05 Yao Qi <yao.qi@linaro.org>
2271
2272 * regformats/regdat.sh: Adjust code order.
2273
d6b687ac
SM
22742017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2275
2276 * expprint.c (dump_subexp_body_standard): Use constant format
2277 string in fprintf_filtered call.
2278
a379bfd0
JB
22792017-09-04 John Baldwin <jhb@FreeBSD.org>
2280
2281 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2282 NetBSD/i386.
2283 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2284
f7efc967
JB
22852017-09-04 John Baldwin <jhb@FreeBSD.org>
2286
2287 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2288
c49fbc6c
JB
22892017-09-04 John Baldwin <jhb@FreeBSD.org>
2290
2291 * bsd-kvm.o: Define _KMEMUSER.
2292 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2293 * configure: Regenerate.
2294
26562e73
JB
22952017-09-04 John Baldwin <jhb@FreeBSD.org>
2296
2297 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2298 * i386-fbsd-nat.c: Likewise.
2299
31cf1487
JB
23002017-09-04 John Baldwin <jhb@FreeBSD.org>
2301
2302 * unittests/array-view-selftests.c: Add include of <array>.
2303
5b9f8a7c
JB
23042017-09-04 John Baldwin <jhb@FreeBSD.org>
2305
2306 * spu-tdep.c (flush_ea_cache): Add missing argument to
2307 call_function_by_hand.
2308
d69cf9b2
PA
23092017-09-04 Pedro Alves <palves@redhat.com>
2310
2311 * NEWS (Safer support for debugging with no debug info): New.
2312
3693fdb3
PA
23132017-09-04 Pedro Alves <palves@redhat.com>
2314
2315 * c-exp.y (function_method, function_method_void): Add current
2316 instance flags to TYPE_INSTANCE.
2317 * dwarf2read.c (check_modifier): New.
2318 (compute_delayed_physnames): Assert that only C++ adds delayed
2319 physnames. Mark fn_fields as const/volatile depending on
2320 physname.
2321 * eval.c (make_params): New type_instance_flags parameter. Use
2322 it as the new type's instance flags.
2323 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2324 flags element and pass it to make_params.
2325 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2326 instance flags element.
2327 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2328 * gdbtypes.h: Include "enum-flags.h".
2329 (type_instance_flags): New enum-flags type.
2330 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2331 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2332 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2333 (follow_type_instance_flags): New function.
2334 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2335 * parser-defs.h (follow_type_instance_flags): Declare.
2336 * valops.c (value_struct_elt_for_reference): const/volatile must
2337 match too.
2338
e68cb8e0
PA
23392017-09-04 Pedro Alves <palves@redhat.com>
2340
2341 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2342 function/method scopes; lookup the nested name as a function local
2343 static variable.
2344
858be34c
PA
23452017-09-04 Pedro Alves <palves@redhat.com>
2346
2347 (%type <voidval>): Add function_method.
2348 * c-exp.y (exp): New production for calls with no arguments.
2349 (function_method, function_method_void_or_typelist): New
2350 productions.
2351 (exp): New production for "method()::static_var".
2352 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2353 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2354 Handle OP_FUNC_STATIC_VAR.
2355 * parse.c (operator_length_standard):
2356 Handle OP_FUNC_STATIC_VAR.
2357
dd5901a6
PA
23582017-09-04 Pedro Alves <palves@redhat.com>
2359
2360 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2361 handling.
2362 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2363 Ditto.
2364 * parse.c (operator_length_standard, operator_check_standard):
2365 Ditto.
2366 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2367
46a4882b
PA
23682017-09-04 Pedro Alves <palves@redhat.com>
2369
2370 * ax-gdb.c: Include "typeprint.h".
2371 (gen_expr_for_cast): New function.
2372 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2373 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2374 type is unknown.
2375 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2376 nodebug_data_symbol.
2377 * eval.c: Include "typeprint.h".
2378 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2379 Error out if symbol has unknown type.
2380 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2381 evaluate_subexp_for_cast.
2382 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2383 OP_VAR_MSYM_VALUE.
2384 (evaluate_subexp_for_cast): New function.
2385 * gdbtypes.c (init_nodebug_var_type): New function.
2386 (objfile_type): Use it to initialize types of variables with no
2387 debug info.
2388 * typeprint.c (error_unknown_type): New.
2389 * typeprint.h (error_unknown_type): New declaration.
2390 * compile/compile-c-types.c (convert_type_basic): Handle
2391 TYPE_CODE_ERROR; warn and fallback to int for variables with
2392 unknown type.
2393
fe13dfec
PA
23942017-09-04 Pedro Alves <palves@redhat.com>
2395
2396 * eval.c (evaluate_var_value): New function, factored out from ...
2397 (evaluate_subexp_standard): ... here.
2398
d008ee21
PA
23992017-09-04 Pedro Alves <palves@redhat.com>
2400
2401 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2402 Remove useless assignments to 'op'.
2403
827d0c51
PA
24042017-09-04 Pedro Alves <palves@redhat.com>
2405
2406 * eval.c (eval_skip_value): New function.
2407 (evaluate_subexp_standard): Use it.
2408
2c5a2be1
PA
24092017-09-04 Pedro Alves <palves@redhat.com>
2410
2411 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2412 function name from symbol/minsym and pass it to
2413 error_call_unknown_return_type.
2414
74ea4be4
PA
24152017-09-04 Pedro Alves <palves@redhat.com>
2416
2417 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2418 * ax-gdb.c (gen_msym_var_ref): New function.
2419 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2420 * eval.c (evaluate_var_msym_value): New function.
2421 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2422 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2423 to call_function_by_hand.
2424 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2425 Handle OP_VAR_MSYM_VALUE.
2426 (union exp_element) <msymbol>: New field.
2427 * minsyms.h (struct type): Forward declare.
2428 (find_minsym_type_and_address): Declare.
2429 * parse.c (write_exp_elt_msym): New function.
2430 (write_exp_msymbol): Delete, refactored as ...
2431 (find_minsym_type_and_address): ... this new function.
2432 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2433 (operator_length_standard, operator_check_standard): Handle
2434 OP_VAR_MSYM_VALUE.
2435 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2436
7022349d
PA
24372017-09-04 Pedro Alves <palves@redhat.com>
2438
2439 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2440 TYPE_GNU_IFUNC specially here. Throw error if return type is
2441 unknown.
2442 * ada-typeprint.c (print_func_type): Handle functions with unknown
2443 return type.
2444 * c-typeprint.c (c_type_print_base): Handle functions and methods
2445 with unknown return type.
2446 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2447 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2448 * compile/compile-c-types.c: Include "objfiles.h".
2449 (convert_func): For functions with unknown return type, warn and
2450 default to int.
2451 * compile/compile-object-run.c (compile_object_run): Adjust call
2452 to call_function_by_hand_dummy.
2453 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2454 call_function_by_hand.
2455 * eval.c (evaluate_subexp_standard): Adjust calls to
2456 call_function_by_hand. Handle functions and methods with unknown
2457 return type. Pass expect_type to call_function_by_hand.
2458 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2459 return type.
2460 * gcore.c (call_target_sbrk): Adjust call to
2461 call_function_by_hand.
2462 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2463 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2464 an integer address type instead of nodebug.
2465 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2466 call_function_by_hand.
2467 * infcall.c (error_call_unknown_return_type): New function.
2468 (call_function_by_hand): New "default_return_type" parameter.
2469 Pass it down.
2470 (call_function_by_hand_dummy): New "default_return_type"
2471 parameter. Use it instead of defaulting to int. If there's no
2472 default and the return type is unknown, throw an error. If
2473 there's a default return type, and the called function has no
2474 debug info, then assume the function is prototyped.
2475 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2476 New "default_return_type" parameter.
2477 (error_call_unknown_return_type): New declaration.
2478 * linux-fork.c (call_lseek): Cast return type of lseek.
2479 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2480 call_function_by_hand.
2481 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2482 calls to call_function_by_hand.
2483 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2484 return type.
2485 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2486 (value_nsstring, print_object_command): Adjust calls to
2487 call_function_by_hand.
2488 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2489 functions with unknown return type.
2490 (pascal_type_print_func_varspec_suffix): New function.
2491 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2492 TYPE_CODE_METHOD>: Use it.
2493 * python/py-value.c (valpy_call): Adjust call to
2494 call_function_by_hand.
2495 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2496 call_function_by_hand.
2497 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2498 call_function_by_hand.
2499 * valops.c (value_allocate_space_in_inferior): Adjust call to
2500 call_function_by_hand.
2501 * typeprint.c (type_print_unknown_return_type): New function.
2502 * typeprint.h (type_print_unknown_return_type): New declaration.
2503
54990598
PA
25042017-09-04 Pedro Alves <palves@redhat.com>
2505
2506 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2507 types with more than one parameter as prototyped.
2508
9a24775b
PA
25092017-09-04 Pedro Alves <palves@redhat.com>
2510
2511 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2512 (disassemble_command): Use gdb_disassembly_flags instead of bare
2513 int.
2514 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2515 (dump_insns, do_mixed_source_and_assembly_deprecated)
2516 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2517 Use gdb_disassembly_flags instead of bare int.
2518 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2519 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2520 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2521 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2522 (enum gdb_disassembly_flag): ... values of this new enumeration.
2523 (gdb_disassembly_flags): Define.
2524 (gdb_disassembly)
2525 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2526 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2527 gdb_disassembly_flags instead of bare int.
2528 * record-btrace.c (btrace_insn_history)
2529 (record_btrace_insn_history, record_btrace_insn_history_range)
2530 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2531 instead of bare int.
2532 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2533 Use gdb_disassembly_flags instead of bare int.
2534 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2535 Define.
2536 * target-delegates.c: Regenerate.
2537 * target.c (target_insn_history, target_insn_history_from)
2538 (target_insn_history_range): Use gdb_disassembly_flags instead of
2539 bare int.
2540 * target.h: Include "disasm.h".
2541 (struct target_ops) <to_insn_history, to_insn_history_from,
2542 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2543 int.
2544 (target_insn_history, target_insn_history_from)
2545 (target_insn_history_range): Use gdb_disassembly_flags instead of
2546 bare int.
2547
80a65e9b
SM
25482017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2549
2550 * cli/cli-script.c (build_command_line): For if/while commands,
2551 check whether args is empty.
2552
6b66338c
SM
25532017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2554
2555 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2556 (enum command_control_type): Likewise.
2557 (struct command_line): Likewise.
2558 (free_command_lines): Likewise.
2559 (struct command_lines_deleter): Likewise.
2560 (command_line_up): Likewise.
2561 (read_command_lines): Likewise.
2562 (read_command_lines_1): Likewise.
2563 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2564 (enum command_control_type): Likewise.
2565 (struct command_line): Likewise.
2566 (free_command_lines): Likewise.
2567 (struct command_lines_deleter): Likewise.
2568 (command_line_up): Likewise.
2569 (read_command_lines): Likewise.
2570 (read_command_lines_1): Likewise.
2571 * breakpoint.h: Include cli/cli-script.h.
2572 * extension-priv.h: Likewise.
2573 * gdbcmd.h: Likewise.
2574
51abb421
PA
25752017-09-04 Pedro Alves <palves@redhat.com>
2576
2577 * ada-lang.c (is_known_support_routine): Move sal declaration to
2578 where it is initialized.
2579 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2580 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2581 (clear_command, update_static_tracepoint): Remove init_sal
2582 references. Move declarations closer to initializations.
2583 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2584 initializations.
2585 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2586 references. Move sal declarations closer to initializations.
2587 * frame.c (find_frame_sal): Return a symtab_and_line via function
2588 return instead of output parameter. Remove init_sal references.
2589 * frame.h (find_frame_sal): Return a symtab_and_line via function
2590 return instead of output parameter.
2591 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2592 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2593 instead of memset.
2594 (gdbscm_find_pc_line): Remove init_sal reference.
2595 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2596 references. Move declarations closer to initializations.
2597 * infcmd.c (set_step_frame): Update. Move declarations closer to
2598 initializations.
2599 (finish_backward): Remove init_sal references. Move declarations
2600 closer to initializations.
2601 * infrun.c (process_event_stop_test, handle_step_into_function)
2602 (insert_hp_step_resume_breakpoint_at_frame)
2603 (insert_step_resume_breakpoint_at_caller): Likewise.
2604 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2605 (symbol_to_sal): Likewise.
2606 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2607 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2608 to its initialization.
2609 * reverse.c (save_bookmark_command): Use new/delete. Remove
2610 init_sal references. Move declarations closer to initializations.
2611 * source.c (get_current_source_symtab_and_line): Remove brace
2612 initialization.
2613 (set_current_source_symtab_and_line): Now takes the sal by const
2614 reference. Remove brace initialization.
2615 (line_info): Remove init_sal reference.
2616 * source.h (set_current_source_symtab_and_line): Now takes a
2617 symtab_and_line via const reference.
2618 * stack.c (set_current_sal_from_frame): Adjust.
2619 (print_frame_info): Adjust.
2620 (get_last_displayed_sal): Return the sal via function return
2621 instead of via output parameter. Simplify.
2622 (frame_info): Adjust.
2623 * stack.h (get_last_displayed_sal): Return the sal via function
2624 return instead of via output parameter.
2625 * symtab.c (init_sal): Delete.
2626 (find_pc_sect_line): Remove init_sal references. Move
2627 declarations closer to initializations.
2628 (find_function_start_sal): Remove init_sal references. Move
2629 declarations closer to initializations.
2630 * symtab.h (struct symtab_and_line): In-class initialize all
2631 fields.
2632 * tracepoint.c (set_traceframe_context)
2633 (print_one_static_tracepoint_marker): Remove init_sal references.
2634 Move declarations closer to initializations.
2635 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2636 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2637 declarations closer to initializations.
2638 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2639 init_sal references. Adjust.
2640
6c5b2ebe
PA
26412017-09-04 Pedro Alves <palves@redhat.com>
2642
2643 * ax-gdb.c (agent_command_1): Use range-for.
2644 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2645 * breakpoint.c: Include "common/array-view.h".
2646 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2647 parameter from struct symtabs_and_lines to
2648 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2649 (breakpoint_sals_to_pc): Change sals parameter from struct
2650 symtabs_and_lines to std::vector reference.
2651 (check_fast_tracepoint_sals): Change sals parameter from struct
2652 symtabs_and_lines to std::array_view. Use range-for.
2653 (decode_static_tracepoint_spec): Return a std::vector instead of
2654 symtabs_and_lines. Update.
2655 (create_breakpoint): Update.
2656 (break_range_command, until_break_command, clear_command): Update.
2657 (base_breakpoint_decode_location, bkpt_decode_location)
2658 (bkpt_probe_create_sals_from_location)
2659 (bkpt_probe_decode_location, tracepoint_decode_location)
2660 (tracepoint_probe_decode_location)
2661 (strace_marker_create_sals_from_location): Return a std::vector
2662 instead of symtabs_and_lines.
2663 (strace_marker_create_breakpoints_sal): Update.
2664 (strace_marker_decode_location): Return a std::vector instead of
2665 symtabs_and_lines. Update.
2666 (update_breakpoint_locations): Change struct symtabs_and_lines
2667 parameters to gdb::array_view. Adjust.
2668 (location_to_sals): Return a std::vector instead of
2669 symtabs_and_lines. Update.
2670 (breakpoint_re_set_default): Use std::vector instead of struct
2671 symtabs_and_lines.
2672 (decode_location_default): Return a std::vector instead of
2673 symtabs_and_lines. Update.
2674 * breakpoint.h: Include "common/array-view.h".
2675 (struct breakpoint_ops) <decode_location>: Now returns a
2676 std::vector instead of returning a symtabs_and_lines via output
2677 parameter.
2678 (update_breakpoint_locations): Change sals parameters to use
2679 gdb::array_view.
2680 * cli/cli-cmds.c (edit_command, list_command): Update to use
2681 std::vector and gdb::array_view.
2682 (ambiguous_line_spec): Adjust to use gdb::array_view and
2683 range-for.
2684 (compare_symtabs): Rename to ...
2685 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2686 const reference and adjust.
2687 (filter_sals): Rewrite using std::vector and standard algorithms.
2688 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2689 (jump_command): Update to use std::vector.
2690 * linespec.c (struct linespec_state) <canonical_names>: Update
2691 comment.
2692 (add_sal_to_sals_basic): Delete.
2693 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2694 (decode_line_2, create_sals_line_offset)
2695 (convert_address_location_to_sals, convert_linespec_to_sals)
2696 (convert_explicit_location_to_sals, parse_linespec)
2697 (event_location_to_sals, decode_line_full, decode_line_1)
2698 (decode_line_with_current_source)
2699 (decode_line_with_last_displayed, decode_objc)
2700 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2701 (linespec_result::~linespec_result): Adjust to use std::vector
2702 instead of symtabs_and_lines.
2703 * linespec.h (linespec_sals::sals): Now a std::vector.
2704 (struct linespec_result): Use std::vector, bool, and in-class
2705 initialization.
2706 (decode_line_1, decode_line_with_current_source)
2707 (decode_line_with_last_displayed): Return std::vector.
2708 * macrocmd.c (info_macros_command): Use std::vector.
2709 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2710 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2711 std::vector.
2712 * probe.h (parse_probes): Return a std::vector.
2713 * python/python.c (gdbpy_decode_line): Use std::vector and
2714 gdb::array_view.
2715 * source.c (select_source_symtab, line_info): Use std::vector.
2716 * stack.c (func_command): Use std::vector.
2717 * symtab.h (struct symtabs_and_lines): Delete.
2718 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2719
7c44b49c
PA
27202017-09-04 Pedro Alves <palves@redhat.com>
2721
2722 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2723 unittests/array-view-selftests.c.
2724 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2725 * common/array-view.h: New file.
2726 * unittests/array-view-selftests.c: New file.
2727
e439fa14
PA
27282017-09-04 Pedro Alves <palves@redhat.com>
2729
2730 * cli/cli-cmds.c (edit_command): Pass message to
2731 ambiguous_line_spec.
2732 (list_command): Pass message to ambiguous_line_spec. Say
2733 "first"/"last" instead of "start" and "end" to be consistent with
2734 the manual.
2735 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2736 them to print formatted message.
2737
7525b645
PA
27382017-09-04 Pedro Alves <palves@redhat.com>
2739
2740 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2741 ftrace_update_insns by reference instead of pointer.
2742
badc0020
YQ
27432017-09-04 Yao Qi <yao.qi@linaro.org>
2744
2745 * i386-go32-tdep.c: Include x86-xstate.h.
2746 (i386_go32_init_abi): Call i386_target_description.
2747 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2748 if xcr0 is X86_XSTATE_X87_MASK.
2749 * i386-tdep.h (tdesc_i386): Remove the declaration.
2750 (tdesc_i386_mmx): Likewise.
2751
d78bdb54
YQ
27522017-09-04 Yao Qi <yao.qi@linaro.org>
2753
2754 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2755 X86_XSTATE_SSE_MASK instead of 0.
2756
ca1fa5ee
YQ
27572017-09-04 Yao Qi <yao.qi@linaro.org>
2758
2759 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2760 i386_target_description.
2761 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2762 i386_target_description.
2763 * i386-tdep.c (i386_gdbarch_init): Likewise.
2764
2434b019
YQ
27652017-09-04 Yao Qi <yao.qi@linaro.org>
2766
2767 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2768 (x86_darwin_init_abi_64): Call amd64_target_description.
2769 * amd64-dicos-tdep.c: Likewise.
2770 * amd64-fbsd-nat.c: Likewise.
2771 * amd64-fbsd-tdep.c: Likewise.
2772 * amd64-nbsd-tdep.c: Likewise.
2773 * amd64-obsd-tdep.c: Likewise.
2774 * amd64-sol2-tdep.c: Likewise.
2775 * amd64-windows-tdep.c: Likewise.
2776 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2777
0860c437
SM
27782017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2779
2780 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2781 (btrace_function) <insn>: Change type to use std::vector.
2782 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2783 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2784 ftrace_update_insns, ftrace_compute_global_level_offset,
2785 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2786 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2787 change to std::vector.
2788 (ftrace_update_insns): Adjust to change to std::vector, change
2789 type of INSN parameter.
2790 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2791 * record-btrace.c (btrace_call_history_insn_range,
2792 btrace_compute_src_line_range,
2793 record_btrace_frame_prev_register): Adjust to change to
2794 std::vector.
2795 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2796 to change to std::vector.
2797
0638b7f9
TT
27982017-09-03 Tom Tromey <tom@tromey.com>
2799
2800 * corefile.c (reopen_exec_file): Use std::string.
2801
8f84fb0e
TT
28022017-09-03 Tom Tromey <tom@tromey.com>
2803
2804 * compile/compile.c (compile_register_name_mangled): Return
2805 std::string.
2806 * compile/compile-loc2c.c (pushf_register_address): Update.
2807 (pushf_register): Update.
2808 * compile/compile-c-types.c (convert_array): Update.
2809 * compile/compile-c-symbols.c (generate_vla_size): Update.
2810 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2811 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2812 (convert_one_symbol): Update.
2813 (generate_c_for_for_one_variable): Update.
2814 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2815 std::string.
2816 (generate_register_struct): Update.
2817 * compile/compile-internal.h (c_get_range_decl_name): Return a
2818 std::string.
2819 (compile_register_name_mangled): Return std::string.
2820
18e9961f
TT
28212017-09-03 Tom Tromey <tom@tromey.com>
2822
2823 * utils.c (perror_string): Return a std::string.
2824 (throw_perror_with_name, perror_warning_with_name): Update.
2825
45343786
TT
28262017-09-03 Tom Tromey <tom@tromey.com>
2827
2828 * demangle.c (demangle_command): Use std::string,
2829 unique_xmalloc_ptr.
2830
b57af503
TT
28312017-09-03 Tom Tromey <tom@tromey.com>
2832
2833 * cli/cli-setshow.c (do_set_command): Use std::string.
2834
6eecf35f
TT
28352017-09-03 Tom Tromey <tom@tromey.com>
2836
2837 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2838
56496dd4
TT
28392017-09-03 Tom Tromey <tom@tromey.com>
2840
2841 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2842
e91a1fa7
TT
28432017-09-03 Tom Tromey <tom@tromey.com>
2844
2845 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2846 gdb::unique_xmalloc_ptr.
2847
7ffd83d7
TT
28482017-09-03 Tom Tromey <tom@tromey.com>
2849
2850 * thread.c (print_thread_info_1): Use string_printf.
2851 (thread_apply_command, thread_apply_all_command): Use
2852 std::string.
2853
1ccbe998
TT
28542017-09-03 Tom Tromey <tom@tromey.com>
2855
2856 * valprint.c (val_print_string): Update.
2857 * gdbcore.h (memory_error_message): Return std::string.
2858 * corefile.c (memory_error_message): Return std::string.
2859 (memory_error): Update.
2860 * breakpoint.c (insert_bp_location): Update.
2861
23fdd69e
SM
28622017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2863
2864 * target/waitstatus.h (target_waitstatus_to_string): Change
2865 return type to std::string.
2866 * target/waitstatus.c (target_waitstatus_to_string): Return
2867 std::string.
2868 * target.h (target_waitstatus_to_string): Remove declaration.
2869 * infrun.c (resume, clear_proceed_status_thread,
2870 print_target_wait_results, do_target_wait, save_waitstatus,
2871 stop_all_threads): Adjust.
2872 * record-btrace.c (record_btrace_wait): Adjust.
2873 * target-debug.h
2874 (target_debug_print_struct_target_waitstatus_p): Adjust.
2875
5c811d30
JK
28762017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2877
2878 PR gdb/22046
2879 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2880 detection.
2881
0a2dde4a
SDJ
28822017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2883
2884 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2885 for setting/unsetting environment variables on the remote target.
2886 (New remote packets): Add entries for QEnvironmentHexEncoded,
2887 QEnvironmentUnset and QEnvironmentReset.
2888 * common/environ.c (gdb_environ::operator=): Extend method to
2889 handle m_user_set_env_list and m_user_unset_env_list.
2890 (gdb_environ::clear): Likewise.
2891 (match_var_in_string): Change type of first parameter from 'char
2892 *' to 'const char *'.
2893 (gdb_environ::set): Extend method to handle
2894 m_user_set_env_list and m_user_unset_env_list.
2895 (gdb_environ::unset): Likewise.
2896 (gdb_environ::clear_user_set_env): New method.
2897 (gdb_environ::user_set_envp): Likewise.
2898 (gdb_environ::user_unset_envp): Likewise.
2899 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2900 m_user_unset_env_list on move constructor/assignment.
2901 (unset): Add new default parameter 'update_unset_list = true'.
2902 (clear_user_set_env): New method.
2903 (user_set_envp): Likewise.
2904 (user_unset_envp): Likewise.
2905 (m_user_set_env_list): New std::set.
2906 (m_user_unset_env_list): Likewise.
2907 * common/rsp-low.c (hex2str): New function.
2908 (bin2hex): New overload for bin2hex function.
2909 * common/rsp-low.c (hex2str): New prototype.
2910 (str2hex): New overload prototype.
2911 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2912 QEnvironmentUnset and QEnvironmentReset.
2913 (remote_protocol_features): Add QEnvironmentHexEncoded,
2914 QEnvironmentUnset and QEnvironmentReset packets.
2915 (send_environment_packet): New function.
2916 (extended_remote_environment_support): Likewise.
2917 (extended_remote_create_inferior): Call
2918 extended_remote_environment_support.
2919 (_initialize_remote): Add QEnvironmentHexEncoded,
2920 QEnvironmentUnset and QEnvironmentReset packet configs.
2921 * unittests/environ-selftests.c (gdb_selftest_env_var):
2922 New variable.
2923 (test_vector_initialization): New function.
2924 (test_init_from_host_environ): Likewise.
2925 (test_reinit_from_host_environ): Likewise.
2926 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2927 Likewise.
2928 (test_unset_set_empty_vector): Likewise.
2929 (test_vector_clear): Likewise.
2930 (test_std_move): Likewise.
2931 (test_move_constructor):
2932 (test_self_move): Likewise.
2933 (test_set_unset_reset): Likewise.
2934 (run_tests): Rewrite in terms of the functions above.
2935
654670a4
WP
29362017-08-31 Weimin Pan <weimin.pan@oracle.com>
2937
2938 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2939 (adi_available): Use a temp variable of type CORE_ADDR as argument
2940 3 when calling target_auxv_search.
2941 (adi_normalize_address): Use masks and xor operators to calculate
2942 normalized address.
2943 (adi_read_versions, adi_write_versions, adi_print_versions)
2944 (do_examine, do_assign): Use paddress.
2945
7755ddb7
JB
29462017-08-29 John Baldwin <jhb@FreeBSD.org>
2947
2948 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2949 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2950 out of loop and add supply of FIR.
2951 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2952 add collect of FIR.
2953
fd437cbc
SM
29542017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2955
3804a343 2956 PR gdb/21827
fd437cbc
SM
2957 * cli/cli-script.c (define_command): Don't convert command name
2958 to lower case.
2959
988f6b3d
JB
29602017-08-25 Joel Brobecker <brobecker@adacore.com>
2961
2962 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2963 Update all callers accordingly. Remove all code blocks handling
2964 the case where DISPP is not NULL.
2965
663c44ac
JK
29662017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2967
2968 PR symtab/22003
2969 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2970 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2971 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2972
f1902523
JK
29732017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2974
2975 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2976 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2977 (read_comp_units_from_section): New parameter abbrev_section, use
2978 read_and_check_comp_unit_head, allocate signatured_type if needed.
2979 (create_all_comp_units): Update read_comp_units_from_section caller.
2980
87215ad1
SDJ
29812017-08-23 Pedro Alves <palves@redhat.com>
2982
2983 PR remote/21852
2984 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2985 to null_ptid and switch to thread without reading the registers
2986 after adding the inferior.
2987
6e41ddec
JK
29882017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2989
2990 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2991 compile-gcc.
2992 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2993 (compile_to_object): Implement compile_gcc.
2994 (_initialize_compile): Install "set compile-gcc". Initialize
2995 compile_gcc.
2996
e68c32d5
JK
29972017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2998
2999 * compile/compile.c (compile_to_object): Conditionally call
3000 set_verbose. Conditionally call compile or compile_v0.
3001
58afddc6
WP
30022017-08-07 Weimin Pan <weimin.pan@oracle.com>
3003
3004 * sparc64-tdep.h: (adi_normalize_address): New export.
3005 * sparc-nat.h: (open_adi_tag_fd): New export.
3006 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3007 * sparc64-linux-tdep.c:
3008 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3009 (sparc64_linux_handle_segmentation_fault): New function.
3010 (sparc64_linux_init_abi): Register
3011 sparc64_linux_handle_segmentation_fault
3012 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3013 (sparc64_addr_bits_remove): New function.
3014 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3015 (MAX_PROC_NAME_SIZE): New macro.
3016 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3017 (sparc64adilist): New variable.
3018 (adi_proc_list): New variable.
3019 (find_adi_info): New function.
3020 (add_adi_info): New function.
3021 (get_adi_info_proc): New function.
3022 (get_adi_info): New function.
3023 (info_adi_command): New function.
3024 (read_maps_entry): New function.
3025 (adi_available): New function.
3026 (adi_normalize_address): New function.
3027 (adi_align_address): New function.
3028 (adi_convert_byte_count): New function.
3029 (adi_tag_fd): New function.
3030 (adi_is_addr_mapped): New function.
3031 (adi_read_versions): New function.
3032 (adi_write_versions): New function.
3033 (adi_print_versions): New function.
3034 (do_examine): New function.
3035 (do_assign): New function.
3036 (adi_examine_command): New function.
3037 (adi_assign_command): New function.
3038 (_initialize_sparc64_adi_tdep): New function.
3039
11db9430
SM
30402017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3041
3042 * breakpoint.c (breakpoints_info): Rename to ...
3043 (info_breakpoints_command): ... this.
3044 (watchpoints_info): Rename to ...
3045 (info_watchpoints_command): ... this.
3046 (tracepoints_info): Rename to ...
3047 (info_tracepoints_command): ... this.
3048 (_initialize_breakpoint): Adjust.
3049 * dcache.c (dcache_info): Rename to ...
3050 (info_display_command): ... this.
3051 (_initialize_dcache): Adjust.
3052 * frame.h (args_info): Rename to ...
3053 (info_args_command): ... this.
3054 (locals_info): Rename to ...
3055 (info_locals_command): ... this.
3056 * infcmd.c (nofp_registers_info): Rename to ...
3057 (info_registers_command): ... this.
3058 (float_info): Rename to ...
3059 (info_float_command): ... this.
3060 (program_info): Rename to ...
3061 (info_program_command): ... this.
3062 (all_registers_info): Rename to ...
3063 (info_all_registers_command): ... this.
3064 (vector_info): Rename to ...
3065 (info_vector_command): ... this.
3066 (float_info): Rename to ...
3067 (info_float_command): ... this.
3068 (_initialize_infcmd): Adjust.
3069 * inferior.h (term_info): Rename to ...
3070 (info_terminal_command): ... this.
3071 * inflow.c (term_info): Rename to ...
3072 (info_terminal_command): ... this.
3073 (_initialize_inflow): Adjust.
3074 * infrun.c (signals_info): Rename to ...
3075 (info_signals_command): ... this.
3076 (_initialize_infrun): Adjust.
3077 * objc-lang.c (classes_info): Rename to ...
3078 (info_classes_command): ... this.
3079 (selectors_info): Rename to ...
3080 (info_selectors_command): ... this.
3081 (_initialize_objc_language): Adjust.
3082 * printcmd.c (sym_info): Rename to ...
3083 (info_symbol_command): ... this.
3084 (address_info): Rename to ...
3085 (info_address_command): ... this.
3086 (display_info): Rename to ...
3087 (info_display_command): ... this.
3088 (_initialize_printcmd): Adjust.
3089 * reverse.c (bookmarks_info): Rename to ...
3090 (info_breakpoints_command): ... this.
3091 (_initialize_reverse): Adjust.
3092 * ser-go32.c (dos_info): Rename to ...
3093 (info_serial_command): ... this.
3094 (_initialize_ser_dos): Adjust.
3095 * skip.c (skip_info): Rename to ...
3096 (info_skip_command): ... this.
3097 (_initialize_step_skip): Adjust.
3098 * source.c (line_info): Rename to ...
3099 (info_line_command): ... this.
3100 (source_info): Rename to ...
3101 (info_source_command)
3102 * stack.c (frame_info): Rename to ...
3103 (info_frame_command): ... this.
3104 (locals_info): Rename to ...
3105 (info_locals_command): ... this.
3106 (args_info): Rename to ...
3107 (info_args_command): ... this.
3108 (_initialize_stack): Adjust.
3109 * symtab.c (sources_info): Rename to ...
3110 (info_sources_command): ... this.
3111 (variables_info): Rename to ...
3112 (info_variables_command): ... this.
3113 (functions_info): Rename to ...
3114 (info_functions_command): ... this.
3115 (types_info): Rename to ...
3116 (info_types_command): ... this.
3117 (_initialize_symtab): Adjust.
3118 * target.c (target_info): Rename to ...
3119 (info_target_command): ... this.
3120 (initialize_targets): Adjust.
3121 * tracepoint.c (tvariables_info): Rename to ...
3122 (info_tvariables_command): ... this.
3123 (scope_info): Rename to ...
3124 (info_scope_command): ... this.
3125 (trace_dump_actions): Adjust.
3126 (_initialize_tracepoint): Adjust.
3127
b270e6f9
TT
31282017-08-22 Tom Tromey <tom@tromey.com>
3129
3130 * breakpoint.h (install_breakpoint): Update.
3131 * breakpoint.c (add_solib_catchpoint): Update.
3132 (install_breakpoint): Change argument to a std::unique_ptr.
3133 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3134 (create_breakpoint_sal, create_breakpoint): Update.
3135 (watch_command_1, catch_exec_command_1)
3136 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3137 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3138 Return the breakpoint.
3139 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3140 (new_single_step_breakpoint): Update.
3141 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3142 std::unique_ptr.
3143 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3144 std::unique_ptr.
3145 * break-catch-sig.c (create_signal_catchpoint): Use
3146 std::unique_ptr.
3147 * ada-lang.c (create_ada_exception_catchpoint): Use
3148 std::unique_ptr.
3149
36bd8eaa
TT
31502017-08-22 Tom Tromey <tom@tromey.com>
3151
3152 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3153
56f37645
TT
31542017-08-22 Tom Tromey <tom@tromey.com>
3155
3156 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3157 (lookup_partial_symbol): Update.
3158
0b581c69
TT
31592017-08-22 Tom Tromey <tom@tromey.com>
3160
3161 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3162 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3163 (find_and_open_source, symtab_to_fullname): Update.
3164 * psymtab.c (psymtab_to_fullname): Update.
3165
14278e1f
TT
31662017-08-22 Tom Tromey <tom@tromey.com>
3167
3168 * exec.c (exec_file_attach): Update.
3169 * linux-thread-db.c (try_thread_db_load): Update.
3170 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3171 * utils.c (gdb_realpath): Change return type.
3172 (gdb_realpath_keepfile): Update.
3173 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3174 (_initialize_utils): Register the new self test.
3175 * source.c (openp): Update.
3176 (find_and_open_source): Update.
3177 * nto-tdep.c (nto_find_and_open_solib): Update.
3178 * main.c (set_gdb_data_directory): Update.
3179 (captured_main_1): Update.
3180 * dwarf2read.c (dwarf2_get_dwz_file): Update
3181 (dw2_map_symbol_filenames): Update.
3182 * auto-load.c (auto_load_safe_path_vec_update): Update.
3183 (filename_is_in_auto_load_safe_path_vec): Change type of
3184 "filename_realp".
3185 (auto_load_objfile_script): Update.
3186 (file_is_auto_load_safe): Update. Use std::string.
3187 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3188
4971c9a7
TT
31892017-08-22 Tom Tromey <tom@tromey.com>
3190
3191 * utils.c (gdb_realpath_keepfile): Return a
3192 gdb::unique_xmalloc_ptr.
3193 * exec.c (exec_file_attach): Update.
3194 * utils.h (gdb_realpath_keepfile): Return a
3195 gdb::unique_xmalloc_ptr.
3196
e3e41d58
TT
31972017-08-22 Tom Tromey <tom@tromey.com>
3198
3199 * compile/compile.c (compile_file_command): Use
3200 gdb::unique_xmalloc_ptr, std::string.
3201 * utils.c (gdb_abspath): Change return type.
3202 * source.c (openp): Update.
3203 * objfiles.c (allocate_objfile): Update.
3204 * main.c (set_gdb_data_directory): Update.
3205 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3206
0d999a6e
ZZ
32072017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3208
3209 * cli-cmds.c (list_commands): List actual code around more than
3210 one location.
3211
329d5e7e
JB
32122017-08-21 John Baldwin <jhb@FreeBSD.org>
3213
3214 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3215
bf223d3e
PA
32162017-08-21 Pedro Alves <palves@redhat.com>
3217
3218 PR gdb/19487
3219 * c-exp.y (variable production): Handle function aliases.
3220 * minsyms.c (msymbol_is_text): New function.
3221 * minsyms.h (msymbol_is_text): Declare.
3222 * symtab.c (find_function_alias_target): New function.
3223 * symtab.h (find_function_alias_target): Declare.
3224
c973d0aa
PA
32252017-08-21 Pedro Alves <palves@redhat.com>
3226
3227 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3228 typedefs.
3229 * typeprint.c (whatis_exp): If handling "whatis", and expression
3230 is OP_TYPE, strip one typedef level. Otherwise don't strip
3231 typedefs here.
3232 * valops.c (value_cast): Save "to" type before resolving
3233 stubs/typedefs. Use that type as resulting value's type.
3234
2989a365
TT
32352017-08-18 Tom Tromey <tom@tromey.com>
3236 Pedro Alves <palves@redhat.com>
3237
3238 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3239 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3240 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3241 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3242 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3243 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3244 (linux_get_siginfo_data): Add "thread" argument. Use
3245 scoped_restore.
3246 * linux-nat.c (linux_child_follow_fork)
3247 (check_stopped_by_watchpoint): Use scoped_restore.
3248 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3249 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3250 (restore_inferior_ptid, save_inferior_ptid): Remove.
3251 * btrace.c (btrace_fetch): Use scoped_restore.
3252 * bsd-uthread.c (bsd_uthread_fetch_registers)
3253 (bsd_uthread_store_registers): Use scoped_restore.
3254 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3255 scoped_restore.
3256 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3257 (aix_thread_xfer_partial): Use scoped_restore.
3258 * inferior.h (save_inferior_ptid): Remove.
3259
e60eb288
YQ
32602017-08-18 Yao Qi <yao.qi@linaro.org>
3261
3262 PR tdep/21818
3263 * arm-tdep.c (gdb_print_insn_arm): Mark
3264 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3265
6d580b63
YQ
32662017-08-18 Yao Qi <yao.qi@linaro.org>
3267
3268 * NEWS: Mention GDBserver's new option "--selftest".
3269 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3270 * selftest.c: Move it to common/selftest.c.
3271 * selftest.h: Move it to common/selftest.h.
3272 * selftest-arch.c (reset): New function.
3273 (tests_with_arch): Call reset.
3274
86dcbf50
YQ
32752017-08-18 Yao Qi <yao.qi@linaro.org>
3276
3277 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3278 instead of exception_fprintf and printf_filtered.
3279
7649770c
YQ
32802017-08-18 Yao Qi <yao.qi@linaro.org>
3281
3282 * selftest.c (register_self_test): Rename it to
3283 selftests::register_test.
3284 (run_self_tests): selftest::run_tests.
3285 * selftest.h: Update declarations.
3286 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3287 selftests::register_test_foreach_arch.
3288 * selftest-arch.h: Update declaration.
3289 * aarch64-tdep.c: Update.
3290 * arm-tdep.c: Likewise.
3291 * disasm-selftests.c: Likewise.
3292 * dwarf2loc.c: Likewise.
3293 * dwarf2-frame.c: Likewise.
3294 * findvar.c: Likewise.
3295 * gdbarch-selftests.c: Likewise.
3296 * maint.c (maintenance_selftest): Likewise.
3297 * regcache.c: Likewise.
3298 * rust-exp.y: Likewise.
3299 * selftest-arch.c: Likewise.
3300 * unittests/environ-selftests.c: Likewise.
3301 * unittests/function-view-selftests.c: Likewise.
3302 * unittests/offset-type-selftests.c: Likewise.
3303 * unittests/optional-selftests.c: Likewise.
3304 * unittests/scoped_restore-selftests.c: Likewise.
3305 * utils-selftests.c: Likewise.
3306
b0cba12e
PA
33072017-08-17 Pedro Alves <palves@redhat.com>
3308
3309 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3310 local.
3311
4c8aa72d
PA
33122017-08-17 Pedro Alves <palves@redhat.com>
3313
3314 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3315 field.
3316 (reset_die_in_process): Delete, replaced by ...
3317 (process_die_scope): ... this new class. Make it responsible for
3318 freeing cu->line_header too.
3319 (process_die): Use process_die_scope.
3320 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3321 cu->line_header_die_owner. Don't release the line header if it's
3322 owned by the CU.
3323 (setup_type_unit_groups): Make the CU/DIE own the line header.
3324 Don't release the line header here.
3325
ba713918
AL
33262017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3327
3328 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3329
44d0fb3a
RK
33302017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3331
3332 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3333 Single-Key mode
3334
a5afdb16
RK
33352017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3336
3337 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3338 mode command list.
3339
47613aeb
SH
33402017-08-15 Stafford Horne <shorne@gmail.com>
3341
3342 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3343
9c3cc999
SH
33442017-08-15 Stafford Horne <shorne@gmail.com>
3345
3346 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3347
206726fb
SDJ
33482017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3349
3350 PR gdb/21954
3351 * infcmd.c (unset_environment_command): Use the 'clear' method on
3352 the environment instead of resetting it.
3353
0335ac6d
JB
33542017-08-15 John Baldwin <jhb@FreeBSD.org>
3355
3356 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3357 platforms.
3358
d3abe1c8
TT
33592017-08-14 Tom Tromey <tom@tromey.com>
3360
3361 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3362 (print_binary_chars): Likewise.
3363 (BITS_IN_BYTES): Remove.
3364
d6382fff
TT
33652017-08-14 Tom Tromey <tom@tromey.com>
3366
3367 PR gdb/21675
3368 * valprint.c (LOW_ZERO): Change value to 034.
3369 (print_octal_chars): Add static_asserts for octal constants.
3370 * printcmd.c (print_scalar_formatted): Add 'd' case.
3371
f978cb06
TT
33722017-08-11 Tom Tromey <tom@tromey.com>
3373
3374 * symfile.c (add_symbol_file_command): Use std::vector.
3375
2f5404b3
TT
33762017-08-14 Tom Tromey <tom@tromey.com>
3377
3378 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3379 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3380 std::move.
3381 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3382
de7985c3
PA
33832017-08-11 Pedro Alves <palves@redhat.com>
3384
3385 * infrun.c (process_event_stop_test): Adjust
3386 function_name_is_marked_for_skip call.
3387 * skip.c: Include <list>.
3388 (skiplist_entry): Make it a class with private fields, and
3389 getters/setters.
3390 (skiplist_entry_chain): Delete.
3391 (skiplist_entries): New.
3392 (skiplist_entry_count): Delete.
3393 (highest_skiplist_entry_num): New.
3394 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3395 (add_skiplist_entry): Delete.
3396 (skiplist_entry::skiplist_entry): New.
3397 (skiplist_entry::add_entry): New.
3398 (skip_file_command, skip_function): Adjust.
3399 (compile_skip_regexp): Delete.
3400 (skip_command): Don't compile regexp here. Adjust to use
3401 skiplist_entry::add_entry.
3402 (skip_info): Adjust to use range-for and getters.
3403 (skip_enable_command, skip_disable_command): Adjust to use
3404 range-for and setters.
3405 (skip_delete_command): Adjust to use std::list.
3406 (add_skiplist_entry): Delete.
3407 (skip_file_p): Delete, refactored as ...
3408 (skiplist_entry::do_skip_file_p): ... this new method.
3409 (skip_gfile_p): Delete, refactored as ...
3410 (skiplist_entry::do_gskip_file_p): ... this new method.
3411 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3412 (skiplist_entry::skip_function_p): ... this new method.
3413 (function_name_is_marked_for_skip): Now returns bool, and takes
3414 the function sal by const reference. Adjust to use range-for and
3415 skiplist_entry methods.
3416 (_initialize_step_skip): Remove references to
3417 skiplist_entry_chain, skiplist_entry_count.
3418 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3419 takes the function sal by const reference.
3420
be7d3cd5
YQ
34212017-08-11 Yao Qi <yao.qi@linaro.org>
3422
3423 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3424 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3425 (dwarf2_frame_cache):
3426 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3427 RETURN_MASK_ALL and set *this_case to NULL.
3428 * frame-unwind.h: Update comments.
3429
1c90d9f0
YQ
34302017-08-11 Yao Qi <yao.qi@linaro.org>
3431
3432 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3433 (dwarf2_frame_state_copy_regs): Remove.
3434 (dwarf2_frame_state_free_regs): Remove.
3435 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3436 (dwarf2_restore_rule): Call method .alloc_regs instead of
3437 dwarf2_frame_state_alloc_regs.
3438 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3439 constructor. Call std::move.
3440 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3441 (dwarf2_frame_cache): Likewise.
3442
3443 [GDB_SELF_TEST]: Include selftest.h and
3444 selftest-arch.h.
3445 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3446 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3447 execute_cfa_program_test.
3448
3449 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3450 copy ctor, assignment operator, move assignment.
3451 <alloc_regs>: New method.
3452 <swap>: New method.
3453 (struct dwarf2_frame_state): Delete dtor.
3454 (dwarf2_frame_state_alloc_regs): Remove declaration.
3455 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3456 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3457
afe37d6b
YQ
34582017-08-11 Yao Qi <yao.qi@linaro.org>
3459
3460 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3461 (dwarf2_frame_state::dwarf2_frame_state): New.
3462 (dwarf2_frame_state::~dwarf2_frame_state): New.
3463 (dwarf2_fetch_cfa_info): Update.
3464 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3465 rather than a pointer. Update code.
3466 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3467 dtor.
3468 <data_align, code_align, retaddr_column>: Change them to const.
3469 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3470 to bool.
3471
b348037f
YQ
34722017-08-11 Yao Qi <yao.qi@linaro.org>
3473
3474 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3475 <loc.exp>: New field.
3476 * dwarf2-frame.c (execute_cfa_program): Update.
3477 (dwarf2_frame_prev_register): Update.
3478
e7c9de26
PA
34792017-08-10 Pedro Alves <palves@redhat.com>
3480
3481 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3482
e8c6b620
JB
34832017-08-09 John Baldwin <jhb@FreeBSD.org>
3484
3485 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3486 (fbsd_pending_children): Use std::list.
3487 (fbsd_remember_child): Likewise.
3488 (fbsd_is_child_pending): Likewise.
3489 (fbsd_pending_vfork_done): Use std::forward_list.
3490 (fbsd_add_vfork_done): Likewise.
3491 (fbsd_is_vfork_done_pending): Likewise.
3492 (fbsd_next_vfork_done): Likewise.
3493
e4a26669
JB
34942017-08-09 John Baldwin <jhb@FreeBSD.org>
3495
3496 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3497 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3498 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3499 for `mapfilename'.
3500 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 3501 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 3502
142311d3
JB
35032017-08-09 John Baldwin <jhb@FreeBSD.org>
3504
3505 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3506 "filestuff.h".
3507 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3508
42fa2e0e
TT
35092017-08-09 Tom Tromey <tom@tromey.com>
3510
3511 * skip.c (skiplist_entry): New constructor.
3512 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3513 (skiplist_entry::file_is_glob): Now bool.
3514 (skiplist_entry::file, skiplist_entry::function): Now
3515 std::string.
3516 (make_skip_entry): Return a unique_ptr. Use new.
3517 (free_skiplist_entry, free_skiplist_entry_cleanup)
3518 (make_free_skiplist_entry_cleanup): Remove.
3519 (skip_command, skip_disable_command, add_skiplist_entry)
3520 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3521 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3522 (function_name_is_marked_for_skip): Update.
3523 (skip_delete_command): Update. Use delete.
3524
cd3af38d
JW
35252017-08-09 Jiong Wang <jiong.wang@arm.com>
3526
3527 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3528 (aarch64_linux_core_read_description): New function.
3529 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3530
29592bde
PA
35312017-08-09 Pedro Alves <palves@redhat.com>
3532
3533 * cp-name-parser.y (cp_comp_to_string): Return a
3534 gdb::unique_xmalloc_ptr<char>.
3535 * cp-support.c (replace_typedefs_qualified_name)
3536 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3537 (cp_canonicalize_string_full): Use op= instead of explicit
3538 convertion.
3539 (cp_class_name_from_physname, method_name_from_physname)
3540 (cp_func_name, cp_remove_params): Adjust to use
3541 gdb::unique_xmalloc_ptr<char>.
3542 * cp-support.h (cp_comp_to_string): Return a
3543 gdb::unique_xmalloc_ptr<char>.
3544 * python/py-type.c (typy_lookup_type): Adjust to use
3545 gdb::unique_xmalloc_ptr<char>.
3546
b3340438
L
35472017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3548
3549 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3550
e88e8651
YQ
35512017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3552 Yao Qi <yao.qi@linaro.org>
3553
3554 * cp-support.c (cp_canonicalize_string_full): Use
3555 gdb::unique_xmalloc_ptr<char>.
3556 (cp_canonicalize_string): Likewise.
3557
f5a29eb0
YQ
35582017-08-09 Yao Qi <yao.qi@linaro.org>
3559
3560 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3561 * regformats/i386/amd64-avx-avx512.dat: Remove.
3562 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3563 * regformats/i386/amd64-avx-mpx.dat:Remove.
3564 * regformats/i386/amd64-avx.dat: Remove.
3565 * regformats/i386/amd64-mpx.dat: Remove.
3566 * regformats/i386/i386-avx-avx512.dat: Remove.
3567 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3568 * regformats/i386/i386-avx-mpx.dat: Remove.
3569 * regformats/i386/i386-mmx.dat: Remove.
3570 * regformats/i386/i386-mpx.dat: Remove.
3571
57757c2f
YQ
35722017-08-09 Yao Qi <yao.qi@linaro.org>
3573
3574 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3575 * amd64-tdep.c: Don't include features/i386/x32*.c.
3576 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3577 functions.
3578 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3579 and i386/x32-avx-avx512.
3580 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3581 and i386/x32.xml.
3582 * features/i386/x32-avx-avx512.c: Removed.
3583 * features/i386/x32-avx-avx512.xml: Removed.
3584 * features/i386/x32-avx.c: Removed.
3585 * features/i386/x32-avx.xml: Removed.
3586 * features/i386/x32.c: Removed.
3587 * features/i386/x32.xml: Removed.
3588 * regformats/i386/x32-avx-avx512.dat: Removed.
3589 * regformats/i386/x32-avx.dat: Removed.
3590 * regformats/i386/x32.dat: Removed.
3591
ba7b109b
MR
35922017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3593
3594 PR breakpoints/21886
3595 * mem-break.c (default_memory_insert_breakpoint): Use
3596 `->placed_address' rather than `->reqstd_address' for the
3597 breakpoint location.
3598
e347efc3
MR
35992017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3600
3601 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3602 assertions.
3603
0dba2a6c
MR
36042017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3605
3606 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3607 a union of `tdep_info', `tdesc_data' and `id'.
3608 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3609 rather than `info.tdep_info'.
3610 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3611 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3612 * i386-tdep.c (i386_gdbarch_init): Likewise.
3613 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3614 * mips-tdep.c (mips_gdbarch_init): Likewise.
3615 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3616 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3617 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3618 `info.tdep_info'.
3619 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3620 `info.tdep_info'.
3621 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3622 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3623 `info.tdep_info'.
3624 * spu-tdep.c (spu_gdbarch_init): Likewise.
3625 * gdbarch.h: Regenerate.
3626
16eb6b2d
LS
36272017-08-07 Leszek Swirski <leszeks@google.com>
3628
7b005726 3629 PR symtab/20899
16eb6b2d
LS
3630 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3631
74cbb09e
SM
36322017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3633
3634 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3635 (gdbsim_open): Rename gdb_argv args object to argv.
3636
ee0c3293
TT
36372017-08-05 Tom Tromey <tom@tromey.com>
3638
3639 * compile/compile-object-load.c (compile_object_load): Use
3640 gdb::unique_xmalloc_ptr.
3641 * cli/cli-dump.c (scan_filename): Rename from
3642 scan_filename_with_cleanup. Change return type.
3643 (scan_expression): Rename from scan_expression_with_cleanup.
3644 Change return type.
3645 (dump_memory_to_file, dump_value_to_file, restore_command):
3646 Use gdb::unique_xmalloc_ptr. Update.
3647 * cli/cli-cmds.c (find_and_open_script): Use
3648 gdb::unique_xmalloc_ptr.
3649 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3650 * symmisc.c (maintenance_print_symbols)
3651 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3652 * symfile.c (symfile_bfd_open, generic_load)
3653 (add_symbol_file_command, remove_symbol_file_command): Use
3654 gdb::unique_xmalloc_ptr.
3655 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3656 * psymtab.c (maintenance_print_psymbols): Use
3657 gdb::unique_xmalloc_ptr.
3658 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3659 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3660 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3661 (reload_shared_libraries_1): Likewise.
3662
3232fabd
TT
36632017-08-05 Tom Tromey <tom@tromey.com>
3664
3665 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3666 (rust_op_vector, rust_set_vector): New typedefs.
3667 (current_parser): New global.
3668 (work_obstack): Change to pointer type. Update all users.
3669 (rust_ast, pstate): Remove globals.
3670 (struct rust_parser): New.
3671 (%union) <params, field_inits>: Change type.
3672 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3673 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3674 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3675 (convert_params_to_types, convert_params_to_expression): Change
3676 type of "params".
3677 (ast_string): Change type of "fields".
3678 (rust_parse): Make a rust_parser. Remove cleanups.
3679 (rust_lex_tests): Make and install an auto_obstack.
3680
f02fd774
YQ
36812017-08-04 Yao Qi <yao.qi@linaro.org>
3682
3683 * configure.srv (ipa_x32_linux_regobj): New.
3684 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3685 instead of X86_TDESC_AVX512.
3686 (initialize_low_tracepoint): Call
3687 init_registers_x32_avx_avx512_linux.
3688
91975afd
YQ
36892017-08-04 Yao Qi <yao.qi@linaro.org>
3690
3691 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3692
2331fa3a
RK
36932017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3694
3695 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3696
744e4fe1
TT
36972017-08-03 Tom Tromey <tom@tromey.com>
3698
3699 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3700 Remove.
3701 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3702
1c034b67
TT
37032017-08-03 Tom Tromey <tom@tromey.com>
3704
3705 * python/py-param.c (compute_enum_values): Use gdb_argv.
3706
773a1edc
TT
37072017-08-03 Tom Tromey <tom@tromey.com>
3708
3709 * utils.h (struct gdb_argv_deleter): New.
3710 (gdb_argv): New class.
3711 * utils.c (gdb_argv::reset): New method.
3712 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3713 * tracefile.c (tsave_command): Use gdb_argv.
3714 * top.c (new_ui_command): Use gdb_argv.
3715 * symmisc.c (maintenance_print_symbols)
3716 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3717 * symfile.c (symbol_file_command, generic_load)
3718 (remove_symbol_file_command): Use gdb_argv.
3719 * stack.c (backtrace_command): Use gdb_argv.
3720 * source.c (add_path, show_substitute_path_command)
3721 (unset_substitute_path_command, set_substitute_path_command):
3722 Use gdb_argv.
3723 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3724 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3725 * remote.c (extended_remote_run, remote_put_command)
3726 (remote_get_command, remote_delete_command): Use gdb_argv.
3727 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3728 (gdbsim_open): Use gdb_argv.
3729 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3730 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3731 * procfs.c (procfs_info_proc): Use gdb_argv.
3732 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3733 * infrun.c (handle_command): Use gdb_argv.
3734 * inferior.c (add_inferior_command, clone_inferior_command):
3735 Use gdb_argv.
3736 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3737 * exec.c (exec_file_command): Use gdb_argv.
3738 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3739 * compile/compile.c (build_argc_argv): Use gdb_argv.
3740
0d50bde3
TT
37412017-08-03 Tom Tromey <tom@tromey.com>
3742
3743 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3744
7f968c89
TT
37452017-08-03 Tom Tromey <tom@tromey.com>
3746
3747 * python/python.c (compute_python_string): Return std::string.
3748 (gdbpy_eval_from_control_command): Update.
3749 (do_start_initialization): Use std::string.
3750 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3751 xstrprintf.
3752 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3753 xstrprintf.
3754
3c9ebddd
TT
37552017-08-03 Tom Tromey <tom@tromey.com>
3756
3757 * top.h (do_restore_instream_cleanup): Remove.
3758 * top.c (do_restore_instream_cleanup): Remove.
3759 (read_command_file): Use scoped_restore.
3760 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3761
b51b225e
TT
37622017-08-03 Tom Tromey <tom@tromey.com>
3763
3764 * cli/cli-script.c (execute_user_command)
3765 (execute_control_command): Use scoped_restore.
3766
ac991630
TT
37672017-08-03 Tom Tromey <tom@tromey.com>
3768
3769 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3770 (execute_user_command): Remove user_call_depth; use
3771 user_args_stack's size instead.
3772
898e0c8e
TT
37732017-08-03 Tom Tromey <tom@tromey.com>
3774
3775 * top.h (in_user_command): Remove.
3776 * top.c (in_user_command): Remove.
3777 * cli/cli-script.c (do_restore_user_call_depth)
3778 (execute_user_command): Update.
3779
26fcd5d7
TT
37802017-08-03 Tom Tromey <tom@tromey.com>
3781
3782 * valops.c (search_struct_method): Use gdb::byte_vector.
3783 * valarith.c (value_concat): Use std::vector.
3784 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3785 (simple_search_memory): Likewise.
3786 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3787 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3788 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3789 * elfread.c (elf_rel_plt_read): Use std::string.
3790 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3791 * cli/cli-dump.c (restore_section_callback): Use
3792 gdb::byte_vector.
3793
7c218e6c
TT
37942017-08-03 Tom Tromey <tom@tromey.com>
3795
3796 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3797
31b68d4a
TT
37982017-08-03 Tom Tromey <tom@tromey.com>
3799
3800 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3801 (tui_register_format): Use scoped_restore.
3802
2ec845e7
TT
38032017-08-03 Tom Tromey <tom@tromey.com>
3804
3805 * reverse.c (exec_direction_default): Remove.
3806 (exec_reverse_once): Use scoped_restore.
3807 * remote.c (restore_remote_timeout): Remove.
3808 (remote_flash_erase, remote_flash_write, remote_flash_done)
3809 (readchar, remote_serial_write): Use scoped_restore.
3810 * cli/cli-script.c (struct source_cleanup_lines_args)
3811 (source_cleanup_lines): Remove.
3812 (script_from_file): Use scoped_restore.
3813 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3814 (source_command): Use scoped_restore.
3815
b3bc8453
TT
38162017-08-03 Tom Tromey <tom@tromey.com>
3817
3818 * utils.h (make_cleanup_free_so): Remove.
3819 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3820 * solist.h (struct so_deleter): New.
3821 (so_list_up): New typedef.
3822 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3823
e3ad2841
TT
38242017-08-03 Tom Tromey <tom@tromey.com>
3825
3826 * utils.h (make_cleanup_restore_current_language): Remove.
3827 * utils.c (do_restore_current_language)
3828 (make_cleanup_restore_current_language): Remove.
3829 * parse.c (parse_exp_in_context_1)
3830 (parse_expression_with_language): Use
3831 scoped_restore_current_language.
3832 * mi/mi-main.c (mi_cmd_execute): Use
3833 scoped_restore_current_language.
3834 * language.h (scoped_restore_current_language): New class.
3835
b80cf838
TT
38362017-08-03 Tom Tromey <tom@tromey.com>
3837
3838 * compile/compile.c (cleanup_unlink_file): Remove.
3839 (compile_to_object): Use gdb::unlinker.
3840 (eval_compile_command): Likewise.
3841
fad0444a
TT
38422017-08-03 Tom Tromey <tom@tromey.com>
3843
3844 * utils.h (make_cleanup_fclose): Remove.
3845 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3846
6e7bc05c
TT
38472017-08-03 Tom Tromey <tom@tromey.com>
3848
3849 * top.c (open_terminal_stream): Return gdb_file_up.
3850 (new_ui_command): Update.
3851
4a45905b
TT
38522017-08-03 Tom Tromey <tom@tromey.com>
3853
3854 * source.c (print_source_lines_base, forward_search_command)
3855 (reverse_search_command): Use gdb_file_up.
3856
7cd06d6e
TT
38572017-08-03 Tom Tromey <tom@tromey.com>
3858
3859 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3860
ed166945
TT
38612017-08-03 Tom Tromey <tom@tromey.com>
3862
3863 * cli/cli-cmds.c (find_and_open_script): Change return type.
3864 Remove "streamp" and "full_path" parameters.
3865 (source_script_with_search): Update.
3866 * auto-load.c (source_script_file): Update.
3867 * cli/cli-cmds.h (find_and_open_script): Change type.
3868 (open_script): New struct.
3869
d419f42d
TT
38702017-08-03 Tom Tromey <tom@tromey.com>
3871
3872 * xml-support.c (xml_fetch_content_from_file): Update.
3873 * ui-file.c (stdio_file::open): Update.
3874 * tracefile-tfile.c (tfile_start): Update.
3875 * remote.c (remote_file_put, remote_file_get): Update.
3876 * nat/linux-procfs.c (linux_proc_get_int)
3877 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3878 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3879 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3880 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3881 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3882 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3883 * linux-nat.c (linux_proc_pending_signals): Update.
3884 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3885 (file_closer): Remove.
3886 * compile/compile.c (compile_to_object): Update.
3887 * common/filestuff.h (struct gdb_file_deleter): New.
3888 (gdb_file_up): New typedef.
3889 (gdb_fopen_cloexec): Change return type.
3890 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3891 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3892 (dump_binary_file, restore_binary_file): Update.
3893 * auto-load.c (auto_load_objfile_script_1): Update.
3894
4a2b031d
TT
38952017-08-03 Tom Tromey <tom@tromey.com>
3896
3897 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3898 (info_static_tracepoint_markers_command): Likewise.
3899 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3900 * skip.c (skip_info): Use ui_out_emit_table.
3901 * progspace.c (print_program_space): Use ui_out_emit_table.
3902 * osdata.c (info_osdata): Use ui_out_emit_table.
3903 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3904 ui_out_emit_table.
3905 * linux-thread-db.c (info_auto_load_libthread_db): Use
3906 ui_out_emit_table.
3907 * inferior.c (print_inferior): Use ui_out_emit_table.
3908 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3909 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3910 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3911 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3912 * ui-out.h (class ui_out_emit_table): New.
3913
a4f320fd
MR
39142017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3915
3916 * mips-tdep.c (mips_fpu_type_str): New function.
3917 (mips_dump_tdep): Call it.
3918
a2f1f308
MR
39192017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3920
3921 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3922 `->mips_fpu_type'.
3923
7e5ed83b
XR
39242017-07-31 Xavier Roirand <roirand@adacore.com>
3925
3926 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3927
4c9dc811
XR
39282017-07-27 Xavier Roirand <roirand@adacore.com>
3929
3930 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3931
27d41eac
YQ
39322017-07-26 Yao Qi <yao.qi@linaro.org>
3933
3934 * cli/cli-cmds.c (maintenancechecklist): New variable.
3935 * gdbcmd.h (maintenancechecklist): Declare it.
3936 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3937 Call i386_linux_read_description with different masks.
3938 * maint.c (maintenance_check_command): New function.
3939 (_initialize_maint_cmds): Call add_prefix_cmd.
3940 * target-descriptions.c (tdesc_reg): override operator != and ==.
3941 (tdesc_type): Likewise.
3942 (tdesc_feature): Likewise.
3943 (target_desc): Likewise.
3944 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3945 (maintenance_check_xml_descriptions): New function.
3946 (_initialize_target_descriptions) Add command "xml-descriptions".
3947 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3948
ea03d0d3
YQ
39492017-07-26 Yao Qi <yao.qi@linaro.org>
3950
3951 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3952 Include features/i386/32bit-*.c.
3953 (i386_linux_read_description): Generate target description if it
3954 doesn't exist.
3955 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3956 functions.
3957 * features/i386/32bit-linux.c: Re-generated.
3958 * features/i386/32bit-sse.c: Likewise.
3959 * target-descriptions.c (print_c_feature::visit): Print code to
3960 set register number if needed.
3961 (print_c_feature) <m_next_regnum>: New field.
3962
25aa13e5
YQ
39632017-07-26 Yao Qi <yao.qi@linaro.org>
3964
3965 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3966 (FEATURE_XMLFILES): New.
3967 (FEATURE_CFILES): New.
3968 New rules.
3969 (clean-cfiles): Remove generated c files.
3970 * features/i386/32bit-avx.c: Generated.
3971 * features/i386/32bit-avx512.c: Generated.
3972 * features/i386/32bit-core.c: Generated.
3973 * features/i386/32bit-linux.c: Generated.
3974 * features/i386/32bit-mpx.c: Generated.
3975 * features/i386/32bit-pkeys.c: Generated.
3976 * features/i386/32bit-sse.c: Generated.
3977 * target-descriptions.c: Include algorithm.
3978 (tdesc_element_visitor): Add method visit_end.
3979 (print_c_tdesc): Implement visit_end.
3980 (print_c_tdesc:: m_filename_after_features): Move it to
3981 protected.
3982 (print_c_feature): New class.
3983 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3984 name starts with "i386/32bit-".
3985
6eb1e6a8
YQ
39862017-07-26 Yao Qi <yao.qi@linaro.org>
3987
3988 * target-descriptions.c (tdesc_element_visitor): New class.
3989 (tdesc_element): New class.
3990 (tdesc_reg): Inherit from tdesc_element.
3991 (tdesc_reg::accept): New function.
3992 (tdesc_type): Inherit from tdesc_element.
3993 (tdesc_type::accept): New function.
3994 (tdesc_feature): Inherit from tdesc_element.
3995 (tdesc_feature::accept): New function.
3996 (target_desc): Inherit from tdesc_element.
3997 (target_desc::target_desc): New.
3998 (target_desc::~target_desc): New.
3999 (target_desc::accept): New.
4000 (allocate_target_description): Use new.
4001 (free_target_description): Use delete.
4002 (print_c_tdesc): New class.
4003 (maint_print_c_tdesc_cmd): Adjust.
4004
4005 * features/aarch64.c: Re-generated.
4006 * features/arc-arcompact.c: Re-generated.
4007 * features/arc-v2.c: Re-generated.
4008 * features/arm/arm-with-iwmmxt.c: Re-generated.
4009 * features/arm/arm-with-m.c: Re-generated.
4010 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4011 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4012 * features/arm/arm-with-neon.c: Re-generated.
4013 * features/arm/arm-with-vfpv2.c: Re-generated.
4014 * features/arm/arm-with-vfpv3.c: Re-generated.
4015 * features/i386/amd64-avx-avx512.c: Re-generated.
4016 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4017 * features/i386/amd64-avx.c: Re-generated.
4018 * features/i386/amd64-avx-linux.c: Re-generated.
4019 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4020 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4021 * features/i386/amd64-avx-mpx.c: Re-generated.
4022 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4023 * features/i386/amd64.c: Re-generated.
4024 * features/i386/amd64-linux.c: Re-generated.
4025 * features/i386/amd64-mpx.c: Re-generated.
4026 * features/i386/amd64-mpx-linux.c: Re-generated.
4027 * features/i386/i386-avx-avx512.c: Re-generated.
4028 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4029 * features/i386/i386-avx.c: Re-generated.
4030 * features/i386/i386-avx-linux.c: Re-generated.
4031 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4032 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4033 * features/i386/i386-avx-mpx.c: Re-generated.
4034 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4035 * features/i386/i386.c: Re-generated.
4036 * features/i386/i386-linux.c: Re-generated.
4037 * features/i386/i386-mmx.c: Re-generated.
4038 * features/i386/i386-mmx-linux.c: Re-generated.
4039 * features/i386/i386-mpx.c: Re-generated.
4040 * features/i386/i386-mpx-linux.c: Re-generated.
4041 * features/i386/x32-avx-avx512.c: Re-generated.
4042 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4043 * features/i386/x32-avx.c: Re-generated.
4044 * features/i386/x32-avx-linux.c: Re-generated.
4045 * features/i386/x32.c: Re-generated.
4046 * features/i386/x32-linux.c: Re-generated.
4047 * features/microblaze.c: Re-generated.
4048 * features/microblaze-with-stack-protect.c: Re-generated.
4049 * features/mips64-dsp-linux.c: Re-generated.
4050 * features/mips64-linux.c: Re-generated.
4051 * features/mips-dsp-linux.c: Re-generated.
4052 * features/mips-linux.c: Re-generated.
4053 * features/nds32.c: Re-generated.
4054 * features/nios2.c: Re-generated.
4055 * features/nios2-linux.c: Re-generated.
4056 * features/rs6000/powerpc-32.c: Re-generated.
4057 * features/rs6000/powerpc-32l.c: Re-generated.
4058 * features/rs6000/powerpc-403.c: Re-generated.
4059 * features/rs6000/powerpc-403gc.c : Re-generated.
4060 * features/rs6000/powerpc-405.c: Re-generated.
4061 * features/rs6000/powerpc-505.c: Re-generated.
4062 * features/rs6000/powerpc-601.c: Re-generated.
4063 * features/rs6000/powerpc-602.c: Re-generated.
4064 * features/rs6000/powerpc-603.c: Re-generated.
4065 * features/rs6000/powerpc-604.c: Re-generated.
4066 * features/rs6000/powerpc-64.c: Re-generated.
4067 * features/rs6000/powerpc-64l.c: Re-generated.
4068 * features/rs6000/powerpc-7400.c: Re-generated.
4069 * features/rs6000/powerpc-750.c: Re-generated.
4070 * features/rs6000/powerpc-860.c: Re-generated.
4071 * features/rs6000/powerpc-altivec32.c: Re-generated.
4072 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4073 * features/rs6000/powerpc-altivec64.c: Re-generated.
4074 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4075 * features/rs6000/powerpc-cell32l.c: Re-generated.
4076 * features/rs6000/powerpc-cell64l.c: Re-generated.
4077 * features/rs6000/powerpc-e500.c: Re-generated.
4078 * features/rs6000/powerpc-e500l.c: Re-generated.
4079 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4080 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4081 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4082 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4083 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4084 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4085 * features/rs6000/powerpc-vsx32.c: Re-generated.
4086 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4087 * features/rs6000/powerpc-vsx64.c: Re-generated.
4088 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4089 * features/rs6000/rs6000.c: Re-generated.
4090 * features/s390-linux32.c: Re-generated.
4091 * features/s390-linux32v1.c: Re-generated.
4092 * features/s390-linux32v2.c: Re-generated.
4093 * features/s390-linux64.c: Re-generated.
4094 * features/s390-linux64v1.c: Re-generated.
4095 * features/s390-linux64v2.c: Re-generated.
4096 * features/s390-te-linux64.c: Re-generated.
4097 * features/s390-tevx-linux64.c: Re-generated.
4098 * features/s390-vx-linux64.c: Re-generated.
4099 * features/s390x-linux64.c: Re-generated.
4100 * features/s390x-linux64v1.c: Re-generated.
4101 * features/s390x-linux64v2.c: Re-generated.
4102 * features/s390x-te-linux64.c: Re-generated.
4103 * features/s390x-tevx-linux64.c: Re-generated.
4104 * features/s390x-vx-linux64.c: Re-generated.
4105 * features/sparc/sparc32-solaris.c: Re-generated.
4106 * features/sparc/sparc64-solaris.c: Re-generated.
4107 * features/tic6x-c62x.c: Re-generated.
4108 * features/tic6x-c62x-linux.c: Re-generated.
4109 * features/tic6x-c64x.c: Re-generated.
4110 * features/tic6x-c64x-linux.c: Re-generated.
4111 * features/tic6x-c64xp.c: Re-generated.
4112 * features/tic6x-c64xp-linux.c: Re-generated.
4113
35b4818d
YQ
41142017-07-26 Yao Qi <yao.qi@linaro.org>
4115
4116 * i386-linux-tdep.c (i386_linux_read_description): New function.
4117 (i386_linux_core_read_description): Call
4118 i386_linux_read_description.
4119 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4120 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4121 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4122 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4123 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4124 * x86-linux-nat.c (x86_linux_read_description): Call
4125 i386_linux_read_description.
4126
8e2141c6
YQ
41272017-07-26 Yao Qi <yao.qi@linaro.org>
4128
4129 * NEWS: Mention it.
4130 * features/Makefile (%.c: %.xml): Pass the xml file name to
4131 command "maint print c-tdesc".
4132 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4133 name from 'arg'.
4134
b468ff4c
YQ
41352017-07-26 Yao Qi <yao.qi@linaro.org>
4136
4137 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4138 in-class initialization.
4139 (tdesc_create_feature): Call new instead of XCNEW.
4140 (free_target_description): Ue delete.
4141
b9c0e1b4
JB
41422017-07-25 John Baldwin <jhb@FreeBSD.org>
4143
4144 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4145
a04b5337
YQ
41462017-07-25 Yao Qi <yao.qi@linaro.org>
4147
4148 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4149 constant.
4150 (amd64_x32_init_abi): Likewise.
4151 * amd64-tdep.h (amd64_init_abi): Update declaration.
4152 (amd64_x32_init_abi): Likewise.
4153
02ad7fc2
YQ
41542017-07-25 Yao Qi <yao.qi@linaro.org>
4155
4156 PR tdep/21717
4157 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4158 condition for FPSCR.
4159 (arm_linux_store_inferior_registers): Likewise.
4160
b6f48cb0
TT
41612017-07-22 Tom Tromey <tom@tromey.com>
4162
4163 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4164 <syscalls_counts>: Now a std::vector.
4165 (get_catch_syscall_inferior_data): Use "new".
4166 (catch_syscall_inferior_data_cleanup): Use "delete".
4167 (insert_catch_syscall, remove_catch_syscall)
4168 (clear_syscall_counts): Update.
4169
e12c9b7a
TT
41702017-07-22 Tom Tromey <tom@tromey.com>
4171
4172 * break-catch-syscall.c (syscall_catchpoint)
4173 <syscalls_to_be_caught>: Now a std::vector<int>
4174 (~syscall_catchpoint): Remove.
4175 (insert_catch_syscall, remove_catch_syscall)
4176 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4177 (print_mention_catch_syscall, print_recreate_catch_syscall):
4178 Update.
4179 (create_syscall_event_catchpoint): Change type of "filter"
4180 parameter.
4181 (catch_syscall_split_args): Return a std::vector.
4182 (catch_syscall_command_1, catching_syscall_number_1): Update.
4183
4fa8aeac
TT
41842017-07-22 Tom Tromey <tom@tromey.com>
4185
4186 * break-catch-throw.c (struct exception_catchpoint)
4187 <exception_rx>: Now a std::string.
4188 (~exception_catchpoint): Remove.
4189 (print_one_detail_exception_catchpoint): Update.
4190 (handle_gnu_v3_exceptions): Change type of except_rx.
4191 (extract_exception_regexp): Return a std::string.
4192 (catch_exception_command_1): Update.
4193
f746a154
TT
41942017-07-22 Tom Tromey <tom@tromey.com>
4195
4196 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4197 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4198 std::vector.
4199 <catch_all>: Now a bool.
4200 (~signal_catchpoint): Remove.
4201 (signal_catchpoint_insert_location)
4202 (signal_catchpoint_remove_location)
4203 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4204 (signal_catchpoint_print_mention)
4205 (signal_catchpoint_print_recreate)
4206 (signal_catchpoint_explains_signal): Update.
4207 (create_signal_catchpoint): Change type of "filter" and
4208 "catch_all".
4209 (catch_signal_split_args): Return a std::vector. Change type of
4210 "catch_all".
4211 (catch_signal_command): Update.
4212
47e77640
PA
42132017-07-20 Pedro Alves <palves@redhat.com>
4214
4215 * ada-lang.c (ada_language_defn): Make extern.
4216 (_initialize_ada_language): Remove add_language call.
4217 * c-lang.c (c_language_defn, cplus_language_defn)
4218 (asm_language_defn, minimal_language_defn): Make extern.
4219 (_initialize_c_language): Delete.
4220 * completer.c (compare_cstrings): Delete, moved to utils.h.
4221 * d-lang.c (d_language_defn): Make extern.
4222 (_initialize_d_language): Remove add_language calls.
4223 * defs.h (enum language): Add comment.
4224 * f-lang.c (f_language_defn): Make extern.
4225 (_initialize_f_language): Remove add_language call.
4226 * go-lang.c (go_language_defn): Make extern.
4227 (_initialize_go_language): Remove add_language call.
4228 * language.c: Include <algorithm>.
4229 (languages): Redefine as const array.
4230 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4231 (set_language_command): Handle "local". Use for-range loop.
4232 (set_language): Remove loop.
4233 (language_enum): Rewrite.
4234 (language_def, language_str): Remove loops.
4235 (add_language): Delete.
4236 (add_set_language_command): New, based on add_languages.
4237 (skip_language_trampoline): Adjust.
4238 (local_language_defn): Delete.
4239 (language_gdbarch_post_init): Adjust.
4240 (_initialize_language): Remove add_language calls. Call
4241 add_set_language_command.
4242 * language.h (add_language): Delete.
4243 (auto_language_defn)
4244 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4245 (asm_language_defn, c_language_defn, cplus_language_defn)
4246 (d_language_defn, f_language_defn, go_language_defn)
4247 (m2_language_defn, objc_language_defn, opencl_language_defn)
4248 (pascal_language_defn, rust_language_defn): Declare.
4249 * m2-lang.c (m2_language_defn): Make extern.
4250 (_initialize_m2_language): Remove add_language call.
4251 * objc-lang.c (objc_language_defn): Make extern.
4252 (_initialize_objc_language): Remove add_language call.
4253 * opencl-lang.c (opencl_language_defn): Make extern.
4254 (_initialize_opencl_language): Remove add_language call.
4255 * p-lang.c (pascal_language_defn): Make extern.
4256 (_initialize_pascal_language): Delete.
4257 * rust-lang.c (rust_language_defn): Make extern.
4258 (_initialize_rust_language): Delete.
4259 * utils.h (compare_cstrings): New static inline function.
4260
edb0c9cb
PA
42612017-07-20 Pedro Alves <palves@redhat.com>
4262
4263 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4264 (get_var_value): Constify parameters.
4265 (get_int_var_value): Change prototype.
4266 (to_fixed_range_type): Adjust.
4267 * ada-lang.h (get_int_var_value): Change prototype.
4268
a778f165
PA
42692017-07-20 Pedro Alves <palves@redhat.com>
4270
4271 * dwarf2read.c (dw2_lookup_symbol): Use
4272 SYMBOL_MATCHES_SEARCH_NAME.
4273 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4274
42edd901
PA
42752017-07-20 Pedro Alves <palves@redhat.com>
4276
4277 * block.c (block_iter_name_step, block_iter_name_first)
4278 (block_iter_name_next): Delete.
4279 (block_lookup_symbol_primary): Adjust to use
4280 dict_iter_match_first/dict_iter_match_next.
4281 * block.h (block_iter_name_first, block_iter_name_next): Delete
4282 declarations.
4283 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4284 dict_iter_match_first/dict_iter_match_next.
4285
cf325299
PA
42862017-07-20 Pedro Alves <palves@redhat.com>
4287
4288 * cp-support.c (cp_find_first_component_aux): Add missing case for
4289 end of string.
4290
c5ed0576
DB
42912017-07-18 David Blaikie <dblaikie@gmail.com>
4292
4293 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4294 of dwo_cu's dwo_file.
4295
27841e76
YQ
42962017-07-18 Yao Qi <yao.qi@linaro.org>
4297
4298 * remote.c (store_registers_using_G): Remove one line comment.
4299
cfb7e58b
YQ
43002017-07-18 Yao Qi <yao.qi@linaro.org>
4301
4302 * regcache.c (regcache_cpy): Simplify it.
4303 (regcache::cpy_no_passthrough): Remove it.
4304 * regcache.h (cpy_no_passthrough): Remove it.
4305 (regcache_dup, regcache_cpy): Update comments.
4306
386535dd
PA
43072017-07-18 Pedro Alves <palves@redhat.com>
4308
4309 * remote-sim.c (sim_command_completer): Adjust to work with a
4310 completion_tracker instead of a VEC.
4311
c45ec17c
PA
43122017-07-17 Pedro Alves <palves@redhat.com>
4313
4314 * completer.c (complete_source_filenames): New function.
4315 (complete_address_and_linespec_locations): New function.
4316 (location_completer): Use complete_address_and_linespec_locations.
4317 (completion_tracker::build_completion_result): Honor the tracker's
4318 request to suppress append.
4319 * completer.h (completion_tracker::suppress_append_ws)
4320 (completion_tracker::set_suppress_append_ws): New methods.
4321 (completion_tracker::m_suppress_append_ws): New field.
4322 (complete_source_filenames): New declaration.
4323 * linespec.c (linespec_complete_what): New.
4324 (struct ls_parser) <complete_what, completion_word,
4325 completion_quote_char, completion_quote_end, completion_tracker>:
4326 New fields.
4327 (string_find_incomplete_keyword_at_end): New.
4328 (linespec_lexer_lex_string): Record quote char. If in completion
4329 mode, don't throw.
4330 (linespec_lexer_consume_token): Advance the completion word point.
4331 (linespec_lexer_peek_token): Save/restore completion info.
4332 (save_stream_and_consume_token): New.
4333 (set_completion_after_number): New.
4334 (linespec_parse_basic): Set what to complete next depending on
4335 token. Handle function and label completions specially.
4336 (parse_linespec): Disable objc shortcut in completion mode. Set
4337 what to complete next depending on token type. Skip keyword if in
4338 completion mode.
4339 (complete_linespec_component, linespec_complete): New.
4340 * linespec.h (linespec_complete): Declare.
4341
be966d42
PA
43422017-07-17 Pedro Alves <palves@redhat.com>
4343
4344 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4345 Handle 'operator<' / 'operator<<'.
4346
a2459270
PA
43472017-07-17 Pedro Alves <palves@redhat.com>
4348
4349 * completer.c (collect_explicit_location_matches): Handle
4350 MATCH_LABEL.
4351 (convert_explicit_location_to_linespec): New, factored out from
4352 ...
4353 (convert_explicit_location_to_sals): ... this.
4354 (complete_label): New.
4355 (linespec_complete_label, find_label_symbols_in_block): New.
4356 (find_label_symbols): Add completion_mode parameter and adjust to
4357 call find_label_symbols_in_block.
4358 * linespec.h (linespec_complete_label): Declare.
4359
c6756f62
PA
43602017-07-17 Pedro Alves <palves@redhat.com>
4361
4362 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4363 complete_symbol_mode parameter.
4364 * cli/cli-cmds.c (complete_command): Get the completion result out
4365 of the handle_brkchars tracker if used a custom word point.
4366 * completer.c: Include "linespec.h".
4367 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4368 (advance_to_expression_complete_word_point): New.
4369 (completion_tracker::completes_to_completion_word): New.
4370 (complete_files_symbols): Pass down
4371 complete_symbol_mode::EXPRESSION.
4372 (explicit_options, probe_options): New.
4373 (collect_explicit_location_matches): Complete on the
4374 explictit_loc->foo instead of word. Use
4375 linespec_complete_function. Handle MATCH_LINE. Handle offering
4376 keyword and options completions.
4377 (backup_text_ptr): Delete.
4378 (skip_keyword): New.
4379 (complete_explicit_location): Remove 'word' parameter. Add
4380 language, quoted_arg_start and quoted_arg_end parameters.
4381 Rewrite, parsing left to right.
4382 (location_completer): Rewrite.
4383 (location_completer_handle_brkchars): New function.
4384 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4385 (enum complete_line_internal_reason): Adjust comments.
4386 (completion_tracker::discard_completions): New.
4387 (completer_handle_brkchars_func_for_completer): Handle
4388 location_completer.
4389 (gdb_custom_word_point_brkchars)
4390 (gdb_org_rl_basic_quote_characters): New.
4391 (gdb_completion_word_break_characters_throw)
4392 (completion_find_completion_word): Handle trackers that use a
4393 custom word point.
4394 (completion_tracker::advance_custom_word_point_by): New.
4395 (completion_tracker::build_completion_result): Don't rely on
4396 readline appending the quote char.
4397 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4398 use a custom word point.
4399 (gdb_rl_attempted_completion_function): Restore
4400 rl_basic_quote_characters.
4401 * completer.h (class completion_tracker): Extend intro comment.
4402 (completion_tracker::set_quote_char)
4403 (completion_tracker::quote_char)
4404 (completion_tracker::set_use_custom_word_point)
4405 (completion_tracker::use_custom_word_point)
4406 (completion_tracker::custom_word_point)
4407 (completion_tracker::set_custom_word_point)
4408 (completion_tracker::advance_custom_word_point_by)
4409 (completion_tracker::completes_to_completion_word)
4410 (completion_tracker::discard_completions): New methods.
4411 (completion_tracker::m_quote_char)
4412 (completion_tracker::m_use_custom_word_point)
4413 (completion_tracker::m_custom_word_point): New fields.
4414 (advance_to_expression_complete_word_point): Declare.
4415 * f-lang.c (f_collect_symbol_completion_matches): Add
4416 complete_symbol_mode parameter.
4417 * language.h (struct language_defn)
4418 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4419 parameter.
4420 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4421 (linespec_complete_function): New function.
4422 (linespec_lexer_lex_keyword): Adjust.
4423 * linespec.h (linespec_keywords, linespec_complete_function): New
4424 declarations.
4425 * location.c (find_end_quote): New function.
4426 (explicit_location_lex_one): Add explicit_completion_info
4427 parameter. Save quoting info. Don't throw if being called for
4428 completion. Don't handle Ada operators here.
4429 (is_cp_operator, skip_op_false_positives, first_of)
4430 (explicit_location_lex_one_function): New function.
4431 (string_to_explicit_location): Replace 'dont_throw' parameter with
4432 an explicit_completion_info pointer parameter. Handle it. Don't
4433 use explicit_location_lex_one to lex function names. Use
4434 explicit_location_lex_one_function instead.
4435 * location.h (struct explicit_completion_info): New.
4436 (string_to_explicit_location): Replace 'dont_throw' parameter with
4437 an explicit_completion_info pointer parameter.
4438 * symtab.c (default_collect_symbol_completion_matches_break_on):
4439 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4440 (default_collect_symbol_completion_matches)
4441 (collect_symbol_completion_matches): Add complete_symbol_mode
4442 parameter.
4443 (collect_symbol_completion_matches_type): Pass down
4444 complete_symbol_mode::EXPRESSION.
4445 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4446 parameter. Handle LINESPEC mode.
4447 * symtab.h (complete_symbol_mode): New.
4448 (default_collect_symbol_completion_matches_break_on)
4449 (default_collect_symbol_completion_matches)
4450 (collect_symbol_completion_matches)
4451 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4452 parameter.
4453
1d550c82
PA
44542017-07-17 Pedro Alves <palves@redhat.com>
4455
4456 * utils.c (enum class strncmp_iw_mode): New.
4457 (strcmp_iw): Rename to ...
4458 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4459 parameters. Handle them.
4460 (strncmp_iw): New.
4461 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4462 * utils.h (strncmp_iw): Declare.
4463 (strcmp_iw): Move describing comments here.
4464
8090b426
PA
44652017-07-17 Pedro Alves <palves@redhat.com>
4466
4467 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4468 CP_OPERATOR_STR.
4469 * c-typeprint.c (is_type_conversion_operator): Use
4470 CP_OPERATOR_STR.
4471 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4472 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4473 CP_OPERATOR_LEN.
4474 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4475 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4476 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4477 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4478 CP_OPERATOR_STR.
4479 * location.c: Include "cp-support.h".
4480 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4481 CP_OPERATOR_STR.
4482 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4483 CP_OPERATOR_LEN.
4484
6a2c1b87
PA
44852017-07-17 Pedro Alves <palves@redhat.com>
4486
4487 * cli/cli-cmds.c (complete_command): Use a completion tracker
4488 along with completion_find_completion_word for handle_brkchars
4489 phase.
4490 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4491 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4492 (struct gdb_rl_completion_word_info): New.
4493 (gdb_rl_find_completion_word): New.
4494 (completion_find_completion_word): New.
4495 * completer.h (completion_find_completion_word): Declare.
4496
eb3ff9a5
PA
44972017-07-17 Pedro Alves <palves@redhat.com>
4498
4499 * ada-lang.c (symbol_completion_match): Adjust comments.
4500 (symbol_completion_add): Replace vector parameter with
4501 completion_tracker parameter. Use it.
4502 (ada_make_symbol_completion_list): Rename to...
4503 (ada_collect_symbol_completion_matches): ... this. Add
4504 completion_tracker parameter and use it.
4505 (ada_language_defn): Adjust.
4506 * break-catch-syscall.c (catch_syscall_completer): Adjust
4507 prototype and work with completion_tracker instead of VEC.
4508 * breakpoint.c (condition_completer): Adjust prototype and work
4509 with completion_tracker instead of VEC.
4510 * c-lang.c (c_language_defn, cplus_language_defn)
4511 (asm_language_defn, minimal_language_defn): Adjust to renames.
4512 * cli/cli-cmds.c (complete_command): Rework using
4513 completion_tracker. Catch exceptions when completing.
4514 * cli/cli-decode.c (integer_unlimited_completer)
4515 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4516 with completion_tracker instead of VEC.
4517 * command.h (struct completion_tracker): Forward declare.
4518 (completer_ftype, completer_handle_brkchars_ftype): Change
4519 types.
4520 (complete_on_cmdlist, complete_on_enum): Adjust.
4521 * completer.c: Include <algorithm>.
4522 (struct gdb_completer_state): New.
4523 (current_completion): New global.
4524 (readline_line_completion_function): Delete.
4525 (noop_completer, filename_completer)
4526 (filename_completer_handle_brkchars, complete_files_symbols)
4527 (linespec_location_completer): Adjust to work with a
4528 completion_tracker instead of a VEC.
4529 (string_or_empty): New.
4530 (collect_explicit_location_matches): Adjust to work with a
4531 completion_tracker instead of a VEC.
4532 (explicit_location_completer): Rename to ...
4533 (complete_explicit_location): ... this and adjust to work with a
4534 completion_tracker instead of a VEC.
4535 (location_completer): Adjust to work with a completion_tracker
4536 instead of a VEC.
4537 (add_struct_fields): Adjust to work with a completion_list instead
4538 of VEC.
4539 (expression_completer): Rename to ...
4540 (complete_expression): ... this and adjust to work with a
4541 completion_tracker instead of a VEC. Use complete_files_symbols.
4542 (expression_completer): Reimplement on top of complete_expression.
4543 (symbol_completer): Adjust to work with a completion_tracker
4544 instead of a VEC.
4545 (enum complete_line_internal_reason): Add describing comments.
4546 (complete_line_internal_normal_command): Adjust to work with a
4547 completion_tracker instead of a VEC.
4548 (complete_line_internal): Rename to ...
4549 (complete_line_internal_1): ... this and adjust to work with a
4550 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4551 handle_brkchars phase.
4552 (new_completion_tracker): Delete.
4553 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4554 complete_line_internal_1.
4555 (free_completion_tracker): Delete.
4556 (INITIAL_COMPLETION_HTAB_SIZE): New.
4557 (completion_tracker::completion_tracker)
4558 (completion_tracker::~completion_tracker): New.
4559 (maybe_add_completion): Delete.
4560 (completion_tracker::maybe_add_completion)
4561 (completion_tracker::add_completion)
4562 (completion_tracker::add_completions): New.
4563 (throw_max_completions_reached_error): Delete.
4564 (complete_line): Adjust to work with a completion_tracker instead
4565 of a VEC. Don't create a completion_tracker_t or check for max
4566 completions here.
4567 (command_completer, command_completer_handle_brkchars)
4568 (signal_completer, reg_or_group_completer_1)
4569 (reg_or_group_completer, default_completer_handle_brkchars):
4570 Adjust to work with a completion_tracker.
4571 (gdb_completion_word_break_characters_throw): New.
4572 (gdb_completion_word_break_characters): Reimplement.
4573 (line_completion_function): Delete.
4574 (completion_tracker::recompute_lowest_common_denominator)
4575 (expand_preserving_ws)
4576 (completion_tracker::build_completion_result)
4577 (completion_result::completion_result)
4578 (completion_result::completion_result)
4579 (completion_result::~completion_result)
4580 (completion_result::completion_result)
4581 (completion_result::release_match_list, compare_cstrings)
4582 (completion_result::sort_match_list)
4583 (completion_result::reset_match_list)
4584 (gdb_rl_attempted_completion_function_throw)
4585 (gdb_rl_attempted_completion_function): New.
4586 * completer.h (completion_list, struct completion_result)
4587 (class completion_tracker): New.
4588 (complete_line): Add completion_tracker parameter.
4589 (readline_line_completion_function): Delete.
4590 (gdb_rl_attempted_completion_function): New.
4591 (noop_completer, filename_completer, expression_completer)
4592 (location_completer, symbol_completer, command_completer)
4593 (signal_completer, reg_or_group_completer): Update prototypes.
4594 (completion_tracker_t, new_completion_tracker)
4595 (make_cleanup_free_completion_tracker): Delete.
4596 (enum maybe_add_completion_enum): Delete.
4597 (maybe_add_completion): Delete.
4598 (throw_max_completions_reached_error): Delete.
4599 * corefile.c (complete_set_gnutarget): Adjust to work with a
4600 completion_tracker instead of a VEC.
4601 * cp-abi.c (cp_abi_completer): Adjust to work with a
4602 completion_tracker instead of a VEC.
4603 * d-lang.c (d_language_defn): Adjust.
4604 * disasm.c (disassembler_options_completer): Adjust to work with a
4605 completion_tracker instead of a VEC.
4606 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4607 (f_collect_symbol_completion_matches): ... this. Adjust to work
4608 with a completion_tracker instead of a VEC.
4609 (f_language_defn): Adjust.
4610 * go-lang.c (go_language_defn): Adjust.
4611 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4612 Adjust to work with a completion_tracker instead of a VEC.
4613 * infrun.c (handle_completer): Likewise.
4614 * interps.c (interpreter_completer): Likewise.
4615 * interps.h (interpreter_completer): Likewise.
4616 * language.c (unknown_language_defn, auto_language_defn)
4617 (local_language_defn): Adjust.
4618 * language.h (language_defn::la_make_symbol_completion_list):
4619 Rename to ...
4620 (language_defn::la_collect_symbol_completion_matches): ... this
4621 and adjust to work with a completion_tracker instead of a VEC.
4622 * m2-lang.c (m2_language_defn): Adjust.
4623 * objc-lang.c (objc_language_defn): Adjust.
4624 * opencl-lang.c (opencl_language_defn): Adjust.
4625 * p-lang.c (pascal_language_defn): Adjust.
4626 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4627 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4628 with a completion_tracker.
4629 * rust-lang.c (rust_language_defn): Adjust.
4630 * symtab.c (free_completion_list, do_free_completion_list)
4631 (return_val, completion_tracker): Delete.
4632 (completion_list_add_name, completion_list_add_symbol)
4633 (completion_list_add_msymbol, completion_list_objc_symbol)
4634 (completion_list_add_fields, add_symtab_completions): Add
4635 completion_tracker parameter and use it.
4636 (default_make_symbol_completion_list_break_on_1): Rename to...
4637 (default_collect_symbol_completion_matches_break_on): ... this.
4638 Add completion_tracker parameter and use it instead of allocating
4639 a completion tracker here.
4640 (default_make_symbol_completion_list_break_on): Delete old
4641 implementation.
4642 (default_make_symbol_completion_list): Delete.
4643 (default_collect_symbol_completion_matches): New.
4644 (make_symbol_completion_list): Delete.
4645 (collect_symbol_completion_matches): New.
4646 (make_symbol_completion_type): Rename to ...
4647 (collect_symbol_completion_matches_type): ... this. Add
4648 completion_tracker parameter and use it instead of VEC.
4649 (make_file_symbol_completion_list_1): Rename to...
4650 (collect_file_symbol_completion_matches): ... this. Add
4651 completion_tracker parameter and use it instead of VEC.
4652 (make_file_symbol_completion_list): Delete.
4653 (add_filename_to_list): Use completion_list instead of a VEC.
4654 (add_partial_filename_data::list): Now a completion_list.
4655 (make_source_files_completion_list): Work with a completion_list
4656 instead of a VEC.
4657 * symtab.h: Include "completer.h".
4658 (default_make_symbol_completion_list_break_on)
4659 (default_make_symbol_completion_list, make_symbol_completion_list)
4660 (make_symbol_completion_type, make_file_symbol_completion_list)
4661 (make_source_files_completion_list): Delete.
4662 (default_collect_symbol_completion_matches_break_on)
4663 (default_collect_symbol_completion_matches)
4664 (collect_symbol_completion_matches)
4665 (collect_symbol_completion_matches_type)
4666 (collect_file_symbol_completion_matches)
4667 (make_source_files_completion_list): New.
4668 * top.c (init_main): Don't install a rl_completion_entry_function
4669 hook. Install a rl_attempted_completion_function hook instead.
4670 * tui/tui-layout.c (layout_completer): Adjust to work with a
4671 completion_tracker.
4672 * tui/tui-regs.c (tui_reggroup_completer):
4673 * tui/tui-win.c (window_name_completer, focus_completer)
4674 (winheight_completer): Adjust to work with a completion_tracker.
4675 * value.c: Include "completer.h".
4676 (complete_internalvar): Adjust to work with a completion_tracker.
4677 * value.h (complete_internalvar): Likewise.
4678
6e1dbf8c
PA
46792017-07-17 Pedro Alves <palves@redhat.com>
4680
4681 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4682 renames.
4683 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4684 comments to completer_ftype's declaration.
4685 <completer_handle_brkchars>: Change type to
4686 completer_handle_brkchars_ftype.
4687 * command.h (completer_ftype): Add describing comment and give
4688 names to parameters.
4689 (completer_ftype_void): Rename to ...
4690 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4691 (set_cmd_completer_handle_brkchars): Adjust.
4692 * completer.c (filename_completer_handle_brkchars): New function.
4693 (complete_line_internal_normal_command): New function, factored
4694 out from ...
4695 (complete_line_internal): ... here.
4696 (command_completer_handle_brkchars)
4697 (default_completer_handle_brkchars)
4698 (completer_handle_brkchars_func_for_completer): New functions.
4699 * completer.h (set_gdb_completion_word_break_characters): Delete
4700 declaration.
4701 (completer_handle_brkchars_func_for_completer): New declaration.
4702 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4703 completer_handle_brkchars_func_for_completer.
4704
78b13106
PA
47052017-07-17 Pedro Alves <palves@redhat.com>
4706
4707 * completer.c (symbol_completer): New function, based on
4708 make_symbol_completion_list_fn.
4709 * completer.h (symbol_completer): New declaration.
4710 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4711 * python/py-cmd.c (completers): Adjust.
4712 * symtab.c (make_symbol_completion_list_fn): Delete.
4713 * symtab.h (make_symbol_completion_list_fn): Delete.
4714 * cli/cli-decode.c (add_cmd): Adjust.
4715
bbf2f4df
PA
47162017-07-17 Pedro Alves <palves@redhat.com>
4717
4718 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4719 * dwarf2read.c: Include "filename-seen-cache.h".
4720 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4721 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4722 * filename-seen-cache.c: New file.
4723 * filename-seen-cache.h: New file.
4724 * symtab.c: Include "filename-seen-cache.h".
4725 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4726 (create_filename_seen_cache, clear_filename_seen_cache)
4727 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4728 to filename-seen-cache.h/filename-seen-cache.c.
4729 (output_source_filename, sources_info)
4730 (maybe_add_partial_symtab_filename)
4731 (make_source_files_completion_list): Adjust to use
4732 filename_seen_cache.
4733
330cdd98
PA
47342017-07-17 Pedro Alves <palves@redhat.com>
4735
4736 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4737 fields.
4738 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4739 dwarf2_debug_sections*)): New.
4740 (dwarf2_per_objfile::dwarf2_per_objfile(const
4741 dwarf2_per_objfile&)): Declare as deleted.
4742 (dwarf2_per_objfile::operator=): Declare as deleted.
4743 (dwarf2_per_objfile::dwarf2_per_objfile)
4744 (dwarf2_per_objfile::~dwarf2_per_objfile)
4745 (dwarf2_per_objfile::free_cached_comp_units): New.
4746 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4747 ctor. Call dwarf2_per_objfile's ctor manually.
4748 (dwarf2_locate_sections): Deleted/refactored as ...
4749 (dwarf2_per_objfile::locate_sections): ... this new method.
4750 (free_cached_comp_units): Defer to
4751 dwarf2_per_objfile::free_cached_comp_units.
4752 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4753
8880f2a9
TT
47542017-07-14 Tom Tromey <tom@tromey.com>
4755
4756 PR rust/21764:
4757 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4758 parameter.
4759 <UNOP_SIZEOF>: Split into separate case.
4760 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4761
65547233
TT
47622017-07-14 Tom Tromey <tom@tromey.com>
4763
4764 PR rust/21763:
4765 * symtab.c (symbol_matches_domain): Add language_rust to special
4766 case.
4767 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4768 treat LOC_TYPEDEF symbols as variables.
4769
8f14146e
PA
47702017-07-14 Pedro Alves <palves@redhat.com>
4771
4772 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4773 symtabs matching all symtabs with SRCFILE as file name instead of
4774 only considering the first hit, with lookup_symtab.
4775
2347965c
SM
47762017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4777
4778 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4779 operator_name parameters.
4780 (gen_expr): Update function call.
4781
40f4af28
SM
47822017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4783
4784 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4785 parameter.
4786 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4787 Likewise.
4788 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4789 parameter, use agent_expr::gdbarch instead, update function
4790 calls.
4791 (locexpr_tracepoint_var_ref): Likewise.
4792 (loclist_tracepoint_var_ref): Likewise.
4793 * ax-gdb.c (gen_trace_static_fields): Likewise.
4794 (gen_traced_pop): Likewise.
4795 (gen_frame_args_address): Likewise.
4796 (gen_frame_locals_address): Likewise.
4797 (gen_var_ref): Likewise.
4798 (gen_struct_ref_recursive): Likewise.
4799 (gen_static_field): Likewise.
4800 (gen_maybe_namespace_elt): Likewise.
4801 (gen_expr): Likewise.
4802 (gen_trace_for_var): Likewise.
4803 (gen_trace_for_expr): Likewise.
4804 (gen_trace_for_return_address): Likewise.
4805
053f8057
SM
48062017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4807
4808 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4809 parameter.
4810 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4811
6661ad48
SM
48122017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4813
4814 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4815 from ax, update calls.
4816 (gen_usual_arithmetic): Likewise.
4817 (gen_integral_promotions): Likewise.
4818 (gen_bitfield_ref): Likewise.
4819 (gen_primitive_field): Likewise.
4820 (gen_struct_ref_recursive): Likewise.
4821 (gen_struct_ref): Likewise.
4822 (gen_maybe_namespace_elt): Likewise.
4823 (gen_struct_elt_for_reference): Likewise.
4824 (gen_namespace_elt): Likewise.
4825 (gen_aggregate_elt_ref): Likewise.
4826 (gen_expr): Get gdbarch from ax, update calls.
4827 (gen_expr_binop_rest): Likewise.
4828
c55a47e7
PA
48292017-07-13 Pedro Alves <palves@redhat.com>
4830
4831 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4832 as default tdesc.
4833 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4834 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4835 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4836 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4837 tdep.
4838 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4839 Get final tdesc from the tdep.
4840 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4841 default tdesc.
4842 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4843 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4844 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4845 Use it as default tdesc.
4846 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4847 down to amd_init_abi. No longer handle fallback tdesc here.
4848 * amd64-tdep.h (tdesc_x32): Declare.
4849 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4850 parameter.
4851 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4852 as default tdesc.
4853
55efceab
AA
48542017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4855
4856 * s390-linux-tdep.c (s390_process_record): Add support for
4857 instructions new in arch12.
4858
0aa37b65
JB
48592017-07-11 John Baldwin <jhb@FreeBSD.org>
4860
4861 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4862 PT_GETFSBASE and PT_GETGSBASE.
4863 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4864 PT_SETGSBASE.
4865
48aeef91
JB
48662017-07-11 John Baldwin <jhb@FreeBSD.org>
4867
4868 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4869 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4870 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4871 those rules.
4872 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4873 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4874 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4875 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4876 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4877 * features/i386/amd64.xml: Add 64bit-segments.xml.
4878 * features/i386/amd64-avx-avx512.c: Regenerated.
4879 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4880 * features/i386/amd64-avx-mpx.c: Regenerated.
4881 * features/i386/amd64-avx.c: Regenerated.
4882 * features/i386/amd64-mpx.c: Regenerated.
4883 * features/i386/amd64.c: Regenerated.
4884 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4885 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4886 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4887 * regformats/i386/amd64-avx.dat: Regenerated.
4888 * regformats/i386/amd64-mpx.dat: Regenerated.
4889 * regformats/i386/amd64.dat: Regenerated.
4890
77c501bc
YQ
48912017-07-10 Yao Qi <yao.qi@linaro.org>
4892
4893 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4894 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4895
6dc8d757
AK
48962017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4897
4898 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4899 unsetenv.
4900 * gnulib/aclocal.m4: Regenerate.
4901 * gnulib/config.in: Regenerate.
4902 * gnulib/configure: Regenerate.
4903 * gnulib/import/Makefile.am: Regenerate.
4904 * gnulib/import/Makefile.in: Regenerate.
4905 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4906 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4907 * gnulib/import/m4/environ.m4: New file.
4908 * gnulib/import/m4/setenv.m4: New file.
4909 * gnulib/import/setenv.c: New file.
4910 * gnulib/import/unsetenv.c: New file.
4911
266934d1
SM
49122017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4913
4914 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4915 address when op is DW_OP_addr.
4916
03278692
TT
49172017-07-09 Tom Tromey <tom@tromey.com>
4918
4919 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4920 check and apply to outer type.
4921
4b654465
JB
49222017-07-07 John Baldwin <jhb@FreeBSD.org>
4923
4924 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4925 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4926 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4927 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4928
2af9fc44
JB
49292017-07-07 John Baldwin <jhb@FreeBSD.org>
4930
4931 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4932
382b69bb
JB
49332017-07-07 John Baldwin <jhb@FreeBSD.org>
4934
4935 * corelow.c (get_core_siginfo): Remove.
4936 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4937 instead of get_core_siginfo.
4938 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4939 * gdbarch.h: Re-generate.
4940 * gdbarch.c: Re-generate.
4941 * linux-tdep.c (linux_core_xfer_siginfo): New.
4942 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4943
6e5eab33
JB
49442017-07-07 John Baldwin <jhb@FreeBSD.org>
4945
4946 * corelow.c (thread_section_name): Move to ...
4947 * gdbcore.h (thread_section_name): ... here.
4948
929edea9
JB
49492017-07-07 John Baldwin <jhb@FreeBSD.org>
4950
4951 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4952 (struct siginfo32): New.
4953 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4954 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4955 via ptrace(PT_LWPINFO).
4956
762c974a
JB
49572017-07-07 John Baldwin <jhb@FreeBSD.org>
4958
4959 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4960 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4961 (fbsd_get_siginfo_type): New.
4962 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4963 (_initialize_fbsd_tdep): New.
4964
33c5cd75
DB
49652017-07-06 David Blaikie <dblaikie@gmail.com>
4966
4967 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4968 a singular dwo_unit*) to support multiple CUs in the same way that
4969 multiple TUs are supported.
4970 (create_cus_hash_table): Replace create_dwo_cu with a function for
4971 parsing multiple CUs from a DWO file.
4972 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4973 create_dwo_cu.
4974 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4975 htab_find, rather than comparing the signature to a singleton CU in
4976 the dwo_file.
4977
8455d262
PA
49782017-07-06 Pedro Alves <palves@redhat.com>
4979
4980 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4981
4da3eb35
PA
49822017-07-04 Pedro Alves <palves@redhat.com>
4983
4984 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4985 * gdbtypes.h (TYPE_STATIC): Delete.
4986 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4987 is_synchronized, is_native>: Delete.
4988 <dummy>: Bump.
4989 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4990 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4991 (TYPE_FN_FIELD_ABSTRACT): Delete.
4992
5bfd255c
SM
49932017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4994
4995 * buffer.h (buffer_finish): Fix spelling mistakes.
4996
25c54127
EZ
49972017-07-01 Eli Zaretskii <eliz@gnu.org>
4998
4999 * .dir-locals.el: Automatically switch to C-style comments in
5000 versions of Emacs that support the feature.
5001
dc4bde35
SDJ
50022017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5003 Pedro Alves <palves@redhat.com>
5004
5005 PR cli/21688
5006 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5007 (process_next_line): New variable 'inline_cmd'.
5008 Adjust 'if' clauses for "python", "compile" and "guile" to use
5009 'command_name_equals' and check for '!inline_cmd'.
5010
51ed89aa
SDJ
50112017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5012
5013 PR cli/21688
5014 * cli/cli-script.c (command_name_equals_not_inline): New function.
5015 (process_next_line): Adjust 'if' clauses for "python", "compile"
5016 and "guile" to use command_name_equals_not_inline.
5017
eb17d413
PA
50182017-06-29 Pedro Alves <palves@redhat.com>
5019
5020 * completer.c (expression_completer): Call
5021 linespec_location_completer instead of location_completer.
5022
195bcdd5
PA
50232017-06-29 Pedro Alves <palves@redhat.com>
5024
5025 * completer.c (expression_completer): Remove code that recomputes
5026 'text' from 'word'.
5027
adc764e7
YQ
50282017-06-29 Yao Qi <yao.qi@linaro.org>
5029
5030 * regformats/regdat.sh: Generate code with
5031 "ifndef IN_PROCESS_AGENT".
5032
6e75794e
PA
50332017-06-28 Pedro Alves <palves@redhat.com>
5034
5035 * command.h: Include "common/scoped_restore.h".
5036
bc491f2e
YQ
50372017-06-28 Yao Qi <yao.qi@linaro.org>
5038
5039 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5040 instead of obstack_grow.
5041
41664b45
DG
50422017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5043
5044 PR gdb/21337
5045 * symfile.c (reread_symbols): Call objfiles_changed just before
5046 read_symbols.
5047
6da67eb1
PA
50482017-06-27 Pedro Alves <palves@redhat.com>
5049
5050 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5051 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5052 (completion_list_add_symbol, completion_list_add_msymbol):
5053 ... these new functions.
5054 (add_symtab_completions)
5055 (default_make_symbol_completion_list_break_on_1): Adjust.
5056
23732b1e
PA
50572017-06-27 Pedro Alves <palves@redhat.com>
5058
5059 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5060 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5061 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5062 dtor.
5063 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5064 'storage_obstack' field an auto_obstack. In-class initialize all
5065 non-bitfield fields. Make minsyms_read bool.
5066 * symfile.c (read_symbols): Adjust.
5067
a4d1e79a
AH
50682017-06-27 Alan Hayward <alan.hayward@arm.com>
5069
5070 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5071 (gdbsim_store_register): Likewise.
5072
8268c778
PA
50732017-06-27 Pedro Alves <palves@redhat.com>
5074
5075 * c-exp.y (name_obstack): Now an auto_obstack.
5076 (yylex): Use auto_obstack::clear.
5077 (c_parse): Use auto_obstack::clear instead of reinitializing and
5078 freeing the obstack.
5079 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5080 * d-exp.y (name_obstack): Now an auto_obstack.
5081 (yylex): Use auto_obstack::clear.
5082 (d_parse): Use auto_obstack::clear instead of reinitializing and
5083 freeing the obstack.
5084 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5085 auto_obstack.
5086 * dwarf2read.c (create_addrmap_from_index)
5087 (dwarf2_build_psymtabs_hard)
5088 (update_enumeration_type_from_children): Likewise.
5089 * gdb_obstack.h (auto_obstack): New type.
5090 * go-exp.y (name_obstack): Now an auto_obstack.
5091 (build_packaged_name): Use auto_obstack::clear.
5092 (go_parse): Use auto_obstack::clear instead of reinitializing and
5093 freeing the obstack.
5094 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5095 auto_obstack.
5096 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5097 * rust-exp.y (work_obstack): Now an auto_obstack.
5098 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5099 reinitializing and freeing the obstack.
5100 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5101 (host_char_to_target): Use auto_obstack.
5102 * utils.h (make_cleanup_obstack_free): Delete declaration.
5103 * valprint.c (generic_emit_char, generic_printstr): Use
5104 auto_obstack.
5105
db665f42
SM
51062017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5107
5108 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5109 thread.
5110 (darwin_init_thread_list): Don't update dummy thread.
5111 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5112
873c0814
SM
51132017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5114
5115 * record-full.c (netorder16): Remove.
5116
8b5a7a6e
SM
51172017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5118
5119 * common/diagnostics.h: Define macros for GCC.
5120 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5121 * common/vec.h: Include diagnostics.h.
5122 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5123 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5124 warning.
5125
d1435379
SM
51262017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5127
5128 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5129 New macro.
5130 * ada-lex.l: Ignore deprecated register warnings.
5131
cc75e0fd
SM
51322017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5133
5134 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5135 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5136
07809eaf
SM
51372017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5138
5139 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5140 its own line.
5141
f076f034
SM
51422017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5143
5144 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5145
0dd5cbc5
AH
51462017-06-23 Alan Hayward <alan.hayward@arm.com>
5147
5148 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5149 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5150 (xtensa_register_read_masked): Likewise.
5151
d4c6ce5b
SDJ
51522017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5153
5154 * common/environ.c (gdb_environ::unset): Update comment.
5155
16892a03
AH
51562017-06-22 Alan Hayward <alan.hayward@arm.com>
5157
5158 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5159 registers.
5160
d7dcbefc
AH
51612017-06-22 Alan Hayward <alan.hayward@arm.com>
5162
5163 * record-full.c (record_full_exec_insn): Use byte_vector.
5164
b30ff123
YQ
51652017-06-22 Yao Qi <yao.qi@linaro.org>
5166
5167 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5168 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5169
4fa847d7
AH
51702017-06-22 Alan Hayward <alan.hayward@arm.com>
5171
5172 * remote.c (cached_reg): Move from here...
5173 * regcache.h (cached_reg): ...to here.
5174 * python/py-unwind.c (struct reg_info): Remove.
5175 (cached_frame_info): Use cached_reg_t.
5176 (pyuw_prev_register): Likewise.
5177 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5178 (pyuw_dealloc_cache): Free all registers.
5179
f4906a9a
PA
51802017-06-22 Pedro Alves <palves@redhat.com>
5181 Simon Marchi <simon.marchi@ericsson.com>
5182
5183 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5184 warning.
5185 * common/diagnostics.h: New file.
5186
b45a1208
PA
51872017-06-22 Pedro Alves <palves@redhat.com>
5188
5189 * common/agent.h: Add include guards.
5190
e4da2c61
SM
51912017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5192
5193 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5194 talk about addressable units instead of bytes.
5195
96160d60
SDJ
51962017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5197
5198 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5199 of '::const_iterator'.
5200
9a6c7d9c
SDJ
52012017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5202
5203 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5204 'unittests/environ-selftests.c'.
5205 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5206 * charset.c (find_charset_names): Declare object 'iconv_env'.
5207 Update code to use 'iconv_env' object. Remove call to
5208 'free_environ'.
5209 * common/environ.c: Include <utility>.
5210 (make_environ): Delete function.
5211 (free_environ): Delete function.
5212 (gdb_environ::clear): New function.
5213 (gdb_environ::operator=): New function.
5214 (gdb_environ::get): Likewise.
5215 (environ_vector): Delete function.
5216 (set_in_environ): Delete function.
5217 (gdb_environ::set): New function.
5218 (unset_in_environ): Delete function.
5219 (gdb_environ::unset): New function.
5220 (gdb_environ::envp): Likewise.
5221 * common/environ.h: Include <vector>.
5222 (struct gdb_environ): Delete; transform into...
5223 (class gdb_environ): ... this class.
5224 (free_environ): Delete prototype.
5225 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5226 environ_vector): Likewise.
5227 * infcmd.c (run_command_1): Update code to call
5228 'envp' from 'gdb_environ' class.
5229 (environment_info): Update code to call methods from 'gdb_environ'
5230 class.
5231 (unset_environment_command): Likewise.
5232 (path_info): Likewise.
5233 (path_command): Likewise.
5234 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5235 (inferior::inferior): Initialize 'environment' using the host's
5236 information.
5237 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5238 Include "environ.h".
5239 (class inferior) <environment>: Change type from 'struct
5240 gdb_environ' to 'gdb_environ'.
5241 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5242 methods from 'gdb_environ' class.
5243 * solib.c (solib_find_1): Likewise
5244 * unittests/environ-selftests.c: New file.
5245
75c554cf
YQ
52462017-06-20 Yao Qi <yao.qi@linaro.org>
5247
5248 * features/i386/i386-linux.xml: Exchange the order of including
5249 32bit-linux.xml and 32bit-sse.xml.
5250 * features/i386/i386-linux.c: Regenerated.
5251
72ddacb7
YQ
52522017-06-20 Yao Qi <yao.qi@linaro.org>
5253
5254 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5255 Delete copy ctor and assignment operator.
5256 (tdesc_type): Likewise.
5257 (tdesc_feature): Likewise.
5258 (tdesc_free_reg): Remove.
5259 (tdesc_create_reg): Use new.
5260 (tdesc_free_type): Remove.
5261 (tdesc_create_vector): Use new.
5262 (tdesc_create_union): Likewise.
5263 (tdesc_create_flags): Likewise.
5264 (tdesc_create_enum): Likewise.
5265 (tdesc_free_feature): Delete.
5266 (free_target_description): Use delete.
5267
325c9fd4
JB
52682017-06-19 John Baldwin <jhb@FreeBSD.org>
5269
5270 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5271 registers.
5272
16b7a719
PA
52732017-06-19 Pedro Alves <palves@redhat.com>
5274
5275 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5276 after gdb::unlinker.
5277
1c8e01c9
SDJ
52782017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5279
5280 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5281 gdb_environ to access an environment variable.
5282
ffce45d2
TP
52832017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5284
5285 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5286 gdb_byte*.
5287
1d4fbac9
SM
52882017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5289
5290 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5291
8465943a
SM
52922017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5293
5294 * configure: Re-generate.
5295 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5296
3e019bdc
SM
52972017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5298
5299 * configure: Re-generate.
5300 * warning.m4: Pass -Werror to compiler when checking for
5301 supported warning flags.
5302
cf0dd6f0
SM
53032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5304
5305 * Makefile.in (COMPILE.pre): Add "-x c++".
5306
6f98355c
YQ
53072017-06-16 Alan Hayward <alan.hayward@arm.com>
5308 Pedro Alves <palves@redhat.com>
5309 Yao Qi <yao.qi@linaro.org>
5310
5311 * defs.h (RequireLongest): New.
5312 (extract_integer): Declare function template.
5313 (extract_signed_integer): Remove the declaration, but define it
5314 static inline.
5315 (extract_unsigned_integer): Likewise.
5316 (store_integer): Declare function template.
5317 (store_signed_integer): Remove the declaration, but define it
5318 static inline.
5319 (store_unsigned_integer): Likewise.
5320 * findvar.c (extract_integer): New function template.
5321 (extract_signed_integer): Remove.
5322 (extract_unsigned_integer): Remove.
5323 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5324 instantiations.
5325 (store_integer): New function template.
5326 (store_signed_integer): Remove.
5327 (store_unsigned_integer): Remove.
5328 (store_integer): Explicit instantiations.
5329 * regcache.c (regcache_raw_read_signed): Update.
5330 (regcache::raw_read): New function.
5331 (regcache::raw_read_signed): Remove.
5332 (regcache::raw_read_unsigned): Remove.
5333 (regcache_raw_read_unsigned): Update.
5334 (regcache_raw_write_unsigned): Update.
5335 (regcache::raw_write_signed): Remove.
5336 (regcache::raw_write): New function.
5337 (regcache_cooked_read_signed): Update.
5338 (regcache::raw_write_unsigned): Remove.
5339 (regcache::cooked_read_signed): Remove.
5340 (regcache_cooked_read_unsigned): Update.
5341 (regcache::cooked_read_unsigned): Remove.
5342 (regcache_cooked_write_signed): Update.
5343 (regcache_cooked_write_unsigned): Update.
5344 * regcache.h (regcache) <raw_read_signed>: Remove.
5345 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5346 <raw_read, raw_write>: New.
5347 <cooked_read_signed, cooked_write_signed>: Remove.
5348 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5349 <cooked_read, cooked_write>: New.
5350 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5351 (sh64_pseudo_register_write): Update.
5352
a87dc45a
AK
53532017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5354
5355 * arc-tdep.c (arc_disassembler_options): New variable.
5356 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5357 of default_print_insn.
5358 (arc_delayed_print_insn): Set info->section when needed,
5359 use default_print_insn to retrieve a disassembler.
5360
45159d6a
SDJ
53612017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5362
5363 PR gdb/21574
5364 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5365 to mention $SHELL and startup-with-shell.
5366
b46c4cf0
MF
53672017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5368
5369 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5370
6394c606
YQ
53712017-06-14 Yao Qi <yao.qi@linaro.org>
5372
5373 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5374 default_print_insn instead of print_insn_aarch64.
5375 * arm-tdep.c (gdb_print_insn_arm): Call
5376 default_print_insn instead of print_insn_big_arm
5377 and print_insn_little_arm.
5378 * i386-tdep.c (i386_print_insn): Call default_print_insn
5379 instead of print_insn_i386.
5380 * ia64-tdep.c (ia64_print_insn): Call
5381 default_print_insn instead of print_insn_ia64.
5382 * mips-tdep.c (gdb_print_insn_mips): Call
5383 default_print_insn instead of print_insn_big_mips
5384 and print_insn_little_mips.
5385 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5386 instead of print_insn_spu.
5387
d5722aa2
PA
53882017-06-14 Pedro Alves <palves@redhat.com>
5389
5390 * ada-lang.c: Include "common/byte-vector.h".
5391 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5392 * charset.c (wchar_iterator::iterate): Resize the vector instead
5393 of reserving it.
5394 * common/byte-vector.h: Include "common/def-vector.h".
5395 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5396 * cli/cli-dump.c: Include "common/byte-vector.h".
5397 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5398 * common/byte-vector.h: New file.
5399 * common/def-vector.h: New file.
5400 * common/default-init-alloc.h: New file.
5401 * dwarf2loc.c: Include "common/byte-vector.h".
5402 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5403 instead of reserving it.
5404 * dwarf2read.c: Include "common/byte-vector.h".
5405 (data_buf::m_vec): Now a gdb::byte_vector.
5406 * gdb_regex.c: Include "common/def-vector.h".
5407 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5408 * mi/mi-main.c: Include "common/byte-vector.h".
5409 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5410 * printcmd.c: Include "common/byte-vector.h".
5411 (print_scalar_formatted): Use gdb::byte_vector.
5412 * valprint.c: Include "common/byte-vector.h".
5413 (maybe_negate_by_bytes, print_decimal_chars): Use
5414 gdb::byte_vector.
5415
01ec7a27
SM
54162017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5417
5418 * darwin-nat.c: Include "nat/fork-inferior.h".
5419
848d9074
SM
54202017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5421
5422 * configure.nat: Factor out Darwin bits that are not
5423 architecture-specific. Add fork-inferior.o.
5424
3b912944
SM
54252017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5426
5427 * configure.nat: Factor out AIX bits that are not
5428 architecture-specific. Add fork-inferior.o.
5429
55acdf22
AA
54302017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5431
5432 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5433 (read_pieced_value, write_pieced_value): ...here. Reduce to
5434 wrappers that just call rw_pieced_value.
5435
f65e2044
AA
54362017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5437
5438 * dwarf2loc.c (write_pieced_value): When writing the data for a
5439 memory piece, use write_memory_with_notification instead of
5440 write_memory.
5441
23f945bf
AA
54422017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5443
5444 * valops.c (read_value_memory): Change embedded_offset to
5445 represent a bit offset instead of a byte offset.
5446 * value.h (read_value_memory): Adjust comment.
5447
f236533e
AA
54482017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5449
5450 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5451 dest_offset_bits and source_offset_bits.
5452 (write_pieced_value): Likewise.
5453
65d84b76
AA
54542017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5455
5456 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5457 given by DW_OP_bit_piece.
5458 (write_pieced_value): Likewise.
5459
242d31ab
AA
54602017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5461
5462 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5463 some other preparations to the places where sufficient information
5464 is available.
5465 (write_pieced_value): Likewise.
5466
03c8af18
AA
54672017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5468
5469 * dwarf2loc.c (bits_to_bytes): New function.
5470 (read_pieced_value): Fix offset calculations for register pieces
5471 on big-endian targets.
5472 (write_pieced_value): Likewise.
5473
840989c1
AA
54742017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5475
5476 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5477 (write_pieced_value): Likewise.
5478
359b19bb
AA
54792017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5480
5481 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5482 transfer the source value's least significant bits, instead of its
5483 lowest-addressed ones. Rename type_len to max_offset.
5484 (read_pieced_value): Mirror above changes to write_pieced_value as
5485 applicable.
5486
07c9ca3b
AA
54872017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5488
5489 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5490 truncate full bytes from dest_offset_bits before using it as an
5491 offset into the buffer.
5492
f1cc9874
AA
54932017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5494
5495 * dwarf2loc.c (write_pieced_value): Include transfer size in
5496 byte-wise check.
5497
cdaac320
AA
54982017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5499
5500 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5501 calculation of this_size.
5502
af547a96
AA
55032017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5504
5505 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5506 when targeting a bit-field.
5507 (write_pieced_value): Likewise.
5508
ddd7882a
AA
55092017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5510
5511 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5512 (allocate_piece_closure): Drop addr_size parameter.
5513 (dwarf2_evaluate_loc_desc_full): Adjust call to
5514 allocate_piece_closure.
5515
e9352324
AA
55162017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5517
5518 PR gdb/21226
5519 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5520 the LSB end, independent of endianness.
5521
d5d1163e
AA
55222017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5523
5524 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5525 size capping.
5526
032bb6ea
YQ
55272017-06-13 Yao Qi <yao.qi@linaro.org>
5528
5529 * mips-linux-nat.c: Move include features/mips*-linux.c to
5530 mips-linux-tdep.c.
5531 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5532 to mips-linux-tdep.c.
5533 * mips-linux-tdep.c: Include features/mips*-linux.c
5534 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5535 functions.
5536 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5537 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5538 (tdesc_mips64_dsp_linux): Declare.
5539
f12f6bad
TT
55402017-06-12 Tom Tromey <tom@tromey.com>
5541
5542 * valprint.h (val_print_type_code_int): Remove.
5543 * valprint.c (generic_val_print_int): Always call
5544 val_print_scalar_formatted.
5545 (val_print_type_code_int): Remove.
5546 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5547 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5548 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5549 * ada-valprint.c (ada_val_print_num): Use
5550 val_print_scalar_formatted.
5551
d9109c80
TT
55522017-06-12 Tom Tromey <tom@tromey.com>
5553
5554 * printcmd.c (print_scalar_formatted): Unify the two switches.
5555 Don't convert scalars to LONGEST.
5556
4ac0cb1c
TT
55572017-06-12 Tom Tromey <tom@tromey.com>
5558
5559 PR exp/16225:
5560 * valprint.h (print_decimal_chars): Update.
5561 * valprint.c (maybe_negate_by_bytes): New function.
5562 (print_decimal_chars): Add "is_signed" argument.
5563 * printcmd.c (print_scalar_formatted): Update.
5564
30a25466
TT
55652017-06-12 Tom Tromey <tom@tromey.com>
5566
5567 PR exp/16225:
5568 * valprint.h (print_binary_chars, print_hex_chars): Update.
5569 * valprint.c (val_print_type_code_int): Update.
5570 (print_binary_chars): Add "zero_pad" argument.
5571 (emit_octal_digit): New function.
5572 (print_octal_chars): Don't zero-pad.
5573 (print_decimal_chars): Likewise.
5574 (print_hex_chars): Add "zero_pad" argument.
5575 * sh64-tdep.c (sh64_do_fp_register): Update.
5576 * regcache.c (regcache::dump): Update.
5577 * printcmd.c (print_scalar_formatted): Update.
5578 * infcmd.c (default_print_one_register_info): Update.
5579
b3464d03
PA
55802017-06-12 Pedro Alves <palves@redhat.com>
5581 Alan Hayward <alan.hayward@arm.com>
5582
5583 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5584 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5585 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5586 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5587 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5588
4b76cda9
PA
55892017-06-12 Pedro Alves <palves@redhat.com>
5590
5591 * dwarf2read.c (mapped_symtab::data): Now a vector of
5592 symtab_index_entry instead of vector of
5593 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5594 whether an element's name is NULL instead of checking whether the
5595 element itself is NULL.
5596 (find_slot): Change return type. Adjust.
5597 (hash_expand, , add_index_entry, uniquify_cu_indices)
5598 (write_hash_table): Adjust.
5599
e8f8bcb3
PA
56002017-06-12 Pedro Alves <palves@redhat.com>
5601
5602 * dwarf2read.c (recursively_count_psymbols): New function.
5603 (write_psymtabs_to_index): Call it to compute number of psyms and
5604 pass estimate size of psyms_seen to unordered_set's ctor.
5605
70a1152b
PA
56062017-06-12 Pedro Alves <palves@redhat.com>
5607
5608 * dwarf2read.c (write_hash_table): Check if key already exists
5609 before emplacing.
5610
c2f134ac
PA
56112017-06-12 Pedro Alves <palves@redhat.com>
5612
5613 * dwarf2read.c (data_buf::append_space): Rename to...
5614 (data_buf::grow): ... this, and make private. Adjust all callers.
5615 (data_buf::append_uint): New method.
5616 (add_address_entry, write_one_signatured_type)
5617 (write_psymtabs_to_index): Use it.
5618
a81e6d4d
PA
56192017-06-12 Pedro Alves <palves@redhat.com>
5620
5621 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5622 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5623 (data_buf::file_write): Call ::fwrite directly.
5624
6fd931f2
PA
56252017-06-12 Pedro Alves <palves@redhat.com>
5626
5627 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5628 std::vector::erase.
5629
bc8f2430
JK
56302017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5631
5632 Code cleanup: C++ify .gdb_index producer.
5633 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5634 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5635 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5636 (create_strtab, add_string): Remove.
5637 (file_write, data_buf): New.
5638 (struct symtab_index_entry): Use std::vector for cu_indices.
5639 (struct mapped_symtab): Use std::vector for data.
5640 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5641 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5642 Remove.
5643 (find_slot): Change return type. Update it to the new data structures.
5644 (hash_expand, add_index_entry): Update it to the new data structures.
5645 (offset_type_compare): Remove.
5646 (uniquify_cu_indices): Update it to the new data structures.
5647 (c_str_view, c_str_view_hasher, vector_hasher): New.
5648 (add_indices_to_cpool): Remove.
5649 (write_hash_table): Update it to the new data structures.
5650 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5651 (eq_psymtab_cu_index): Remove.
5652 (psym_index_map): New typedef.
5653 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5654 reference and std::unordered_map for cu_index_htab.
5655 (add_address_entry, add_address_entry_worker, write_address_map)
5656 (write_psymbols): Update it to the new data structures.
5657 (write_obstack): Remove.
5658 (struct signatured_type_index_data): Change types_list to a data_buf
5659 reference and psyms_seen to a std::unordered_set reference.
5660 (write_one_signatured_type, recursively_write_psymbols)
5661 (write_psymtabs_to_index): Update it to the new data structures.
5662
c4dcb155
SM
56632017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5664
5665 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5666 separate-debug-file commands.
5667 * symfile.h (separate_debug_file_debug): New global.
5668 * symfile.c (separate_debug_file_debug): New global.
5669 (separate_debug_file_exists, find_separate_debug_file): Add
5670 debug output.
5671 (_initialize_symfile): Add "set debug separate-debug-file"
5672 command.
5673 * build-id.c (build_id_to_debug_bfd,
5674 find_separate_debug_file_by_buildid): Add debug output.
5675
6d45d4b4
SM
56762017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5677
5678 * gdbarch.sh (displaced_step_free_closure): Remove.
5679 * gdbarch.h, gdbarch.c: Re-generate.
5680 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5681 displaced_step_free_closure.
5682 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5683 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5684 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5685 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5686 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5687 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5688 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5689 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5690 * infrun.c (displaced_step_clear): Call xfree instead of
5691 gdbarch_displaced_step_free_closure.
5692
2f91880f
SDJ
56932017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5694
5695 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5696 NULL".
5697
b8b6e72f
AH
56982017-06-08 Alan Hayward <alan.hayward@arm.com>
5699
5700 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5701 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5702 (mn10300_push_dummy_call): Likewise.
5703
5369082e
AH
57042017-06-08 Alan Hayward <alan.hayward@arm.com>
5705
5706 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5707
ff4ca5ac
AH
57082017-06-08 Alan Hayward <alan.hayward@arm.com>
5709
5710 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5711
aefd8b33
SDJ
57122017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5713
5714 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5715 able to start inferiors using a shell.
5716 (New remote packets): Announce new packet "QStartupWithShell".
5717 * remote.c: Add PACKET_QStartupWithShell.
5718 (extended_remote_create_inferior): Handle new
5719 PACKET_QStartupWithShell.
5720 (remote_protocol_features) <QStartupWithShell>: New entry for
5721 PACKET_QStartupWithShell.
5722 (_initialize_remote): Call "add_packet_config_cmd" for
5723 QStartupShell.
5724
2090129c
SDJ
57252017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5726 Pedro Alves <palves@redhat.com>
5727
5728 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5729 and "nat/fork-inferior.h".
5730 * common/common-inferior.h: New file, with contents from
5731 "gdb/inferior.h".
5732 * commom/common-utils.c: Include "common-utils.h".
5733 (stringify_argv): New function.
5734 * common/common-utils.h (stringify_argv): New prototype.
5735 * configure.nat: Add "fork-inferior.o" as a dependency for
5736 "*linux*", "fbsd*" and "nbsd*" hosts.
5737 * corefile.c (get_exec_file): Update comment.
5738 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5739 instead of "startup_inferior".
5740 (darwin_create_inferior): Call "add_thread_silent" after
5741 "fork_inferior".
5742 * fork-child.c: Cleanup unnecessary includes.
5743 (SHELL_FILE): Move to "common/common-fork-child.c".
5744 (environ): Likewise.
5745 (exec_wrapper): Initialize.
5746 (get_exec_wrapper): New function.
5747 (breakup_args): Move to "common/common-fork-child.c"; rename to
5748 "breakup_args_for_exec".
5749 (escape_bang_in_quoted_argument): Move to
5750 "common/common-fork-child.c".
5751 (saved_ui): New variable.
5752 (prefork_hook): New function.
5753 (postfork_hook): Likewise.
5754 (postfork_child_hook): Likewise.
5755 (gdb_startup_inferior): Likewise.
5756 (fork_inferior): Move to "common/common-fork-child.c". Update
5757 function to support gdbserver.
5758 (startup_inferior): Likewise.
5759 * gdbcore.h (get_exec_file): Remove declaration.
5760 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5761 instead of "startup_inferior". Call "add_thread_silent" after
5762 "fork_inferior".
5763 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5764 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5765 instead of "startup_inferior". Call "add_thread_silent" after
5766 "fork_inferior".
5767 * inferior.h: Include "common-inferior.h".
5768 (trace_start_error): Move to "common/common-utils.h".
5769 (trace_start_error_with_name): Likewise.
5770 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5771 (startup_inferior): Likewise.
5772 (gdb_startup_inferior): New prototype.
5773 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5774 * nat/fork-inferior.h: New file.
5775 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5776 instead of "startup_inferior". Call "add_thread_silent" after
5777 "fork_inferior".
5778 * target.h (target_terminal_init): Move prototype to
5779 "target/target.h".
5780 (target_terminal_inferior): Likewise.
5781 (target_terminal_ours): Likewise.
5782 * target/target.h (target_terminal_init): New prototype, moved
5783 from "target.h".
5784 (target_terminal_inferior): Likewise.
5785 (target_terminal_ours): Likewise.
5786 * utils.c (gdb_flush_out_err): New function.
5787
043a4934
SDJ
57882017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5789
5790 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5791 * common/common-gdbthread.h: New file, with parts from
5792 "gdb/gdbthread.h".
5793 * gdbthread.h: Include "common-gdbthread.h".
5794 (switch_to_thread): Moved to "common/common-gdbthread.h".
5795
15652511
SDJ
57962017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5797
5798 * Makefile.in (SFILES): Add "common/job-control.c".
5799 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5800 (COMMON_OBS): Add "job-control.o".
5801 * common/job-control.c: New file, with contents from
5802 "gdb/inflow.c".
5803 * common/job-control.h: New file, with contents from "terminal.h".
5804 * fork-child.c: Include "job-control.h".
5805 * inflow.c: Include "job-control.h".
5806 (gdb_setpgid): Move to "common/common-inflow.c".
5807 (_initialize_inflow): Move setting of "job_control" to
5808 "handle_job_control".
5809 * terminal.h (job_control): Moved to "common/common-terminal.h".
5810 (gdb_setpgid): Likewise.
5811 * top.c: Include "job_control.h".
5812 * utils.c: Likewise.
5813 (job_control): Moved to "job-control.c".
5814
2d7cc5c7
PA
58152017-06-07 Pedro Alves <palves@redhat.com>
5816
5817 * Makefile.in (SFILES): Add gdb_regex.c.
5818 (COMMON_OBS): Add gdb_regex.o.
5819 * ada-lang.c (ada_add_standard_exceptions)
5820 (ada_add_exceptions_from_frame, name_matches_regex)
5821 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5822 parameter type to compiled_regex. Adjust.
5823 (ada_exceptions_list): Use compiled_regex.
5824 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5825 std::unique_ptr<compiled_regex>.
5826 (exception_catchpoint::~exception_catchpoint): Remove regfree
5827 call.
5828 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5829 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5830 * breakpoint.c (solib_catchpoint::compiled): Now a
5831 std::unique_ptr<compiled_regex>.
5832 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5833 (check_status_catch_solib): Adjust to use compiled_regex.
5834 (add_solib_catchpoint): Adjust to use compiled_regex.
5835 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5836 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5837 compiled_regex reference. Adjust to use it.
5838 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5839 declaration. Include "gdb_regex.h".
5840 (apropos_cmd): Change regex parameter to compiled_regex reference.
5841 * gdb_regex.c: New file.
5842 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5843 declarations.
5844 (class compiled_regex): New.
5845 * linux-tdep.c: Include "common/gdb_optional.h".
5846 (struct mapping_regexes): New, factored out from
5847 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5848 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5849 gdb::optional and remove cleanups. Adjust to compiled_regex.
5850 * probe.c: Include "common/gdb_optional.h".
5851 (collect_probes): Use compiled_regex and gdb::optional and remove
5852 cleanups.
5853 * skip.c: Include "common/gdb_optional.h".
5854 (skiplist_entry::compiled_function_regexp): Now a
5855 gdb::optional<compiled_regex>.
5856 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5857 (free_skiplist_entry): Remove regfree call.
5858 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5859 compiled_regex and gdb::optional.
5860 * symtab.c: Include "common/gdb_optional.h".
5861 (search_symbols): Use compiled_regex and gdb::optional.
5862 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5863 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5864 to gdb_regex.c.
5865
50d6adef
AH
58662017-06-07 Alan Hayward <alan.hayward@arm.com>
5867
5868 * regcache.c (regcache::save): Avoid buffer use.
5869 (regcache::dump): Likewise.
5870
4a8a33c8
AH
58712017-06-07 Alan Hayward <alan.hayward@arm.com>
5872
5873 * sh-tdep.c (sh_pseudo_register_read): Remove
5874 MAX_REGISTER_SIZE.
5875 (sh_pseudo_register_write): Likewise.
5876 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5877 (sh64_pseudo_register_write): Likewise
5878
d1be909e
AH
58792017-06-07 Alan Hayward <alan.hayward@arm.com>
5880
5881 * aarch64-tdep.c (aarch64_store_return_value): Use
5882 V_REGISTER_SIZE.
5883 (aarch64_pseudo_read_value): Likewise.
5884 (aarch64_pseudo_write): Likewise.
5885
f4a65042
YQ
58862017-06-06 Yao Qi <yao.qi@linaro.org>
5887
5888 * regformats/regdef.h (set_register_cache): Remove the
5889 declaration.
5890
9f7fb0aa
AH
58912017-06-06 Alan Hayward <alan.hayward@arm.com>
5892
5893 * frame.c (frame_unwind_register_signed): Use
5894 frame_unwind_register_value.
5895
e1e01040
PA
58962017-06-06 Pedro Alves <palves@redhat.com>
5897
5898 PR breakpoints/21553
5899 * breakpoint.c (create_breakpoints_sal_default)
5900 (init_breakpoint_sal, create_breakpoint_sal): Use
5901 gdb::unique_xmalloc_ptr for string parameters.
5902 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5903 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5904 (base_breakpoint_create_breakpoints_sal)
5905 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5906 (strace_marker_create_breakpoints_sal)
5907 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5908 string parameters.
5909 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5910 gdb::unique_xmalloc_ptr for string parameters.
5911 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5912 parameters.
5913
fbe654c8
AH
59142017-06-06 Alan Hayward <alan.hayward@arm.com>
5915
5916 * alpha-tdep.c (alpha_register_to_value): Use
5917 get_frame_register_value.
5918 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5919
ae0d01d6
AH
59202017-06-06 Alan Hayward <alan.hayward@arm.com>
5921
5922 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5923 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5924 (ia64_value_to_register): Likewise.
5925 (ia64_extract_return_value): Likewise.
5926 (ia64_store_return_value): Likewise.
5927 (ia64_push_dummy_call): Likewise.
5928
49cf576c
JB
59292017-06-04 Joel Brobecker <brobecker@adacore.com>
5930
5931 GDB 8.0 released.
5932
26b6a6ab
SM
59332017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5934
5935 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5936
22827c51
SM
59372017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5938
5939 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5940 parameter.
5941 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5942
0e05cf3a
SM
59432017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5944
5945 * event-loop.c (poll_timers): Unallocate timer using delete
5946 instead of xfree.
5947
c1fc2657
SM
59482017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5949
5950 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5951 (struct breakpoint) <~breakpoint>: New.
5952 (struct watchpoint): Inherit from breakpoint.
5953 <~watchpoint>: New.
5954 <base>: Remove.
5955 (struct tracepoint): Inherit from breakpoint.
5956 <base>: Remove.
5957 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5958 (struct longjmp_breakpoint): Inherit from breakpoint.
5959 <~longjmp_breakpoint>: New.
5960 <base>: Remove.
5961 (new_breakpoint_from_type): Remove casts.
5962 (watchpoint_in_thread_scope): Remove reference to base field.
5963 (watchpoint_del_at_next_stop): Likewise.
5964 (update_watchpoint): Likewise.
5965 (watchpoint_check): Likewise.
5966 (bpstat_check_watchpoint): Likewise.
5967 (set_longjmp_breakpoint): Likewise.
5968 (struct fork_catchpoint): Inherit from breakpoint.
5969 <base>: Remove.
5970 (struct solib_catchpoint): Inherit from breakpoint.
5971 <~solib_catchpoint>: New.
5972 <base>: Remove.
5973 (dtor_catch_solib): Change to ...
5974 (solib_catchpoint::~solib_catchpoint): ... this.
5975 (breakpoint_hit_catch_solib): Remove reference to base field.
5976 (add_solib_catchpoint): Likewise.
5977 (create_fork_vfork_event_catchpoint): Likewise.
5978 (struct exec_catchpoint): Inherit from breakpoint.
5979 <~exec_catchpoint>: New.
5980 <base>: Remove.
5981 (dtor_catch_exec): Change to ...
5982 (exec_catchpoint::~exec_catchpoint): ... this.
5983 (dtor_watchpoint): Change to ...
5984 (watchpoint::~watchpoint): ... this.
5985 (watch_command_1): Remove reference to base field.
5986 (catch_exec_command_1): Likewise.
5987 (base_breakpoint_dtor): Change to ...
5988 (breakpoint::~breakpoint): ... this.
5989 (base_breakpoint_ops): Remove dtor field value.
5990 (longjmp_bkpt_dtor): Change to ...
5991 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5992 (strace_marker_create_breakpoints_sal): Remove reference to base
5993 field.
5994 (delete_breakpoint): Don't manually call breakpoint destructor.
5995 (create_tracepoint_from_upload): Remove reference to base field.
5996 (trace_pass_set_count): Likewise.
5997 (initialize_breakpoint_ops): Don't initialize
5998 momentary_breakpoint_ops, don't set dtors.
5999 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6000 <~ada_catchpoint>: New.
6001 <base>: Remove.
6002 (create_excep_cond_exprs): Remove reference to base field.
6003 (dtor_exception): Change to ...
6004 (ada_catchpoint::~ada_catchpoint): ... this.
6005 (dtor_catch_exception): Remove.
6006 (dtor_catch_exception_unhandled): Remove.
6007 (dtor_catch_assert): Remove.
6008 (create_ada_exception_catchpoint): Remove reference to base
6009 field.
6010 (initialize_ada_catchpoint_ops): Don't set dtors.
6011 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6012 breakpoint.
6013 <~signal_catchpoint>: New.
6014 <base>: Remove.
6015 (signal_catchpoint_dtor): Change to ...
6016 (signal_catchpoint::~signal_catchpoint): ... this.
6017 (create_signal_catchpoint): Remove reference to base field.
6018 (initialize_signal_catchpoint_ops): Don't set dtor.
6019 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6020 from breakpoint.
6021 <~syscall_catchpoint>: New.
6022 <base>: Remove.
6023 (dtor_catch_syscall): Change to ...
6024 (syscall_catchpoint::~syscall_catchpoint): ... this.
6025 (create_syscall_event_catchpoint): Remove reference to base
6026 field.
6027 (initialize_syscall_catchpoint_ops): Don't set dtor.
6028 * break-catch-throw.c (struct exception_catchpoint): Inherit
6029 from breakpoint.
6030 <~exception_catchpoint>: New.
6031 <base>: Remove.
6032 (dtor_exception_catchpoint): Change to ...
6033 (exception_catchpoint::~exception_catchpoint): ... this.
6034 (handle_gnu_v3_exceptions): Remove reference to base field.
6035 (initialize_throw_catchpoint_ops): Don't set dtor.
6036 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6037 field.
6038 * remote.c (remote_get_tracepoint_status): Likewise.
6039 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6040 * tracefile.c (tracefile_fetch_registers): Likewise.
6041 * tracepoint.c (actions_command): Likewise.
6042 (validate_actionline): Likewise.
6043 (tfind_1): Likewise.
6044 (get_traceframe_location): Likewise.
6045 (find_matching_tracepoint_location): Likewise.
6046 (parse_tracepoint_status): Likewise.
6047 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6048
3b0871f4
SM
60492017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6050
6051 * breakpoint.c (struct longjmp_breakpoint): New struct.
6052 (is_tracepoint_type): Change return type to bool.
6053 (is_longjmp_type): New function.
6054 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6055 (set_raw_breakpoint_without_location): Use
6056 new_breakpoint_from_type.
6057 (set_raw_breakpoint): Likewise.
6058
a5e364af
SM
60592017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6060
6061 * breakpoint.c (new_breakpoint_from_type): New function.
6062 (create_breakpoint_sal): Use new_breakpoint_from_type and
6063 unique_ptr.
6064 (create_breakpoint): Likewise.
6065
ae3b3f34
SM
60662017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6067
6068 * memattr.c (mem_info_command): Rename to ...
6069 (info_mem_command): ... this.
6070 (mem_enable_command): Rename to ...
6071 (enable_mem_command): ... this.
6072 (mem_disable_command): Rename to ...
6073 (disable_mem_command): ... this.
6074 (mem_delete_command): Rename to ...
6075 (delete_mem_command): ... this.
6076 (_initialize_mem): Adjust function names.
6077
13ace077
MM
60782017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6079
6080 * btrace.c (handle_pt_insn_events): New.
6081 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6082 STATUS. Split into this and ...
6083 (handle_pt_insn_event_flags): ... this.
6084
c56ccc05
MM
60852017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6086
6087 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6088 and struct pt_insn.resynced.
6089 * configure: Regenerated.
6090 * config.in: Regenerated.
6091
08c3f6d2
TW
60922017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6093
6094 * btrace.c (ftrace_find_call_by_number): New function.
6095 (ftrace_new_function): Store objects, not pointers.
6096 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6097 ftrace_new_gap, ftrace_update_function,
6098 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6099 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6100 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6101 btrace_ends_with_single_insn, btrace_call_get): Account for
6102 btrace_thread_info::functions now storing objects.
6103 * btrace.h (struct btrace_thread_info): Add constructor.
6104 (struct btrace_thread_info) <functions>: Make std::vector.
6105 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6106 Initialize with default values.
6107 * record-btrace.c (record_btrace_frame_sniffer): Account for
6108 btrace_thread_info::functions now storing objects.
6109
8ffd39f2
TW
61102017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6111
6112 * btrace.c: Remove typedef bfun_s.
6113 (ftrace_new_gap): Directly add gaps to the list of gaps.
6114 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6115 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6116 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6117 instead of gdb VEC.
6118
4aeb0dfc
TW
61192017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6120
6121 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6122 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6123 with btrace_thread_info::next_segment and
6124 btrace_thread_info::prev_segment.
6125 * btrace.h: Remove struct btrace_func_link.
6126 (struct btrace_function): Replace pair of function segment pointers
6127 with pair of indices.
6128 * python/py-record-btrace.c (btpy_call_prev_sibling,
6129 btpy_call_next_sibling): Replace references to
6130 btrace_thread_info::segment with btrace_thread_info::next_segment and
6131 btrace_thread_info::prev_segment.
6132 * record-btrace.c (record_btrace_frame_this_id): Use
6133 btrace_find_call_by_number.
6134
eb8f2b9c
TW
61352017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6136
6137 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6138 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6139 btrace_insn_next, btrace_insn_prev): Remove references to
6140 btrace_thread_info::flow.
6141 * btrace.h (struct btrace_function): Remove FLOW.
6142
42bfe59e
TW
61432017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6144
6145 * btrace.c (ftrace_find_call_by_number): New function.
6146 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6147 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6148 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6149 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6150 index.
6151 * btrace.h (struct btrace_function): Turn UP into an index.
6152 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6153 as an index.
6154 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6155 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6156 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6157
b54b03bd
TW
61582017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6159
6160 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6161 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6162 ftrace_update_function, ftrace_compute_global_level_offset,
6163 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6164 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6165 btrace_insn_end, btrace_is_empty): Remove references to
6166 btrace_thread_info::begin and btrace_thread_info::end.
6167 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6168 (struct btrace_thread_info) <functions>: Adjust comment.
6169 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6170 btrace_thread_info::begin.
6171
8286623c
TW
61722017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6173
6174 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6175 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6176 ftrace_update_function): Remove arguments that implicitly were always
6177 BTINFO->END.
6178 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6179 Don't pass BTINFO->END.
6180
a0f1b963
TW
61812017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6182
6183 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6184 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6185 btrace_find_insn_by_number): Replace function segment pointer with
6186 index.
6187 (btrace_insn_cmp): Simplify.
6188 * btrace.h: (struct btrace_insn_iterator) Rename index to
6189 insn_index. Replace function segment pointer with index into function
6190 segment vector.
6191 * record-btrace.c (record_btrace_call_history): Replace function
6192 segment pointer use with index.
6193 (record_btrace_frame_sniffer): Retrieve function call segment through
6194 vector.
6195 (record_btrace_set_replay): Remove defunc't safety check.
6196
f158f208
TW
61972017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6198
6199 * btrace.c (btrace_ends_with_single_insn): New function.
6200 (btrace_call_get, btrace_call_number, btrace_call_begin,
6201 btrace_call_end, btrace_call_next, btrace_call_prev,
6202 btrace_find_call_by_number): Use index into call segment vector
6203 instead of pointer.
6204 (btrace_call_cmp): Simplify.
6205 * btrace.h (struct btrace_call_iterator): Replace function call segment
6206 pointer with index into vector.
6207 * record-btrace.c (record_btrace_call_history): Use index instead of
6208 pointer.
6209
521103fd
TW
62102017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6211
6212 * btrace.c (btrace_insn_begin, btrace_insn_end,
6213 btrace_find_insn_by_number): Add btinfo to iterator.
6214 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6215
17b89b34
TW
62162017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6217
6218 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6219 and save pointers directly.
6220 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6221 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6222 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6223 changed signature of functions.
6224 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6225 (btrace_fetch): Remove code that adds btrace_function pointers to
6226 vector of btrace_functions.
6227 (btrace_clear): Simplify freeing vector of btrace_functions.
6228
2b51eddc
TW
62292017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6230
6231 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6232 Replace VEC_* with std::vector functions.
6233 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6234 (struct btrace_thread_info)<functions>: Change type to std::vector.
6235
db6be0d5
SM
62362017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6237
6238 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6239 "Removed targets and native configurations" up. Merge duplicate
6240 "New commands" sub-sections. Add "New options" sub-sections.
6241
b057297a
AH
62422017-05-26 Alan Hayward <alan.hayward@arm.com>
6243
6244 * defs.h (copy_integer_to_size): New declaration.
6245 * findvar.c (copy_integer_to_size): New function.
6246 (do_cint_test): New selftest function.
6247 (copy_integer_to_size_test): Likewise.
6248 (_initialize_findvar): Likewise.
6249 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6250 (mips_fbsd_collect_reg): Use raw_collect_integer.
6251 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6252 (mips64_fill_gregset): Use raw_collect_integer
6253 (mips64_fill_fpregset): Use raw_supply_integer.
6254 * regcache.c (regcache::raw_supply_integer): New function.
6255 (regcache::raw_collect_integer): Likewise.
6256 * regcache.h: (regcache::raw_supply_integer): New declaration.
6257 (regcache::raw_collect_integer): Likewise.
6258
b77b02a5
YQ
62592017-05-24 Yao Qi <yao.qi@linaro.org>
6260
6261 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6262 (COMMON_OBS): Add gdbarch-selftests.o.
6263 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6264 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6265 * gdbarch-selftests.c: New file.
6266 * regcache.h (regcache) <~regcache>: Mark it virtual if
6267 GDB_SELF_TEST.
6268 <raw_write>: Likewise.
6269
e521e87e
YQ
62702017-05-24 Yao Qi <yao.qi@linaro.org>
6271
6272 * regcache.c (current_regcache): Change it to
6273 regcache::current_regcache.
6274 (regcache_observer_target_changed): Update.
6275 (regcache_thread_ptid_changed): Make it a regcache static
6276 method.
6277 (regcache_thread_ptid_changed): Update.
6278 (class regcache_access): New.
6279 (current_regcache_test): Update.
6280 (_initialize_regcache): Update.
6281 * regcache.h: Include forward_list.
6282 (regcache): Declare regcache_thread_ptid_changed and declare
6283 registers_changed_ptid as friend.
6284
d8e07dda
YQ
62852017-05-24 Yao Qi <yao.qi@linaro.org>
6286
6287 * i387-tdep.c (i387_register_to_value): Use register_size
6288 instead of TYPE_LENGTH.
6289 * m68k-tdep.c (m68k_register_to_value): Likewise.
6290
8c8f9122
YQ
62912017-05-24 Yao Qi <yao.qi@linaro.org>
6292
6293 * i387-tdep.c (i387_convert_register_p): Return false if type
6294 code isn't TYPE_CODE_FLT.
6295
68fce50f
YQ
62962017-05-24 Yao Qi <yao.qi@linaro.org>
6297
6298 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6299 length is 4.
6300 (alpha_register_to_value): Remove type length check.
6301 (alpha_value_to_register): Likewise.
6302
88954b49
YQ
63032017-05-24 Yao Qi <yao.qi@linaro.org>
6304
6305 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6306 TYPE_CODE_FLT.
6307
e3ec9b69
YQ
63082017-05-24 Yao Qi <yao.qi@linaro.org>
6309
6310 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6311 TYPE_CODE_FLT or not.
6312
cdd238da
YQ
63132017-05-24 Yao Qi <yao.qi@linaro.org>
6314
6315 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6316 * avr-tdep.c (avr_gdbarch_init): Likewise.
6317 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6318 * cris-tdep.c (cris_gdbarch_init): Likewise.
6319 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6320 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6321 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6322 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6323 * mep-tdep.c (mep_gdbarch_init): Likewise.
6324 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6325 * mips-tdep.c (mips_gdbarch_init): Likewise.
6326 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6327 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6328 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6329 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6330 * v850-tdep.c (v850_gdbarch_init): Likewise.
6331
7a3929c4
YQ
63322017-05-24 Yao Qi <yao.qi@linaro.org>
6333
6334 * selftest-arch.c (tests_with_arch): Call registers_changed
6335 and reinit_frame_cache.
6336 * selftest.c (run_self_tests): Likewise.
6337
f4985dba
YQ
63382017-05-24 Yao Qi <yao.qi@linaro.org>
6339
6340 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6341 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6342
ab20fa4a
YQ
63432017-05-24 Yao Qi <yao.qi@linaro.org>
6344
6345 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6346 set_gdbarch_print_insn.
6347
f532ab94
YQ
63482017-05-24 Yao Qi <yao.qi@linaro.org>
6349
6350 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6351 set_gdbarch_print_insn.
6352
39503f82
YQ
63532017-05-24 Yao Qi <yao.qi@linaro.org>
6354
6355 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6356 set_gdbarch_print_insn.
6357 * arc-tdep.c (arc_gdbarch_init): Likewise.
6358 * arch-utils.c: include dis-asm.h.
6359 (default_print_insn): New function.
6360 * arch-utils.h (default_print_insn): Declare.
6361 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6362 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6363 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6364 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6365 * frv-tdep.c (frv_gdbarch_init): Likewise.
6366 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6367 * gdbarch.sh (print_insn): Use default_print_insn.
6368 * gdbarch.c: Regenerated.
6369 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6370 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6371 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6372 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6373 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6374 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6375 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6376 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6377 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6378 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6379 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6380 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6381 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6382 * mt-tdep.c (mt_gdbarch_init): Likewise.
6383 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6384 * nios2-tdep.c (nios2_print_insn): Remove.
6385 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6386 * rx-tdep.c (rx_gdbarch_init): Likewise.
6387 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6388 * score-tdep.c (score_print_insn): Remove.
6389 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6390 * sh-tdep.c (sh_gdbarch_init): Likewise.
6391 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6392 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6393 * tic6x-tdep.c (tic6x_print_insn): Remove.
6394 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6395 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6396 * v850-tdep.c (v850_gdbarch_init): Likewise.
6397 * vax-tdep.c (vax_gdbarch_init): Likewise.
6398 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6399 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6400
f7241d4f
JB
64012017-05-23 John Baldwin <jhb@FreeBSD.org>
6402
6403 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6404 (MIPS_FP0_REGNUM): Remove.
6405 (MIPS_FSR_REGNUM): Remove.
6406 (mips_fbsd_supply_fpregs): Use mips_regnum.
6407 (mips_fbsd_supply_gregs): Likewise.
6408 (mips_fbsd_collect_fpregs): Likewise.
6409 (mips_fbsd_collect_gregs): Likewise.
6410
d489d81d
JB
64112017-05-23 John Baldwin <jhb@FreeBSD.org>
6412
6413 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6414 (getpfpregs_supplies): New function.
6415 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6416 getfpregs_supplies.
6417 (mips_fbsd_store_inferior_registers): Likewise.
6418
e11b3cdc
PA
64192017-05-22 Pedro Alves <palves@redhat.com>
6420
6421 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6422 maintainer.
6423
0f068fb5
AH
64242017-05-22 Alan Hayward <alan.hayward@arm.com>
6425
6426 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6427 (store_register): Likewise.
6428 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6429 (get_decimal_float_return_value): Likewise.
6430 (do_ppc_sysv_return_value): Likewise.
6431 (ppc64_sysv_abi_push_integer): Likewise.
6432 (ppc64_sysv_abi_push_freg): Likewise.
6433 (ppc64_sysv_abi_return_value_base): Likewise.
6434 (ppc64_sysv_abi_return_value): Likewise.
6435 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6436 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6437 * rs6000-nat.c: Likewise.
6438 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6439 (rs6000_value_to_register): Likewise.
6440 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6441
e6cf65f2
TT
64422017-05-21 Tom Tromey <tom@tromey.com>
6443
6444 PR rust/21466:
6445 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6446 arrays as "[T]", not "[T; ]".
6447
43cc5389
TT
64482017-05-19 Tom Tromey <tom@tromey.com>
6449
6450 PR rust/21484:
6451 * rust-lang.c (exp_descriptor_rust): New function.
6452 (rust_language_defn): Use it.
6453 * p-lang.c (pascal_language_defn): Update.
6454 * opencl-lang.c (opencl_language_defn): Update.
6455 * objc-lang.c (objc_language_defn): Update.
6456 * m2-lang.c (m2_language_defn): Update.
6457 * language.h (struct language_defn)
6458 <la_watch_location_expression>: New member.
6459 * language.c (unknown_language_defn, auto_language_defn)
6460 (local_language_defn): Update.
6461 * go-lang.c (go_language_defn): Update.
6462 * f-lang.c (f_language_defn): Update.
6463 * d-lang.c (d_language_defn): Update.
6464 * c-lang.h (c_watch_location_expression): Declare.
6465 * c-lang.c (c_watch_location_expression): New function.
6466 (c_language_defn, cplus_language_defn, asm_language_defn)
6467 (minimal_language_defn): Use it.
6468 * breakpoint.c (watch_command_1): Call
6469 la_watch_location_expression.
6470 * ada-lang.c (ada_language_defn): Update.
6471
7a6e7fcc
RO
64722017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6473
6e7e1744
RO
6474 PR tui/21482
6475 * gdb_curses.h (NOMACROS): Define.
6476 (NCURSES_NOMACROS): Define.
6477
64782017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6479
6480 PR tui/21482
7a6e7fcc
RO
6481 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6482 arg to char *.
6483 * tui/tui-wingeneral.c (box_win): Likewise.
6484 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6485 (tui_show_source_line): Likewise.
6486 (tui_show_exec_info_content): Likewise.
6487
1933fd8e
VM
64882017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6489
6490 * sparc-tdep.c (sparc_structure_return_p)
6491 (sparc_arg_on_registers_p): New functions.
6492 (sparc32_store_arguments): Use them.
6493 * sparc64-tdep.c (sparc64_16_byte_align_p)
6494 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6495 Handle TYPE_CODE_ARRAY.
6496
21873064
YQ
64972017-05-17 Yao Qi <yao.qi@linaro.org>
6498
6499 * cli/cli-decode.c (add_alias_cmd): New function.
6500 * command.h (add_alias_cmd): Declare.
6501 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6502 instead call add_alias_cmd.
6503
2b351b19
PA
65042017-05-17 Pedro Alves <palves@redhat.com>
6505
6506 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6507 (nat_makefile_frag): ... this. All references updated.
6508 * configure.ac: Likewise.
6509 * configure.nat: Likewise. Enhance comments.
6510 * configure: Regenerate.
6511
5f2ad7a3
RO
65122017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6513
6514 * procfs.c (procfs_create_inferior): Change prototype to match
6515 definition.
6516
adf3dde5
EZ
65172017-05-13 Eli Zaretskii <eliz@gnu.org>
6518
6519 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6520 C++ compiler warning.
6521
6830f270
TT
65222017-05-12 Tom Tromey <tom@tromey.com>
6523
6524 PR rust/21483:
6525 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6526 recurse, just call value_struct_elt directly.
6527
68f2f2e3
TT
65282017-05-12 Tom Tromey <tom@tromey.com>
6529
6530 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6531 OP_RUST_ARRAY>: Fix.
6532
256afbc2
TT
65332017-05-12 Tom Tromey <tom@tromey.com>
6534
6535 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6536
94bb8dfe
YQ
65372017-05-09 Yao Qi <yao.qi@linaro.org>
6538
6539 * regcache.c: Include <forward_list>.
6540 (struct regcache_list): Remove.
6541 (current_regcache): Update.
6542 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6543 (regcache_thread_ptid_changed): Likewise.
6544 (registers_changed_ptid): Likewise.
6545 (current_regcache_size): Likewise.
6546
8248946c
YQ
65472017-05-09 Yao Qi <yao.qi@linaro.org>
6548
6549 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6550 (current_regcache_size): New function.
6551 (current_regcache_test): New function.
6552 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6553
313c5961
AH
65542017-05-08 Alan Hayward <alan.hayward@arm.com>
6555
6556 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6557 (print_gp_register_row): Use get_frame_register_value.
6558
27bfc1d1
AH
65592017-05-08 Alan Hayward <alan.hayward@arm.com>
6560
6561 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6562 (mips_supply_fpregset): Likewise.
6563 (mips64_supply_gregset): Likewise.
6564
146e6c5c
AH
65652017-05-08 Alan Hayward <alan.hayward@arm.com>
6566
6567 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6568 regcache->raw_supply_zeroed.
6569
e50f25ec
SDJ
65702017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6571
6572 * configure.nat: Rearrange 'case' statements to match
6573 host before cpu.
6574
21ea5acd
SDJ
65752017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6576
6577 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6578 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6579 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6580 "@nat_extra_makefile_frag@".
6581 (Makefile): Remove dependency on "@frags@".
6582 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6583 (data-directory/Makefile): Likewise.
6584 * config/aarch64/linux.mh: Deleted; moved contents to
6585 "gdb/configure.nat".
6586 * config/alpha/alpha-linux.mh: Likewise.
6587 * config/alpha/nbsd.mh: Likewise.
6588 * config/arm/linux.mh: Likewise.
6589 * config/arm/nbsdelf.mh: Likewise.
6590 * config/i386/cygwin.mh: Likewise.
6591 * config/i386/cygwin64.mh: Likewise.
6592 * config/i386/darwin.mh: Likewise.
6593 * config/i386/fbsd.mh: Likewise.
6594 * config/i386/fbsd64.mh: Likewise.
6595 * config/i386/go32.mh: Likewise.
6596 * config/i386/i386gnu.mh: Likewise.
6597 * config/i386/i386sol2.mh: Likewise.
6598 * config/i386/linux.mh: Likewise.
6599 * config/i386/linux64.mh: Likewise.
6600 * config/i386/mingw.mh: Likewise.
6601 * config/i386/mingw64.mh: Likewise.
6602 * config/i386/nbsd64.mh: Likewise.
6603 * config/i386/nbsdelf.mh: Likewise.
6604 * config/i386/nto.mh: Likewise.
6605 * config/i386/obsd.mh: Likewise.
6606 * config/i386/obsd64.mh: Likewise.
6607 * config/i386/sol2-64.mh: Likewise.
6608 * config/ia64/linux.mh: Likewise.
6609 * config/m32r/linux.mh: Likewise.
6610 * config/m68k/linux.mh: Likewise.
6611 * config/m68k/nbsdelf.mh: Likewise.
6612 * config/m68k/obsd.mh: Likewise.
6613 * config/m88k/obsd.mh: Likewise.
6614 * config/mips/fbsd.mh: Likewise.
6615 * config/mips/linux.mh: Likewise.
6616 * config/mips/nbsd.mh: Likewise.
6617 * config/mips/obsd64.mh: Likewise.
6618 * config/pa/linux.mh: Likewise.
6619 * config/pa/nbsd.mh: Likewise.
6620 * config/pa/obsd.mh: Likewise.
6621 * config/powerpc/aix.mh: Likewise.
6622 * config/powerpc/fbsd.mh: Likewise.
6623 * config/powerpc/linux.mh: Likewise.
6624 * config/powerpc/nbsd.mh: Likewise.
6625 * config/powerpc/obsd.mh: Likewise.
6626 * config/powerpc/ppc64-linux.mh: Likewise.
6627 * config/powerpc/spu-linux.mh: Likewise.
6628 * config/s390/linux.mh: Likewise.
6629 * config/sh/nbsd.mh: Likewise.
6630 * config/sparc/fbsd.mh: Likewise.
6631 * config/sparc/linux.mh: Likewise.
6632 * config/sparc/linux64.mh: Likewise.
6633 * config/sparc/nbsd64.mh: Likewise.
6634 * config/sparc/nbsdelf.mh: Likewise.
6635 * config/sparc/obsd64.mh: Likewise.
6636 * config/sparc/sol2.mh: Likewise.
6637 * config/tilegx/linux.mh: Likewise.
6638 * config/vax/nbsdelf.mh: Likewise.
6639 * config/vax/obsd.mh: Likewise.
6640 * config/xtensa/linux.mh: Likewise.
6641 * config/i386/i386gnu.mn: New file, with excerpts from
6642 "config/i386/i386gnu.mh".
6643 * configure: Regenerate.
6644 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6645 *.mh files under "gdb/config".
6646 * configure.nat: New file, with contents from the
6647 "gdb/config/*/*.mh" files.
6648
7ed1acaf
TW
66492017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6650
6651 * btrace.c (btrace_clear): Free insn vector.
6652
e13cb306
PA
66532017-05-05 Pedro Alves <palves@redhat.com>
6654
6655 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6656 * configure: Regenerate.
6657
5ed8105e
PA
66582017-05-04 Pedro Alves <palves@redhat.com>
6659
6660 * Makefile.in (SFILES): Add progspace-and-thread.c.
6661 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6662 (COMMON_OBS): Add progspace-and-thread.o.
6663 * breakpoint.c: Include "progspace-and-thread.h".
6664 (update_inserted_breakpoint_locations)
6665 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6666 Use scoped_restore_current_pspace_and_thread.
6667 (create_std_terminate_master_breakpoint): Use
6668 scoped_restore_current_program_space.
6669 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6670 (print_breakpoint_location): Use
6671 scoped_restore_current_program_space.
6672 (bp_loc_is_permanent): Use
6673 scoped_restore_current_pspace_and_thread.
6674 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6675 (download_tracepoint_locations): Use
6676 scoped_restore_current_pspace_and_thread.
6677 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6678 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6679 (enum step_over_calls_kind): Moved from inferior.h.
6680 (class scoped_restore_current_thread): New class.
6681 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6682 declaration.
6683 (scoped_restore_current_thread): New class.
6684 * infcmd.c: Include "common/gdb_optional.h".
6685 (continue_1, proceed_after_attach): Use
6686 scoped_restore_current_thread.
6687 (notice_new_inferior): Use scoped_restore_current_thread.
6688 * inferior.c: Include "progspace-and-thread.h".
6689 (restore_inferior, save_current_inferior): Delete.
6690 (add_inferior_command, clone_inferior_command): Use
6691 scoped_restore_current_pspace_and_thread.
6692 * inferior.h (scoped_restore_current_inferior): New class.
6693 * infrun.c: Include "progspace-and-thread.h" and
6694 "common/gdb_optional.h".
6695 (follow_fork_inferior): Use
6696 scoped_restore_current_pspace_and_thread.
6697 (scoped_restore_exited_inferior): New class.
6698 (handle_vfork_child_exec_or_exit): Use
6699 scoped_restore_exited_inferior,
6700 scoped_restore_current_pspace_and_thread,
6701 scoped_restore_current_thread and scoped_restore.
6702 (fetch_inferior_event): Use scoped_restore_current_thread.
6703 * linespec.c (decode_line_full, decode_line_1): Use
6704 scoped_restore_current_program_space.
6705 * mi/mi-main.c: Include "progspace-and-thread.h".
6706 (exec_continue): Use scoped_restore_current_thread.
6707 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6708 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6709 * proc-service.c (ps_pglobal_lookup): Use
6710 scoped_restore_current_program_space.
6711 * progspace-and-thread.c: New file.
6712 * progspace-and-thread.h: New file.
6713 * progspace.c (release_program_space, clone_program_space): Use
6714 scoped_restore_current_program_space.
6715 (restore_program_space, save_current_program_space)
6716 (save_current_space_and_thread): Delete.
6717 (switch_to_program_space_and_thread): Moved to
6718 progspace-and-thread.c.
6719 * progspace.h (save_current_program_space)
6720 (save_current_space_and_thread): Delete declarations.
6721 (scoped_restore_current_program_space): New class.
6722 * remote.c (remote_btrace_maybe_reopen): Use
6723 scoped_restore_current_thread.
6724 * symtab.c: Include "progspace-and-thread.h".
6725 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6726 * thread.c (print_thread_info_1): Use
6727 scoped_restore_current_thread.
6728 (struct current_thread_cleanup): Delete.
6729 (do_restore_current_thread_cleanup)
6730 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6731 (scoped_restore_current_thread::~scoped_restore_current_thread):
6732 ... this new dtor.
6733 (make_cleanup_restore_current_thread): Rename/convert to ...
6734 (scoped_restore_current_thread::scoped_restore_current_thread):
6735 ... this new ctor.
6736 (thread_apply_all_command): Use scoped_restore_current_thread.
6737 (thread_apply_command): Use scoped_restore_current_thread.
6738 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6739 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6740
f6223dbb
PA
67412017-05-04 Pedro Alves <palves@redhat.com>
6742
6743 * thread.c (make_cleanup_restore_current_thread): Move
6744 find_thread_ptid call before the is_stopped call. Assert that the
6745 thread is found. Replace is_stopped call by checking the thread's
6746 state directly. Remove unnecessary NULL-thread check.
6747
3c3ae77e
PA
67482017-05-04 Pedro Alves <palves@redhat.com>
6749
6750 * corelow.c (thread_section_name): New class.
6751 (get_core_register_section, get_core_siginfo): Use it.
6752
45eba0ab
AA
67532017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6754
6755 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6756 (get_core_register_section): Remove xfree of NULL pointer.
6757
f81fdd35
AH
67582017-05-03 Alan Hayward <alan.hayward@arm.com>
6759
6760 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6761 * regcache.c (regcache::raw_supply_zeroed): New function.
6762 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6763
35837774
SM
67642017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6765
6766 * gdbarch.sh: Remove commented out definition of
6767 TARGET_CHAR_BIT.
6768 * gdbarch.h: Re-generate.
6769
c94fee56
SDJ
67702017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6771
6772 * configure: Regenerate.
6773
d17f7b36
SM
67742017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6775
6776 * solib-target.c (solib_target_relocate_section_addresses):
6777 Remove num_section_bases, num_bases, segment_bases variables.
6778
b560ebd6
SM
67792017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6780
6781 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6782
f2f46dfc
SM
67832017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6784
6785 * solib-target.c: Include <vector>
6786 (struct lm_info_target) <~lm_info_target>: Remove.
6787 <segment_bases, section_bases>: Change type to
6788 std::vector<CORE_ADDR>.
6789 (library_list_start_segment, library_list_start_section,
6790 library_list_end_library,
6791 solib_target_relocate_section_addresses): Adjust.
6792
a0ff9e1a
SM
67932017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6794
6795 * gdbarch.sh (software_single_step): Change return type to
6796 std::vector<CORE_ADDR>.
6797 * gdbarch.c, gdbarch.h: Re-generate.
6798 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6799 Adjust.
6800 (arm_deal_with_atomic_sequence_raw): Adjust.
6801 (thumb_get_next_pcs_raw): Adjust.
6802 (arm_get_next_pcs_raw): Adjust.
6803 (arm_get_next_pcs): Adjust.
6804 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6805 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6806 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6807 (alpha_software_single_step): Adjust.
6808 * alpha-tdep.h (alpha_software_single_step): Adjust.
6809 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6810 * arm-tdep.c (arm_software_single_step): Adjust.
6811 (arm_breakpoint_kind_from_current_state): Adjust.
6812 * arm-tdep.h (arm_software_single_step): Adjust.
6813 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6814 * cris-tdep.c (cris_software_single_step): Adjust.
6815 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6816 (micromips_deal_with_atomic_sequence): Adjust.
6817 (deal_with_atomic_sequence): Adjust.
6818 (mips_software_single_step): Adjust.
6819 * mips-tdep.h (mips_software_single_step): Adjust.
6820 * moxie-tdep.c (moxie_software_single_step): Adjust.
6821 * nios2-tdep.c (nios2_software_single_step): Adjust.
6822 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6823 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6824 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6825 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6826 * sparc-tdep.c (sparc_software_single_step): Adjust.
6827 * spu-tdep.c (spu_software_single_step): Adjust.
6828 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6829
ea480a30
SM
68302017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6831
6832 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6833 * gdbarch.h: Re-generate.
6834
d050f7d7
TW
68352017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6836
6837 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6838 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6839 * python/py-instruction.c, python/py-instruction.h: New file.
6840 * python/py-record.c: Add py-instruction.h include.
6841 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6842 gdb.RecordInstruction.
6843 * python/python-internal.h: Add gdbpy_initialize_instruction
6844 declaration.
6845 * python/python.c (do_start_initialization): Add
6846 gdbpy_initialize_instruction.
6847
14f819c8
TW
68482017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6849
6850 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6851 Remove.
6852 (btrace_func_from_recpy_func): New function.
6853 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6854 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6855 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6856 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6857 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6858 Also, use new helper functions.
6859 (btpy_list_item): Use new helper functions.
6860 (recpy_bt_function_call_history): Use new type name.
6861 (btpy_call_getset): Remove.
6862 (gdbpy_initialize_btrace): Remove code to initialize
6863 gdb.BtraceFunctionCall.
6864 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6865 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6866 recpy_bt_func_prev, recpy_bt_func_next): New export.
6867 * python/py-record.c (recpy_func_type): New static object.
6868 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6869 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6870 recpy_func_next): New function.
6871 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6872 (recpy_func_getset): New static object.
6873 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6874 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6875
0ed5da75
TW
68762017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6877
6878 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6879 (btpy_object, btpy_insn_type, btpy_new): Remove.
6880 (btpy_list_object): Use gdb.RecordInstruction type instead of
6881 gdb.BtraceInstruction type.
6882 (btrace_insn_from_recpy_insn): New function.
6883 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6884 btpy_new.
6885 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6886 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6887 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6888 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6889 instead of btpy_object.
6890 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6891 btpy_insn_data, btpy_insn_decode): Rename to ...
6892 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6893 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6894 recpy_bt_insn_decode): This. Also, use new helper functions.
6895 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6896 recpy_insn_type.
6897 (btpy_insn_getset): Remove.
6898 (gdbpy_initialize_btrace): Remove code to initialize
6899 gdb.BtraceInstruction. Use recpy_element_object.
6900 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6901 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6902 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6903 * python/py-record.c (recpy_insn_type): New static object.
6904 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6905 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6906 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6907 New function.
6908 (recpy_insn_getset): New static object.
6909 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6910 * python/py-record.h (recpy_element_object): New typedef.
6911 (recpy_insn_type, recpy_insn_new): New export.
6912
913aeadd
TW
69132017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6914
6915 * py-record-btrace.c (btpy_insn_new): Removed.
6916 (btpy_insn_or_gap_new): New function.
6917 (btpy_insn_error): Removed.
6918 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6919 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6920 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6921 btpy_insn_or_gap_new instead of btpy_insn_new.
6922 (btpy_insn_getset): Remove btpy_insn_error.
6923 * py-record.c (recpy_gap_type): New static object.
6924 (recpy_gap_object): New typedef.
6925 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6926 recpy_gap_reason_string): New function.
6927 (recpy_gap_getset): New static object.
6928 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6929 * py-record.h (recpy_gap_new): New export.
6930
a3be24ad
TW
69312017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6932
6933 * python/py-record.c (recpy_ptid): Remove.
6934 (recpy_record_getset): Remove recpy_ptid.
6935
ae20e79a
TW
69362017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6937
6938 * btrace.c (btrace_fetch): Set inferior_ptid.
6939 * python/py-record-btrace.c: Add "py-record.h" include.
6940 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6941 recpy_bt_end, recpy_bt_instruction_history,
6942 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6943 in gdb.Record object instead of current ptid.
6944 * python/py-record.c: Include new "py-record.h" file.
6945 (recpy_record_object): Moved to py-record.h.
6946 * python/py-record.h: New file.
6947
8d0050ea
TW
69482017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6949
6950 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6951 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6952 indentation.
6953
3f380b50
JB
69542017-05-01 Joel Brobecker <brobecker@adacore.com>
6955
6956 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6957 the past maintainers section.
6958
07495424
YQ
69592017-04-28 Yao Qi <yao.qi@linaro.org>
6960
6961 * infcmd.c (get_return_value): Use regcache ctor, and remove
6962 cleanup.
6963
deb1fa3e
YQ
69642017-04-28 Yao Qi <yao.qi@linaro.org>
6965 Pedro Alves <palves@redhat.com>
6966
6967 * regcache.c (regcache::regcache): New tag dispatch ctor.
6968 (do_cooked_read): Moved above.
6969 (regcache_dup): Use the tag dispatch ctor..
6970 * regcache.h (regcache): Declare ctor, delete copy ctor and
6971 assignment operator, remove friend regcache_dup.
6972
b421c83c
YQ
69732017-04-28 Yao Qi <yao.qi@linaro.org>
6974
6975 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6976 call method save instead of regcache_cpy.
6977 * regcache.h (struct regcache): Make regcache_dup a friend.
6978
ef79d9a3
YQ
69792017-04-28 Yao Qi <yao.qi@linaro.org>
6980
6981 * regcache.c (struct regcache): Move to regcache.h
6982 (regcache::arch): New method.
6983 (regcache_get_ptid): Update.
6984 (get_regcache_arch): Call arch method.
6985 (get_regcache_aspace): Call method aspace.
6986 (register_buffer): Change it to method.
6987 (regcache_save): Change it to regcache::save.
6988 (regcache_restore): Likewise.
6989 (regcache_cpy_no_passthrough): Remove the declaration.
6990 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6991 (regcache_cpy_no_passthrough): Change it to method
6992 cpy_no_passthrough.
6993 (regcache_register_status): Change it to method
6994 get_register_status.
6995 (regcache_invalidate): Change it to method invalidate.
6996 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6997 (regcache_raw_update): Change it to method raw_update.
6998 (regcache_raw_read): Likewise.
6999 (regcache_raw_read_signed): Likewise.
7000 (regcache_raw_read_unsigned): Likewise.
7001 (regcache_raw_write_signed): Likewise.
7002 (regcache_raw_write_unsigned): Likewise.
7003 (regcache_cooked_read): Likewise.
7004 (regcache_cooked_read_value): Likewise.
7005 (regcache_cooked_read_signed): Likewise.
7006 (regcache_cooked_read_unsigned): Likewise.
7007 (regcache_cooked_write_signed): Likewise.
7008 (regcache_cooked_write_unsigned): Likewise.
7009 (regcache_raw_set_cached_value): Likewise.
7010 (regcache_raw_write): Likewise.
7011 (regcache_cooked_write): Likewise.
7012 (regcache_xfer_part): Likewise.
7013 (regcache_raw_read_part): Likewise.
7014 (regcache_raw_write_part): Likewise.
7015 (regcache_cooked_read_part): Likewise.
7016 (regcache_cooked_write_part): Likewise.
7017 (regcache_raw_supply): Likewise.
7018 (regcache_raw_collect): Likewise.
7019 (regcache_transfer_regset): Likewise.
7020 (regcache_supply_regset): Likewise.
7021 (regcache_collect_regset): Likewise.
7022 (regcache_debug_print_register): Likewise.
7023 (enum regcache_dump_what): Move it to regcache.h.
7024 (regcache_dump): Change it to method dump.
7025 * regcache.h (enum regcache_dump_what): New.
7026 (class regcache): New.
7027 * target.c (target_fetch_registers): Call method
7028 debug_print_register.
7029 (target_store_registers): Likewise.
7030
f8fdb78e
SM
70312017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7032
7033 * windows-nat.c (struct lm_info_windows): Initialize field.
7034 (windows_make_so): Allocate lm_info_windows with new.
7035 (windows_free_so): Free lm_info_windows with delete.
7036
9ccbfd7b
SM
70372017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7038
7039 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7040 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7041 cleanup.
7042 (darwin_free_so): Free lm_info_darwin with delete.
7043
76e75227
SM
70442017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7045
7046 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7047 <l_addr_p>: Change type to bool.
7048 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7049 (svr4_free_so): Free lm_info_svr4 with delete.
7050 (svr4_copy_library_list): Replace memcpy with call to copy
7051 constructor.
7052 (library_list_start_library, svr4_default_sos): Allocate
7053 lm_info_svr4 with new.
7054
51046d9e
SM
70552017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7056
7057 * solib-target.c (struct lm_info_target): Add destructor,
7058 initialize fields.
7059 <name>: Change type to std::string.
7060 (library_list_start_library): Allocate lm_info_target with new.
7061 (solib_target_free_library_list): Free lm_info_target with
7062 delete.
7063 (solib_target_current_sos): Adapt to std::string.
7064 (solib_target_free_so): Free lm_info_target with delete.
7065
4023ae76
SM
70662017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7067
7068 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7069 fields.
7070 (frv_current_sos): Allocate lm_info_frv with new.
7071 (frv_relocate_main_executable): Free lm_info_frv with delete,
7072 allocate with new.
7073 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7074
af43057b
SM
70752017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7076
7077 * solib-frv.c (struct lm_info_frv): Fix indentation.
7078
b0911207
SM
70792017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7080
7081 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7082 map field.
7083 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7084 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7085 and allocate with new.
7086 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7087
6c401f72
SM
70882017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7089
7090 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7091 <filename, member_name>: Change type to std::string.
7092 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7093 (library_list_start_library): Allocate lm_info_aix with new.
7094 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7095 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7096 with copy constructor.
7097
d0e449a1
SM
70982017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7099
7100 * solist.h (struct lm_info): Remove.
7101 (struct lm_info_base): New class.
7102 (struct so_list) <lm_info>: Change type to lm_info_base *.
7103 * nto-tdep.c (struct lm_info): Remove.
7104 (lm_addr): Adjust.
7105 * solib-aix.c (struct lm_info): Rename to ...
7106 (struct lm_info_aix): ... this. Extend lm_info_base.
7107 (lm_info_p): Rename to ...
7108 (lm_info_aix_p): ... this, and adjust.
7109 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7110 solib_aix_parse_libraries, library_list_start_library,
7111 solib_aix_free_library_list, solib_aix_parse_libraries,
7112 solib_aix_get_library_list,
7113 solib_aix_relocate_section_addresses, solib_aix_free_so,
7114 solib_aix_get_section_offsets,
7115 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7116 Adjust.
7117 (struct solib_aix_inferior_data) <library_list>: Adjust.
7118 * solib-darwin.c (struct lm_info): Rename to ...
7119 (struct lm_info_darwin): ... this. Extend lm_info_base.
7120 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7121 * solib-dsbt.c (struct lm_info): Rename to ...
7122 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7123 (struct dsbt_info) <main_executable_lm_info): Adjust.
7124 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7125 dsbt_relocate_section_addresses): Adjust.
7126 * solib-frv.c (struct lm_info): Rename to ...
7127 (struct lm_info_frv): ... this. Extend lm_info_base.
7128 (main_executable_lm_info): Adjust.
7129 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7130 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7131 find_canonical_descriptor_in_load_object,
7132 frv_fdpic_find_canonical_descriptor): Adjust.
7133 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7134 to lm_info_svr4.
7135 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7136 svr4_clear_so, svr4_copy_library_list,
7137 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7138 svr4_current_sos, svr4_fetch_objfile_link_map,
7139 solist_update_incremental): Adjust.
7140 * solib-svr4.h (struct lm_info_svr4): Move here from
7141 solib-svr4.c.
7142 * solib-target.c (struct lm_info): Rename to ...
7143 (struct lm_info_target): ... this. Extend lm_info_base.
7144 (lm_info_p): Rename to ...
7145 (lm_info_target_p): ... this.
7146 (solib_target_parse_libraries, library_list_start_segment,
7147 library_list_start_section, library_list_start_library,
7148 library_list_end_library, solib_target_free_library_list,
7149 solib_target_current_sos, solib_target_free_so,
7150 solib_target_relocate_section_addresses): Adjust.
7151 * windows-nat.c (struct lm_info): Rename to ...
7152 (struct lm_info_windows): ... this. Extend lm_info_base.
7153 (windows_make_so, handle_load_dll, handle_unload_dll,
7154 windows_xfer_shared_libraries): Adjust.
7155
434a4023
SM
71562017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7157
7158 * solib-darwin.c (struct darwin_so_list): Remove.
7159 (darwin_current_sos): Allocate an so_list object instead of a
7160 darwin_so_list, separately allocate an lm_info object.
7161 (darwin_free_so): Free lm_info.
7162
428544e8
JB
71632017-04-28 John Baldwin <jhb@FreeBSD.org>
7164
7165 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7166 with fprintf_filtered.
7167
4621115f
YQ
71682017-04-28 Yao Qi <yao.qi@linaro.org>
7169
7170 * regcache.c (regcache::regcache): New function.
7171 (regcache::~regcache): New function.
7172 (regcache_xmalloc_1): Remove.
7173 (regcache_xmalloc): Call new regcache.
7174 (regcache_xfree): Call delete regcache.
7175 (get_thread_arch_aspace_regcache): Call new regcache.
7176
339053c2
YQ
71772017-04-28 Yao Qi <yao.qi@linaro.org>
7178
7179 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7180 lwp instead of ptid_get_lwp.
7181
7974a605
YQ
71822017-04-28 Yao Qi <yao.qi@linaro.org>
7183
7184 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7185 lwp_info instead of getting from inferior_ptid.
7186
e15c3eb4
KS
71872017-04-27 Keith Seitz <keiths@redhat.com>
7188
7189 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7190 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7191 (CV_CONVERSION_BADNESS): Define.
7192 (rank_one_type): Remove overly restrictive rvalue reference
7193 rank checks.
7194 Add cv-qualifier checks and subranks for type equality.
7195 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7196 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7197 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7198
72bc1d24
SM
71992017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7200
7201 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7202 count when creating the object.
7203
55bcecda
UW
72042017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7205 Ulrich Weigand <uweigand@de.ibm.com>
7206
7207 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7208 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7209 is used in AIX.
7210 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7211 (process_xcoff_symbol): Likewise.
7212 (scan_xcoff_symtab): Likewise.
7213
5c99fcf8
AH
72142017-04-26 Alan Hayward <alan.hayward@arm.com>
7215
7216 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7217 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7218 (ia64_access_reg): Use get_frame_register_unsigned.
7219 (ia64_access_rse_reg): Likewise.
7220 (ia64_libunwind_frame_prev_register): Likewise.
7221
b41c5a85
JW
72222017-04-26 Jiong Wang <jiong.wang@arm.com>
7223
7224 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7225 * gdbarch.c: Regenerated.
7226 * gdbarch.h: Regenerated.
7227 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7228 visibility external.
7229 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7230 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7231 (enum cfa_how_kind): Move to ...
7232 (struct dwarf2_frame_state_reg_info): Likewise.
7233 (struct dwarf2_frame_state): Likewise.
7234 * dwarf2-frame.h: ... here.
7235 (dwarf2_frame_state_alloc_regs): New declaration.
7236 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7237 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7238
c185f580
AH
72392017-04-26 Alan Hayward <alan.hayward@arm.com>
7240
7241 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7242 regcache_raw_read_unsigned.
7243 (xtensa_pseudo_register_write): Likewise.
7244
19c45594
AH
72452017-04-26 Alan Hayward <alan.hayward@arm.com>
7246
7247 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7248 (nds32_pseudo_register_write): Likewise.
7249
4658f12e
YQ
72502017-04-25 Yao Qi <yao.qi@linaro.org>
7251
7252 * regcache.c (struct regcache) <readonly_p>: Change its type
7253 to bool.
7254 (regcache_xmalloc_1): Update parameter type and callers update.
7255
d581dda8
YQ
72562017-04-25 Yao Qi <yao.qi@linaro.org>
7257
7258 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7259 set_gdbarch_wchar_bit.
7260 * arm-tdep.c (arm_gdbarch_init): Likewise.
7261
debed3db
PA
72622017-04-25 Pedro Alves <palves@redhat.com>
7263
7264 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7265 (BothAreRelocatable, memcopy, memmove): Don't define.
7266 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7267 macros.
7268
b0b92aeb
PA
72692017-04-25 Pedro Alves <palves@redhat.com>
7270
7271 * common/common-defs.h: Include "common/poison.h".
7272 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7273 and adjust.
7274 * common/poison.h: New file.
7275 * common/traits.h: Include <type_traits>.
7276 (Not, Or, Requires): New, moved from common/function-view.h.
7277
16c4d54a
PA
72782017-04-25 Pedro Alves <palves@redhat.com>
7279
7280 * breakpoint.h (struct breakpoint): In-class initialize all
7281 fields. Make boolean fields "bool".
7282 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7283 memset call and initializations no longer necessary.
7284
b5c36682
PA
72852017-04-25 Pedro Alves <palves@redhat.com>
7286
7287 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7288 reference.
7289 (pt_btrace_insn): New function.
7290 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7291
5625a286
PA
72922017-04-25 Pedro Alves <palves@redhat.com>
7293
7294 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7295 "base" field and inherit from "bp_location" instead. Add
7296 non-default ctor.
7297 (allocate_location_exception): Use new non-default ctor.
7298 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7299 (init_bp_location): Convert to ...
7300 (bp_location::bp_location): ... this new ctor, and remove memset
7301 call.
7302 (base_breakpoint_allocate_location): Use the new non-default ctor.
7303 * breakpoint.h (bp_location): Now a class. Declare default and
7304 non-default ctors. In-class initialize all members.
7305 (init_bp_location): Remove declaration.
7306
23bcc18f
PA
73072017-04-25 Pedro Alves <palves@redhat.com>
7308
7309 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7310 assignment operator.
7311
e1ba3053
YQ
73122017-04-24 Yao Qi <yao.qi@linaro.org>
7313
7314 * doublest.c (convert_doublest_to_floatformat): Call
7315 floatformat_totalsize_bytes.
7316
10f489e5
TT
73172017-04-22 Tom Tromey <tom@tromey.com>
7318
7319 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7320 ui_out_emit_list.
7321 * stack.c (print_frame): Use ui_out_emit_list.
7322 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7323 ui_out_emit_list.
7324 * mi/mi-main.c (print_one_inferior)
7325 (mi_cmd_data_list_register_names)
7326 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7327 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7328 ui_out_emit_list.
7329 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7330 (mi_output_solib_attribs): Use ui_out_emit_list,
7331 ui_out_emit_tuple.
7332 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7333 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7334 (mi_cmd_stack_list_args, list_args_or_locals): Use
7335 ui_out_emit_list.
7336 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7337 * breakpoint.c (print_solib_event, output_thread_groups): Use
7338 ui_out_emit_list.
7339
0092b74d
TT
73402017-04-22 Tom Tromey <tom@tromey.com>
7341
7342 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7343 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7344 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7345
a14a62dd
TT
73462017-04-22 Tom Tromey <tom@tromey.com>
7347
7348 * tracepoint.c (tvariables_info_1)
7349 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7350
46b9c129
TT
73512017-04-22 Tom Tromey <tom@tromey.com>
7352
7353 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7354 annotate_arg_emitter.
7355 * breakpoint.c (print_mention_watchpoint)
7356 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7357 * annotate.h (struct annotate_arg_emitter): New.
7358
2e783024
TT
73592017-04-22 Tom Tromey <tom@tromey.com>
7360
7361 * record-btrace.c (record_btrace_insn_history)
7362 (record_btrace_insn_history_range, record_btrace_call_history)
7363 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7364 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7365 ui_out_emit_tuple.
7366 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7367 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7368 * skip.c (skip_info): Use ui_out_emit_tuple.
7369 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7370 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7371 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7372 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7373 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7374 ui_out_emit_tuple.
7375 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7376 (output_register, mi_cmd_data_read_memory)
7377 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7378 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7379 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7380 Use ui_out_emit_tuple.
7381 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7382 ui_out_emit_tuple.
7383 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7384 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7385 * linux-thread-db.c (info_auto_load_libthread_db): Use
7386 ui_out_emit_tuple.
7387 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7388 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7389 * disasm.c (do_mixed_source_and_assembly_deprecated)
7390 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7391 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7392 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7393 * breakpoint.c (print_one_breakpoint_location)
7394 (print_one_breakpoint): Use ui_out_emit_tuple.
7395 * auto-load.c (print_script, info_auto_load_cmd): Use
7396 ui_out_emit_tuple.
7397 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7398
9be21bb4
SM
73992017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7400
7401 * thread.c (print_thread_info_1): Remove dead code.
7402
0d4c07af
JK
74032017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7404
7405 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7406 GDB_SELF_TEST.
7407 * arm-tdep.c (selftests::arm_record_test): Likewise.
7408
4daf993d
YQ
74092017-04-21 Yao Qi <yao.qi@linaro.org>
7410
7411 * regcache.c (regcache_restore): Remove argument 2. Replace
7412 argument 3 with regcache. Get register status from
7413 src->register_status and get register contents from
7414 register_buffer (src, regnum).
7415 (regcache_cpy): Update.
7416
a6c21d4a
PA
74172017-04-19 Pedro Alves <palves@redhat.com>
7418
7419 * gdbthread.h (thread): Add missing closing parenthesis in
7420 comment.
7421
3a3fd0fd
PA
74222017-04-19 Pedro Alves <palves@redhat.com>
7423
7424 * common/refcounted-object.h: New file.
7425 * gdbthread.h: Include "common/refcounted-object.h".
7426 (thread_info): Inherit from refcounted_object and add comments.
7427 (thread_info::incref, thread_info::decref)
7428 (thread_info::m_refcount): Delete.
7429 (thread_info::deletable): Use the refcounted_object::refcount()
7430 method.
7431 * inferior.c (current_inferior_): Add comment.
7432 (set_current_inferior): Increment/decrement refcounts.
7433 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7434 not-deletable instead of comparing with the current inferior.
7435 (initialize_inferiors): Increment the initial inferior's refcount.
7436 * inferior.h (struct inferior): Forward declare.
7437 Include "common/refcounted-object.h".
7438 (current_inferior, set_current_inferior): Move declaration to
7439 before struct inferior's definition, and fix comment.
7440 (inferior): Inherit from refcounted_object. Add comments.
7441 * thread.c (switch_to_thread_no_regs): Reference the thread's
7442 inferior pointer directly instead of doing a ptid lookup.
7443 (switch_to_no_thread): New function.
7444 (switch_to_thread(thread_info *)): New function, factored out
7445 from ...
7446 (switch_to_thread(ptid_t)): ... this.
7447 (restore_current_thread): Delete.
7448 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7449 fields, and add 'inf' field.
7450 (do_restore_current_thread_cleanup): Check whether old->inf is
7451 alive instead of looking up an inferior by ptid. Use
7452 switch_to_thread and switch_to_no_thread.
7453 (restore_current_thread_cleanup_dtor): Use old->inf directly
7454 instead of lookup up an inferior by id. Decref the inferior.
7455 Don't restore 'removable'.
7456 (make_cleanup_restore_current_thread): Same the inferior pointer
7457 in old, instead of the inferior number. Incref the inferior.
7458 Don't save/clear 'removable'.
7459
9bcb1f16
PA
74602017-04-19 Pedro Alves <palves@redhat.com>
7461
7462 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7463 unittests/scoped_restore-selftests.c.
7464 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7465 * common/scoped_restore.h (scoped_restore_base): Make "class".
7466 (scoped_restore_base::release): New public method.
7467 (scoped_restore_base::scoped_restore_base): New protected ctor.
7468 (scoped_restore_base::m_saved_var): New protected field.
7469 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7470 scoped_restore_base base class instead of m_saved_var directly.
7471 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7472 (scoped_restore_tmpl::scoped_restore_tmpl(const
7473 scoped_restore_tmpl<T>&)): Likewise.
7474 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7475 method.
7476 (scoped_restore_tmpl::saved_var): New method.
7477 (scoped_restore_tmpl::m_saved_var): Delete.
7478 * inferior.h (inferior::detaching): Now a bool.
7479 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7480 cleanup.
7481 * unittests/scoped_restore-selftests.c: New file.
7482
26fcd539
PA
74832017-04-19 Pedro Alves <palves@redhat.com>
7484
7485 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7486 Re-sort in alphabetic order.
7487
fdd243b0
PA
74882017-04-18 Pedro Alves <palves@redhat.com>
7489
7490 * xml-support.c (obstack_xml_printf): Delete.
7491 * xml-support.h (obstack_xml_printf): Delete.
7492
4895cde2
PA
74932017-04-18 Pedro Alves <palves@redhat.com>
7494
7495 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7496 vdebug, verror, body_text, start_element, end_element, name,
7497 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7498 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7499 is_xinclude>: Make private and add m_ prefix.
7500 (gdb_xml_parser::body_text): New method, based on ...
7501 (gdb_xml_body_text): ... this. Adjust.
7502 (gdb_xml_parser::vdebug): New method, based on ...
7503 (gdb_xml_debug): ... this. Adjust.
7504 (gdb_xml_parser::verror): New method, based on ...
7505 (gdb_xml_error): ... this. Adjust.
7506 (gdb_xml_parser::start_element): New method, based on ...
7507 (gdb_xml_start_element): ... this. Adjust.
7508 (gdb_xml_start_element_wrapper): Defer to
7509 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7510 (gdb_xml_parser::end_element): New method, based on ...
7511 (gdb_xml_end_element_wrapper): ... this. Adjust.
7512 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7513 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7514 (gdb_xml_parser::use_dtd): New method, based on ...
7515 (gdb_xml_use_dtd): ... this. Adjust.
7516 (gdb_xml_parser::parse): New method, based on ...
7517 (gdb_xml_parse): ... this. Adjust.
7518 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7519 (xinclude_start_include): Adjust to call the parser's name method.
7520 (xml_xinclude_default, xml_xinclude_start_doctype)
7521 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7522 method.
7523 (xml_process_xincludes): Adjust to call parser methods.
7524 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7525 declarations.
7526
bd8a901f
PA
75272017-04-18 Pedro Alves <palves@redhat.com>
7528
7529 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7530 gdb::optional<std::string>.
7531 * xml-support.c: Include <string>.
7532 (scope_level::scope_level(scope_level &&))
7533 (scope_level::~scope_level): Delete.
7534 (scope_level::body): Now a std::string.
7535 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7536 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7537 parameter.
7538 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7539 (xinclude_parsing_data::output): Now a std::string reference.
7540 (xinclude_start_include): Adjust.
7541 (xml_xinclude_default): Adjust.
7542 (xml_process_xincludes): Add 'output' parameter, and return bool.
7543 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7544 and return bool.
7545 * xml-tdesc.c: Include <unordered_map> and <string>.
7546 (tdesc_xml_cache): Delete.
7547 (tdesc_xml_cache_s): Delete.
7548 (xml_cache): Now an std::unordered_map.
7549 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7550 (target_fetch_description_xml): Change return type to
7551 gdb::optional<std::string>, and adjust.
7552 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7553 (target_fetch_description_xml): Change return type to
7554 gdb::optional<std::string>.
7555
d35d1958
PA
75562017-04-18 Pedro Alves <palves@redhat.com>
7557
7558 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7559 unittests/optional-selftests.c.
7560 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7561 * unittests/optional-selftests.c: New file.
7562 * unittests/optional/assignment/1.cc: New file.
7563 * unittests/optional/assignment/2.cc: New file.
7564 * unittests/optional/assignment/3.cc: New file.
7565 * unittests/optional/assignment/4.cc: New file.
7566 * unittests/optional/assignment/5.cc: New file.
7567 * unittests/optional/assignment/6.cc: New file.
7568 * unittests/optional/assignment/7.cc: New file.
7569 * unittests/optional/cons/copy.cc: New file.
7570 * unittests/optional/cons/default.cc: New file.
7571 * unittests/optional/cons/move.cc: New file.
7572 * unittests/optional/cons/value.cc: New file.
7573 * unittests/optional/in_place.cc: New file.
7574 * unittests/optional/observers/1.cc: New file.
7575 * unittests/optional/observers/2.cc: New file.
7576
22796e97
PA
75772017-04-18 Pedro Alves <palves@redhat.com>
7578
7579 * common/gdb_optional.h: Include common/traits.h.
7580 (in_place_t): New type.
7581 (in_place): New constexpr variable.
7582 (optional::optional): Remove member initialization of
7583 m_instantiated.
7584 (optional::optional(in_place_t...)): New constructor.
7585 (optional::~optional): Use reset.
7586 (optional::optional(const optional&)): New.
7587 (optional::optional(const optional&&)): New.
7588 (optional::optional(T &)): New.
7589 (optional::optional(T &&)): New.
7590 (operator::operator=(const optional &)): New.
7591 (operator::operator=(optional &&)): New.
7592 (operator::operator= (const T &))
7593 (operator::operator= (T &&))
7594 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7595 (operator::reset): New.
7596 (operator::m_instantiated):: Add in-class initializer.
7597 * common/traits.h: Include <type_traits>.
7598 (struct And): New types.
7599
a7fc9b61
PA
76002017-04-18 Pedro Alves <palves@redhat.com>
7601
7602 * xml-support.c: Include <vector>.
7603 (scope_level::scope_level(const gdb_xml_element *))
7604 (scope_level::scope_level(scope_level&&)): New.
7605 (scope_level::~scope_level): New.
7606 (scope_level_s): Delete.
7607 (gdb_xml_parser::scopes): Now a std::vector.
7608 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7609 Use std::vector.
7610 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7611 scope cleanup code.
7612 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7613 of the scopes member. Use std::vector::emplace_back.
7614
010151c9
PA
76152017-04-18 Pedro Alves <palves@redhat.com>
7616
7617 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7618 a bool.
7619 (gdb_xml_end_element): Change type of first parameter.
7620 (gdb_xml_cleanup): Rename to ...
7621 (gdb_xml_parser::~gdb_xml_parser): ... this.
7622 (gdb_xml_create_parser_and_cleanup): Delete with ...
7623 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7624 to this new ctor.
7625 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7626 using gdb_xml_create_parser_and_cleanup.
7627 (xinclude_parsing_data): Add ctor/dtor.
7628 (xml_xinclude_cleanup): Delete.
7629 (xml_process_xincludes): Create a local xinclude_parsing_data
7630 instead of heap-allocating one. Create a local gdb_xml_parser
7631 instead of heap-allocating one with
7632 gdb_xml_create_parser_and_cleanup.
7633
d56060f0
JB
76342017-04-18 John Baldwin <jhb@FreeBSD.org>
7635
7636 PR threads/20743
7637 * fbsd-nat.c (resume_one_thread_cb): Remove.
7638 (resume_all_threads_cb): Remove.
7639 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7640 iterate_over_threads.
7641
305d16a9
JB
76422017-04-17 Joel Brobecker <brobecker@adacore.com>
7643
7644 * NEWS: Create a new section for the next release branch.
7645 Rename the section of the current branch, now that it has
7646 been cut.
7647
8bb57231
JB
76482017-04-17 Joel Brobecker <brobecker@adacore.com>
7649
7650 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7651 * version.in: Bump version to 8.0.50.DATE-git.
7652
096c92dd
SDJ
76532017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7654
7655 PR gdb/21385
7656 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7657 independently of the host, and fix build breakage on Cygwin.
7658
0550c955
PA
76592017-04-13 Pedro Alves <palves@redhat.com>
7660
7661 * inferior.c (free_inferior): Convert to ...
7662 (inferior::~inferior): ... this dtor.
7663 (inferior::inferior): New ctor, factored out from ...
7664 (add_inferior_silent): ... here. Allocate the inferior with a new
7665 expression.
7666 (delete_inferior): Call delete instead of free_inferior.
7667 * inferior.h (gdb_environ, continuation): Forward declare.
7668 (inferior): Now a class. Add in-class initialization to all
7669 members. Make boolean fields bool, except 'detaching'.
7670 (inferior::inferior): New explicit ctor.
7671 (inferior::~inferior): New.
7672
e3d60dfc
PA
76732017-04-13 Pedro Alves <palves@redhat.com>
7674
7675 * inferior.c (init_inferior_list): Delete.
7676 * inferior.h (init_inferior_list): Delete.
7677
5fd69d0a
PA
76782017-04-13 Pedro Alves <palves@redhat.com>
7679
7680 PR threads/13217
7681 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7682 (top level): Call it twice, with different thread sets.
7683
c6609450
PA
76842017-04-13 Pedro Alves <palves@redhat.com>
7685
7686 * thread.c: Include <algorithm>.
7687 (thread_array_cleanup): Delete.
7688 (scoped_inc_dec_ref): New class.
7689 (live_threads_count): New function.
7690 (set_thread_refcount): Delete.
7691 (tp_array_compar_ascending): Now a bool.
7692 (tp_array_compar): Convert to a std::sort comparison function.
7693 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7694 and live_threads_count.
7695
2a00d7ce
PA
76962017-04-13 Pedro Alves <palves@redhat.com>
7697
7698 * infrun.c (follow_fork_inferior): Also switch the current
7699 inferior.
7700
441d7c93
PA
77012017-04-13 Pedro Alves <palves@redhat.com>
7702
7703 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7704 before calling create_internal_breakpoint.
7705
808480f6
PA
77062017-04-13 Pedro Alves <palves@redhat.com>
7707
7708 * fork-child.c (execv_argv): New class.
7709 (breakup_args): Refactored as ...
7710 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7711 Copy arguments to storage and replace separators with NULL
7712 terminators in place.
7713 (escape_bang_in_quoted_argument): Adjust to return bool.
7714 (execv_argv::execv_argv): New ctor.
7715 (execv_argv::init_for_shell): New method, factored out from
7716 fork_inferior. Don't strdup strings into the vector.
7717 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7718 Remove free_vector_argv call.
7719
ad3d022a
YQ
77202017-04-13 Yao Qi <yao.qi@linaro.org>
7721
7722 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7723 tdep->rx_psw_type.
7724
e6ddc3bf
YQ
77252017-04-13 Yao Qi <yao.qi@linaro.org>
7726
7727 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7728 * rx-tdep.c (rx_gdbarch_init): Likewise.
7729
bfb8cf90
PA
77302017-04-13 Pedro Alves <palves@redhat.com>
7731
7732 * breakpoint.h (struct breakpoint): Reindent.
7733
f5336ca5
PA
77342017-04-13 Pedro Alves <palves@redhat.com>
7735
7736 * breakpoint.c (bp_location): Rename to ...
7737 (bp_locations): ... this. All references updated.
7738 (bp_location_count): Rename to ...
7739 (bp_locations_count): ... this. All references updated.
7740 (bp_location_placed_address_before_address_max): Rename to ...
7741 (bp_locations_placed_address_before_address_max): ... this. All
7742 references updated.
7743 (bp_location_shadow_len_after_address_max): Rename to ...
7744 (bp_locations_shadow_len_after_address_max): ... this. All
7745 references updated.
7746 (bp_location_compare_addrs): Rename to ...
7747 (bp_locations_compare_addrs): ... this. All references updated.
7748 (bp_location_compare):Rename to ...
7749 (bp_locations_compare): ... this. All references updated.
7750 (bp_location_target_extensions_update): Rename to ...
7751 (bp_locations_target_extensions_update): ... this. All references
7752 updated.
7753
be628ab8
SDJ
77542017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7755
7756 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7757 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7758 'sgtty.h'.
7759 * common/gdb_termios.h: New file, with parts of "terminal.h".
7760 * inflow.c: Include "gdb_termios.h".
7761 * ser-unix.c: Include "gdb_termios.h".
7762 * terminal.h: Move terminal-related defines to
7763 "common/gdb_termios.h".
7764
8e9e35b1
TT
77652017-04-12 Tom Tromey <tom@tromey.com>
7766
7767 * probe.c (parse_probes): Update.
7768 * location.h (delete_event_location): Don't declare.
7769 (event_location_deleter::operator()): Update.
7770 * location.c (event_location_deleter::operator()): Rename from
7771 delete_event_location.
7772 * linespec.h (linespec_result) <location>: Change type to
7773 event_location_up.
7774 * linespec.c (canonicalize_linespec, event_location_to_sals)
7775 (decode_objc): Update.
7776 (linespec_result): Don't call delete_event_location.
7777 * breakpoint.c (create_breakpoints_sal)
7778 (bkpt_probe_create_sals_from_location)
7779 (strace_marker_create_sals_from_location): Update.
7780
16e802b9
TT
77812017-04-12 Tom Tromey <tom@tromey.com>
7782
7783 * linespec.h (struct linespec_result): Add constructor and
7784 destructor.
7785 (init_linespec_result, destroy_linespec_result)
7786 (make_cleanup_destroy_linespec_result): Don't declare.
7787 * linespec.c (init_linespec_result): Remove.
7788 (linespec_result::~linespec_result): Rename from
7789 destroy_linespec_result. Update.
7790 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7791 Remove.
7792 * breakpoint.c (create_breakpoint, break_range_command)
7793 (decode_location_default): Update.
7794 * ax-gdb.c (agent_command_1): Update.
7795
d28cd78a
TT
77962017-04-12 Tom Tromey <tom@tromey.com>
7797
7798 * remote.c (remote_download_tracepoint): Update.
7799 * python/py-breakpoint.c (bppy_get_location): Update.
7800 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7801 (gdbscm_breakpoint_location): Update.
7802 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7803 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7804 Change type to event_location_up.
7805 * breakpoint.c (create_overlay_event_breakpoint)
7806 (create_longjmp_master_breakpoint)
7807 (create_std_terminate_master_breakpoint)
7808 (create_exception_master_breakpoint)
7809 (breakpoint_event_location_empty_p, print_breakpoint_location)
7810 (print_one_breakpoint_location, create_thread_event_breakpoint)
7811 (init_breakpoint_sal, create_breakpoint)
7812 (print_recreate_ranged_breakpoint, break_range_command)
7813 (init_ada_exception_breakpoint, say_where): Update.
7814 (base_breakpoint_dtor): Don't call delete_event_location.
7815 (bkpt_print_recreate, tracepoint_print_recreate)
7816 (dprintf_print_recreate, update_static_tracepoint)
7817 (breakpoint_re_set_default): Update.
7818
711799d5
TT
78192017-04-12 Tom Tromey <tom@tromey.com>
7820
7821 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7822 type of "to_do". Update.
7823 (compute_stack_depth): Use std::vector.
7824
52d214d3
TT
78252017-04-12 Tom Tromey <tom@tromey.com>
7826
7827 * printcmd.c (find_instruction_backward): Use std::vector.
7828
4c404b8b
TT
78292017-04-12 Tom Tromey <tom@tromey.com>
7830
7831 * symfile.c (objfilep): Remove typedef.
7832 (reread_symbols): Use a std::vector.
7833
156d9eab
TT
78342017-04-12 Tom Tromey <tom@tromey.com>
7835
7836 * mi/mi-main.c (exec_direction_forward): Remove.
7837 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7838 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7839 scoped_restore.
7840 * guile/guile.c (guile_repl_command, guile_command)
7841 (gdbscm_execute_gdb_command): Use scoped_restore.
7842 * go-exp.y (go_parse): Use scoped_restore.
7843 * d-exp.y (d_parse): Use scoped_restore.
7844 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7845 * c-exp.y (c_parse): Use scoped_restore.
7846
4d89769a
TT
78472017-04-12 Tom Tromey <tom@tromey.com>
7848
7849 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7850 (mi_parse): Update return type.
7851 (mi_parse_free): Remove.
7852 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7853 (mi_parse::~mi_parse): Rename from mi_parse_free.
7854 (mi_parse_cleanup): Remove.
7855 (mi_parse): Return a unique_ptr. Use new.
7856 * mi/mi-main.c (mi_execute_command): Update.
7857
4b217cc7
TT
78582017-04-12 Tom Tromey <tom@tromey.com>
7859
7860 * location.c (explicit_location_lex_one): Return a
7861 unique_xmalloc_ptr.
7862 (string_to_explicit_location): Update. Remove cleanups.
7863
59d3651b
TT
78642017-04-12 Tom Tromey <tom@tromey.com>
7865
7866 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7867 (compare_value_and_voffset): Change type. Update.
7868 (compute_vtable_size): Change type of "offset_vec".
7869 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7870 (gnuv3_get_typeid): Remove extraneous declaration.
7871
b24b0d6c
TT
78722017-04-12 Tom Tromey <tom@tromey.com>
7873
7874 * charset.h (wchar_iterator): Fix comment.
7875
80a3b8c5
TT
78762017-04-12 Tom Tromey <tom@tromey.com>
7877
7878 * charset.c (iconv_wrapper): New class.
7879 (cleanup_iconv): Remove.
7880 (convert_between_encodings): Use it.
7881
c83dd867
TT
78822017-04-12 Tom Tromey <tom@tromey.com>
7883
7884 * symfile.h (increment_reading_symtab): Update type.
7885 * symfile.c (decrement_reading_symtab): Remove.
7886 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7887 * psymtab.c (psymtab_to_symtab): Update.
7888 * dwarf2read.c (dw2_instantiate_symtab): Update.
7889
0e8621a0
TT
78902017-04-12 Tom Tromey <tom@tromey.com>
7891
7892 * jit.c (struct jit_reader): Declare separately. Add constructor
7893 and destructor. Change type of "handle".
7894 (loaded_jit_reader): Define separately.
7895 (jit_reader_load): Update. New "new".
7896 (jit_reader_unload_command): Use "delete".
7897 * gdb-dlfcn.h (struct dlclose_deleter): New.
7898 (gdb_dlhandle_up): New typedef.
7899 (gdb_dlopen, gdb_dlsym): Update types.
7900 (gdb_dlclose): Remove.
7901 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7902 (gdb_dlsym): Change type of "handle".
7903 (make_cleanup_dlclose): Remove.
7904 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7905 * compile/compile-c-support.c (load_libcc): Update.
7906
67d89901
TT
79072017-04-12 Tom Tromey <tom@tromey.com>
7908
7909 * symtab.h (find_pcs_for_symtab_line): Change return type.
7910 * symtab.c (find_pcs_for_symtab_line): Change return type.
7911 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7912 type of "vec". Update.
7913 (ltpy_get_pcs_for_line): Update.
7914 * linespec.c (decode_digits_ordinary): Update.
7915
93921405
TT
79162017-04-12 Tom Tromey <tom@tromey.com>
7917
7918 * tracepoint.c (actions_command): Update.
7919 * python/python.c (python_command, python_interactive_command):
7920 Update.
7921 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7922 * guile/guile.c (guile_command): Update.
7923 * defs.h (read_command_lines, read_command_lines_1): Return
7924 command_line_up.
7925 (command_lines_deleter): New struct.
7926 (command_line_up): New typedef.
7927 * compile/compile.c (compile_code_command)
7928 (compile_print_command): Update.
7929 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7930 command_line_up.
7931 (make_cleanup_free_command_lines): Remove.
7932 * cli/cli-script.c (get_command_line, read_command_lines_1)
7933 (copy_command_lines): Return command_line_up.
7934 (while_command, if_command, read_command_lines, define_command)
7935 (document_command): Update.
7936 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7937 Remove.
7938 * breakpoint.h (breakpoint_set_commands): Change type of
7939 "commands".
7940 * breakpoint.c (breakpoint_set_commands): Change type of
7941 "commands". Update.
7942 (do_map_commands_command, update_dprintf_command_list)
7943 (create_tracepoint_from_upload): Update.
7944
ffc2605c
TT
79452017-04-12 Tom Tromey <tom@tromey.com>
7946
7947 * tracepoint.c (scope_info): Update.
7948 * spu-tdep.c (spu_catch_start): Update.
7949 * python/python.c (gdbpy_decode_line): Update.
7950 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7951 * python/py-breakpoint.c (bppy_init): Update.
7952 * probe.c (parse_probes): Update.
7953 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7954 * location.h (event_location_deleter): New struct.
7955 (event_location_up): New typedef.
7956 (new_linespec_location, new_address_location, new_probe_location)
7957 (new_explicit_location, copy_event_location)
7958 (string_to_event_location, string_to_event_location_basic)
7959 (string_to_explicit_location): Update return type.
7960 (make_cleanup_delete_event_location): Remove.
7961 * location.c (new_linespec_location, new_address_location)
7962 (new_probe_location, new_explicit_location, copy_event_location):
7963 Return event_location_up.
7964 (delete_event_location_cleanup)
7965 (make_cleanup_delete_event_location): Remove.
7966 (string_to_explicit_location, string_to_event_location_basic)
7967 (string_to_event_location): Return event_location_up.
7968 * linespec.c (canonicalize_linespec, event_location_to_sals)
7969 (decode_line_with_current_source)
7970 (decode_line_with_last_displayed, decode_objc): Update.
7971 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7972 * completer.c (location_completer): Update.
7973 * cli/cli-cmds.c (edit_command, list_command): Update.
7974 * breakpoint.c (create_overlay_event_breakpoint)
7975 (create_longjmp_master_breakpoint)
7976 (create_std_terminate_master_breakpoint)
7977 (create_exception_master_breakpoint)
7978 (create_thread_event_breakpoint): Update.
7979 (init_breakpoint_sal): Update. Remove some dead code.
7980 (create_breakpoint_sal): Change type of "location". Update.
7981 (create_breakpoints_sal, create_breakpoint, break_command_1)
7982 (dprintf_command, break_range_command, until_break_command)
7983 (init_ada_exception_breakpoint)
7984 (strace_marker_create_sals_from_location)
7985 (update_static_tracepoint, trace_command, ftrace_command)
7986 (strace_command, create_tracepoint_from_upload): Update.
7987 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7988 * ax-gdb.c (agent_command_1): Update.
7989
8f10c932
PA
79902017-04-12 Pedro Alves <palves@redhat.com>
7991
7992 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7993 * configure.tgt: Handle i[34567]86-*-go32* and
7994 i[34567]86-*-msdosdjgpp*.
7995 * i386-tdep.c (i386_svr4_reg_to_regnum):
7996 Make extern.
7997 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7998 i386-go32-tdep.c.
7999 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8000 * i386-go32-tdep.c: New file.
8001 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8002 declarations.
8003
0a31ccfb
SM
80042017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8005
8006 * aix-thread.c (pd_status2str): Change return type to const char *.
8007
e9bb3fbb
PA
80082017-04-12 Pedro Alves <palves@redhat.com>
8009
8010 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8011 calls to set_gdbarch_gnu_triplet_regexp.
8012
53375380
PA
80132017-04-12 Pedro Alves <palves@redhat.com>
8014
8015 PR gdb/21323
8016 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8017 New enum value.
8018 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8019 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8020 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8021 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8022 * gdbarch.h, gdbarch.c: Regenerate.
8023 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8024 gdbarch_wchar_bit and gdbarch_wchar_signed.
8025 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8026 * arm-tdep.c (arm_gdbarch_init): Likewise.
8027 * avr-tdep.c (avr_gdbarch_init): Likewise.
8028 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8029 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8030 * i386-tdep.c (i386_go32_init_abi): Likewise.
8031 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8032 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8033 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8034 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8035 * sh-tdep.c (sh_gdbarch_init): Likewise.
8036 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8037 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8038 * windows-tdep.c (windows_init_abi): Likewise.
8039 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8040
53e710ac
PA
80412017-04-12 Pedro Alves <palves@redhat.com>
8042
8043 PR c++/21323
8044 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8045 cplus_primitive_type_char32_t>: New enum values.
8046 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8047 and cplus_primitive_type_char32_t.
8048 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8049 32, use the archtecture's built-in type for char16_t and char32_t,
8050 respectively. Otherwise, fallback to init_integer_type as before,
8051 but make the type unsigned, and issue a complaint.
8052 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8053
ab0538b8
AH
80542017-04-12 Alan Hayward <alan.hayward@arm.com>
8055
5e0e0422 8056 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
8057 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8058
5430098f
SDJ
80592017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8060
8061 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8062 'const char *'.
8063
7c5ded6a
SDJ
80642017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8065
8066 * common/common-utils.c (free_vector_argv): New function.
8067 * common/common-utils.h: Include <vector>.
8068 (free_vector_argv): New prototype.
8069 * darwin-nat.c (darwin_create_inferior): Rewrite function
8070 prototype in order to constify "exec_file" and accept a
8071 "std::string" for "allargs".
8072 * fork-child.c: Include <vector>.
8073 (breakup_args): Rewrite function, using C++.
8074 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8075 and accept "std::string" for "allargs". Update the code to
8076 calculate "argv" based on "allargs". Update calls to "exec_fun"
8077 and "execvp".
8078 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8079 order to constify "exec_file" and accept a "std::string" for
8080 "allargs".
8081 * go32-nat.c (go32_create_inferior): Likewise.
8082 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8083 * infcmd.c (run_command_1): Constify "exec_file". Use
8084 "std::string" for inferior arguments.
8085 * inferior.h (fork_inferior): Update prototype.
8086 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8087 prototype in order to constify "exec_file" and accept a
8088 "std::string" for "allargs".
8089 * nto-procfs.c (procfs_create_inferior): Likewise.
8090 * procfs.c (procfs_create_inferior): Likewise.
8091 * remote-sim.c (gdbsim_create_inferior): Likewise.
8092 * remote.c (extended_remote_run): Update code to accept
8093 "std::string" as argument.
8094 (extended_remote_create_inferior): Rewrite function prototype in
8095 order to constify "exec_file" and accept a "std::string" for
8096 "allargs".
8097 * rs6000-nat.c (super_create_inferior): Likewise.
8098 (rs6000_create_inferior): Likewise.
8099 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8100 * windows-nat.c (windows_create_inferior): Likewise.
8101
ae0eee42
PA
81022017-04-11 Pedro Alves <palves@redhat.com>
8103
8104 * thread.c: Fix whitespace throughout.
8105
a6acac06
PR
81062017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8107
8108 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8109
64403bd1
AH
81102017-04-11 Alan Hayward <alan.hayward@arm.com>
8111
8112 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8113
a5bef50f
SDJ
81142017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8115
8116 PR gdb/21364
8117 * osdata.c (info_osdata): Check if 'type' is an empty string
8118 instead of NULL.
8119
9295a5a9
PA
81202017-04-10 Pedro Alves <palves@redhat.com>
8121
8122 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8123 (ptid_to_global_thread_id, in_thread_list)
8124 (do_captured_list_thread_ids, set_resumed, set_running)
8125 (set_executing, set_stop_requested, finish_thread_state)
8126 (validate_registers_access, can_access_registers_ptid)
8127 (print_thread_info_1, switch_to_thread)
8128 (do_restore_current_thread_cleanup)
8129 (make_cleanup_restore_current_thread, thread_command)
8130 (thread_name_command): Use operator== instead of ptid_equal.
8131
996812e3
PA
81322017-04-10 Pedro Alves <palves@redhat.com>
8133
8134 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8135 (current_thread_cleanup_chain): Delete.
8136 (restore_current_thread_cleanup_dtor)
8137 (make_cleanup_restore_current_thread): Remove references to
8138 current_thread_cleanup_chain.
8139
845b344f
AH
81402017-04-10 Alan Hayward <alan.hayward@arm.com>
8141
8142 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8143 REG_UNKNOWN.
8144
803bdfe4
YQ
81452017-04-10 Yao Qi <yao.qi@linaro.org>
8146
8147 PR gdb/19942
8148 * gdbthread.h (thread_info::deletable): New method.
8149 (thread_info::incref): New method.
8150 (thread_info::decref): New method.
8151 (thread_info::refcount): Move it to private.
8152 * infrun.c (save_stop_context): Call inc_refcount.
8153 (release_stop_context_cleanup): Likewise.
8154 * thread.c (set_thread_exited): New function.
8155 (init_thread_list): Delete "tp" only it is deletable, otherwise
8156 call set_thread_exited.
8157 (delete_thread_1): Call set_thread_exited.
8158 (current_thread_cleanup) <inferior_pid>: Remove.
8159 <thread>: New field.
8160 (restore_current_thread_ptid_changed): Removed.
8161 (do_restore_current_thread_cleanup): Adjust.
8162 (restore_current_thread_cleanup_dtor): Don't call
8163 find_thread_ptid.
8164 (set_thread_refcount): Use dec_refcount.
8165 (make_cleanup_restore_current_thread): Adjust.
8166 (thread_apply_all_command): Call inc_refcount.
8167 (_initialize_thread): Don't call
8168 observer_attach_thread_ptid_changed.
8169
8c25b497
YQ
81702017-04-10 Yao Qi <yao.qi@linaro.org>
8171
8172 * thread.c (delete_thread_1): Hoist code on marking thread as
8173 exited.
8174
8473b447
SM
81752017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8176
8177 * windows-nat.c (windows_detach): Initialize ptid with
8178 minus_one_ptid.
8179
6670ec13
SM
81802017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8181
8182 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8183
ba2f91bb
AH
81842017-04-07 Alan Hayward <alan.hayward@arm.com>
8185
8186 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8187 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8188 (bfin_pseudo_register_write): Likewise
8189
436252de
SM
81902017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8191
8192 * common/ptid.h (struct ptid): Change to...
8193 (class ptid_t): ... this.
8194 <ptid_t>: New constructors.
8195 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8196 matches>: New methods.
8197 <make_null, make_minus_one>: New static methods.
8198 <pid>: Rename to...
8199 <m_pid>: ...this.
8200 <lwp>: Rename to...
8201 <m_lwp>: ...this.
8202 <tid>: Rename to...
8203 <m_tid>: ...this.
8204 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8205 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8206 as references, move comment to class ptid_t.
8207 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8208 ptid_t static methods.
8209 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8210 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8211 Take ptid arguments as references, implement using ptid_t methods.
8212 * unittests/ptid-selftests.c: New file.
8213 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8214 unittests/ptid-selftests.c.
8215 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8216
0dedf377
TP
82172017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8218
8219 * python/python.c (python_run_simple_file): Cast mode literal to
8220 non-const char pointer as expected by PyFile_FromString.
8221
4e9868d4
SM
82222017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8223
8224 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8225 minus_one_ptid and null_ptid.
8226
9bf2a700
PA
82272017-04-05 Pedro Alves <palves@redhat.com>
8228
8229 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8230 * configure: Regenerate.
8231
a121b7c1
PA
82322017-04-05 Pedro Alves <palves@redhat.com>
8233
8234 * ada-exp.y (yyerror): Constify.
8235 * ada-lang.c (bound_name, get_selections)
8236 (ada_variant_discrim_type)
8237 (ada_variant_discrim_name, ada_value_struct_elt)
8238 (ada_lookup_struct_elt_type, is_unchecked_variant)
8239 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8240 (catch_ada_exception_command_split)
8241 (catch_ada_assert_command_split, catch_assert_command)
8242 (ada_op_name): Constify.
8243 * ada-lang.h (ada_yyerror, get_selections)
8244 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8245 * arc-tdep.c (arc_print_frame_cache): Constify.
8246 * arm-tdep.c (arm_skip_stub): Constify.
8247 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8248 (gen_aggregate_elt_ref): Constify.
8249 * bcache.c (print_bcache_statistics): Constify.
8250 * bcache.h (print_bcache_statistics): Constify.
8251 * break-catch-throw.c (catch_exception_command_1):
8252 * breakpoint.c (struct ep_type_description::description):
8253 Constify.
8254 (add_solib_catchpoint): Constify.
8255 (catch_fork_command_1): Add cast.
8256 (add_catch_command): Constify.
8257 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8258 Constify.
8259 * bsd-uthread.c (bsd_uthread_state): Constify.
8260 * buildsym.c (patch_subfile_names): Constify.
8261 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8262 Constify.
8263 * c-exp.y (yyerror): Constify.
8264 (token::oper): Constify.
8265 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8266 * c-varobj.c (cplus_describe_child): Constify.
8267 * charset.c (find_charset_names): Add cast.
8268 (find_charset_names): Constify array and add const_cast.
8269 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8270 (edit_command): Constify.
8271 * cli/cli-decode.c (lookup_cmd): Constify.
8272 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8273 Constify.
8274 (struct dump_context): Constify.
8275 (add_dump_command, restore_command): Constify.
8276 * cli/cli-script.c (get_command_line): Constify.
8277 * cli/cli-script.h (get_command_line): Constify.
8278 * cli/cli-utils.c (check_for_argument): Constify.
8279 * cli/cli-utils.h (check_for_argument): Constify.
8280 * coff-pe-read.c (struct read_pe_section_data): Constify.
8281 * command.h (lookup_cmd): Constify.
8282 * common/print-utils.c (decimal2str): Constify.
8283 * completer.c (gdb_print_filename): Constify.
8284 * corefile.c (set_gnutarget): Constify.
8285 * cp-name-parser.y (yyerror): Constify.
8286 * cp-valprint.c (cp_print_class_member): Constify.
8287 * cris-tdep.c (cris_register_name, crisv32_register_name):
8288 Constify.
8289 * d-exp.y (yyerror): Constify.
8290 (struct token::oper): Constify.
8291 * d-lang.h (d_yyerror): Constify.
8292 * dbxread.c (struct header_file_location::name): Constify.
8293 (add_old_header_file, add_new_header_file, last_function_name)
8294 (dbx_next_symbol_text, add_bincl_to_list)
8295 (find_corresponding_bincl_psymtab, set_namestring)
8296 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8297 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8298 * defs.h (command_line_input, print_address_symbolic)
8299 (deprecated_readline_begin_hook): Constify.
8300 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8301 Constify.
8302 * event-top.c (handle_line_of_input): Constify and add cast.
8303 * exceptions.c (catch_errors): Constify.
8304 * exceptions.h (catch_errors): Constify.
8305 * expprint.c (print_subexp_standard, op_string, op_name)
8306 (op_name_standard, dump_raw_expression, dump_raw_expression):
8307 * expression.h (op_name, op_string, dump_raw_expression):
8308 Constify.
8309 * f-exp.y (yyerror): Constify.
8310 (struct token::oper): Constify.
8311 (struct f77_boolean_val::name): Constify.
8312 * f-lang.c (f_word_break_characters): Constify.
8313 * f-lang.h (f_yyerror): Constify.
8314 * fork-child.c (fork_inferior): Add cast.
8315 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8316 (new_variant): Constify.
8317 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8318 * gdbarch.c: Regenerate.
8319 * gdbcore.h (set_gnutarget): Constify.
8320 * go-exp.y (yyerror): Constify.
8321 (token::oper): Constify.
8322 * go-lang.h (go_yyerror): Constify.
8323 * go32-nat.c (go32_sysinfo): Constify.
8324 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8325 * guile/scm-cmd.c (cmdscm_function): Constify.
8326 * guile/scm-param.c (pascm_param_value): Constify.
8327 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8328 (h8300sx_register_name): Constify.
8329 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8330 Constify.
8331 * ia64-tdep.c (ia64_register_names): Constify.
8332 * infcmd.c (construct_inferior_arguments): Constify.
8333 (path_command, attach_post_wait): Constify.
8334 * language.c (show_range_command, show_case_command)
8335 (unk_lang_error): Constify.
8336 * language.h (language_defn::la_error)
8337 (language_defn::la_name_of_this): Constify.
8338 * linespec.c (decode_line_2): Constify.
8339 * linux-thread-db.c (thread_db_err_str): Constify.
8340 * lm32-tdep.c (lm32_register_name): Constify.
8341 * m2-exp.y (yyerror): Constify.
8342 * m2-lang.h (m2_yyerror): Constify.
8343 * m32r-tdep.c (m32r_register_names): Constify and make static.
8344 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8345 * m88k-tdep.c (m88k_register_name): Constify.
8346 * macroexp.c (appendmem): Constify.
8347 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8348 (upgrade_type, parse_external, parse_partial_symbols)
8349 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8350 (new_symbol): Constify.
8351 * memattr.c (mem_info_command): Constify.
8352 * mep-tdep.c (register_name_from_keyword): Constify.
8353 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8354 Constify.
8355 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8356 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8357 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8358 cast.
8359 (mi_execute_async_cli_command): Constify.
8360 * mips-tdep.c (mips_register_name): Constify.
8361 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8362 (am33_register_name, am33_2_register_name)
8363 * moxie-tdep.c (moxie_register_names): Constify.
8364 * nat/linux-osdata.c (osdata_type): Constify fields.
8365 * nto-tdep.c (nto_parse_redirection): Constify.
8366 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8367 (lookup_child_selector): Constify.
8368 (objc_methcall::name): Constify.
8369 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8370 (lookup_struct_typedef): Constify.
8371 * objfiles.c (pc_in_section): Constify.
8372 * objfiles.h (pc_in_section): Constify.
8373 * p-exp.y (struct token::oper): Constify.
8374 (yyerror): Constify.
8375 * p-lang.h (pascal_yyerror): Constify.
8376 * parser-defs.h (op_name_standard): Constify.
8377 (op_print::string): Constify.
8378 (exp_descriptor::op_name): Constify.
8379 * printcmd.c (print_address_symbolic): Constify.
8380 * psymtab.c (print_partial_symbols): Constify.
8381 * python/py-breakpoint.c (stop_func): Constify.
8382 (bppy_get_expression): Constify.
8383 * python/py-cmd.c (cmdpy_completer::name): Constify.
8384 (cmdpy_function): Constify.
8385 * python/py-event.c (evpy_add_attribute)
8386 (gdbpy_initialize_event_generic): Constify.
8387 * python/py-event.h (evpy_add_attribute)
8388 (gdbpy_initialize_event_generic): Constify.
8389 * python/py-evts.c (add_new_registry): Constify.
8390 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8391 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8392 * python/py-inferior.c (get_buffer): Add cast.
8393 * python/py-param.c (parm_constant::name): Constify.
8394 * python/py-unwind.c (fprint_frame_id): Constify.
8395 * python/python.c (gdbpy_parameter_value): Constify.
8396 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8397 * remote.c (memory_packet_config::name): Constify.
8398 (show_packet_config_cmd, remote_write_bytes)
8399 (remote_buffer_add_string):
8400 * reverse.c (exec_reverse_once): Constify.
8401 * rs6000-tdep.c (variant::name, variant::description): Constify.
8402 * rust-exp.y (rustyyerror): Constify.
8403 * rust-lang.c (rust_op_name): Constify.
8404 * rust-lang.h (rustyyerror): Constify.
8405 * serial.h (serial_ops::name): Constify.
8406 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8407 (sh_sh3e_register_name, sh_sh2e_register_name)
8408 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8409 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8410 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8411 (sh_sh4al_dsp_register_name): Constify.
8412 * sh64-tdep.c (sh64_register_name): Constify.
8413 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8414 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8415 * stabsread.c (patch_block_stabs, read_type_number)
8416 (ref_map::stabs, ref_add, process_reference)
8417 (symbol_reference_defined, define_symbol, define_symbol)
8418 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8419 (read_one_struct_field, read_struct_fields, read_baseclasses)
8420 (read_tilde_fields, read_struct_type, read_array_type)
8421 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8422 (read_huge_number, read_range_type, read_args, common_block_start)
8423 (find_name_end): Constify.
8424 * stabsread.h (common_block_start, define_symbol)
8425 (process_one_symbol, symbol_reference_defined, ref_add):
8426 * symfile.c (get_section_index, add_symbol_file_command):
8427 * symfile.h (get_section_index): Constify.
8428 * target-descriptions.c (tdesc_type::name): Constify.
8429 (tdesc_free_type): Add cast.
8430 * target.c (find_default_run_target):
8431 (add_deprecated_target_alias, find_default_run_target)
8432 (target_announce_detach): Constify.
8433 (do_option): Constify.
8434 * target.h (add_deprecated_target_alias): Constify.
8435 * thread.c (print_thread_info_1): Constify.
8436 * top.c (deprecated_readline_begin_hook, command_line_input):
8437 Constify.
8438 (init_main): Add casts.
8439 * top.h (handle_line_of_input): Constify.
8440 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8441 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8442 (tfind_command): Rename to ...
8443 (tfind_command_1): ... this and constify.
8444 (tfind_command): New function.
8445 (tfind_end_command, tfind_start_command): Adjust.
8446 (encode_source_string): Constify.
8447 * tracepoint.h (encode_source_string): Constify.
8448 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8449 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8450 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8451 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8452 * tui/tui-win.c (parse_scrolling_args): Constify.
8453 * tui/tui-windata.c (tui_erase_data_content): Constify.
8454 * tui/tui-windata.h (tui_erase_data_content): Constify.
8455 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8456 * tui/tui.c (tui_enable): Add cast.
8457 * utils.c (defaulted_query): Constify.
8458 (init_page_info): Add cast.
8459 (puts_debug, subset_compare): Constify.
8460 * utils.h (subset_compare): Constify.
8461 * varobj.c (varobj_format_string): Constify.
8462 * varobj.h (varobj_format_string): Constify.
8463 * vax-tdep.c (vax_register_name): Constify.
8464 * windows-nat.c (windows_detach): Constify.
8465 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8466 * xml-support.c (gdb_xml_end_element): Constify.
8467 * xml-tdesc.c (tdesc_start_reg): Constify.
8468 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8469 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8470 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8471
995816ba
PA
84722017-04-05 Pedro Alves <palves@redhat.com>
8473
8474 * proc-api.c (struct trans): Constify.
8475 (procfs_note): Constify.
8476 * proc-events.c (struct trans, syscall_table):
8477 * proc-flags.c (struct trans): Constify.
8478 * proc-utils.h (procfs_note): Constify.
8479 * proc-why.c (struct trans): Constify.
8480 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8481 (procfs_detach): Constify.
8482 * sol-thread.c (struct string_map): Constify.
8483 (td_err_string, td_state_string): Constify.
8484
3e83a920
PA
84852017-04-05 Pedro Alves <palves@redhat.com>
8486
8487 * proc-api.c (procfs_filename): Don't initialize
8488 procfs_filename.
8489 (prepare_to_trace): Assume procfs_filename is non-NULL.
8490 (_initialize_proc_api): Give procfs_filename a default value here.
8491
63160a43
PA
84922017-04-05 Pedro Alves <palves@redhat.com>
8493
8494 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8495 'cond_string' parameter.
8496 (extract_exception_regexp): Constify 'string' parameter.
8497 (catch_exception_command_1): Constify.
8498 * breakpoint.c (init_catchpoint)
8499 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8500 parameter.
8501 (ep_parse_optional_if_clause, catch_fork_command_1)
8502 (catch_exec_command_1): Constify.
8503 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8504 parameter.
8505 (ep_parse_optional_if_clause): Constify.
8506 * cli/cli-utils.c (remove_trailing_whitespace)
8507 (check_for_argument): Constify.
8508 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8509 non-const overload.
8510 (check_for_argument): Likewise.
8511
9b2eba3d
PA
85122017-04-05 Pedro Alves <palves@redhat.com>
8513
8514 * event-top.c (command_line_handler): Add cast to execute_command
8515 call.
8516 * record-btrace.c (cmd_record_btrace_bts_start)
8517 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8518 (cmd_record_btrace_start): Add cast to execute_command call.
8519 * record-full.c (record_full_goto_insn):
8520 * record.c (record_start, record_stop): Add cast to
8521 execute_command_to_string calls.
8522 (cmd_record_start): Add cast to execute_command calls.
8523
2adadf51
PA
85242017-04-05 Pedro Alves <palves@redhat.com>
8525
8526 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8527 static inline function.
8528 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8529 array and use gdb_PyArg_ParseTupleAndKeywords.
8530 * python/py-cmd.c (cmdpy_init): Likewise.
8531 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8532 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8533 (infpy_search_memory): Likewise.
8534 * python/py-objfile.c (objfpy_add_separate_debug_file)
8535 (gdbpy_lookup_objfile): Likewise.
8536 * python/py-symbol.c (gdbpy_lookup_symbol)
8537 (gdbpy_lookup_global_symbol): Likewise.
8538 * python/py-type.c (gdbpy_lookup_type): Likewise.
8539 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8540 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8541 Likewise.
8542
0d1f4ceb
PA
85432017-04-05 Pedro Alves <palves@redhat.com>
8544
8545 * python/python-internal.h (gdb_PyGetSetDef): New type.
8546 * python/py-block.c (block_object_getset)
8547 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8548 * python/py-event.c (event_object_getset)
8549 (finish_breakpoint_object_getset): Likewise.
8550 * python/py-inferior.c (inferior_object_getset): Likewise.
8551 * python/py-infthread.c (thread_object_getset): Likewise.
8552 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8553 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8554 * python/py-objfile.c (objfile_getset): Likewise.
8555 * python/py-progspace.c (pspace_getset): Likewise.
8556 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8557 Likewise.
8558 * python/py-record.c (recpy_record_getset): Likewise.
8559 * python/py-symbol.c (symbol_object_getset): Likewise.
8560 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8561 Likewise.
8562 * python/py-type.c (type_object_getset, field_object_getset):
8563 Likewise.
8564 * python/py-value.c (value_object_getset): Likewise.
8565
4d759979
PA
85662017-04-05 Pedro Alves <palves@redhat.com>
8567
8568 * python/python-internal.h (gdb_PyObject_CallMethod)
8569 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8570 New functions.
8571 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8572 (PySys_GetObject, PySys_SetPath): New macros.
8573
fdf9e36f
PA
85742017-04-05 Pedro Alves <palves@redhat.com>
8575
8576 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8577 info_osdata_command.
8578 * osdata.c (info_osdata_command): Rename to ...
8579 (info_osdata): ... this. Constify 'type' parameter, and remove
8580 the 'from_tty' parameter. Accept NULL TYPE.
8581 (info_osdata_command): New function.
8582 * osdata.h (info_osdata_command): Remove declaration.
8583 (info_osdata): New declaration.
8584
9f33b8b7
PA
85852017-04-05 Pedro Alves <palves@redhat.com>
8586
8587 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8588 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8589 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8590 parameter.
8591 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8592 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8593 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8594 parameter.
8595 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8596 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8597 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8598 (mi_cmd_file_list_exec_source_files)
8599 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8600 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8601 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8602 parameter.
8603 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8604 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8605 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8606 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8607 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8608 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8609 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8610 'command' parameter.
8611 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8612 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8613 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8614 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8615 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8616 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8617 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8618 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8619 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8620 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8621 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8622 parameter.
8623 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8624 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8625 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8626 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8627 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8628 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8629 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8630 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8631 (mi_cmd_data_list_changed_registers)
8632 (mi_cmd_data_write_register_values)
8633 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8634 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8635 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8636 (mi_cmd_list_features, mi_cmd_list_target_features)
8637 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8638 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8639 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8640 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8641 (mi_cmd_trace_frame_collected): Constify 'command'
8642 parameter.
8643 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8644 'command' parameter.
8645
67cb5b2d
PA
86462017-04-05 Pedro Alves <palves@redhat.com>
8647
8648 * ada-lang.c (ada_completer_word_break_characters): Now a const
8649 array.
8650 (ada_get_gdb_completer_word_break_characters): Constify.
8651 * completer.c (gdb_completer_command_word_break_characters)
8652 (gdb_completer_file_name_break_characters)
8653 (gdb_completer_quote_characters): Now const arrays.
8654 (get_gdb_completer_quote_characters): Constify.
8655 (set_rl_completer_word_break_characters): New function.
8656 (set_gdb_completion_word_break_characters)
8657 (complete_line_internal): Use it.
8658 * completer.h (get_gdb_completer_quote_characters): Constify.
8659 (set_rl_completer_word_break_characters): Declare.
8660 * f-lang.c (f_word_break_characters): Constify.
8661 * language.c (default_word_break_characters): Constify.
8662 * language.h (language_defn::la_word_break_characters): Constify.
8663 (default_word_break_characters): Constify.
8664 * top.c (init_main): Use set_rl_completer_word_break_characters.
8665
7a114964
PA
86662017-04-05 Pedro Alves <palves@redhat.com>
8667
8668 * aix-thread.c (aix_thread_pid_to_str)
8669 (aix_thread_extra_thread_info): Constify.
8670 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8671 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8672 (bsd_uthread_pid_to_str): Constify.
8673 * corelow.c (core_pid_to_str): Constify.
8674 * darwin-nat.c (darwin_pid_to_str): Constify.
8675 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8676 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8677 Constify.
8678 * gnu-nat.c (gnu_pid_to_str): Constify.
8679 * go32-nat.c (go32_pid_to_str): Constify.
8680 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8681 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8682 * inferior.c (inferior_pid_to_str): Constify.
8683 * linux-nat.c (linux_nat_pid_to_str): Constify.
8684 * linux-tdep.c (linux_core_pid_to_str): Constify.
8685 * linux-thread-db.c (thread_db_pid_to_str)
8686 (thread_db_extra_thread_info): Constify.
8687 * nto-tdep.c (nto_extra_thread_info): Constify.
8688 * nto-tdep.h (nto_extra_thread_info): Constify.
8689 * obsd-nat.c (obsd_pid_to_str): Constify.
8690 * procfs.c (procfs_pid_to_str): Constify.
8691 * ravenscar-thread.c (ravenscar_extra_thread_info)
8692 (ravenscar_pid_to_str): Constify.
8693 * remote-sim.c (gdbsim_pid_to_str): Constify.
8694 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8695 Constify.
8696 * sol-thread.c (solaris_pid_to_str): Constify.
8697 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8698 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8699 * target.c (default_pid_to_str, target_pid_to_str)
8700 (normal_pid_to_str, default_pid_to_str): Constify.
8701 * target.h (target_ops::to_pid_to_str)
8702 (target_ops::to_extra_thread_info): Constify.
8703 (target_pid_to_str, normal_pid_to_str): Constify.
8704 * windows-nat.c (windows_pid_to_str): Constify.
8705 * gdbarch.sh (core_pid_to_str): Constify.
8706 * target-delegates.c: Regenerate.
8707 * gdbarch.h, gdbarch.c: Regenerate.
8708
69bbf465
PA
87092017-04-05 Pedro Alves <palves@redhat.com>
8710
8711 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8712 the memory of the temporary warning_pre_print override.
8713 * utils.c (warning_pre_print): Constify.
8714 * utils.h (warning_pre_print): Constify.
8715
be47f9e8
PA
87162017-04-05 Pedro Alves <palves@redhat.com>
8717
8718 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8719 (shell_command): New function.
8720 (make_command): Use std::string.
8721 (init_cli_cmds): Register shell_command instead of shell_escape.
8722
bde6261a
PA
87232017-04-05 Pedro Alves <palves@redhat.com>
8724
8725 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8726 * tracepoint.c (default_collect): Don't initialize.
8727
b38ef47f
PA
87282017-04-05 Pedro Alves <palves@redhat.com>
8729
8730 * macroexp.c (macro_buffer::shared): Now a bool.
8731 (init_buffer): Update.
8732 (init_shared_buffer): Constify 'addr' parameter.
8733 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8734 casts.
8735
f995bbe8
PA
87362017-04-05 Pedro Alves <palves@redhat.com>
8737
8738 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8739 * disasm.c (set_disassembler_options): Constify local.
8740 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8741
4a596fe2
SDJ
87422017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8743
8744 PR gdb/21352
8745 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8746 option.
8747
2cad08ea
YQ
87482017-04-05 Yao Qi <yao.qi@linaro.org>
8749
8750 * frame.c (frame_unwind_register_unsigned): Call
8751 frame_unwind_register_value.
8752
55a98976
YQ
87532017-04-05 Yao Qi <yao.qi@linaro.org>
8754
8755 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8756 Use gdb_test_multiple, and don't match anchor.
8757
4ac40124
PA
87582017-04-05 Pedro Alves <palves@redhat.com>
8759
8760 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8761 (Write After Approval): Remove Simon Marchi.
8762
c053b654
PA
87632017-04-05 Pedro Alves <palves@redhat.com>
8764
8765 * common/gdb_optional.h (optional::optional): Make constexpr and
8766 initialize m_dummy.
8767
4c7bf4f9
JB
87682017-04-04 John Baldwin <jhb@FreeBSD.org>
8769
8770 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8771 (amd64fbsd_jmp_buf_reg_offset): Remove.
8772 (amd64fbsd_supply_uthread): Remove function.
8773 (amd64fbsd_collect_uthread): Remove function.
8774 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8775 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8776 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8777 (fbsd-nat.c): Update comment.
8778 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8779 (i386fbsd_jmp_buf_reg_offset): Remove.
8780 (i386fbsd_supply_uthread): Remove function.
8781 (i386fbsd_collect_uthread): Remove function.
8782 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8783
1e1a8bef
JB
87842017-04-04 John Baldwin <jhb@FreeBSD.org>
8785
8786 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8787 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8788 * NEWS: Mention that support for FreeBSD/alpha was removed.
8789 * alpha-fbsd-tdep.c: Delete file.
8790 * config/alpha/fbsd.mh: Delete file.
8791 * configure.host: Delete alpha*-*-freebsd* and
8792 alpha*-*-kfreebsd*-gnu.
8793 * configure.tgt: Delete alpha*-*-freebsd* and
8794 alpha*-*-kfreebsd*-gnu.
8795
49907934
JB
87962017-04-04 John Baldwin <jhb@FreeBSD.org>
8797
8798 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8799 amd64bsd_store_inferior_registers): Use ptid from regcache.
8800
6f77053d
PA
88012017-04-04 Pedro Alves <palves@redhat.com>
8802
8803 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8804 data fields, make them private and add "m_" prefixes.
8805 (lnp_state_machine::lnp_state_machine): New ctor.
8806 (record_line, check_line_address, handle_set_discriminator)
8807 (handle_set_address, handle_advance_pc, handle_special_opcode)
8808 (handle_advance_line, handle_set_file, handle_negate_stmt)
8809 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8810 (end_sequence, advance_line): New methods.
8811 (m_gdbarch, m_record_lines_p): New fields.
8812 (lnp_reader_state): Delete.
8813 (dwarf_record_line): Rename to ...
8814 (lnp_state_machine::record_line): ... adjust.
8815 (init_lnp_state_machine): Delete.
8816 (lnp_state_machine::lnp_state_machine): New.
8817 (check_line_address): Rename to ...
8818 (lnp_state_machine::check_line_address): This.
8819 (dwarf_decode_lines_1): Remove reference to "reader_state".
8820 Adjust lnp_state_machine having a non-default ctor. Use bool.
8821 State machine internal state manipulation moved to
8822 lnp_state_machine methods.
8823
9c541725
PA
88242017-04-04 Pedro Alves <palves@redhat.com>
8825
8826 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8827 unittests/offset-type-selftests.c.
8828 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8829 * common/offset-type.h: New file.
8830 * common/preprocessor.h: New file.
8831 * common/traits.h: New file.
8832 * common/valid-expr.h: New file.
8833 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8834 sect_offset and cu_offset strong typedefs throughout.
8835 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8836 typedefs throughout.
8837 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8838 sect_offset and cu_offset strong typedefs throughout.
8839 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8840 typedefs throughout.
8841 * gdbtypes.h: Include "common/offset-type.h".
8842 (cu_offset): Now an offset type (strong typedef) instead of a
8843 struct.
8844 (sect_offset): Likewise.
8845 (union call_site_parameter_u): Rename "param_offset" field to
8846 "param_cu_off".
8847 * unittests/offset-type-selftests.c: New file.
8848
ecfb656c
PA
88492017-04-04 Pedro Alves <palves@redhat.com>
8850
8851 * common/underlying.h: New file.
8852 * dwarf2read.c: Include "common/gdb_optional.h" and
8853 "common/underlying.h".
8854 (dir_index, file_name_index): New types.
8855 (file_entry): Use them.
8856 (file_entry::include): Use to_underlying.
8857 (line_header::add_file_name): Use dir_index.
8858 (read_formatted_entries): Use gdb::optional. Read form before
8859 writting to file_entry.
8860 (dwarf_decode_line_header): Use dir_index.
8861 (lnp_state_machine::current_file): Use to_underlying.
8862 (lnp_state_machine::file): Change type to file_name_index.
8863 (dwarf_record_line): Use to_underlying.
8864 (init_lnp_state_machine): Use file_name_index.
8865 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8866
d194f1fe
PA
88672017-04-04 Pedro Alves <palves@redhat.com>
8868
8869 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8870 operator bool, has_value and get methods.
8871
fff8551c
PA
88722017-04-04 Pedro Alves <palves@redhat.com>
8873
8874 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8875 fields.
8876 (line_header): Initialize all data fields. Change type of
8877 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8878 Change type of include_dirs to std::vector<const char *>. Remove
8879 num_include_dirs, include_dirs_size. Change type of file_names to
8880 std::vector<file_entry>. Remove num_file_names, file_names_size.
8881 (line_header::line_header): New.
8882 (line_header::add_include_dir, line_header::add_file_name): New
8883 methods.
8884 (line_header::include_dir_at): Remove NULL check.
8885 (line_header::file_name_at): Add const overload.
8886 (line_header_up): New unique_ptr typedef.
8887 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8888 std::vector. Remove free_line_header call.
8889 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8890 free_line_header call.
8891 (free_cu_line_header): Delete.
8892 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8893 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8894 Adjust to use std::vector.
8895 (free_line_header): Delete.
8896 (free_line_header_voidp): Use delete.
8897 (add_include_dir): Replace with ...
8898 (line_header::add_include_dir): ... this method. Use std::vector.
8899 (add_file_name): Replace with ...
8900 (line_header::add_file_name): ... this method. Use std::vector.
8901 (add_include_dir_stub): Delete.
8902 (read_formatted_entries): Remove memset.
8903 (dwarf_decode_line_header): Return a line_header_up instead of a
8904 raw pointer. Remove cleanup handling. Pass lambdas to
8905 read_formatted_entries. Adjust to use line_header methods.
8906 (dwarf_decode_lines_1): Adjust to use line_header methods.
8907 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8908 use std::vector.
8909
d62a8ae2
SM
89102017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8911
8912 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8913 instead of struct ptid.
8914
db3a1dc7
AH
89152017-05-04 Alan Hayward <alan.hayward@arm.com>
8916
8917 * frame.c (get_frame_register_bytes): Unwind using value.
8918 (put_frame_register_bytes): Likewise.
8919
b1b45502
IB
89202017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8921
8922 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8923 aggregate-like.
8924
ec13808e
JK
89252017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8926
8927 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8928
12316564
YQ
89292017-03-29 Yao Qi <yao.qi@linaro.org>
8930
8931 * gdbthread.h (struct thread_info): Declare constructor and
8932 destructor. Add some in-class member initializers.
8933 * thread.c (free_thread): Remove.
8934 (init_thread_list): Call delete instead of free_thread.
8935 (new_thread): Call thread_info constructor.
8936 (thread_info::thread_info): New function.
8937 (thread_info::~thread_info): New function.
8938 (delete_thread_1): Call delete instead of free_thread.
8939 (make_cleanup_restore_current_thread): Move tp and frame to
8940 inner block.
8941
fe5f7374
AK
89422017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8943
8944 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8945 (arc_skip_prologue): Likewise.
8946 (arc_make_frame_cache): Likewise.
8947 (arc_pv_get_operand): New function.
8948 (arc_is_in_prologue): Likewise.
8949 (arc_analyze_prologue): Likewise.
8950 (arc_print_frame_cache): Likewise.
8951 (MAX_PROLOGUE_LENGTH): New constant.
8952
eea78757
AK
89532017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8954
8955 * configure.tgt: Add arc-insn.o.
8956 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8957 (dump_arc_instruction_command): New function.
8958 (arc_fprintf_disasm): Likewise.
8959 (arc_disassemble_info): Likewise.
8960 (arc_insn_get_operand_value): Likewise.
8961 (arc_insn_get_operand_value_signed): Likewise.
8962 (arc_insn_get_memory_base_reg): Likewise.
8963 (arc_insn_get_memory_offset): Likewise.
8964 (arc_insn_get_branch_target): Likewise.
8965 (arc_insn_dump): Likewise.
8966 (arc_insn_get_linear_next_pc): Likewise.
8967 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8968 (arc_disassemble_info): Likewise.
8969 (arc_insn_get_branch_target): Likewise.
8970 (arc_insn_get_linear_next_pc): Likewise.
8971 * NEWS: Mention new "maint print arc arc-instruction".
8972
3be78afd
AK
89732017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8974
8975 * arc-tdep (maintenance_print_arc_list): New variable.
8976 (maintenance_print_arc_command): New function.
8977
296ec4fa
AK
89782017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8979
8980 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8981 Add "limm" and "reserved".
8982 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8983 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8984 * arc-tdep.h (arc_regnum): Likewise.
8985
f74f865e
MF
89862017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8987
8988 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8989 for THREADPTR register.
8990 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8991 register.
8992 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8993 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8994 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8995
0d0bf81a
MF
89962017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8997
8998 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8999 registers above gdbarch_num_regs (gdbarch) as privileged in
9000 call0 ABI.
9001
0ce4291e
MF
90022017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9003
9004 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9005 for a single specified register or for all registers in
9006 a0_base..a0_base + C0_NREGS range.
9007 (supply_gregset_reg): Call regcache_raw_supply for a single
9008 specified register or for all registers in a0_base..a0_base +
9009 C0_NREGS range.
9010
c56054f9
MF
90112017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9012
9013 * arch/xtensa.h (C0_NREGS): Add definition.
9014 * xtensa-tdep.c (C0_NREGS): Remove definition.
9015
a4398628
MF
90162017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9017
9018 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9019 Drop xtensa_default_isa initialization.
9020 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9021
8c43009f
PA
90222017-03-27 Pedro Alves <palves@redhat.com>
9023
9024 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9025 (file_entry::include_dir): New method.
9026 (line_header::include_dir_at, line_header::file_name_at): New
9027 methods.
9028 (setup_type_unit_groups, setup_type_unit_groups)
9029 (psymtab_include_file_name): Simplify using the new methods.
9030 (lnp_state_machine) <the_line_header>: New field.
9031 <file>: Add comment.
9032 (lnp_state_machine::current_file): New method.
9033 (dwarf_record_line): Simplify using the new methods.
9034 (init_lnp_state_machine): Initialize the "the_line_header" field.
9035 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9036 Simplify using the new methods.
9037
a7e80b9e
PA
90382017-03-27 Pedro Alves <palves@redhat.com>
9039
9040 * cp-name-parser.y (make_empty): Delete.
9041 (demangler_special, nested_name, ptr_operator, array_indicator)
9042 (direct_declarator, declarator_1): Use fill_comp instead of
9043 make_empty.
9044
21047726
PA
90452017-03-27 Pedro Alves <palves@redhat.com>
9046
9047 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9048 to ATTRIBUTE_PRINTF.
9049 * solib-target.c (library_list_start_list): Print "string" not
9050 "version".
9051 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9052 gdb_xml_error call.
9053
d721ba37
PA
90542017-03-27 Pedro Alves <palves@redhat.com>
9055
9056 * dwarf2read.c (struct file_and_directory): New.
9057 (dwarf2_get_dwz_file): Adjust to use std::string.
9058 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9059 (find_file_and_directory): Adjust to return a file_and_directory
9060 object.
9061 (read_file_scope): Adjust to use file_and_directory. Remove
9062 make_cleanup/do_cleanups calls.
9063 (open_and_init_dwp_file): Adjust to use std::string. Remove
9064 make_cleanup/do_cleanups calls.
9065 * python/python.c (do_start_initialization): Adjust to ldirname
9066 returning a std::string.
9067 * utils.c (ldirname): Now returns a std::string.
9068 * utils.h (ldirname): Change return type to std::string.
9069 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9070 returning a std::string.
9071 * xml-tdesc.c (file_read_description_xml): Likewise.
9072
ed771251
AH
90732017-03-24 Alan Hayward <alan.hayward@arm.com>
9074
9075 * regcache.c (regcache_debug_print_register): New function.
9076 * regcache.h (regcache_debug_print_register): New declaration.
9077 * target.c (debug_print_register): Remove.
9078 (target_fetch_registers): Call regcache_debug_print_register.
9079 (target_store_registers): Likewise.
9080
568c1b9f
PB
90812017-03-24 Pádraig Brady <pbrady@fb.com>
9082
9083 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9084 reference beyond the 'lh->include_dirs' array before accessing to
9085 it.
9086 (psymtab_include_file_name): Likewise.
9087 (dwarf_decode_lines_1): Likewise.
9088 (dwarf_decode_lines): Likewise.
9089 (file_file_name): Likewise.
9090
3e00d44f
SM
90912017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9092
9093 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9094 inferior_ptid.
9095 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9096 ps_lsetfpregs): Likewise.
9097 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9098 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9099 ps_lsetfpregs): Likewise.
9100 * target.c (target_fetch_registers, target_store_registers):
9101 Remove asserts.
9102
077ae656
AH
91032017-03-23 Alan Hayward <alan.hayward@arm.com>
9104
9105 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9106
1e2b521d
YQ
91072017-03-23 Yao Qi <yao.qi@linaro.org>
9108
9109 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9110 (_initialize_aarch64_tdep): Register it.
9111 (aarch64_record_load_store): Handle PRFM instruction.
9112 (aarch64_process_record_test): New function.
9113
33877125
YQ
91142017-03-23 Yao Qi <yao.qi@linaro.org>
9115
9116 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9117 indentation.
9118
a0eef940
YQ
91192017-03-23 Yao Qi <yao.qi@linaro.org>
9120
9121 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9122
3f2a3564
PR
91232017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9124
9125 python/python.c (do_start_initialization): Fix memory leak.
9126
b67aeab0
SM
91272017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9128
9129 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9130 using get_ptrace_pid.
9131 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9132 inferior_ptid.
9133 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9134 inferior_ptid instead of pid.
9135
ffdbe864
YQ
91362017-03-22 Yao Qi <yao.qi@linaro.org>
9137
9138 * aarch64-tdep.c: Wrap locally used classes in anonymous
9139 namespace.
9140 * arm-tdep.c: Likewise.
9141 * linespec.c: Likewise.
9142 * ui-out.c: Likewise.
9143
9d736fbf
JG
91442017-03-22 Jonah Graham <jonah@kichwacoders.com>
9145
9146 PR gdb/19637
9147 * python/lib/gdb/printer/bound_registers.py: Import sys.
9148
3de88e9a
SM
91492017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9150
9151 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9152 windows_thread_info parameter and use it instead of
9153 current_thread.
9154 (windows_fetch_inferior_registers): Don't set current_thread,
9155 pass the thread to do_windows_fetch_inferior_registers. Use
9156 ptid from regcache instead of inferior_ptid.
9157 (do_windows_store_inferior_registers): Add windows_thread_info
9158 parameter and use it instead of current_thread.
9159 (windows_store_inferior_registers): Don't set current_thread,
9160 pass the thread to do_windows_store_inferior_registers. Use
9161 ptid from regcache instead of inferior_ptid.
9162
0e7b8f61
SM
91632017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9164
9165 * ser-mingw.c (ser_windows_raw): Remove reference to
9166 struct serial::current_timeout.
9167
5badf10a
IR
91682017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9169
9170 PR tdep/20928
9171 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9172 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9173 (sparc64_fsr_type): Fix %fsr decoding.
9174
cee59b3f
TW
91752017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9176
9177 * python/py-record-btrace.c (btpy_insn_data): Change return type
9178 for Python 2.
9179
639a9038
SM
91802017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9181
9182 * spu-linux-nat.c (spu_fetch_inferior_registers,
9183 spu_store_inferior_registers): Use ptid from regcache, set and
9184 restore inferior_ptid.
9185 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9186 Likewise.
9187
bcc0c096
SM
91882017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9189
9190 * i386-linux-nat.c (fetch_register, store_register,
9191 i386_linux_fetch_inferior_registers,
9192 i386_linux_store_inferior_registers): Use ptid from regcache.
9193 * ia64-linux-nat.c (ia64_linux_fetch_register,
9194 ia64_linux_store_register): Likewise.
9195 * inf-ptrace.c (inf_ptrace_fetch_register,
9196 inf_ptrace_store_register): Likewise.
9197 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9198 m32r_linux_store_inferior_registers): Likewise.
9199 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9200 m68kbsd_store_inferior_registers): Likewise.
9201 * m68k-linux-nat.c (fetch_register, store_register,
9202 m68k_linux_fetch_inferior_registers,
9203 m68k_linux_store_inferior_registers): Likewise.
9204 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9205 m88kbsd_store_inferior_registers): Likewise.
9206 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9207 mips_fbsd_store_inferior_registers): Likewise.
9208 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9209 mips64_linux_regsets_store_registers): Likewise.
9210 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9211 mipsnbsd_store_inferior_registers): Likewise.
9212 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9213 mips64obsd_store_inferior_registers): Likewise.
9214 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9215 Likewise.
9216 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9217 ppcfbsd_store_inferior_registers): Likewise.
9218 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9219 ppc_linux_store_inferior_registers): Likewise.
9220 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9221 ppcnbsd_store_inferior_registers): Likewise.
9222 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9223 ppcobsd_store_registers): Likewise.
9224 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9225 Likewise.
9226 * ravenscar-thread.c (ravenscar_fetch_registers,
9227 ravenscar_store_registers, ravenscar_prepare_to_store):
9228 Likewise.
9229 * record-btrace.c (record_btrace_fetch_registers,
9230 record_btrace_store_registers, record_btrace_prepare_to_store):
9231 Likewise.
9232 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9233 Lookup inferior using ptid from regcache, instead of
9234 current_inferior.
9235 * remote.c (remote_fetch_registers, remote_store_registers): Use
9236 ptid from regcache.
9237 * rs6000-nat.c (fetch_register, store_register): Likewise.
9238 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9239 s390_linux_store_inferior_registers): Likewise.
9240 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9241 shnbsd_store_inferior_registers): Likewise.
9242 * sol-thread.c (sol_thread_fetch_registers,
9243 sol_thread_store_registers): Likewise.
9244 * sparc-nat.c (sparc_fetch_inferior_registers,
9245 sparc_store_inferior_registers): Likewise.
9246 * tilegx-linux-nat.c (fetch_inferior_registers,
9247 store_inferior_registers): Likewise.
9248 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9249 vaxbsd_store_inferior_registers): Likewise.
9250 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9251 store_xtregs): Likewise.
9252
c0f55cc6
AV
92532017-03-20 Artemiy Volkov <artemiyv@acm.org>
9254
9255 PR gdb/14441
9256 * NEWS: Mention support for rvalue references in GDB and python.
9257 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9258 supports both lvalue and rvalue references.
9259
15c0a2a9
AV
92602017-03-20 Artemiy Volkov <artemiyv@acm.org>
9261
9262 PR gdb/14441
9263 * gdbtypes.c (rank_one_type): Implement overloading
9264 resolution rules regarding rvalue references.
9265
aa006118
AV
92662017-03-20 Artemiy Volkov <artemiyv@acm.org>
9267
9268 PR gdb/14441
9269 * aarch64-tdep.c (aarch64_type_align)
9270 (aarch64_extract_return_value, aarch64_store_return_value): Change
9271 lvalue reference type checks to general reference type checks.
9272 * amd64-tdep.c (amd64_classify): Likewise.
9273 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9274 Likewise.
9275 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9276 (arm_store_return_value): Likewise.
9277 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9278 * c-typeprint.c (c_print_type): Likewise.
9279 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9280 (cplus_number_of_children, cplus_describe_child): Likewise.
9281 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9282 * completer.c (expression_completer): Likewise.
9283 * cp-support.c (make_symbol_overload_list_adl_namespace):
9284 Likewise.
9285 * darwin-nat-info.c (info_mach_region_command): Likewise.
9286 * dwarf2loc.c (entry_data_value_coerce_ref)
9287 (value_of_dwarf_reg_entry): Likewise.
9288 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9289 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9290 Likewise.
9291 * findvar.c (extract_typed_address, store_typed_address):
9292 Likewise.
9293 * gdbtypes.c (rank_one_type): Likewise.
9294 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9295 * infcall.c (value_arg_coerce): Likewise.
9296 * language.c (pointer_type): Likewise.
9297 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9298 Likewise.
9299 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9300 * mn10300-tdep.c (mn10300_type_align): Likewise.
9301 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9302 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9303 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9304 Likewise.
9305 * printcmd.c (print_formatted, x_command): Likewise.
9306 * python/py-type.c (typy_get_composite, typy_template_argument):
9307 Likewise.
9308 * python/py-value.c (valpy_referenced_value)
9309 (valpy_get_dynamic_type, value_has_field): Likewise.
9310 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9311 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9312 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9313 * spu-tdep.c (spu_scalar_value_p): Likewise.
9314 * symtab.c (lookup_symbol_aux): Likewise.
9315 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9316 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9317 Likewise.
9318 * valops.c (value_cast_pointers, value_cast)
9319 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9320 (value_struct_elt, value_struct_elt_bitpos)
9321 (value_find_oload_method_list, find_overload_match)
9322 (value_rtti_indirect_type): Likewise.
9323 * valprint.c (val_print_scalar_type_p, generic_val_print):
9324 Likewise.
9325 * value.c (value_actual_type, value_as_address, unpack_long)
9326 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9327 (coerce_ref): Likewise.
9328 * varobj.c (varobj_get_value_type): Likewise.
9329
3fcf899d
AV
93302017-03-20 Artemiy Volkov <artemiyv@acm.org>
9331
9332 PR gdb/14441
9333 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9334 table of constants.
9335 * python/lib/gdb/command/explore.py: Support exploring values
9336 of rvalue reference types.
9337 * python/lib/gdb/types.py: Implement get_basic_type() for
9338 rvalue reference types.
9339 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9340 constant.
9341 * python/py-value.c (valpy_getitem): Add an rvalue reference
9342 check.
9343 (valpy_reference_value): Add new parameter "refcode".
9344 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9345 New wrappers for valpy_reference_value().
9346 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9347 (gdbpy_invoke_xmethod): Likewise.
9348
4297a3f0
AV
93492017-03-20 Artemiy Volkov <artemiyv@acm.org>
9350
9351 PR gdb/14441
9352 * dwarf2read.c (process_die, read_type_die_1): Handle the
9353 DW_TAG_rvalue_reference_type DIE.
9354 (read_tag_reference_type): Add new parameter "refcode".
9355
e1cb3213
AV
93562017-03-20 Artemiy Volkov <artemiyv@acm.org>
9357
9358 PR gdb/14441
9359 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9360 (c_type_print_modifier, c_type_print_varspec_suffix)
9361 (c_type_print_base): Support printing rvalue reference types.
9362 * c-valprint.c (c_val_print, c_value_print): Support printing
9363 rvalue reference values.
9364
e4347c89
AV
93652017-03-20 Artemiy Volkov <artemiyv@acm.org>
9366
9367 PR gdb/14441
9368 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9369 typename.
9370 * cp-support.c (replace_typedefs): Handle
9371 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9372 * python/py-type.c (typy_lookup_type): Likewise.
9373
53cc15f5
AV
93742017-03-20 Artemiy Volkov <artemiyv@acm.org>
9375
9376 PR gdb/14441
9377 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9378 * parse.c (insert_type): Change assert statement.
9379 (follow_types): Handle rvalue reference types.
9380 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9381 constant.
9382
a65cfae5
AV
93832017-03-20 Artemiy Volkov <artemiyv@acm.org>
9384
9385 PR gdb/14441
9386 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9387 value_ref() interface.
9388 * c-valprint.c (c_value_print): Likewise.
9389 * infcall.c (value_arg_coerce): Likewise.
9390 * python/py-value.c (valpy_reference_value): Likewise.
9391 * valops.c (value_cast, value_reinterpret_cast)
9392 (value_dynamic_cast, typecmp): Likewise.
9393 (value_ref): Parameterize by kind of return value reference type.
9394 * value.h (value_ref): Add new parameter "refcode".
9395
3b224330
AV
93962017-03-20 Artemiy Volkov <artemiyv@acm.org>
9397
9398 PR gdb/14441
9399 * dwarf2read.c (read_tag_reference_type): Use
9400 lookup_lvalue_reference_type() instead of lookup_reference_type().
9401 * eval.c (evaluate_subexp_standard): Likewise.
9402 * f-exp.y: Likewise.
9403 * gdbtypes.c (make_reference_type, lookup_reference_type):
9404 Generalize with rvalue reference types.
9405 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9406 convenience wrappers for lookup_reference_type().
9407 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9408 reference kind parameter.
9409 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9410 wrappers for lookup_reference_type().
9411 * guile/scm-type.c (gdbscm_type_reference): Use
9412 lookup_lvalue_reference_type() instead of lookup_reference_type().
9413 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9414 * parse.c (follow_types): Likewise.
9415 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9416 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9417 Likewise.
9418 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9419 (gdbpy_invoke_xmethod): Likewise.
9420 * stabsread.c: Provide extra argument to make_reference_type()
9421 call.
9422 * valops.c (value_ref, value_rtti_indirect_type): Use
9423 lookup_lvalue_reference_type() instead of lookup_reference_type().
9424
f9aeb8d4
AV
94252017-03-20 Artemiy Volkov <artemiyv@acm.org>
9426
9427 PR gdb/14441
9428 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9429 (TYPE_IS_REFERENCE): New macro.
9430 (struct type): Add rvalue_reference_type field.
9431 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9432
51457a05
MAL
94332017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9434
9435 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9436 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9437 New function definition.
9438 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9439 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9440 New function declaration.
9441 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9442 * mi/mi-interp.h: New file.
9443 * solib.c (info_sharedlibrary_command): Replace for loop with
9444 ALL_SO_LIBS macro
9445 * solib.h (update_solib_list): New function declaration.
9446 (so_list_head): Move macro.
9447 * solist.h (ALL_SO_LIBS): New macro.
9448
e696b3ad
MAL
94492017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9450
9451 * infcmd.c (post_create_inferior): Remove unused argument in
9452 call to solib_add.
9453 * remote.c (remote_start_remote): Likewise.
9454 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9455 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9456 (enable_break): Likewise.
9457 * solib.c (update_solib_list): Remove unused target argument
9458 and its documentation.
9459 (solib_add): Remove unused target argument. Remove unused
9460 argument in call to update_solib_list.
9461 (info_sharedlibrary_command): Remove unused argument in call
9462 to update_solib_list.
9463 (sharedlibrary_command): Remove unused argument in call to
9464 solib_add.
9465 (handle_solib_event): Likewise.
9466 (reload_shared_libraries): Likewise.
9467 * solib.h (solib_add): Remove unused target argument.
9468
dcb84eda
AA
94692017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9470
9471 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9472 (s390_displaced_step_fixup): Cover relative branches with the
9473 default fixup handling. This fixes lack of support for some
9474 relative branch instructions.
9475
d9cb6cdc
SM
94762017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9477
9478 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9479 ptid from regcache.
9480
1afaf9f4
SM
94812017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9482
9483 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9484 i386_darwin_store_inferior_registers): Use ptid from regcache.
9485
aac12e24
SM
94862017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9487
9488 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9489 i386bsd_store_inferior_registers): Use ptid from regcache.
9490
bbe1eef1
SM
94912017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9492
9493 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9494 hppaobsd_store_registers): Use ptid from regcache.
9495
10799020
SM
94962017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9497
9498 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9499 hppanbsd_store_registers): Use ptid from regcache.
9500
00204cf7
SM
95012017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9502
9503 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9504 from regcache. Use get_ptrace_pid.
9505
11a33714
SM
95062017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9507
9508 * corelow.c (get_core_register_section): Use ptid from regcache,
9509 update doc.
9510
317cd492
SM
95112017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9512
9513 * bsd-uthread.c (bsd_uthread_fetch_registers,
9514 bsd_uthread_store_registers): Use ptid from regcache, set and
9515 restore inferior_ptid.
9516
9ac8a7c2
SM
95172017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9518
9519 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9520 fetch_fp_regs, store_register, store_regs, store_fp_register,
9521 store_fp_regs): Use ptid from regcache.
9522
4ac4bb6a
SM
95232017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9524
9525 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9526 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9527 store_vfp_regs): Use ptid from regcache.
9528
9bcbdca8
PA
95292017-03-17 Pedro Alves <palves@redhat.com>
9530
9531 PR remote/21188
9532 * ser-base.c (ser_base_wait_for): Add comment.
9533 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9534 version.
9535 * ser-unix.c (hardwire_raw): Remove reference to
9536 scb->current_timeout.
9537 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9538 (hardwire_ops): Install ser_base_readchar instead of
9539 hardwire_readchar.
9540 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9541 Remove fields.
9542
7503099f
JG
95432017-03-17 Jonah Graham <jonah@kichwacoders.com>
9544
9545 PR gdb/19637
9546 * python/lib/gdb/printer/bound_registers.py: Add support for
9547 Python 3.
9548
7942e96e
AA
95492017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9550
9551 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9552 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9553 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9554 byte_offset to subobj_byte_offset. Fix the handling of
9555 DWARF_VALUE_STACK on big-endian targets when coming via an
9556 implicit pointer.
9557 (dwarf2_evaluate_loc_desc): Adjust call to
9558 dwarf2_evaluate_loc_desc_full.
9559 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9560 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9561
ba14f379
YQ
95622017-03-16 Yao Qi <yao.qi@linaro.org>
9563
9564 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9565 and REVSH instructions.
9566
b121eeb9
YQ
95672017-03-16 Yao Qi <yao.qi@linaro.org>
9568
9569 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9570 (arm_record_test): Declare.
9571 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9572 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9573 align with the manual.
9574 (thumb_record_misc): Adjust the code order to align with the
9575 manual.
9576 (thumb2_record_decode_insn_handler): Fix instruction matching.
9577 (instruction_reader_thumb): New class.
9578 (arm_record_test): New function.
9579
728a7913
YQ
95802017-03-16 Yao Qi <yao.qi@linaro.org>
9581
9582 * arm-tdep.c (abstract_memory_reader): New class.
9583 (instruction_reader): New class.
9584 (extract_arm_insn): Add argument 'reader'. Callers updated.
9585 (decode_insn): Likewise.
9586
34b43320
DE
95872017-03-16 Doug Evans <dje@google.com>
9588
a7c0469f
DE
9589 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9590 member. Change type of TYPE member to SCM. All uses updated.
9591 (lsscm_make_lazy_string_smob): Add assert.
9592 (lsscm_make_lazy_string): Flag bad length values.
9593 (lsscm_elt_type): New function.
9594 (gdbscm_lazy_string_to_value): Rewrite to use
9595 lsscm_safe_lazy_string_to_value.
9596 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9597 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9598 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9599 in incoming type.
9600 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9601 * guile/scm-type.c (tyscm_scm_to_type): New function.
9602
96032017-03-15 Doug Evans <dje@google.com>
9604
34b43320
DE
9605 PR python/17728, python/18439, python/18779
9606 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9607 member. Change type of TYPE member to PyObject *. All uses updated.
9608 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9609 (gdbpy_create_lazy_string_object): Flag bad length values.
9610 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9611 Handle typedefs in incoming type.
9612 (stpy_lazy_string_elt_type): New function.
9613 (gdbpy_extract_lazy_string): Call it.
9614 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9615 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9616 typedefs in incoming type.
9617
a3a5fecc
DE
96182017-03-16 Doug Evans <dje@google.com>
9619
9620 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9621 * guile/scm-type.c (tyscm_scm_to_type): New function.
9622
28f1c605
JW
96232017-03-16 Jiong Wang <jiong.wang@arm.com>
9624
9625 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9626 "ULONGEST" for "skip".
9627
87c336f6
AA
96282017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9629
9630 PR gdb/21220
9631 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9632 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9633 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9634 over ptrace peek/poke until end of buffer or error.
9635
cf81cf60
SM
96362017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9637
9638 * parse.c (length_of_subexp): Make static.
9639 * parser-defs.h (length_of_subexp): Remove.
9640
a379284a
AA
96412017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9642
9643 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9644 as well.
9645
8a6200ba
PA
96462017-03-14 Pedro Alves <palves@redhat.com>
9647
9648 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9649 (main): Use std::unique_ptr. Remove calls to
9650 cp_demangled_name_parse_free.
9651
f79ec206
SM
96522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9653
9654 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9655 alphabsd_store_inferior_registers): Use regcache->ptid instead
9656 of inferior_ptid.
9657
edb5fb00
SM
96582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9659
9660 * aix-thread.c (aix_thread_fetch_registers,
9661 aix_thread_store_registers): Use regcache->ptid instead of
9662 inferior_ptid.
9663
55119686
SM
96642017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9665
9666 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9667 store_gregs_to_thread, fetch_fpregs_from_thread,
9668 store_fpregs_to_thread): Use regcache->ptid instead of
9669 inferior_ptid.
9670
6a06fbb7
SM
96712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9672
9673 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9674 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9675 instead of inferior_ptid.
9676
c6386875
SM
96772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9678
9679 * target.c (target_fetch_registers, target_store_registers): Add
9680 assert.
9681
ddaaf0fb
SM
96822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9683
9684 * regcache.h (regcache_get_ptid): New function.
9685 * regcache.c (regcache_get_ptid): New function.
9686
b9da89d1 96872017-03-13 Mark Wielaard <mark@klomp.org>
9688
9689 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9690
5f4d1085
KS
96912017-03-10 Keith Seitz <keiths@redhat.com>
9692
9693 PR c++/8218
9694 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9695
c65d6b55
PA
96962017-03-08 Pedro Alves <palves@redhat.com>
9697
9698 PR gdb/18360
9699 * infrun.c (start_step_over, do_target_resume, resume)
9700 (restart_threads): Assert we're not resuming a thread that is
9701 meant to be stopped.
9702 (infrun_thread_stop_requested_callback): Delete.
9703 (infrun_thread_stop_requested): If the thread is internally
9704 stopped, queue a pending stop event and clear the thread's
9705 inline-frame state.
9706 (handle_stop_requested): New function.
9707 (handle_syscall_event, handle_inferior_event_1): Use
9708 handle_stop_requested.
9709 (handle_stop_requested): New function.
9710 (handle_signal_stop): Set the thread's stop_signal here instead of
9711 at caller.
9712 (finish_step_over): Clear step over info unconditionally.
9713 (handle_signal_stop): If the user had interrupted the event
9714 thread, consider the stop a random signal.
9715 (handle_signal_stop) <signal arrived while stepping over
9716 breakpoint>: Don't restart threads here.
9717 (stop_waiting): Don't clear step-over info here.
9718
15c22686
PA
97192017-03-08 Pedro Alves <palves@redhat.com>
9720
9721 PR 21206
9722 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9723 goes to argument 2, not 1.
9724
6e5d74e7
PA
97252017-03-08 Pedro Alves <palves@redhat.com>
9726
9727 PR cli/21218
9728 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9729 display_gdb_prompt.
9730 (command_line_input): Add comment.
9731
9753a2f6
PA
97322017-03-08 Pedro Alves <palves@redhat.com>
9733
9734 PR tui/21216
9735 * tui/tui-file.c (tui_file::write): New.
9736 * tui/tui-file.h (tui_file): Override "write".
9737 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9738 factored out from ...
9739 (tui_puts): ... here.
9740 (tui_putc): Use them.
9741 (tui_write): New function.
9742 * tui/tui-io.h (tui_write): Declare.
9743
1672e0d9
SDJ
97442017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9745
9746 * Makefile.in (SFILES): Replace "environ.c" with
9747 "common/environ.c".
9748 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9749 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9750 to...
9751 * common/environ.c: ... here.
9752 * environ.h: Moved to...
9753 * common/environ.h: ... here.
9754
f7bb4e3a
PB
97552017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9756
9757 * gdbarch.sh (pstring_ptr): New static function.
9758 (gdbarch_disassembler_options): Use it.
9759 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9760 not valid_disassembler_option->name.
9761 * gdbarch.c: Regenerate.
9762
e45ced6c
PB
97632017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9764
9765 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9766
5f6fd321
PA
97672017-03-07 Pedro Alves <palves@redhat.com>
9768
9769 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9770
6dbb839a 97712017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
9772
9773 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9774 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9775 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 9776 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 9777
d274ecf4
SM
97782017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9779
9780 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9781
df97be55
SM
97822017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9783
9784 * remote.c (remote_add_target_side_commands): Use range-based
9785 for loop.
9786
7d45f3df
YQ
97872017-03-03 Yao Qi <yao.qi@linaro.org>
9788
9789 PR gdb/21165
9790 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9791 value is lazy.
9792 * valprint.c (common_val_print): Likewise.
9793
65b48a81
PB
97942017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9795
9796 * NEWS: Mention new set/show disassembler-options commands.
9797 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9798 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9799 (prospective_options): New static variable.
9800 (gdb_disassembler::gdb_disassembler): Initialize
9801 m_di.disassembler_options.
9802 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9803 (get_disassembler_options): New function.
9804 (set_disassembler_options): Likewise.
9805 (set_disassembler_options_sfunc): Likewise.
9806 (show_disassembler_options_sfunc): Likewise.
9807 (disassembler_options_completer): Likewise.
9808 (_initialize_disasm): Likewise.
9809 * disasm.h (get_disassembler_options): New prototype.
9810 (set_disassembler_options): Likewise.
9811 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9812 (gdbarch_verify_disassembler_options): Likewise.
9813 * gdbarch.c: Regenerate.
9814 * gdbarch.h: Likewise.
9815 * arm-tdep.c (num_disassembly_options): Delete.
9816 (set_disassembly_style): Likewise.
9817 (arm_disassembler_options): New static variable.
9818 (set_disassembly_style_sfunc): Convert short style name into long
9819 option name. Call set_disassembler_options.
9820 (show_disassembly_style_sfunc): New function.
9821 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9822 set_gdbarch_verify_disassembler_options.
9823 (_initialize_arm_tdep): Delete regnames variable and update callers.
9824 (arm_disassembler_options): Initialize.
9825 (disasm_options): New variable.
9826 (num_disassembly_options): Rename from this...
9827 (num_disassembly_styles): ...to this. Compute by scanning through
9828 disasm_options.
9829 (valid_disassembly_styles): Initialize using disasm_options.
9830 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9831 set_arm_regname_option.
9832 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9833 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9834 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9835 set_gdbarch_verify_disassembler_options.
9836 * s390-tdep.c (s390_disassembler_options): New static variable.
9837 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9838 set_gdbarch_verify_disassembler_options.
9839
d538e36d
SM
98402017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9841
9842 * remote.c (remote_add_target_side_condition): Remove "struct"
9843 keyword from range-based for loop.
9844
83621223
SM
98452017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9846
9847 * remote.c (remote_add_target_side_condition): Use range-based
9848 for loop. Update comment.
9849
2123df0e
YQ
98502017-02-27 Yao Qi <yao.qi@linaro.org>
9851
9852 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9853
8e368124
AH
98542017-02-26 Alan Hayward <alan.hayward@arm.com>
9855
9856 * regcache.c (regcache_raw_update): New function.
9857 (regcache_raw_read): Move code to regcache_raw_update.
9858 * regcache.h (regcache_raw_update): New declaration.
9859 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9860
a49dd8dd
JK
98612017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9862
9863 * dwarf2read.c (create_debug_type_hash_table): Initialize
9864 header.signature and header.type_offset_in_tu.
9865
34e4bae9
PA
98662017-02-24 Pedro Alves <palves@redhat.com>
9867
9868 * symtab.c (make_file_symbol_completion_list_1): Use
9869 add_symtab_completions.
9870
b0e4b369
AH
98712017-02-24 Alan Hayward <alan.hayward@arm.com>
9872
9873 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9874
975c21ab
AH
98752017-02-24 Alan Hayward <alan.hayward@arm.com>
9876
9877 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9878 I386_MAX_REGISTER_SIZE.
9879 (i386_pseudo_register_write): Likewise.
9880 (i386_process_record): Likewise.
9881 * i387-tdep.c (i387_supply_xsave): Likewise.
9882 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9883 (store_register): Likewise.
9884
14bc53a8
PA
98852017-02-23 Pedro Alves <palves@redhat.com>
9886
9887 * ada-lang.c: Include "common/function-view.h".
9888 (ada_iterate_over_symbols): Adjust to use function_view as
9889 callback type.
9890 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9891 (ada_make_symbol_completion_list): Use a lambda.
9892 (ada_exc_search_name_matches): Delete.
9893 (name_matches_regex): New.
9894 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9895 * compile/compile-c-support.c: Include "common/function-view.h".
9896 (print_one_macro): Change prototype to accept a ui_file pointer.
9897 (write_macro_definitions): Use a lambda.
9898 * dwarf2read.c: Include "common/function-view.h".
9899 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9900 (dw2_expand_symtabs_matching): Adjust to use function_view as
9901 callback type.
9902 * language.h: Include "common/function-view.h".
9903 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9904 function_view as callback type.
9905 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9906 * linespec.c: Include "common/function-view.h".
9907 (collect_info::add_symbol): New method.
9908 (struct symbol_and_data_callback, iterate_inline_only, struct
9909 symbol_matcher_data, iterate_name_matcher): Delete.
9910 (iterate_over_all_matching_symtabs): Adjust to use function_view
9911 as callback type and lambdas.
9912 (iterate_over_file_blocks): Adjust to use function_view as
9913 callback type.
9914 (decode_compound_collector): Now a class with private fields.
9915 (decode_compound_collector::release_symbols): New method.
9916 (collect_one_symbol): Rename to...
9917 (decode_compound_collector::operator()): ... this and adjust.
9918 (lookup_prefix_sym): decode_compound_collector construction bits
9919 move to decode_compound_collector ctor. Pass the
9920 decode_compound_collector object directly as callback. Remove
9921 cleanups and use decode_compound_collector::release_symbols
9922 instead.
9923 (symtab_collector): Now a class with private fields.
9924 (symtab_collector::release_symtabs): New method.
9925 (add_symtabs_to_list): Rename to...
9926 (symtab_collector::operator()): ... this and adjust.
9927 (collect_symtabs_from_filename): symtab_collector construction
9928 bits move to symtab_collector ctor. Pass the symtab_collector
9929 object directly as callback. Remove cleanups and use
9930 symtab_collector::release_symtabs instead.
9931 (collect_symbols): Delete.
9932 (add_matching_symbols_to_info): Use lambdas.
9933 * macrocmd.c (print_macro_callback): Delete.
9934 (info_macro_command): Use a lambda.
9935 (info_macros_command): Pass print_macro_definition as callable
9936 directly.
9937 (print_one_macro): Remove 'ignore' parameter.
9938 (macro_list_command): Adjust.
9939 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9940 (macro_for_each_data::user_data): Delete field.
9941 (foreach_macro): Adjust to call the function_view.
9942 (macro_for_each): Adjust to use function_view as callback type.
9943 (foreach_macro_in_scope): Adjust to call the function_view.
9944 (macro_for_each_in_scope): Adjust to use function_view as callback
9945 type.
9946 * macrotab.h: Include "common/function-view.h".
9947 (macro_callback_fn): Declare a prototype instead of a pointer.
9948 Remove "user_data" parameter.
9949 (macro_for_each, macro_for_each_in_scope): Adjust to use
9950 function_view as callback type.
9951 * psymtab.c (partial_map_expand_apply)
9952 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9953 Adjust to use function_view as callback type and to return bool.
9954 (psym_expand_symtabs_matching): Adjust to use function_view as
9955 callback types.
9956 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9957 to use function_view as callback type and to return bool.
9958 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9959 callback types.
9960 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9961 as callback types.
9962 * symfile.h: Include "common/function-view.h".
9963 (expand_symtabs_file_matcher_ftype)
9964 (expand_symtabs_symbol_matcher_ftype)
9965 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9966 return bool.
9967 (quick_symbol_functions::map_symtabs_matching_filename)
9968 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9969 function_view as callback type and return bool.
9970 (expand_symtabs_matching): Adjust to use function_view as callback
9971 type.
9972 (maintenance_expand_name_matcher)
9973 (maintenance_expand_file_matcher): Delete.
9974 (maintenance_expand_symtabs): Use lambdas.
9975 * symtab.c (iterate_over_some_symtabs): Adjust to use
9976 function_view as callback types and return bool.
9977 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9978 of a cleanup.
9979 (lookup_symtab_callback): Delete.
9980 (lookup_symtab): Use a lambda.
9981 (iterate_over_symbols): Adjust to use function_view as callback
9982 type.
9983 (struct search_symbols_data, search_symbols_file_matches)
9984 (search_symbols_name_matches): Delete.
9985 (search_symbols): Use a pair of lambdas.
9986 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9987 (symtab_expansion_callback): Delete.
9988 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9989 * symtab.h: Include "common/function-view.h".
9990 (iterate_over_some_symtabs): Adjust to use function_view as
9991 callback type and return bool.
9992 (iterate_over_symtabs): Adjust to use function_view as callback
9993 type.
9994 (symbol_found_callback_ftype): Remove 'data' parameter and return
9995 bool.
9996 (iterate_over_symbols): Adjust to use function_view as callback
9997 type.
9998
07e253aa
PA
99992017-02-23 Pedro Alves <palves@redhat.com>
10000
10001 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10002 (%.o) <unittests/%.c>: New pattern.
10003 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10004 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10005 * common/function-view.h: New file.
10006 * unittests/function-view-selftests.c: New file.
10007 * configure: Regenerate.
10008
8eaf5320
SM
100092017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10010
10011 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10012 inferior_ptid.
10013 * go32-nat.c (go32_thread_alive): Likewise.
10014
38768751
YQ
100152017-02-23 Yao Qi <yao.qi@linaro.org>
10016
10017 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10018 delete.
10019
0a8beaba
YQ
100202017-02-23 Yao Qi <yao.qi@linaro.org>
10021
10022 * varobj.c (varobj_clear_saved_item): Use delete instead of
10023 xfree.
10024 (update_dynamic_varobj_children): Likewise.
10025
58fdfd2c
JK
100262017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10027
10028 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10029
1b90b139
SM
100302017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10031
10032 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10033 m_enum_value to 0 in default constructor.
10034
2039d74e
EBM
100352017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10036
10037 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10038 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10039 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10040 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10041 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10042 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10043 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10044 IS_STORE_CONDITIONAL_INSN.
10045
7814882a
JK
100462017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10047
10048 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10049
0ae60b63
JK
100502017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10051
10052 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10053
0224619f
JK
100542017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10055
10056 * dwarf2read.c (skip_one_die, read_attribute_value)
10057 (dwarf2_const_value_attr, dump_die_shallow)
10058 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10059 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10060
0af92d60
JK
100612017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10062
10063 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10064 (dwarf_parse_macro_header): Accept DWARF version 5.
10065 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10066
216f72a1
JK
100672017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10068
10069 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10070 DW_AT_GNU_*.
10071 * common/common-exceptions.h (enum errors): Likewise.
10072 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10073 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10074 (dwarf_expr_context::execute_stack_op): Likewise.
10075 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10076 Likewise.
10077 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10078 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10079 (show_entry_values_debug, call_site_to_target_addr)
10080 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10081 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10082 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10083 (value_of_dwarf_block_entry, indirect_pieced_value)
10084 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10085 (disassemble_dwarf_expression): Likewise.
10086 * dwarf2read.c (process_die, inherit_abstract_dies)
10087 (read_call_site_scope): Likewise.
10088 * gdbtypes.h (struct func_type, struct call_site_parameter)
10089 (struct call_site): Likewise.
10090 * stack.c (read_frame_arg): Likewise.
10091 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10092
43988095
JK
100932017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10094
10095 * defs.h (read_unsigned_leb128): New declaration.
10096 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10097 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10098 (dwarf2_find_location_expression): Call also
10099 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10100 * dwarf2loc.h (dwarf2_version): New declaration.
10101 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10102 rnglists.
10103 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10104 .debug_rnglists.
10105 (struct dwop_section_names): Add loclists_dwo.
10106 (dwop_section_names): Add .debug_loclists.dwo.
10107 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10108 (struct dwarf2_per_cu_data): Add dwarf_version.
10109 (struct dwo_sections): Add loclists.
10110 (struct attr_abbrev): Add implicit_const.
10111 (read_indirect_line_string): New declaration.
10112 (read_unsigned_leb128): Delete declaration.
10113 (rcuh_kind): New definition.
10114 (read_and_check_comp_unit_head): Change parameter
10115 is_debug_types_section to section_kind.
10116 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10117 (read_comp_unit_head): Change parameter abfd to section, add parameter
10118 section_kind. Handle DWARF-5.
10119 (error_check_comp_unit_head): Accept also DWARF version 5.
10120 (read_and_check_comp_unit_head): Change parameter
10121 is_debug_types_section to section_kind.
10122 (read_and_check_type_unit_head): Delete function.
10123 (read_abbrev_offset): Handle DWARF-5.
10124 (create_debug_type_hash_table): Add parameter section_kind. Process
10125 only DW_UT_type. Use signature and type_offset_in_tu from struct
10126 comp_unit_head.
10127 (create_debug_types_hash_table): Update create_debug_type_hash_table
10128 caller.
10129 (create_all_type_units): Call create_debug_type_hash_table.
10130 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10131 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10132 caller.
10133 (skip_one_die): Handle DW_FORM_implicit_const.
10134 (dwarf2_rnglists_process): New function.
10135 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10136 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10137 (read_attribute_value): Handle DW_FORM_implicit_const,
10138 DW_FORM_line_strp.
10139 (read_attribute): Handle DW_FORM_implicit_const.
10140 (read_indirect_string_at_offset_from): New function from
10141 read_indirect_string_at_offset.
10142 (read_indirect_string_at_offset): Call
10143 read_indirect_string_at_offset_from.
10144 (read_indirect_line_string_at_offset): New function.
10145 (read_indirect_string): New function comment.
10146 (read_indirect_line_string): New function.
10147 (read_unsigned_leb128): Make it global.
10148 (dwarf2_string_attr): Handle DWARF-5.
10149 (add_include_dir_stub, read_formatted_entries): New functions.
10150 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10151 Handle DWARF-5.
10152 (per_cu_header_read_in): Update read_comp_unit_head caller.
10153 (dwarf2_version): New function.
10154 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10155 rnglists.
10156 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10157 fields.
10158
22d2f3ab
JK
101592017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10160
10161 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10162
5f46c5a5
JK
101632017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10164
10165 * dwarf2read.c (dwarf2_ranges_process): New function from
10166 dwarf2_ranges_read.
10167 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10168 dwarf2_ranges_process.
10169
78d4d2c5
JK
101702017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10171
10172 * dwarf2read.c (create_debug_type_hash_table): New function from
10173 create_debug_types_hash_table.
10174 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10175 (create_all_type_units, open_and_init_dwo_file): Update
10176 create_debug_types_hash_table callers.
10177
1b076f25
SDJ
101782017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10179
10180 PR gdb/16188
10181 * fork-child.c (trace_start_error): Fix thinko. va_end should
10182 refer to 'ap', not 'args'.
10183
0db8980c
SDJ
101842017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10185 Pedro Alves <palves@redhat.com>
10186
10187 PR gdb/16188
10188 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10189 calls succeeded.
10190 * fork-child.c (trace_start_error): New function.
10191 (trace_start_error_with_name): Likewise.
10192 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10193 * inf-ptrace.c (inf_ptrace_me): Likewise.
10194 * inferior.h (trace_start_error): New prototype.
10195 (trace_start_error_with_name): Likewise.
10196
99e8a4f9
SDJ
101972017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10198
10199 PR gdb/21164
10200 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10201 NULL before using it.
10202 * symmisc.c (maintenance_print_symbols): Likewise.
10203 (maintenance_print_msymbols): Likewise.
10204
4e746bb6
TW
102052017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10206
10207 * NEWS: Add record Python bindings entry.
10208
102092017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10210
10211 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10212 py-record-full.o.
10213 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10214 * python/py-record-btrace.c, python/py-record-btrace.h,
10215 python/py-record-full.c, python/py-record-full.h: New file.
10216 * python/py-record.c: Add include for py-record-btrace.h and
10217 py-record-full.h.
10218 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10219 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10220 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10221 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10222 New definition.
10223 (gdbpy_initialize_btrace): New export.
10224 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10225
102262017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10227
10228 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10229 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10230 * python/py-record.c: New file.
10231 * python/python-internal.h (gdbpy_start_recording,
10232 gdbpy_current_recording, gdpy_stop_recording,
10233 gdbpy_initialize_record): New export.
10234 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10235 (python_GdbMethods): Add gdbpy_start_recording,
10236 gdbpy_current_recording and gdbpy_stop_recording.
10237
102382017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10239
10240 * record-btrace.c (record_btrace_record_method): New function.
10241 (init_record_btrace_ops): Initialize to_record_method.
10242 * record-full.c (record_full_record_method): New function.
10243 (init_record_full_ops, init_record_full_core_ops): Add
10244 record_full_record_method.
10245 * record.h (enum record_method): New enum.
10246 * target-debug.h (target_debug_print_enum_record_method: New define.
10247 * target-delegates.c: Regenerate.
10248 * target.c (target_record_method): New function.
10249 * target.h: Include record.h.
10250 (struct target_ops) <to_record_method>: New field.
10251 (target_record_method): New export.
10252
102532017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10254
10255 * record.h (record_start, record_stop): New export.
10256 * record.c (record_start, record_stop): New function.
10257
102582017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10259
10260 * btrace.c (btrace_fetch): Copy function call segments pointer
10261 into a vector.
10262 (btrace_clear): Clear the vector.
10263 (btrace_find_insn_by_number): Use binary search to find the correct
10264 function call segment.
10265 * btrace.h (brace_fun_p): New typedef.
10266 (struct btrace_thread_info) <functions>: New field.
10267
102682017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10269
10270 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10271 * btrace.c (btrace_decode_error): ... here. New function.
10272 * btrace.h (btrace_decode_error): New export.
10273
102742017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10275
10276 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10277 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10278 btrace_find_insn_by_number): Remove special case for gaps.
10279 * btrace.h (btrace_insn_get_error): New export.
10280 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10281 * record-btrace.c (btrace_insn_history): Print number for gaps.
10282 (record_btrace_info, record_btrace_goto): Handle gaps.
10283
3f77c769
TT
102842017-02-14 Tom Tromey <tom@tromey.com>
10285
10286 PR python/13598:
10287 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10288 event.
10289 * python/py-evts.c (gdbpy_initialize_py_events): Add
10290 before_prompt registry.
10291 * python/py-events.h (events_object) <before_prompt>: New field.
10292
4c2c7ac6
MM
102932017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10294
10295 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10296
5cf30ebf
LM
102972017-02-13 Luis Machado <lgustavo@codesourcery.com>
10298
10299 * symfile (_initialize_symfile): Add usage text to the load command's
10300 help text.
10301
26a06916
SM
103022017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10303
10304 * utils.c (defaulted_query): Don't query on secondary UIs.
10305
0b145e37
TT
103062017-02-10 Tom Tromey <tom@tromey.com>
10307
10308 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10309
2d8365c4
TT
103102017-02-10 Tom Tromey <tom@tromey.com>
10311
10312 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10313 "cleanup" local.
10314 * python/py-type.c (typy_legacy_template_argument): Remove
10315 unnecessary "cleanup" local.
10316
2bb8f231
TT
103172017-02-10 Tom Tromey <tom@tromey.com>
10318
10319 * python/python.c (do_start_initialization): New function, from
10320 _initialize_python.
10321 (_initialize_python): Call do_start_initialization.
10322 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10323 goto.
10324
1bdfaf42
TT
103252017-02-10 Tom Tromey <tom@tromey.com>
10326
10327 * python/py-prettyprint.c (pretty_print_one_value): Use
10328 gdbpy_ref.
10329
88b6faea
TT
103302017-02-10 Tom Tromey <tom@tromey.com>
10331
10332 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10333 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10334 gdbpy_ref.
10335 * python/py-type.c (field_new): Use gdbpy_ref.
10336 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10337 gdbpy_ref.
10338 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10339 (py_free_pspace): Likewise.
10340 (pspace_to_pspace_object): Likewise.
10341 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10342 (py_free_objfile): Likewise.
10343 (objfile_to_objfile_object): Likewise.
10344 * python/py-inferior.c (delete_thread_object): Use
10345 gdbpy_ref.
10346 (infpy_read_memory): Likewise.
10347 (py_free_inferior): Likewise.
10348 * python/py-evtregistry.c (create_eventregistry_object): Use
10349 gdbpy_ref.
10350 * python/py-event.c (create_event_object): Use gdbpy_ref.
10351
7780f186
TT
103522017-02-10 Tom Tromey <tom@tromey.com>
10353
10354 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10355 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10356 used.
10357 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10358 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10359 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10360 python/py-framefilter.c, python/py-function.c,
10361 python/py-inferior.c, python/py-infevents.c,
10362 python/py-linetable.c, python/py-newobjfileevent.c,
10363 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10364 python/py-signalevent.c, python/py-stopevent.c,
10365 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10366 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10367 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10368 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10369
d4b0bb18
TT
103702017-02-10 Tom Tromey <tom@tromey.com>
10371
10372 * ui-out.h (ui_out_emit_type): New class.
10373 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10374 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10375 and ui_out_emit_tuple.
10376 (enumerate_locals): Likewise.
10377 (py_mi_print_variables, py_print_locals, py_print_args): Use
10378 ui_out_emit_list.
10379 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10380 ui_out_emit_list.
10381 * common/gdb_optional.h: New file.
10382
f67f945c
MG
103832017-02-10 Martin Galvan <martingalvan@sourceware.org>
10384
10385 * MAINTAINERS (Write After Approval): Update my e-mail address.
10386
18da0c51
MG
103872017-02-10 Martin Galvan <martingalvan@sourceware.org>
10388
10389 PR gdb/21122
10390 * breakpoint.c (_initialize_breakpoint): Update the help description
10391 of the 'commands' command to indicate that it takes a list argument.
10392
62c14536
SM
103932017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10394
10395 * interps.c (current_interp_set_logging): Remove "return".
10396
ff6fa247
GB
103972017-02-09 Gary Benson <gbenson@redhat.com>
10398
10399 * symtab.c (add_symtab_completions): Prevent NULL pointer
10400 dereference.
10401
a474bd8e
PA
104022017-02-08 Pedro Alves <palves@redhat.com>
10403
10404 * interps.c (interp::interp): Remove reference to quiet_p.
10405 (interp_set): Make static. Remove dead "Switching to" output
10406 code.
10407 (interp_quiet_p, interp_set_quiet): Delete.
10408 (interpreter_exec_cmd): Don't set the interpreter quiet.
10409 * interps.h (interp_quiet_p): Make static.
10410 (class interp) <quiet_p>: Remove field
10411
3d7b173c
JG
104122017-02-08 Jerome Guitton <guitton@adacore.com>
10413
604c4576
JG
10414 * cli/cli-decode.c (find_command_name_length): Make it extern.
10415 * cli/cli-decode.h (find_command_name_length): Declare.
10416 * cli/cli-script.c (command_name_equals, line_first_arg):
10417 New functions.
10418 (process_next_line): Use cli-decode to parse command names.
10419 (build_command_line): Make args a constant pointer.
10420
104212017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 10422
3d7b173c
JG
10423 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10424 Remove case-insensitive search.
10425
1291063d
JM
104262017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10427
10428 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10429 at the end of the line. Avoids an ARI warning.
10430
20b477a7
LM
104312017-02-06 Luis Machado <lgustavo@codesourcery.com>
10432
10433 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10434 rdseed instructions.
10435 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10436
3f7b46f2
IR
104372017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10438
10439 PR tdep/20936
10440 Provide and use sparc32 and sparc64 target description XML files.
10441 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10442 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10443 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10444 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10445 * features/sparc/sparc32-solaris.xml: New file.
10446 * features/sparc/sparc64-solaris.xml: New file.
10447 * features/sparc/sparc32-solaris.c: Generated.
10448 * features/sparc/sparc64-solaris.c: Generated.
10449 * sparc-tdep.h: Account for differences in target descriptions.
10450 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10451 (sparc32_register_type): Use target provided registers.
10452 (validate_tdesc_registers): New function.
10453 (sparc32_gdbarch_init): Use tdesc_has_registers.
10454 Set pseudoregister functions.
10455 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10456 (sparc64_register_type): Use target provided registers.
10457 (sparc64_init_abi): Set pseudoregister functions.
10458
f0fd41c1
TT
104592017-02-03 Tom Tromey <tom@tromey.com>
10460
10461 PR rust/21097:
10462 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10463 with a single member.
10464
d6f9b0fb
PA
104652017-02-03 Pedro Alves <palves@redhat.com>
10466
10467 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10468 (cli_interp_base::~cli_interp_base): New.
10469 (cli_interp): New struct.
10470 (as_cli_interp): Cast the interp itself to cli_interp.
10471 (cli_interpreter_pre_command_loop): Rename to ...
10472 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10473 parameter.
10474 (cli_interpreter_init): Rename to ...
10475 (cli_interp::init): ... this. Remove 'self' parameter. Use
10476 boolean. Make extern.
10477 (cli_interpreter_resume): Rename to ...
10478 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10479 extern.
10480 (cli_interpreter_suspend): Rename to ...
10481 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10482 extern.
10483 (cli_interpreter_exec): Rename to ...
10484 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10485 extern.
10486 (cli_interpreter_supports_command_editing): Rename to ...
10487 (cli_interp_base::supports_command_editing): ... this. Remove
10488 'interp' parameter. Make extern.
10489 (cli_ui_out): Rename to ...
10490 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10491 Make extern.
10492 (cli_set_logging): Rename to ...
10493 (cli_interp_base::set_logging): ... this. Remove 'interp'
10494 parameter. Make extern.
10495 (cli_interp_procs): Delete.
10496 (cli_interp_factory): Adjust to use "new".
10497 * cli/cli-interp.h: Include "interps.h".
10498 (struct cli_interp_base): New struct.
10499 * interps.c (struct interp): Delete. Fields moved to interps.h.
10500 (interp_new): Delete.
10501 (interp::interp, interp::~interp): New.
10502 (interp_set): Use bool, and return void. Assume the interpreter
10503 has suspend, init and resume methods, and that the all return
10504 void.
10505 (set_top_level_interpreter): interp_set returns void.
10506 (interp_ui_out): Adapt.
10507 (current_interp_set_logging): Adapt.
10508 (interp_data): Delete.
10509 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10510 (interp_exec): Adapt.
10511 (top_level_interpreter_data): Delete.
10512 * interps.h (interp_init_ftype, interp_resume_ftype)
10513 (interp_suspend_ftype, interp_exec_ftype)
10514 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10515 (class interp): New.
10516 (interp_new): Delete.
10517 (interp_set): Now returns void. Use bool.
10518 (interp_data, top_level_interpreter_data): Delete.
10519 * mi/mi-common.h: Include interps.h.
10520 (class mi_interp): Inherit from interp. Define a ctor. Declare
10521 init, resume, suspect, exec, interp_ui_out, set_logging and
10522 pre_command_loop methods.
10523 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10524 (mi_interpreter_init): Rename to ...
10525 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10526 bool, return void and make extern. Adjust.
10527 (mi_interpreter_resume): ... Rename to ...
10528 (mi_interp::resume): ... this. Remove the 'data' parameter,
10529 return void and make extern. Adjust.
10530 (mi_interpreter_suspend): ... Rename to ...
10531 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10532 return void and make extern. Adjust.
10533 (mi_interpreter_exec): ... Rename to ...
10534 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10535 extern. Adjust.
10536 (mi_interpreter_pre_command_loop): ... Rename to ...
10537 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10538 parameter and make extern.
10539 (mi_on_normal_stop_1): Adjust.
10540 (mi_ui_out): Rename to ...
10541 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10542 parameter and make extern. Adjust.
10543 (mi_set_logging): Rename to ...
10544 (mi_interp::set_logging): ... this. Remove the 'interp'
10545 parameter and make extern. Adjust.
10546 (mi_interp_procs): Delete.
10547 (mi_interp_factory): Adjust to use 'new'.
10548 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10549 (mi_print_exception, mi_execute_command, mi_load_progress):
10550 Adjust.
10551 * tui/tui-interp.c (tui_interp): New class.
10552 (as_tui_interp): Return a tui_interp pointer.
10553 (tui_on_normal_stop, tui_on_signal_received)
10554 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10555 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10556 to use interp::interp_ui_out.
10557 (tui_init): Rename to ...
10558 (tui_interp::init): ... this. Remove the 'self' parameter, use
10559 bool, return void and make extern. Adjust.
10560 (tui_resume): Rename to ...
10561 (tui_interp::resume): ... this. Remove the 'data' parameter,
10562 return void and make extern. Adjust.
10563 (tui_suspend): Rename to ...
10564 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10565 return void and make extern. Adjust.
10566 (tui_ui_out): Rename to ...
10567 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10568 parameter, and make extern. Adjust.
10569 (tui_exec): Rename to ...
10570 (tui_interp::exec): ... this. Remove the 'data' parameter and
10571 make extern.
10572 (tui_interp_procs): Delete.
10573 (tui_interp_factory): Use "new".
10574
65c40c95
TT
105752017-02-02 Tom Tromey <tom@tromey.com>
10576
10577 * rust-exp.y (ends_raw_string, space_then_number)
10578 (rust_identifier_start_p): Return bool.
10579 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10580 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10581 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10582 (rust_chartype_p): Return bool.
10583 (val_print_struct, rust_print_struct_def, rust_print_type):
10584 Update.
10585 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10586 Return bool.
10587
b50f188d
TT
105882017-02-02 Tom Tromey <tom@tromey.com>
10589
10590 * rust-lang.c: Reindent.
10591
03c85b11
TT
105922017-02-02 Tom Tromey <tom@tromey.com>
10593
10594 * rust-lang.h (rust_crate_for_block): Update.
10595 * rust-lang.c (rust_crate_for_block): Return std::string.
10596 (rust_get_disr_info): Use std:;string, not
10597 gdb::unique_xmalloc_ptr.
10598 * rust-exp.y (crate_name): Update.
10599
9b6da501
PA
106002017-02-02 Pedro Alves <palves@redhat.com>
10601
10602 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10603 field out of gdb_disassembler_test and make it static.
10604
ec4cb20b
PA
106052017-02-02 Pedro Alves <palves@redhat.com>
10606
10607 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10608 mi1_interp and mi_interp fields.
10609
5be5dbf0
PA
106102017-02-02 Pedro Alves <palves@redhat.com>
10611
616268b6
PA
10612 * cli/cli-interp.c (struct saved_output_files, saved_output):
10613 Moved from cli/cli-logging.c.
10614 (cli_set_logging): New function.
10615 (cli_interp_procs): Install cli_set_logging.
10616 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10617 Declare.
10618 * cli/cli-logging.c (struct saved_output_files, saved_output):
10619 Moved to cli/cli-interp.c.
10620 (pop_output_files): Don't save outputs here.
10621 (make_logging_output): New function.
10622 (handle_redirections): Don't build tee nor save previous outputs
10623 here.
10624 * interps.c (current_interp_set_logging): Change prototype.
10625 Assume there's always a set_logging_proc method installed.
10626 * interps.h (interp_set_logging_ftype): Change prototype.
10627 (current_interp_set_logging): Change prototype and adjust comment.
10628 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10629 use make_logging_output.
10630 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
106312017-02-02 Pedro Alves <palves@redhat.com>
10632
5be5dbf0
PA
10633 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10634 from ...
10635 (set_logging_overwrite): ... here.
10636 (logging_no_redirect_file): Delete.
10637 (set_logging_redirect): Don't handle redirection on the fly.
10638 Instead warn that "logging off" / "logging on" is necessary.
10639 (pop_output_files): Delete references to logging_no_redirect_file.
10640 (show_logging_command): Always speak in terms of what will happen
10641 once logging is reenabled.
10642
c99cc448
PA
106432017-02-02 Pedro Alves <palves@redhat.com>
10644
10645 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10646
8b172ce7
PA
106472017-02-02 Pedro Alves <palves@redhat.com>
10648
10649 * disasm.c (gdb_pretty_print_insn): Rename to ...
10650 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10651 Remove gdbarch parameter. Adapt to clear the object's buffers
10652 instead of allocating new buffers, and to print using the object's
10653 gdb_disassembler instead of calling gdb_print_insn.
10654 (dump_insns): Use gdb_pretty_print_disassembler.
10655 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10656 (gdb_pretty_print_disassembler): New class.
10657 * record-btrace.c (btrace_insn_history): Use
10658 gdb_pretty_print_disassembler.
10659
d7e74731
PA
106602017-02-02 Pedro Alves <palves@redhat.com>
10661
10662 * ada-lang.c (type_as_string): Use string_file.
10663 * ada-valprint.c (ada_print_floating): Use string_file.
10664 * ada-varobj.c (ada_varobj_scalar_image)
10665 (ada_varobj_get_value_image): Use string_file.
10666 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10667 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10668 * breakpoint.c (update_inserted_breakpoint_locations)
10669 (insert_breakpoint_locations, reattach_breakpoints)
10670 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10671 (print_it_watchpoint): Use string_file.
10672 (save_breakpoints): Use stdio_file.
10673 * c-exp.y (oper): Use string_file.
10674 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10675 tee_file.
10676 (pop_output_files): Use delete.
10677 (handle_redirections): Use stdio_file and tee_file.
10678 * cli/cli-setshow.c (do_show_command): Use string_file.
10679 * compile/compile-c-support.c (c_compute_program): Use
10680 string_file.
10681 * compile/compile-c-symbols.c (generate_vla_size): Take a
10682 'string_file &' instead of a 'ui_file *'.
10683 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10684 of a 'ui_file *'. Use string_file.
10685 (generate_c_for_variable_locations): Take a 'string_file &'
10686 instead of a 'ui_file *'.
10687 * compile/compile-internal.h (generate_c_for_for_one_variable):
10688 Take a 'string_file &' instead of a 'ui_file *'.
10689 * compile/compile-loc2c.c (push, pushf, unary, binary)
10690 (print_label, pushf_register_address, pushf_register)
10691 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10692 'ui_file *'. Adjust.
10693 * compile/compile.c (compile_to_object): Use string_file.
10694 * compile/compile.h (compile_dwarf_expr_to_c)
10695 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10696 'ui_file *'.
10697 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10698 (replace_typedefs_qualified_name): Use string_file and
10699 obstack_copy0.
10700 * disasm.c (gdb_pretty_print_insn): Use string_file.
10701 (gdb_disassembly): Adjust reference the null_stream global.
10702 (do_ui_file_delete): Delete.
10703 (gdb_insn_length): Use null_stream.
10704 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10705 * dwarf2loc.c (dwarf2_compile_property_to_c)
10706 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10707 'string_file &' instead of a 'ui_file *'.
10708 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10709 * dwarf2read.c (do_ui_file_peek_last): Delete.
10710 (dwarf2_compute_name): Use string_file.
10711 * event-top.c (gdb_setup_readline): Use stdio_file.
10712 * gdbarch.sh (verify_gdbarch): Use string_file.
10713 * gdbtypes.c (safe_parse_type): Use null_stream.
10714 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10715 string_file.
10716 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10717 'string_file *' instead of a 'ui_file *'.
10718 (gdbscm_arch_disassemble): Use string_file.
10719 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10720 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10721 inherits from ui_file.
10722 (ioscm_file_port_delete, ioscm_file_port_rewind)
10723 (ioscm_file_port_put): Delete.
10724 (ioscm_file_port_write): Rename to ...
10725 (ioscm_file_port::write): ... this. Remove file_port_magic
10726 checks.
10727 (ioscm_file_port_new): Delete.
10728 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10729 ui_file_up.
10730 * guile/scm-type.c (tyscm_type_name): Use string_file.
10731 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10732 Use string_file.
10733 * infcmd.c (print_return_value_1): Use string_file.
10734 * infrun.c (print_target_wait_results): Use string_file.
10735 * language.c (add_language): Use string_file.
10736 * location.c (explicit_to_string_internal): Use string_file.
10737 * main.c (captured_main_1): Use null_file.
10738 * maint.c (maintenance_print_architecture): Use stdio_file.
10739 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10740 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10741 event_channel>: Change type to mi_console_file pointer.
10742 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10743 (mi_console_file_delete): Delete.
10744 (struct mi_console_file): Delete.
10745 (mi_console_file_magic): Delete.
10746 (mi_console_file_new): Delete.
10747 (mi_console_file::mi_console_file): New.
10748 (mi_console_file_delete): Delete.
10749 (mi_console_file_fputs): Delete.
10750 (mi_console_file::write): New.
10751 (mi_console_raw_packet): Delete.
10752 (mi_console_file::flush): New.
10753 (mi_console_file_flush): Delete.
10754 (mi_console_set_raw): Rename to ...
10755 (mi_console_file::set_raw): ... this.
10756 * mi/mi-console.h (class mi_console_file): New class.
10757 (mi_console_file_new, mi_console_set_raw): Delete.
10758 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10759 (mi_set_logging): Use delete and tee_file. Adjust.
10760 * mi/mi-main.c (output_register): Use string_file.
10761 (mi_cmd_data_evaluate_expression): Use string_file.
10762 (mi_cmd_data_read_memory): Use string_file.
10763 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10764 * mi/mi-out.c (mi_ui_out::main_stream): New.
10765 (mi_ui_out::rewind): Use main_stream and
10766 string_file.
10767 (mi_ui_out::put): Use main_stream and string_file.
10768 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10769 Allocate a 'string_file' instead.
10770 (mi_out_new): Don't allocate a mem_fileopen stream here.
10771 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10772 (mi_ui_out::main_stream): Declare method.
10773 * printcmd.c (eval_command): Use string_file.
10774 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10775 * python/py-arch.c (archpy_disassemble): Use string_file.
10776 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10777 * python/py-frame.c (frapy_str): Use string_file.
10778 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10779 Use string_file.
10780 * python/py-type.c (typy_str): Use string_file.
10781 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10782 * python/py-value.c (valpy_str): Use string_file.
10783 * record-btrace.c (btrace_insn_history): Use string_file.
10784 * regcache.c (regcache_print): Use stdio_file.
10785 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10786 * remote.c (escape_buffer): Use string_file.
10787 * rust-lang.c (rust_get_disr_info): Use string_file.
10788 * serial.c (serial_open_ops_1): Use stdio_file.
10789 (do_serial_close): Use delete.
10790 * stack.c (print_frame_arg): Use string_file.
10791 (print_frame_args): Remove local mem_fileopen stream, not used.
10792 (print_frame): Use string_file.
10793 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10794 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10795 Take a 'string_file *' instead of a 'ui_file *'.
10796 * top.c (new_ui): Use stdio_file and stderr_file.
10797 (free_ui): Use delete.
10798 (execute_command_to_string): Use string_file.
10799 (quit_confirm): Use string_file.
10800 * tracepoint.c (collection_list::append_exp): Use string_file.
10801 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10802 * tui/tui-file.c: Don't include "ui-file.h".
10803 (enum streamtype, struct tui_stream): Delete.
10804 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10805 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10806 (tui_file::tui_file): New method.
10807 (tui_file_fputs): Delete.
10808 (tui_file_get_strbuf): Delete.
10809 (tui_file::puts): New method.
10810 (tui_file_adjust_strbuf): Delete.
10811 (tui_file_flush): Delete.
10812 (tui_file::flush): New method.
10813 * tui/tui-file.h: Tweak intro comment.
10814 Include ui-file.h.
10815 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10816 (tui_file_adjust_strbuf): Delete declarations.
10817 (class tui_file): New class.
10818 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10819 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10820 (tui_register_format): Use string_stream.
10821 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10822 (tui_get_function_from_frame): Use string_file.
10823 * typeprint.c (type_to_string): Use string_file.
10824 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10825 (null_stream): New global.
10826 (ui_file_delete): Delete.
10827 (ui_file::ui_file): New.
10828 (null_file_isatty): Delete.
10829 (ui_file::~ui_file): New.
10830 (null_file_rewind): Delete.
10831 (ui_file::printf): New.
10832 (null_file_put): Delete.
10833 (null_file_flush): Delete.
10834 (ui_file::putstr): New.
10835 (null_file_write): Delete.
10836 (ui_file::putstrn): New.
10837 (null_file_read): Delete.
10838 (ui_file::putc): New.
10839 (null_file_fputs): Delete.
10840 (null_file_write_async_safe): Delete.
10841 (ui_file::vprintf): New.
10842 (null_file_delete): Delete.
10843 (null_file::write): New.
10844 (null_file_fseek): Delete.
10845 (null_file::puts): New.
10846 (ui_file_data): Delete.
10847 (null_file::write_async_safe): New.
10848 (gdb_flush, ui_file_isatty): Adjust.
10849 (ui_file_put, ui_file_rewind): Delete.
10850 (ui_file_write): Adjust.
10851 (ui_file_write_for_put): Delete.
10852 (ui_file_write_async_safe, ui_file_read): Adjust.
10853 (ui_file_fseek): Delete.
10854 (fputs_unfiltered): Adjust.
10855 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10856 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10857 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10858 (set_ui_file_data): Delete.
10859 (string_file::~string_file, string_file::write)
10860 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10861 (do_ui_file_as_string, ui_file_as_string): Delete.
10862 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10863 (struct mem_file): Delete.
10864 (mem_file_new): Delete.
10865 (stdio_file::stdio_file): New.
10866 (mem_file_delete): Delete.
10867 (stdio_file::stdio_file): New.
10868 (mem_fileopen): Delete.
10869 (stdio_file::~stdio_file): New.
10870 (mem_file_rewind): Delete.
10871 (stdio_file::set_stream): New.
10872 (mem_file_put): Delete.
10873 (stdio_file::open): New.
10874 (mem_file_write): Delete.
10875 (stdio_file_magic, struct stdio_file): Delete.
10876 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10877 (stdio_file::flush): New.
10878 (stdio_file_read): Rename to ...
10879 (stdio_file::read): ... this. Adjust.
10880 (stdio_file_write): Rename to ...
10881 (stdio_file::write): ... this. Adjust.
10882 (stdio_file_write_async_safe): Rename to ...
10883 (stdio_file::write_async_safe) ... this. Adjust.
10884 (stdio_file_fputs): Rename to ...
10885 (stdio_file::puts) ... this. Adjust.
10886 (stdio_file_isatty): Delete.
10887 (stdio_file_fseek): Delete.
10888 (stdio_file::isatty): New.
10889 (stderr_file_write): Rename to ...
10890 (stderr_file::write) ... this. Adjust.
10891 (stderr_file_fputs): Rename to ...
10892 (stderr_file::puts) ... this. Adjust.
10893 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10894 (stderr_file::stderr_file): New.
10895 (tee_file_magic): Delete.
10896 (struct tee_file): Delete.
10897 (tee_file::tee_file): New.
10898 (tee_file_new): Delete.
10899 (tee_file::~tee_file): New.
10900 (tee_file_delete): Delete.
10901 (tee_file_flush): Rename to ...
10902 (tee_file::flush): ... this. Adjust.
10903 (tee_file_write): Rename to ...
10904 (tee_file::write): ... this. Adjust.
10905 (tee_file::write_async_safe): New.
10906 (tee_file_fputs): Rename to ...
10907 (tee_file::puts): ... this. Adjust.
10908 (tee_file_isatty): Rename to ...
10909 (tee_file::isatty): ... this. Adjust.
10910 * ui-file.h (struct obstack, struct ui_file): Don't
10911 forward-declare.
10912 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10913 (ui_file_write_ftype)
10914 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10915 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10916 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10917 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10918 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10919 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10920 (set_ui_file_fseek): Delete.
10921 (ui_file_data, ui_file_delete, ui_file_rewind)
10922 (struct ui_file): New.
10923 (ui_file_up): New.
10924 (class null_file): New.
10925 (null_stream): Declare.
10926 (ui_file_write_for_put, ui_file_put): Delete.
10927 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10928 Delete.
10929 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10930 (gdb_fopen, tee_file_new): Delete.
10931 (struct string_file): New.
10932 (struct stdio_file): New.
10933 (stdio_file_up): New.
10934 (struct stderr_file): New.
10935 (class tee_file): New.
10936 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10937 of a 'ui_file *'. Adjust.
10938 * ui-out.h (class ui_out) <field_stream>: Likewise.
10939 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10940 (null_stream): Delete.
10941 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10942 Adjust.
10943 * utils.h (struct ui_file): Delete forward declaration..
10944 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10945 (error_stream): Take a 'string_file &' instead of a
10946 'ui_file *'.
10947 * varobj.c (varobj_value_get_print_value): Use string_file.
10948 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10949 * gdbarch.c: Regenerate.
10950
187808b0
PA
109512017-02-02 Pedro Alves <palves@redhat.com>
10952
10953 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10954 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10955 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10956 Adjust to call gdb_print_insn instead of
10957 gdb_disassembler::print_insn.
10958 (dump_insns, do_mixed_source_and_assembly_deprecated)
10959 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10960 'gdbarch' parameter. Remove gdb_disassembler parameter.
10961 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10962 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10963 declaration.
10964 (gdb_pretty_print_insn): Re-add declaration.
10965 * record-btrace.c (btrace_insn_history): Don't allocate a
10966 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10967
7a8eb317
SM
109682017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10969
10970 * disasm.h (gdb_disassembly): Remove file_string parameter.
10971 * disasm.c (gdb_disassembly): Likewise.
10972 * cli/cli-cmds.c (print_disassembly): Adapt.
10973 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10974 * stack.c (do_gdb_disassembly): Likewise.
10975
7346ef59
AA
109762017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10977
10978 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10979 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10980 targets. And if the implicit value is longer than needed, extract
10981 the first bytes instead of the "least significant" ones.
10982
cd4007e4
MM
109832017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10984
10985 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10986 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10987 (btrace_fetch): Assert can_access_registers_ptid.
10988 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10989 validate_registers_access.
10990
cf77c34e
MM
109912017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10992
10993 * gdbthread.h (can_access_registers_ptid): New.
10994 * thread.c (can_access_registers_ptid): New.
10995
be85ce7d
PA
109962017-02-01 Pedro Alves <palves@redhat.com>
10997
10998 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10999
29b0b251
PA
110002017-01-31 Pedro Alves <palves@redhat.com>
11001
11002 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11003 Fix typos.
11004
289b5b24
PA
110052017-01-31 Pedro Alves <palves@redhat.com>
11006
11007 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11008 not used.
11009
b47413b4
PA
110102017-01-31 Pedro Alves <palves@redhat.com>
11011
11012 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11013
60adb36c
PA
110142017-01-31 Pedro Alves <palves@redhat.com>
11015
11016 * common/scoped_restore.h
11017 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11018 change the value's parameter type to T2.
11019 (make_scoped_restore): Likewise.
11020
2735833d
WT
110212017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11022 Richard Henderson <rth@redhat.com>
11023
11024 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11025 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11026 GS_BASE for older kernels.
11027 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11028 GS_BASE for older kernels.
11029 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11030 and GS_BASE to the offset table.
11031 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11032 system register group.
11033 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11034 for older kernels.
11035 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11036 amd64 ABI.
11037 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11038 AMD64_GSBASE_REGNUM.
11039 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11040 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11041 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11042 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11043 i386/64bit-segments.xml in those rules.
11044 * features/i386/64bit-segments.xml: New file.
11045 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11046 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11047 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11048 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11049 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11050 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11051 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11052 * features/i386/amd64-avx-linux.c: Regenerated.
11053 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11054 * features/i386/amd64-avx-mpx.c: Regenerated.
11055 * features/i386/amd64-avx512-linux.c: Regenerated.
11056 * features/i386/amd64-linux.c: Regenerated.
11057 * features/i386/amd64-mpx-linux.c: Regenerated.
11058 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11059 * features/i386/i386-avx-mpx.c: Regenerated.
11060 * features/i386/x32-avx-linux.c: Regenerated.
11061 * features/i386/x32-avx512-linux.c: Regenerated.
11062 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11063 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11064 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11065 * regformats/i386/amd64-linux.dat: Regenerated.
11066 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11067 * regformats/i386/x32-avx-linux.dat: Regenerated.
11068 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11069 * regformats/i386/x32-linux.dat: Regenerated.
11070
8884e97e
WT
110712017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11072
11073 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11074 Set to AMD64_NUM_REGS.
11075
7005d26a
WT
110762017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11077
11078 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11079 that checks validity of a register number.
11080
4bd2e1b2
KC
110812017-01-27 Kees Cook <keescook@google.com>
11082
11083 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11084 fetch_fpregs if target has fpa registers.
11085 (arm_linux_store_inferior_registers): Call store_fpregs if target
11086 has fpa registers.
11087
7cf1de6c
AA
110882017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11089
11090 * cris-tdep.c (cris_gdbarch_init): Remove check for
11091 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11092
874a1c8c
AT
110932017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11094
11095 * corelow.c (get_core_register_section): Check for regset
11096 existence before checking for REGSET_VARIABLE_SIZE.
11097
d8b49cf0
YQ
110982017-01-26 Yao Qi <yao.qi@linaro.org>
11099 Pedro Alves <palves@redhat.com>
11100
11101 PR gdb/20939
11102 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11103 call memory_error, save memaddr instead.
11104 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11105 negative, cal memory_error.
11106 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11107
658ca58c
YQ
111082017-01-26 Yao Qi <yao.qi@linaro.org>
11109
11110 * disasm-selftests.c (memory_error_test): New function.
11111 (_initialize_disasm_selftests): Register memory_error_test.
11112
79843d45
YQ
111132017-01-26 Yao Qi <yao.qi@linaro.org>
11114
11115 * Makefile.in (SFILES): Add disasm-selftests.c and
11116 selftest-arch.c.
11117 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11118 * disasm-selftests.c: New file.
11119 * selftest-arch.c: New file.
11120 * selftest-arch.h: New file.
11121
8cafda32
YQ
111222017-01-26 Yao Qi <yao.qi@linaro.org>
11123
11124 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11125 to bfd_arch_mep. Don't return 0 if section is not
11126 found. Call print_insn_mep.
11127
e47ad6c0
YQ
111282017-01-26 Pedro Alves <palves@redhat.com>
11129 Yao Qi <yao.qi@linaro.org>
11130
11131 * arm-tdep.c: Include "disasm.h".
11132 (gdb_print_insn_arm): Update code to get gdbarch.
11133 * disasm.c (dis_asm_read_memory): Change it to
11134 gdb_disassembler::dis_asm_read_memory.
11135 (dis_asm_memory_error): Likewise.
11136 (dis_asm_print_address): Likewise.
11137 (gdb_pretty_print_insn): Change it to
11138 gdb_disassembler::pretty_print_insn.
11139 (dump_insns): Add one argument gdb_disassemlber. All
11140 callers updated.
11141 (do_mixed_source_and_assembly_deprecated): Likewise.
11142 (do_mixed_source_and_assembly): Likewise.
11143 (do_assembly_only): Likewise.
11144 (gdb_disassembler::gdb_disassembler): New.
11145 (gdb_disassembler::print_insn): New.
11146 * disasm.h (class gdb_disassembler): New.
11147 (gdb_pretty_print_insn): Remove declaration.
11148 (gdb_disassemble_info): Likewise.
11149 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11150 (gdbscm_disasm_read_memory_worker): Update.
11151 (gdbscm_disasm_read_memory): Update.
11152 (gdbscm_disasm_memory_error): Remove.
11153 (gdbscm_disasm_print_address): Remove.
11154 (gdbscm_disassembler::gdbscm_disassembler): New.
11155 (gdbscm_print_insn_from_port): Update.
11156 * mips-tdep.c: Include disasm.h.
11157 (gdb_print_insn_mips): Update code to get gdbarch.
11158 * record-btrace.c (btrace_insn_history): Update.
11159 * spu-tdep.c: Include disasm.h.
11160 (struct spu_dis_asm_data): Remove.
11161 (struct spu_dis_asm_info): New.
11162 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11163 SPU id.
11164 (gdb_print_insn_spu): Cast disassemble_info to
11165 spu_dis_asm_info.
11166
80d75874
YQ
111672017-01-26 Yao Qi <yao.qi@linaro.org>
11168
11169 * disasm.c (do_ui_file_delete): Delete.
11170 (gdb_insn_length): Move code creating stream to ...
11171 * utils.c (null_stream): ... here. New function.
11172 * utils.h (null_stream): Declare.
11173
60685cd0
SM
111742017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11175
11176 * python/py-inferior.c (find_thread_object): Return directly
11177 from the loop. Remove "found" variable.
11178
eb1cdb62
JB
111792017-01-21 Joel Brobecker <brobecker@adacore.com>
11180
11181 GDB 7.12.1 released.
11182
b1ce6568
SM
111832017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11184
11185 * python/py-function.c (fnpy_call): Reorder declarations to have
11186 the gdbpy_enter object declared first.
11187 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11188
6f8b0407
SM
111892017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11190
fec93fb1 11191 PR python/21068
6f8b0407
SM
11192 * python/python-internal.h (PyMem_RawMalloc): Define for
11193 Python < 3.4.
11194 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11195 PyMem_RawMalloc instead of PyMem_Malloc.
11196
78cbbba8
LM
111972017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11198 Luis Machado <lgustavo@codesourcery.com>
11199
11200 * NEWS (New commands): Mention flash-erase.
11201 (New MI commands): Mention target-flash-erase.
11202 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11203 command.
11204 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11205 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11206 * target.c (flash_erase_command): New function.
11207 (initialize_targets): Add new flash-erase command.
11208 * target.h (flash_erase_command): New declaration.
11209
2132fe85
JB
112102017-01-20 Joel Brobecker <brobecker@adacore.com>
11211
11212 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11213 HAVE_SYS_PROCFS_H is defined.
11214
d1dff226
AH
112152017-01-18 Alan Hayward <alan.hayward@arm.com>
11216
11217 * remote.c (struct cached_reg): Change data into a pointer.
11218 * (stop_reply_dtr): Free data pointers before deleting vector.
11219 (process_stop_reply): Likewise.
11220 (remote_parse_stop_reply): Allocate space for data
11221
9890e433
AH
112222017-01-18 Alan Hayward <alan.hayward@arm.com>
11223
11224 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11225 MAX_REGISTER_SIZE.
11226 (amd64_pseudo_register_read_value): Likewise.
11227 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11228 (store_register_using_P): Likewise.
11229 * regcache.c (regcache_xfer_part): Likewise.
11230
7a36499a
IR
112312017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11232
11233 Split real and pseudo registers.
11234 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11235 (sparc32_pseudo_regnum): New enum.
11236 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11237 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11238 (SPARC32_CP0_REGISTERS): New macro.
11239 (sparc32_pseudo_register_name): New function.
11240 (sparc32_register_name): Use sparc32_pseudo_register_name.
11241 (sparc32_pseudo_register_type): New function.
11242 (sparc32_register_type): Use sparc32_pseudo_register_type.
11243 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11244 pseudo register numbers.
11245 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11246 (SPARC64_CP0_REGISTERS): New macro.
11247 (sparc64_pseudo_register_name): New function.
11248 (sparc64_register_name): Use sparc64_pseudo_register_name.
11249 (sparc64_pseudo_register_type): New function.
11250 (sparc64_register_type): Use sparc64_pseudo_register_type.
11251 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11252 pseudo register numbers.
11253 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11254 sparc64_store_arguments): Handle pseudo register numbers.
11255
6f8976bf
YQ
112562017-01-13 Yao Qi <yao.qi@linaro.org>
11257
11258 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11259 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11260 output.
11261 (getpkt_or_notif_sane_1): Likewise.
11262
e4241ace
YQ
112632017-01-13 Yao Qi <yao.qi@linaro.org>
11264
11265 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11266 of CC. Pass "-x c++-header" instead of "-x c".
11267
3015c064
SM
112682017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11269
11270 * remote.c (remote_can_async_p): Update comment.
11271
fde1b17d
SM
112722017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11273
11274 * linux-nat.c (linux_nat_can_async_p): Update comment.
11275
ca1ca08b
SM
112762017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11277
11278 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11279
4ad2da73
SM
112802017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11281
11282 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11283
c8b23b3f
TT
112842017-01-10 Tom Tromey <tom@tromey.com>
11285
11286 * python/py-type.c (typy_legacy_template_argument): Update.
11287 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11288 ~demangle_parse_info): Declare new members.
11289 (cp_demangled_name_to_comp): Return unique_ptr.
11290 (cp_demangled_name_parse_free)
11291 (make_cleanup_cp_demangled_name_parse_free)
11292 (cp_new_demangle_parse_info): Remove.
11293 * cp-support.c (do_demangled_name_parse_free_cleanup)
11294 (make_cleanup_cp_demangled_name_parse_free): Remove.
11295 (inspect_type, cp_canonicalize_string_full)
11296 (cp_canonicalize_string): Update.
11297 (mangled_name_to_comp): Change return type.
11298 (cp_class_name_from_physname, method_name_from_physname)
11299 (cp_func_name, cp_remove_params): Update.
11300 * cp-name-parser.y (demangle_parse_info): New constructor, from
11301 cp_new_demangle_parse_info.
11302 (~demangle_parse_info): New destructor, from
11303 cp_demangled_name_parse_free.
11304 (cp_merge_demangle_parse_infos): Update.
11305 (cp_demangled_name_to_comp): Change return type.
11306
1ac32117
TT
113072017-01-10 Tom Tromey <tom@tromey.com>
11308
11309 * top.c (prevent_dont_repeat): Change return type.
11310 * python/python.c (execute_gdb_command): Use std::string.
11311 Update.
11312 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11313 * command.h (prevent_dont_repeat): Change return type.
11314 * breakpoint.c (bpstat_do_actions_1): Update.
11315
0cf08227
TT
113162017-01-10 Tom Tromey <tom@tromey.com>
11317
11318 * value.h (scoped_value_mark::~scoped_value_mark): Call
11319 free_to_mark.
11320 (scoped_value_mark::free_to_mark): New method.
11321 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11322 scoped_value_mark.
11323
eb115069
TT
113242017-01-10 Tom Tromey <tom@tromey.com>
11325
11326 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11327 (valpy_reference_value, valpy_const_value, valpy_get_address)
11328 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11329 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11330 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11331 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11332 scoped_value_mark.
11333 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11334 * value.h (scoped_value_mark): New class.
11335
906768f9
TT
113362017-01-10 Tom Tromey <tom@tromey.com>
11337
11338 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11339 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11340 * psymtab.c (discard_psymtabs_upto): Remove.
11341 (make_cleanup_discard_psymtabs): Remove.
11342 (struct psymtab_state): Remove.
11343
bef155c3
TT
113442017-01-10 Tom Tromey <tom@tromey.com>
11345
11346 * record-full.c (record_full_save_cleanups): Remove.
11347 (record_full_save): Use gdb::unlinker.
11348 * gcore.c (do_bfd_delete_cleanup): Remove.
11349 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11350 cleanups.
11351 * dwarf2read.c (unlink_if_set): Remove.
11352 (write_psymtabs_to_index): Use gdb::unlinker.
11353 * common/gdb_unlinker.h: New file.
11354
192b62ce
TT
113552017-01-10 Tom Tromey <tom@tromey.com>
11356
11357 * windows-tdep.c (windows_xfer_shared_library): Update.
11358 * windows-nat.c (windows_make_so): Update.
11359 * utils.h (make_cleanup_bfd_unref): Remove.
11360 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11361 * symfile.h (symfile_bfd_open)
11362 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11363 * symfile.c (read_symbols, symbol_file_add)
11364 (separate_debug_file_exists): Update.
11365 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11366 (generic_load, reread_symbols): Update.
11367 * symfile-mem.c (symbol_file_add_from_memory): Update.
11368 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11369 (spu_symbol_file_add_from_memory): Update.
11370 * solist.h (struct target_so_ops) <bfd_open>: Return
11371 gdb_bfd_ref_ptr.
11372 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11373 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11374 gdb_bfd_ref_ptr.
11375 (solib_map_sections, reload_shared_libraries_1): Update.
11376 * solib-svr4.c (enable_break): Update.
11377 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11378 * solib-frv.c (enable_break2): Update.
11379 * solib-dsbt.c (enable_break): Update.
11380 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11381 gdb_bfd_ref_ptr.
11382 (darwin_solib_get_all_image_info_addr_at_init): Update.
11383 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11384 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11385 * record-full.c (record_full_save): Update.
11386 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11387 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11388 * minidebug.c (find_separate_debug_file_in_section): Return
11389 gdb_bfd_ref_ptr.
11390 * machoread.c (macho_add_oso_symfile): Change abfd to
11391 gdb_bfd_ref_ptr.
11392 (macho_symfile_read_all_oso): Update.
11393 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11394 (macho_symfile_read): Update.
11395 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11396 (jit_bfd_try_read_symtab): Update.
11397 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11398 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11399 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11400 gdb_bfd_ref_ptr.
11401 (gdb_bfd_ref_policy): New struct.
11402 (gdb_bfd_ref_ptr): New typedef.
11403 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11404 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11405 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11406 gdb_bfd_ref_ptr.
11407 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11408 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11409 (gcore_command): Update.
11410 * exec.c (exec_file_attach): Update.
11411 * elfread.c (elf_symfile_read): Update.
11412 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11413 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11414 (open_and_init_dwo_file): Update.
11415 (open_dwp_file): Return gdb_bfd_ref_ptr.
11416 (open_and_init_dwp_file): Update.
11417 * corelow.c (core_open): Update.
11418 * compile/compile-object-load.c (compile_object_load): Update.
11419 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11420 * coffread.c (coff_symfile_read): Update.
11421 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11422 gdb_bfd_ref_ptr. Rename.
11423 (dump_bfd_file, restore_command): Update.
11424 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11425 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11426 (find_separate_debug_file_by_buildid): Update.
11427
50315b21
TT
114282017-01-10 Tom Tromey <tom@tromey.com>
11429
11430 * common/gdb_ref_ptr.h: New file.
11431 * python/py-ref.h (struct gdbpy_ref_policy): New.
11432 (gdbpy_ref): Now a typedef.
11433
fc4007c9
TT
114342017-01-10 Tom Tromey <tom@tromey.com>
11435
11436 * utils.h (make_cleanup_htab_delete): Don't declare.
11437 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11438 Remove.
11439 * linespec.c (decode_compound_collector): Add constructor,
11440 destructor.
11441 (lookup_prefix_sym): Remove cleanup.
11442 (symtab_collector): Add constructor, destructor.
11443 (collect_symtabs_from_filename): Remove cleanup.
11444 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11445 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11446 Use htab_up.
11447 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11448 * dwarf2read.c (dw2_expand_symtabs_matching)
11449 (dw2_map_symbol_filenames, dwarf_decode_macros)
11450 (write_psymtabs_to_index): Use htab_up.
11451 * dwarf2loc.c (func_verify_no_selftailcall)
11452 (call_site_find_chain_1, func_verify_no_selftailcall)
11453 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11454 std::vector, gdb::unique_xmalloc_ptr.
11455 (call_sitep): Remove typedef.
11456 (dwarf2_locexpr_baton_eval): Remove unused variable.
11457
8dbcee67
TT
114582017-01-10 Tom Tromey <tom@tromey.com>
11459
11460 * python/python-internal.h (make_cleanup_py_decref)
11461 (make_cleanup_py_xdecref): Don't declare.
11462 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11463 (py_xdecref, make_cleanup_py_xdecref): Remove.
11464
13df46cc
TT
114652017-01-10 Tom Tromey <tom@tromey.com>
11466
11467 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11468 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11469
06fc9bf7
TT
114702017-01-10 Tom Tromey <tom@tromey.com>
11471
11472 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11473
830a4934
TT
114742017-01-10 Tom Tromey <tom@tromey.com>
11475
11476 * python/py-utils.c (unicode_to_encoded_string)
11477 (python_string_to_target_string)
11478 (python_string_to_target_python_string)
11479 (python_string_to_host_string, gdbpy_obj_to_string)
11480 (get_addr_from_python): Use gdbpy_ref.
11481
4586d543
TT
114822017-01-10 Tom Tromey <tom@tromey.com>
11483
11484 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11485 gdbpy_ref.
11486
59876f8f
TT
114872017-01-10 Tom Tromey <tom@tromey.com>
11488
11489 * python/python.c (eval_python_command, gdbpy_decode_line)
11490 (gdbpy_run_events, gdbpy_start_type_printers)
11491 (gdbpy_apply_type_printers): Use gdbpy_ref.
11492
97d83487
TT
114932017-01-10 Tom Tromey <tom@tromey.com>
11494
11495 * python/py-param.c (get_doc_string, compute_enum_values): Use
11496 gdbpy_ref.
11497
9205649a
TT
114982017-01-10 Tom Tromey <tom@tromey.com>
11499
11500 * python/py-inferior.c (find_thread_object, build_inferior_list):
11501 Use gdbpy_ref.
11502
74c49d45
TT
115032017-01-10 Tom Tromey <tom@tromey.com>
11504
11505 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11506
16361ffb
TT
115072017-01-10 Tom Tromey <tom@tromey.com>
11508
11509 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11510 gdbpy_ref.
11511
905f2cca
TT
115122017-01-10 Tom Tromey <tom@tromey.com>
11513
11514 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11515 extra incref.
11516 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11517 Use gdbpy_ref.
11518
64081434
TT
115192017-01-10 Tom Tromey <tom@tromey.com>
11520
11521 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11522 gdbpy_ref.
11523
59e9e831
TT
115242017-01-10 Tom Tromey <tom@tromey.com>
11525
11526 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11527 decref results of PyArg_ParseTupleAndKeywords.
11528
9de10f6d
TT
115292017-01-10 Tom Tromey <tom@tromey.com>
11530
11531 * python/python.c (python_run_simple_file): Use
11532 unique_xmalloc_ptr, gdbpy_ref.
11533
2bd5759d
TT
115342017-01-10 Tom Tromey <tom@tromey.com>
11535
11536 * python/py-prettyprint.c (print_stack_unless_memory_error)
11537 (print_string_repr, print_children): Use gdbpy_ref.
11538 (dummy_python_frame): New class.
11539 (dummy_python_frame::dummy_python_frame): Rename from
11540 push_dummy_python_frame.
11541 (py_restore_tstate): Remove.
11542
3b4e0e01
TT
115432017-01-10 Tom Tromey <tom@tromey.com>
11544
11545 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11546
17a22718
TT
115472017-01-10 Tom Tromey <tom@tromey.com>
11548
11549 * python/python.c (ensure_python_env, restore_python_env):
11550 Remove.
11551 * python/python-internal.h (ensure_python_env): Don't declare.
11552 * varobj.h (varobj_ensure_python_env): Don't declare.
11553 * varobj.c (varobj_ensure_python_env): Remove.
11554
68cdc557
TT
115552017-01-10 Tom Tromey <tom@tromey.com>
11556
11557 * varobj.c (varobj_value_get_print_value): Use
11558 gdbpy_enter_varobj.
11559
1eba6383
TT
115602017-01-10 Tom Tromey <tom@tromey.com>
11561
11562 * python/py-prettyprint.c (print_string_repr, print_children):
11563 Update.
11564 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11565 of "encoding".
11566 * varobj.c (varobj_value_get_print_value): Update.
11567 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11568
bde7b3e3
TT
115692017-01-10 Tom Tromey <tom@tromey.com>
11570
11571 * varobj.c (varobj_get_display_hint)
11572 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11573 (varobj_set_visualizer, free_variable): Use
11574 gdbpy_enter_varobj.
11575
a7785f8c
TT
115762017-01-10 Tom Tromey <tom@tromey.com>
11577
11578 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11579 (do_finish_initialization): New function. Use gdbpy_ref.
11580 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11581 do_finish_initialization.
11582
2865bfce
TT
115832017-01-10 Tom Tromey <tom@tromey.com>
11584
11585 * python/py-param.c (get_set_value, get_show_value): Use
11586 gdbpy_enter, gdbpy_ref.
11587
0e9dcc75
TT
115882017-01-10 Tom Tromey <tom@tromey.com>
11589
11590 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11591
12a5cedd
TT
115922017-01-10 Tom Tromey <tom@tromey.com>
11593
11594 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11595
788f2586
TT
115962017-01-10 Tom Tromey <tom@tromey.com>
11597
11598 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11599 Use gdbpy_enter_varobj.
11600
6cd67bea
TT
116012017-01-10 Tom Tromey <tom@tromey.com>
11602
11603 * varobj.c (gdbpy_enter_varobj): New constructor.
11604 * python/python-internal.h (gdbpy_enter_varobj): New class.
11605 * python/py-varobj.c (py_varobj_get_iterator): Use
11606 gdbpy_enter_varobj.
11607
14b122bf
TT
116082017-01-10 Tom Tromey <tom@tromey.com>
11609
11610 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11611 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11612 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11613 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11614 unique_xmalloc_ptr.
11615 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11616
bf1ca3b9
TT
116172017-01-10 Tom Tromey <tom@tromey.com>
11618
11619 * python/py-xmethods.c (invoke_match_method): Use
11620 gdbpy_ref.
11621
572a5524
TT
116222017-01-10 Tom Tromey <tom@tromey.com>
11623
11624 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11625 gdbpy_enter, gdbpy_ref.
11626
396a78b6
TT
116272017-01-10 Tom Tromey <tom@tromey.com>
11628
11629 * python/python.c (python_interactive_command): Use gdbpy_enter.
11630
a88b13c7
TT
116312017-01-10 Tom Tromey <tom@tromey.com>
11632
11633 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11634 gdbpy_ref.
11635
e9f0c363
TT
116362017-01-10 Tom Tromey <tom@tromey.com>
11637
11638 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11639 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11640
6349f452
TT
116412017-01-10 Tom Tromey <tom@tromey.com>
11642
11643 * utils.h (htab_deleter): New struct.
11644 (htab_up): New typedef.
11645 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11646 gdbpy_enter, gdbpy_ref, htab_up.
11647
c0171de6
TT
116482017-01-10 Tom Tromey <tom@tromey.com>
11649
11650 * python/py-unwind.c (pending_frame_invalidate): Remove.
11651 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11652
f18e226f
TT
116532017-01-10 Tom Tromey <tom@tromey.com>
11654
11655 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11656 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11657
c57af3f1
TT
116582017-01-10 Tom Tromey <tom@tromey.com>
11659
11660 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11661
60e600ec
TT
116622017-01-10 Tom Tromey <tom@tromey.com>
11663
11664 * python/python.c (gdbpy_eval_from_control_command)
11665 (gdbpy_source_script, gdbpy_run_events)
11666 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11667 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11668 gdbpy_enter.
11669
bf7da5b0
TT
116702017-01-10 Tom Tromey <tom@tromey.com>
11671
11672 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11673
2d38bced
TT
116742017-01-10 Tom Tromey <tom@tromey.com>
11675
11676 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11677
07bc7329
TT
116782017-01-10 Tom Tromey <tom@tromey.com>
11679
11680 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11681 (python_on_inferior_call_pre, python_on_inferior_call_post)
11682 (python_on_memory_change, python_on_register_change)
11683 (python_inferior_exit, python_new_objfile, add_thread_object)
11684 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11685
6e7c365e
TT
116862017-01-10 Tom Tromey <tom@tromey.com>
11687
11688 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11689 (bpfinishpy_handle_exit): Use gdbpy_enter.
11690
6ba0cd40
TT
116912017-01-10 Tom Tromey <tom@tromey.com>
11692
11693 * python/py-cmd.c (cmdpy_destroyer)
11694 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11695 gdbpy_enter.
11696
de2dc875
TT
116972017-01-10 Tom Tromey <tom@tromey.com>
11698
11699 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11700 gdbpy_enter.
11701 (gdbpy_breakpoint_has_cond): Likewise.
11702
4ecee2c4
TT
117032017-01-10 Tom Tromey <tom@tromey.com>
11704
11705 * python/python.c (gdbpy_enter): New constructor.
11706 (~gdbpy_enter): New destructor.
11707 (restore_python_env, ensure_python_env): Rewrite.
11708 * python/python-internal.h (gdbpy_enter): New class.
11709
37fce74f
TT
117102017-01-10 Tom Tromey <tom@tromey.com>
11711
11712 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11713
53a0cca3
TT
117142017-01-10 Tom Tromey <tom@tromey.com>
11715
11716 * python/py-value.c (value_has_field, get_field_flag)
11717 (get_field_type, valpy_getitem, convert_value_from_python): Use
11718 gdbpy_ref.
11719
ff3724f5
TT
117202017-01-10 Tom Tromey <tom@tromey.com>
11721
11722 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11723 gdbpy_ref.
11724
0700aea5
TT
117252017-01-10 Tom Tromey <tom@tromey.com>
11726
11727 * python/py-prettyprint.c (search_pp_list)
11728 (find_pretty_printer_from_objfiles)
11729 (find_pretty_printer_from_progspace)
11730 (find_pretty_printer_from_gdb, find_pretty_printer)
11731 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11732 gdbpy_ref.
11733
1bb44c9f
TT
117342017-01-10 Tom Tromey <tom@tromey.com>
11735
11736 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11737
87ce03fd
TT
117382017-01-10 Tom Tromey <tom@tromey.com>
11739
11740 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11741 (ltpy_get_all_source_lines): Use gdbpy_ref.
11742
ee0a3fb8
TT
117432017-01-10 Tom Tromey <tom@tromey.com>
11744
11745 * python/py-framefilter.c (extract_sym, extract_value)
11746 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11747 gdbpy_ref.
11748
bf2a52fa
TT
117492017-01-10 Tom Tromey <tom@tromey.com>
11750
11751 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11752
f59fe7f8
TT
117532017-01-10 Tom Tromey <tom@tromey.com>
11754
11755 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11756
80bd970a
TT
117572017-01-10 Tom Tromey <tom@tromey.com>
11758
11759 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11760 gdbpy_ref.
11761
d1b3de2e
TT
117622017-01-10 Tom Tromey <tom@tromey.com>
11763
11764 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11765
3bb43384
TT
117662017-01-10 Tom Tromey <tom@tromey.com>
11767
11768 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11769 (typy_range): Use gdbpy_ref.
11770
abf5651e
TT
117712017-01-10 Tom Tromey <tom@tromey.com>
11772
11773 * python/py-threadevent.c (create_thread_event_object): Use
11774 gdbpy_ref.
11775 * python/py-stopevent.c (create_stop_event_object): Simplify.
11776 (emit_stop_event): Use gdbpy_ref.
11777 * python/py-signalevent.c (create_signal_event_object): Use
11778 gdbpy_ref.
11779 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11780 (emit_new_objfile_event, create_clear_objfiles_event_object)
11781 (emit_clear_objfiles_event): Use gdbpy_ref.
11782 * python/py-infevents.c (create_inferior_call_event_object)
11783 (create_register_changed_event_object)
11784 (create_memory_changed_event_object, emit_inferior_call_event)
11785 (emit_memory_changed_event, emit_register_changed_event): Use
11786 gdbpy_ref.
11787 * python/py-exitedevent.c (create_exited_event_object)
11788 (emit_exited_event): Use gdbpy_ref.
11789 * python/py-event.h (evpy_emit_event): Remove
11790 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11791 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11792 * python/py-continueevent.c (emit_continue_event): Use
11793 gdbpy_ref.
11794 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11795 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11796 gdbpy_ref.
11797 * python/py-bpevent.c (create_breakpoint_event_object): Use
11798 gdbpy_ref.
11799
a68ff33e
TT
118002017-01-10 Tom Tromey <tom@tromey.com>
11801
11802 * python/py-ref.h: New file.
11803
7becfd03
SM
118042017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11805
11806 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11807 void.
11808 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11809 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11810 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11811 * ui-out.c (ui_out::redirect): Likewise.
11812 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11813 * cli/cli-logging.c (set_logging_redirect): Update call site of
11814 ui_out::redirect.
11815 (handle_redirections): Likewise.
11816 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11817 * top.c (execute_command_to_string): Likewise.
11818 * utils.c (do_ui_out_redirect_pop): Likewise.
11819
df294654
SM
118202017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11821
11822 * stack.c (_initialize_stack): Update "frame" command help message.
11823
f5e6296e
IB
118242017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11825
11826 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11827
0e2d6fa6
YQ
118282017-01-06 Yao Qi <yao.qi@linaro.org>
11829
11830 * x86-linux-nat.h: Include gdb_proc_service.h.
11831
44d6d3f9
YQ
118322017-01-06 Yao Qi <yao.qi@linaro.org>
11833
11834 * ser-base.h: Include serial.h.
11835
656731fe
YQ
118362017-01-06 Yao Qi <yao.qi@linaro.org>
11837
11838 * ppc-linux-tdep.h: Include ppc-tdep.h.
11839
1ca8f924
YQ
118402017-01-06 Yao Qi <yao.qi@linaro.org>
11841
11842 * nat/amd64-linux-siginfo.h: Include signal.h.
11843
bc3008c4
YQ
118442017-01-06 Yao Qi <yao.qi@linaro.org>
11845
11846 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11847
66c80d03
YQ
118482017-01-06 Yao Qi <yao.qi@linaro.org>
11849
11850 * mi/mi-parse.h: Include mi-cmds.h.
11851
051d2dda
YQ
118522017-01-06 Yao Qi <yao.qi@linaro.org>
11853
11854 * inf-loop.c: Don't include "target.h".
11855 * inf-loop.h: Include it here.
11856
8018d34f
YQ
118572017-01-06 Yao Qi <yao.qi@linaro.org>
11858
11859 * dfp.h: Include "dboulest.h" and "expression.h".
11860
c0b8369c
YQ
118612017-01-06 Yao Qi <yao.qi@linaro.org>
11862
11863 * ax-gdb.h: Include "ax.h".
11864
ad5cba2a
YQ
118652017-01-06 Yao Qi <yao.qi@linaro.org>
11866
11867 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11868 with nat/gdb_ptrace.h.
11869
1c33cd7f
YQ
118702017-01-05 Yao Qi <yao.qi@linaro.org>
11871
11872 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11873 new line.
11874 (mips64_fbsd_sigframe_init): Likewise.
11875
c988ac1d
JB
118762017-01-04 John Baldwin <jhb@FreeBSD.org>
11877
11878 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11879 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11880
b268007c
JB
118812017-01-04 John Baldwin <jhb@FreeBSD.org>
11882
11883 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11884 * NEWS: Mention new FreeBSD/mips native configuration.
11885 * config/mips/fbsd.mh: New file.
11886 * configure.host: Add mips*-*-freebsd*.
11887 * mips-fbsd-nat.c: New file.
11888
387360da
JB
118892017-01-04 John Baldwin <jhb@FreeBSD.org>
11890
11891 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11892 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11893 * NEWS: Mention new FreeBSD/mips target.
11894 * configure.tgt: Add mips*-*-freebsd*.
11895 * mips-fbsd-tdep.c: New file.
11896 * mips-fbsd-tdep.h: New file.
11897
2aaaf250
YQ
118982017-01-04 Yao Qi <yao.qi@linaro.org>
11899
11900 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11901 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11902
61baf725
JB
119032017-01-01 Joel Brobecker <brobecker@adacore.com>
11904
6dbb839a 11905 Update copyright year range in all GDB files.
61baf725 11906
c113e7ff 119072017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 11908
c113e7ff 11909 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 11910
c113e7ff 11911For older changes see ChangeLog-2016.
c906108c
SS
11912\f
11913Local Variables:
11914mode: change-log
11915left-margin: 8
11916fill-column: 74
11917version-control: never
57da7796 11918coding: utf-8
c906108c 11919End: