(open_and_init_dwp_file): Protect against some segvs
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
08302ed2
DE
12017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2
3 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4 having NULL cus or tus.
5
96a5a1d3
UW
62017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7
8 * arm-tdep.c: (convert_from_extended): Remove.
9 (convert_to_extended): Likewise.
10 (arm_extract_return_value): Use convert_typed_floating.
11 (arm_store_return_value): Likewise.
12
13 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
14 * sh-tdep.c: Do not include "floatformat.h".
15 (sh_littlebyte_bigword_type): New function.
16 (sh_register_convert_to_virtual): Use convert_typed_floating.
17 (sh_register_convert_to_raw): Likewise.
18 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
19 (sh64_littlebyte_bigword_type): New function.
20 (sh64_extract_return_value): Use convert_typed_floating.
21 (sh64_register_convert_to_virtual): Likewise.
22 (sh64_register_convert_to_raw): Likewise.
23
0db7851f
UW
242017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
25
26 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
27 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
28
29 * gdbtypes.h (union type_specific): Make field floatformat hold
30 just a single struct floatformat, not an array.
31 (floatformat_from_type): Move here.
32 * gdbtypes.c (floatformat_from_type): Move here. Update to
33 changed TYPE_FLOATFORMAT definition.
34 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
35 (recursive_dump_type): Likewise.
36 (init_float_type): Install correct floatformat for byte order.
37 (arch_float_type): Likewise.
38
77b7c781
UW
392017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
40
41 * gdbtypes.c (init_type): Change incoming argument from
42 length-in-bytes to length-in-bits. Assert length is a
43 multiple of TARGET_CHAR_BITS.
44 (arch_type, arch_flags_type): Likewise.
45 (init_integer_type): Update call to init_type.
46 (init_character_type): Likewise.
47 (init_boolean_type): Likewise.
48 (init_float_type): Likewise.
49 (init_decfloat_type): Likewise.
50 (init_complex_type): Likewise.
51 (init_pointer_type): Likewise.
52 (objfile_type): Likewise.
53 (arch_integer_type): Update call to arch_type.
54 (arch_character_type): Likewise.
55 (arch_boolean_type): Likewise.
56 (arch_float_type): Likewise.
57 (arch_decfloat_type): Likewise.
58 (arch_complex_type): Likewise.
59 (arch_pointer_type): Likewise.
60 (gdbtypes_post_init): Likewise.
61
62 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
63 (read_base_type): Likewise.
64 * mdebugread.c (basic_type): Likewise.
65 * stabsread.c (dbx_init_float_type): Likewise.
66 (rs6000_builtin_type): Likewise.
67 (read_range_type): Likewise. Also, fix call to init_integer_type
68 with erroneous length argument.
69
70 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
71 * d-lang.c (build_d_types): Likewise.
72 * f-lang.c (build_fortran_types): Likewise.
73 * go-lang.c (build_go_types): Likewise.
74 * opencl-lang.c (build_opencl_types): Likewise.
75 * jit.c (finalize_symtab): Likewise.
76 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
77 (build_std_type_info_type): Likewise.
78 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
79 update call to arch_flags_type.
80
81 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
82 arch_type.
83 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
84 * windows-tdep.c (windows_get_tlb_type): Likewise.
85
86 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
87 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
88 * m32c-tdep.c (make_types): Likewise.
89 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
90 (rl78_psw_type): Update call to arch_flags_type.
91 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
92 * rx-tdep.c (rx_psw_type): Likewise.
93 (rx_fpsw_type): Likewise.
94 * sparc-tdep.c (sparc_psr_type): Likewise.
95 (sparc_fsr_type): Likewise.
96 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
97 (sparc64_ccr_type): Likewise.
98 (sparc64_fsr_type): Likewise.
99 (sparc64_fprs_type): Likewise.
100
f21b4d5c
TT
1012017-09-27 Tom Tromey <tom@tromey.com>
102
103 * findcmd.c (find_command): Constify.
104
643c2ffa
TT
1052017-09-27 Tom Tromey <tom@tromey.com>
106
107 * ada-tasks.c (task_command_1, task_command): Constify.
108
510e5e56
TT
1092017-09-27 Tom Tromey <tom@tromey.com>
110
111 * symtab.c (maintenance_print_symbol_cache)
112 (maintenance_flush_symbol_cache)
113 (maintenance_print_symbol_cache_statistics): Constify.
114
e503b191
TT
1152017-09-27 Tom Tromey <tom@tromey.com>
116
117 * inferior.c (detach_inferior_command, kill_inferior_command)
118 (inferior_command): Constify.
119
4e001312
TT
1202017-09-27 Tom Tromey <tom@tromey.com>
121
122 * regcache.c (regcache_print, maintenance_print_registers)
123 (maintenance_print_raw_registers)
124 (maintenance_print_cooked_registers)
125 (maintenance_print_register_groups)
126 (maintenance_print_remote_registers): Constify.
127
77763700
TT
1282017-09-27 Tom Tromey <tom@tromey.com>
129
130 * printcmd.c (map_display_numbers, undisplay_command)
131 (enable_disable_display_command, enable_display_command)
132 (disable_display_command): Constify.
133
4495129a
TT
1342017-09-27 Tom Tromey <tom@tromey.com>
135
136 * breakpoint.h (delete_command): Don't declare.
137 * breakpoint.c (delete_command, enable_once_command)
138 (enable_count_command, enable_delete_command, breakpoint_1)
139 (maintenance_info_breakpoints, stopin_command, stopat_command)
140 (delete_command, delete_trace_command, save_breakpoints)
141 (save_breakpoints_command, save_tracepoints_command): Constify.
142
3088cf40
TT
1432017-09-27 Tom Tromey <tom@tromey.com>
144
145 * macrocmd.c (macro_expand_command, macro_expand_once_command)
146 (skip_ws, extract_identifier, macro_define_command)
147 (macro_undef_command, macro_list_command): Constify.
148
69f476a3
TT
1492017-09-27 Tom Tromey <tom@tromey.com>
150
151 * infcmd.c (environment_info, set_environment_command)
152 (unset_environment_command, path_info, info_proc_cmd_1)
153 (info_proc_cmd_mappings, info_proc_cmd_stat)
154 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
155 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
156
c4a3e68e
TT
1572017-09-27 Tom Tromey <tom@tromey.com>
158
159 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
160 Constify.
161
c9d31bd6
TT
1622017-09-27 Tom Tromey <tom@tromey.com>
163
164 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
165
1f3f85eb
TT
1662017-09-27 Tom Tromey <tom@tromey.com>
167
168 * demangle.c (demangle_command): Constify.
169
9c504b5d
TT
1702017-09-27 Tom Tromey <tom@tromey.com>
171
172 * progspace.c (maintenance_info_program_spaces_command):
173 Constify.
174
6663cf91
TT
1752017-09-27 Tom Tromey <tom@tromey.com>
176
177 * compile/compile.c (check_raw_argument, compile_file_command)
178 (compile_code_command, compile_print_command): Constify.
179
34e5fa26
TT
1802017-09-27 Tom Tromey <tom@tromey.com>
181
182 * reggroups.c (maintenance_print_reggroups): Constify.
183
8384c356
TT
1842017-09-27 Tom Tromey <tom@tromey.com>
185
186 * dwarf2read.c (save_gdb_index_command): Constify.
187
884beb0c
TT
1882017-09-27 Tom Tromey <tom@tromey.com>
189
190 * stap-probe.c (info_probes_stap_command): Constify.
191
e0b2930c
TT
1922017-09-27 Tom Tromey <tom@tromey.com>
193
194 * fork-child.c (unset_exec_wrapper_command): Constify.
195
f938677d
TT
1962017-09-27 Tom Tromey <tom@tromey.com>
197
198 * btrace.c (get_uint, get_context_size, no_chunk)
199 (maint_btrace_packet_history_cmd)
200 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
201 (maint_info_btrace_cmd): Constify.
202
8949cb87
TT
2032017-09-27 Tom Tromey <tom@tromey.com>
204
205 * reverse.c (delete_bookmark_command): Constify.
206
ac88e2de
TT
2072017-09-27 Tom Tromey <tom@tromey.com>
208
209 * remote.c (set_memory_packet_size)
210 (set_memory_write_packet_size, show_memory_write_packet_size)
211 (set_memory_read_packet_size, show_memory_read_packet_size)
212 (compare_sections_command, packet_command, remote_put_command)
213 (remote_get_command, remote_delete_command): Constify.
214
bd4c9dfe
TT
2152017-09-27 Tom Tromey <tom@tromey.com>
216
217 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
218 (set_mipsfpu_double_command, set_mipsfpu_none_command)
219 (set_mipsfpu_auto_command): Constify.
220
5e93d4c6
TT
2212017-09-27 Tom Tromey <tom@tromey.com>
222
223 * cli/cli-cmds.h (cd_command): Constify.
224 * cli/cli-cmds.c (cd_command): Constify.
225
fc41a75b
TT
2262017-09-27 Tom Tromey <tom@tromey.com>
227
228 * thread.c (thread_name_command, thread_find_command): Constify.
229
67810076
TT
2302017-09-27 Tom Tromey <tom@tromey.com>
231
232 * probe.c (enable_probes_command, disable_probes_command):
233 Constify.
234
1d8b34a7
TT
2352017-09-27 Tom Tromey <tom@tromey.com>
236
237 * symfile.c (symbol_file_command): Constify.
238 * gdbcore.h (deprecated_file_changed_hook): Constify.
239 * exec.c (deprecated_file_changed_hook, exec_file_command)
240 (file_command): Constify.
241 * defs.h (symbol_file_command): Constify.
242
442019e1
TT
2432017-09-27 Tom Tromey <tom@tromey.com>
244
245 * remote-fileio.c (set_system_call_allowed)
246 (show_system_call_allowed): Constify.
247
2983f7cb
TT
2482017-09-27 Tom Tromey <tom@tromey.com>
249
250 * tracepoint.c (delete_trace_variable_command)
251 (tfind_end_command, tfind_start_command, tfind_pc_command)
252 (tfind_tracepoint_command, tfind_line_command)
253 (tfind_range_command, tfind_outside_command): Constify.
254
4fd41b24
TT
2552017-09-27 Tom Tromey <tom@tromey.com>
256
257 * ax-gdb.c (maint_agent_printf_command, agent_command)
258 (agent_eval_command): Constify.
259
f2fc3015
TT
2602017-09-27 Tom Tromey <tom@tromey.com>
261
262 * tracepoint.c (info_scope_command): Constify.
263 * python/python.c (gdbpy_decode_line): Constify.
264 * python/py-breakpoint.c (bppy_init): Constify.
265 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
266 * location.h: (new_linespec_location)
267 (string_to_event_location_basic, string_to_event_location):
268 Constify.
269 * location.c (new_linespec_location)
270 (string_to_event_location_basic, string_to_event_location):
271 Constify.
272 * linespec.h (decode_line_with_current_source)
273 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
274 * linespec.c (linespec_lex_to_end)
275 (decode_line_with_current_source)
276 (decode_line_with_last_displayed): Constify.
277 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
278 Constify.
279 * cli/cli-cmds.c (edit_command, list_command): Constify.
280 * breakpoint.h (until_break_command, watch_command_wrapper)
281 (awatch_command_wrapper, rwatch_command_wrapper)
282 (init_ada_exception_breakpoint): Constify.
283 * breakpoint.c (break_command_1, dprintf_command)
284 (break_range_command, watch_command_wrapper)
285 (rwatch_command_wrapper, awatch_command_wrapper)
286 (until_break_command, init_ada_exception_breakpoint)
287 (strace_marker_create_sals_from_location, trace_command)
288 (ftrace_command, strace_command, struct tracepoint): Constify.
289 * ax-gdb.c (agent_command_1): Constify.
290 * ada-lang.c (ada_exception_sal): Constify.
291
8c2f95f4
TT
2922017-09-27 Tom Tromey <tom@tromey.com>
293
294 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
295 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
296 (get_context_size, no_chunk, get_insn_history_modifiers)
297 (cmd_record_insn_history, get_call_history_modifiers)
298 (cmd_record_call_history): Constify.
299
a0d65762
TT
3002017-09-27 Tom Tromey <tom@tromey.com>
301
302 * source.c (show_substitute_path_command)
303 (unset_substitute_path_command, set_substitute_path_command):
304 Constify.
305
58971144
TT
3062017-09-27 Tom Tromey <tom@tromey.com>
307
308 * typeprint.c (maintenance_print_type): Constify.
309 * maint.c (maintenance_dump_me, maintenance_demangle)
310 (maintenance_time_display, maintenance_info_sections)
311 (maintenance_print_statistics, maintenance_deprecate)
312 (maintenance_undeprecate): Constify.
313 (maintenance_do_deprecate): Constify. Use std::string.
314 (maintenance_selftest): Constify.
315 * gdbtypes.h (maintenance_print_type): Constify.
316
c482f52c
TT
3172017-09-27 Tom Tromey <tom@tromey.com>
318
319 * hppa-tdep.c (unwind_command): Constify.
320
e100df1a
TT
3212017-09-27 Tom Tromey <tom@tromey.com>
322
323 * target-descriptions.c (unset_tdesc_filename_cmd)
324 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
325 Constify.
326
31d56ade
TT
3272017-09-27 Tom Tromey <tom@tromey.com>
328
329 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
330
b961da0b
TT
3312017-09-27 Tom Tromey <tom@tromey.com>
332
333 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
334
e2d8ae16
TT
3352017-09-27 Tom Tromey <tom@tromey.com>
336
337 * tui/tui-regs.c (tui_reg_command): Constify.
338
863779b0
TT
3392017-09-27 Tom Tromey <tom@tromey.com>
340
341 * skip.c (skip_file_command, skip_function_command)
342 (skip_enable_command, skip_disable_command, skip_delete_command):
343 Constify.
344
cdb34d4a
TT
3452017-09-27 Tom Tromey <tom@tromey.com>
346
347 * record-btrace.c (cmd_record_btrace_bts_start)
348 (cmd_record_btrace_pt_start): Constify.
349
e99c83e7
TT
3502017-09-27 Tom Tromey <tom@tromey.com>
351
352 * symmisc.c (maintenance_print_symbols)
353 (maintenance_print_msymbols, maintenance_print_objfiles)
354 (maintenance_info_symtabs, maintenance_check_symtabs)
355 (maintenance_expand_symtabs, maintenance_info_line_tables):
356 Constify.
357
32faf971
TT
3582017-09-27 Tom Tromey <tom@tromey.com>
359
360 * top.c (new_ui_command): Constify.
361
2cf311eb
TT
3622017-09-27 Tom Tromey <tom@tromey.com>
363
364 * symfile.c (add_symbol_file_command)
365 (remove_symbol_file_command, list_overlays_command)
366 (map_overlay_command, unmap_overlay_command)
367 (overlay_auto_command, overlay_manual_command)
368 (overlay_off_command, overlay_load_command): Constify.
369
e6738699
TT
3702017-09-27 Tom Tromey <tom@tromey.com>
371
372 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
373 (info_spu_mailbox_command, info_spu_dma_command)
374 (info_spu_proxydma_command): Constify.
375
aa360cd5
TT
3762017-09-27 Tom Tromey <tom@tromey.com>
377
378 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
379
898241a5
TT
3802017-09-27 Tom Tromey <tom@tromey.com>
381
382 * cli/cli-script.c (user_defined_command): Constify.
383
2d0ac106
TT
3842017-09-27 Tom Tromey <tom@tromey.com>
385
386 * cli/cli-dump.c (dump_memory_command, dump_value_command)
387 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
388 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
389 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
390 (dump_binary_value, append_binary_memory, append_binary_value):
391 Constify.
392 (struct dump_context) <func>: Constify.
393 (add_dump_command): Update.
394
dede02ce
TT
3952017-09-27 Tom Tromey <tom@tromey.com>
396
397 * cli/cli-cmds.c (show_version, show_configuration)
398 (source_command, show_user): Constify.
399
d3cb6b99
TT
4002017-09-27 Tom Tromey <tom@tromey.com>
401
402 * target.c (maintenance_print_target_stack): Constify.
403
1970a12f
TT
4042017-09-27 Tom Tromey <tom@tromey.com>
405
406 * interps.c (interpreter_exec_cmd): Constify.
407
41243651
TT
4082017-09-27 Tom Tromey <tom@tromey.com>
409
410 * record-full.c (cmd_record_full_restore): Constify.
411
4465d9db
TT
4122017-09-27 Tom Tromey <tom@tromey.com>
413
414 * memattr.c (enable_mem_command, disable_mem_command)
415 (delete_mem_command): Constify.
416
ad25e423
TT
4172017-09-27 Tom Tromey <tom@tromey.com>
418
419 * value.c (show_convenience): Constify.
420
d64097b1
TT
4212017-09-27 Tom Tromey <tom@tromey.com>
422
423 * gdbcore.h (core_file_command): Update.
424 * corefile.c (core_file_command): Constify.
425
4d4589ef
TT
4262017-09-27 Tom Tromey <tom@tromey.com>
427
428 * user-regs.c (maintenance_print_user_registers): Constify.
429
32a7bf17
TT
4302017-09-27 Tom Tromey <tom@tromey.com>
431
432 * cp-namespace.c (maintenance_cplus_namespace): Constify.
433
4a475551
TT
4342017-09-27 Tom Tromey <tom@tromey.com>
435
436 * cp-support.c (first_component_command): Constify.
437
990b9f9f
TT
4382017-09-27 Tom Tromey <tom@tromey.com>
439
440 * psymtab.c (maintenance_print_psymbols)
441 (maintenance_info_psymtabs, maintenance_check_psymtabs):
442 Constify.
443
c281872e
TT
4442017-09-27 Tom Tromey <tom@tromey.com>
445
446 * windows-tdep.c (display_tib): Constify.
447
5b64bf74
TT
4482017-09-27 Tom Tromey <tom@tromey.com>
449
450 * linux-fork.c (delete_checkpoint_command)
451 (detach_checkpoint_command): Constify.
452
4ada038f
TT
4532017-09-27 Tom Tromey <tom@tromey.com>
454
455 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
456
57f5a81b
TT
4572017-09-27 Tom Tromey <tom@tromey.com>
458
459 * arc-tdep.c (dump_arc_instruction_command): Constify.
460
b0a8e6c4
TT
4612017-09-27 Tom Tromey <tom@tromey.com>
462
463 * valprint.c (set_radix, show_radix): Constify.
464
8d97dc1c
TT
4652017-09-27 Tom Tromey <tom@tromey.com>
466
467 * dtrace-probe.c (info_probes_dtrace_command): Constify.
468
eb7c454d
TT
4692017-09-27 Tom Tromey <tom@tromey.com>
470
471 * command.h (not_just_help_class_command): Update.
472 * cli/cli-decode.h (not_just_help_class_command): Update.
473 * cli/cli-decode.c (not_just_help_class_command): Constify.
474
e4e33335
TT
4752017-09-27 Tom Tromey <tom@tromey.com>
476
477 * gdb_bfd.c (maintenance_info_bfds): Constify.
478
0450cc4c
TT
4792017-09-27 Tom Tromey <tom@tromey.com>
480
481 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
482 overloads.
483 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
484 (do_const_cfunc): New function.
485 (cmd_cfunc_eq): New overload.
486 (cli_user_command_p): Check do_const_cfunc.
487 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
488 const_cfunc.
489 * command.h (add_cmd): Add const overload and no-function
490 overload.
491 (set_cmd_cfunc): Add const overload.
492 (cmd_const_cfunc_ftype): Declare.
493 (cmd_cfunc_eq): Add const overload.
494 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
495 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
496 overload.
497
a9bbfbd8
TT
4982017-09-27 Tom Tromey <tom@tromey.com>
499
500 * macroexp.c (get_next_token_for_substitution): New function.
501 (substitute_args): Call it. Check for __VA_OPT__.
502
5230b05a
WT
5032017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
504 Pedro Alves <palves@redhat.com>
505
506 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
507 producer_is_icc_lt_14.
508 (producer_is_icc_lt_14): New function.
509 (check_producer): Add code for checking version of ICC.
510 (producer_is_icc): Move to producer.c.
511 (read_structure_type): Restrict ICC workaround to ICC<14.
512 * producer.c: Include selftest.h.
513 (producer_is_icc, producer_parsing_tests, _initialize_producer):
514 New functions.
515 * producer.h (producer_is_icc): New declaration.
516
b32b108a
WT
5172017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
518
519 * Makefile.in (SFILES): Add producer.c.
520 (COMMON_OBS): Add producer.o
521 * amd64-tdep.c (producer.h): Add new include.
522 * dwarf2read.c (producer.h): Add new include.
523 * producer.c: New file.
524 * producer.h: New file.
525 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
526 producer.c.
527 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
528 producer.h.
529
5007d765
MK
5302017-09-26 Matthias Klose <doko@ubuntu.com>
531
532 * configure.ac: Search ncursesw before ncurses.
533 Check ncursesw/ncurses.h before ncurses/ncurses.h.
534 * gdb_curses.h: Include <ncursesw/ncurses.h>
535 * config.in, configure: Regenerate.
536
281c4447
RO
5372017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
538
539 PR gdb/22185
540 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
541 obsolete.
542 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
543 Remove i386sol2 support.
544 * configure.nat <i386sol2>: Remove.
545 <sol2-64>: Fold into ...
546 <sol2>: ... this.
547 Move common settings to default section.
548 Add sol-thread.o.
549 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
550 x86_64-*-solaris2.1[0-9]*>: Rename to ...
551 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
552 <i[34567]86-*-solaris*>: Remove.
553 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
554
555 * configure.ac: Remove wctype in libw check.
556 (_MSE_INT_H): Don't define on Solaris 7-9.
557 <solaris*>: Remove libthread_db.so.1 check.
558 * configure: Regenerate.
559 * config.in: Regenerate.
560
561 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
562 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
563 (gdb_ps_size_t): Remove.
564 Use base types in users.
565 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
566
567 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
568
39b06c20
RO
5692017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
570
571 PR build/22206
572 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
573 (adi_is_addr_mapped): Likewise.
574 (PSR_ICC): Don't redefine.
575 (PSR_IMPL): Likewise.
576
6c3e20f1
TT
5772017-09-25 Tom Tromey <tom@tromey.com>
578
579 * regcache.c (regcache::dump): Use string_printf.
580
b292235f
TT
5812017-09-25 Tom Tromey <tom@tromey.com>
582
583 * regcache.c (class regcache_invalidator): New.
584 (struct register_to_invalidate): Remove.
585 (make_cleanup_regcache_invalidate): Remove.
586 (regcache::raw_write): Use regcache_invalidator.
587
9ac86b52
TT
5882017-09-25 Tom Tromey <tom@tromey.com>
589
590 * spu-tdep.c (spu2ppu_sniffer): Update.
591 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
592 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
593 Remove.
594 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
595 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
596 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
597 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
598 (frame_pop): Update.
599
c0e383c6
TT
6002017-09-25 Tom Tromey <tom@tromey.com>
601
602 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
603 * regcache.h (regcache_xfree): Don't declare.
604 * regcache.c (regcache_xfree): Remove.
605 (do_regcache_xfree): Use delete.
606 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
607 * linux-fork.c (free_fork): Use delete.
608 (fork_save_infrun_state): Likewise.
609 * jit.c (jit_dealloc_cache): Use delete.
610 * infrun.c (discard_infcall_suspend_state): Use delete.
611
791199cc
TT
6122017-09-25 Tom Tromey <tom@tromey.com>
613
614 * regcache.h (regcache_xmalloc): Don't declare.
615 (regcache_raw_set_cached_value): Update comment.
616 * regcache.c (regcache_xmalloc): Remove.
617 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
618 * jit.c (jit_frame_sniffer): Use new.
619 * frame.c (frame_save_as_regcache): Use new.
620
289e23aa
AA
6212017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
622
623 * NEWS: Advertise support for guarded-storage registers on IBM z.
624
1b63490c
AA
6252017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
626
627 * s390-linux-nat.c (have_regset_gs): New static variable.
628 (s390_linux_fetch_inferior_registers): Handle guarded-storage
629 control block and guarded-storage broadcast control regsets.
630 (s390_read_description): Detect whether the target has
631 guarded-storage support, return appropriate tdesc.
632 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
633 (features/s390x-gs-linux64.c): Likewise.
634 (struct gdbarch_tdep) <have_gs>: New field.
635 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
636 (s390_gsbc_regset): New variables.
637 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
638 and s390_gsbc_regset, if applicable.
639 (s390_core_read_description): Check whether core file was from a
640 target with guarded-storage support; include appropriate regsets.
641 (s390_gdbarch_init): Add registers for guarded-storage support.
642 (_initialize_s390_tdep): Initialize new target descriptions that
643 include registers for guarded-storage support.
644 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
645 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
646 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
647 (S390_NUM_REGS): Adjust macro definition.
648 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
649 (tdesc_s390x_gs_linux64): New declarations.
650
96235dc1
AA
6512017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
652
653 * features/s390-gs-linux64.xml: New file.
654 * features/s390-gs.xml: New file.
655 * features/s390-gsbc.xml: New file.
656 * features/s390x-gs-linux64.xml: New file.
657 * features/Makefile (WHICH): Add s390-gs-linux64 and
658 s390x-gs-linux64.
659 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
660 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
661 * features/s390-gs-linux64.c: New generated file.
662 * features/s390x-gs-linux64.c: New file.
663 * regformats/s390-gs-linux64.dat: New file.
664 * regformats/s390x-gs-linux64.dat: New file.
665
b4a7c699
TT
6662017-09-23 Tom Tromey <tom@tromey.com>
667
668 * defs.h (make_cleanup_override_quit_handler): Don't declare.
669
c2f97536
TT
6702017-09-22 Tom Tromey <tom@tromey.com>
671
672 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
673 type to scoped_restore_tmpl.
674 <scoped_input_handler>: Initialize m_quit_handler directly.
675
43573013
SDJ
6762017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
677
678 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
679 (cd_command): Likewise. Free "current_directory" before
680 assigning to it.
681 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
682 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
683 * top.c (gdb_dirbuf): Remove global declaration.
684 * top.h (gdb_dirbuf): Likewise.
685
6ec2e0f5
SDJ
6862017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
687
688 * gnulib/aclocal.m4: Regenerate.
689 * gnulib/config.in: Regenerate.
690 * gnulib/configure: Regenerate.
691 * gnulib/import/Makefile.am: Regenerate.
692 * gnulib/import/Makefile.in: Regenerate.
693 * gnulib/import/assure.h: New file.
694 * gnulib/import/at-func.c: Likewise
695 * gnulib/import/chdir-long.c: New file.
696 * gnulib/import/chdir-long.h: New file.
697 * gnulib/import/cloexec.c: New file.
698 * gnulib/import/cloexec.h: New file.
699 * gnulib/import/close.c: New file.
700 * gnulib/import/closedir.c: New file.
701 * gnulib/import/dirent-private.h: New file.
702 * gnulib/import/dup-safer.c: New file.
703 * gnulib/import/dup.c: New file.
704 * gnulib/import/dup2.c: New file.
705 * gnulib/import/error.c: New file.
706 * gnulib/import/error.h: New file.
707 * gnulib/import/exitfail.c: New file.
708 * gnulib/import/exitfail.h: New file.
709 * gnulib/import/fchdir.c: New file.
710 * gnulib/import/fcntl.c: New file.
711 * gnulib/import/fcntl.in.h: New file.
712 * gnulib/import/fd-hook.c: New file.
713 * gnulib/import/fd-hook.h: New file.
714 * gnulib/import/fd-safer.c: New file.
715 * gnulib/import/fdopendir.c: New file.
716 * gnulib/import/filename.h: New file.
717 * gnulib/import/filenamecat-lgpl.c: New file.
718 * gnulib/import/filenamecat.h: New file.
719 * gnulib/import/fstat.c: New file.
720 * gnulib/import/fstatat.c: New file.
721 * gnulib/import/getcwd-lgpl.c: New file.
722 * gnulib/import/getcwd.c: New file.
723 * gnulib/import/getdtablesize.c: New file.
724 * gnulib/import/getlogin_r.c: New file.
725 * gnulib/import/getprogname.c: New file.
726 * gnulib/import/getprogname.h: New file.
727 * gnulib/import/gettext.h: New file.
728 * gnulib/import/glob-libc.h: New file.
729 * gnulib/import/glob.c: New file.
730 * gnulib/import/glob.in.h: New file.
731 * gnulib/import/intprops.h: New file.
732 * gnulib/import/m4/chdir-long.m4: New file.
733 * gnulib/import/m4/close.m4: New file.
734 * gnulib/import/m4/closedir.m4: New file.
735 * gnulib/import/m4/d-ino.m4: New file.
736 * gnulib/import/m4/d-type.m4: New file.
737 * gnulib/import/m4/dup.m4: New file.
738 * gnulib/import/m4/dup2.m4: New file.
739 * gnulib/import/m4/error.m4: New file.
740 * gnulib/import/m4/fchdir.m4: New file.
741 * gnulib/import/m4/fcntl.m4: New file.
742 * gnulib/import/m4/fcntl_h.m4: New file.
743 * gnulib/import/m4/fdopendir.m4: New file.
744 * gnulib/import/m4/filenamecat.m4: New file.
745 * gnulib/import/m4/fstat.m4: New file.
746 * gnulib/import/m4/fstatat.m4: New file.
747 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
748 * gnulib/import/m4/getcwd-path-max.m4: New file.
749 * gnulib/import/m4/getcwd.m4: New file.
750 * gnulib/import/m4/getdtablesize.m4: New file.
751 * gnulib/import/m4/getlogin_r.m4: New file.
752 * gnulib/import/m4/getprogname.m4: New file.
753 * gnulib/import/m4/glob.m4: New file.
754 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
755 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
756 * gnulib/import/m4/mempcpy.m4: New file.
757 * gnulib/import/m4/memrchr.m4: New file.
758 * gnulib/import/m4/mode_t.m4: New file.
759 * gnulib/import/m4/msvc-inval.m4: New file.
760 * gnulib/import/m4/msvc-nothrow.m4: New file.
761 * gnulib/import/m4/open.m4: New file.
762 * gnulib/import/m4/openat.m4: New file.
763 * gnulib/import/m4/opendir.m4: New file.
764 * gnulib/import/m4/readdir.m4: New file.
765 * gnulib/import/m4/realloc.m4: New file.
766 * gnulib/import/m4/rewinddir.m4: New file.
767 * gnulib/import/m4/save-cwd.m4: New file.
768 * gnulib/import/m4/strdup.m4: New file.
769 * gnulib/import/m4/strerror.m4: New file.
770 * gnulib/import/m4/unistd-safer.m4: New file.
771 * gnulib/import/mempcpy.c: New file.
772 * gnulib/import/memrchr.c: New file.
773 * gnulib/import/msvc-inval.c: New file.
774 * gnulib/import/msvc-inval.h: New file.
775 * gnulib/import/msvc-nothrow.c: New file.
776 * gnulib/import/msvc-nothrow.h: New file.
777 * gnulib/import/open.c: New file.
778 * gnulib/import/openat-die.c: New file.
779 * gnulib/import/openat-priv.h: New file.
780 * gnulib/import/openat-proc.c: New file.
781 * gnulib/import/openat.c: New file.
782 * gnulib/import/openat.h: New file.
783 * gnulib/import/opendir.c: New file.
784 * gnulib/import/pipe-safer.c: New file.
785 * gnulib/import/readdir.c: New file.
786 * gnulib/import/realloc.c: New file.
787 * gnulib/import/rewinddir.c: New file.
788 * gnulib/import/save-cwd.c: New file.
789 * gnulib/import/save-cwd.h: New file.
790 * gnulib/import/strdup.c: New file.
791 * gnulib/import/strerror-override.c: New file.
792 * gnulib/import/strerror-override.h: New file.
793 * gnulib/import/strerror.c: New file.
794 * gnulib/import/unistd--.h: New file.
795 * gnulib/import/unistd-safer.h: New file.
796 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
797 "getcwd" and "glob".
798 * ser-tcp.c: Undefine "close" before redefining it.
799
432ae719
SM
8002017-09-21 Simon Marchi <simon.marchi@ericsson.com>
801
802 * guile/scm-value.c (gdbscm_value_address): Initialize address,
803 get rid of res_val.
804
4fa7574e
RO
8052017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
806
807 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
808 <sol2,sparc>: Likewise.
809 <sol2-64,i386>: Likewise.
810
811 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
812 -Wdeprecated-declarations on *-*-solaris*.
813 * configure: Regenerate.
814
815 * procfs.c: Include "nat/inferior.h".
816 (procfs_info_proc): Fix typo.
817
f6327dcb
KB
8182017-09-21 Kevin Buettner <kevinb@redhat.com>
819
820 * remote.c (vector): Include.
821 (struct private_thread_info): Add field, thread_handle.
822 (free_private_thread_info): Deallocate storage associated with
823 thread handle.
824 (get_private_info_thread): Initialize `thread_handle' field.
825 (struct thread_item): Add field, thread_handle.
826 (clear_threads_listing_context): Deallocate storage associated
827 with thread handle.
828 (start_thread): Add support for "handle" attribute.
829 (thread_attributes): Add "handle".
830 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
831 field.
832 (remote_update_thread_list): Update thread_handle.
833 (remote_thread_handle_to_thread_info): New function.
834 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
835
fbbe5337
KB
8362017-09-21 Kevin Buettner <kevinb@redhat.com>
837
838 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
839 function.
840 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
841 * python/python-internal.h (thread_object_type): Declare.
842
e04ee09e
KB
8432017-09-21 Kevin Buettner <kevinb@redhat.com>
844
845 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
846 (target_thread_handle_to_thread_info): Declare.
847 * target.c (target_thread_handle_to_thread_info): New function.
848 * target-delegates.c: Regenerate.
849 * gdbthread.h (find_thread_by_handle): Declare.
850 * thread.c (find_thread_by_handle): New function.
851 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
852 function.
853 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
854
1e5b66ed
SM
8552017-09-21 Simon Marchi <simon.marchi@ericsson.com>
856
857 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
858
ebe48ba0
SM
8592017-09-21 Simon Marchi <simon.marchi@ericsson.com>
860
861 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
862
0a0bf5dc
YQ
8632017-09-21 Yao Qi <yao.qi@linaro.org>
864
865 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
866 to gdb_target_obs.
867
d1b0a7bf
TT
8682017-09-20 Tom Tromey <tom@tromey.com>
869
870 * breakpoint.c (struct counted_command_line): Remove.
871 (breakpoint_commands): Update.
872 (alloc_counted_command_line, incref_counted_command_line)
873 (decref_counted_command_line, do_cleanup_counted_command_line)
874 (make_cleanup_decref_counted_command_line): Remove.
875 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
876 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
877 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
878 (save_breakpoints): Update.
879 * breakpoint.h (counted_command_line): Now a typedef to
880 shared_ptr.
881 (struct breakpoint) <commands>: Now a counted_command_line.
882 (struct bpstats) <command>: Likewise.
883
48649e1b
TT
8842017-09-20 Tom Tromey <tom@tromey.com>
885
886 * breakpoint.c (struct commands_info, do_map_commands_command):
887 Remove.
888 (commands_command_1): Update.
889 (iterate_over_related_breakpoints): Take a function_view.
890 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
891 (delete_command): Update.
892 (map_breakpoint_numbers): Take a function_view.
893 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
894 (disable_command): Update.
895 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
896 (enable_command): Update.
897 (struct disp_data, do_enable_breakpoint_disp)
898 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
899 (do_map_enable_delete_breakpoint): Remove.
900 (enable_once_command, enable_count_command, enable_delete_command)
901 (delete_trace_variable_command): Update.
902
04afa70c
TT
9032017-09-20 Tom Tromey <tom@tromey.com>
904
905 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
906 (bpstat_clear): Use delete.
907 (bpstats): New constructors.
908 (bpstat_copy, bpstat_stop_status): Use new.
909 (dprintf_after_condition_true): Update.
910 * breakpoint.h (bpstats::bpstats): Add constructors.
911 (bpstats::~bpstats): Add destructor.
912
c83833f4
PA
9132017-09-20 Pedro Alves <palves@redhat.com>
914
915 * eval.c (make_params): Delete, refactored as ...
916 (class fake_method): ... this new type's ctor.
917 (fake_method::~fake_method): New.
918 (evaluate_subexp_standard): Use 'fake_method'.
919
223ffa71
TT
9202017-09-20 Tom Tromey <tom@tromey.com>
921
922 * windows-nat.c (get_windows_debug_event, windows_wait)
923 (do_initial_windows_stuff, windows_attach): Update.
924 * utils.c (vwarning, internal_vproblem): Update.
925 (ui_unregister_input_event_handler_cleanup)
926 (prepare_to_handle_input): Remove.
927 (class scoped_input_handler): New.
928 (defaulted_query, prompt_for_continue): Update.
929 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
930 Update.
931 * top.c (undo_terminal_modifications_before_exit): Update.
932 * target/target.h (target_terminal_init, target_terminal_inferior)
933 (target_terminal_ours): Don't declare.
934 (class target_terminal): New.
935 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
936 (target_terminal_ours_for_output)
937 (make_cleanup_restore_target_terminal): Don't declare.
938 (target_terminal_info): Remove.
939 * target.c (enum terminal_state, terminal_state): Remove.
940 (target_terminal::terminal_state): Define.
941 (target_terminal::init): Rename from target_terminal_init.
942 (target_terminal::inferior): Rename from
943 target_terminal_inferior.
944 (target_terminal::ours): Rename from target_terminal_ours.
945 (target_terminal::ours_for_output): Rename from
946 target_terminal_ours_for_output.
947 (target_terminal::info): New method.
948 (cleanup_restore_target_terminal)
949 (make_cleanup_restore_target_terminal): Remove.
950 * solib.c (handle_solib_event): Update.
951 * remote.c (remote_serial_quit_handler): Update.
952 (remote_terminal_inferior, remote_wait_as): Update.
953 * record-full.c (record_full_wait_1): Update.
954 * nto-procfs.c (procfs_create_inferior): Update.
955 * nat/fork-inferior.c (startup_inferior): Update.
956 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
957 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
958 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
959 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
960 (mi_breakpoint_created, mi_breakpoint_deleted)
961 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
962 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
963 (mi_user_selected_context_changed, report_initial_inferior):
964 Update.
965 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
966 (linux_nat_terminal_inferior): Update.
967 * infrun.c (follow_fork_inferior)
968 (handle_vfork_child_exec_or_exit, do_target_resume)
969 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
970 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
971 Update.
972 * inflow.c (child_terminal_init, info_terminal_command): Update.
973 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
974 (attach_command): Update.
975 * infcall.c (call_thread_fsm_should_stop): Update.
976 * gnu-nat.c (gnu_attach): Update.
977 * extension.c (struct active_ext_lang_state)
978 (restore_active_ext_lang): Update.
979 * exceptions.c (print_flush): Update.
980 * event-top.c (async_enable_stdin, default_quit_handler): Update.
981 (struct quit_handler_cleanup_data, restore_quit_handler)
982 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
983 Remove.
984 * cp-support.c (gdb_demangle): Update.
985 * breakpoint.c (update_inserted_breakpoint_locations)
986 (insert_breakpoint_locations, handle_jit_event)
987 (disable_breakpoints_in_unloaded_shlib): Update.
988 * annotate.c (annotate_breakpoints_invalid)
989 (annotate_frames_invalid): Update.
990
013af3fc
TT
9912017-09-20 Tom Tromey <tom@tromey.com>
992
993 * main.c (catch_command_errors): Rename from
994 catch_command_errors_const.
995 (captured_main_1): Update.
996
06871ae8
PA
9972017-09-20 Pedro Alves <palves@redhat.com>
998
999 * cli/cli-cmds.c (list_command): Use print_sal_location.
1000 (print_sal_location): New function.
1001 (ambiguous_line_spec): Use print_sal_location.
1002 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1003 * symtab.c (find_function_start_sal): Likewise.
1004 * symtab.h (symtab_and_line::symbol): New field.
1005
e5f25bc5
PA
10062017-09-20 Pedro Alves <palves@redhat.com>
1007
1008 * linespec.c (minsym_found): Handle non-text minsyms.
1009 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1010
1b7fa39e
WT
10112017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1012
1013 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1014 backslash.
1015
37dd0825
WT
10162017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1017
1018 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1019 vmovups instead vmovaps.
1020 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1021
4e5a4f58
JB
10222017-09-19 John Baldwin <jhb@FreeBSD.org>
1023
1024 * NEWS (Changes since GDB 8.0): Add starti.
1025 * infcmd.c (enum run_break): New.
1026 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1027 case.
1028 (run_command): Use enum run_how.
1029 (start_command): Likewise.
1030 (starti_command): New function.
1031 (RUN_ARGS_HELP): New macro.
1032 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1033 commands. Add starti command.
1034
aa70c9f1
YQ
10352017-09-19 Yao Qi <yao.qi@linaro.org>
1036
1037 * Makefile.in (monitor.o): Remove the rule.
1038
d6541620
YQ
10392017-09-19 Yao Qi <yao.qi@linaro.org>
1040
1041 * annotate.h (struct annotate_arg_emitter): Use
1042 DISABLE_COPY_AND_ASSIGN.
1043 * common/refcounted-object.h (refcounted_object): Likewise.
1044 * completer.h (struct completion_result): Likewise.
1045 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1046 * filename-seen-cache.h (filename_seen_cache): Likewise.
1047 * gdbcore.h (thread_section_name): Likewise.
1048 * gdb_regex.h (compiled_regex): Likewise.
1049 * gdbthread.h (scoped_restore_current_thread): Likewise.
1050 * inferior.h (scoped_restore_current_inferior): Likewise.
1051 * jit.c (jit_reader): Likewise.
1052 * linespec.h (struct linespec_result): Likewise.
1053 * mi/mi-parse.h (struct mi_parse): Likewise.
1054 * nat/fork-inferior.c (execv_argv): Likewise.
1055 * progspace.h (scoped_restore_current_program_space): Likewise.
1056 * python/python-internal.h (class gdbpy_enter): Likewise.
1057 * regcache.h (regcache): Likewise.
1058 * target-descriptions.c (struct tdesc_reg): Likewise.
1059 (struct tdesc_type): Likewise.
1060 (struct tdesc_feature): Likewise.
1061 * ui-out.h (ui_out_emit_type): Likewise.
1062
0615127c
SM
10632017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1064
1065 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1066 label abort_expression.
1067
5e187554
SM
10682017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1069
1070 * common/buffer.c (buffer_xml_printf): Adjust.
1071 * common/xml-utils.c (xml_escape_text): Change return type to
1072 std::string, update code accordingly.
1073 * common/xml-utils.h (xml_escape_text): Change return type to
1074 std::string.
1075 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1076 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1077 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1078 Adjust.
1079
c3d7b541
SM
10802017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1081
1082 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1083 (SUBDIR_UNITTESTS_OBS): Add new object file.
1084 * unittests/xml-utils-selftests.c: New file.
1085
1526853e
SM
10862017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1087
1088 * common/selftest.h (selftest): New struct/interface.
1089 (register_test): Add name parameter, add new overload.
1090 (run_tests): Add filter parameter.
1091 (for_each_selftest_ftype): New typedef.
1092 (for_each_selftest): New declaration.
1093 * common/selftest.c (tests): Change type to
1094 map<string, unique_ptr<selftest>>.
1095 (simple_selftest): New struct.
1096 (register_test): New function.
1097 (register_test): Add name parameter and use it.
1098 (run_tests): Add filter parameter and use it. Add prints.
1099 Adjust to vector -> map change.
1100 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1101 registering selftests.
1102 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1103 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1104 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1105 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1106 * findvar.c (_initialize_findvar): Likewise.
1107 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1108 * maint.c (maintenance_selftest): Update call to run_tests.
1109 (maintenance_info_selftests): New function.
1110 (_initialize_maint_cmds): Register "maintenance info selftests"
1111 command. Update "maintenance selftest" doc.
1112 * regcache.c (_initialize_regcache): Add names when registering
1113 selftests.
1114 * rust-exp.y (_initialize_rust_exp): Likewise.
1115 * selftest-arch.c (gdbarch_selftest): New struct.
1116 (gdbarch_tests): Remove.
1117 (register_test_foreach_arch): Add name parameter. Call
1118 register_test.
1119 (tests_with_arch): Remove, move most content to
1120 gdbarch_selftest::operator().
1121 (_initialize_selftests_foreach_arch): Remove.
1122 * selftest-arch.h (register_test_foreach_arch): Add name
1123 parameter.
1124 (run_tests_with_arch): New declaration.
1125 * utils-selftests.c (_initialize_utils_selftests): Add names
1126 when registering selftests.
1127 * utils.c (_initialize_utils): Likewise.
1128 * unittests/array-view-selftests.c
1129 (_initialize_array_view_selftests): Likewise.
1130 * unittests/environ-selftests.c (_initialize_environ_selftests):
1131 Likewise.
1132 * unittests/function-view-selftests.c
1133 (_initialize_function_view_selftests): Likewise.
1134 * unittests/offset-type-selftests.c
1135 (_initialize_offset_type_selftests): Likewise.
1136 * unittests/optional-selftests.c
1137 (_initialize_optional_selftests): Likewise.
1138 * unittests/scoped_restore-selftests.c
1139 (_initialize_scoped_restore_selftests): Likewise.
1140 * NEWS: Document "maintenance selftest" and "maint info
1141 selftests".
1142
5846367a
SM
11432017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1144
1145 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1146 scoped_restore.
1147
bd77e8ff
SM
11482017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1149
1150 * mi/mi-main.c (mi_load_progress): Make uiout variable
1151 a unique_ptr.
1152
26a67918
PA
11532017-09-15 Pedro Alves <palves@redhat.com>
1154
1155 * compile/compile-c-types.c (convert_enum, convert_int)
1156 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1157
3f8a7804
SM
11582017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1159
1160 * dwarf2read.c (copy_string): Remove.
1161 (parse_macro_definition): Replace copy_string with savestring.
1162
8d200706
YQ
11632017-09-15 Yao Qi <yao.qi@linaro.org>
1164
1165 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1166 gdb_target_obs.
1167 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1168 Likewise.
1169 (i[34567]86-*-linux*): Likewise.
1170
d185219d
SM
11712017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1172
1173 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1174 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1175 <stack>: Change type to std::vector.
1176 <stack_len, stack_allocated>: Remove.
1177 <grow_stack>: Remove.
1178 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1179 (dwarf_expr_context::~dwarf_expr_context): Remove.
1180 (dwarf_expr_context::grow_stack): Remove.
1181 (dwarf_expr_context::push): Adjust.
1182 (dwarf_expr_context::pop): Adjust.
1183 (dwarf_expr_context::fetch): Adjust.
1184 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1185 (dwarf_expr_context::stack_empty_p): Adjust.
1186 (dwarf_expr_context::execute_stack_op): Adjust.
1187
eccd80d6
SM
11882017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1189
1190 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1191 return type to bool.
1192 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1193
69009882
SM
11942017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1195
1196 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1197 Change type to bool.
1198 (dwarf_stack_value) <in_stack_memory>: Likewise.
1199 (dwarf_expr_context) <push_address>: Change parameter type to
1200 bool.
1201 <fetch_in_stack_memory>: Change return type to bool.
1202 <push>: Change parameter type to bool.
1203 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1204 to bool.
1205 (dwarf_expr_context::push_address): Likewise.
1206 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1207 to bool.
1208 (dwarf_expr_context::execute_stack_op): Adjust.
1209 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1210
1e467161
SM
12112017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1212
1213 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1214 (struct dwarf_expr_context) <n_pieces>: Remove.
1215 <pieces>: Change type to std::vector.
1216 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1217 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1218 pieces.
1219 (dwarf_expr_context::add_piece): Adjust.
1220 * dwarf2loc.c (struct piece_closure): Initialize fields.
1221 <n_pieces>: Remove.
1222 <pieces>: Change type to std::vector.
1223 (allocate_piece_closure): Adjust, change parameter to
1224 std::vector rvalue and std::move it to piece_closure.
1225 (rw_pieced_value): Adjust.
1226 (check_pieced_synthetic_pointer): Adjust.
1227 (indirect_synthetic_pointer): Adjust.
1228 (coerce_pieced_ref): Adjust.
1229 (free_pieced_value_closure): Adjust. Use delete to free
1230 piece_closure.
1231 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1232 to allocate_piece_closure.
1233 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1234
0782db84
SM
12352017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1236
1237 * probe.h (probe_ops_cp): Remove typedef.
1238 (DEF_VEC_P (probe_ops_cp)): Remove.
1239 (all_probe_ops): Change type to std::vector.
1240 * probe.c (info_probes_for_ops): Adjust to vector change.
1241 (probe_linespec_to_ops): Likewise.
1242 (all_probe_ops): Change type to std::vector.
1243 (_initialize_probe): Adjust to vector change.
1244 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1245 * elfread.c (elf_get_probes): Likewise.
1246 * stap-probe.c (_initialize_stap_probe): Likewise.
1247
1eac6bea
SM
12482017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1249
1250 * probe.h (struct bound_probe): Define constructors.
1251 * probe.c (bound_probe_s): Remove typedef.
1252 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1253 (collect_probes): Change return type to std::vector, remove
1254 cleanup.
1255 (compare_probes): Return bool, change parameter type. Change
1256 semantic to "less than".
1257 (gen_ui_out_table_header_info): Change parameter to std::vector
1258 and update.
1259 (exists_probe_with_pops): Likewise.
1260 (info_probes_for_ops): Update to std::vector change.
1261 (enable_probes_command): Likewise.
1262 (disable_probes_command): Likewise.
1263
aaa63a31
SM
12642017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1265
1266 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1267 vec to std::vector.
1268 * probe.c (parse_probes_in_pspace): Update.
1269 (find_probes_in_objfile): Update.
1270 (find_probe_by_pc): Update.
1271 (collect_probes): Update.
1272 (probe_any_get_probes): Update.
1273 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1274 return type to reference to std::vector.
1275 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1276 std::vector and update.
1277 (dtrace_process_dof): Likewise.
1278 (dtrace_get_probes): Likewise.
1279 * elfread.c (elf_get_probes): Change return type to std::vector,
1280 store an std::vector in bfd_data.
1281 (probe_key_free): Update to std::vector.
1282 * stap-probe.c (handle_stap_probe): Change parameter to
1283 std::vector and update.
1284 (stap_get_probes): Likewise.
1285 * symfile-debug.c (debug_sym_get_probes): Change return type to
1286 std::vector and update.
1287
cb85b21b
TT
12882017-09-11 Tom Tromey <tom@tromey.com>
1289
1290 * breakpoint.c (program_breakpoint_here_p): Update.
1291 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1292 from make_show_memory_breakpoints_cleanup. Return a
1293 scoped_restore_tmpl<int>.
1294 (restore_show_memory_breakpoints): Remove.
1295 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1296 * mem-break.c (memory_validate_breakpoint): Update.
1297 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1298 (ia64_memory_remove_breakpoint): Update.
1299 (ia64_breakpoint_from_pc): Update.
1300 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1301 from make_show_memory_breakpoints_cleanup.
1302
8fbc99ef
TT
13032017-09-11 Tom Tromey <tom@tromey.com>
1304
1305 * d-namespace.c (d_lookup_symbol): Use std::string.
1306 (find_symbol_in_baseclass): Likewise.
1307
50feb4bd
TT
13082017-09-11 Tom Tromey <tom@tromey.com>
1309
1310 * ctf.c (ctf_start): Use std::string.
1311
c6dc63a1
TT
13122017-09-11 Tom Tromey <tom@tromey.com>
1313
1314 * ada-lang.c (is_known_support_routine): Update.
1315 (ada_unhandled_exception_name_addr_from_raise): Update.
1316 * guile/scm-frame.c (gdbscm_frame_name): Update.
1317 * python/py-frame.c (frapy_name): Update.
1318 (frapy_function): Update.
1319 * stack.h (find_frame_funname): Update.
1320 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1321 (print_frame): Update.
1322
d6b9b80f
TT
13232017-09-11 Tom Tromey <tom@tromey.com>
1324
1325 * findcmd.c (put_bits): Take a gdb::byte_vector.
1326 (parse_find_args): Return gdb::byte_vector. "args" now const.
1327 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1328 cleanups.
1329 (find_command): Update.
1330
a9921622
TT
13312017-09-11 Tom Tromey <tom@tromey.com>
1332
1333 * cli/cli-script.c (class scoped_restore_hook_in): New.
1334 (clear_hook_in_cleanup): Remove.
1335 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1336 scoped_restore_hook_in.
1337
be0d7abb
TT
13382017-09-11 Tom Tromey <tom@tromey.com>
1339
1340 * cli/cli-script.c (restore_interp): Remove.
1341 (read_command_lines): Use scoped_restore_interp.
1342 * interps.c (scoped_restore_interp::set_temp): Rename from
1343 interp_set_temp.
1344 * interps.h (class scoped_restore_interp): New.
1345 (interp_set_temp): Remove.
1346
00f675ff
TT
13472017-09-11 Tom Tromey <tom@tromey.com>
1348
1349 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1350 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1351 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1352 scoped_restore.
1353 (mi_cmd_break_insert_1): Update.
1354 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1355 scoped_restore.
1356
cb791d59
TT
13572017-09-11 Tom Tromey <tom@tromey.com>
1358
1359 * demangle.c (demangle_command): Update.
1360 * breakpoint.c (disable_command): Update.
1361 (enable_command): Update.
1362 (find_location_by_number): Make "number" const. Use
1363 get_number_trailer.
1364 * cli/cli-utils.c (extract_arg): Return std::string.
1365 * probe.c (parse_probe_linespec): Update. Change types.
1366 (collect_probes): Take string arguments.
1367 (parse_probe_linespec): Likewise.
1368 (info_probes_for_ops): Update.
1369 (enable_probes_command): Update.
1370 (disable_probes_command): Update.
1371 * break-catch-sig.c (catch_signal_split_args): Update.
1372 * mi/mi-parse.c (mi_parse): Update.
1373
2039bd9f
TT
13742017-09-11 Tom Tromey <tom@tromey.com>
1375
1376 * language.h (language_enum): Make argument const.
1377 * language.c (language_enum): Make argument const.
1378
f1735a53
TT
13792017-09-11 Tom Tromey <tom@tromey.com>
1380
1381 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1382 as function.
1383 (skip_to_space): Rename from skip_to_space_const.
1384 * common/common-utils.c (skip_to_space): New function.
1385 (skip_to_space): Rename from skip_to_space_const.
1386 * cli/cli-utils.h (get_number): Rename from get_number_const.
1387 (extract_arg): Rename from extract_arg_const.
1388 * cli/cli-utils.c (get_number): Rename from get_number_const.
1389 (extract_arg): Rename from extract_arg_const.
1390 (number_or_range_parser::get_number): Use ::get_number.
1391 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1392 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1393 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1394 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1395 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1396 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1397 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1398 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1399
7d221d74
TT
14002017-09-11 Tom Tromey <tom@tromey.com>
1401
1402 * python/python.c (do_start_initialization): Use
1403 py-event-types.def to initialize types.
1404 Define all object type structures.
1405 * python/python-internal.h: Don't declare event initialization
1406 functions.
1407 * python/py-threadevent.c (thread_event_object_type): Don't
1408 define.
1409 * python/py-stopevent.c (stop_event_object_type): Don't define.
1410 * python/py-signalevent.c (signal_event_object_type): Don't
1411 declare or define.
1412 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1413 (clear_objfiles_event_object_type): Don't declare or define.
1414 * python/py-infevents.c (inferior_call_pre_event_object_type)
1415 (inferior_call_post_event_object_type)
1416 (register_changed_event_object_type)
1417 (memory_changed_event_object_type): Don't declare or define.
1418 * python/py-inferior.c (new_thread_event_object_type)
1419 (new_inferior_event_object_type)
1420 (inferior_deleted_event_object_type): Don't declare or define.
1421 * python/py-exitedevent.c (exited_event_object_type): Don't
1422 declare or define.
1423 * python/py-evts.c (gdbpy_initialize_py_events): Use
1424 py-all-events.def.
1425 * python/py-events.h (thread_event_object_type): Don't declare.
1426 (events_object): Use py-all-events.def.
1427 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1428 py-event-types.def.
1429 * python/py-event-types.def: New file.
1430 * python/py-continueevent.c (create_continue_event_object): Don't
1431 declare or define.
1432 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1433 declare or define.
1434 * python/py-all-events.def: New file.
1435
35c61a1d
TT
14362017-09-11 Tom Tromey <tom@tromey.com>
1437
1438 * python/py-threadevent.c (create_thread_event_object): Return
1439 gdbpy_ref.
1440 * python/py-stopevent.h (create_stop_event_object)
1441 (create_breakpoint_event_object, create_signal_event_object):
1442 Update.
1443 * python/py-stopevent.c (create_stop_event_object): Return
1444 gdbpy_ref.
1445 (emit_stop_event): Update.
1446 * python/py-signalevent.c (create_signal_event_object): Return
1447 gdbpy_ref.
1448 * python/py-infevents.c (create_inferior_call_event_object):
1449 Update.
1450 * python/py-event.h (create_event_object)
1451 (create_thread_event_object): Update.
1452 * python/py-event.c (create_event_object): Return gdbpy_ref.
1453 * python/py-continueevent.c: Return gdbpy_ref.
1454 * python/py-bpevent.c (create_breakpoint_event_object): Return
1455 gdbpy_ref.
1456
7c96f8c1
TT
14572017-09-11 Tom Tromey <tom@tromey.com>
1458
1459 PR python/15622:
1460 * NEWS: Add entry.
1461 * python/python.c (do_start_initialization): Initialize new event
1462 types.
1463 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1464 (gdbpy_initialize_inferior_deleted_event)
1465 (gdbpy_initialize_new_thread_event): Declare.
1466 * python/py-threadevent.c (create_thread_event_object): Add option
1467 "thread" parameter.
1468 * python/py-inferior.c (new_thread_event_object_type)
1469 (new_inferior_event_object_type)
1470 (inferior_deleted_event_object_type): Declare.
1471 (python_new_inferior, python_inferior_deleted): New functions.
1472 (add_thread_object): Emit new_thread event.
1473 (gdbpy_initialize_inferior): Attach new functions to corresponding
1474 observers.
1475 (new_thread, new_inferior, inferior_deleted): Define new event
1476 types.
1477 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1478 registries.
1479 * python/py-events.h (events_object) <new_inferior,
1480 inferior_deleted, new_thread>: New fields.
1481 * python/py-event.h (create_thread_event_breakpoint): Add optional
1482 "thread" parameter.
1483
72542b8e
AB
14842017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1485
1486 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1487 check current_ui instead.
1488 (internal_vproblem): Likewise.
1489
0d64823e
SM
14902017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1491
1492 * thread.c (print_thread_info_1): Remove unnecessary calls to
1493 uiout->is_mi_like_p.
1494
eb1e02fd
TT
14952017-09-09 Tom Tromey <tom@tromey.com>
1496
1497 * namespace.h (add_using_directive): Update.
1498 * namespace.c (add_using_directive): Change type of excludes to
1499 std::vector.
1500 * dwarf2read.c (read_import_statement): Use std::vector.
1501 (read_namespace): Update.
1502 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1503
0fc21fd8
TT
15042017-09-09 Tom Tromey <tom@tromey.com>
1505
1506 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1507
49663d05
TT
15082017-09-09 Tom Tromey <tom@tromey.com>
1509
1510 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1511
0b868b60
TT
15122017-09-09 Tom Tromey <tom@tromey.com>
1513
1514 * stack.c (func_command): Use gdb::def_vector.
1515
c0470d48
TT
15162017-09-09 Tom Tromey <tom@tromey.com>
1517
1518 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1519 ui_out_emit_list, ui_out_emit_tuple.
1520 (mi_cmd_var_update): Likewise.
1521
ca5909c7
TT
15222017-09-09 Tom Tromey <tom@tromey.com>
1523
1524 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1525 ui_out_redirect_pop.
1526 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1527 ui_out_redirect_pop.
1528 * utils.c (do_ui_out_redirect_pop)
1529 (make_cleanup_ui_out_redirect_pop): Remove.
1530 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1531 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1532 * ui-out.h (ui_out_redirect_pop): New class.
1533
e6a2252a
TT
15342017-09-09 Tom Tromey <tom@tromey.com>
1535
1536 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1537 (list_available_thread_groups, mi_cmd_list_thread_groups)
1538 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1539 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1540 Likewise.
1541
393702cd
TT
15422017-09-09 Tom Tromey <tom@tromey.com>
1543
1544 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1545 ui_out_emit_tuple.
1546
76f9c9cf
TT
15472017-09-09 Tom Tromey <tom@tromey.com>
1548
1549 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1550 * stack.c (print_frame): Use ui_out_emit_tuple.
1551 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1552 (info_spu_mailbox_command, info_spu_dma_command)
1553 (info_spu_proxydma_command): Likewise.
1554 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1555 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1556 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1557 ui_out_emit_tuple.
1558 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1559
dc9fe180
TT
15602017-09-09 Tom Tromey <tom@tromey.com>
1561
1562 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1563 (class ui_out_emit_table): Update comment.
1564 * ui-out.c (do_cleanup_table_end)
1565 (make_cleanup_ui_out_table_begin_end): Remove.
1566 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1567 (info_spu_dma_cmdlist): Likewise.
1568 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1569 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1570 ui_out_emit_table.
1571
f8cc3da6
TT
15722017-09-09 Tom Tromey <tom@tromey.com>
1573
1574 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1575 ui_out_emit_list, gdb::optional.
1576
481695ed
JB
15772017-09-09 John Baldwin <jhb@FreeBSD.org>
1578
1579 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1580 prototype.
1581 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1582 prototype.
1583 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1584 prototype.
1585 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1586 * ada-exp.y: Remove _initialize_ada_exp prototype.
1587 * ada-lang.c: Remove _initialize_ada_language prototype.
1588 * ada-tasks.c: Remove _initialize_tasks prototype.
1589 * addrmap.c: Remove _initialize_addrmap prototype.
1590 * agent.c: Remove _initialize_agent prototype.
1591 * aix-thread.c: Remove _initialize_aix_thread prototype.
1592 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1593 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1594 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1595 prototype.
1596 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1597 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1598 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1599 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1600 prototype.
1601 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1602 prototype.
1603 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1604 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1605 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1606 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1607 prototype.
1608 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1609 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1610 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1611 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1612 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1613 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1614 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1615 prototype.
1616 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1617 prototype.
1618 * annotate.c: Remove _initialize_annotate prototype.
1619 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1620 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1621 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1622 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1623 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1624 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1625 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1626 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1627 prototype.
1628 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1629 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1630 * auto-load.c: Remove _initialize_auto_load prototype.
1631 * auxv.c: Remove _initialize_auxv prototype.
1632 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1633 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1634 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1635 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1636 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1637 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1638 prototype.
1639 * break-catch-throw.c: Remove _initialize_break_catch_throw
1640 prototype.
1641 * breakpoint.c: Remove _initialize_breakpoint prototype.
1642 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1643 * btrace.c: Remove _initialize_btrace prototype.
1644 * charset.c: Remove _initialize_charset prototype.
1645 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1646 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1647 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1648 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1649 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1650 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1651 * coffread.c: Remove _initialize_coffread prototype.
1652 * compile/compile.c: Remove _initialize_compile prototype.
1653 * complaints.c: Remove _initialize_complaints prototype.
1654 * completer.c: Remove _initialize_completer prototype.
1655 * copying.awk: Remove _initialize_copying prototype.
1656 * copying.c: Regenerate.
1657 * core-regset.c: Remove _initialize_core_regset prototype.
1658 * corefile.c: Remove _initialize_core prototype.
1659 * corelow.c: Remove _initialize_corelow prototype.
1660 * cp-abi.c: Remove _initialize_cp_abi prototype.
1661 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1662 * cp-support.c: Remove _initialize_cp_support prototype.
1663 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1664 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1665 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1666 * ctf.c: Remove _initialize_ctf prototype.
1667 * d-lang.c: Remove _initialize_d_language prototype.
1668 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1669 prototype.
1670 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1671 * dbxread.c: Remove _initialize_dbxread prototype.
1672 * dcache.c: Remove _initialize_dcache prototype.
1673 * demangle.c: Remove _initialize_demangler prototype.
1674 * disasm-selftests.c: Remove _initialize_disasm_selftests
1675 prototype.
1676 * disasm.c: Remove _initialize_disasm prototype.
1677 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1678 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1679 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1680 prototype.
1681 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1682 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1683 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1684 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1685 * elfread.c: Remove _initialize_elfread prototype.
1686 * exec.c: Remove _initialize_exec prototype.
1687 * extension.c: Remove _initialize_extension prototype.
1688 * f-lang.c: Remove _initialize_f_language prototype.
1689 * f-valprint.c: Remove _initialize_f_valprint prototype.
1690 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1691 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1692 * filesystem.c: Remove _initialize_filesystem prototype.
1693 * findcmd.c: Remove _initialize_mem_search prototype.
1694 * fork-child.c: Remove _initialize_fork_child prototype.
1695 * frame-base.c: Remove _initialize_frame_base prototype.
1696 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1697 * frame.c: Remove _initialize_frame prototype.
1698 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1699 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1700 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1701 * gcore.c: Remove _initialize_gcore prototype.
1702 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1703 * gdbarch.c: Regenerate.
1704 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1705 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1706 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1707 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1708 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1709 * go-lang.c: Remove _initialize_go_language prototype.
1710 * go32-nat.c: Remove _initialize_go32_nat prototype.
1711 * guile/guile.c: Remove _initialize_guile prototype.
1712 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1713 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1714 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1715 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1716 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1717 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1718 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1719 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1720 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1721 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1722 prototype.
1723 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1724 prototype.
1725 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1726 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1727 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1728 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1729 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1730 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1731 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1732 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1733 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1734 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1735 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1736 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1737 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1738 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1739 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1740 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1741 prototype.
1742 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1743 prototype.
1744 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1745 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1746 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1747 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1748 * infcall.c: Remove _initialize_infcall prototype.
1749 * infcmd.c: Remove _initialize_infcmd prototype.
1750 * inferior.c: Remove _initialize_inferiors prototype.
1751 * inflow.c: Remove _initialize_inflow prototype.
1752 * infrun.c: Remove _initialize_infrun prototype.
1753 * interps.c: Remove _initialize_interpreter prototype.
1754 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1755 * jit.c: Remove _initialize_jit prototype.
1756 * language.c: Remove _initialize_language prototype.
1757 * linux-fork.c: Remove _initialize_linux_fork prototype.
1758 * linux-nat.c: Remove _initialize_linux_nat prototype.
1759 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1760 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1761 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1762 * m2-lang.c: Remove _initialize_m2_language prototype.
1763 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1764 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1765 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1766 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1767 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1768 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1769 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1770 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1771 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1772 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1773 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1774 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1775 * machoread.c: Remove _initialize_machoread prototype.
1776 * macrocmd.c: Remove _initialize_macrocmd prototype.
1777 * macroscope.c: Remove _initialize_macroscope prototype.
1778 * maint.c: Remove _initialize_maint_cmds prototype.
1779 * mdebugread.c: Remove _initialize_mdebugread prototype.
1780 * memattr.c: Remove _initialize_mem prototype.
1781 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1782 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1783 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1784 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1785 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1786 * microblaze-linux-tdep.c: Remove
1787 _initialize_microblaze_linux_tdep prototype.
1788 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1789 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1790 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1791 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1792 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1793 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1794 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1795 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1796 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1797 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1798 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1799 prototype.
1800 * mipsread.c: Remove _initialize_mipsread prototype.
1801 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1802 prototype.
1803 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1804 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1805 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1806 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1807 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1808 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1809 prototype.
1810 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1811 * nto-procfs.c: Remove _initialize_procfs prototype.
1812 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1813 * objc-lang.c: Remove _initialize_objc_language prototype.
1814 * objfiles.c: Remove _initialize_objfiles prototype.
1815 * observer.c: Remove observer_test_first_notification_function,
1816 observer_test_second_notification_function,
1817 observer_test_third_notification_function, and
1818 _initialize_observer prototypes.
1819 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1820 * osabi.c: Remove _initialize_gdb_osabi prototype.
1821 * osdata.c: Remove _initialize_osdata prototype.
1822 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1823 * parse.c: Remove _initialize_parse prototype.
1824 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1825 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1826 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1827 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1828 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1829 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1830 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1831 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1832 * printcmd.c: Remove _initialize_printcmd prototype.
1833 * probe.c: Remove _initialize_probe prototype.
1834 * proc-api.c: Remove _initialize_proc_api prototype.
1835 * proc-events.c: Remove _initialize_proc_events prototype.
1836 * proc-service.c: Remove _initialize_proc_service prototype.
1837 * procfs.c: Remove _initialize_procfs prototype.
1838 * psymtab.c: Remove _initialize_psymtab prototype.
1839 * python/python.c: Remove _initialize_python prototype.
1840 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1841 * record-btrace.c: Remove _initialize_record_btrace prototype.
1842 * record-full.c: Remove _initialize_record_full prototype.
1843 * record.c: Remove _initialize_record prototype.
1844 * regcache.c: Remove _initialize_regcache prototype.
1845 * reggroups.c: Remove _initialize_reggroup prototype.
1846 * remote-notif.c: Remove _initialize_notif prototype.
1847 * remote-sim.c: Remove _initialize_remote_sim prototype.
1848 * remote.c: Remove _initialize_remote prototype.
1849 * reverse.c: Remove _initialize_reverse prototype.
1850 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1851 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1852 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1853 prototype.
1854 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1855 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1856 * rust-exp.y: Remove _initialize_rust_exp prototype.
1857 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1858 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1859 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1860 * score-tdep.c: Remove _initialize_score_tdep prototype.
1861 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1862 prototype.
1863 * ser-go32.c: Remove _initialize_ser_dos prototype.
1864 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1865 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1866 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1867 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1868 * serial.c: Remove _initialize_serial prototype.
1869 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1870 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1871 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1872 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1873 * skip.c: Remove _initialize_step_skip prototype.
1874 * sol-thread.c: Remove _initialize_sol_thread prototype.
1875 * solib-aix.c: Remove _initialize_solib_aix prototype.
1876 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1877 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1878 * solib-frv.c: Remove _initialize_frv_solib prototype.
1879 * solib-spu.c: Remove _initialize_spu_solib prototype.
1880 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1881 * solib-target.c: Remove _initialize_solib_target prototype.
1882 * solib.c: Remove _initialize_solib prototype.
1883 * source.c: Remove _initialize_source prototype.
1884 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1885 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1886 prototype.
1887 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1888 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1889 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1890 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1891 prototype.
1892 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1893 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1894 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1895 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1896 prototype.
1897 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1898 prototype.
1899 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1900 prototype.
1901 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1902 prototype.
1903 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1904 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1905 prototype.
1906 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1907 prototype.
1908 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1909 prototype.
1910 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1911 prototype.
1912 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1913 prototype.
1914 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1915 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1916 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1917 * stabsread.c: Remove _initialize_stabsread prototype.
1918 * stack.c: Remove _initialize_stack prototype.
1919 * stap-probe.c: Remove _initialize_stap_probe prototype.
1920 * std-regs.c: Remove _initialize_frame_reg prototype.
1921 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1922 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1923 * symfile.c: Remove _initialize_symfile prototype.
1924 * symmisc.c: Remove _initialize_symmisc prototype.
1925 * symtab.c: Remove _initialize_symtab prototype.
1926 * target-dcache.c: Remove _initialize_target_dcache prototype.
1927 * target-descriptions.c: Remove _initialize_target_descriptions
1928 prototype.
1929 * thread.c: Remove _initialize_thread prototype.
1930 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1931 prototype.
1932 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1933 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1934 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1935 prototype.
1936 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1937 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1938 * tracefile.c: Remove _initialize_tracefile prototype.
1939 * tracepoint.c: Remove _initialize_tracepoint prototype.
1940 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1941 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1942 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1943 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1944 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1945 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1946 * tui/tui.c: Remove _initialize_tui prototype.
1947 * typeprint.c: Remove _initialize_typeprint prototype.
1948 * user-regs.c: Remove _initialize_user_regs prototype.
1949 * utils.c: Remove _initialize_utils prototype.
1950 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1951 * valarith.c: Remove _initialize_valarith prototype.
1952 * valops.c: Remove _initialize_valops prototype.
1953 * valprint.c: Remove _initialize_valprint prototype.
1954 * value.c: Remove _initialize_values prototype.
1955 * varobj.c: Remove _initialize_varobj prototype.
1956 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1957 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1958 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1959 * windows-nat.c: Remove _initialize_windows_nat,
1960 _initialize_check_for_gdb_ini, and _initialize_loadable
1961 prototypes.
1962 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1963 * xcoffread.c: Remove _initialize_xcoffread prototype.
1964 * xml-support.c: Remove _initialize_xml_support prototype.
1965 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1966 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1967 prototype.
1968 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1969 prototype.
1970 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1971
a611b5cb
KS
19722017-09-08 Keith Seitz <keiths@redhat.com>
1973
1974 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1975 field.
1976
469412dd
CW
19772017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1978
1979 * f-valprint.c (f_val_print): Remove check for one byte
1980 sized integers. Remove printing of character type.
1981
a5ad232b
FP
19822017-09-08 Frank Penczek <frank.penczek@intel.com>
1983 Christoph Weinmann <christoph.t.weinmann@intel.com>
1984 Bernhard Heckel <bernhard.heckel@intel.com>
1985
1986 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1987 to maintain proper indentation when printing pointers/refs.
1988
e5014227
JB
19892017-09-07 Joel Brobecker <brobecker@adacore.com>
1990
1991 GDB 8.0.1 released.
1992
63c99141
JB
19932017-09-07 Joel Brobecker <brobecker@adacore.com>
1994
1995 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1996
69c1e056
TT
19972017-09-05 Tom Tromey <tom@tromey.com>
1998
1999 * parse.c (funcall_chain): Now a std::vector.
2000 (start_arglist, end_arglist): Simplify.
2001 (free_funcalls): Remove.
2002 (parse_exp_in_context_1): Remove cleanup.
2003
fef704bf
TT
20042017-09-05 Tom Tromey <tom@tromey.com>
2005
2006 * go-exp.y (go_parse): Don't create a cleanup.
2007
5613c585
TT
20082017-09-05 Tom Tromey <tom@tromey.com>
2009
2010 * d-exp.y (PrimaryExpression): Use std::string.
2011 (d_parse): Don't create a cleanup.
2012
eae49211
TT
20132017-09-05 Tom Tromey <tom@tromey.com>
2014
2015 * utils.c (do_clear_parser_state): Remove.
2016 (make_cleanup_clear_parser_state): Remove.
2017 * p-exp.y (pascal_parse): Use scoped_restore.
2018 * m2-exp.y (m2_parse): Use scoped_restore.
2019 * f-exp.y (f_parse): Use scoped_restore.
2020 * d-exp.y (d_parse): Use scoped_restore.
2021 * c-exp.y (c_parse): Use scoped_restore.
2022 * ada-exp.y (ada_parse): Use scoped_restore.
2023 * utils.h (make_cleanup_clear_parser_state): Remove.
2024
73b9be8b
KS
20252017-09-06 Keith Seitz <keiths@redhat.com>
2026
2027 * dwarf2read.c (dw2_linkage_name_attr): New function.
2028 (dw2_linkage_name): New function.
2029 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2030 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2031 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2032
a102602b
KR
20332017-09-06 Kamil Rytarowski <n54@gmx.com>
2034
2035 * config/djgpp/djconfig.sh: Correct shell portability issue.
2036
28ad437d
KR
20372017-09-06 Kamil Rytarowski <n54@gmx.com>
2038
2039 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2040
351787dd
JB
20412017-09-06 John Baldwin <jhb@FreeBSD.org>
2042
2043 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2044 * NEWS: Mention new FreeBSD/mips native configuration.
2045 * configure.host: Add aarch64*-*-freebsd*.
2046 * configure.nat: Likewise.
2047 * aarch64-fbsd-nat.c: New file.
2048
c0f84956
JB
20492017-09-06 John Baldwin <jhb@FreeBSD.org>
2050
2051 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2052 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2053 * NEWS: Mention new FreeBSD/aarch64 target.
2054 * configure.tgt: Add aarch64*-*-freebsd*.
2055 * aarch64-fbsd-tdep.c: New file.
2056 * aarch64-fbsd-tdep.h: New file.
2057
7610297a
KR
20582017-09-06 Kamil Rytarowski <n54@gmx.com>
2059
2060 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2061
fbd1b771
JK
20622017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2063
2064 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2065 of TLS symbols.
2066
5ca79eae
PW
20672017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2068
2069 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2070 call.
2071
bf93d7ba
SM
20722017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2073
2074 * infrun.c (follow_exec): Call add_thread after
2075 target_find_description.
2076
1bb7c059
SM
20772017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2078
2079 * infrun.c (handle_inferior_event_1): When exec'ing, read
2080 stop_pc after follow_exec.
2081
fc809827
SM
20822017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2083
2084 * remote.c (process_g_packet): Update error message.
2085
d2fcdd85
YQ
20862017-09-05 Yao Qi <yao.qi@linaro.org>
2087
2088 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2089 targets.
2090
e69570ee
PA
20912017-09-05 Pedro Alves <palves@redhat.com>
2092
2093 * eval.c (eval_call, evaluate_funcall): New functions, factored
2094 out from ...
2095 (evaluate_subexp_standard): ... this.
2096
22916b07
YQ
20972017-09-05 Yao Qi <yao.qi@linaro.org>
2098
2099 * amd64-tdep.c (amd64_target_description): Create target
2100 descriptions.
2101 (_initialize_amd64_tdep): Don't call functions
2102 initialize_tdesc_amd64_*. Add self tests.
2103 * arch/amd64.c (amd64_create_target_description): Add parameter
2104 is_linux. Call set_tdesc_osabi if is_linux is true.
2105 * arch/amd64.h (amd64_create_target_description): Update the
2106 declaration.
2107 * arch/i386.c (i386_create_target_description): Add parameter
2108 is_linux. Call set_tdesc_osabi if is_linux is true.
2109 * arch/i386.h (i386_create_target_description): Update
2110 declaration.
2111 * configure.tgt: Add i386.o to gdb_target_obs.
2112 * features/Makefile (XMLTOC): Remove i386/*.xml.
2113 * features/i386/amd64-avx-avx512.c: Remove.
2114 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2115 * features/i386/amd64-avx-mpx.c: Remove.
2116 * features/i386/amd64-avx.c: Remove.
2117 * features/i386/amd64-mpx.c: Remove.
2118 * features/i386/amd64.c: Remove.
2119 * features/i386/i386-avx-avx512.c: Remove.
2120 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2121 * features/i386/i386-avx-mpx.c: Remove.
2122 * features/i386/i386-avx.c: Remove.
2123 * features/i386/i386-mmx.c: Remove.
2124 * features/i386/i386-mpx.c: Remove.
2125 * features/i386/i386.c: Remove.
2126 * i386-tdep.c: Don't include features/i386/i386*.c., include
2127 target-descriptions.h and arch/i386.h.
2128 (i386_target_description): Create target descriptions.
2129 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2130 functions. Do self tests.
2131
0854b7b1
YQ
21322017-09-05 Yao Qi <yao.qi@linaro.org>
2133
2134 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2135 * features/i386/amd64-avx-avx512-linux.c: Removed.
2136 * features/i386/amd64-avx-linux.c: Removed.
2137 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2138 * features/i386/amd64-avx-mpx-linux.c: Removed.
2139 * features/i386/amd64-linux.c: Removed.
2140 * features/i386/amd64-mpx-linux.c: Removed.
2141 * features/i386/x32-avx-avx512-linux.c: Removed.
2142 * features/i386/x32-avx-linux.c: Removed.
2143 * features/i386/x32-linux.c: Removed.
2144
b4570e4b
YQ
21452017-09-05 Yao Qi <yao.qi@linaro.org>
2146
2147 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2148 features/i386/*.c.
2149 (amd64_linux_read_description): Call
2150 amd64_create_target_description.
2151 * arch/amd64.c: New file.
2152 * arch/amd64.h: New file.
2153 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2154 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2155
6c73f67f
YQ
21562017-09-05 Yao Qi <yao.qi@linaro.org>
2157
2158 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2159 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2160 (amd64_linux_read_description): Create target descriptions.
2161 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2162 functions. Add unit tests.
2163 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2164 x32-core.xml.
2165 * features/i386/64bit-avx.c: Generated.
2166 * features/i386/64bit-avx512.c: Generated.
2167 * features/i386/64bit-core.c: Generated.
2168 * features/i386/64bit-linux.c: Generated.
2169 * features/i386/64bit-mpx.c: Generated.
2170 * features/i386/64bit-pkeys.c: Generated.
2171 * features/i386/64bit-segments.c: Generated.
2172 * features/i386/64bit-sse.c: Generated.
2173 * features/i386/x32-core.c: Generated.
2174 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2175 c files for amd64-linux and x32-linux.
2176
9d3d478b
YQ
21772017-09-05 Yao Qi <yao.qi@linaro.org>
2178
2179 * amd64-linux-tdep.c (amd64_linux_read_description): New
2180 function.
2181 (amd64_linux_core_read_description): Call
2182 amd64_linux_read_description.
2183 (amd64_linux_init_abi): Likewise.
2184 (amd64_x32_linux_init_abi): Likewise.
2185 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2186 * x86-linux-nat.c (x86_linux_read_description): Call
2187 amd64_linux_read_description.
2188
b9f1d50f
YQ
21892017-09-05 Yao Qi <yao.qi@linaro.org>
2190
2191 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2192 comments.
2193
188c9e6d
YQ
21942017-09-05 Yao Qi <yao.qi@linaro.org>
2195
2196 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2197 * features/i386/i386-avx-avx512-linux.c: Remove.
2198 * features/i386/i386-avx-linux.c: Remove.
2199 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2200 * features/i386/i386-avx-mpx-linux.c: Remove.
2201 * features/i386/i386-linux.c: Remove.
2202 * features/i386/i386-mmx-linux.c: Remove.
2203 * features/i386/i386-mpx-linux.c: Remove.
2204
5f035c07
YQ
22052017-09-05 Yao Qi <yao.qi@linaro.org>
2206
2207 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2208 (SFILES): Add arch/i386.c.
2209 (HFILES_NO_SRCDIR): Add arch/i386.h.
2210 * arch/i386.c: New file.
2211 * arch/i386.h: New file.
2212 * arch/tdesc.h (allocate_target_description): Declare.
2213 (set_tdesc_architecture): Declare.
2214 (set_tdesc_osabi): Declare.
2215 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2216 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2217 include arch/i386.h.
2218 (i386_linux_read_description): Remove code and call
2219 i386_create_target_description.
2220 (set_tdesc_architecture): New function.
2221 (set_tdesc_osabi): New function.
2222 * target-descriptions.h (allocate_target_description): Remove.
2223
0abe8a89
YQ
22242017-09-05 Yao Qi <yao.qi@linaro.org>
2225
2226 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2227 * target-descriptions.c (tdesc_create_feature): Likewise, and
2228 adjust code.
2229 * features/i386/32bit-avx.c: Re-generated.
2230 * features/i386/32bit-avx512.c: Re-generated.
2231 * features/i386/32bit-core.c: Re-generated.
2232 * features/i386/32bit-linux.c: Re-generated.
2233 * features/i386/32bit-mpx.c: Re-generated.
2234 * features/i386/32bit-pkeys.c: Re-generated.
2235 * features/i386/32bit-sse.c: Re-generated.
2236
0a188386
YQ
22372017-09-05 Yao Qi <yao.qi@linaro.org>
2238
2239 * regformats/regdef.h (struct reg): Override operator == and !=.
2240
f49ff000
YQ
22412017-09-05 Yao Qi <yao.qi@linaro.org>
2242
2243 * arch/tdesc.h: New file.
2244 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2245 * target-descriptions.c: Update comments.
2246 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2247 declarations.
2248 * features/i386/32bit-avx.c: Re-generated.
2249 * features/i386/32bit-avx512.c: Re-generated.
2250 * features/i386/32bit-core.c: Re-generated.
2251 * features/i386/32bit-linux.c: Re-generated.
2252 * features/i386/32bit-mpx.c: Re-generated.
2253 * features/i386/32bit-pkeys.c: Re-generated.
2254 * features/i386/32bit-sse.c: Re-generated.
2255
f7000548
YQ
22562017-09-05 Yao Qi <yao.qi@linaro.org>
2257
2258 * regformats/regdat.sh: Update generated code.
2259
c9a5e2a5
YQ
22602017-09-05 Yao Qi <yao.qi@linaro.org>
2261
2262 * regformats/regdat.sh: Adjust code order.
2263
d6b687ac
SM
22642017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2265
2266 * expprint.c (dump_subexp_body_standard): Use constant format
2267 string in fprintf_filtered call.
2268
a379bfd0
JB
22692017-09-04 John Baldwin <jhb@FreeBSD.org>
2270
2271 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2272 NetBSD/i386.
2273 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2274
f7efc967
JB
22752017-09-04 John Baldwin <jhb@FreeBSD.org>
2276
2277 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2278
c49fbc6c
JB
22792017-09-04 John Baldwin <jhb@FreeBSD.org>
2280
2281 * bsd-kvm.o: Define _KMEMUSER.
2282 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2283 * configure: Regenerate.
2284
26562e73
JB
22852017-09-04 John Baldwin <jhb@FreeBSD.org>
2286
2287 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2288 * i386-fbsd-nat.c: Likewise.
2289
31cf1487
JB
22902017-09-04 John Baldwin <jhb@FreeBSD.org>
2291
2292 * unittests/array-view-selftests.c: Add include of <array>.
2293
5b9f8a7c
JB
22942017-09-04 John Baldwin <jhb@FreeBSD.org>
2295
2296 * spu-tdep.c (flush_ea_cache): Add missing argument to
2297 call_function_by_hand.
2298
d69cf9b2
PA
22992017-09-04 Pedro Alves <palves@redhat.com>
2300
2301 * NEWS (Safer support for debugging with no debug info): New.
2302
3693fdb3
PA
23032017-09-04 Pedro Alves <palves@redhat.com>
2304
2305 * c-exp.y (function_method, function_method_void): Add current
2306 instance flags to TYPE_INSTANCE.
2307 * dwarf2read.c (check_modifier): New.
2308 (compute_delayed_physnames): Assert that only C++ adds delayed
2309 physnames. Mark fn_fields as const/volatile depending on
2310 physname.
2311 * eval.c (make_params): New type_instance_flags parameter. Use
2312 it as the new type's instance flags.
2313 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2314 flags element and pass it to make_params.
2315 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2316 instance flags element.
2317 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2318 * gdbtypes.h: Include "enum-flags.h".
2319 (type_instance_flags): New enum-flags type.
2320 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2321 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2322 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2323 (follow_type_instance_flags): New function.
2324 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2325 * parser-defs.h (follow_type_instance_flags): Declare.
2326 * valops.c (value_struct_elt_for_reference): const/volatile must
2327 match too.
2328
e68cb8e0
PA
23292017-09-04 Pedro Alves <palves@redhat.com>
2330
2331 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2332 function/method scopes; lookup the nested name as a function local
2333 static variable.
2334
858be34c
PA
23352017-09-04 Pedro Alves <palves@redhat.com>
2336
2337 (%type <voidval>): Add function_method.
2338 * c-exp.y (exp): New production for calls with no arguments.
2339 (function_method, function_method_void_or_typelist): New
2340 productions.
2341 (exp): New production for "method()::static_var".
2342 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2343 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2344 Handle OP_FUNC_STATIC_VAR.
2345 * parse.c (operator_length_standard):
2346 Handle OP_FUNC_STATIC_VAR.
2347
dd5901a6
PA
23482017-09-04 Pedro Alves <palves@redhat.com>
2349
2350 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2351 handling.
2352 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2353 Ditto.
2354 * parse.c (operator_length_standard, operator_check_standard):
2355 Ditto.
2356 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2357
46a4882b
PA
23582017-09-04 Pedro Alves <palves@redhat.com>
2359
2360 * ax-gdb.c: Include "typeprint.h".
2361 (gen_expr_for_cast): New function.
2362 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2363 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2364 type is unknown.
2365 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2366 nodebug_data_symbol.
2367 * eval.c: Include "typeprint.h".
2368 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2369 Error out if symbol has unknown type.
2370 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2371 evaluate_subexp_for_cast.
2372 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2373 OP_VAR_MSYM_VALUE.
2374 (evaluate_subexp_for_cast): New function.
2375 * gdbtypes.c (init_nodebug_var_type): New function.
2376 (objfile_type): Use it to initialize types of variables with no
2377 debug info.
2378 * typeprint.c (error_unknown_type): New.
2379 * typeprint.h (error_unknown_type): New declaration.
2380 * compile/compile-c-types.c (convert_type_basic): Handle
2381 TYPE_CODE_ERROR; warn and fallback to int for variables with
2382 unknown type.
2383
fe13dfec
PA
23842017-09-04 Pedro Alves <palves@redhat.com>
2385
2386 * eval.c (evaluate_var_value): New function, factored out from ...
2387 (evaluate_subexp_standard): ... here.
2388
d008ee21
PA
23892017-09-04 Pedro Alves <palves@redhat.com>
2390
2391 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2392 Remove useless assignments to 'op'.
2393
827d0c51
PA
23942017-09-04 Pedro Alves <palves@redhat.com>
2395
2396 * eval.c (eval_skip_value): New function.
2397 (evaluate_subexp_standard): Use it.
2398
2c5a2be1
PA
23992017-09-04 Pedro Alves <palves@redhat.com>
2400
2401 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2402 function name from symbol/minsym and pass it to
2403 error_call_unknown_return_type.
2404
74ea4be4
PA
24052017-09-04 Pedro Alves <palves@redhat.com>
2406
2407 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2408 * ax-gdb.c (gen_msym_var_ref): New function.
2409 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2410 * eval.c (evaluate_var_msym_value): New function.
2411 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2412 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2413 to call_function_by_hand.
2414 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2415 Handle OP_VAR_MSYM_VALUE.
2416 (union exp_element) <msymbol>: New field.
2417 * minsyms.h (struct type): Forward declare.
2418 (find_minsym_type_and_address): Declare.
2419 * parse.c (write_exp_elt_msym): New function.
2420 (write_exp_msymbol): Delete, refactored as ...
2421 (find_minsym_type_and_address): ... this new function.
2422 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2423 (operator_length_standard, operator_check_standard): Handle
2424 OP_VAR_MSYM_VALUE.
2425 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2426
7022349d
PA
24272017-09-04 Pedro Alves <palves@redhat.com>
2428
2429 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2430 TYPE_GNU_IFUNC specially here. Throw error if return type is
2431 unknown.
2432 * ada-typeprint.c (print_func_type): Handle functions with unknown
2433 return type.
2434 * c-typeprint.c (c_type_print_base): Handle functions and methods
2435 with unknown return type.
2436 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2437 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2438 * compile/compile-c-types.c: Include "objfiles.h".
2439 (convert_func): For functions with unknown return type, warn and
2440 default to int.
2441 * compile/compile-object-run.c (compile_object_run): Adjust call
2442 to call_function_by_hand_dummy.
2443 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2444 call_function_by_hand.
2445 * eval.c (evaluate_subexp_standard): Adjust calls to
2446 call_function_by_hand. Handle functions and methods with unknown
2447 return type. Pass expect_type to call_function_by_hand.
2448 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2449 return type.
2450 * gcore.c (call_target_sbrk): Adjust call to
2451 call_function_by_hand.
2452 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2453 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2454 an integer address type instead of nodebug.
2455 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2456 call_function_by_hand.
2457 * infcall.c (error_call_unknown_return_type): New function.
2458 (call_function_by_hand): New "default_return_type" parameter.
2459 Pass it down.
2460 (call_function_by_hand_dummy): New "default_return_type"
2461 parameter. Use it instead of defaulting to int. If there's no
2462 default and the return type is unknown, throw an error. If
2463 there's a default return type, and the called function has no
2464 debug info, then assume the function is prototyped.
2465 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2466 New "default_return_type" parameter.
2467 (error_call_unknown_return_type): New declaration.
2468 * linux-fork.c (call_lseek): Cast return type of lseek.
2469 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2470 call_function_by_hand.
2471 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2472 calls to call_function_by_hand.
2473 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2474 return type.
2475 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2476 (value_nsstring, print_object_command): Adjust calls to
2477 call_function_by_hand.
2478 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2479 functions with unknown return type.
2480 (pascal_type_print_func_varspec_suffix): New function.
2481 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2482 TYPE_CODE_METHOD>: Use it.
2483 * python/py-value.c (valpy_call): Adjust call to
2484 call_function_by_hand.
2485 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2486 call_function_by_hand.
2487 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2488 call_function_by_hand.
2489 * valops.c (value_allocate_space_in_inferior): Adjust call to
2490 call_function_by_hand.
2491 * typeprint.c (type_print_unknown_return_type): New function.
2492 * typeprint.h (type_print_unknown_return_type): New declaration.
2493
54990598
PA
24942017-09-04 Pedro Alves <palves@redhat.com>
2495
2496 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2497 types with more than one parameter as prototyped.
2498
9a24775b
PA
24992017-09-04 Pedro Alves <palves@redhat.com>
2500
2501 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2502 (disassemble_command): Use gdb_disassembly_flags instead of bare
2503 int.
2504 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2505 (dump_insns, do_mixed_source_and_assembly_deprecated)
2506 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2507 Use gdb_disassembly_flags instead of bare int.
2508 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2509 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2510 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2511 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2512 (enum gdb_disassembly_flag): ... values of this new enumeration.
2513 (gdb_disassembly_flags): Define.
2514 (gdb_disassembly)
2515 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2516 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2517 gdb_disassembly_flags instead of bare int.
2518 * record-btrace.c (btrace_insn_history)
2519 (record_btrace_insn_history, record_btrace_insn_history_range)
2520 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2521 instead of bare int.
2522 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2523 Use gdb_disassembly_flags instead of bare int.
2524 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2525 Define.
2526 * target-delegates.c: Regenerate.
2527 * target.c (target_insn_history, target_insn_history_from)
2528 (target_insn_history_range): Use gdb_disassembly_flags instead of
2529 bare int.
2530 * target.h: Include "disasm.h".
2531 (struct target_ops) <to_insn_history, to_insn_history_from,
2532 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2533 int.
2534 (target_insn_history, target_insn_history_from)
2535 (target_insn_history_range): Use gdb_disassembly_flags instead of
2536 bare int.
2537
80a65e9b
SM
25382017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2539
2540 * cli/cli-script.c (build_command_line): For if/while commands,
2541 check whether args is empty.
2542
6b66338c
SM
25432017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2544
2545 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2546 (enum command_control_type): Likewise.
2547 (struct command_line): Likewise.
2548 (free_command_lines): Likewise.
2549 (struct command_lines_deleter): Likewise.
2550 (command_line_up): Likewise.
2551 (read_command_lines): Likewise.
2552 (read_command_lines_1): Likewise.
2553 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2554 (enum command_control_type): Likewise.
2555 (struct command_line): Likewise.
2556 (free_command_lines): Likewise.
2557 (struct command_lines_deleter): Likewise.
2558 (command_line_up): Likewise.
2559 (read_command_lines): Likewise.
2560 (read_command_lines_1): Likewise.
2561 * breakpoint.h: Include cli/cli-script.h.
2562 * extension-priv.h: Likewise.
2563 * gdbcmd.h: Likewise.
2564
51abb421
PA
25652017-09-04 Pedro Alves <palves@redhat.com>
2566
2567 * ada-lang.c (is_known_support_routine): Move sal declaration to
2568 where it is initialized.
2569 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2570 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2571 (clear_command, update_static_tracepoint): Remove init_sal
2572 references. Move declarations closer to initializations.
2573 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2574 initializations.
2575 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2576 references. Move sal declarations closer to initializations.
2577 * frame.c (find_frame_sal): Return a symtab_and_line via function
2578 return instead of output parameter. Remove init_sal references.
2579 * frame.h (find_frame_sal): Return a symtab_and_line via function
2580 return instead of output parameter.
2581 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2582 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2583 instead of memset.
2584 (gdbscm_find_pc_line): Remove init_sal reference.
2585 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2586 references. Move declarations closer to initializations.
2587 * infcmd.c (set_step_frame): Update. Move declarations closer to
2588 initializations.
2589 (finish_backward): Remove init_sal references. Move declarations
2590 closer to initializations.
2591 * infrun.c (process_event_stop_test, handle_step_into_function)
2592 (insert_hp_step_resume_breakpoint_at_frame)
2593 (insert_step_resume_breakpoint_at_caller): Likewise.
2594 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2595 (symbol_to_sal): Likewise.
2596 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2597 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2598 to its initialization.
2599 * reverse.c (save_bookmark_command): Use new/delete. Remove
2600 init_sal references. Move declarations closer to initializations.
2601 * source.c (get_current_source_symtab_and_line): Remove brace
2602 initialization.
2603 (set_current_source_symtab_and_line): Now takes the sal by const
2604 reference. Remove brace initialization.
2605 (line_info): Remove init_sal reference.
2606 * source.h (set_current_source_symtab_and_line): Now takes a
2607 symtab_and_line via const reference.
2608 * stack.c (set_current_sal_from_frame): Adjust.
2609 (print_frame_info): Adjust.
2610 (get_last_displayed_sal): Return the sal via function return
2611 instead of via output parameter. Simplify.
2612 (frame_info): Adjust.
2613 * stack.h (get_last_displayed_sal): Return the sal via function
2614 return instead of via output parameter.
2615 * symtab.c (init_sal): Delete.
2616 (find_pc_sect_line): Remove init_sal references. Move
2617 declarations closer to initializations.
2618 (find_function_start_sal): Remove init_sal references. Move
2619 declarations closer to initializations.
2620 * symtab.h (struct symtab_and_line): In-class initialize all
2621 fields.
2622 * tracepoint.c (set_traceframe_context)
2623 (print_one_static_tracepoint_marker): Remove init_sal references.
2624 Move declarations closer to initializations.
2625 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2626 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2627 declarations closer to initializations.
2628 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2629 init_sal references. Adjust.
2630
6c5b2ebe
PA
26312017-09-04 Pedro Alves <palves@redhat.com>
2632
2633 * ax-gdb.c (agent_command_1): Use range-for.
2634 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2635 * breakpoint.c: Include "common/array-view.h".
2636 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2637 parameter from struct symtabs_and_lines to
2638 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2639 (breakpoint_sals_to_pc): Change sals parameter from struct
2640 symtabs_and_lines to std::vector reference.
2641 (check_fast_tracepoint_sals): Change sals parameter from struct
2642 symtabs_and_lines to std::array_view. Use range-for.
2643 (decode_static_tracepoint_spec): Return a std::vector instead of
2644 symtabs_and_lines. Update.
2645 (create_breakpoint): Update.
2646 (break_range_command, until_break_command, clear_command): Update.
2647 (base_breakpoint_decode_location, bkpt_decode_location)
2648 (bkpt_probe_create_sals_from_location)
2649 (bkpt_probe_decode_location, tracepoint_decode_location)
2650 (tracepoint_probe_decode_location)
2651 (strace_marker_create_sals_from_location): Return a std::vector
2652 instead of symtabs_and_lines.
2653 (strace_marker_create_breakpoints_sal): Update.
2654 (strace_marker_decode_location): Return a std::vector instead of
2655 symtabs_and_lines. Update.
2656 (update_breakpoint_locations): Change struct symtabs_and_lines
2657 parameters to gdb::array_view. Adjust.
2658 (location_to_sals): Return a std::vector instead of
2659 symtabs_and_lines. Update.
2660 (breakpoint_re_set_default): Use std::vector instead of struct
2661 symtabs_and_lines.
2662 (decode_location_default): Return a std::vector instead of
2663 symtabs_and_lines. Update.
2664 * breakpoint.h: Include "common/array-view.h".
2665 (struct breakpoint_ops) <decode_location>: Now returns a
2666 std::vector instead of returning a symtabs_and_lines via output
2667 parameter.
2668 (update_breakpoint_locations): Change sals parameters to use
2669 gdb::array_view.
2670 * cli/cli-cmds.c (edit_command, list_command): Update to use
2671 std::vector and gdb::array_view.
2672 (ambiguous_line_spec): Adjust to use gdb::array_view and
2673 range-for.
2674 (compare_symtabs): Rename to ...
2675 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2676 const reference and adjust.
2677 (filter_sals): Rewrite using std::vector and standard algorithms.
2678 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2679 (jump_command): Update to use std::vector.
2680 * linespec.c (struct linespec_state) <canonical_names>: Update
2681 comment.
2682 (add_sal_to_sals_basic): Delete.
2683 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2684 (decode_line_2, create_sals_line_offset)
2685 (convert_address_location_to_sals, convert_linespec_to_sals)
2686 (convert_explicit_location_to_sals, parse_linespec)
2687 (event_location_to_sals, decode_line_full, decode_line_1)
2688 (decode_line_with_current_source)
2689 (decode_line_with_last_displayed, decode_objc)
2690 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2691 (linespec_result::~linespec_result): Adjust to use std::vector
2692 instead of symtabs_and_lines.
2693 * linespec.h (linespec_sals::sals): Now a std::vector.
2694 (struct linespec_result): Use std::vector, bool, and in-class
2695 initialization.
2696 (decode_line_1, decode_line_with_current_source)
2697 (decode_line_with_last_displayed): Return std::vector.
2698 * macrocmd.c (info_macros_command): Use std::vector.
2699 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2700 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2701 std::vector.
2702 * probe.h (parse_probes): Return a std::vector.
2703 * python/python.c (gdbpy_decode_line): Use std::vector and
2704 gdb::array_view.
2705 * source.c (select_source_symtab, line_info): Use std::vector.
2706 * stack.c (func_command): Use std::vector.
2707 * symtab.h (struct symtabs_and_lines): Delete.
2708 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2709
7c44b49c
PA
27102017-09-04 Pedro Alves <palves@redhat.com>
2711
2712 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2713 unittests/array-view-selftests.c.
2714 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2715 * common/array-view.h: New file.
2716 * unittests/array-view-selftests.c: New file.
2717
e439fa14
PA
27182017-09-04 Pedro Alves <palves@redhat.com>
2719
2720 * cli/cli-cmds.c (edit_command): Pass message to
2721 ambiguous_line_spec.
2722 (list_command): Pass message to ambiguous_line_spec. Say
2723 "first"/"last" instead of "start" and "end" to be consistent with
2724 the manual.
2725 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2726 them to print formatted message.
2727
7525b645
PA
27282017-09-04 Pedro Alves <palves@redhat.com>
2729
2730 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2731 ftrace_update_insns by reference instead of pointer.
2732
badc0020
YQ
27332017-09-04 Yao Qi <yao.qi@linaro.org>
2734
2735 * i386-go32-tdep.c: Include x86-xstate.h.
2736 (i386_go32_init_abi): Call i386_target_description.
2737 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2738 if xcr0 is X86_XSTATE_X87_MASK.
2739 * i386-tdep.h (tdesc_i386): Remove the declaration.
2740 (tdesc_i386_mmx): Likewise.
2741
d78bdb54
YQ
27422017-09-04 Yao Qi <yao.qi@linaro.org>
2743
2744 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2745 X86_XSTATE_SSE_MASK instead of 0.
2746
ca1fa5ee
YQ
27472017-09-04 Yao Qi <yao.qi@linaro.org>
2748
2749 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2750 i386_target_description.
2751 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2752 i386_target_description.
2753 * i386-tdep.c (i386_gdbarch_init): Likewise.
2754
2434b019
YQ
27552017-09-04 Yao Qi <yao.qi@linaro.org>
2756
2757 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2758 (x86_darwin_init_abi_64): Call amd64_target_description.
2759 * amd64-dicos-tdep.c: Likewise.
2760 * amd64-fbsd-nat.c: Likewise.
2761 * amd64-fbsd-tdep.c: Likewise.
2762 * amd64-nbsd-tdep.c: Likewise.
2763 * amd64-obsd-tdep.c: Likewise.
2764 * amd64-sol2-tdep.c: Likewise.
2765 * amd64-windows-tdep.c: Likewise.
2766 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2767
0860c437
SM
27682017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2769
2770 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2771 (btrace_function) <insn>: Change type to use std::vector.
2772 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2773 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2774 ftrace_update_insns, ftrace_compute_global_level_offset,
2775 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2776 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2777 change to std::vector.
2778 (ftrace_update_insns): Adjust to change to std::vector, change
2779 type of INSN parameter.
2780 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2781 * record-btrace.c (btrace_call_history_insn_range,
2782 btrace_compute_src_line_range,
2783 record_btrace_frame_prev_register): Adjust to change to
2784 std::vector.
2785 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2786 to change to std::vector.
2787
0638b7f9
TT
27882017-09-03 Tom Tromey <tom@tromey.com>
2789
2790 * corefile.c (reopen_exec_file): Use std::string.
2791
8f84fb0e
TT
27922017-09-03 Tom Tromey <tom@tromey.com>
2793
2794 * compile/compile.c (compile_register_name_mangled): Return
2795 std::string.
2796 * compile/compile-loc2c.c (pushf_register_address): Update.
2797 (pushf_register): Update.
2798 * compile/compile-c-types.c (convert_array): Update.
2799 * compile/compile-c-symbols.c (generate_vla_size): Update.
2800 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2801 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2802 (convert_one_symbol): Update.
2803 (generate_c_for_for_one_variable): Update.
2804 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2805 std::string.
2806 (generate_register_struct): Update.
2807 * compile/compile-internal.h (c_get_range_decl_name): Return a
2808 std::string.
2809 (compile_register_name_mangled): Return std::string.
2810
18e9961f
TT
28112017-09-03 Tom Tromey <tom@tromey.com>
2812
2813 * utils.c (perror_string): Return a std::string.
2814 (throw_perror_with_name, perror_warning_with_name): Update.
2815
45343786
TT
28162017-09-03 Tom Tromey <tom@tromey.com>
2817
2818 * demangle.c (demangle_command): Use std::string,
2819 unique_xmalloc_ptr.
2820
b57af503
TT
28212017-09-03 Tom Tromey <tom@tromey.com>
2822
2823 * cli/cli-setshow.c (do_set_command): Use std::string.
2824
6eecf35f
TT
28252017-09-03 Tom Tromey <tom@tromey.com>
2826
2827 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2828
56496dd4
TT
28292017-09-03 Tom Tromey <tom@tromey.com>
2830
2831 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2832
e91a1fa7
TT
28332017-09-03 Tom Tromey <tom@tromey.com>
2834
2835 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2836 gdb::unique_xmalloc_ptr.
2837
7ffd83d7
TT
28382017-09-03 Tom Tromey <tom@tromey.com>
2839
2840 * thread.c (print_thread_info_1): Use string_printf.
2841 (thread_apply_command, thread_apply_all_command): Use
2842 std::string.
2843
1ccbe998
TT
28442017-09-03 Tom Tromey <tom@tromey.com>
2845
2846 * valprint.c (val_print_string): Update.
2847 * gdbcore.h (memory_error_message): Return std::string.
2848 * corefile.c (memory_error_message): Return std::string.
2849 (memory_error): Update.
2850 * breakpoint.c (insert_bp_location): Update.
2851
23fdd69e
SM
28522017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2853
2854 * target/waitstatus.h (target_waitstatus_to_string): Change
2855 return type to std::string.
2856 * target/waitstatus.c (target_waitstatus_to_string): Return
2857 std::string.
2858 * target.h (target_waitstatus_to_string): Remove declaration.
2859 * infrun.c (resume, clear_proceed_status_thread,
2860 print_target_wait_results, do_target_wait, save_waitstatus,
2861 stop_all_threads): Adjust.
2862 * record-btrace.c (record_btrace_wait): Adjust.
2863 * target-debug.h
2864 (target_debug_print_struct_target_waitstatus_p): Adjust.
2865
5c811d30
JK
28662017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2867
2868 PR gdb/22046
2869 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2870 detection.
2871
0a2dde4a
SDJ
28722017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2873
2874 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2875 for setting/unsetting environment variables on the remote target.
2876 (New remote packets): Add entries for QEnvironmentHexEncoded,
2877 QEnvironmentUnset and QEnvironmentReset.
2878 * common/environ.c (gdb_environ::operator=): Extend method to
2879 handle m_user_set_env_list and m_user_unset_env_list.
2880 (gdb_environ::clear): Likewise.
2881 (match_var_in_string): Change type of first parameter from 'char
2882 *' to 'const char *'.
2883 (gdb_environ::set): Extend method to handle
2884 m_user_set_env_list and m_user_unset_env_list.
2885 (gdb_environ::unset): Likewise.
2886 (gdb_environ::clear_user_set_env): New method.
2887 (gdb_environ::user_set_envp): Likewise.
2888 (gdb_environ::user_unset_envp): Likewise.
2889 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2890 m_user_unset_env_list on move constructor/assignment.
2891 (unset): Add new default parameter 'update_unset_list = true'.
2892 (clear_user_set_env): New method.
2893 (user_set_envp): Likewise.
2894 (user_unset_envp): Likewise.
2895 (m_user_set_env_list): New std::set.
2896 (m_user_unset_env_list): Likewise.
2897 * common/rsp-low.c (hex2str): New function.
2898 (bin2hex): New overload for bin2hex function.
2899 * common/rsp-low.c (hex2str): New prototype.
2900 (str2hex): New overload prototype.
2901 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2902 QEnvironmentUnset and QEnvironmentReset.
2903 (remote_protocol_features): Add QEnvironmentHexEncoded,
2904 QEnvironmentUnset and QEnvironmentReset packets.
2905 (send_environment_packet): New function.
2906 (extended_remote_environment_support): Likewise.
2907 (extended_remote_create_inferior): Call
2908 extended_remote_environment_support.
2909 (_initialize_remote): Add QEnvironmentHexEncoded,
2910 QEnvironmentUnset and QEnvironmentReset packet configs.
2911 * unittests/environ-selftests.c (gdb_selftest_env_var):
2912 New variable.
2913 (test_vector_initialization): New function.
2914 (test_init_from_host_environ): Likewise.
2915 (test_reinit_from_host_environ): Likewise.
2916 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2917 Likewise.
2918 (test_unset_set_empty_vector): Likewise.
2919 (test_vector_clear): Likewise.
2920 (test_std_move): Likewise.
2921 (test_move_constructor):
2922 (test_self_move): Likewise.
2923 (test_set_unset_reset): Likewise.
2924 (run_tests): Rewrite in terms of the functions above.
2925
654670a4
WP
29262017-08-31 Weimin Pan <weimin.pan@oracle.com>
2927
2928 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2929 (adi_available): Use a temp variable of type CORE_ADDR as argument
2930 3 when calling target_auxv_search.
2931 (adi_normalize_address): Use masks and xor operators to calculate
2932 normalized address.
2933 (adi_read_versions, adi_write_versions, adi_print_versions)
2934 (do_examine, do_assign): Use paddress.
2935
7755ddb7
JB
29362017-08-29 John Baldwin <jhb@FreeBSD.org>
2937
2938 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2939 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2940 out of loop and add supply of FIR.
2941 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2942 add collect of FIR.
2943
fd437cbc
SM
29442017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2945
3804a343 2946 PR gdb/21827
fd437cbc
SM
2947 * cli/cli-script.c (define_command): Don't convert command name
2948 to lower case.
2949
988f6b3d
JB
29502017-08-25 Joel Brobecker <brobecker@adacore.com>
2951
2952 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2953 Update all callers accordingly. Remove all code blocks handling
2954 the case where DISPP is not NULL.
2955
663c44ac
JK
29562017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2957
2958 PR symtab/22003
2959 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2960 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2961 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2962
f1902523
JK
29632017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2964
2965 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2966 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2967 (read_comp_units_from_section): New parameter abbrev_section, use
2968 read_and_check_comp_unit_head, allocate signatured_type if needed.
2969 (create_all_comp_units): Update read_comp_units_from_section caller.
2970
87215ad1
SDJ
29712017-08-23 Pedro Alves <palves@redhat.com>
2972
2973 PR remote/21852
2974 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2975 to null_ptid and switch to thread without reading the registers
2976 after adding the inferior.
2977
6e41ddec
JK
29782017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2979
2980 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2981 compile-gcc.
2982 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2983 (compile_to_object): Implement compile_gcc.
2984 (_initialize_compile): Install "set compile-gcc". Initialize
2985 compile_gcc.
2986
e68c32d5
JK
29872017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2988
2989 * compile/compile.c (compile_to_object): Conditionally call
2990 set_verbose. Conditionally call compile or compile_v0.
2991
58afddc6
WP
29922017-08-07 Weimin Pan <weimin.pan@oracle.com>
2993
2994 * sparc64-tdep.h: (adi_normalize_address): New export.
2995 * sparc-nat.h: (open_adi_tag_fd): New export.
2996 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2997 * sparc64-linux-tdep.c:
2998 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2999 (sparc64_linux_handle_segmentation_fault): New function.
3000 (sparc64_linux_init_abi): Register
3001 sparc64_linux_handle_segmentation_fault
3002 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3003 (sparc64_addr_bits_remove): New function.
3004 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3005 (MAX_PROC_NAME_SIZE): New macro.
3006 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3007 (sparc64adilist): New variable.
3008 (adi_proc_list): New variable.
3009 (find_adi_info): New function.
3010 (add_adi_info): New function.
3011 (get_adi_info_proc): New function.
3012 (get_adi_info): New function.
3013 (info_adi_command): New function.
3014 (read_maps_entry): New function.
3015 (adi_available): New function.
3016 (adi_normalize_address): New function.
3017 (adi_align_address): New function.
3018 (adi_convert_byte_count): New function.
3019 (adi_tag_fd): New function.
3020 (adi_is_addr_mapped): New function.
3021 (adi_read_versions): New function.
3022 (adi_write_versions): New function.
3023 (adi_print_versions): New function.
3024 (do_examine): New function.
3025 (do_assign): New function.
3026 (adi_examine_command): New function.
3027 (adi_assign_command): New function.
3028 (_initialize_sparc64_adi_tdep): New function.
3029
11db9430
SM
30302017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3031
3032 * breakpoint.c (breakpoints_info): Rename to ...
3033 (info_breakpoints_command): ... this.
3034 (watchpoints_info): Rename to ...
3035 (info_watchpoints_command): ... this.
3036 (tracepoints_info): Rename to ...
3037 (info_tracepoints_command): ... this.
3038 (_initialize_breakpoint): Adjust.
3039 * dcache.c (dcache_info): Rename to ...
3040 (info_display_command): ... this.
3041 (_initialize_dcache): Adjust.
3042 * frame.h (args_info): Rename to ...
3043 (info_args_command): ... this.
3044 (locals_info): Rename to ...
3045 (info_locals_command): ... this.
3046 * infcmd.c (nofp_registers_info): Rename to ...
3047 (info_registers_command): ... this.
3048 (float_info): Rename to ...
3049 (info_float_command): ... this.
3050 (program_info): Rename to ...
3051 (info_program_command): ... this.
3052 (all_registers_info): Rename to ...
3053 (info_all_registers_command): ... this.
3054 (vector_info): Rename to ...
3055 (info_vector_command): ... this.
3056 (float_info): Rename to ...
3057 (info_float_command): ... this.
3058 (_initialize_infcmd): Adjust.
3059 * inferior.h (term_info): Rename to ...
3060 (info_terminal_command): ... this.
3061 * inflow.c (term_info): Rename to ...
3062 (info_terminal_command): ... this.
3063 (_initialize_inflow): Adjust.
3064 * infrun.c (signals_info): Rename to ...
3065 (info_signals_command): ... this.
3066 (_initialize_infrun): Adjust.
3067 * objc-lang.c (classes_info): Rename to ...
3068 (info_classes_command): ... this.
3069 (selectors_info): Rename to ...
3070 (info_selectors_command): ... this.
3071 (_initialize_objc_language): Adjust.
3072 * printcmd.c (sym_info): Rename to ...
3073 (info_symbol_command): ... this.
3074 (address_info): Rename to ...
3075 (info_address_command): ... this.
3076 (display_info): Rename to ...
3077 (info_display_command): ... this.
3078 (_initialize_printcmd): Adjust.
3079 * reverse.c (bookmarks_info): Rename to ...
3080 (info_breakpoints_command): ... this.
3081 (_initialize_reverse): Adjust.
3082 * ser-go32.c (dos_info): Rename to ...
3083 (info_serial_command): ... this.
3084 (_initialize_ser_dos): Adjust.
3085 * skip.c (skip_info): Rename to ...
3086 (info_skip_command): ... this.
3087 (_initialize_step_skip): Adjust.
3088 * source.c (line_info): Rename to ...
3089 (info_line_command): ... this.
3090 (source_info): Rename to ...
3091 (info_source_command)
3092 * stack.c (frame_info): Rename to ...
3093 (info_frame_command): ... this.
3094 (locals_info): Rename to ...
3095 (info_locals_command): ... this.
3096 (args_info): Rename to ...
3097 (info_args_command): ... this.
3098 (_initialize_stack): Adjust.
3099 * symtab.c (sources_info): Rename to ...
3100 (info_sources_command): ... this.
3101 (variables_info): Rename to ...
3102 (info_variables_command): ... this.
3103 (functions_info): Rename to ...
3104 (info_functions_command): ... this.
3105 (types_info): Rename to ...
3106 (info_types_command): ... this.
3107 (_initialize_symtab): Adjust.
3108 * target.c (target_info): Rename to ...
3109 (info_target_command): ... this.
3110 (initialize_targets): Adjust.
3111 * tracepoint.c (tvariables_info): Rename to ...
3112 (info_tvariables_command): ... this.
3113 (scope_info): Rename to ...
3114 (info_scope_command): ... this.
3115 (trace_dump_actions): Adjust.
3116 (_initialize_tracepoint): Adjust.
3117
b270e6f9
TT
31182017-08-22 Tom Tromey <tom@tromey.com>
3119
3120 * breakpoint.h (install_breakpoint): Update.
3121 * breakpoint.c (add_solib_catchpoint): Update.
3122 (install_breakpoint): Change argument to a std::unique_ptr.
3123 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3124 (create_breakpoint_sal, create_breakpoint): Update.
3125 (watch_command_1, catch_exec_command_1)
3126 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3127 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3128 Return the breakpoint.
3129 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3130 (new_single_step_breakpoint): Update.
3131 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3132 std::unique_ptr.
3133 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3134 std::unique_ptr.
3135 * break-catch-sig.c (create_signal_catchpoint): Use
3136 std::unique_ptr.
3137 * ada-lang.c (create_ada_exception_catchpoint): Use
3138 std::unique_ptr.
3139
36bd8eaa
TT
31402017-08-22 Tom Tromey <tom@tromey.com>
3141
3142 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3143
56f37645
TT
31442017-08-22 Tom Tromey <tom@tromey.com>
3145
3146 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3147 (lookup_partial_symbol): Update.
3148
0b581c69
TT
31492017-08-22 Tom Tromey <tom@tromey.com>
3150
3151 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3152 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3153 (find_and_open_source, symtab_to_fullname): Update.
3154 * psymtab.c (psymtab_to_fullname): Update.
3155
14278e1f
TT
31562017-08-22 Tom Tromey <tom@tromey.com>
3157
3158 * exec.c (exec_file_attach): Update.
3159 * linux-thread-db.c (try_thread_db_load): Update.
3160 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3161 * utils.c (gdb_realpath): Change return type.
3162 (gdb_realpath_keepfile): Update.
3163 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3164 (_initialize_utils): Register the new self test.
3165 * source.c (openp): Update.
3166 (find_and_open_source): Update.
3167 * nto-tdep.c (nto_find_and_open_solib): Update.
3168 * main.c (set_gdb_data_directory): Update.
3169 (captured_main_1): Update.
3170 * dwarf2read.c (dwarf2_get_dwz_file): Update
3171 (dw2_map_symbol_filenames): Update.
3172 * auto-load.c (auto_load_safe_path_vec_update): Update.
3173 (filename_is_in_auto_load_safe_path_vec): Change type of
3174 "filename_realp".
3175 (auto_load_objfile_script): Update.
3176 (file_is_auto_load_safe): Update. Use std::string.
3177 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3178
4971c9a7
TT
31792017-08-22 Tom Tromey <tom@tromey.com>
3180
3181 * utils.c (gdb_realpath_keepfile): Return a
3182 gdb::unique_xmalloc_ptr.
3183 * exec.c (exec_file_attach): Update.
3184 * utils.h (gdb_realpath_keepfile): Return a
3185 gdb::unique_xmalloc_ptr.
3186
e3e41d58
TT
31872017-08-22 Tom Tromey <tom@tromey.com>
3188
3189 * compile/compile.c (compile_file_command): Use
3190 gdb::unique_xmalloc_ptr, std::string.
3191 * utils.c (gdb_abspath): Change return type.
3192 * source.c (openp): Update.
3193 * objfiles.c (allocate_objfile): Update.
3194 * main.c (set_gdb_data_directory): Update.
3195 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3196
0d999a6e
ZZ
31972017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3198
3199 * cli-cmds.c (list_commands): List actual code around more than
3200 one location.
3201
329d5e7e
JB
32022017-08-21 John Baldwin <jhb@FreeBSD.org>
3203
3204 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3205
bf223d3e
PA
32062017-08-21 Pedro Alves <palves@redhat.com>
3207
3208 PR gdb/19487
3209 * c-exp.y (variable production): Handle function aliases.
3210 * minsyms.c (msymbol_is_text): New function.
3211 * minsyms.h (msymbol_is_text): Declare.
3212 * symtab.c (find_function_alias_target): New function.
3213 * symtab.h (find_function_alias_target): Declare.
3214
c973d0aa
PA
32152017-08-21 Pedro Alves <palves@redhat.com>
3216
3217 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3218 typedefs.
3219 * typeprint.c (whatis_exp): If handling "whatis", and expression
3220 is OP_TYPE, strip one typedef level. Otherwise don't strip
3221 typedefs here.
3222 * valops.c (value_cast): Save "to" type before resolving
3223 stubs/typedefs. Use that type as resulting value's type.
3224
2989a365
TT
32252017-08-18 Tom Tromey <tom@tromey.com>
3226 Pedro Alves <palves@redhat.com>
3227
3228 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3229 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3230 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3231 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3232 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3233 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3234 (linux_get_siginfo_data): Add "thread" argument. Use
3235 scoped_restore.
3236 * linux-nat.c (linux_child_follow_fork)
3237 (check_stopped_by_watchpoint): Use scoped_restore.
3238 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3239 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3240 (restore_inferior_ptid, save_inferior_ptid): Remove.
3241 * btrace.c (btrace_fetch): Use scoped_restore.
3242 * bsd-uthread.c (bsd_uthread_fetch_registers)
3243 (bsd_uthread_store_registers): Use scoped_restore.
3244 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3245 scoped_restore.
3246 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3247 (aix_thread_xfer_partial): Use scoped_restore.
3248 * inferior.h (save_inferior_ptid): Remove.
3249
e60eb288
YQ
32502017-08-18 Yao Qi <yao.qi@linaro.org>
3251
3252 PR tdep/21818
3253 * arm-tdep.c (gdb_print_insn_arm): Mark
3254 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3255
6d580b63
YQ
32562017-08-18 Yao Qi <yao.qi@linaro.org>
3257
3258 * NEWS: Mention GDBserver's new option "--selftest".
3259 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3260 * selftest.c: Move it to common/selftest.c.
3261 * selftest.h: Move it to common/selftest.h.
3262 * selftest-arch.c (reset): New function.
3263 (tests_with_arch): Call reset.
3264
86dcbf50
YQ
32652017-08-18 Yao Qi <yao.qi@linaro.org>
3266
3267 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3268 instead of exception_fprintf and printf_filtered.
3269
7649770c
YQ
32702017-08-18 Yao Qi <yao.qi@linaro.org>
3271
3272 * selftest.c (register_self_test): Rename it to
3273 selftests::register_test.
3274 (run_self_tests): selftest::run_tests.
3275 * selftest.h: Update declarations.
3276 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3277 selftests::register_test_foreach_arch.
3278 * selftest-arch.h: Update declaration.
3279 * aarch64-tdep.c: Update.
3280 * arm-tdep.c: Likewise.
3281 * disasm-selftests.c: Likewise.
3282 * dwarf2loc.c: Likewise.
3283 * dwarf2-frame.c: Likewise.
3284 * findvar.c: Likewise.
3285 * gdbarch-selftests.c: Likewise.
3286 * maint.c (maintenance_selftest): Likewise.
3287 * regcache.c: Likewise.
3288 * rust-exp.y: Likewise.
3289 * selftest-arch.c: Likewise.
3290 * unittests/environ-selftests.c: Likewise.
3291 * unittests/function-view-selftests.c: Likewise.
3292 * unittests/offset-type-selftests.c: Likewise.
3293 * unittests/optional-selftests.c: Likewise.
3294 * unittests/scoped_restore-selftests.c: Likewise.
3295 * utils-selftests.c: Likewise.
3296
b0cba12e
PA
32972017-08-17 Pedro Alves <palves@redhat.com>
3298
3299 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3300 local.
3301
4c8aa72d
PA
33022017-08-17 Pedro Alves <palves@redhat.com>
3303
3304 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3305 field.
3306 (reset_die_in_process): Delete, replaced by ...
3307 (process_die_scope): ... this new class. Make it responsible for
3308 freeing cu->line_header too.
3309 (process_die): Use process_die_scope.
3310 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3311 cu->line_header_die_owner. Don't release the line header if it's
3312 owned by the CU.
3313 (setup_type_unit_groups): Make the CU/DIE own the line header.
3314 Don't release the line header here.
3315
ba713918
AL
33162017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3317
3318 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3319
44d0fb3a
RK
33202017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3321
3322 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3323 Single-Key mode
3324
a5afdb16
RK
33252017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3326
3327 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3328 mode command list.
3329
47613aeb
SH
33302017-08-15 Stafford Horne <shorne@gmail.com>
3331
3332 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3333
9c3cc999
SH
33342017-08-15 Stafford Horne <shorne@gmail.com>
3335
3336 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3337
206726fb
SDJ
33382017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3339
3340 PR gdb/21954
3341 * infcmd.c (unset_environment_command): Use the 'clear' method on
3342 the environment instead of resetting it.
3343
0335ac6d
JB
33442017-08-15 John Baldwin <jhb@FreeBSD.org>
3345
3346 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3347 platforms.
3348
d3abe1c8
TT
33492017-08-14 Tom Tromey <tom@tromey.com>
3350
3351 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3352 (print_binary_chars): Likewise.
3353 (BITS_IN_BYTES): Remove.
3354
d6382fff
TT
33552017-08-14 Tom Tromey <tom@tromey.com>
3356
3357 PR gdb/21675
3358 * valprint.c (LOW_ZERO): Change value to 034.
3359 (print_octal_chars): Add static_asserts for octal constants.
3360 * printcmd.c (print_scalar_formatted): Add 'd' case.
3361
f978cb06
TT
33622017-08-11 Tom Tromey <tom@tromey.com>
3363
3364 * symfile.c (add_symbol_file_command): Use std::vector.
3365
2f5404b3
TT
33662017-08-14 Tom Tromey <tom@tromey.com>
3367
3368 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3369 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3370 std::move.
3371 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3372
de7985c3
PA
33732017-08-11 Pedro Alves <palves@redhat.com>
3374
3375 * infrun.c (process_event_stop_test): Adjust
3376 function_name_is_marked_for_skip call.
3377 * skip.c: Include <list>.
3378 (skiplist_entry): Make it a class with private fields, and
3379 getters/setters.
3380 (skiplist_entry_chain): Delete.
3381 (skiplist_entries): New.
3382 (skiplist_entry_count): Delete.
3383 (highest_skiplist_entry_num): New.
3384 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3385 (add_skiplist_entry): Delete.
3386 (skiplist_entry::skiplist_entry): New.
3387 (skiplist_entry::add_entry): New.
3388 (skip_file_command, skip_function): Adjust.
3389 (compile_skip_regexp): Delete.
3390 (skip_command): Don't compile regexp here. Adjust to use
3391 skiplist_entry::add_entry.
3392 (skip_info): Adjust to use range-for and getters.
3393 (skip_enable_command, skip_disable_command): Adjust to use
3394 range-for and setters.
3395 (skip_delete_command): Adjust to use std::list.
3396 (add_skiplist_entry): Delete.
3397 (skip_file_p): Delete, refactored as ...
3398 (skiplist_entry::do_skip_file_p): ... this new method.
3399 (skip_gfile_p): Delete, refactored as ...
3400 (skiplist_entry::do_gskip_file_p): ... this new method.
3401 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3402 (skiplist_entry::skip_function_p): ... this new method.
3403 (function_name_is_marked_for_skip): Now returns bool, and takes
3404 the function sal by const reference. Adjust to use range-for and
3405 skiplist_entry methods.
3406 (_initialize_step_skip): Remove references to
3407 skiplist_entry_chain, skiplist_entry_count.
3408 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3409 takes the function sal by const reference.
3410
be7d3cd5
YQ
34112017-08-11 Yao Qi <yao.qi@linaro.org>
3412
3413 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3414 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3415 (dwarf2_frame_cache):
3416 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3417 RETURN_MASK_ALL and set *this_case to NULL.
3418 * frame-unwind.h: Update comments.
3419
1c90d9f0
YQ
34202017-08-11 Yao Qi <yao.qi@linaro.org>
3421
3422 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3423 (dwarf2_frame_state_copy_regs): Remove.
3424 (dwarf2_frame_state_free_regs): Remove.
3425 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3426 (dwarf2_restore_rule): Call method .alloc_regs instead of
3427 dwarf2_frame_state_alloc_regs.
3428 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3429 constructor. Call std::move.
3430 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3431 (dwarf2_frame_cache): Likewise.
3432
3433 [GDB_SELF_TEST]: Include selftest.h and
3434 selftest-arch.h.
3435 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3436 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3437 execute_cfa_program_test.
3438
3439 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3440 copy ctor, assignment operator, move assignment.
3441 <alloc_regs>: New method.
3442 <swap>: New method.
3443 (struct dwarf2_frame_state): Delete dtor.
3444 (dwarf2_frame_state_alloc_regs): Remove declaration.
3445 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3446 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3447
afe37d6b
YQ
34482017-08-11 Yao Qi <yao.qi@linaro.org>
3449
3450 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3451 (dwarf2_frame_state::dwarf2_frame_state): New.
3452 (dwarf2_frame_state::~dwarf2_frame_state): New.
3453 (dwarf2_fetch_cfa_info): Update.
3454 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3455 rather than a pointer. Update code.
3456 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3457 dtor.
3458 <data_align, code_align, retaddr_column>: Change them to const.
3459 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3460 to bool.
3461
b348037f
YQ
34622017-08-11 Yao Qi <yao.qi@linaro.org>
3463
3464 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3465 <loc.exp>: New field.
3466 * dwarf2-frame.c (execute_cfa_program): Update.
3467 (dwarf2_frame_prev_register): Update.
3468
e7c9de26
PA
34692017-08-10 Pedro Alves <palves@redhat.com>
3470
3471 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3472
e8c6b620
JB
34732017-08-09 John Baldwin <jhb@FreeBSD.org>
3474
3475 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3476 (fbsd_pending_children): Use std::list.
3477 (fbsd_remember_child): Likewise.
3478 (fbsd_is_child_pending): Likewise.
3479 (fbsd_pending_vfork_done): Use std::forward_list.
3480 (fbsd_add_vfork_done): Likewise.
3481 (fbsd_is_vfork_done_pending): Likewise.
3482 (fbsd_next_vfork_done): Likewise.
3483
e4a26669
JB
34842017-08-09 John Baldwin <jhb@FreeBSD.org>
3485
3486 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3487 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3488 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3489 for `mapfilename'.
3490 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 3491 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 3492
142311d3
JB
34932017-08-09 John Baldwin <jhb@FreeBSD.org>
3494
3495 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3496 "filestuff.h".
3497 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3498
42fa2e0e
TT
34992017-08-09 Tom Tromey <tom@tromey.com>
3500
3501 * skip.c (skiplist_entry): New constructor.
3502 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3503 (skiplist_entry::file_is_glob): Now bool.
3504 (skiplist_entry::file, skiplist_entry::function): Now
3505 std::string.
3506 (make_skip_entry): Return a unique_ptr. Use new.
3507 (free_skiplist_entry, free_skiplist_entry_cleanup)
3508 (make_free_skiplist_entry_cleanup): Remove.
3509 (skip_command, skip_disable_command, add_skiplist_entry)
3510 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3511 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3512 (function_name_is_marked_for_skip): Update.
3513 (skip_delete_command): Update. Use delete.
3514
cd3af38d
JW
35152017-08-09 Jiong Wang <jiong.wang@arm.com>
3516
3517 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3518 (aarch64_linux_core_read_description): New function.
3519 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3520
29592bde
PA
35212017-08-09 Pedro Alves <palves@redhat.com>
3522
3523 * cp-name-parser.y (cp_comp_to_string): Return a
3524 gdb::unique_xmalloc_ptr<char>.
3525 * cp-support.c (replace_typedefs_qualified_name)
3526 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3527 (cp_canonicalize_string_full): Use op= instead of explicit
3528 convertion.
3529 (cp_class_name_from_physname, method_name_from_physname)
3530 (cp_func_name, cp_remove_params): Adjust to use
3531 gdb::unique_xmalloc_ptr<char>.
3532 * cp-support.h (cp_comp_to_string): Return a
3533 gdb::unique_xmalloc_ptr<char>.
3534 * python/py-type.c (typy_lookup_type): Adjust to use
3535 gdb::unique_xmalloc_ptr<char>.
3536
b3340438
L
35372017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3538
3539 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3540
e88e8651
YQ
35412017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3542 Yao Qi <yao.qi@linaro.org>
3543
3544 * cp-support.c (cp_canonicalize_string_full): Use
3545 gdb::unique_xmalloc_ptr<char>.
3546 (cp_canonicalize_string): Likewise.
3547
f5a29eb0
YQ
35482017-08-09 Yao Qi <yao.qi@linaro.org>
3549
3550 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3551 * regformats/i386/amd64-avx-avx512.dat: Remove.
3552 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3553 * regformats/i386/amd64-avx-mpx.dat:Remove.
3554 * regformats/i386/amd64-avx.dat: Remove.
3555 * regformats/i386/amd64-mpx.dat: Remove.
3556 * regformats/i386/i386-avx-avx512.dat: Remove.
3557 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3558 * regformats/i386/i386-avx-mpx.dat: Remove.
3559 * regformats/i386/i386-mmx.dat: Remove.
3560 * regformats/i386/i386-mpx.dat: Remove.
3561
57757c2f
YQ
35622017-08-09 Yao Qi <yao.qi@linaro.org>
3563
3564 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3565 * amd64-tdep.c: Don't include features/i386/x32*.c.
3566 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3567 functions.
3568 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3569 and i386/x32-avx-avx512.
3570 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3571 and i386/x32.xml.
3572 * features/i386/x32-avx-avx512.c: Removed.
3573 * features/i386/x32-avx-avx512.xml: Removed.
3574 * features/i386/x32-avx.c: Removed.
3575 * features/i386/x32-avx.xml: Removed.
3576 * features/i386/x32.c: Removed.
3577 * features/i386/x32.xml: Removed.
3578 * regformats/i386/x32-avx-avx512.dat: Removed.
3579 * regformats/i386/x32-avx.dat: Removed.
3580 * regformats/i386/x32.dat: Removed.
3581
ba7b109b
MR
35822017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3583
3584 PR breakpoints/21886
3585 * mem-break.c (default_memory_insert_breakpoint): Use
3586 `->placed_address' rather than `->reqstd_address' for the
3587 breakpoint location.
3588
e347efc3
MR
35892017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3590
3591 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3592 assertions.
3593
0dba2a6c
MR
35942017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3595
3596 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3597 a union of `tdep_info', `tdesc_data' and `id'.
3598 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3599 rather than `info.tdep_info'.
3600 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3601 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3602 * i386-tdep.c (i386_gdbarch_init): Likewise.
3603 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3604 * mips-tdep.c (mips_gdbarch_init): Likewise.
3605 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3606 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3607 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3608 `info.tdep_info'.
3609 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3610 `info.tdep_info'.
3611 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3612 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3613 `info.tdep_info'.
3614 * spu-tdep.c (spu_gdbarch_init): Likewise.
3615 * gdbarch.h: Regenerate.
3616
16eb6b2d
LS
36172017-08-07 Leszek Swirski <leszeks@google.com>
3618
7b005726 3619 PR symtab/20899
16eb6b2d
LS
3620 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3621
74cbb09e
SM
36222017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3623
3624 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3625 (gdbsim_open): Rename gdb_argv args object to argv.
3626
ee0c3293
TT
36272017-08-05 Tom Tromey <tom@tromey.com>
3628
3629 * compile/compile-object-load.c (compile_object_load): Use
3630 gdb::unique_xmalloc_ptr.
3631 * cli/cli-dump.c (scan_filename): Rename from
3632 scan_filename_with_cleanup. Change return type.
3633 (scan_expression): Rename from scan_expression_with_cleanup.
3634 Change return type.
3635 (dump_memory_to_file, dump_value_to_file, restore_command):
3636 Use gdb::unique_xmalloc_ptr. Update.
3637 * cli/cli-cmds.c (find_and_open_script): Use
3638 gdb::unique_xmalloc_ptr.
3639 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3640 * symmisc.c (maintenance_print_symbols)
3641 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3642 * symfile.c (symfile_bfd_open, generic_load)
3643 (add_symbol_file_command, remove_symbol_file_command): Use
3644 gdb::unique_xmalloc_ptr.
3645 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3646 * psymtab.c (maintenance_print_psymbols): Use
3647 gdb::unique_xmalloc_ptr.
3648 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3649 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3650 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3651 (reload_shared_libraries_1): Likewise.
3652
3232fabd
TT
36532017-08-05 Tom Tromey <tom@tromey.com>
3654
3655 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3656 (rust_op_vector, rust_set_vector): New typedefs.
3657 (current_parser): New global.
3658 (work_obstack): Change to pointer type. Update all users.
3659 (rust_ast, pstate): Remove globals.
3660 (struct rust_parser): New.
3661 (%union) <params, field_inits>: Change type.
3662 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3663 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3664 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3665 (convert_params_to_types, convert_params_to_expression): Change
3666 type of "params".
3667 (ast_string): Change type of "fields".
3668 (rust_parse): Make a rust_parser. Remove cleanups.
3669 (rust_lex_tests): Make and install an auto_obstack.
3670
f02fd774
YQ
36712017-08-04 Yao Qi <yao.qi@linaro.org>
3672
3673 * configure.srv (ipa_x32_linux_regobj): New.
3674 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3675 instead of X86_TDESC_AVX512.
3676 (initialize_low_tracepoint): Call
3677 init_registers_x32_avx_avx512_linux.
3678
91975afd
YQ
36792017-08-04 Yao Qi <yao.qi@linaro.org>
3680
3681 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3682
2331fa3a
RK
36832017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3684
3685 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3686
744e4fe1
TT
36872017-08-03 Tom Tromey <tom@tromey.com>
3688
3689 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3690 Remove.
3691 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3692
1c034b67
TT
36932017-08-03 Tom Tromey <tom@tromey.com>
3694
3695 * python/py-param.c (compute_enum_values): Use gdb_argv.
3696
773a1edc
TT
36972017-08-03 Tom Tromey <tom@tromey.com>
3698
3699 * utils.h (struct gdb_argv_deleter): New.
3700 (gdb_argv): New class.
3701 * utils.c (gdb_argv::reset): New method.
3702 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3703 * tracefile.c (tsave_command): Use gdb_argv.
3704 * top.c (new_ui_command): Use gdb_argv.
3705 * symmisc.c (maintenance_print_symbols)
3706 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3707 * symfile.c (symbol_file_command, generic_load)
3708 (remove_symbol_file_command): Use gdb_argv.
3709 * stack.c (backtrace_command): Use gdb_argv.
3710 * source.c (add_path, show_substitute_path_command)
3711 (unset_substitute_path_command, set_substitute_path_command):
3712 Use gdb_argv.
3713 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3714 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3715 * remote.c (extended_remote_run, remote_put_command)
3716 (remote_get_command, remote_delete_command): Use gdb_argv.
3717 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3718 (gdbsim_open): Use gdb_argv.
3719 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3720 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3721 * procfs.c (procfs_info_proc): Use gdb_argv.
3722 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3723 * infrun.c (handle_command): Use gdb_argv.
3724 * inferior.c (add_inferior_command, clone_inferior_command):
3725 Use gdb_argv.
3726 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3727 * exec.c (exec_file_command): Use gdb_argv.
3728 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3729 * compile/compile.c (build_argc_argv): Use gdb_argv.
3730
0d50bde3
TT
37312017-08-03 Tom Tromey <tom@tromey.com>
3732
3733 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3734
7f968c89
TT
37352017-08-03 Tom Tromey <tom@tromey.com>
3736
3737 * python/python.c (compute_python_string): Return std::string.
3738 (gdbpy_eval_from_control_command): Update.
3739 (do_start_initialization): Use std::string.
3740 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3741 xstrprintf.
3742 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3743 xstrprintf.
3744
3c9ebddd
TT
37452017-08-03 Tom Tromey <tom@tromey.com>
3746
3747 * top.h (do_restore_instream_cleanup): Remove.
3748 * top.c (do_restore_instream_cleanup): Remove.
3749 (read_command_file): Use scoped_restore.
3750 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3751
b51b225e
TT
37522017-08-03 Tom Tromey <tom@tromey.com>
3753
3754 * cli/cli-script.c (execute_user_command)
3755 (execute_control_command): Use scoped_restore.
3756
ac991630
TT
37572017-08-03 Tom Tromey <tom@tromey.com>
3758
3759 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3760 (execute_user_command): Remove user_call_depth; use
3761 user_args_stack's size instead.
3762
898e0c8e
TT
37632017-08-03 Tom Tromey <tom@tromey.com>
3764
3765 * top.h (in_user_command): Remove.
3766 * top.c (in_user_command): Remove.
3767 * cli/cli-script.c (do_restore_user_call_depth)
3768 (execute_user_command): Update.
3769
26fcd5d7
TT
37702017-08-03 Tom Tromey <tom@tromey.com>
3771
3772 * valops.c (search_struct_method): Use gdb::byte_vector.
3773 * valarith.c (value_concat): Use std::vector.
3774 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3775 (simple_search_memory): Likewise.
3776 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3777 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3778 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3779 * elfread.c (elf_rel_plt_read): Use std::string.
3780 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3781 * cli/cli-dump.c (restore_section_callback): Use
3782 gdb::byte_vector.
3783
7c218e6c
TT
37842017-08-03 Tom Tromey <tom@tromey.com>
3785
3786 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3787
31b68d4a
TT
37882017-08-03 Tom Tromey <tom@tromey.com>
3789
3790 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3791 (tui_register_format): Use scoped_restore.
3792
2ec845e7
TT
37932017-08-03 Tom Tromey <tom@tromey.com>
3794
3795 * reverse.c (exec_direction_default): Remove.
3796 (exec_reverse_once): Use scoped_restore.
3797 * remote.c (restore_remote_timeout): Remove.
3798 (remote_flash_erase, remote_flash_write, remote_flash_done)
3799 (readchar, remote_serial_write): Use scoped_restore.
3800 * cli/cli-script.c (struct source_cleanup_lines_args)
3801 (source_cleanup_lines): Remove.
3802 (script_from_file): Use scoped_restore.
3803 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3804 (source_command): Use scoped_restore.
3805
b3bc8453
TT
38062017-08-03 Tom Tromey <tom@tromey.com>
3807
3808 * utils.h (make_cleanup_free_so): Remove.
3809 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3810 * solist.h (struct so_deleter): New.
3811 (so_list_up): New typedef.
3812 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3813
e3ad2841
TT
38142017-08-03 Tom Tromey <tom@tromey.com>
3815
3816 * utils.h (make_cleanup_restore_current_language): Remove.
3817 * utils.c (do_restore_current_language)
3818 (make_cleanup_restore_current_language): Remove.
3819 * parse.c (parse_exp_in_context_1)
3820 (parse_expression_with_language): Use
3821 scoped_restore_current_language.
3822 * mi/mi-main.c (mi_cmd_execute): Use
3823 scoped_restore_current_language.
3824 * language.h (scoped_restore_current_language): New class.
3825
b80cf838
TT
38262017-08-03 Tom Tromey <tom@tromey.com>
3827
3828 * compile/compile.c (cleanup_unlink_file): Remove.
3829 (compile_to_object): Use gdb::unlinker.
3830 (eval_compile_command): Likewise.
3831
fad0444a
TT
38322017-08-03 Tom Tromey <tom@tromey.com>
3833
3834 * utils.h (make_cleanup_fclose): Remove.
3835 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3836
6e7bc05c
TT
38372017-08-03 Tom Tromey <tom@tromey.com>
3838
3839 * top.c (open_terminal_stream): Return gdb_file_up.
3840 (new_ui_command): Update.
3841
4a45905b
TT
38422017-08-03 Tom Tromey <tom@tromey.com>
3843
3844 * source.c (print_source_lines_base, forward_search_command)
3845 (reverse_search_command): Use gdb_file_up.
3846
7cd06d6e
TT
38472017-08-03 Tom Tromey <tom@tromey.com>
3848
3849 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3850
ed166945
TT
38512017-08-03 Tom Tromey <tom@tromey.com>
3852
3853 * cli/cli-cmds.c (find_and_open_script): Change return type.
3854 Remove "streamp" and "full_path" parameters.
3855 (source_script_with_search): Update.
3856 * auto-load.c (source_script_file): Update.
3857 * cli/cli-cmds.h (find_and_open_script): Change type.
3858 (open_script): New struct.
3859
d419f42d
TT
38602017-08-03 Tom Tromey <tom@tromey.com>
3861
3862 * xml-support.c (xml_fetch_content_from_file): Update.
3863 * ui-file.c (stdio_file::open): Update.
3864 * tracefile-tfile.c (tfile_start): Update.
3865 * remote.c (remote_file_put, remote_file_get): Update.
3866 * nat/linux-procfs.c (linux_proc_get_int)
3867 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3868 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3869 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3870 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3871 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3872 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3873 * linux-nat.c (linux_proc_pending_signals): Update.
3874 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3875 (file_closer): Remove.
3876 * compile/compile.c (compile_to_object): Update.
3877 * common/filestuff.h (struct gdb_file_deleter): New.
3878 (gdb_file_up): New typedef.
3879 (gdb_fopen_cloexec): Change return type.
3880 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3881 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3882 (dump_binary_file, restore_binary_file): Update.
3883 * auto-load.c (auto_load_objfile_script_1): Update.
3884
4a2b031d
TT
38852017-08-03 Tom Tromey <tom@tromey.com>
3886
3887 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3888 (info_static_tracepoint_markers_command): Likewise.
3889 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3890 * skip.c (skip_info): Use ui_out_emit_table.
3891 * progspace.c (print_program_space): Use ui_out_emit_table.
3892 * osdata.c (info_osdata): Use ui_out_emit_table.
3893 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3894 ui_out_emit_table.
3895 * linux-thread-db.c (info_auto_load_libthread_db): Use
3896 ui_out_emit_table.
3897 * inferior.c (print_inferior): Use ui_out_emit_table.
3898 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3899 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3900 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3901 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3902 * ui-out.h (class ui_out_emit_table): New.
3903
a4f320fd
MR
39042017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3905
3906 * mips-tdep.c (mips_fpu_type_str): New function.
3907 (mips_dump_tdep): Call it.
3908
a2f1f308
MR
39092017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3910
3911 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3912 `->mips_fpu_type'.
3913
7e5ed83b
XR
39142017-07-31 Xavier Roirand <roirand@adacore.com>
3915
3916 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3917
4c9dc811
XR
39182017-07-27 Xavier Roirand <roirand@adacore.com>
3919
3920 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3921
27d41eac
YQ
39222017-07-26 Yao Qi <yao.qi@linaro.org>
3923
3924 * cli/cli-cmds.c (maintenancechecklist): New variable.
3925 * gdbcmd.h (maintenancechecklist): Declare it.
3926 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3927 Call i386_linux_read_description with different masks.
3928 * maint.c (maintenance_check_command): New function.
3929 (_initialize_maint_cmds): Call add_prefix_cmd.
3930 * target-descriptions.c (tdesc_reg): override operator != and ==.
3931 (tdesc_type): Likewise.
3932 (tdesc_feature): Likewise.
3933 (target_desc): Likewise.
3934 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3935 (maintenance_check_xml_descriptions): New function.
3936 (_initialize_target_descriptions) Add command "xml-descriptions".
3937 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3938
ea03d0d3
YQ
39392017-07-26 Yao Qi <yao.qi@linaro.org>
3940
3941 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3942 Include features/i386/32bit-*.c.
3943 (i386_linux_read_description): Generate target description if it
3944 doesn't exist.
3945 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3946 functions.
3947 * features/i386/32bit-linux.c: Re-generated.
3948 * features/i386/32bit-sse.c: Likewise.
3949 * target-descriptions.c (print_c_feature::visit): Print code to
3950 set register number if needed.
3951 (print_c_feature) <m_next_regnum>: New field.
3952
25aa13e5
YQ
39532017-07-26 Yao Qi <yao.qi@linaro.org>
3954
3955 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3956 (FEATURE_XMLFILES): New.
3957 (FEATURE_CFILES): New.
3958 New rules.
3959 (clean-cfiles): Remove generated c files.
3960 * features/i386/32bit-avx.c: Generated.
3961 * features/i386/32bit-avx512.c: Generated.
3962 * features/i386/32bit-core.c: Generated.
3963 * features/i386/32bit-linux.c: Generated.
3964 * features/i386/32bit-mpx.c: Generated.
3965 * features/i386/32bit-pkeys.c: Generated.
3966 * features/i386/32bit-sse.c: Generated.
3967 * target-descriptions.c: Include algorithm.
3968 (tdesc_element_visitor): Add method visit_end.
3969 (print_c_tdesc): Implement visit_end.
3970 (print_c_tdesc:: m_filename_after_features): Move it to
3971 protected.
3972 (print_c_feature): New class.
3973 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3974 name starts with "i386/32bit-".
3975
6eb1e6a8
YQ
39762017-07-26 Yao Qi <yao.qi@linaro.org>
3977
3978 * target-descriptions.c (tdesc_element_visitor): New class.
3979 (tdesc_element): New class.
3980 (tdesc_reg): Inherit from tdesc_element.
3981 (tdesc_reg::accept): New function.
3982 (tdesc_type): Inherit from tdesc_element.
3983 (tdesc_type::accept): New function.
3984 (tdesc_feature): Inherit from tdesc_element.
3985 (tdesc_feature::accept): New function.
3986 (target_desc): Inherit from tdesc_element.
3987 (target_desc::target_desc): New.
3988 (target_desc::~target_desc): New.
3989 (target_desc::accept): New.
3990 (allocate_target_description): Use new.
3991 (free_target_description): Use delete.
3992 (print_c_tdesc): New class.
3993 (maint_print_c_tdesc_cmd): Adjust.
3994
3995 * features/aarch64.c: Re-generated.
3996 * features/arc-arcompact.c: Re-generated.
3997 * features/arc-v2.c: Re-generated.
3998 * features/arm/arm-with-iwmmxt.c: Re-generated.
3999 * features/arm/arm-with-m.c: Re-generated.
4000 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4001 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4002 * features/arm/arm-with-neon.c: Re-generated.
4003 * features/arm/arm-with-vfpv2.c: Re-generated.
4004 * features/arm/arm-with-vfpv3.c: Re-generated.
4005 * features/i386/amd64-avx-avx512.c: Re-generated.
4006 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4007 * features/i386/amd64-avx.c: Re-generated.
4008 * features/i386/amd64-avx-linux.c: Re-generated.
4009 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4010 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4011 * features/i386/amd64-avx-mpx.c: Re-generated.
4012 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4013 * features/i386/amd64.c: Re-generated.
4014 * features/i386/amd64-linux.c: Re-generated.
4015 * features/i386/amd64-mpx.c: Re-generated.
4016 * features/i386/amd64-mpx-linux.c: Re-generated.
4017 * features/i386/i386-avx-avx512.c: Re-generated.
4018 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4019 * features/i386/i386-avx.c: Re-generated.
4020 * features/i386/i386-avx-linux.c: Re-generated.
4021 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4022 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4023 * features/i386/i386-avx-mpx.c: Re-generated.
4024 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4025 * features/i386/i386.c: Re-generated.
4026 * features/i386/i386-linux.c: Re-generated.
4027 * features/i386/i386-mmx.c: Re-generated.
4028 * features/i386/i386-mmx-linux.c: Re-generated.
4029 * features/i386/i386-mpx.c: Re-generated.
4030 * features/i386/i386-mpx-linux.c: Re-generated.
4031 * features/i386/x32-avx-avx512.c: Re-generated.
4032 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4033 * features/i386/x32-avx.c: Re-generated.
4034 * features/i386/x32-avx-linux.c: Re-generated.
4035 * features/i386/x32.c: Re-generated.
4036 * features/i386/x32-linux.c: Re-generated.
4037 * features/microblaze.c: Re-generated.
4038 * features/microblaze-with-stack-protect.c: Re-generated.
4039 * features/mips64-dsp-linux.c: Re-generated.
4040 * features/mips64-linux.c: Re-generated.
4041 * features/mips-dsp-linux.c: Re-generated.
4042 * features/mips-linux.c: Re-generated.
4043 * features/nds32.c: Re-generated.
4044 * features/nios2.c: Re-generated.
4045 * features/nios2-linux.c: Re-generated.
4046 * features/rs6000/powerpc-32.c: Re-generated.
4047 * features/rs6000/powerpc-32l.c: Re-generated.
4048 * features/rs6000/powerpc-403.c: Re-generated.
4049 * features/rs6000/powerpc-403gc.c : Re-generated.
4050 * features/rs6000/powerpc-405.c: Re-generated.
4051 * features/rs6000/powerpc-505.c: Re-generated.
4052 * features/rs6000/powerpc-601.c: Re-generated.
4053 * features/rs6000/powerpc-602.c: Re-generated.
4054 * features/rs6000/powerpc-603.c: Re-generated.
4055 * features/rs6000/powerpc-604.c: Re-generated.
4056 * features/rs6000/powerpc-64.c: Re-generated.
4057 * features/rs6000/powerpc-64l.c: Re-generated.
4058 * features/rs6000/powerpc-7400.c: Re-generated.
4059 * features/rs6000/powerpc-750.c: Re-generated.
4060 * features/rs6000/powerpc-860.c: Re-generated.
4061 * features/rs6000/powerpc-altivec32.c: Re-generated.
4062 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4063 * features/rs6000/powerpc-altivec64.c: Re-generated.
4064 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4065 * features/rs6000/powerpc-cell32l.c: Re-generated.
4066 * features/rs6000/powerpc-cell64l.c: Re-generated.
4067 * features/rs6000/powerpc-e500.c: Re-generated.
4068 * features/rs6000/powerpc-e500l.c: Re-generated.
4069 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4070 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4071 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4072 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4073 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4074 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4075 * features/rs6000/powerpc-vsx32.c: Re-generated.
4076 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4077 * features/rs6000/powerpc-vsx64.c: Re-generated.
4078 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4079 * features/rs6000/rs6000.c: Re-generated.
4080 * features/s390-linux32.c: Re-generated.
4081 * features/s390-linux32v1.c: Re-generated.
4082 * features/s390-linux32v2.c: Re-generated.
4083 * features/s390-linux64.c: Re-generated.
4084 * features/s390-linux64v1.c: Re-generated.
4085 * features/s390-linux64v2.c: Re-generated.
4086 * features/s390-te-linux64.c: Re-generated.
4087 * features/s390-tevx-linux64.c: Re-generated.
4088 * features/s390-vx-linux64.c: Re-generated.
4089 * features/s390x-linux64.c: Re-generated.
4090 * features/s390x-linux64v1.c: Re-generated.
4091 * features/s390x-linux64v2.c: Re-generated.
4092 * features/s390x-te-linux64.c: Re-generated.
4093 * features/s390x-tevx-linux64.c: Re-generated.
4094 * features/s390x-vx-linux64.c: Re-generated.
4095 * features/sparc/sparc32-solaris.c: Re-generated.
4096 * features/sparc/sparc64-solaris.c: Re-generated.
4097 * features/tic6x-c62x.c: Re-generated.
4098 * features/tic6x-c62x-linux.c: Re-generated.
4099 * features/tic6x-c64x.c: Re-generated.
4100 * features/tic6x-c64x-linux.c: Re-generated.
4101 * features/tic6x-c64xp.c: Re-generated.
4102 * features/tic6x-c64xp-linux.c: Re-generated.
4103
35b4818d
YQ
41042017-07-26 Yao Qi <yao.qi@linaro.org>
4105
4106 * i386-linux-tdep.c (i386_linux_read_description): New function.
4107 (i386_linux_core_read_description): Call
4108 i386_linux_read_description.
4109 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4110 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4111 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4112 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4113 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4114 * x86-linux-nat.c (x86_linux_read_description): Call
4115 i386_linux_read_description.
4116
8e2141c6
YQ
41172017-07-26 Yao Qi <yao.qi@linaro.org>
4118
4119 * NEWS: Mention it.
4120 * features/Makefile (%.c: %.xml): Pass the xml file name to
4121 command "maint print c-tdesc".
4122 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4123 name from 'arg'.
4124
b468ff4c
YQ
41252017-07-26 Yao Qi <yao.qi@linaro.org>
4126
4127 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4128 in-class initialization.
4129 (tdesc_create_feature): Call new instead of XCNEW.
4130 (free_target_description): Ue delete.
4131
b9c0e1b4
JB
41322017-07-25 John Baldwin <jhb@FreeBSD.org>
4133
4134 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4135
a04b5337
YQ
41362017-07-25 Yao Qi <yao.qi@linaro.org>
4137
4138 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4139 constant.
4140 (amd64_x32_init_abi): Likewise.
4141 * amd64-tdep.h (amd64_init_abi): Update declaration.
4142 (amd64_x32_init_abi): Likewise.
4143
02ad7fc2
YQ
41442017-07-25 Yao Qi <yao.qi@linaro.org>
4145
4146 PR tdep/21717
4147 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4148 condition for FPSCR.
4149 (arm_linux_store_inferior_registers): Likewise.
4150
b6f48cb0
TT
41512017-07-22 Tom Tromey <tom@tromey.com>
4152
4153 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4154 <syscalls_counts>: Now a std::vector.
4155 (get_catch_syscall_inferior_data): Use "new".
4156 (catch_syscall_inferior_data_cleanup): Use "delete".
4157 (insert_catch_syscall, remove_catch_syscall)
4158 (clear_syscall_counts): Update.
4159
e12c9b7a
TT
41602017-07-22 Tom Tromey <tom@tromey.com>
4161
4162 * break-catch-syscall.c (syscall_catchpoint)
4163 <syscalls_to_be_caught>: Now a std::vector<int>
4164 (~syscall_catchpoint): Remove.
4165 (insert_catch_syscall, remove_catch_syscall)
4166 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4167 (print_mention_catch_syscall, print_recreate_catch_syscall):
4168 Update.
4169 (create_syscall_event_catchpoint): Change type of "filter"
4170 parameter.
4171 (catch_syscall_split_args): Return a std::vector.
4172 (catch_syscall_command_1, catching_syscall_number_1): Update.
4173
4fa8aeac
TT
41742017-07-22 Tom Tromey <tom@tromey.com>
4175
4176 * break-catch-throw.c (struct exception_catchpoint)
4177 <exception_rx>: Now a std::string.
4178 (~exception_catchpoint): Remove.
4179 (print_one_detail_exception_catchpoint): Update.
4180 (handle_gnu_v3_exceptions): Change type of except_rx.
4181 (extract_exception_regexp): Return a std::string.
4182 (catch_exception_command_1): Update.
4183
f746a154
TT
41842017-07-22 Tom Tromey <tom@tromey.com>
4185
4186 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4187 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4188 std::vector.
4189 <catch_all>: Now a bool.
4190 (~signal_catchpoint): Remove.
4191 (signal_catchpoint_insert_location)
4192 (signal_catchpoint_remove_location)
4193 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4194 (signal_catchpoint_print_mention)
4195 (signal_catchpoint_print_recreate)
4196 (signal_catchpoint_explains_signal): Update.
4197 (create_signal_catchpoint): Change type of "filter" and
4198 "catch_all".
4199 (catch_signal_split_args): Return a std::vector. Change type of
4200 "catch_all".
4201 (catch_signal_command): Update.
4202
47e77640
PA
42032017-07-20 Pedro Alves <palves@redhat.com>
4204
4205 * ada-lang.c (ada_language_defn): Make extern.
4206 (_initialize_ada_language): Remove add_language call.
4207 * c-lang.c (c_language_defn, cplus_language_defn)
4208 (asm_language_defn, minimal_language_defn): Make extern.
4209 (_initialize_c_language): Delete.
4210 * completer.c (compare_cstrings): Delete, moved to utils.h.
4211 * d-lang.c (d_language_defn): Make extern.
4212 (_initialize_d_language): Remove add_language calls.
4213 * defs.h (enum language): Add comment.
4214 * f-lang.c (f_language_defn): Make extern.
4215 (_initialize_f_language): Remove add_language call.
4216 * go-lang.c (go_language_defn): Make extern.
4217 (_initialize_go_language): Remove add_language call.
4218 * language.c: Include <algorithm>.
4219 (languages): Redefine as const array.
4220 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4221 (set_language_command): Handle "local". Use for-range loop.
4222 (set_language): Remove loop.
4223 (language_enum): Rewrite.
4224 (language_def, language_str): Remove loops.
4225 (add_language): Delete.
4226 (add_set_language_command): New, based on add_languages.
4227 (skip_language_trampoline): Adjust.
4228 (local_language_defn): Delete.
4229 (language_gdbarch_post_init): Adjust.
4230 (_initialize_language): Remove add_language calls. Call
4231 add_set_language_command.
4232 * language.h (add_language): Delete.
4233 (auto_language_defn)
4234 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4235 (asm_language_defn, c_language_defn, cplus_language_defn)
4236 (d_language_defn, f_language_defn, go_language_defn)
4237 (m2_language_defn, objc_language_defn, opencl_language_defn)
4238 (pascal_language_defn, rust_language_defn): Declare.
4239 * m2-lang.c (m2_language_defn): Make extern.
4240 (_initialize_m2_language): Remove add_language call.
4241 * objc-lang.c (objc_language_defn): Make extern.
4242 (_initialize_objc_language): Remove add_language call.
4243 * opencl-lang.c (opencl_language_defn): Make extern.
4244 (_initialize_opencl_language): Remove add_language call.
4245 * p-lang.c (pascal_language_defn): Make extern.
4246 (_initialize_pascal_language): Delete.
4247 * rust-lang.c (rust_language_defn): Make extern.
4248 (_initialize_rust_language): Delete.
4249 * utils.h (compare_cstrings): New static inline function.
4250
edb0c9cb
PA
42512017-07-20 Pedro Alves <palves@redhat.com>
4252
4253 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4254 (get_var_value): Constify parameters.
4255 (get_int_var_value): Change prototype.
4256 (to_fixed_range_type): Adjust.
4257 * ada-lang.h (get_int_var_value): Change prototype.
4258
a778f165
PA
42592017-07-20 Pedro Alves <palves@redhat.com>
4260
4261 * dwarf2read.c (dw2_lookup_symbol): Use
4262 SYMBOL_MATCHES_SEARCH_NAME.
4263 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4264
42edd901
PA
42652017-07-20 Pedro Alves <palves@redhat.com>
4266
4267 * block.c (block_iter_name_step, block_iter_name_first)
4268 (block_iter_name_next): Delete.
4269 (block_lookup_symbol_primary): Adjust to use
4270 dict_iter_match_first/dict_iter_match_next.
4271 * block.h (block_iter_name_first, block_iter_name_next): Delete
4272 declarations.
4273 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4274 dict_iter_match_first/dict_iter_match_next.
4275
cf325299
PA
42762017-07-20 Pedro Alves <palves@redhat.com>
4277
4278 * cp-support.c (cp_find_first_component_aux): Add missing case for
4279 end of string.
4280
c5ed0576
DB
42812017-07-18 David Blaikie <dblaikie@gmail.com>
4282
4283 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4284 of dwo_cu's dwo_file.
4285
27841e76
YQ
42862017-07-18 Yao Qi <yao.qi@linaro.org>
4287
4288 * remote.c (store_registers_using_G): Remove one line comment.
4289
cfb7e58b
YQ
42902017-07-18 Yao Qi <yao.qi@linaro.org>
4291
4292 * regcache.c (regcache_cpy): Simplify it.
4293 (regcache::cpy_no_passthrough): Remove it.
4294 * regcache.h (cpy_no_passthrough): Remove it.
4295 (regcache_dup, regcache_cpy): Update comments.
4296
386535dd
PA
42972017-07-18 Pedro Alves <palves@redhat.com>
4298
4299 * remote-sim.c (sim_command_completer): Adjust to work with a
4300 completion_tracker instead of a VEC.
4301
c45ec17c
PA
43022017-07-17 Pedro Alves <palves@redhat.com>
4303
4304 * completer.c (complete_source_filenames): New function.
4305 (complete_address_and_linespec_locations): New function.
4306 (location_completer): Use complete_address_and_linespec_locations.
4307 (completion_tracker::build_completion_result): Honor the tracker's
4308 request to suppress append.
4309 * completer.h (completion_tracker::suppress_append_ws)
4310 (completion_tracker::set_suppress_append_ws): New methods.
4311 (completion_tracker::m_suppress_append_ws): New field.
4312 (complete_source_filenames): New declaration.
4313 * linespec.c (linespec_complete_what): New.
4314 (struct ls_parser) <complete_what, completion_word,
4315 completion_quote_char, completion_quote_end, completion_tracker>:
4316 New fields.
4317 (string_find_incomplete_keyword_at_end): New.
4318 (linespec_lexer_lex_string): Record quote char. If in completion
4319 mode, don't throw.
4320 (linespec_lexer_consume_token): Advance the completion word point.
4321 (linespec_lexer_peek_token): Save/restore completion info.
4322 (save_stream_and_consume_token): New.
4323 (set_completion_after_number): New.
4324 (linespec_parse_basic): Set what to complete next depending on
4325 token. Handle function and label completions specially.
4326 (parse_linespec): Disable objc shortcut in completion mode. Set
4327 what to complete next depending on token type. Skip keyword if in
4328 completion mode.
4329 (complete_linespec_component, linespec_complete): New.
4330 * linespec.h (linespec_complete): Declare.
4331
be966d42
PA
43322017-07-17 Pedro Alves <palves@redhat.com>
4333
4334 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4335 Handle 'operator<' / 'operator<<'.
4336
a2459270
PA
43372017-07-17 Pedro Alves <palves@redhat.com>
4338
4339 * completer.c (collect_explicit_location_matches): Handle
4340 MATCH_LABEL.
4341 (convert_explicit_location_to_linespec): New, factored out from
4342 ...
4343 (convert_explicit_location_to_sals): ... this.
4344 (complete_label): New.
4345 (linespec_complete_label, find_label_symbols_in_block): New.
4346 (find_label_symbols): Add completion_mode parameter and adjust to
4347 call find_label_symbols_in_block.
4348 * linespec.h (linespec_complete_label): Declare.
4349
c6756f62
PA
43502017-07-17 Pedro Alves <palves@redhat.com>
4351
4352 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4353 complete_symbol_mode parameter.
4354 * cli/cli-cmds.c (complete_command): Get the completion result out
4355 of the handle_brkchars tracker if used a custom word point.
4356 * completer.c: Include "linespec.h".
4357 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4358 (advance_to_expression_complete_word_point): New.
4359 (completion_tracker::completes_to_completion_word): New.
4360 (complete_files_symbols): Pass down
4361 complete_symbol_mode::EXPRESSION.
4362 (explicit_options, probe_options): New.
4363 (collect_explicit_location_matches): Complete on the
4364 explictit_loc->foo instead of word. Use
4365 linespec_complete_function. Handle MATCH_LINE. Handle offering
4366 keyword and options completions.
4367 (backup_text_ptr): Delete.
4368 (skip_keyword): New.
4369 (complete_explicit_location): Remove 'word' parameter. Add
4370 language, quoted_arg_start and quoted_arg_end parameters.
4371 Rewrite, parsing left to right.
4372 (location_completer): Rewrite.
4373 (location_completer_handle_brkchars): New function.
4374 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4375 (enum complete_line_internal_reason): Adjust comments.
4376 (completion_tracker::discard_completions): New.
4377 (completer_handle_brkchars_func_for_completer): Handle
4378 location_completer.
4379 (gdb_custom_word_point_brkchars)
4380 (gdb_org_rl_basic_quote_characters): New.
4381 (gdb_completion_word_break_characters_throw)
4382 (completion_find_completion_word): Handle trackers that use a
4383 custom word point.
4384 (completion_tracker::advance_custom_word_point_by): New.
4385 (completion_tracker::build_completion_result): Don't rely on
4386 readline appending the quote char.
4387 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4388 use a custom word point.
4389 (gdb_rl_attempted_completion_function): Restore
4390 rl_basic_quote_characters.
4391 * completer.h (class completion_tracker): Extend intro comment.
4392 (completion_tracker::set_quote_char)
4393 (completion_tracker::quote_char)
4394 (completion_tracker::set_use_custom_word_point)
4395 (completion_tracker::use_custom_word_point)
4396 (completion_tracker::custom_word_point)
4397 (completion_tracker::set_custom_word_point)
4398 (completion_tracker::advance_custom_word_point_by)
4399 (completion_tracker::completes_to_completion_word)
4400 (completion_tracker::discard_completions): New methods.
4401 (completion_tracker::m_quote_char)
4402 (completion_tracker::m_use_custom_word_point)
4403 (completion_tracker::m_custom_word_point): New fields.
4404 (advance_to_expression_complete_word_point): Declare.
4405 * f-lang.c (f_collect_symbol_completion_matches): Add
4406 complete_symbol_mode parameter.
4407 * language.h (struct language_defn)
4408 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4409 parameter.
4410 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4411 (linespec_complete_function): New function.
4412 (linespec_lexer_lex_keyword): Adjust.
4413 * linespec.h (linespec_keywords, linespec_complete_function): New
4414 declarations.
4415 * location.c (find_end_quote): New function.
4416 (explicit_location_lex_one): Add explicit_completion_info
4417 parameter. Save quoting info. Don't throw if being called for
4418 completion. Don't handle Ada operators here.
4419 (is_cp_operator, skip_op_false_positives, first_of)
4420 (explicit_location_lex_one_function): New function.
4421 (string_to_explicit_location): Replace 'dont_throw' parameter with
4422 an explicit_completion_info pointer parameter. Handle it. Don't
4423 use explicit_location_lex_one to lex function names. Use
4424 explicit_location_lex_one_function instead.
4425 * location.h (struct explicit_completion_info): New.
4426 (string_to_explicit_location): Replace 'dont_throw' parameter with
4427 an explicit_completion_info pointer parameter.
4428 * symtab.c (default_collect_symbol_completion_matches_break_on):
4429 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4430 (default_collect_symbol_completion_matches)
4431 (collect_symbol_completion_matches): Add complete_symbol_mode
4432 parameter.
4433 (collect_symbol_completion_matches_type): Pass down
4434 complete_symbol_mode::EXPRESSION.
4435 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4436 parameter. Handle LINESPEC mode.
4437 * symtab.h (complete_symbol_mode): New.
4438 (default_collect_symbol_completion_matches_break_on)
4439 (default_collect_symbol_completion_matches)
4440 (collect_symbol_completion_matches)
4441 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4442 parameter.
4443
1d550c82
PA
44442017-07-17 Pedro Alves <palves@redhat.com>
4445
4446 * utils.c (enum class strncmp_iw_mode): New.
4447 (strcmp_iw): Rename to ...
4448 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4449 parameters. Handle them.
4450 (strncmp_iw): New.
4451 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4452 * utils.h (strncmp_iw): Declare.
4453 (strcmp_iw): Move describing comments here.
4454
8090b426
PA
44552017-07-17 Pedro Alves <palves@redhat.com>
4456
4457 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4458 CP_OPERATOR_STR.
4459 * c-typeprint.c (is_type_conversion_operator): Use
4460 CP_OPERATOR_STR.
4461 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4462 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4463 CP_OPERATOR_LEN.
4464 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4465 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4466 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4467 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4468 CP_OPERATOR_STR.
4469 * location.c: Include "cp-support.h".
4470 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4471 CP_OPERATOR_STR.
4472 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4473 CP_OPERATOR_LEN.
4474
6a2c1b87
PA
44752017-07-17 Pedro Alves <palves@redhat.com>
4476
4477 * cli/cli-cmds.c (complete_command): Use a completion tracker
4478 along with completion_find_completion_word for handle_brkchars
4479 phase.
4480 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4481 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4482 (struct gdb_rl_completion_word_info): New.
4483 (gdb_rl_find_completion_word): New.
4484 (completion_find_completion_word): New.
4485 * completer.h (completion_find_completion_word): Declare.
4486
eb3ff9a5
PA
44872017-07-17 Pedro Alves <palves@redhat.com>
4488
4489 * ada-lang.c (symbol_completion_match): Adjust comments.
4490 (symbol_completion_add): Replace vector parameter with
4491 completion_tracker parameter. Use it.
4492 (ada_make_symbol_completion_list): Rename to...
4493 (ada_collect_symbol_completion_matches): ... this. Add
4494 completion_tracker parameter and use it.
4495 (ada_language_defn): Adjust.
4496 * break-catch-syscall.c (catch_syscall_completer): Adjust
4497 prototype and work with completion_tracker instead of VEC.
4498 * breakpoint.c (condition_completer): Adjust prototype and work
4499 with completion_tracker instead of VEC.
4500 * c-lang.c (c_language_defn, cplus_language_defn)
4501 (asm_language_defn, minimal_language_defn): Adjust to renames.
4502 * cli/cli-cmds.c (complete_command): Rework using
4503 completion_tracker. Catch exceptions when completing.
4504 * cli/cli-decode.c (integer_unlimited_completer)
4505 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4506 with completion_tracker instead of VEC.
4507 * command.h (struct completion_tracker): Forward declare.
4508 (completer_ftype, completer_handle_brkchars_ftype): Change
4509 types.
4510 (complete_on_cmdlist, complete_on_enum): Adjust.
4511 * completer.c: Include <algorithm>.
4512 (struct gdb_completer_state): New.
4513 (current_completion): New global.
4514 (readline_line_completion_function): Delete.
4515 (noop_completer, filename_completer)
4516 (filename_completer_handle_brkchars, complete_files_symbols)
4517 (linespec_location_completer): Adjust to work with a
4518 completion_tracker instead of a VEC.
4519 (string_or_empty): New.
4520 (collect_explicit_location_matches): Adjust to work with a
4521 completion_tracker instead of a VEC.
4522 (explicit_location_completer): Rename to ...
4523 (complete_explicit_location): ... this and adjust to work with a
4524 completion_tracker instead of a VEC.
4525 (location_completer): Adjust to work with a completion_tracker
4526 instead of a VEC.
4527 (add_struct_fields): Adjust to work with a completion_list instead
4528 of VEC.
4529 (expression_completer): Rename to ...
4530 (complete_expression): ... this and adjust to work with a
4531 completion_tracker instead of a VEC. Use complete_files_symbols.
4532 (expression_completer): Reimplement on top of complete_expression.
4533 (symbol_completer): Adjust to work with a completion_tracker
4534 instead of a VEC.
4535 (enum complete_line_internal_reason): Add describing comments.
4536 (complete_line_internal_normal_command): Adjust to work with a
4537 completion_tracker instead of a VEC.
4538 (complete_line_internal): Rename to ...
4539 (complete_line_internal_1): ... this and adjust to work with a
4540 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4541 handle_brkchars phase.
4542 (new_completion_tracker): Delete.
4543 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4544 complete_line_internal_1.
4545 (free_completion_tracker): Delete.
4546 (INITIAL_COMPLETION_HTAB_SIZE): New.
4547 (completion_tracker::completion_tracker)
4548 (completion_tracker::~completion_tracker): New.
4549 (maybe_add_completion): Delete.
4550 (completion_tracker::maybe_add_completion)
4551 (completion_tracker::add_completion)
4552 (completion_tracker::add_completions): New.
4553 (throw_max_completions_reached_error): Delete.
4554 (complete_line): Adjust to work with a completion_tracker instead
4555 of a VEC. Don't create a completion_tracker_t or check for max
4556 completions here.
4557 (command_completer, command_completer_handle_brkchars)
4558 (signal_completer, reg_or_group_completer_1)
4559 (reg_or_group_completer, default_completer_handle_brkchars):
4560 Adjust to work with a completion_tracker.
4561 (gdb_completion_word_break_characters_throw): New.
4562 (gdb_completion_word_break_characters): Reimplement.
4563 (line_completion_function): Delete.
4564 (completion_tracker::recompute_lowest_common_denominator)
4565 (expand_preserving_ws)
4566 (completion_tracker::build_completion_result)
4567 (completion_result::completion_result)
4568 (completion_result::completion_result)
4569 (completion_result::~completion_result)
4570 (completion_result::completion_result)
4571 (completion_result::release_match_list, compare_cstrings)
4572 (completion_result::sort_match_list)
4573 (completion_result::reset_match_list)
4574 (gdb_rl_attempted_completion_function_throw)
4575 (gdb_rl_attempted_completion_function): New.
4576 * completer.h (completion_list, struct completion_result)
4577 (class completion_tracker): New.
4578 (complete_line): Add completion_tracker parameter.
4579 (readline_line_completion_function): Delete.
4580 (gdb_rl_attempted_completion_function): New.
4581 (noop_completer, filename_completer, expression_completer)
4582 (location_completer, symbol_completer, command_completer)
4583 (signal_completer, reg_or_group_completer): Update prototypes.
4584 (completion_tracker_t, new_completion_tracker)
4585 (make_cleanup_free_completion_tracker): Delete.
4586 (enum maybe_add_completion_enum): Delete.
4587 (maybe_add_completion): Delete.
4588 (throw_max_completions_reached_error): Delete.
4589 * corefile.c (complete_set_gnutarget): Adjust to work with a
4590 completion_tracker instead of a VEC.
4591 * cp-abi.c (cp_abi_completer): Adjust to work with a
4592 completion_tracker instead of a VEC.
4593 * d-lang.c (d_language_defn): Adjust.
4594 * disasm.c (disassembler_options_completer): Adjust to work with a
4595 completion_tracker instead of a VEC.
4596 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4597 (f_collect_symbol_completion_matches): ... this. Adjust to work
4598 with a completion_tracker instead of a VEC.
4599 (f_language_defn): Adjust.
4600 * go-lang.c (go_language_defn): Adjust.
4601 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4602 Adjust to work with a completion_tracker instead of a VEC.
4603 * infrun.c (handle_completer): Likewise.
4604 * interps.c (interpreter_completer): Likewise.
4605 * interps.h (interpreter_completer): Likewise.
4606 * language.c (unknown_language_defn, auto_language_defn)
4607 (local_language_defn): Adjust.
4608 * language.h (language_defn::la_make_symbol_completion_list):
4609 Rename to ...
4610 (language_defn::la_collect_symbol_completion_matches): ... this
4611 and adjust to work with a completion_tracker instead of a VEC.
4612 * m2-lang.c (m2_language_defn): Adjust.
4613 * objc-lang.c (objc_language_defn): Adjust.
4614 * opencl-lang.c (opencl_language_defn): Adjust.
4615 * p-lang.c (pascal_language_defn): Adjust.
4616 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4617 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4618 with a completion_tracker.
4619 * rust-lang.c (rust_language_defn): Adjust.
4620 * symtab.c (free_completion_list, do_free_completion_list)
4621 (return_val, completion_tracker): Delete.
4622 (completion_list_add_name, completion_list_add_symbol)
4623 (completion_list_add_msymbol, completion_list_objc_symbol)
4624 (completion_list_add_fields, add_symtab_completions): Add
4625 completion_tracker parameter and use it.
4626 (default_make_symbol_completion_list_break_on_1): Rename to...
4627 (default_collect_symbol_completion_matches_break_on): ... this.
4628 Add completion_tracker parameter and use it instead of allocating
4629 a completion tracker here.
4630 (default_make_symbol_completion_list_break_on): Delete old
4631 implementation.
4632 (default_make_symbol_completion_list): Delete.
4633 (default_collect_symbol_completion_matches): New.
4634 (make_symbol_completion_list): Delete.
4635 (collect_symbol_completion_matches): New.
4636 (make_symbol_completion_type): Rename to ...
4637 (collect_symbol_completion_matches_type): ... this. Add
4638 completion_tracker parameter and use it instead of VEC.
4639 (make_file_symbol_completion_list_1): Rename to...
4640 (collect_file_symbol_completion_matches): ... this. Add
4641 completion_tracker parameter and use it instead of VEC.
4642 (make_file_symbol_completion_list): Delete.
4643 (add_filename_to_list): Use completion_list instead of a VEC.
4644 (add_partial_filename_data::list): Now a completion_list.
4645 (make_source_files_completion_list): Work with a completion_list
4646 instead of a VEC.
4647 * symtab.h: Include "completer.h".
4648 (default_make_symbol_completion_list_break_on)
4649 (default_make_symbol_completion_list, make_symbol_completion_list)
4650 (make_symbol_completion_type, make_file_symbol_completion_list)
4651 (make_source_files_completion_list): Delete.
4652 (default_collect_symbol_completion_matches_break_on)
4653 (default_collect_symbol_completion_matches)
4654 (collect_symbol_completion_matches)
4655 (collect_symbol_completion_matches_type)
4656 (collect_file_symbol_completion_matches)
4657 (make_source_files_completion_list): New.
4658 * top.c (init_main): Don't install a rl_completion_entry_function
4659 hook. Install a rl_attempted_completion_function hook instead.
4660 * tui/tui-layout.c (layout_completer): Adjust to work with a
4661 completion_tracker.
4662 * tui/tui-regs.c (tui_reggroup_completer):
4663 * tui/tui-win.c (window_name_completer, focus_completer)
4664 (winheight_completer): Adjust to work with a completion_tracker.
4665 * value.c: Include "completer.h".
4666 (complete_internalvar): Adjust to work with a completion_tracker.
4667 * value.h (complete_internalvar): Likewise.
4668
6e1dbf8c
PA
46692017-07-17 Pedro Alves <palves@redhat.com>
4670
4671 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4672 renames.
4673 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4674 comments to completer_ftype's declaration.
4675 <completer_handle_brkchars>: Change type to
4676 completer_handle_brkchars_ftype.
4677 * command.h (completer_ftype): Add describing comment and give
4678 names to parameters.
4679 (completer_ftype_void): Rename to ...
4680 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4681 (set_cmd_completer_handle_brkchars): Adjust.
4682 * completer.c (filename_completer_handle_brkchars): New function.
4683 (complete_line_internal_normal_command): New function, factored
4684 out from ...
4685 (complete_line_internal): ... here.
4686 (command_completer_handle_brkchars)
4687 (default_completer_handle_brkchars)
4688 (completer_handle_brkchars_func_for_completer): New functions.
4689 * completer.h (set_gdb_completion_word_break_characters): Delete
4690 declaration.
4691 (completer_handle_brkchars_func_for_completer): New declaration.
4692 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4693 completer_handle_brkchars_func_for_completer.
4694
78b13106
PA
46952017-07-17 Pedro Alves <palves@redhat.com>
4696
4697 * completer.c (symbol_completer): New function, based on
4698 make_symbol_completion_list_fn.
4699 * completer.h (symbol_completer): New declaration.
4700 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4701 * python/py-cmd.c (completers): Adjust.
4702 * symtab.c (make_symbol_completion_list_fn): Delete.
4703 * symtab.h (make_symbol_completion_list_fn): Delete.
4704 * cli/cli-decode.c (add_cmd): Adjust.
4705
bbf2f4df
PA
47062017-07-17 Pedro Alves <palves@redhat.com>
4707
4708 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4709 * dwarf2read.c: Include "filename-seen-cache.h".
4710 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4711 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4712 * filename-seen-cache.c: New file.
4713 * filename-seen-cache.h: New file.
4714 * symtab.c: Include "filename-seen-cache.h".
4715 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4716 (create_filename_seen_cache, clear_filename_seen_cache)
4717 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4718 to filename-seen-cache.h/filename-seen-cache.c.
4719 (output_source_filename, sources_info)
4720 (maybe_add_partial_symtab_filename)
4721 (make_source_files_completion_list): Adjust to use
4722 filename_seen_cache.
4723
330cdd98
PA
47242017-07-17 Pedro Alves <palves@redhat.com>
4725
4726 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4727 fields.
4728 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4729 dwarf2_debug_sections*)): New.
4730 (dwarf2_per_objfile::dwarf2_per_objfile(const
4731 dwarf2_per_objfile&)): Declare as deleted.
4732 (dwarf2_per_objfile::operator=): Declare as deleted.
4733 (dwarf2_per_objfile::dwarf2_per_objfile)
4734 (dwarf2_per_objfile::~dwarf2_per_objfile)
4735 (dwarf2_per_objfile::free_cached_comp_units): New.
4736 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4737 ctor. Call dwarf2_per_objfile's ctor manually.
4738 (dwarf2_locate_sections): Deleted/refactored as ...
4739 (dwarf2_per_objfile::locate_sections): ... this new method.
4740 (free_cached_comp_units): Defer to
4741 dwarf2_per_objfile::free_cached_comp_units.
4742 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4743
8880f2a9
TT
47442017-07-14 Tom Tromey <tom@tromey.com>
4745
4746 PR rust/21764:
4747 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4748 parameter.
4749 <UNOP_SIZEOF>: Split into separate case.
4750 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4751
65547233
TT
47522017-07-14 Tom Tromey <tom@tromey.com>
4753
4754 PR rust/21763:
4755 * symtab.c (symbol_matches_domain): Add language_rust to special
4756 case.
4757 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4758 treat LOC_TYPEDEF symbols as variables.
4759
8f14146e
PA
47602017-07-14 Pedro Alves <palves@redhat.com>
4761
4762 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4763 symtabs matching all symtabs with SRCFILE as file name instead of
4764 only considering the first hit, with lookup_symtab.
4765
2347965c
SM
47662017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4767
4768 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4769 operator_name parameters.
4770 (gen_expr): Update function call.
4771
40f4af28
SM
47722017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4773
4774 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4775 parameter.
4776 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4777 Likewise.
4778 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4779 parameter, use agent_expr::gdbarch instead, update function
4780 calls.
4781 (locexpr_tracepoint_var_ref): Likewise.
4782 (loclist_tracepoint_var_ref): Likewise.
4783 * ax-gdb.c (gen_trace_static_fields): Likewise.
4784 (gen_traced_pop): Likewise.
4785 (gen_frame_args_address): Likewise.
4786 (gen_frame_locals_address): Likewise.
4787 (gen_var_ref): Likewise.
4788 (gen_struct_ref_recursive): Likewise.
4789 (gen_static_field): Likewise.
4790 (gen_maybe_namespace_elt): Likewise.
4791 (gen_expr): Likewise.
4792 (gen_trace_for_var): Likewise.
4793 (gen_trace_for_expr): Likewise.
4794 (gen_trace_for_return_address): Likewise.
4795
053f8057
SM
47962017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4797
4798 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4799 parameter.
4800 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4801
6661ad48
SM
48022017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4803
4804 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4805 from ax, update calls.
4806 (gen_usual_arithmetic): Likewise.
4807 (gen_integral_promotions): Likewise.
4808 (gen_bitfield_ref): Likewise.
4809 (gen_primitive_field): Likewise.
4810 (gen_struct_ref_recursive): Likewise.
4811 (gen_struct_ref): Likewise.
4812 (gen_maybe_namespace_elt): Likewise.
4813 (gen_struct_elt_for_reference): Likewise.
4814 (gen_namespace_elt): Likewise.
4815 (gen_aggregate_elt_ref): Likewise.
4816 (gen_expr): Get gdbarch from ax, update calls.
4817 (gen_expr_binop_rest): Likewise.
4818
c55a47e7
PA
48192017-07-13 Pedro Alves <palves@redhat.com>
4820
4821 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4822 as default tdesc.
4823 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4824 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4825 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4826 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4827 tdep.
4828 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4829 Get final tdesc from the tdep.
4830 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4831 default tdesc.
4832 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4833 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4834 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4835 Use it as default tdesc.
4836 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4837 down to amd_init_abi. No longer handle fallback tdesc here.
4838 * amd64-tdep.h (tdesc_x32): Declare.
4839 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4840 parameter.
4841 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4842 as default tdesc.
4843
55efceab
AA
48442017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4845
4846 * s390-linux-tdep.c (s390_process_record): Add support for
4847 instructions new in arch12.
4848
0aa37b65
JB
48492017-07-11 John Baldwin <jhb@FreeBSD.org>
4850
4851 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4852 PT_GETFSBASE and PT_GETGSBASE.
4853 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4854 PT_SETGSBASE.
4855
48aeef91
JB
48562017-07-11 John Baldwin <jhb@FreeBSD.org>
4857
4858 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4859 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4860 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4861 those rules.
4862 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4863 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4864 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4865 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4866 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4867 * features/i386/amd64.xml: Add 64bit-segments.xml.
4868 * features/i386/amd64-avx-avx512.c: Regenerated.
4869 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4870 * features/i386/amd64-avx-mpx.c: Regenerated.
4871 * features/i386/amd64-avx.c: Regenerated.
4872 * features/i386/amd64-mpx.c: Regenerated.
4873 * features/i386/amd64.c: Regenerated.
4874 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4875 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4876 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4877 * regformats/i386/amd64-avx.dat: Regenerated.
4878 * regformats/i386/amd64-mpx.dat: Regenerated.
4879 * regformats/i386/amd64.dat: Regenerated.
4880
77c501bc
YQ
48812017-07-10 Yao Qi <yao.qi@linaro.org>
4882
4883 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4884 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4885
6dc8d757
AK
48862017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4887
4888 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4889 unsetenv.
4890 * gnulib/aclocal.m4: Regenerate.
4891 * gnulib/config.in: Regenerate.
4892 * gnulib/configure: Regenerate.
4893 * gnulib/import/Makefile.am: Regenerate.
4894 * gnulib/import/Makefile.in: Regenerate.
4895 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4896 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4897 * gnulib/import/m4/environ.m4: New file.
4898 * gnulib/import/m4/setenv.m4: New file.
4899 * gnulib/import/setenv.c: New file.
4900 * gnulib/import/unsetenv.c: New file.
4901
266934d1
SM
49022017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4903
4904 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4905 address when op is DW_OP_addr.
4906
03278692
TT
49072017-07-09 Tom Tromey <tom@tromey.com>
4908
4909 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4910 check and apply to outer type.
4911
4b654465
JB
49122017-07-07 John Baldwin <jhb@FreeBSD.org>
4913
4914 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4915 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4916 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4917 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4918
2af9fc44
JB
49192017-07-07 John Baldwin <jhb@FreeBSD.org>
4920
4921 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4922
382b69bb
JB
49232017-07-07 John Baldwin <jhb@FreeBSD.org>
4924
4925 * corelow.c (get_core_siginfo): Remove.
4926 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4927 instead of get_core_siginfo.
4928 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4929 * gdbarch.h: Re-generate.
4930 * gdbarch.c: Re-generate.
4931 * linux-tdep.c (linux_core_xfer_siginfo): New.
4932 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4933
6e5eab33
JB
49342017-07-07 John Baldwin <jhb@FreeBSD.org>
4935
4936 * corelow.c (thread_section_name): Move to ...
4937 * gdbcore.h (thread_section_name): ... here.
4938
929edea9
JB
49392017-07-07 John Baldwin <jhb@FreeBSD.org>
4940
4941 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4942 (struct siginfo32): New.
4943 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4944 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4945 via ptrace(PT_LWPINFO).
4946
762c974a
JB
49472017-07-07 John Baldwin <jhb@FreeBSD.org>
4948
4949 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4950 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4951 (fbsd_get_siginfo_type): New.
4952 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4953 (_initialize_fbsd_tdep): New.
4954
33c5cd75
DB
49552017-07-06 David Blaikie <dblaikie@gmail.com>
4956
4957 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4958 a singular dwo_unit*) to support multiple CUs in the same way that
4959 multiple TUs are supported.
4960 (create_cus_hash_table): Replace create_dwo_cu with a function for
4961 parsing multiple CUs from a DWO file.
4962 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4963 create_dwo_cu.
4964 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4965 htab_find, rather than comparing the signature to a singleton CU in
4966 the dwo_file.
4967
8455d262
PA
49682017-07-06 Pedro Alves <palves@redhat.com>
4969
4970 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4971
4da3eb35
PA
49722017-07-04 Pedro Alves <palves@redhat.com>
4973
4974 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4975 * gdbtypes.h (TYPE_STATIC): Delete.
4976 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4977 is_synchronized, is_native>: Delete.
4978 <dummy>: Bump.
4979 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4980 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4981 (TYPE_FN_FIELD_ABSTRACT): Delete.
4982
5bfd255c
SM
49832017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4984
4985 * buffer.h (buffer_finish): Fix spelling mistakes.
4986
25c54127
EZ
49872017-07-01 Eli Zaretskii <eliz@gnu.org>
4988
4989 * .dir-locals.el: Automatically switch to C-style comments in
4990 versions of Emacs that support the feature.
4991
dc4bde35
SDJ
49922017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4993 Pedro Alves <palves@redhat.com>
4994
4995 PR cli/21688
4996 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4997 (process_next_line): New variable 'inline_cmd'.
4998 Adjust 'if' clauses for "python", "compile" and "guile" to use
4999 'command_name_equals' and check for '!inline_cmd'.
5000
51ed89aa
SDJ
50012017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5002
5003 PR cli/21688
5004 * cli/cli-script.c (command_name_equals_not_inline): New function.
5005 (process_next_line): Adjust 'if' clauses for "python", "compile"
5006 and "guile" to use command_name_equals_not_inline.
5007
eb17d413
PA
50082017-06-29 Pedro Alves <palves@redhat.com>
5009
5010 * completer.c (expression_completer): Call
5011 linespec_location_completer instead of location_completer.
5012
195bcdd5
PA
50132017-06-29 Pedro Alves <palves@redhat.com>
5014
5015 * completer.c (expression_completer): Remove code that recomputes
5016 'text' from 'word'.
5017
adc764e7
YQ
50182017-06-29 Yao Qi <yao.qi@linaro.org>
5019
5020 * regformats/regdat.sh: Generate code with
5021 "ifndef IN_PROCESS_AGENT".
5022
6e75794e
PA
50232017-06-28 Pedro Alves <palves@redhat.com>
5024
5025 * command.h: Include "common/scoped_restore.h".
5026
bc491f2e
YQ
50272017-06-28 Yao Qi <yao.qi@linaro.org>
5028
5029 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5030 instead of obstack_grow.
5031
41664b45
DG
50322017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5033
5034 PR gdb/21337
5035 * symfile.c (reread_symbols): Call objfiles_changed just before
5036 read_symbols.
5037
6da67eb1
PA
50382017-06-27 Pedro Alves <palves@redhat.com>
5039
5040 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5041 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5042 (completion_list_add_symbol, completion_list_add_msymbol):
5043 ... these new functions.
5044 (add_symtab_completions)
5045 (default_make_symbol_completion_list_break_on_1): Adjust.
5046
23732b1e
PA
50472017-06-27 Pedro Alves <palves@redhat.com>
5048
5049 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5050 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5051 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5052 dtor.
5053 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5054 'storage_obstack' field an auto_obstack. In-class initialize all
5055 non-bitfield fields. Make minsyms_read bool.
5056 * symfile.c (read_symbols): Adjust.
5057
a4d1e79a
AH
50582017-06-27 Alan Hayward <alan.hayward@arm.com>
5059
5060 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5061 (gdbsim_store_register): Likewise.
5062
8268c778
PA
50632017-06-27 Pedro Alves <palves@redhat.com>
5064
5065 * c-exp.y (name_obstack): Now an auto_obstack.
5066 (yylex): Use auto_obstack::clear.
5067 (c_parse): Use auto_obstack::clear instead of reinitializing and
5068 freeing the obstack.
5069 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5070 * d-exp.y (name_obstack): Now an auto_obstack.
5071 (yylex): Use auto_obstack::clear.
5072 (d_parse): Use auto_obstack::clear instead of reinitializing and
5073 freeing the obstack.
5074 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5075 auto_obstack.
5076 * dwarf2read.c (create_addrmap_from_index)
5077 (dwarf2_build_psymtabs_hard)
5078 (update_enumeration_type_from_children): Likewise.
5079 * gdb_obstack.h (auto_obstack): New type.
5080 * go-exp.y (name_obstack): Now an auto_obstack.
5081 (build_packaged_name): Use auto_obstack::clear.
5082 (go_parse): Use auto_obstack::clear instead of reinitializing and
5083 freeing the obstack.
5084 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5085 auto_obstack.
5086 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5087 * rust-exp.y (work_obstack): Now an auto_obstack.
5088 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5089 reinitializing and freeing the obstack.
5090 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5091 (host_char_to_target): Use auto_obstack.
5092 * utils.h (make_cleanup_obstack_free): Delete declaration.
5093 * valprint.c (generic_emit_char, generic_printstr): Use
5094 auto_obstack.
5095
db665f42
SM
50962017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5097
5098 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5099 thread.
5100 (darwin_init_thread_list): Don't update dummy thread.
5101 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5102
873c0814
SM
51032017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5104
5105 * record-full.c (netorder16): Remove.
5106
8b5a7a6e
SM
51072017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5108
5109 * common/diagnostics.h: Define macros for GCC.
5110 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5111 * common/vec.h: Include diagnostics.h.
5112 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5113 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5114 warning.
5115
d1435379
SM
51162017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5117
5118 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5119 New macro.
5120 * ada-lex.l: Ignore deprecated register warnings.
5121
cc75e0fd
SM
51222017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5123
5124 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5125 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5126
07809eaf
SM
51272017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5128
5129 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5130 its own line.
5131
f076f034
SM
51322017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5133
5134 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5135
0dd5cbc5
AH
51362017-06-23 Alan Hayward <alan.hayward@arm.com>
5137
5138 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5139 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5140 (xtensa_register_read_masked): Likewise.
5141
d4c6ce5b
SDJ
51422017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5143
5144 * common/environ.c (gdb_environ::unset): Update comment.
5145
16892a03
AH
51462017-06-22 Alan Hayward <alan.hayward@arm.com>
5147
5148 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5149 registers.
5150
d7dcbefc
AH
51512017-06-22 Alan Hayward <alan.hayward@arm.com>
5152
5153 * record-full.c (record_full_exec_insn): Use byte_vector.
5154
b30ff123
YQ
51552017-06-22 Yao Qi <yao.qi@linaro.org>
5156
5157 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5158 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5159
4fa847d7
AH
51602017-06-22 Alan Hayward <alan.hayward@arm.com>
5161
5162 * remote.c (cached_reg): Move from here...
5163 * regcache.h (cached_reg): ...to here.
5164 * python/py-unwind.c (struct reg_info): Remove.
5165 (cached_frame_info): Use cached_reg_t.
5166 (pyuw_prev_register): Likewise.
5167 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5168 (pyuw_dealloc_cache): Free all registers.
5169
f4906a9a
PA
51702017-06-22 Pedro Alves <palves@redhat.com>
5171 Simon Marchi <simon.marchi@ericsson.com>
5172
5173 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5174 warning.
5175 * common/diagnostics.h: New file.
5176
b45a1208
PA
51772017-06-22 Pedro Alves <palves@redhat.com>
5178
5179 * common/agent.h: Add include guards.
5180
e4da2c61
SM
51812017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5182
5183 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5184 talk about addressable units instead of bytes.
5185
96160d60
SDJ
51862017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5187
5188 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5189 of '::const_iterator'.
5190
9a6c7d9c
SDJ
51912017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5192
5193 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5194 'unittests/environ-selftests.c'.
5195 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5196 * charset.c (find_charset_names): Declare object 'iconv_env'.
5197 Update code to use 'iconv_env' object. Remove call to
5198 'free_environ'.
5199 * common/environ.c: Include <utility>.
5200 (make_environ): Delete function.
5201 (free_environ): Delete function.
5202 (gdb_environ::clear): New function.
5203 (gdb_environ::operator=): New function.
5204 (gdb_environ::get): Likewise.
5205 (environ_vector): Delete function.
5206 (set_in_environ): Delete function.
5207 (gdb_environ::set): New function.
5208 (unset_in_environ): Delete function.
5209 (gdb_environ::unset): New function.
5210 (gdb_environ::envp): Likewise.
5211 * common/environ.h: Include <vector>.
5212 (struct gdb_environ): Delete; transform into...
5213 (class gdb_environ): ... this class.
5214 (free_environ): Delete prototype.
5215 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5216 environ_vector): Likewise.
5217 * infcmd.c (run_command_1): Update code to call
5218 'envp' from 'gdb_environ' class.
5219 (environment_info): Update code to call methods from 'gdb_environ'
5220 class.
5221 (unset_environment_command): Likewise.
5222 (path_info): Likewise.
5223 (path_command): Likewise.
5224 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5225 (inferior::inferior): Initialize 'environment' using the host's
5226 information.
5227 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5228 Include "environ.h".
5229 (class inferior) <environment>: Change type from 'struct
5230 gdb_environ' to 'gdb_environ'.
5231 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5232 methods from 'gdb_environ' class.
5233 * solib.c (solib_find_1): Likewise
5234 * unittests/environ-selftests.c: New file.
5235
75c554cf
YQ
52362017-06-20 Yao Qi <yao.qi@linaro.org>
5237
5238 * features/i386/i386-linux.xml: Exchange the order of including
5239 32bit-linux.xml and 32bit-sse.xml.
5240 * features/i386/i386-linux.c: Regenerated.
5241
72ddacb7
YQ
52422017-06-20 Yao Qi <yao.qi@linaro.org>
5243
5244 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5245 Delete copy ctor and assignment operator.
5246 (tdesc_type): Likewise.
5247 (tdesc_feature): Likewise.
5248 (tdesc_free_reg): Remove.
5249 (tdesc_create_reg): Use new.
5250 (tdesc_free_type): Remove.
5251 (tdesc_create_vector): Use new.
5252 (tdesc_create_union): Likewise.
5253 (tdesc_create_flags): Likewise.
5254 (tdesc_create_enum): Likewise.
5255 (tdesc_free_feature): Delete.
5256 (free_target_description): Use delete.
5257
325c9fd4
JB
52582017-06-19 John Baldwin <jhb@FreeBSD.org>
5259
5260 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5261 registers.
5262
16b7a719
PA
52632017-06-19 Pedro Alves <palves@redhat.com>
5264
5265 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5266 after gdb::unlinker.
5267
1c8e01c9
SDJ
52682017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5269
5270 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5271 gdb_environ to access an environment variable.
5272
ffce45d2
TP
52732017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5274
5275 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5276 gdb_byte*.
5277
1d4fbac9
SM
52782017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5279
5280 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5281
8465943a
SM
52822017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5283
5284 * configure: Re-generate.
5285 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5286
3e019bdc
SM
52872017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5288
5289 * configure: Re-generate.
5290 * warning.m4: Pass -Werror to compiler when checking for
5291 supported warning flags.
5292
cf0dd6f0
SM
52932017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5294
5295 * Makefile.in (COMPILE.pre): Add "-x c++".
5296
6f98355c
YQ
52972017-06-16 Alan Hayward <alan.hayward@arm.com>
5298 Pedro Alves <palves@redhat.com>
5299 Yao Qi <yao.qi@linaro.org>
5300
5301 * defs.h (RequireLongest): New.
5302 (extract_integer): Declare function template.
5303 (extract_signed_integer): Remove the declaration, but define it
5304 static inline.
5305 (extract_unsigned_integer): Likewise.
5306 (store_integer): Declare function template.
5307 (store_signed_integer): Remove the declaration, but define it
5308 static inline.
5309 (store_unsigned_integer): Likewise.
5310 * findvar.c (extract_integer): New function template.
5311 (extract_signed_integer): Remove.
5312 (extract_unsigned_integer): Remove.
5313 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5314 instantiations.
5315 (store_integer): New function template.
5316 (store_signed_integer): Remove.
5317 (store_unsigned_integer): Remove.
5318 (store_integer): Explicit instantiations.
5319 * regcache.c (regcache_raw_read_signed): Update.
5320 (regcache::raw_read): New function.
5321 (regcache::raw_read_signed): Remove.
5322 (regcache::raw_read_unsigned): Remove.
5323 (regcache_raw_read_unsigned): Update.
5324 (regcache_raw_write_unsigned): Update.
5325 (regcache::raw_write_signed): Remove.
5326 (regcache::raw_write): New function.
5327 (regcache_cooked_read_signed): Update.
5328 (regcache::raw_write_unsigned): Remove.
5329 (regcache::cooked_read_signed): Remove.
5330 (regcache_cooked_read_unsigned): Update.
5331 (regcache::cooked_read_unsigned): Remove.
5332 (regcache_cooked_write_signed): Update.
5333 (regcache_cooked_write_unsigned): Update.
5334 * regcache.h (regcache) <raw_read_signed>: Remove.
5335 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5336 <raw_read, raw_write>: New.
5337 <cooked_read_signed, cooked_write_signed>: Remove.
5338 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5339 <cooked_read, cooked_write>: New.
5340 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5341 (sh64_pseudo_register_write): Update.
5342
a87dc45a
AK
53432017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5344
5345 * arc-tdep.c (arc_disassembler_options): New variable.
5346 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5347 of default_print_insn.
5348 (arc_delayed_print_insn): Set info->section when needed,
5349 use default_print_insn to retrieve a disassembler.
5350
45159d6a
SDJ
53512017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5352
5353 PR gdb/21574
5354 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5355 to mention $SHELL and startup-with-shell.
5356
b46c4cf0
MF
53572017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5358
5359 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5360
6394c606
YQ
53612017-06-14 Yao Qi <yao.qi@linaro.org>
5362
5363 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5364 default_print_insn instead of print_insn_aarch64.
5365 * arm-tdep.c (gdb_print_insn_arm): Call
5366 default_print_insn instead of print_insn_big_arm
5367 and print_insn_little_arm.
5368 * i386-tdep.c (i386_print_insn): Call default_print_insn
5369 instead of print_insn_i386.
5370 * ia64-tdep.c (ia64_print_insn): Call
5371 default_print_insn instead of print_insn_ia64.
5372 * mips-tdep.c (gdb_print_insn_mips): Call
5373 default_print_insn instead of print_insn_big_mips
5374 and print_insn_little_mips.
5375 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5376 instead of print_insn_spu.
5377
d5722aa2
PA
53782017-06-14 Pedro Alves <palves@redhat.com>
5379
5380 * ada-lang.c: Include "common/byte-vector.h".
5381 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5382 * charset.c (wchar_iterator::iterate): Resize the vector instead
5383 of reserving it.
5384 * common/byte-vector.h: Include "common/def-vector.h".
5385 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5386 * cli/cli-dump.c: Include "common/byte-vector.h".
5387 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5388 * common/byte-vector.h: New file.
5389 * common/def-vector.h: New file.
5390 * common/default-init-alloc.h: New file.
5391 * dwarf2loc.c: Include "common/byte-vector.h".
5392 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5393 instead of reserving it.
5394 * dwarf2read.c: Include "common/byte-vector.h".
5395 (data_buf::m_vec): Now a gdb::byte_vector.
5396 * gdb_regex.c: Include "common/def-vector.h".
5397 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5398 * mi/mi-main.c: Include "common/byte-vector.h".
5399 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5400 * printcmd.c: Include "common/byte-vector.h".
5401 (print_scalar_formatted): Use gdb::byte_vector.
5402 * valprint.c: Include "common/byte-vector.h".
5403 (maybe_negate_by_bytes, print_decimal_chars): Use
5404 gdb::byte_vector.
5405
01ec7a27
SM
54062017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5407
5408 * darwin-nat.c: Include "nat/fork-inferior.h".
5409
848d9074
SM
54102017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5411
5412 * configure.nat: Factor out Darwin bits that are not
5413 architecture-specific. Add fork-inferior.o.
5414
3b912944
SM
54152017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5416
5417 * configure.nat: Factor out AIX bits that are not
5418 architecture-specific. Add fork-inferior.o.
5419
55acdf22
AA
54202017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5421
5422 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5423 (read_pieced_value, write_pieced_value): ...here. Reduce to
5424 wrappers that just call rw_pieced_value.
5425
f65e2044
AA
54262017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5427
5428 * dwarf2loc.c (write_pieced_value): When writing the data for a
5429 memory piece, use write_memory_with_notification instead of
5430 write_memory.
5431
23f945bf
AA
54322017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5433
5434 * valops.c (read_value_memory): Change embedded_offset to
5435 represent a bit offset instead of a byte offset.
5436 * value.h (read_value_memory): Adjust comment.
5437
f236533e
AA
54382017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5439
5440 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5441 dest_offset_bits and source_offset_bits.
5442 (write_pieced_value): Likewise.
5443
65d84b76
AA
54442017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5445
5446 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5447 given by DW_OP_bit_piece.
5448 (write_pieced_value): Likewise.
5449
242d31ab
AA
54502017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5451
5452 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5453 some other preparations to the places where sufficient information
5454 is available.
5455 (write_pieced_value): Likewise.
5456
03c8af18
AA
54572017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5458
5459 * dwarf2loc.c (bits_to_bytes): New function.
5460 (read_pieced_value): Fix offset calculations for register pieces
5461 on big-endian targets.
5462 (write_pieced_value): Likewise.
5463
840989c1
AA
54642017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5465
5466 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5467 (write_pieced_value): Likewise.
5468
359b19bb
AA
54692017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5470
5471 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5472 transfer the source value's least significant bits, instead of its
5473 lowest-addressed ones. Rename type_len to max_offset.
5474 (read_pieced_value): Mirror above changes to write_pieced_value as
5475 applicable.
5476
07c9ca3b
AA
54772017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5478
5479 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5480 truncate full bytes from dest_offset_bits before using it as an
5481 offset into the buffer.
5482
f1cc9874
AA
54832017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5484
5485 * dwarf2loc.c (write_pieced_value): Include transfer size in
5486 byte-wise check.
5487
cdaac320
AA
54882017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5489
5490 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5491 calculation of this_size.
5492
af547a96
AA
54932017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5494
5495 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5496 when targeting a bit-field.
5497 (write_pieced_value): Likewise.
5498
ddd7882a
AA
54992017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5500
5501 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5502 (allocate_piece_closure): Drop addr_size parameter.
5503 (dwarf2_evaluate_loc_desc_full): Adjust call to
5504 allocate_piece_closure.
5505
e9352324
AA
55062017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5507
5508 PR gdb/21226
5509 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5510 the LSB end, independent of endianness.
5511
d5d1163e
AA
55122017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5513
5514 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5515 size capping.
5516
032bb6ea
YQ
55172017-06-13 Yao Qi <yao.qi@linaro.org>
5518
5519 * mips-linux-nat.c: Move include features/mips*-linux.c to
5520 mips-linux-tdep.c.
5521 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5522 to mips-linux-tdep.c.
5523 * mips-linux-tdep.c: Include features/mips*-linux.c
5524 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5525 functions.
5526 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5527 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5528 (tdesc_mips64_dsp_linux): Declare.
5529
f12f6bad
TT
55302017-06-12 Tom Tromey <tom@tromey.com>
5531
5532 * valprint.h (val_print_type_code_int): Remove.
5533 * valprint.c (generic_val_print_int): Always call
5534 val_print_scalar_formatted.
5535 (val_print_type_code_int): Remove.
5536 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5537 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5538 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5539 * ada-valprint.c (ada_val_print_num): Use
5540 val_print_scalar_formatted.
5541
d9109c80
TT
55422017-06-12 Tom Tromey <tom@tromey.com>
5543
5544 * printcmd.c (print_scalar_formatted): Unify the two switches.
5545 Don't convert scalars to LONGEST.
5546
4ac0cb1c
TT
55472017-06-12 Tom Tromey <tom@tromey.com>
5548
5549 PR exp/16225:
5550 * valprint.h (print_decimal_chars): Update.
5551 * valprint.c (maybe_negate_by_bytes): New function.
5552 (print_decimal_chars): Add "is_signed" argument.
5553 * printcmd.c (print_scalar_formatted): Update.
5554
30a25466
TT
55552017-06-12 Tom Tromey <tom@tromey.com>
5556
5557 PR exp/16225:
5558 * valprint.h (print_binary_chars, print_hex_chars): Update.
5559 * valprint.c (val_print_type_code_int): Update.
5560 (print_binary_chars): Add "zero_pad" argument.
5561 (emit_octal_digit): New function.
5562 (print_octal_chars): Don't zero-pad.
5563 (print_decimal_chars): Likewise.
5564 (print_hex_chars): Add "zero_pad" argument.
5565 * sh64-tdep.c (sh64_do_fp_register): Update.
5566 * regcache.c (regcache::dump): Update.
5567 * printcmd.c (print_scalar_formatted): Update.
5568 * infcmd.c (default_print_one_register_info): Update.
5569
b3464d03
PA
55702017-06-12 Pedro Alves <palves@redhat.com>
5571 Alan Hayward <alan.hayward@arm.com>
5572
5573 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5574 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5575 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5576 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5577 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5578
4b76cda9
PA
55792017-06-12 Pedro Alves <palves@redhat.com>
5580
5581 * dwarf2read.c (mapped_symtab::data): Now a vector of
5582 symtab_index_entry instead of vector of
5583 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5584 whether an element's name is NULL instead of checking whether the
5585 element itself is NULL.
5586 (find_slot): Change return type. Adjust.
5587 (hash_expand, , add_index_entry, uniquify_cu_indices)
5588 (write_hash_table): Adjust.
5589
e8f8bcb3
PA
55902017-06-12 Pedro Alves <palves@redhat.com>
5591
5592 * dwarf2read.c (recursively_count_psymbols): New function.
5593 (write_psymtabs_to_index): Call it to compute number of psyms and
5594 pass estimate size of psyms_seen to unordered_set's ctor.
5595
70a1152b
PA
55962017-06-12 Pedro Alves <palves@redhat.com>
5597
5598 * dwarf2read.c (write_hash_table): Check if key already exists
5599 before emplacing.
5600
c2f134ac
PA
56012017-06-12 Pedro Alves <palves@redhat.com>
5602
5603 * dwarf2read.c (data_buf::append_space): Rename to...
5604 (data_buf::grow): ... this, and make private. Adjust all callers.
5605 (data_buf::append_uint): New method.
5606 (add_address_entry, write_one_signatured_type)
5607 (write_psymtabs_to_index): Use it.
5608
a81e6d4d
PA
56092017-06-12 Pedro Alves <palves@redhat.com>
5610
5611 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5612 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5613 (data_buf::file_write): Call ::fwrite directly.
5614
6fd931f2
PA
56152017-06-12 Pedro Alves <palves@redhat.com>
5616
5617 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5618 std::vector::erase.
5619
bc8f2430
JK
56202017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5621
5622 Code cleanup: C++ify .gdb_index producer.
5623 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5624 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5625 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5626 (create_strtab, add_string): Remove.
5627 (file_write, data_buf): New.
5628 (struct symtab_index_entry): Use std::vector for cu_indices.
5629 (struct mapped_symtab): Use std::vector for data.
5630 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5631 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5632 Remove.
5633 (find_slot): Change return type. Update it to the new data structures.
5634 (hash_expand, add_index_entry): Update it to the new data structures.
5635 (offset_type_compare): Remove.
5636 (uniquify_cu_indices): Update it to the new data structures.
5637 (c_str_view, c_str_view_hasher, vector_hasher): New.
5638 (add_indices_to_cpool): Remove.
5639 (write_hash_table): Update it to the new data structures.
5640 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5641 (eq_psymtab_cu_index): Remove.
5642 (psym_index_map): New typedef.
5643 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5644 reference and std::unordered_map for cu_index_htab.
5645 (add_address_entry, add_address_entry_worker, write_address_map)
5646 (write_psymbols): Update it to the new data structures.
5647 (write_obstack): Remove.
5648 (struct signatured_type_index_data): Change types_list to a data_buf
5649 reference and psyms_seen to a std::unordered_set reference.
5650 (write_one_signatured_type, recursively_write_psymbols)
5651 (write_psymtabs_to_index): Update it to the new data structures.
5652
c4dcb155
SM
56532017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5654
5655 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5656 separate-debug-file commands.
5657 * symfile.h (separate_debug_file_debug): New global.
5658 * symfile.c (separate_debug_file_debug): New global.
5659 (separate_debug_file_exists, find_separate_debug_file): Add
5660 debug output.
5661 (_initialize_symfile): Add "set debug separate-debug-file"
5662 command.
5663 * build-id.c (build_id_to_debug_bfd,
5664 find_separate_debug_file_by_buildid): Add debug output.
5665
6d45d4b4
SM
56662017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5667
5668 * gdbarch.sh (displaced_step_free_closure): Remove.
5669 * gdbarch.h, gdbarch.c: Re-generate.
5670 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5671 displaced_step_free_closure.
5672 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5673 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5674 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5675 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5676 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5677 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5678 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5679 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5680 * infrun.c (displaced_step_clear): Call xfree instead of
5681 gdbarch_displaced_step_free_closure.
5682
2f91880f
SDJ
56832017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5684
5685 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5686 NULL".
5687
b8b6e72f
AH
56882017-06-08 Alan Hayward <alan.hayward@arm.com>
5689
5690 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5691 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5692 (mn10300_push_dummy_call): Likewise.
5693
5369082e
AH
56942017-06-08 Alan Hayward <alan.hayward@arm.com>
5695
5696 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5697
ff4ca5ac
AH
56982017-06-08 Alan Hayward <alan.hayward@arm.com>
5699
5700 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5701
aefd8b33
SDJ
57022017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5703
5704 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5705 able to start inferiors using a shell.
5706 (New remote packets): Announce new packet "QStartupWithShell".
5707 * remote.c: Add PACKET_QStartupWithShell.
5708 (extended_remote_create_inferior): Handle new
5709 PACKET_QStartupWithShell.
5710 (remote_protocol_features) <QStartupWithShell>: New entry for
5711 PACKET_QStartupWithShell.
5712 (_initialize_remote): Call "add_packet_config_cmd" for
5713 QStartupShell.
5714
2090129c
SDJ
57152017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5716 Pedro Alves <palves@redhat.com>
5717
5718 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5719 and "nat/fork-inferior.h".
5720 * common/common-inferior.h: New file, with contents from
5721 "gdb/inferior.h".
5722 * commom/common-utils.c: Include "common-utils.h".
5723 (stringify_argv): New function.
5724 * common/common-utils.h (stringify_argv): New prototype.
5725 * configure.nat: Add "fork-inferior.o" as a dependency for
5726 "*linux*", "fbsd*" and "nbsd*" hosts.
5727 * corefile.c (get_exec_file): Update comment.
5728 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5729 instead of "startup_inferior".
5730 (darwin_create_inferior): Call "add_thread_silent" after
5731 "fork_inferior".
5732 * fork-child.c: Cleanup unnecessary includes.
5733 (SHELL_FILE): Move to "common/common-fork-child.c".
5734 (environ): Likewise.
5735 (exec_wrapper): Initialize.
5736 (get_exec_wrapper): New function.
5737 (breakup_args): Move to "common/common-fork-child.c"; rename to
5738 "breakup_args_for_exec".
5739 (escape_bang_in_quoted_argument): Move to
5740 "common/common-fork-child.c".
5741 (saved_ui): New variable.
5742 (prefork_hook): New function.
5743 (postfork_hook): Likewise.
5744 (postfork_child_hook): Likewise.
5745 (gdb_startup_inferior): Likewise.
5746 (fork_inferior): Move to "common/common-fork-child.c". Update
5747 function to support gdbserver.
5748 (startup_inferior): Likewise.
5749 * gdbcore.h (get_exec_file): Remove declaration.
5750 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5751 instead of "startup_inferior". Call "add_thread_silent" after
5752 "fork_inferior".
5753 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5754 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5755 instead of "startup_inferior". Call "add_thread_silent" after
5756 "fork_inferior".
5757 * inferior.h: Include "common-inferior.h".
5758 (trace_start_error): Move to "common/common-utils.h".
5759 (trace_start_error_with_name): Likewise.
5760 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5761 (startup_inferior): Likewise.
5762 (gdb_startup_inferior): New prototype.
5763 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5764 * nat/fork-inferior.h: New file.
5765 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5766 instead of "startup_inferior". Call "add_thread_silent" after
5767 "fork_inferior".
5768 * target.h (target_terminal_init): Move prototype to
5769 "target/target.h".
5770 (target_terminal_inferior): Likewise.
5771 (target_terminal_ours): Likewise.
5772 * target/target.h (target_terminal_init): New prototype, moved
5773 from "target.h".
5774 (target_terminal_inferior): Likewise.
5775 (target_terminal_ours): Likewise.
5776 * utils.c (gdb_flush_out_err): New function.
5777
043a4934
SDJ
57782017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5779
5780 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5781 * common/common-gdbthread.h: New file, with parts from
5782 "gdb/gdbthread.h".
5783 * gdbthread.h: Include "common-gdbthread.h".
5784 (switch_to_thread): Moved to "common/common-gdbthread.h".
5785
15652511
SDJ
57862017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5787
5788 * Makefile.in (SFILES): Add "common/job-control.c".
5789 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5790 (COMMON_OBS): Add "job-control.o".
5791 * common/job-control.c: New file, with contents from
5792 "gdb/inflow.c".
5793 * common/job-control.h: New file, with contents from "terminal.h".
5794 * fork-child.c: Include "job-control.h".
5795 * inflow.c: Include "job-control.h".
5796 (gdb_setpgid): Move to "common/common-inflow.c".
5797 (_initialize_inflow): Move setting of "job_control" to
5798 "handle_job_control".
5799 * terminal.h (job_control): Moved to "common/common-terminal.h".
5800 (gdb_setpgid): Likewise.
5801 * top.c: Include "job_control.h".
5802 * utils.c: Likewise.
5803 (job_control): Moved to "job-control.c".
5804
2d7cc5c7
PA
58052017-06-07 Pedro Alves <palves@redhat.com>
5806
5807 * Makefile.in (SFILES): Add gdb_regex.c.
5808 (COMMON_OBS): Add gdb_regex.o.
5809 * ada-lang.c (ada_add_standard_exceptions)
5810 (ada_add_exceptions_from_frame, name_matches_regex)
5811 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5812 parameter type to compiled_regex. Adjust.
5813 (ada_exceptions_list): Use compiled_regex.
5814 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5815 std::unique_ptr<compiled_regex>.
5816 (exception_catchpoint::~exception_catchpoint): Remove regfree
5817 call.
5818 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5819 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5820 * breakpoint.c (solib_catchpoint::compiled): Now a
5821 std::unique_ptr<compiled_regex>.
5822 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5823 (check_status_catch_solib): Adjust to use compiled_regex.
5824 (add_solib_catchpoint): Adjust to use compiled_regex.
5825 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5826 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5827 compiled_regex reference. Adjust to use it.
5828 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5829 declaration. Include "gdb_regex.h".
5830 (apropos_cmd): Change regex parameter to compiled_regex reference.
5831 * gdb_regex.c: New file.
5832 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5833 declarations.
5834 (class compiled_regex): New.
5835 * linux-tdep.c: Include "common/gdb_optional.h".
5836 (struct mapping_regexes): New, factored out from
5837 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5838 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5839 gdb::optional and remove cleanups. Adjust to compiled_regex.
5840 * probe.c: Include "common/gdb_optional.h".
5841 (collect_probes): Use compiled_regex and gdb::optional and remove
5842 cleanups.
5843 * skip.c: Include "common/gdb_optional.h".
5844 (skiplist_entry::compiled_function_regexp): Now a
5845 gdb::optional<compiled_regex>.
5846 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5847 (free_skiplist_entry): Remove regfree call.
5848 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5849 compiled_regex and gdb::optional.
5850 * symtab.c: Include "common/gdb_optional.h".
5851 (search_symbols): Use compiled_regex and gdb::optional.
5852 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5853 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5854 to gdb_regex.c.
5855
50d6adef
AH
58562017-06-07 Alan Hayward <alan.hayward@arm.com>
5857
5858 * regcache.c (regcache::save): Avoid buffer use.
5859 (regcache::dump): Likewise.
5860
4a8a33c8
AH
58612017-06-07 Alan Hayward <alan.hayward@arm.com>
5862
5863 * sh-tdep.c (sh_pseudo_register_read): Remove
5864 MAX_REGISTER_SIZE.
5865 (sh_pseudo_register_write): Likewise.
5866 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5867 (sh64_pseudo_register_write): Likewise
5868
d1be909e
AH
58692017-06-07 Alan Hayward <alan.hayward@arm.com>
5870
5871 * aarch64-tdep.c (aarch64_store_return_value): Use
5872 V_REGISTER_SIZE.
5873 (aarch64_pseudo_read_value): Likewise.
5874 (aarch64_pseudo_write): Likewise.
5875
f4a65042
YQ
58762017-06-06 Yao Qi <yao.qi@linaro.org>
5877
5878 * regformats/regdef.h (set_register_cache): Remove the
5879 declaration.
5880
9f7fb0aa
AH
58812017-06-06 Alan Hayward <alan.hayward@arm.com>
5882
5883 * frame.c (frame_unwind_register_signed): Use
5884 frame_unwind_register_value.
5885
e1e01040
PA
58862017-06-06 Pedro Alves <palves@redhat.com>
5887
5888 PR breakpoints/21553
5889 * breakpoint.c (create_breakpoints_sal_default)
5890 (init_breakpoint_sal, create_breakpoint_sal): Use
5891 gdb::unique_xmalloc_ptr for string parameters.
5892 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5893 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5894 (base_breakpoint_create_breakpoints_sal)
5895 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5896 (strace_marker_create_breakpoints_sal)
5897 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5898 string parameters.
5899 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5900 gdb::unique_xmalloc_ptr for string parameters.
5901 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5902 parameters.
5903
fbe654c8
AH
59042017-06-06 Alan Hayward <alan.hayward@arm.com>
5905
5906 * alpha-tdep.c (alpha_register_to_value): Use
5907 get_frame_register_value.
5908 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5909
ae0d01d6
AH
59102017-06-06 Alan Hayward <alan.hayward@arm.com>
5911
5912 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5913 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5914 (ia64_value_to_register): Likewise.
5915 (ia64_extract_return_value): Likewise.
5916 (ia64_store_return_value): Likewise.
5917 (ia64_push_dummy_call): Likewise.
5918
49cf576c
JB
59192017-06-04 Joel Brobecker <brobecker@adacore.com>
5920
5921 GDB 8.0 released.
5922
26b6a6ab
SM
59232017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5924
5925 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5926
22827c51
SM
59272017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5928
5929 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5930 parameter.
5931 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5932
0e05cf3a
SM
59332017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5934
5935 * event-loop.c (poll_timers): Unallocate timer using delete
5936 instead of xfree.
5937
c1fc2657
SM
59382017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5939
5940 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5941 (struct breakpoint) <~breakpoint>: New.
5942 (struct watchpoint): Inherit from breakpoint.
5943 <~watchpoint>: New.
5944 <base>: Remove.
5945 (struct tracepoint): Inherit from breakpoint.
5946 <base>: Remove.
5947 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5948 (struct longjmp_breakpoint): Inherit from breakpoint.
5949 <~longjmp_breakpoint>: New.
5950 <base>: Remove.
5951 (new_breakpoint_from_type): Remove casts.
5952 (watchpoint_in_thread_scope): Remove reference to base field.
5953 (watchpoint_del_at_next_stop): Likewise.
5954 (update_watchpoint): Likewise.
5955 (watchpoint_check): Likewise.
5956 (bpstat_check_watchpoint): Likewise.
5957 (set_longjmp_breakpoint): Likewise.
5958 (struct fork_catchpoint): Inherit from breakpoint.
5959 <base>: Remove.
5960 (struct solib_catchpoint): Inherit from breakpoint.
5961 <~solib_catchpoint>: New.
5962 <base>: Remove.
5963 (dtor_catch_solib): Change to ...
5964 (solib_catchpoint::~solib_catchpoint): ... this.
5965 (breakpoint_hit_catch_solib): Remove reference to base field.
5966 (add_solib_catchpoint): Likewise.
5967 (create_fork_vfork_event_catchpoint): Likewise.
5968 (struct exec_catchpoint): Inherit from breakpoint.
5969 <~exec_catchpoint>: New.
5970 <base>: Remove.
5971 (dtor_catch_exec): Change to ...
5972 (exec_catchpoint::~exec_catchpoint): ... this.
5973 (dtor_watchpoint): Change to ...
5974 (watchpoint::~watchpoint): ... this.
5975 (watch_command_1): Remove reference to base field.
5976 (catch_exec_command_1): Likewise.
5977 (base_breakpoint_dtor): Change to ...
5978 (breakpoint::~breakpoint): ... this.
5979 (base_breakpoint_ops): Remove dtor field value.
5980 (longjmp_bkpt_dtor): Change to ...
5981 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5982 (strace_marker_create_breakpoints_sal): Remove reference to base
5983 field.
5984 (delete_breakpoint): Don't manually call breakpoint destructor.
5985 (create_tracepoint_from_upload): Remove reference to base field.
5986 (trace_pass_set_count): Likewise.
5987 (initialize_breakpoint_ops): Don't initialize
5988 momentary_breakpoint_ops, don't set dtors.
5989 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5990 <~ada_catchpoint>: New.
5991 <base>: Remove.
5992 (create_excep_cond_exprs): Remove reference to base field.
5993 (dtor_exception): Change to ...
5994 (ada_catchpoint::~ada_catchpoint): ... this.
5995 (dtor_catch_exception): Remove.
5996 (dtor_catch_exception_unhandled): Remove.
5997 (dtor_catch_assert): Remove.
5998 (create_ada_exception_catchpoint): Remove reference to base
5999 field.
6000 (initialize_ada_catchpoint_ops): Don't set dtors.
6001 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6002 breakpoint.
6003 <~signal_catchpoint>: New.
6004 <base>: Remove.
6005 (signal_catchpoint_dtor): Change to ...
6006 (signal_catchpoint::~signal_catchpoint): ... this.
6007 (create_signal_catchpoint): Remove reference to base field.
6008 (initialize_signal_catchpoint_ops): Don't set dtor.
6009 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6010 from breakpoint.
6011 <~syscall_catchpoint>: New.
6012 <base>: Remove.
6013 (dtor_catch_syscall): Change to ...
6014 (syscall_catchpoint::~syscall_catchpoint): ... this.
6015 (create_syscall_event_catchpoint): Remove reference to base
6016 field.
6017 (initialize_syscall_catchpoint_ops): Don't set dtor.
6018 * break-catch-throw.c (struct exception_catchpoint): Inherit
6019 from breakpoint.
6020 <~exception_catchpoint>: New.
6021 <base>: Remove.
6022 (dtor_exception_catchpoint): Change to ...
6023 (exception_catchpoint::~exception_catchpoint): ... this.
6024 (handle_gnu_v3_exceptions): Remove reference to base field.
6025 (initialize_throw_catchpoint_ops): Don't set dtor.
6026 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6027 field.
6028 * remote.c (remote_get_tracepoint_status): Likewise.
6029 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6030 * tracefile.c (tracefile_fetch_registers): Likewise.
6031 * tracepoint.c (actions_command): Likewise.
6032 (validate_actionline): Likewise.
6033 (tfind_1): Likewise.
6034 (get_traceframe_location): Likewise.
6035 (find_matching_tracepoint_location): Likewise.
6036 (parse_tracepoint_status): Likewise.
6037 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6038
3b0871f4
SM
60392017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6040
6041 * breakpoint.c (struct longjmp_breakpoint): New struct.
6042 (is_tracepoint_type): Change return type to bool.
6043 (is_longjmp_type): New function.
6044 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6045 (set_raw_breakpoint_without_location): Use
6046 new_breakpoint_from_type.
6047 (set_raw_breakpoint): Likewise.
6048
a5e364af
SM
60492017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6050
6051 * breakpoint.c (new_breakpoint_from_type): New function.
6052 (create_breakpoint_sal): Use new_breakpoint_from_type and
6053 unique_ptr.
6054 (create_breakpoint): Likewise.
6055
ae3b3f34
SM
60562017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6057
6058 * memattr.c (mem_info_command): Rename to ...
6059 (info_mem_command): ... this.
6060 (mem_enable_command): Rename to ...
6061 (enable_mem_command): ... this.
6062 (mem_disable_command): Rename to ...
6063 (disable_mem_command): ... this.
6064 (mem_delete_command): Rename to ...
6065 (delete_mem_command): ... this.
6066 (_initialize_mem): Adjust function names.
6067
13ace077
MM
60682017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6069
6070 * btrace.c (handle_pt_insn_events): New.
6071 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6072 STATUS. Split into this and ...
6073 (handle_pt_insn_event_flags): ... this.
6074
c56ccc05
MM
60752017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6076
6077 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6078 and struct pt_insn.resynced.
6079 * configure: Regenerated.
6080 * config.in: Regenerated.
6081
08c3f6d2
TW
60822017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6083
6084 * btrace.c (ftrace_find_call_by_number): New function.
6085 (ftrace_new_function): Store objects, not pointers.
6086 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6087 ftrace_new_gap, ftrace_update_function,
6088 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6089 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6090 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6091 btrace_ends_with_single_insn, btrace_call_get): Account for
6092 btrace_thread_info::functions now storing objects.
6093 * btrace.h (struct btrace_thread_info): Add constructor.
6094 (struct btrace_thread_info) <functions>: Make std::vector.
6095 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6096 Initialize with default values.
6097 * record-btrace.c (record_btrace_frame_sniffer): Account for
6098 btrace_thread_info::functions now storing objects.
6099
8ffd39f2
TW
61002017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6101
6102 * btrace.c: Remove typedef bfun_s.
6103 (ftrace_new_gap): Directly add gaps to the list of gaps.
6104 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6105 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6106 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6107 instead of gdb VEC.
6108
4aeb0dfc
TW
61092017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6110
6111 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6112 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6113 with btrace_thread_info::next_segment and
6114 btrace_thread_info::prev_segment.
6115 * btrace.h: Remove struct btrace_func_link.
6116 (struct btrace_function): Replace pair of function segment pointers
6117 with pair of indices.
6118 * python/py-record-btrace.c (btpy_call_prev_sibling,
6119 btpy_call_next_sibling): Replace references to
6120 btrace_thread_info::segment with btrace_thread_info::next_segment and
6121 btrace_thread_info::prev_segment.
6122 * record-btrace.c (record_btrace_frame_this_id): Use
6123 btrace_find_call_by_number.
6124
eb8f2b9c
TW
61252017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6126
6127 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6128 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6129 btrace_insn_next, btrace_insn_prev): Remove references to
6130 btrace_thread_info::flow.
6131 * btrace.h (struct btrace_function): Remove FLOW.
6132
42bfe59e
TW
61332017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6134
6135 * btrace.c (ftrace_find_call_by_number): New function.
6136 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6137 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6138 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6139 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6140 index.
6141 * btrace.h (struct btrace_function): Turn UP into an index.
6142 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6143 as an index.
6144 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6145 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6146 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6147
b54b03bd
TW
61482017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6149
6150 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6151 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6152 ftrace_update_function, ftrace_compute_global_level_offset,
6153 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6154 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6155 btrace_insn_end, btrace_is_empty): Remove references to
6156 btrace_thread_info::begin and btrace_thread_info::end.
6157 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6158 (struct btrace_thread_info) <functions>: Adjust comment.
6159 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6160 btrace_thread_info::begin.
6161
8286623c
TW
61622017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6163
6164 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6165 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6166 ftrace_update_function): Remove arguments that implicitly were always
6167 BTINFO->END.
6168 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6169 Don't pass BTINFO->END.
6170
a0f1b963
TW
61712017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6172
6173 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6174 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6175 btrace_find_insn_by_number): Replace function segment pointer with
6176 index.
6177 (btrace_insn_cmp): Simplify.
6178 * btrace.h: (struct btrace_insn_iterator) Rename index to
6179 insn_index. Replace function segment pointer with index into function
6180 segment vector.
6181 * record-btrace.c (record_btrace_call_history): Replace function
6182 segment pointer use with index.
6183 (record_btrace_frame_sniffer): Retrieve function call segment through
6184 vector.
6185 (record_btrace_set_replay): Remove defunc't safety check.
6186
f158f208
TW
61872017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6188
6189 * btrace.c (btrace_ends_with_single_insn): New function.
6190 (btrace_call_get, btrace_call_number, btrace_call_begin,
6191 btrace_call_end, btrace_call_next, btrace_call_prev,
6192 btrace_find_call_by_number): Use index into call segment vector
6193 instead of pointer.
6194 (btrace_call_cmp): Simplify.
6195 * btrace.h (struct btrace_call_iterator): Replace function call segment
6196 pointer with index into vector.
6197 * record-btrace.c (record_btrace_call_history): Use index instead of
6198 pointer.
6199
521103fd
TW
62002017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6201
6202 * btrace.c (btrace_insn_begin, btrace_insn_end,
6203 btrace_find_insn_by_number): Add btinfo to iterator.
6204 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6205
17b89b34
TW
62062017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6207
6208 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6209 and save pointers directly.
6210 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6211 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6212 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6213 changed signature of functions.
6214 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6215 (btrace_fetch): Remove code that adds btrace_function pointers to
6216 vector of btrace_functions.
6217 (btrace_clear): Simplify freeing vector of btrace_functions.
6218
2b51eddc
TW
62192017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6220
6221 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6222 Replace VEC_* with std::vector functions.
6223 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6224 (struct btrace_thread_info)<functions>: Change type to std::vector.
6225
db6be0d5
SM
62262017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6227
6228 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6229 "Removed targets and native configurations" up. Merge duplicate
6230 "New commands" sub-sections. Add "New options" sub-sections.
6231
b057297a
AH
62322017-05-26 Alan Hayward <alan.hayward@arm.com>
6233
6234 * defs.h (copy_integer_to_size): New declaration.
6235 * findvar.c (copy_integer_to_size): New function.
6236 (do_cint_test): New selftest function.
6237 (copy_integer_to_size_test): Likewise.
6238 (_initialize_findvar): Likewise.
6239 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6240 (mips_fbsd_collect_reg): Use raw_collect_integer.
6241 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6242 (mips64_fill_gregset): Use raw_collect_integer
6243 (mips64_fill_fpregset): Use raw_supply_integer.
6244 * regcache.c (regcache::raw_supply_integer): New function.
6245 (regcache::raw_collect_integer): Likewise.
6246 * regcache.h: (regcache::raw_supply_integer): New declaration.
6247 (regcache::raw_collect_integer): Likewise.
6248
b77b02a5
YQ
62492017-05-24 Yao Qi <yao.qi@linaro.org>
6250
6251 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6252 (COMMON_OBS): Add gdbarch-selftests.o.
6253 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6254 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6255 * gdbarch-selftests.c: New file.
6256 * regcache.h (regcache) <~regcache>: Mark it virtual if
6257 GDB_SELF_TEST.
6258 <raw_write>: Likewise.
6259
e521e87e
YQ
62602017-05-24 Yao Qi <yao.qi@linaro.org>
6261
6262 * regcache.c (current_regcache): Change it to
6263 regcache::current_regcache.
6264 (regcache_observer_target_changed): Update.
6265 (regcache_thread_ptid_changed): Make it a regcache static
6266 method.
6267 (regcache_thread_ptid_changed): Update.
6268 (class regcache_access): New.
6269 (current_regcache_test): Update.
6270 (_initialize_regcache): Update.
6271 * regcache.h: Include forward_list.
6272 (regcache): Declare regcache_thread_ptid_changed and declare
6273 registers_changed_ptid as friend.
6274
d8e07dda
YQ
62752017-05-24 Yao Qi <yao.qi@linaro.org>
6276
6277 * i387-tdep.c (i387_register_to_value): Use register_size
6278 instead of TYPE_LENGTH.
6279 * m68k-tdep.c (m68k_register_to_value): Likewise.
6280
8c8f9122
YQ
62812017-05-24 Yao Qi <yao.qi@linaro.org>
6282
6283 * i387-tdep.c (i387_convert_register_p): Return false if type
6284 code isn't TYPE_CODE_FLT.
6285
68fce50f
YQ
62862017-05-24 Yao Qi <yao.qi@linaro.org>
6287
6288 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6289 length is 4.
6290 (alpha_register_to_value): Remove type length check.
6291 (alpha_value_to_register): Likewise.
6292
88954b49
YQ
62932017-05-24 Yao Qi <yao.qi@linaro.org>
6294
6295 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6296 TYPE_CODE_FLT.
6297
e3ec9b69
YQ
62982017-05-24 Yao Qi <yao.qi@linaro.org>
6299
6300 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6301 TYPE_CODE_FLT or not.
6302
cdd238da
YQ
63032017-05-24 Yao Qi <yao.qi@linaro.org>
6304
6305 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6306 * avr-tdep.c (avr_gdbarch_init): Likewise.
6307 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6308 * cris-tdep.c (cris_gdbarch_init): Likewise.
6309 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6310 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6311 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6312 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6313 * mep-tdep.c (mep_gdbarch_init): Likewise.
6314 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6315 * mips-tdep.c (mips_gdbarch_init): Likewise.
6316 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6317 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6318 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6319 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6320 * v850-tdep.c (v850_gdbarch_init): Likewise.
6321
7a3929c4
YQ
63222017-05-24 Yao Qi <yao.qi@linaro.org>
6323
6324 * selftest-arch.c (tests_with_arch): Call registers_changed
6325 and reinit_frame_cache.
6326 * selftest.c (run_self_tests): Likewise.
6327
f4985dba
YQ
63282017-05-24 Yao Qi <yao.qi@linaro.org>
6329
6330 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6331 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6332
ab20fa4a
YQ
63332017-05-24 Yao Qi <yao.qi@linaro.org>
6334
6335 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6336 set_gdbarch_print_insn.
6337
f532ab94
YQ
63382017-05-24 Yao Qi <yao.qi@linaro.org>
6339
6340 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6341 set_gdbarch_print_insn.
6342
39503f82
YQ
63432017-05-24 Yao Qi <yao.qi@linaro.org>
6344
6345 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6346 set_gdbarch_print_insn.
6347 * arc-tdep.c (arc_gdbarch_init): Likewise.
6348 * arch-utils.c: include dis-asm.h.
6349 (default_print_insn): New function.
6350 * arch-utils.h (default_print_insn): Declare.
6351 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6352 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6353 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6354 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6355 * frv-tdep.c (frv_gdbarch_init): Likewise.
6356 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6357 * gdbarch.sh (print_insn): Use default_print_insn.
6358 * gdbarch.c: Regenerated.
6359 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6360 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6361 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6362 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6363 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6364 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6365 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6366 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6367 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6368 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6369 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6370 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6371 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6372 * mt-tdep.c (mt_gdbarch_init): Likewise.
6373 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6374 * nios2-tdep.c (nios2_print_insn): Remove.
6375 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6376 * rx-tdep.c (rx_gdbarch_init): Likewise.
6377 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6378 * score-tdep.c (score_print_insn): Remove.
6379 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6380 * sh-tdep.c (sh_gdbarch_init): Likewise.
6381 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6382 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6383 * tic6x-tdep.c (tic6x_print_insn): Remove.
6384 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6385 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6386 * v850-tdep.c (v850_gdbarch_init): Likewise.
6387 * vax-tdep.c (vax_gdbarch_init): Likewise.
6388 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6389 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6390
f7241d4f
JB
63912017-05-23 John Baldwin <jhb@FreeBSD.org>
6392
6393 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6394 (MIPS_FP0_REGNUM): Remove.
6395 (MIPS_FSR_REGNUM): Remove.
6396 (mips_fbsd_supply_fpregs): Use mips_regnum.
6397 (mips_fbsd_supply_gregs): Likewise.
6398 (mips_fbsd_collect_fpregs): Likewise.
6399 (mips_fbsd_collect_gregs): Likewise.
6400
d489d81d
JB
64012017-05-23 John Baldwin <jhb@FreeBSD.org>
6402
6403 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6404 (getpfpregs_supplies): New function.
6405 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6406 getfpregs_supplies.
6407 (mips_fbsd_store_inferior_registers): Likewise.
6408
e11b3cdc
PA
64092017-05-22 Pedro Alves <palves@redhat.com>
6410
6411 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6412 maintainer.
6413
0f068fb5
AH
64142017-05-22 Alan Hayward <alan.hayward@arm.com>
6415
6416 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6417 (store_register): Likewise.
6418 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6419 (get_decimal_float_return_value): Likewise.
6420 (do_ppc_sysv_return_value): Likewise.
6421 (ppc64_sysv_abi_push_integer): Likewise.
6422 (ppc64_sysv_abi_push_freg): Likewise.
6423 (ppc64_sysv_abi_return_value_base): Likewise.
6424 (ppc64_sysv_abi_return_value): Likewise.
6425 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6426 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6427 * rs6000-nat.c: Likewise.
6428 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6429 (rs6000_value_to_register): Likewise.
6430 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6431
e6cf65f2
TT
64322017-05-21 Tom Tromey <tom@tromey.com>
6433
6434 PR rust/21466:
6435 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6436 arrays as "[T]", not "[T; ]".
6437
43cc5389
TT
64382017-05-19 Tom Tromey <tom@tromey.com>
6439
6440 PR rust/21484:
6441 * rust-lang.c (exp_descriptor_rust): New function.
6442 (rust_language_defn): Use it.
6443 * p-lang.c (pascal_language_defn): Update.
6444 * opencl-lang.c (opencl_language_defn): Update.
6445 * objc-lang.c (objc_language_defn): Update.
6446 * m2-lang.c (m2_language_defn): Update.
6447 * language.h (struct language_defn)
6448 <la_watch_location_expression>: New member.
6449 * language.c (unknown_language_defn, auto_language_defn)
6450 (local_language_defn): Update.
6451 * go-lang.c (go_language_defn): Update.
6452 * f-lang.c (f_language_defn): Update.
6453 * d-lang.c (d_language_defn): Update.
6454 * c-lang.h (c_watch_location_expression): Declare.
6455 * c-lang.c (c_watch_location_expression): New function.
6456 (c_language_defn, cplus_language_defn, asm_language_defn)
6457 (minimal_language_defn): Use it.
6458 * breakpoint.c (watch_command_1): Call
6459 la_watch_location_expression.
6460 * ada-lang.c (ada_language_defn): Update.
6461
7a6e7fcc
RO
64622017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6463
6e7e1744
RO
6464 PR tui/21482
6465 * gdb_curses.h (NOMACROS): Define.
6466 (NCURSES_NOMACROS): Define.
6467
64682017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6469
6470 PR tui/21482
7a6e7fcc
RO
6471 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6472 arg to char *.
6473 * tui/tui-wingeneral.c (box_win): Likewise.
6474 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6475 (tui_show_source_line): Likewise.
6476 (tui_show_exec_info_content): Likewise.
6477
1933fd8e
VM
64782017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6479
6480 * sparc-tdep.c (sparc_structure_return_p)
6481 (sparc_arg_on_registers_p): New functions.
6482 (sparc32_store_arguments): Use them.
6483 * sparc64-tdep.c (sparc64_16_byte_align_p)
6484 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6485 Handle TYPE_CODE_ARRAY.
6486
21873064
YQ
64872017-05-17 Yao Qi <yao.qi@linaro.org>
6488
6489 * cli/cli-decode.c (add_alias_cmd): New function.
6490 * command.h (add_alias_cmd): Declare.
6491 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6492 instead call add_alias_cmd.
6493
2b351b19
PA
64942017-05-17 Pedro Alves <palves@redhat.com>
6495
6496 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6497 (nat_makefile_frag): ... this. All references updated.
6498 * configure.ac: Likewise.
6499 * configure.nat: Likewise. Enhance comments.
6500 * configure: Regenerate.
6501
5f2ad7a3
RO
65022017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6503
6504 * procfs.c (procfs_create_inferior): Change prototype to match
6505 definition.
6506
adf3dde5
EZ
65072017-05-13 Eli Zaretskii <eliz@gnu.org>
6508
6509 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6510 C++ compiler warning.
6511
6830f270
TT
65122017-05-12 Tom Tromey <tom@tromey.com>
6513
6514 PR rust/21483:
6515 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6516 recurse, just call value_struct_elt directly.
6517
68f2f2e3
TT
65182017-05-12 Tom Tromey <tom@tromey.com>
6519
6520 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6521 OP_RUST_ARRAY>: Fix.
6522
256afbc2
TT
65232017-05-12 Tom Tromey <tom@tromey.com>
6524
6525 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6526
94bb8dfe
YQ
65272017-05-09 Yao Qi <yao.qi@linaro.org>
6528
6529 * regcache.c: Include <forward_list>.
6530 (struct regcache_list): Remove.
6531 (current_regcache): Update.
6532 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6533 (regcache_thread_ptid_changed): Likewise.
6534 (registers_changed_ptid): Likewise.
6535 (current_regcache_size): Likewise.
6536
8248946c
YQ
65372017-05-09 Yao Qi <yao.qi@linaro.org>
6538
6539 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6540 (current_regcache_size): New function.
6541 (current_regcache_test): New function.
6542 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6543
313c5961
AH
65442017-05-08 Alan Hayward <alan.hayward@arm.com>
6545
6546 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6547 (print_gp_register_row): Use get_frame_register_value.
6548
27bfc1d1
AH
65492017-05-08 Alan Hayward <alan.hayward@arm.com>
6550
6551 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6552 (mips_supply_fpregset): Likewise.
6553 (mips64_supply_gregset): Likewise.
6554
146e6c5c
AH
65552017-05-08 Alan Hayward <alan.hayward@arm.com>
6556
6557 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6558 regcache->raw_supply_zeroed.
6559
e50f25ec
SDJ
65602017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6561
6562 * configure.nat: Rearrange 'case' statements to match
6563 host before cpu.
6564
21ea5acd
SDJ
65652017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6566
6567 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6568 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6569 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6570 "@nat_extra_makefile_frag@".
6571 (Makefile): Remove dependency on "@frags@".
6572 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6573 (data-directory/Makefile): Likewise.
6574 * config/aarch64/linux.mh: Deleted; moved contents to
6575 "gdb/configure.nat".
6576 * config/alpha/alpha-linux.mh: Likewise.
6577 * config/alpha/nbsd.mh: Likewise.
6578 * config/arm/linux.mh: Likewise.
6579 * config/arm/nbsdelf.mh: Likewise.
6580 * config/i386/cygwin.mh: Likewise.
6581 * config/i386/cygwin64.mh: Likewise.
6582 * config/i386/darwin.mh: Likewise.
6583 * config/i386/fbsd.mh: Likewise.
6584 * config/i386/fbsd64.mh: Likewise.
6585 * config/i386/go32.mh: Likewise.
6586 * config/i386/i386gnu.mh: Likewise.
6587 * config/i386/i386sol2.mh: Likewise.
6588 * config/i386/linux.mh: Likewise.
6589 * config/i386/linux64.mh: Likewise.
6590 * config/i386/mingw.mh: Likewise.
6591 * config/i386/mingw64.mh: Likewise.
6592 * config/i386/nbsd64.mh: Likewise.
6593 * config/i386/nbsdelf.mh: Likewise.
6594 * config/i386/nto.mh: Likewise.
6595 * config/i386/obsd.mh: Likewise.
6596 * config/i386/obsd64.mh: Likewise.
6597 * config/i386/sol2-64.mh: Likewise.
6598 * config/ia64/linux.mh: Likewise.
6599 * config/m32r/linux.mh: Likewise.
6600 * config/m68k/linux.mh: Likewise.
6601 * config/m68k/nbsdelf.mh: Likewise.
6602 * config/m68k/obsd.mh: Likewise.
6603 * config/m88k/obsd.mh: Likewise.
6604 * config/mips/fbsd.mh: Likewise.
6605 * config/mips/linux.mh: Likewise.
6606 * config/mips/nbsd.mh: Likewise.
6607 * config/mips/obsd64.mh: Likewise.
6608 * config/pa/linux.mh: Likewise.
6609 * config/pa/nbsd.mh: Likewise.
6610 * config/pa/obsd.mh: Likewise.
6611 * config/powerpc/aix.mh: Likewise.
6612 * config/powerpc/fbsd.mh: Likewise.
6613 * config/powerpc/linux.mh: Likewise.
6614 * config/powerpc/nbsd.mh: Likewise.
6615 * config/powerpc/obsd.mh: Likewise.
6616 * config/powerpc/ppc64-linux.mh: Likewise.
6617 * config/powerpc/spu-linux.mh: Likewise.
6618 * config/s390/linux.mh: Likewise.
6619 * config/sh/nbsd.mh: Likewise.
6620 * config/sparc/fbsd.mh: Likewise.
6621 * config/sparc/linux.mh: Likewise.
6622 * config/sparc/linux64.mh: Likewise.
6623 * config/sparc/nbsd64.mh: Likewise.
6624 * config/sparc/nbsdelf.mh: Likewise.
6625 * config/sparc/obsd64.mh: Likewise.
6626 * config/sparc/sol2.mh: Likewise.
6627 * config/tilegx/linux.mh: Likewise.
6628 * config/vax/nbsdelf.mh: Likewise.
6629 * config/vax/obsd.mh: Likewise.
6630 * config/xtensa/linux.mh: Likewise.
6631 * config/i386/i386gnu.mn: New file, with excerpts from
6632 "config/i386/i386gnu.mh".
6633 * configure: Regenerate.
6634 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6635 *.mh files under "gdb/config".
6636 * configure.nat: New file, with contents from the
6637 "gdb/config/*/*.mh" files.
6638
7ed1acaf
TW
66392017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6640
6641 * btrace.c (btrace_clear): Free insn vector.
6642
e13cb306
PA
66432017-05-05 Pedro Alves <palves@redhat.com>
6644
6645 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6646 * configure: Regenerate.
6647
5ed8105e
PA
66482017-05-04 Pedro Alves <palves@redhat.com>
6649
6650 * Makefile.in (SFILES): Add progspace-and-thread.c.
6651 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6652 (COMMON_OBS): Add progspace-and-thread.o.
6653 * breakpoint.c: Include "progspace-and-thread.h".
6654 (update_inserted_breakpoint_locations)
6655 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6656 Use scoped_restore_current_pspace_and_thread.
6657 (create_std_terminate_master_breakpoint): Use
6658 scoped_restore_current_program_space.
6659 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6660 (print_breakpoint_location): Use
6661 scoped_restore_current_program_space.
6662 (bp_loc_is_permanent): Use
6663 scoped_restore_current_pspace_and_thread.
6664 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6665 (download_tracepoint_locations): Use
6666 scoped_restore_current_pspace_and_thread.
6667 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6668 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6669 (enum step_over_calls_kind): Moved from inferior.h.
6670 (class scoped_restore_current_thread): New class.
6671 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6672 declaration.
6673 (scoped_restore_current_thread): New class.
6674 * infcmd.c: Include "common/gdb_optional.h".
6675 (continue_1, proceed_after_attach): Use
6676 scoped_restore_current_thread.
6677 (notice_new_inferior): Use scoped_restore_current_thread.
6678 * inferior.c: Include "progspace-and-thread.h".
6679 (restore_inferior, save_current_inferior): Delete.
6680 (add_inferior_command, clone_inferior_command): Use
6681 scoped_restore_current_pspace_and_thread.
6682 * inferior.h (scoped_restore_current_inferior): New class.
6683 * infrun.c: Include "progspace-and-thread.h" and
6684 "common/gdb_optional.h".
6685 (follow_fork_inferior): Use
6686 scoped_restore_current_pspace_and_thread.
6687 (scoped_restore_exited_inferior): New class.
6688 (handle_vfork_child_exec_or_exit): Use
6689 scoped_restore_exited_inferior,
6690 scoped_restore_current_pspace_and_thread,
6691 scoped_restore_current_thread and scoped_restore.
6692 (fetch_inferior_event): Use scoped_restore_current_thread.
6693 * linespec.c (decode_line_full, decode_line_1): Use
6694 scoped_restore_current_program_space.
6695 * mi/mi-main.c: Include "progspace-and-thread.h".
6696 (exec_continue): Use scoped_restore_current_thread.
6697 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6698 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6699 * proc-service.c (ps_pglobal_lookup): Use
6700 scoped_restore_current_program_space.
6701 * progspace-and-thread.c: New file.
6702 * progspace-and-thread.h: New file.
6703 * progspace.c (release_program_space, clone_program_space): Use
6704 scoped_restore_current_program_space.
6705 (restore_program_space, save_current_program_space)
6706 (save_current_space_and_thread): Delete.
6707 (switch_to_program_space_and_thread): Moved to
6708 progspace-and-thread.c.
6709 * progspace.h (save_current_program_space)
6710 (save_current_space_and_thread): Delete declarations.
6711 (scoped_restore_current_program_space): New class.
6712 * remote.c (remote_btrace_maybe_reopen): Use
6713 scoped_restore_current_thread.
6714 * symtab.c: Include "progspace-and-thread.h".
6715 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6716 * thread.c (print_thread_info_1): Use
6717 scoped_restore_current_thread.
6718 (struct current_thread_cleanup): Delete.
6719 (do_restore_current_thread_cleanup)
6720 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6721 (scoped_restore_current_thread::~scoped_restore_current_thread):
6722 ... this new dtor.
6723 (make_cleanup_restore_current_thread): Rename/convert to ...
6724 (scoped_restore_current_thread::scoped_restore_current_thread):
6725 ... this new ctor.
6726 (thread_apply_all_command): Use scoped_restore_current_thread.
6727 (thread_apply_command): Use scoped_restore_current_thread.
6728 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6729 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6730
f6223dbb
PA
67312017-05-04 Pedro Alves <palves@redhat.com>
6732
6733 * thread.c (make_cleanup_restore_current_thread): Move
6734 find_thread_ptid call before the is_stopped call. Assert that the
6735 thread is found. Replace is_stopped call by checking the thread's
6736 state directly. Remove unnecessary NULL-thread check.
6737
3c3ae77e
PA
67382017-05-04 Pedro Alves <palves@redhat.com>
6739
6740 * corelow.c (thread_section_name): New class.
6741 (get_core_register_section, get_core_siginfo): Use it.
6742
45eba0ab
AA
67432017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6744
6745 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6746 (get_core_register_section): Remove xfree of NULL pointer.
6747
f81fdd35
AH
67482017-05-03 Alan Hayward <alan.hayward@arm.com>
6749
6750 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6751 * regcache.c (regcache::raw_supply_zeroed): New function.
6752 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6753
35837774
SM
67542017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6755
6756 * gdbarch.sh: Remove commented out definition of
6757 TARGET_CHAR_BIT.
6758 * gdbarch.h: Re-generate.
6759
c94fee56
SDJ
67602017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6761
6762 * configure: Regenerate.
6763
d17f7b36
SM
67642017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6765
6766 * solib-target.c (solib_target_relocate_section_addresses):
6767 Remove num_section_bases, num_bases, segment_bases variables.
6768
b560ebd6
SM
67692017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6770
6771 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6772
f2f46dfc
SM
67732017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6774
6775 * solib-target.c: Include <vector>
6776 (struct lm_info_target) <~lm_info_target>: Remove.
6777 <segment_bases, section_bases>: Change type to
6778 std::vector<CORE_ADDR>.
6779 (library_list_start_segment, library_list_start_section,
6780 library_list_end_library,
6781 solib_target_relocate_section_addresses): Adjust.
6782
a0ff9e1a
SM
67832017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6784
6785 * gdbarch.sh (software_single_step): Change return type to
6786 std::vector<CORE_ADDR>.
6787 * gdbarch.c, gdbarch.h: Re-generate.
6788 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6789 Adjust.
6790 (arm_deal_with_atomic_sequence_raw): Adjust.
6791 (thumb_get_next_pcs_raw): Adjust.
6792 (arm_get_next_pcs_raw): Adjust.
6793 (arm_get_next_pcs): Adjust.
6794 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6795 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6796 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6797 (alpha_software_single_step): Adjust.
6798 * alpha-tdep.h (alpha_software_single_step): Adjust.
6799 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6800 * arm-tdep.c (arm_software_single_step): Adjust.
6801 (arm_breakpoint_kind_from_current_state): Adjust.
6802 * arm-tdep.h (arm_software_single_step): Adjust.
6803 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6804 * cris-tdep.c (cris_software_single_step): Adjust.
6805 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6806 (micromips_deal_with_atomic_sequence): Adjust.
6807 (deal_with_atomic_sequence): Adjust.
6808 (mips_software_single_step): Adjust.
6809 * mips-tdep.h (mips_software_single_step): Adjust.
6810 * moxie-tdep.c (moxie_software_single_step): Adjust.
6811 * nios2-tdep.c (nios2_software_single_step): Adjust.
6812 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6813 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6814 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6815 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6816 * sparc-tdep.c (sparc_software_single_step): Adjust.
6817 * spu-tdep.c (spu_software_single_step): Adjust.
6818 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6819
ea480a30
SM
68202017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6821
6822 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6823 * gdbarch.h: Re-generate.
6824
d050f7d7
TW
68252017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6826
6827 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6828 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6829 * python/py-instruction.c, python/py-instruction.h: New file.
6830 * python/py-record.c: Add py-instruction.h include.
6831 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6832 gdb.RecordInstruction.
6833 * python/python-internal.h: Add gdbpy_initialize_instruction
6834 declaration.
6835 * python/python.c (do_start_initialization): Add
6836 gdbpy_initialize_instruction.
6837
14f819c8
TW
68382017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6839
6840 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6841 Remove.
6842 (btrace_func_from_recpy_func): New function.
6843 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6844 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6845 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6846 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6847 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6848 Also, use new helper functions.
6849 (btpy_list_item): Use new helper functions.
6850 (recpy_bt_function_call_history): Use new type name.
6851 (btpy_call_getset): Remove.
6852 (gdbpy_initialize_btrace): Remove code to initialize
6853 gdb.BtraceFunctionCall.
6854 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6855 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6856 recpy_bt_func_prev, recpy_bt_func_next): New export.
6857 * python/py-record.c (recpy_func_type): New static object.
6858 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6859 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6860 recpy_func_next): New function.
6861 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6862 (recpy_func_getset): New static object.
6863 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6864 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6865
0ed5da75
TW
68662017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6867
6868 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6869 (btpy_object, btpy_insn_type, btpy_new): Remove.
6870 (btpy_list_object): Use gdb.RecordInstruction type instead of
6871 gdb.BtraceInstruction type.
6872 (btrace_insn_from_recpy_insn): New function.
6873 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6874 btpy_new.
6875 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6876 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6877 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6878 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6879 instead of btpy_object.
6880 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6881 btpy_insn_data, btpy_insn_decode): Rename to ...
6882 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6883 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6884 recpy_bt_insn_decode): This. Also, use new helper functions.
6885 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6886 recpy_insn_type.
6887 (btpy_insn_getset): Remove.
6888 (gdbpy_initialize_btrace): Remove code to initialize
6889 gdb.BtraceInstruction. Use recpy_element_object.
6890 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6891 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6892 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6893 * python/py-record.c (recpy_insn_type): New static object.
6894 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6895 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6896 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6897 New function.
6898 (recpy_insn_getset): New static object.
6899 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6900 * python/py-record.h (recpy_element_object): New typedef.
6901 (recpy_insn_type, recpy_insn_new): New export.
6902
913aeadd
TW
69032017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6904
6905 * py-record-btrace.c (btpy_insn_new): Removed.
6906 (btpy_insn_or_gap_new): New function.
6907 (btpy_insn_error): Removed.
6908 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6909 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6910 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6911 btpy_insn_or_gap_new instead of btpy_insn_new.
6912 (btpy_insn_getset): Remove btpy_insn_error.
6913 * py-record.c (recpy_gap_type): New static object.
6914 (recpy_gap_object): New typedef.
6915 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6916 recpy_gap_reason_string): New function.
6917 (recpy_gap_getset): New static object.
6918 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6919 * py-record.h (recpy_gap_new): New export.
6920
a3be24ad
TW
69212017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6922
6923 * python/py-record.c (recpy_ptid): Remove.
6924 (recpy_record_getset): Remove recpy_ptid.
6925
ae20e79a
TW
69262017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6927
6928 * btrace.c (btrace_fetch): Set inferior_ptid.
6929 * python/py-record-btrace.c: Add "py-record.h" include.
6930 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6931 recpy_bt_end, recpy_bt_instruction_history,
6932 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6933 in gdb.Record object instead of current ptid.
6934 * python/py-record.c: Include new "py-record.h" file.
6935 (recpy_record_object): Moved to py-record.h.
6936 * python/py-record.h: New file.
6937
8d0050ea
TW
69382017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6939
6940 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6941 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6942 indentation.
6943
3f380b50
JB
69442017-05-01 Joel Brobecker <brobecker@adacore.com>
6945
6946 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6947 the past maintainers section.
6948
07495424
YQ
69492017-04-28 Yao Qi <yao.qi@linaro.org>
6950
6951 * infcmd.c (get_return_value): Use regcache ctor, and remove
6952 cleanup.
6953
deb1fa3e
YQ
69542017-04-28 Yao Qi <yao.qi@linaro.org>
6955 Pedro Alves <palves@redhat.com>
6956
6957 * regcache.c (regcache::regcache): New tag dispatch ctor.
6958 (do_cooked_read): Moved above.
6959 (regcache_dup): Use the tag dispatch ctor..
6960 * regcache.h (regcache): Declare ctor, delete copy ctor and
6961 assignment operator, remove friend regcache_dup.
6962
b421c83c
YQ
69632017-04-28 Yao Qi <yao.qi@linaro.org>
6964
6965 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6966 call method save instead of regcache_cpy.
6967 * regcache.h (struct regcache): Make regcache_dup a friend.
6968
ef79d9a3
YQ
69692017-04-28 Yao Qi <yao.qi@linaro.org>
6970
6971 * regcache.c (struct regcache): Move to regcache.h
6972 (regcache::arch): New method.
6973 (regcache_get_ptid): Update.
6974 (get_regcache_arch): Call arch method.
6975 (get_regcache_aspace): Call method aspace.
6976 (register_buffer): Change it to method.
6977 (regcache_save): Change it to regcache::save.
6978 (regcache_restore): Likewise.
6979 (regcache_cpy_no_passthrough): Remove the declaration.
6980 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6981 (regcache_cpy_no_passthrough): Change it to method
6982 cpy_no_passthrough.
6983 (regcache_register_status): Change it to method
6984 get_register_status.
6985 (regcache_invalidate): Change it to method invalidate.
6986 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6987 (regcache_raw_update): Change it to method raw_update.
6988 (regcache_raw_read): Likewise.
6989 (regcache_raw_read_signed): Likewise.
6990 (regcache_raw_read_unsigned): Likewise.
6991 (regcache_raw_write_signed): Likewise.
6992 (regcache_raw_write_unsigned): Likewise.
6993 (regcache_cooked_read): Likewise.
6994 (regcache_cooked_read_value): Likewise.
6995 (regcache_cooked_read_signed): Likewise.
6996 (regcache_cooked_read_unsigned): Likewise.
6997 (regcache_cooked_write_signed): Likewise.
6998 (regcache_cooked_write_unsigned): Likewise.
6999 (regcache_raw_set_cached_value): Likewise.
7000 (regcache_raw_write): Likewise.
7001 (regcache_cooked_write): Likewise.
7002 (regcache_xfer_part): Likewise.
7003 (regcache_raw_read_part): Likewise.
7004 (regcache_raw_write_part): Likewise.
7005 (regcache_cooked_read_part): Likewise.
7006 (regcache_cooked_write_part): Likewise.
7007 (regcache_raw_supply): Likewise.
7008 (regcache_raw_collect): Likewise.
7009 (regcache_transfer_regset): Likewise.
7010 (regcache_supply_regset): Likewise.
7011 (regcache_collect_regset): Likewise.
7012 (regcache_debug_print_register): Likewise.
7013 (enum regcache_dump_what): Move it to regcache.h.
7014 (regcache_dump): Change it to method dump.
7015 * regcache.h (enum regcache_dump_what): New.
7016 (class regcache): New.
7017 * target.c (target_fetch_registers): Call method
7018 debug_print_register.
7019 (target_store_registers): Likewise.
7020
f8fdb78e
SM
70212017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7022
7023 * windows-nat.c (struct lm_info_windows): Initialize field.
7024 (windows_make_so): Allocate lm_info_windows with new.
7025 (windows_free_so): Free lm_info_windows with delete.
7026
9ccbfd7b
SM
70272017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7028
7029 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7030 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7031 cleanup.
7032 (darwin_free_so): Free lm_info_darwin with delete.
7033
76e75227
SM
70342017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7035
7036 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7037 <l_addr_p>: Change type to bool.
7038 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7039 (svr4_free_so): Free lm_info_svr4 with delete.
7040 (svr4_copy_library_list): Replace memcpy with call to copy
7041 constructor.
7042 (library_list_start_library, svr4_default_sos): Allocate
7043 lm_info_svr4 with new.
7044
51046d9e
SM
70452017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7046
7047 * solib-target.c (struct lm_info_target): Add destructor,
7048 initialize fields.
7049 <name>: Change type to std::string.
7050 (library_list_start_library): Allocate lm_info_target with new.
7051 (solib_target_free_library_list): Free lm_info_target with
7052 delete.
7053 (solib_target_current_sos): Adapt to std::string.
7054 (solib_target_free_so): Free lm_info_target with delete.
7055
4023ae76
SM
70562017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7057
7058 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7059 fields.
7060 (frv_current_sos): Allocate lm_info_frv with new.
7061 (frv_relocate_main_executable): Free lm_info_frv with delete,
7062 allocate with new.
7063 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7064
af43057b
SM
70652017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7066
7067 * solib-frv.c (struct lm_info_frv): Fix indentation.
7068
b0911207
SM
70692017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7070
7071 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7072 map field.
7073 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7074 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7075 and allocate with new.
7076 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7077
6c401f72
SM
70782017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7079
7080 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7081 <filename, member_name>: Change type to std::string.
7082 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7083 (library_list_start_library): Allocate lm_info_aix with new.
7084 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7085 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7086 with copy constructor.
7087
d0e449a1
SM
70882017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7089
7090 * solist.h (struct lm_info): Remove.
7091 (struct lm_info_base): New class.
7092 (struct so_list) <lm_info>: Change type to lm_info_base *.
7093 * nto-tdep.c (struct lm_info): Remove.
7094 (lm_addr): Adjust.
7095 * solib-aix.c (struct lm_info): Rename to ...
7096 (struct lm_info_aix): ... this. Extend lm_info_base.
7097 (lm_info_p): Rename to ...
7098 (lm_info_aix_p): ... this, and adjust.
7099 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7100 solib_aix_parse_libraries, library_list_start_library,
7101 solib_aix_free_library_list, solib_aix_parse_libraries,
7102 solib_aix_get_library_list,
7103 solib_aix_relocate_section_addresses, solib_aix_free_so,
7104 solib_aix_get_section_offsets,
7105 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7106 Adjust.
7107 (struct solib_aix_inferior_data) <library_list>: Adjust.
7108 * solib-darwin.c (struct lm_info): Rename to ...
7109 (struct lm_info_darwin): ... this. Extend lm_info_base.
7110 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7111 * solib-dsbt.c (struct lm_info): Rename to ...
7112 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7113 (struct dsbt_info) <main_executable_lm_info): Adjust.
7114 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7115 dsbt_relocate_section_addresses): Adjust.
7116 * solib-frv.c (struct lm_info): Rename to ...
7117 (struct lm_info_frv): ... this. Extend lm_info_base.
7118 (main_executable_lm_info): Adjust.
7119 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7120 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7121 find_canonical_descriptor_in_load_object,
7122 frv_fdpic_find_canonical_descriptor): Adjust.
7123 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7124 to lm_info_svr4.
7125 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7126 svr4_clear_so, svr4_copy_library_list,
7127 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7128 svr4_current_sos, svr4_fetch_objfile_link_map,
7129 solist_update_incremental): Adjust.
7130 * solib-svr4.h (struct lm_info_svr4): Move here from
7131 solib-svr4.c.
7132 * solib-target.c (struct lm_info): Rename to ...
7133 (struct lm_info_target): ... this. Extend lm_info_base.
7134 (lm_info_p): Rename to ...
7135 (lm_info_target_p): ... this.
7136 (solib_target_parse_libraries, library_list_start_segment,
7137 library_list_start_section, library_list_start_library,
7138 library_list_end_library, solib_target_free_library_list,
7139 solib_target_current_sos, solib_target_free_so,
7140 solib_target_relocate_section_addresses): Adjust.
7141 * windows-nat.c (struct lm_info): Rename to ...
7142 (struct lm_info_windows): ... this. Extend lm_info_base.
7143 (windows_make_so, handle_load_dll, handle_unload_dll,
7144 windows_xfer_shared_libraries): Adjust.
7145
434a4023
SM
71462017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7147
7148 * solib-darwin.c (struct darwin_so_list): Remove.
7149 (darwin_current_sos): Allocate an so_list object instead of a
7150 darwin_so_list, separately allocate an lm_info object.
7151 (darwin_free_so): Free lm_info.
7152
428544e8
JB
71532017-04-28 John Baldwin <jhb@FreeBSD.org>
7154
7155 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7156 with fprintf_filtered.
7157
4621115f
YQ
71582017-04-28 Yao Qi <yao.qi@linaro.org>
7159
7160 * regcache.c (regcache::regcache): New function.
7161 (regcache::~regcache): New function.
7162 (regcache_xmalloc_1): Remove.
7163 (regcache_xmalloc): Call new regcache.
7164 (regcache_xfree): Call delete regcache.
7165 (get_thread_arch_aspace_regcache): Call new regcache.
7166
339053c2
YQ
71672017-04-28 Yao Qi <yao.qi@linaro.org>
7168
7169 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7170 lwp instead of ptid_get_lwp.
7171
7974a605
YQ
71722017-04-28 Yao Qi <yao.qi@linaro.org>
7173
7174 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7175 lwp_info instead of getting from inferior_ptid.
7176
e15c3eb4
KS
71772017-04-27 Keith Seitz <keiths@redhat.com>
7178
7179 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7180 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7181 (CV_CONVERSION_BADNESS): Define.
7182 (rank_one_type): Remove overly restrictive rvalue reference
7183 rank checks.
7184 Add cv-qualifier checks and subranks for type equality.
7185 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7186 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7187 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7188
72bc1d24
SM
71892017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7190
7191 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7192 count when creating the object.
7193
55bcecda
UW
71942017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7195 Ulrich Weigand <uweigand@de.ibm.com>
7196
7197 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7198 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7199 is used in AIX.
7200 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7201 (process_xcoff_symbol): Likewise.
7202 (scan_xcoff_symtab): Likewise.
7203
5c99fcf8
AH
72042017-04-26 Alan Hayward <alan.hayward@arm.com>
7205
7206 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7207 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7208 (ia64_access_reg): Use get_frame_register_unsigned.
7209 (ia64_access_rse_reg): Likewise.
7210 (ia64_libunwind_frame_prev_register): Likewise.
7211
b41c5a85
JW
72122017-04-26 Jiong Wang <jiong.wang@arm.com>
7213
7214 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7215 * gdbarch.c: Regenerated.
7216 * gdbarch.h: Regenerated.
7217 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7218 visibility external.
7219 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7220 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7221 (enum cfa_how_kind): Move to ...
7222 (struct dwarf2_frame_state_reg_info): Likewise.
7223 (struct dwarf2_frame_state): Likewise.
7224 * dwarf2-frame.h: ... here.
7225 (dwarf2_frame_state_alloc_regs): New declaration.
7226 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7227 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7228
c185f580
AH
72292017-04-26 Alan Hayward <alan.hayward@arm.com>
7230
7231 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7232 regcache_raw_read_unsigned.
7233 (xtensa_pseudo_register_write): Likewise.
7234
19c45594
AH
72352017-04-26 Alan Hayward <alan.hayward@arm.com>
7236
7237 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7238 (nds32_pseudo_register_write): Likewise.
7239
4658f12e
YQ
72402017-04-25 Yao Qi <yao.qi@linaro.org>
7241
7242 * regcache.c (struct regcache) <readonly_p>: Change its type
7243 to bool.
7244 (regcache_xmalloc_1): Update parameter type and callers update.
7245
d581dda8
YQ
72462017-04-25 Yao Qi <yao.qi@linaro.org>
7247
7248 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7249 set_gdbarch_wchar_bit.
7250 * arm-tdep.c (arm_gdbarch_init): Likewise.
7251
debed3db
PA
72522017-04-25 Pedro Alves <palves@redhat.com>
7253
7254 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7255 (BothAreRelocatable, memcopy, memmove): Don't define.
7256 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7257 macros.
7258
b0b92aeb
PA
72592017-04-25 Pedro Alves <palves@redhat.com>
7260
7261 * common/common-defs.h: Include "common/poison.h".
7262 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7263 and adjust.
7264 * common/poison.h: New file.
7265 * common/traits.h: Include <type_traits>.
7266 (Not, Or, Requires): New, moved from common/function-view.h.
7267
16c4d54a
PA
72682017-04-25 Pedro Alves <palves@redhat.com>
7269
7270 * breakpoint.h (struct breakpoint): In-class initialize all
7271 fields. Make boolean fields "bool".
7272 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7273 memset call and initializations no longer necessary.
7274
b5c36682
PA
72752017-04-25 Pedro Alves <palves@redhat.com>
7276
7277 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7278 reference.
7279 (pt_btrace_insn): New function.
7280 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7281
5625a286
PA
72822017-04-25 Pedro Alves <palves@redhat.com>
7283
7284 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7285 "base" field and inherit from "bp_location" instead. Add
7286 non-default ctor.
7287 (allocate_location_exception): Use new non-default ctor.
7288 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7289 (init_bp_location): Convert to ...
7290 (bp_location::bp_location): ... this new ctor, and remove memset
7291 call.
7292 (base_breakpoint_allocate_location): Use the new non-default ctor.
7293 * breakpoint.h (bp_location): Now a class. Declare default and
7294 non-default ctors. In-class initialize all members.
7295 (init_bp_location): Remove declaration.
7296
23bcc18f
PA
72972017-04-25 Pedro Alves <palves@redhat.com>
7298
7299 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7300 assignment operator.
7301
e1ba3053
YQ
73022017-04-24 Yao Qi <yao.qi@linaro.org>
7303
7304 * doublest.c (convert_doublest_to_floatformat): Call
7305 floatformat_totalsize_bytes.
7306
10f489e5
TT
73072017-04-22 Tom Tromey <tom@tromey.com>
7308
7309 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7310 ui_out_emit_list.
7311 * stack.c (print_frame): Use ui_out_emit_list.
7312 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7313 ui_out_emit_list.
7314 * mi/mi-main.c (print_one_inferior)
7315 (mi_cmd_data_list_register_names)
7316 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7317 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7318 ui_out_emit_list.
7319 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7320 (mi_output_solib_attribs): Use ui_out_emit_list,
7321 ui_out_emit_tuple.
7322 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7323 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7324 (mi_cmd_stack_list_args, list_args_or_locals): Use
7325 ui_out_emit_list.
7326 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7327 * breakpoint.c (print_solib_event, output_thread_groups): Use
7328 ui_out_emit_list.
7329
0092b74d
TT
73302017-04-22 Tom Tromey <tom@tromey.com>
7331
7332 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7333 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7334 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7335
a14a62dd
TT
73362017-04-22 Tom Tromey <tom@tromey.com>
7337
7338 * tracepoint.c (tvariables_info_1)
7339 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7340
46b9c129
TT
73412017-04-22 Tom Tromey <tom@tromey.com>
7342
7343 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7344 annotate_arg_emitter.
7345 * breakpoint.c (print_mention_watchpoint)
7346 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7347 * annotate.h (struct annotate_arg_emitter): New.
7348
2e783024
TT
73492017-04-22 Tom Tromey <tom@tromey.com>
7350
7351 * record-btrace.c (record_btrace_insn_history)
7352 (record_btrace_insn_history_range, record_btrace_call_history)
7353 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7354 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7355 ui_out_emit_tuple.
7356 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7357 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7358 * skip.c (skip_info): Use ui_out_emit_tuple.
7359 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7360 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7361 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7362 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7363 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7364 ui_out_emit_tuple.
7365 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7366 (output_register, mi_cmd_data_read_memory)
7367 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7368 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7369 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7370 Use ui_out_emit_tuple.
7371 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7372 ui_out_emit_tuple.
7373 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7374 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7375 * linux-thread-db.c (info_auto_load_libthread_db): Use
7376 ui_out_emit_tuple.
7377 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7378 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7379 * disasm.c (do_mixed_source_and_assembly_deprecated)
7380 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7381 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7382 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7383 * breakpoint.c (print_one_breakpoint_location)
7384 (print_one_breakpoint): Use ui_out_emit_tuple.
7385 * auto-load.c (print_script, info_auto_load_cmd): Use
7386 ui_out_emit_tuple.
7387 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7388
9be21bb4
SM
73892017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7390
7391 * thread.c (print_thread_info_1): Remove dead code.
7392
0d4c07af
JK
73932017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7394
7395 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7396 GDB_SELF_TEST.
7397 * arm-tdep.c (selftests::arm_record_test): Likewise.
7398
4daf993d
YQ
73992017-04-21 Yao Qi <yao.qi@linaro.org>
7400
7401 * regcache.c (regcache_restore): Remove argument 2. Replace
7402 argument 3 with regcache. Get register status from
7403 src->register_status and get register contents from
7404 register_buffer (src, regnum).
7405 (regcache_cpy): Update.
7406
a6c21d4a
PA
74072017-04-19 Pedro Alves <palves@redhat.com>
7408
7409 * gdbthread.h (thread): Add missing closing parenthesis in
7410 comment.
7411
3a3fd0fd
PA
74122017-04-19 Pedro Alves <palves@redhat.com>
7413
7414 * common/refcounted-object.h: New file.
7415 * gdbthread.h: Include "common/refcounted-object.h".
7416 (thread_info): Inherit from refcounted_object and add comments.
7417 (thread_info::incref, thread_info::decref)
7418 (thread_info::m_refcount): Delete.
7419 (thread_info::deletable): Use the refcounted_object::refcount()
7420 method.
7421 * inferior.c (current_inferior_): Add comment.
7422 (set_current_inferior): Increment/decrement refcounts.
7423 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7424 not-deletable instead of comparing with the current inferior.
7425 (initialize_inferiors): Increment the initial inferior's refcount.
7426 * inferior.h (struct inferior): Forward declare.
7427 Include "common/refcounted-object.h".
7428 (current_inferior, set_current_inferior): Move declaration to
7429 before struct inferior's definition, and fix comment.
7430 (inferior): Inherit from refcounted_object. Add comments.
7431 * thread.c (switch_to_thread_no_regs): Reference the thread's
7432 inferior pointer directly instead of doing a ptid lookup.
7433 (switch_to_no_thread): New function.
7434 (switch_to_thread(thread_info *)): New function, factored out
7435 from ...
7436 (switch_to_thread(ptid_t)): ... this.
7437 (restore_current_thread): Delete.
7438 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7439 fields, and add 'inf' field.
7440 (do_restore_current_thread_cleanup): Check whether old->inf is
7441 alive instead of looking up an inferior by ptid. Use
7442 switch_to_thread and switch_to_no_thread.
7443 (restore_current_thread_cleanup_dtor): Use old->inf directly
7444 instead of lookup up an inferior by id. Decref the inferior.
7445 Don't restore 'removable'.
7446 (make_cleanup_restore_current_thread): Same the inferior pointer
7447 in old, instead of the inferior number. Incref the inferior.
7448 Don't save/clear 'removable'.
7449
9bcb1f16
PA
74502017-04-19 Pedro Alves <palves@redhat.com>
7451
7452 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7453 unittests/scoped_restore-selftests.c.
7454 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7455 * common/scoped_restore.h (scoped_restore_base): Make "class".
7456 (scoped_restore_base::release): New public method.
7457 (scoped_restore_base::scoped_restore_base): New protected ctor.
7458 (scoped_restore_base::m_saved_var): New protected field.
7459 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7460 scoped_restore_base base class instead of m_saved_var directly.
7461 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7462 (scoped_restore_tmpl::scoped_restore_tmpl(const
7463 scoped_restore_tmpl<T>&)): Likewise.
7464 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7465 method.
7466 (scoped_restore_tmpl::saved_var): New method.
7467 (scoped_restore_tmpl::m_saved_var): Delete.
7468 * inferior.h (inferior::detaching): Now a bool.
7469 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7470 cleanup.
7471 * unittests/scoped_restore-selftests.c: New file.
7472
26fcd539
PA
74732017-04-19 Pedro Alves <palves@redhat.com>
7474
7475 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7476 Re-sort in alphabetic order.
7477
fdd243b0
PA
74782017-04-18 Pedro Alves <palves@redhat.com>
7479
7480 * xml-support.c (obstack_xml_printf): Delete.
7481 * xml-support.h (obstack_xml_printf): Delete.
7482
4895cde2
PA
74832017-04-18 Pedro Alves <palves@redhat.com>
7484
7485 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7486 vdebug, verror, body_text, start_element, end_element, name,
7487 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7488 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7489 is_xinclude>: Make private and add m_ prefix.
7490 (gdb_xml_parser::body_text): New method, based on ...
7491 (gdb_xml_body_text): ... this. Adjust.
7492 (gdb_xml_parser::vdebug): New method, based on ...
7493 (gdb_xml_debug): ... this. Adjust.
7494 (gdb_xml_parser::verror): New method, based on ...
7495 (gdb_xml_error): ... this. Adjust.
7496 (gdb_xml_parser::start_element): New method, based on ...
7497 (gdb_xml_start_element): ... this. Adjust.
7498 (gdb_xml_start_element_wrapper): Defer to
7499 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7500 (gdb_xml_parser::end_element): New method, based on ...
7501 (gdb_xml_end_element_wrapper): ... this. Adjust.
7502 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7503 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7504 (gdb_xml_parser::use_dtd): New method, based on ...
7505 (gdb_xml_use_dtd): ... this. Adjust.
7506 (gdb_xml_parser::parse): New method, based on ...
7507 (gdb_xml_parse): ... this. Adjust.
7508 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7509 (xinclude_start_include): Adjust to call the parser's name method.
7510 (xml_xinclude_default, xml_xinclude_start_doctype)
7511 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7512 method.
7513 (xml_process_xincludes): Adjust to call parser methods.
7514 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7515 declarations.
7516
bd8a901f
PA
75172017-04-18 Pedro Alves <palves@redhat.com>
7518
7519 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7520 gdb::optional<std::string>.
7521 * xml-support.c: Include <string>.
7522 (scope_level::scope_level(scope_level &&))
7523 (scope_level::~scope_level): Delete.
7524 (scope_level::body): Now a std::string.
7525 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7526 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7527 parameter.
7528 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7529 (xinclude_parsing_data::output): Now a std::string reference.
7530 (xinclude_start_include): Adjust.
7531 (xml_xinclude_default): Adjust.
7532 (xml_process_xincludes): Add 'output' parameter, and return bool.
7533 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7534 and return bool.
7535 * xml-tdesc.c: Include <unordered_map> and <string>.
7536 (tdesc_xml_cache): Delete.
7537 (tdesc_xml_cache_s): Delete.
7538 (xml_cache): Now an std::unordered_map.
7539 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7540 (target_fetch_description_xml): Change return type to
7541 gdb::optional<std::string>, and adjust.
7542 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7543 (target_fetch_description_xml): Change return type to
7544 gdb::optional<std::string>.
7545
d35d1958
PA
75462017-04-18 Pedro Alves <palves@redhat.com>
7547
7548 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7549 unittests/optional-selftests.c.
7550 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7551 * unittests/optional-selftests.c: New file.
7552 * unittests/optional/assignment/1.cc: New file.
7553 * unittests/optional/assignment/2.cc: New file.
7554 * unittests/optional/assignment/3.cc: New file.
7555 * unittests/optional/assignment/4.cc: New file.
7556 * unittests/optional/assignment/5.cc: New file.
7557 * unittests/optional/assignment/6.cc: New file.
7558 * unittests/optional/assignment/7.cc: New file.
7559 * unittests/optional/cons/copy.cc: New file.
7560 * unittests/optional/cons/default.cc: New file.
7561 * unittests/optional/cons/move.cc: New file.
7562 * unittests/optional/cons/value.cc: New file.
7563 * unittests/optional/in_place.cc: New file.
7564 * unittests/optional/observers/1.cc: New file.
7565 * unittests/optional/observers/2.cc: New file.
7566
22796e97
PA
75672017-04-18 Pedro Alves <palves@redhat.com>
7568
7569 * common/gdb_optional.h: Include common/traits.h.
7570 (in_place_t): New type.
7571 (in_place): New constexpr variable.
7572 (optional::optional): Remove member initialization of
7573 m_instantiated.
7574 (optional::optional(in_place_t...)): New constructor.
7575 (optional::~optional): Use reset.
7576 (optional::optional(const optional&)): New.
7577 (optional::optional(const optional&&)): New.
7578 (optional::optional(T &)): New.
7579 (optional::optional(T &&)): New.
7580 (operator::operator=(const optional &)): New.
7581 (operator::operator=(optional &&)): New.
7582 (operator::operator= (const T &))
7583 (operator::operator= (T &&))
7584 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7585 (operator::reset): New.
7586 (operator::m_instantiated):: Add in-class initializer.
7587 * common/traits.h: Include <type_traits>.
7588 (struct And): New types.
7589
a7fc9b61
PA
75902017-04-18 Pedro Alves <palves@redhat.com>
7591
7592 * xml-support.c: Include <vector>.
7593 (scope_level::scope_level(const gdb_xml_element *))
7594 (scope_level::scope_level(scope_level&&)): New.
7595 (scope_level::~scope_level): New.
7596 (scope_level_s): Delete.
7597 (gdb_xml_parser::scopes): Now a std::vector.
7598 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7599 Use std::vector.
7600 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7601 scope cleanup code.
7602 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7603 of the scopes member. Use std::vector::emplace_back.
7604
010151c9
PA
76052017-04-18 Pedro Alves <palves@redhat.com>
7606
7607 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7608 a bool.
7609 (gdb_xml_end_element): Change type of first parameter.
7610 (gdb_xml_cleanup): Rename to ...
7611 (gdb_xml_parser::~gdb_xml_parser): ... this.
7612 (gdb_xml_create_parser_and_cleanup): Delete with ...
7613 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7614 to this new ctor.
7615 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7616 using gdb_xml_create_parser_and_cleanup.
7617 (xinclude_parsing_data): Add ctor/dtor.
7618 (xml_xinclude_cleanup): Delete.
7619 (xml_process_xincludes): Create a local xinclude_parsing_data
7620 instead of heap-allocating one. Create a local gdb_xml_parser
7621 instead of heap-allocating one with
7622 gdb_xml_create_parser_and_cleanup.
7623
d56060f0
JB
76242017-04-18 John Baldwin <jhb@FreeBSD.org>
7625
7626 PR threads/20743
7627 * fbsd-nat.c (resume_one_thread_cb): Remove.
7628 (resume_all_threads_cb): Remove.
7629 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7630 iterate_over_threads.
7631
305d16a9
JB
76322017-04-17 Joel Brobecker <brobecker@adacore.com>
7633
7634 * NEWS: Create a new section for the next release branch.
7635 Rename the section of the current branch, now that it has
7636 been cut.
7637
8bb57231
JB
76382017-04-17 Joel Brobecker <brobecker@adacore.com>
7639
7640 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7641 * version.in: Bump version to 8.0.50.DATE-git.
7642
096c92dd
SDJ
76432017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7644
7645 PR gdb/21385
7646 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7647 independently of the host, and fix build breakage on Cygwin.
7648
0550c955
PA
76492017-04-13 Pedro Alves <palves@redhat.com>
7650
7651 * inferior.c (free_inferior): Convert to ...
7652 (inferior::~inferior): ... this dtor.
7653 (inferior::inferior): New ctor, factored out from ...
7654 (add_inferior_silent): ... here. Allocate the inferior with a new
7655 expression.
7656 (delete_inferior): Call delete instead of free_inferior.
7657 * inferior.h (gdb_environ, continuation): Forward declare.
7658 (inferior): Now a class. Add in-class initialization to all
7659 members. Make boolean fields bool, except 'detaching'.
7660 (inferior::inferior): New explicit ctor.
7661 (inferior::~inferior): New.
7662
e3d60dfc
PA
76632017-04-13 Pedro Alves <palves@redhat.com>
7664
7665 * inferior.c (init_inferior_list): Delete.
7666 * inferior.h (init_inferior_list): Delete.
7667
5fd69d0a
PA
76682017-04-13 Pedro Alves <palves@redhat.com>
7669
7670 PR threads/13217
7671 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7672 (top level): Call it twice, with different thread sets.
7673
c6609450
PA
76742017-04-13 Pedro Alves <palves@redhat.com>
7675
7676 * thread.c: Include <algorithm>.
7677 (thread_array_cleanup): Delete.
7678 (scoped_inc_dec_ref): New class.
7679 (live_threads_count): New function.
7680 (set_thread_refcount): Delete.
7681 (tp_array_compar_ascending): Now a bool.
7682 (tp_array_compar): Convert to a std::sort comparison function.
7683 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7684 and live_threads_count.
7685
2a00d7ce
PA
76862017-04-13 Pedro Alves <palves@redhat.com>
7687
7688 * infrun.c (follow_fork_inferior): Also switch the current
7689 inferior.
7690
441d7c93
PA
76912017-04-13 Pedro Alves <palves@redhat.com>
7692
7693 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7694 before calling create_internal_breakpoint.
7695
808480f6
PA
76962017-04-13 Pedro Alves <palves@redhat.com>
7697
7698 * fork-child.c (execv_argv): New class.
7699 (breakup_args): Refactored as ...
7700 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7701 Copy arguments to storage and replace separators with NULL
7702 terminators in place.
7703 (escape_bang_in_quoted_argument): Adjust to return bool.
7704 (execv_argv::execv_argv): New ctor.
7705 (execv_argv::init_for_shell): New method, factored out from
7706 fork_inferior. Don't strdup strings into the vector.
7707 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7708 Remove free_vector_argv call.
7709
ad3d022a
YQ
77102017-04-13 Yao Qi <yao.qi@linaro.org>
7711
7712 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7713 tdep->rx_psw_type.
7714
e6ddc3bf
YQ
77152017-04-13 Yao Qi <yao.qi@linaro.org>
7716
7717 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7718 * rx-tdep.c (rx_gdbarch_init): Likewise.
7719
bfb8cf90
PA
77202017-04-13 Pedro Alves <palves@redhat.com>
7721
7722 * breakpoint.h (struct breakpoint): Reindent.
7723
f5336ca5
PA
77242017-04-13 Pedro Alves <palves@redhat.com>
7725
7726 * breakpoint.c (bp_location): Rename to ...
7727 (bp_locations): ... this. All references updated.
7728 (bp_location_count): Rename to ...
7729 (bp_locations_count): ... this. All references updated.
7730 (bp_location_placed_address_before_address_max): Rename to ...
7731 (bp_locations_placed_address_before_address_max): ... this. All
7732 references updated.
7733 (bp_location_shadow_len_after_address_max): Rename to ...
7734 (bp_locations_shadow_len_after_address_max): ... this. All
7735 references updated.
7736 (bp_location_compare_addrs): Rename to ...
7737 (bp_locations_compare_addrs): ... this. All references updated.
7738 (bp_location_compare):Rename to ...
7739 (bp_locations_compare): ... this. All references updated.
7740 (bp_location_target_extensions_update): Rename to ...
7741 (bp_locations_target_extensions_update): ... this. All references
7742 updated.
7743
be628ab8
SDJ
77442017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7745
7746 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7747 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7748 'sgtty.h'.
7749 * common/gdb_termios.h: New file, with parts of "terminal.h".
7750 * inflow.c: Include "gdb_termios.h".
7751 * ser-unix.c: Include "gdb_termios.h".
7752 * terminal.h: Move terminal-related defines to
7753 "common/gdb_termios.h".
7754
8e9e35b1
TT
77552017-04-12 Tom Tromey <tom@tromey.com>
7756
7757 * probe.c (parse_probes): Update.
7758 * location.h (delete_event_location): Don't declare.
7759 (event_location_deleter::operator()): Update.
7760 * location.c (event_location_deleter::operator()): Rename from
7761 delete_event_location.
7762 * linespec.h (linespec_result) <location>: Change type to
7763 event_location_up.
7764 * linespec.c (canonicalize_linespec, event_location_to_sals)
7765 (decode_objc): Update.
7766 (linespec_result): Don't call delete_event_location.
7767 * breakpoint.c (create_breakpoints_sal)
7768 (bkpt_probe_create_sals_from_location)
7769 (strace_marker_create_sals_from_location): Update.
7770
16e802b9
TT
77712017-04-12 Tom Tromey <tom@tromey.com>
7772
7773 * linespec.h (struct linespec_result): Add constructor and
7774 destructor.
7775 (init_linespec_result, destroy_linespec_result)
7776 (make_cleanup_destroy_linespec_result): Don't declare.
7777 * linespec.c (init_linespec_result): Remove.
7778 (linespec_result::~linespec_result): Rename from
7779 destroy_linespec_result. Update.
7780 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7781 Remove.
7782 * breakpoint.c (create_breakpoint, break_range_command)
7783 (decode_location_default): Update.
7784 * ax-gdb.c (agent_command_1): Update.
7785
d28cd78a
TT
77862017-04-12 Tom Tromey <tom@tromey.com>
7787
7788 * remote.c (remote_download_tracepoint): Update.
7789 * python/py-breakpoint.c (bppy_get_location): Update.
7790 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7791 (gdbscm_breakpoint_location): Update.
7792 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7793 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7794 Change type to event_location_up.
7795 * breakpoint.c (create_overlay_event_breakpoint)
7796 (create_longjmp_master_breakpoint)
7797 (create_std_terminate_master_breakpoint)
7798 (create_exception_master_breakpoint)
7799 (breakpoint_event_location_empty_p, print_breakpoint_location)
7800 (print_one_breakpoint_location, create_thread_event_breakpoint)
7801 (init_breakpoint_sal, create_breakpoint)
7802 (print_recreate_ranged_breakpoint, break_range_command)
7803 (init_ada_exception_breakpoint, say_where): Update.
7804 (base_breakpoint_dtor): Don't call delete_event_location.
7805 (bkpt_print_recreate, tracepoint_print_recreate)
7806 (dprintf_print_recreate, update_static_tracepoint)
7807 (breakpoint_re_set_default): Update.
7808
711799d5
TT
78092017-04-12 Tom Tromey <tom@tromey.com>
7810
7811 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7812 type of "to_do". Update.
7813 (compute_stack_depth): Use std::vector.
7814
52d214d3
TT
78152017-04-12 Tom Tromey <tom@tromey.com>
7816
7817 * printcmd.c (find_instruction_backward): Use std::vector.
7818
4c404b8b
TT
78192017-04-12 Tom Tromey <tom@tromey.com>
7820
7821 * symfile.c (objfilep): Remove typedef.
7822 (reread_symbols): Use a std::vector.
7823
156d9eab
TT
78242017-04-12 Tom Tromey <tom@tromey.com>
7825
7826 * mi/mi-main.c (exec_direction_forward): Remove.
7827 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7828 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7829 scoped_restore.
7830 * guile/guile.c (guile_repl_command, guile_command)
7831 (gdbscm_execute_gdb_command): Use scoped_restore.
7832 * go-exp.y (go_parse): Use scoped_restore.
7833 * d-exp.y (d_parse): Use scoped_restore.
7834 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7835 * c-exp.y (c_parse): Use scoped_restore.
7836
4d89769a
TT
78372017-04-12 Tom Tromey <tom@tromey.com>
7838
7839 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7840 (mi_parse): Update return type.
7841 (mi_parse_free): Remove.
7842 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7843 (mi_parse::~mi_parse): Rename from mi_parse_free.
7844 (mi_parse_cleanup): Remove.
7845 (mi_parse): Return a unique_ptr. Use new.
7846 * mi/mi-main.c (mi_execute_command): Update.
7847
4b217cc7
TT
78482017-04-12 Tom Tromey <tom@tromey.com>
7849
7850 * location.c (explicit_location_lex_one): Return a
7851 unique_xmalloc_ptr.
7852 (string_to_explicit_location): Update. Remove cleanups.
7853
59d3651b
TT
78542017-04-12 Tom Tromey <tom@tromey.com>
7855
7856 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7857 (compare_value_and_voffset): Change type. Update.
7858 (compute_vtable_size): Change type of "offset_vec".
7859 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7860 (gnuv3_get_typeid): Remove extraneous declaration.
7861
b24b0d6c
TT
78622017-04-12 Tom Tromey <tom@tromey.com>
7863
7864 * charset.h (wchar_iterator): Fix comment.
7865
80a3b8c5
TT
78662017-04-12 Tom Tromey <tom@tromey.com>
7867
7868 * charset.c (iconv_wrapper): New class.
7869 (cleanup_iconv): Remove.
7870 (convert_between_encodings): Use it.
7871
c83dd867
TT
78722017-04-12 Tom Tromey <tom@tromey.com>
7873
7874 * symfile.h (increment_reading_symtab): Update type.
7875 * symfile.c (decrement_reading_symtab): Remove.
7876 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7877 * psymtab.c (psymtab_to_symtab): Update.
7878 * dwarf2read.c (dw2_instantiate_symtab): Update.
7879
0e8621a0
TT
78802017-04-12 Tom Tromey <tom@tromey.com>
7881
7882 * jit.c (struct jit_reader): Declare separately. Add constructor
7883 and destructor. Change type of "handle".
7884 (loaded_jit_reader): Define separately.
7885 (jit_reader_load): Update. New "new".
7886 (jit_reader_unload_command): Use "delete".
7887 * gdb-dlfcn.h (struct dlclose_deleter): New.
7888 (gdb_dlhandle_up): New typedef.
7889 (gdb_dlopen, gdb_dlsym): Update types.
7890 (gdb_dlclose): Remove.
7891 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7892 (gdb_dlsym): Change type of "handle".
7893 (make_cleanup_dlclose): Remove.
7894 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7895 * compile/compile-c-support.c (load_libcc): Update.
7896
67d89901
TT
78972017-04-12 Tom Tromey <tom@tromey.com>
7898
7899 * symtab.h (find_pcs_for_symtab_line): Change return type.
7900 * symtab.c (find_pcs_for_symtab_line): Change return type.
7901 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7902 type of "vec". Update.
7903 (ltpy_get_pcs_for_line): Update.
7904 * linespec.c (decode_digits_ordinary): Update.
7905
93921405
TT
79062017-04-12 Tom Tromey <tom@tromey.com>
7907
7908 * tracepoint.c (actions_command): Update.
7909 * python/python.c (python_command, python_interactive_command):
7910 Update.
7911 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7912 * guile/guile.c (guile_command): Update.
7913 * defs.h (read_command_lines, read_command_lines_1): Return
7914 command_line_up.
7915 (command_lines_deleter): New struct.
7916 (command_line_up): New typedef.
7917 * compile/compile.c (compile_code_command)
7918 (compile_print_command): Update.
7919 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7920 command_line_up.
7921 (make_cleanup_free_command_lines): Remove.
7922 * cli/cli-script.c (get_command_line, read_command_lines_1)
7923 (copy_command_lines): Return command_line_up.
7924 (while_command, if_command, read_command_lines, define_command)
7925 (document_command): Update.
7926 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7927 Remove.
7928 * breakpoint.h (breakpoint_set_commands): Change type of
7929 "commands".
7930 * breakpoint.c (breakpoint_set_commands): Change type of
7931 "commands". Update.
7932 (do_map_commands_command, update_dprintf_command_list)
7933 (create_tracepoint_from_upload): Update.
7934
ffc2605c
TT
79352017-04-12 Tom Tromey <tom@tromey.com>
7936
7937 * tracepoint.c (scope_info): Update.
7938 * spu-tdep.c (spu_catch_start): Update.
7939 * python/python.c (gdbpy_decode_line): Update.
7940 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7941 * python/py-breakpoint.c (bppy_init): Update.
7942 * probe.c (parse_probes): Update.
7943 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7944 * location.h (event_location_deleter): New struct.
7945 (event_location_up): New typedef.
7946 (new_linespec_location, new_address_location, new_probe_location)
7947 (new_explicit_location, copy_event_location)
7948 (string_to_event_location, string_to_event_location_basic)
7949 (string_to_explicit_location): Update return type.
7950 (make_cleanup_delete_event_location): Remove.
7951 * location.c (new_linespec_location, new_address_location)
7952 (new_probe_location, new_explicit_location, copy_event_location):
7953 Return event_location_up.
7954 (delete_event_location_cleanup)
7955 (make_cleanup_delete_event_location): Remove.
7956 (string_to_explicit_location, string_to_event_location_basic)
7957 (string_to_event_location): Return event_location_up.
7958 * linespec.c (canonicalize_linespec, event_location_to_sals)
7959 (decode_line_with_current_source)
7960 (decode_line_with_last_displayed, decode_objc): Update.
7961 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7962 * completer.c (location_completer): Update.
7963 * cli/cli-cmds.c (edit_command, list_command): Update.
7964 * breakpoint.c (create_overlay_event_breakpoint)
7965 (create_longjmp_master_breakpoint)
7966 (create_std_terminate_master_breakpoint)
7967 (create_exception_master_breakpoint)
7968 (create_thread_event_breakpoint): Update.
7969 (init_breakpoint_sal): Update. Remove some dead code.
7970 (create_breakpoint_sal): Change type of "location". Update.
7971 (create_breakpoints_sal, create_breakpoint, break_command_1)
7972 (dprintf_command, break_range_command, until_break_command)
7973 (init_ada_exception_breakpoint)
7974 (strace_marker_create_sals_from_location)
7975 (update_static_tracepoint, trace_command, ftrace_command)
7976 (strace_command, create_tracepoint_from_upload): Update.
7977 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7978 * ax-gdb.c (agent_command_1): Update.
7979
8f10c932
PA
79802017-04-12 Pedro Alves <palves@redhat.com>
7981
7982 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7983 * configure.tgt: Handle i[34567]86-*-go32* and
7984 i[34567]86-*-msdosdjgpp*.
7985 * i386-tdep.c (i386_svr4_reg_to_regnum):
7986 Make extern.
7987 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7988 i386-go32-tdep.c.
7989 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7990 * i386-go32-tdep.c: New file.
7991 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7992 declarations.
7993
0a31ccfb
SM
79942017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7995
7996 * aix-thread.c (pd_status2str): Change return type to const char *.
7997
e9bb3fbb
PA
79982017-04-12 Pedro Alves <palves@redhat.com>
7999
8000 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8001 calls to set_gdbarch_gnu_triplet_regexp.
8002
53375380
PA
80032017-04-12 Pedro Alves <palves@redhat.com>
8004
8005 PR gdb/21323
8006 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8007 New enum value.
8008 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8009 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8010 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8011 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8012 * gdbarch.h, gdbarch.c: Regenerate.
8013 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8014 gdbarch_wchar_bit and gdbarch_wchar_signed.
8015 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8016 * arm-tdep.c (arm_gdbarch_init): Likewise.
8017 * avr-tdep.c (avr_gdbarch_init): Likewise.
8018 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8019 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8020 * i386-tdep.c (i386_go32_init_abi): Likewise.
8021 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8022 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8023 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8024 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8025 * sh-tdep.c (sh_gdbarch_init): Likewise.
8026 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8027 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8028 * windows-tdep.c (windows_init_abi): Likewise.
8029 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8030
53e710ac
PA
80312017-04-12 Pedro Alves <palves@redhat.com>
8032
8033 PR c++/21323
8034 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8035 cplus_primitive_type_char32_t>: New enum values.
8036 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8037 and cplus_primitive_type_char32_t.
8038 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8039 32, use the archtecture's built-in type for char16_t and char32_t,
8040 respectively. Otherwise, fallback to init_integer_type as before,
8041 but make the type unsigned, and issue a complaint.
8042 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8043
ab0538b8
AH
80442017-04-12 Alan Hayward <alan.hayward@arm.com>
8045
5e0e0422 8046 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
8047 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8048
5430098f
SDJ
80492017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8050
8051 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8052 'const char *'.
8053
7c5ded6a
SDJ
80542017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8055
8056 * common/common-utils.c (free_vector_argv): New function.
8057 * common/common-utils.h: Include <vector>.
8058 (free_vector_argv): New prototype.
8059 * darwin-nat.c (darwin_create_inferior): Rewrite function
8060 prototype in order to constify "exec_file" and accept a
8061 "std::string" for "allargs".
8062 * fork-child.c: Include <vector>.
8063 (breakup_args): Rewrite function, using C++.
8064 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8065 and accept "std::string" for "allargs". Update the code to
8066 calculate "argv" based on "allargs". Update calls to "exec_fun"
8067 and "execvp".
8068 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8069 order to constify "exec_file" and accept a "std::string" for
8070 "allargs".
8071 * go32-nat.c (go32_create_inferior): Likewise.
8072 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8073 * infcmd.c (run_command_1): Constify "exec_file". Use
8074 "std::string" for inferior arguments.
8075 * inferior.h (fork_inferior): Update prototype.
8076 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8077 prototype in order to constify "exec_file" and accept a
8078 "std::string" for "allargs".
8079 * nto-procfs.c (procfs_create_inferior): Likewise.
8080 * procfs.c (procfs_create_inferior): Likewise.
8081 * remote-sim.c (gdbsim_create_inferior): Likewise.
8082 * remote.c (extended_remote_run): Update code to accept
8083 "std::string" as argument.
8084 (extended_remote_create_inferior): Rewrite function prototype in
8085 order to constify "exec_file" and accept a "std::string" for
8086 "allargs".
8087 * rs6000-nat.c (super_create_inferior): Likewise.
8088 (rs6000_create_inferior): Likewise.
8089 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8090 * windows-nat.c (windows_create_inferior): Likewise.
8091
ae0eee42
PA
80922017-04-11 Pedro Alves <palves@redhat.com>
8093
8094 * thread.c: Fix whitespace throughout.
8095
a6acac06
PR
80962017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8097
8098 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8099
64403bd1
AH
81002017-04-11 Alan Hayward <alan.hayward@arm.com>
8101
8102 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8103
a5bef50f
SDJ
81042017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8105
8106 PR gdb/21364
8107 * osdata.c (info_osdata): Check if 'type' is an empty string
8108 instead of NULL.
8109
9295a5a9
PA
81102017-04-10 Pedro Alves <palves@redhat.com>
8111
8112 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8113 (ptid_to_global_thread_id, in_thread_list)
8114 (do_captured_list_thread_ids, set_resumed, set_running)
8115 (set_executing, set_stop_requested, finish_thread_state)
8116 (validate_registers_access, can_access_registers_ptid)
8117 (print_thread_info_1, switch_to_thread)
8118 (do_restore_current_thread_cleanup)
8119 (make_cleanup_restore_current_thread, thread_command)
8120 (thread_name_command): Use operator== instead of ptid_equal.
8121
996812e3
PA
81222017-04-10 Pedro Alves <palves@redhat.com>
8123
8124 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8125 (current_thread_cleanup_chain): Delete.
8126 (restore_current_thread_cleanup_dtor)
8127 (make_cleanup_restore_current_thread): Remove references to
8128 current_thread_cleanup_chain.
8129
845b344f
AH
81302017-04-10 Alan Hayward <alan.hayward@arm.com>
8131
8132 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8133 REG_UNKNOWN.
8134
803bdfe4
YQ
81352017-04-10 Yao Qi <yao.qi@linaro.org>
8136
8137 PR gdb/19942
8138 * gdbthread.h (thread_info::deletable): New method.
8139 (thread_info::incref): New method.
8140 (thread_info::decref): New method.
8141 (thread_info::refcount): Move it to private.
8142 * infrun.c (save_stop_context): Call inc_refcount.
8143 (release_stop_context_cleanup): Likewise.
8144 * thread.c (set_thread_exited): New function.
8145 (init_thread_list): Delete "tp" only it is deletable, otherwise
8146 call set_thread_exited.
8147 (delete_thread_1): Call set_thread_exited.
8148 (current_thread_cleanup) <inferior_pid>: Remove.
8149 <thread>: New field.
8150 (restore_current_thread_ptid_changed): Removed.
8151 (do_restore_current_thread_cleanup): Adjust.
8152 (restore_current_thread_cleanup_dtor): Don't call
8153 find_thread_ptid.
8154 (set_thread_refcount): Use dec_refcount.
8155 (make_cleanup_restore_current_thread): Adjust.
8156 (thread_apply_all_command): Call inc_refcount.
8157 (_initialize_thread): Don't call
8158 observer_attach_thread_ptid_changed.
8159
8c25b497
YQ
81602017-04-10 Yao Qi <yao.qi@linaro.org>
8161
8162 * thread.c (delete_thread_1): Hoist code on marking thread as
8163 exited.
8164
8473b447
SM
81652017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8166
8167 * windows-nat.c (windows_detach): Initialize ptid with
8168 minus_one_ptid.
8169
6670ec13
SM
81702017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8171
8172 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8173
ba2f91bb
AH
81742017-04-07 Alan Hayward <alan.hayward@arm.com>
8175
8176 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8177 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8178 (bfin_pseudo_register_write): Likewise
8179
436252de
SM
81802017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8181
8182 * common/ptid.h (struct ptid): Change to...
8183 (class ptid_t): ... this.
8184 <ptid_t>: New constructors.
8185 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8186 matches>: New methods.
8187 <make_null, make_minus_one>: New static methods.
8188 <pid>: Rename to...
8189 <m_pid>: ...this.
8190 <lwp>: Rename to...
8191 <m_lwp>: ...this.
8192 <tid>: Rename to...
8193 <m_tid>: ...this.
8194 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8195 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8196 as references, move comment to class ptid_t.
8197 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8198 ptid_t static methods.
8199 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8200 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8201 Take ptid arguments as references, implement using ptid_t methods.
8202 * unittests/ptid-selftests.c: New file.
8203 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8204 unittests/ptid-selftests.c.
8205 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8206
0dedf377
TP
82072017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8208
8209 * python/python.c (python_run_simple_file): Cast mode literal to
8210 non-const char pointer as expected by PyFile_FromString.
8211
4e9868d4
SM
82122017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8213
8214 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8215 minus_one_ptid and null_ptid.
8216
9bf2a700
PA
82172017-04-05 Pedro Alves <palves@redhat.com>
8218
8219 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8220 * configure: Regenerate.
8221
a121b7c1
PA
82222017-04-05 Pedro Alves <palves@redhat.com>
8223
8224 * ada-exp.y (yyerror): Constify.
8225 * ada-lang.c (bound_name, get_selections)
8226 (ada_variant_discrim_type)
8227 (ada_variant_discrim_name, ada_value_struct_elt)
8228 (ada_lookup_struct_elt_type, is_unchecked_variant)
8229 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8230 (catch_ada_exception_command_split)
8231 (catch_ada_assert_command_split, catch_assert_command)
8232 (ada_op_name): Constify.
8233 * ada-lang.h (ada_yyerror, get_selections)
8234 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8235 * arc-tdep.c (arc_print_frame_cache): Constify.
8236 * arm-tdep.c (arm_skip_stub): Constify.
8237 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8238 (gen_aggregate_elt_ref): Constify.
8239 * bcache.c (print_bcache_statistics): Constify.
8240 * bcache.h (print_bcache_statistics): Constify.
8241 * break-catch-throw.c (catch_exception_command_1):
8242 * breakpoint.c (struct ep_type_description::description):
8243 Constify.
8244 (add_solib_catchpoint): Constify.
8245 (catch_fork_command_1): Add cast.
8246 (add_catch_command): Constify.
8247 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8248 Constify.
8249 * bsd-uthread.c (bsd_uthread_state): Constify.
8250 * buildsym.c (patch_subfile_names): Constify.
8251 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8252 Constify.
8253 * c-exp.y (yyerror): Constify.
8254 (token::oper): Constify.
8255 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8256 * c-varobj.c (cplus_describe_child): Constify.
8257 * charset.c (find_charset_names): Add cast.
8258 (find_charset_names): Constify array and add const_cast.
8259 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8260 (edit_command): Constify.
8261 * cli/cli-decode.c (lookup_cmd): Constify.
8262 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8263 Constify.
8264 (struct dump_context): Constify.
8265 (add_dump_command, restore_command): Constify.
8266 * cli/cli-script.c (get_command_line): Constify.
8267 * cli/cli-script.h (get_command_line): Constify.
8268 * cli/cli-utils.c (check_for_argument): Constify.
8269 * cli/cli-utils.h (check_for_argument): Constify.
8270 * coff-pe-read.c (struct read_pe_section_data): Constify.
8271 * command.h (lookup_cmd): Constify.
8272 * common/print-utils.c (decimal2str): Constify.
8273 * completer.c (gdb_print_filename): Constify.
8274 * corefile.c (set_gnutarget): Constify.
8275 * cp-name-parser.y (yyerror): Constify.
8276 * cp-valprint.c (cp_print_class_member): Constify.
8277 * cris-tdep.c (cris_register_name, crisv32_register_name):
8278 Constify.
8279 * d-exp.y (yyerror): Constify.
8280 (struct token::oper): Constify.
8281 * d-lang.h (d_yyerror): Constify.
8282 * dbxread.c (struct header_file_location::name): Constify.
8283 (add_old_header_file, add_new_header_file, last_function_name)
8284 (dbx_next_symbol_text, add_bincl_to_list)
8285 (find_corresponding_bincl_psymtab, set_namestring)
8286 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8287 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8288 * defs.h (command_line_input, print_address_symbolic)
8289 (deprecated_readline_begin_hook): Constify.
8290 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8291 Constify.
8292 * event-top.c (handle_line_of_input): Constify and add cast.
8293 * exceptions.c (catch_errors): Constify.
8294 * exceptions.h (catch_errors): Constify.
8295 * expprint.c (print_subexp_standard, op_string, op_name)
8296 (op_name_standard, dump_raw_expression, dump_raw_expression):
8297 * expression.h (op_name, op_string, dump_raw_expression):
8298 Constify.
8299 * f-exp.y (yyerror): Constify.
8300 (struct token::oper): Constify.
8301 (struct f77_boolean_val::name): Constify.
8302 * f-lang.c (f_word_break_characters): Constify.
8303 * f-lang.h (f_yyerror): Constify.
8304 * fork-child.c (fork_inferior): Add cast.
8305 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8306 (new_variant): Constify.
8307 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8308 * gdbarch.c: Regenerate.
8309 * gdbcore.h (set_gnutarget): Constify.
8310 * go-exp.y (yyerror): Constify.
8311 (token::oper): Constify.
8312 * go-lang.h (go_yyerror): Constify.
8313 * go32-nat.c (go32_sysinfo): Constify.
8314 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8315 * guile/scm-cmd.c (cmdscm_function): Constify.
8316 * guile/scm-param.c (pascm_param_value): Constify.
8317 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8318 (h8300sx_register_name): Constify.
8319 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8320 Constify.
8321 * ia64-tdep.c (ia64_register_names): Constify.
8322 * infcmd.c (construct_inferior_arguments): Constify.
8323 (path_command, attach_post_wait): Constify.
8324 * language.c (show_range_command, show_case_command)
8325 (unk_lang_error): Constify.
8326 * language.h (language_defn::la_error)
8327 (language_defn::la_name_of_this): Constify.
8328 * linespec.c (decode_line_2): Constify.
8329 * linux-thread-db.c (thread_db_err_str): Constify.
8330 * lm32-tdep.c (lm32_register_name): Constify.
8331 * m2-exp.y (yyerror): Constify.
8332 * m2-lang.h (m2_yyerror): Constify.
8333 * m32r-tdep.c (m32r_register_names): Constify and make static.
8334 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8335 * m88k-tdep.c (m88k_register_name): Constify.
8336 * macroexp.c (appendmem): Constify.
8337 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8338 (upgrade_type, parse_external, parse_partial_symbols)
8339 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8340 (new_symbol): Constify.
8341 * memattr.c (mem_info_command): Constify.
8342 * mep-tdep.c (register_name_from_keyword): Constify.
8343 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8344 Constify.
8345 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8346 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8347 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8348 cast.
8349 (mi_execute_async_cli_command): Constify.
8350 * mips-tdep.c (mips_register_name): Constify.
8351 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8352 (am33_register_name, am33_2_register_name)
8353 * moxie-tdep.c (moxie_register_names): Constify.
8354 * nat/linux-osdata.c (osdata_type): Constify fields.
8355 * nto-tdep.c (nto_parse_redirection): Constify.
8356 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8357 (lookup_child_selector): Constify.
8358 (objc_methcall::name): Constify.
8359 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8360 (lookup_struct_typedef): Constify.
8361 * objfiles.c (pc_in_section): Constify.
8362 * objfiles.h (pc_in_section): Constify.
8363 * p-exp.y (struct token::oper): Constify.
8364 (yyerror): Constify.
8365 * p-lang.h (pascal_yyerror): Constify.
8366 * parser-defs.h (op_name_standard): Constify.
8367 (op_print::string): Constify.
8368 (exp_descriptor::op_name): Constify.
8369 * printcmd.c (print_address_symbolic): Constify.
8370 * psymtab.c (print_partial_symbols): Constify.
8371 * python/py-breakpoint.c (stop_func): Constify.
8372 (bppy_get_expression): Constify.
8373 * python/py-cmd.c (cmdpy_completer::name): Constify.
8374 (cmdpy_function): Constify.
8375 * python/py-event.c (evpy_add_attribute)
8376 (gdbpy_initialize_event_generic): Constify.
8377 * python/py-event.h (evpy_add_attribute)
8378 (gdbpy_initialize_event_generic): Constify.
8379 * python/py-evts.c (add_new_registry): Constify.
8380 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8381 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8382 * python/py-inferior.c (get_buffer): Add cast.
8383 * python/py-param.c (parm_constant::name): Constify.
8384 * python/py-unwind.c (fprint_frame_id): Constify.
8385 * python/python.c (gdbpy_parameter_value): Constify.
8386 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8387 * remote.c (memory_packet_config::name): Constify.
8388 (show_packet_config_cmd, remote_write_bytes)
8389 (remote_buffer_add_string):
8390 * reverse.c (exec_reverse_once): Constify.
8391 * rs6000-tdep.c (variant::name, variant::description): Constify.
8392 * rust-exp.y (rustyyerror): Constify.
8393 * rust-lang.c (rust_op_name): Constify.
8394 * rust-lang.h (rustyyerror): Constify.
8395 * serial.h (serial_ops::name): Constify.
8396 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8397 (sh_sh3e_register_name, sh_sh2e_register_name)
8398 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8399 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8400 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8401 (sh_sh4al_dsp_register_name): Constify.
8402 * sh64-tdep.c (sh64_register_name): Constify.
8403 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8404 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8405 * stabsread.c (patch_block_stabs, read_type_number)
8406 (ref_map::stabs, ref_add, process_reference)
8407 (symbol_reference_defined, define_symbol, define_symbol)
8408 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8409 (read_one_struct_field, read_struct_fields, read_baseclasses)
8410 (read_tilde_fields, read_struct_type, read_array_type)
8411 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8412 (read_huge_number, read_range_type, read_args, common_block_start)
8413 (find_name_end): Constify.
8414 * stabsread.h (common_block_start, define_symbol)
8415 (process_one_symbol, symbol_reference_defined, ref_add):
8416 * symfile.c (get_section_index, add_symbol_file_command):
8417 * symfile.h (get_section_index): Constify.
8418 * target-descriptions.c (tdesc_type::name): Constify.
8419 (tdesc_free_type): Add cast.
8420 * target.c (find_default_run_target):
8421 (add_deprecated_target_alias, find_default_run_target)
8422 (target_announce_detach): Constify.
8423 (do_option): Constify.
8424 * target.h (add_deprecated_target_alias): Constify.
8425 * thread.c (print_thread_info_1): Constify.
8426 * top.c (deprecated_readline_begin_hook, command_line_input):
8427 Constify.
8428 (init_main): Add casts.
8429 * top.h (handle_line_of_input): Constify.
8430 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8431 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8432 (tfind_command): Rename to ...
8433 (tfind_command_1): ... this and constify.
8434 (tfind_command): New function.
8435 (tfind_end_command, tfind_start_command): Adjust.
8436 (encode_source_string): Constify.
8437 * tracepoint.h (encode_source_string): Constify.
8438 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8439 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8440 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8441 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8442 * tui/tui-win.c (parse_scrolling_args): Constify.
8443 * tui/tui-windata.c (tui_erase_data_content): Constify.
8444 * tui/tui-windata.h (tui_erase_data_content): Constify.
8445 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8446 * tui/tui.c (tui_enable): Add cast.
8447 * utils.c (defaulted_query): Constify.
8448 (init_page_info): Add cast.
8449 (puts_debug, subset_compare): Constify.
8450 * utils.h (subset_compare): Constify.
8451 * varobj.c (varobj_format_string): Constify.
8452 * varobj.h (varobj_format_string): Constify.
8453 * vax-tdep.c (vax_register_name): Constify.
8454 * windows-nat.c (windows_detach): Constify.
8455 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8456 * xml-support.c (gdb_xml_end_element): Constify.
8457 * xml-tdesc.c (tdesc_start_reg): Constify.
8458 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8459 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8460 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8461
995816ba
PA
84622017-04-05 Pedro Alves <palves@redhat.com>
8463
8464 * proc-api.c (struct trans): Constify.
8465 (procfs_note): Constify.
8466 * proc-events.c (struct trans, syscall_table):
8467 * proc-flags.c (struct trans): Constify.
8468 * proc-utils.h (procfs_note): Constify.
8469 * proc-why.c (struct trans): Constify.
8470 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8471 (procfs_detach): Constify.
8472 * sol-thread.c (struct string_map): Constify.
8473 (td_err_string, td_state_string): Constify.
8474
3e83a920
PA
84752017-04-05 Pedro Alves <palves@redhat.com>
8476
8477 * proc-api.c (procfs_filename): Don't initialize
8478 procfs_filename.
8479 (prepare_to_trace): Assume procfs_filename is non-NULL.
8480 (_initialize_proc_api): Give procfs_filename a default value here.
8481
63160a43
PA
84822017-04-05 Pedro Alves <palves@redhat.com>
8483
8484 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8485 'cond_string' parameter.
8486 (extract_exception_regexp): Constify 'string' parameter.
8487 (catch_exception_command_1): Constify.
8488 * breakpoint.c (init_catchpoint)
8489 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8490 parameter.
8491 (ep_parse_optional_if_clause, catch_fork_command_1)
8492 (catch_exec_command_1): Constify.
8493 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8494 parameter.
8495 (ep_parse_optional_if_clause): Constify.
8496 * cli/cli-utils.c (remove_trailing_whitespace)
8497 (check_for_argument): Constify.
8498 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8499 non-const overload.
8500 (check_for_argument): Likewise.
8501
9b2eba3d
PA
85022017-04-05 Pedro Alves <palves@redhat.com>
8503
8504 * event-top.c (command_line_handler): Add cast to execute_command
8505 call.
8506 * record-btrace.c (cmd_record_btrace_bts_start)
8507 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8508 (cmd_record_btrace_start): Add cast to execute_command call.
8509 * record-full.c (record_full_goto_insn):
8510 * record.c (record_start, record_stop): Add cast to
8511 execute_command_to_string calls.
8512 (cmd_record_start): Add cast to execute_command calls.
8513
2adadf51
PA
85142017-04-05 Pedro Alves <palves@redhat.com>
8515
8516 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8517 static inline function.
8518 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8519 array and use gdb_PyArg_ParseTupleAndKeywords.
8520 * python/py-cmd.c (cmdpy_init): Likewise.
8521 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8522 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8523 (infpy_search_memory): Likewise.
8524 * python/py-objfile.c (objfpy_add_separate_debug_file)
8525 (gdbpy_lookup_objfile): Likewise.
8526 * python/py-symbol.c (gdbpy_lookup_symbol)
8527 (gdbpy_lookup_global_symbol): Likewise.
8528 * python/py-type.c (gdbpy_lookup_type): Likewise.
8529 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8530 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8531 Likewise.
8532
0d1f4ceb
PA
85332017-04-05 Pedro Alves <palves@redhat.com>
8534
8535 * python/python-internal.h (gdb_PyGetSetDef): New type.
8536 * python/py-block.c (block_object_getset)
8537 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8538 * python/py-event.c (event_object_getset)
8539 (finish_breakpoint_object_getset): Likewise.
8540 * python/py-inferior.c (inferior_object_getset): Likewise.
8541 * python/py-infthread.c (thread_object_getset): Likewise.
8542 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8543 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8544 * python/py-objfile.c (objfile_getset): Likewise.
8545 * python/py-progspace.c (pspace_getset): Likewise.
8546 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8547 Likewise.
8548 * python/py-record.c (recpy_record_getset): Likewise.
8549 * python/py-symbol.c (symbol_object_getset): Likewise.
8550 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8551 Likewise.
8552 * python/py-type.c (type_object_getset, field_object_getset):
8553 Likewise.
8554 * python/py-value.c (value_object_getset): Likewise.
8555
4d759979
PA
85562017-04-05 Pedro Alves <palves@redhat.com>
8557
8558 * python/python-internal.h (gdb_PyObject_CallMethod)
8559 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8560 New functions.
8561 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8562 (PySys_GetObject, PySys_SetPath): New macros.
8563
fdf9e36f
PA
85642017-04-05 Pedro Alves <palves@redhat.com>
8565
8566 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8567 info_osdata_command.
8568 * osdata.c (info_osdata_command): Rename to ...
8569 (info_osdata): ... this. Constify 'type' parameter, and remove
8570 the 'from_tty' parameter. Accept NULL TYPE.
8571 (info_osdata_command): New function.
8572 * osdata.h (info_osdata_command): Remove declaration.
8573 (info_osdata): New declaration.
8574
9f33b8b7
PA
85752017-04-05 Pedro Alves <palves@redhat.com>
8576
8577 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8578 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8579 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8580 parameter.
8581 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8582 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8583 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8584 parameter.
8585 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8586 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8587 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8588 (mi_cmd_file_list_exec_source_files)
8589 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8590 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8591 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8592 parameter.
8593 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8594 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8595 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8596 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8597 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8598 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8599 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8600 'command' parameter.
8601 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8602 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8603 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8604 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8605 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8606 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8607 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8608 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8609 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8610 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8611 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8612 parameter.
8613 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8614 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8615 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8616 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8617 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8618 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8619 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8620 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8621 (mi_cmd_data_list_changed_registers)
8622 (mi_cmd_data_write_register_values)
8623 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8624 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8625 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8626 (mi_cmd_list_features, mi_cmd_list_target_features)
8627 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8628 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8629 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8630 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8631 (mi_cmd_trace_frame_collected): Constify 'command'
8632 parameter.
8633 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8634 'command' parameter.
8635
67cb5b2d
PA
86362017-04-05 Pedro Alves <palves@redhat.com>
8637
8638 * ada-lang.c (ada_completer_word_break_characters): Now a const
8639 array.
8640 (ada_get_gdb_completer_word_break_characters): Constify.
8641 * completer.c (gdb_completer_command_word_break_characters)
8642 (gdb_completer_file_name_break_characters)
8643 (gdb_completer_quote_characters): Now const arrays.
8644 (get_gdb_completer_quote_characters): Constify.
8645 (set_rl_completer_word_break_characters): New function.
8646 (set_gdb_completion_word_break_characters)
8647 (complete_line_internal): Use it.
8648 * completer.h (get_gdb_completer_quote_characters): Constify.
8649 (set_rl_completer_word_break_characters): Declare.
8650 * f-lang.c (f_word_break_characters): Constify.
8651 * language.c (default_word_break_characters): Constify.
8652 * language.h (language_defn::la_word_break_characters): Constify.
8653 (default_word_break_characters): Constify.
8654 * top.c (init_main): Use set_rl_completer_word_break_characters.
8655
7a114964
PA
86562017-04-05 Pedro Alves <palves@redhat.com>
8657
8658 * aix-thread.c (aix_thread_pid_to_str)
8659 (aix_thread_extra_thread_info): Constify.
8660 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8661 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8662 (bsd_uthread_pid_to_str): Constify.
8663 * corelow.c (core_pid_to_str): Constify.
8664 * darwin-nat.c (darwin_pid_to_str): Constify.
8665 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8666 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8667 Constify.
8668 * gnu-nat.c (gnu_pid_to_str): Constify.
8669 * go32-nat.c (go32_pid_to_str): Constify.
8670 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8671 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8672 * inferior.c (inferior_pid_to_str): Constify.
8673 * linux-nat.c (linux_nat_pid_to_str): Constify.
8674 * linux-tdep.c (linux_core_pid_to_str): Constify.
8675 * linux-thread-db.c (thread_db_pid_to_str)
8676 (thread_db_extra_thread_info): Constify.
8677 * nto-tdep.c (nto_extra_thread_info): Constify.
8678 * nto-tdep.h (nto_extra_thread_info): Constify.
8679 * obsd-nat.c (obsd_pid_to_str): Constify.
8680 * procfs.c (procfs_pid_to_str): Constify.
8681 * ravenscar-thread.c (ravenscar_extra_thread_info)
8682 (ravenscar_pid_to_str): Constify.
8683 * remote-sim.c (gdbsim_pid_to_str): Constify.
8684 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8685 Constify.
8686 * sol-thread.c (solaris_pid_to_str): Constify.
8687 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8688 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8689 * target.c (default_pid_to_str, target_pid_to_str)
8690 (normal_pid_to_str, default_pid_to_str): Constify.
8691 * target.h (target_ops::to_pid_to_str)
8692 (target_ops::to_extra_thread_info): Constify.
8693 (target_pid_to_str, normal_pid_to_str): Constify.
8694 * windows-nat.c (windows_pid_to_str): Constify.
8695 * gdbarch.sh (core_pid_to_str): Constify.
8696 * target-delegates.c: Regenerate.
8697 * gdbarch.h, gdbarch.c: Regenerate.
8698
69bbf465
PA
86992017-04-05 Pedro Alves <palves@redhat.com>
8700
8701 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8702 the memory of the temporary warning_pre_print override.
8703 * utils.c (warning_pre_print): Constify.
8704 * utils.h (warning_pre_print): Constify.
8705
be47f9e8
PA
87062017-04-05 Pedro Alves <palves@redhat.com>
8707
8708 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8709 (shell_command): New function.
8710 (make_command): Use std::string.
8711 (init_cli_cmds): Register shell_command instead of shell_escape.
8712
bde6261a
PA
87132017-04-05 Pedro Alves <palves@redhat.com>
8714
8715 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8716 * tracepoint.c (default_collect): Don't initialize.
8717
b38ef47f
PA
87182017-04-05 Pedro Alves <palves@redhat.com>
8719
8720 * macroexp.c (macro_buffer::shared): Now a bool.
8721 (init_buffer): Update.
8722 (init_shared_buffer): Constify 'addr' parameter.
8723 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8724 casts.
8725
f995bbe8
PA
87262017-04-05 Pedro Alves <palves@redhat.com>
8727
8728 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8729 * disasm.c (set_disassembler_options): Constify local.
8730 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8731
4a596fe2
SDJ
87322017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8733
8734 PR gdb/21352
8735 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8736 option.
8737
2cad08ea
YQ
87382017-04-05 Yao Qi <yao.qi@linaro.org>
8739
8740 * frame.c (frame_unwind_register_unsigned): Call
8741 frame_unwind_register_value.
8742
55a98976
YQ
87432017-04-05 Yao Qi <yao.qi@linaro.org>
8744
8745 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8746 Use gdb_test_multiple, and don't match anchor.
8747
4ac40124
PA
87482017-04-05 Pedro Alves <palves@redhat.com>
8749
8750 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8751 (Write After Approval): Remove Simon Marchi.
8752
c053b654
PA
87532017-04-05 Pedro Alves <palves@redhat.com>
8754
8755 * common/gdb_optional.h (optional::optional): Make constexpr and
8756 initialize m_dummy.
8757
4c7bf4f9
JB
87582017-04-04 John Baldwin <jhb@FreeBSD.org>
8759
8760 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8761 (amd64fbsd_jmp_buf_reg_offset): Remove.
8762 (amd64fbsd_supply_uthread): Remove function.
8763 (amd64fbsd_collect_uthread): Remove function.
8764 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8765 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8766 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8767 (fbsd-nat.c): Update comment.
8768 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8769 (i386fbsd_jmp_buf_reg_offset): Remove.
8770 (i386fbsd_supply_uthread): Remove function.
8771 (i386fbsd_collect_uthread): Remove function.
8772 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8773
1e1a8bef
JB
87742017-04-04 John Baldwin <jhb@FreeBSD.org>
8775
8776 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8777 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8778 * NEWS: Mention that support for FreeBSD/alpha was removed.
8779 * alpha-fbsd-tdep.c: Delete file.
8780 * config/alpha/fbsd.mh: Delete file.
8781 * configure.host: Delete alpha*-*-freebsd* and
8782 alpha*-*-kfreebsd*-gnu.
8783 * configure.tgt: Delete alpha*-*-freebsd* and
8784 alpha*-*-kfreebsd*-gnu.
8785
49907934
JB
87862017-04-04 John Baldwin <jhb@FreeBSD.org>
8787
8788 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8789 amd64bsd_store_inferior_registers): Use ptid from regcache.
8790
6f77053d
PA
87912017-04-04 Pedro Alves <palves@redhat.com>
8792
8793 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8794 data fields, make them private and add "m_" prefixes.
8795 (lnp_state_machine::lnp_state_machine): New ctor.
8796 (record_line, check_line_address, handle_set_discriminator)
8797 (handle_set_address, handle_advance_pc, handle_special_opcode)
8798 (handle_advance_line, handle_set_file, handle_negate_stmt)
8799 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8800 (end_sequence, advance_line): New methods.
8801 (m_gdbarch, m_record_lines_p): New fields.
8802 (lnp_reader_state): Delete.
8803 (dwarf_record_line): Rename to ...
8804 (lnp_state_machine::record_line): ... adjust.
8805 (init_lnp_state_machine): Delete.
8806 (lnp_state_machine::lnp_state_machine): New.
8807 (check_line_address): Rename to ...
8808 (lnp_state_machine::check_line_address): This.
8809 (dwarf_decode_lines_1): Remove reference to "reader_state".
8810 Adjust lnp_state_machine having a non-default ctor. Use bool.
8811 State machine internal state manipulation moved to
8812 lnp_state_machine methods.
8813
9c541725
PA
88142017-04-04 Pedro Alves <palves@redhat.com>
8815
8816 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8817 unittests/offset-type-selftests.c.
8818 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8819 * common/offset-type.h: New file.
8820 * common/preprocessor.h: New file.
8821 * common/traits.h: New file.
8822 * common/valid-expr.h: New file.
8823 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8824 sect_offset and cu_offset strong typedefs throughout.
8825 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8826 typedefs throughout.
8827 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8828 sect_offset and cu_offset strong typedefs throughout.
8829 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8830 typedefs throughout.
8831 * gdbtypes.h: Include "common/offset-type.h".
8832 (cu_offset): Now an offset type (strong typedef) instead of a
8833 struct.
8834 (sect_offset): Likewise.
8835 (union call_site_parameter_u): Rename "param_offset" field to
8836 "param_cu_off".
8837 * unittests/offset-type-selftests.c: New file.
8838
ecfb656c
PA
88392017-04-04 Pedro Alves <palves@redhat.com>
8840
8841 * common/underlying.h: New file.
8842 * dwarf2read.c: Include "common/gdb_optional.h" and
8843 "common/underlying.h".
8844 (dir_index, file_name_index): New types.
8845 (file_entry): Use them.
8846 (file_entry::include): Use to_underlying.
8847 (line_header::add_file_name): Use dir_index.
8848 (read_formatted_entries): Use gdb::optional. Read form before
8849 writting to file_entry.
8850 (dwarf_decode_line_header): Use dir_index.
8851 (lnp_state_machine::current_file): Use to_underlying.
8852 (lnp_state_machine::file): Change type to file_name_index.
8853 (dwarf_record_line): Use to_underlying.
8854 (init_lnp_state_machine): Use file_name_index.
8855 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8856
d194f1fe
PA
88572017-04-04 Pedro Alves <palves@redhat.com>
8858
8859 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8860 operator bool, has_value and get methods.
8861
fff8551c
PA
88622017-04-04 Pedro Alves <palves@redhat.com>
8863
8864 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8865 fields.
8866 (line_header): Initialize all data fields. Change type of
8867 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8868 Change type of include_dirs to std::vector<const char *>. Remove
8869 num_include_dirs, include_dirs_size. Change type of file_names to
8870 std::vector<file_entry>. Remove num_file_names, file_names_size.
8871 (line_header::line_header): New.
8872 (line_header::add_include_dir, line_header::add_file_name): New
8873 methods.
8874 (line_header::include_dir_at): Remove NULL check.
8875 (line_header::file_name_at): Add const overload.
8876 (line_header_up): New unique_ptr typedef.
8877 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8878 std::vector. Remove free_line_header call.
8879 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8880 free_line_header call.
8881 (free_cu_line_header): Delete.
8882 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8883 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8884 Adjust to use std::vector.
8885 (free_line_header): Delete.
8886 (free_line_header_voidp): Use delete.
8887 (add_include_dir): Replace with ...
8888 (line_header::add_include_dir): ... this method. Use std::vector.
8889 (add_file_name): Replace with ...
8890 (line_header::add_file_name): ... this method. Use std::vector.
8891 (add_include_dir_stub): Delete.
8892 (read_formatted_entries): Remove memset.
8893 (dwarf_decode_line_header): Return a line_header_up instead of a
8894 raw pointer. Remove cleanup handling. Pass lambdas to
8895 read_formatted_entries. Adjust to use line_header methods.
8896 (dwarf_decode_lines_1): Adjust to use line_header methods.
8897 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8898 use std::vector.
8899
d62a8ae2
SM
89002017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8901
8902 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8903 instead of struct ptid.
8904
db3a1dc7
AH
89052017-05-04 Alan Hayward <alan.hayward@arm.com>
8906
8907 * frame.c (get_frame_register_bytes): Unwind using value.
8908 (put_frame_register_bytes): Likewise.
8909
b1b45502
IB
89102017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8911
8912 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8913 aggregate-like.
8914
ec13808e
JK
89152017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8916
8917 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8918
12316564
YQ
89192017-03-29 Yao Qi <yao.qi@linaro.org>
8920
8921 * gdbthread.h (struct thread_info): Declare constructor and
8922 destructor. Add some in-class member initializers.
8923 * thread.c (free_thread): Remove.
8924 (init_thread_list): Call delete instead of free_thread.
8925 (new_thread): Call thread_info constructor.
8926 (thread_info::thread_info): New function.
8927 (thread_info::~thread_info): New function.
8928 (delete_thread_1): Call delete instead of free_thread.
8929 (make_cleanup_restore_current_thread): Move tp and frame to
8930 inner block.
8931
fe5f7374
AK
89322017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8933
8934 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8935 (arc_skip_prologue): Likewise.
8936 (arc_make_frame_cache): Likewise.
8937 (arc_pv_get_operand): New function.
8938 (arc_is_in_prologue): Likewise.
8939 (arc_analyze_prologue): Likewise.
8940 (arc_print_frame_cache): Likewise.
8941 (MAX_PROLOGUE_LENGTH): New constant.
8942
eea78757
AK
89432017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8944
8945 * configure.tgt: Add arc-insn.o.
8946 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8947 (dump_arc_instruction_command): New function.
8948 (arc_fprintf_disasm): Likewise.
8949 (arc_disassemble_info): Likewise.
8950 (arc_insn_get_operand_value): Likewise.
8951 (arc_insn_get_operand_value_signed): Likewise.
8952 (arc_insn_get_memory_base_reg): Likewise.
8953 (arc_insn_get_memory_offset): Likewise.
8954 (arc_insn_get_branch_target): Likewise.
8955 (arc_insn_dump): Likewise.
8956 (arc_insn_get_linear_next_pc): Likewise.
8957 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8958 (arc_disassemble_info): Likewise.
8959 (arc_insn_get_branch_target): Likewise.
8960 (arc_insn_get_linear_next_pc): Likewise.
8961 * NEWS: Mention new "maint print arc arc-instruction".
8962
3be78afd
AK
89632017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8964
8965 * arc-tdep (maintenance_print_arc_list): New variable.
8966 (maintenance_print_arc_command): New function.
8967
296ec4fa
AK
89682017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8969
8970 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8971 Add "limm" and "reserved".
8972 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8973 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8974 * arc-tdep.h (arc_regnum): Likewise.
8975
f74f865e
MF
89762017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8977
8978 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8979 for THREADPTR register.
8980 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8981 register.
8982 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8983 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8984 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8985
0d0bf81a
MF
89862017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8987
8988 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8989 registers above gdbarch_num_regs (gdbarch) as privileged in
8990 call0 ABI.
8991
0ce4291e
MF
89922017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8993
8994 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8995 for a single specified register or for all registers in
8996 a0_base..a0_base + C0_NREGS range.
8997 (supply_gregset_reg): Call regcache_raw_supply for a single
8998 specified register or for all registers in a0_base..a0_base +
8999 C0_NREGS range.
9000
c56054f9
MF
90012017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9002
9003 * arch/xtensa.h (C0_NREGS): Add definition.
9004 * xtensa-tdep.c (C0_NREGS): Remove definition.
9005
a4398628
MF
90062017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9007
9008 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9009 Drop xtensa_default_isa initialization.
9010 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9011
8c43009f
PA
90122017-03-27 Pedro Alves <palves@redhat.com>
9013
9014 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9015 (file_entry::include_dir): New method.
9016 (line_header::include_dir_at, line_header::file_name_at): New
9017 methods.
9018 (setup_type_unit_groups, setup_type_unit_groups)
9019 (psymtab_include_file_name): Simplify using the new methods.
9020 (lnp_state_machine) <the_line_header>: New field.
9021 <file>: Add comment.
9022 (lnp_state_machine::current_file): New method.
9023 (dwarf_record_line): Simplify using the new methods.
9024 (init_lnp_state_machine): Initialize the "the_line_header" field.
9025 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9026 Simplify using the new methods.
9027
a7e80b9e
PA
90282017-03-27 Pedro Alves <palves@redhat.com>
9029
9030 * cp-name-parser.y (make_empty): Delete.
9031 (demangler_special, nested_name, ptr_operator, array_indicator)
9032 (direct_declarator, declarator_1): Use fill_comp instead of
9033 make_empty.
9034
21047726
PA
90352017-03-27 Pedro Alves <palves@redhat.com>
9036
9037 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9038 to ATTRIBUTE_PRINTF.
9039 * solib-target.c (library_list_start_list): Print "string" not
9040 "version".
9041 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9042 gdb_xml_error call.
9043
d721ba37
PA
90442017-03-27 Pedro Alves <palves@redhat.com>
9045
9046 * dwarf2read.c (struct file_and_directory): New.
9047 (dwarf2_get_dwz_file): Adjust to use std::string.
9048 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9049 (find_file_and_directory): Adjust to return a file_and_directory
9050 object.
9051 (read_file_scope): Adjust to use file_and_directory. Remove
9052 make_cleanup/do_cleanups calls.
9053 (open_and_init_dwp_file): Adjust to use std::string. Remove
9054 make_cleanup/do_cleanups calls.
9055 * python/python.c (do_start_initialization): Adjust to ldirname
9056 returning a std::string.
9057 * utils.c (ldirname): Now returns a std::string.
9058 * utils.h (ldirname): Change return type to std::string.
9059 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9060 returning a std::string.
9061 * xml-tdesc.c (file_read_description_xml): Likewise.
9062
ed771251
AH
90632017-03-24 Alan Hayward <alan.hayward@arm.com>
9064
9065 * regcache.c (regcache_debug_print_register): New function.
9066 * regcache.h (regcache_debug_print_register): New declaration.
9067 * target.c (debug_print_register): Remove.
9068 (target_fetch_registers): Call regcache_debug_print_register.
9069 (target_store_registers): Likewise.
9070
568c1b9f
PB
90712017-03-24 Pádraig Brady <pbrady@fb.com>
9072
9073 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9074 reference beyond the 'lh->include_dirs' array before accessing to
9075 it.
9076 (psymtab_include_file_name): Likewise.
9077 (dwarf_decode_lines_1): Likewise.
9078 (dwarf_decode_lines): Likewise.
9079 (file_file_name): Likewise.
9080
3e00d44f
SM
90812017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9082
9083 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9084 inferior_ptid.
9085 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9086 ps_lsetfpregs): Likewise.
9087 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9088 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9089 ps_lsetfpregs): Likewise.
9090 * target.c (target_fetch_registers, target_store_registers):
9091 Remove asserts.
9092
077ae656
AH
90932017-03-23 Alan Hayward <alan.hayward@arm.com>
9094
9095 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9096
1e2b521d
YQ
90972017-03-23 Yao Qi <yao.qi@linaro.org>
9098
9099 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9100 (_initialize_aarch64_tdep): Register it.
9101 (aarch64_record_load_store): Handle PRFM instruction.
9102 (aarch64_process_record_test): New function.
9103
33877125
YQ
91042017-03-23 Yao Qi <yao.qi@linaro.org>
9105
9106 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9107 indentation.
9108
a0eef940
YQ
91092017-03-23 Yao Qi <yao.qi@linaro.org>
9110
9111 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9112
3f2a3564
PR
91132017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9114
9115 python/python.c (do_start_initialization): Fix memory leak.
9116
b67aeab0
SM
91172017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9118
9119 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9120 using get_ptrace_pid.
9121 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9122 inferior_ptid.
9123 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9124 inferior_ptid instead of pid.
9125
ffdbe864
YQ
91262017-03-22 Yao Qi <yao.qi@linaro.org>
9127
9128 * aarch64-tdep.c: Wrap locally used classes in anonymous
9129 namespace.
9130 * arm-tdep.c: Likewise.
9131 * linespec.c: Likewise.
9132 * ui-out.c: Likewise.
9133
9d736fbf
JG
91342017-03-22 Jonah Graham <jonah@kichwacoders.com>
9135
9136 PR gdb/19637
9137 * python/lib/gdb/printer/bound_registers.py: Import sys.
9138
3de88e9a
SM
91392017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9140
9141 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9142 windows_thread_info parameter and use it instead of
9143 current_thread.
9144 (windows_fetch_inferior_registers): Don't set current_thread,
9145 pass the thread to do_windows_fetch_inferior_registers. Use
9146 ptid from regcache instead of inferior_ptid.
9147 (do_windows_store_inferior_registers): Add windows_thread_info
9148 parameter and use it instead of current_thread.
9149 (windows_store_inferior_registers): Don't set current_thread,
9150 pass the thread to do_windows_store_inferior_registers. Use
9151 ptid from regcache instead of inferior_ptid.
9152
0e7b8f61
SM
91532017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9154
9155 * ser-mingw.c (ser_windows_raw): Remove reference to
9156 struct serial::current_timeout.
9157
5badf10a
IR
91582017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9159
9160 PR tdep/20928
9161 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9162 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9163 (sparc64_fsr_type): Fix %fsr decoding.
9164
cee59b3f
TW
91652017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9166
9167 * python/py-record-btrace.c (btpy_insn_data): Change return type
9168 for Python 2.
9169
639a9038
SM
91702017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9171
9172 * spu-linux-nat.c (spu_fetch_inferior_registers,
9173 spu_store_inferior_registers): Use ptid from regcache, set and
9174 restore inferior_ptid.
9175 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9176 Likewise.
9177
bcc0c096
SM
91782017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9179
9180 * i386-linux-nat.c (fetch_register, store_register,
9181 i386_linux_fetch_inferior_registers,
9182 i386_linux_store_inferior_registers): Use ptid from regcache.
9183 * ia64-linux-nat.c (ia64_linux_fetch_register,
9184 ia64_linux_store_register): Likewise.
9185 * inf-ptrace.c (inf_ptrace_fetch_register,
9186 inf_ptrace_store_register): Likewise.
9187 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9188 m32r_linux_store_inferior_registers): Likewise.
9189 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9190 m68kbsd_store_inferior_registers): Likewise.
9191 * m68k-linux-nat.c (fetch_register, store_register,
9192 m68k_linux_fetch_inferior_registers,
9193 m68k_linux_store_inferior_registers): Likewise.
9194 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9195 m88kbsd_store_inferior_registers): Likewise.
9196 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9197 mips_fbsd_store_inferior_registers): Likewise.
9198 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9199 mips64_linux_regsets_store_registers): Likewise.
9200 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9201 mipsnbsd_store_inferior_registers): Likewise.
9202 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9203 mips64obsd_store_inferior_registers): Likewise.
9204 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9205 Likewise.
9206 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9207 ppcfbsd_store_inferior_registers): Likewise.
9208 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9209 ppc_linux_store_inferior_registers): Likewise.
9210 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9211 ppcnbsd_store_inferior_registers): Likewise.
9212 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9213 ppcobsd_store_registers): Likewise.
9214 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9215 Likewise.
9216 * ravenscar-thread.c (ravenscar_fetch_registers,
9217 ravenscar_store_registers, ravenscar_prepare_to_store):
9218 Likewise.
9219 * record-btrace.c (record_btrace_fetch_registers,
9220 record_btrace_store_registers, record_btrace_prepare_to_store):
9221 Likewise.
9222 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9223 Lookup inferior using ptid from regcache, instead of
9224 current_inferior.
9225 * remote.c (remote_fetch_registers, remote_store_registers): Use
9226 ptid from regcache.
9227 * rs6000-nat.c (fetch_register, store_register): Likewise.
9228 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9229 s390_linux_store_inferior_registers): Likewise.
9230 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9231 shnbsd_store_inferior_registers): Likewise.
9232 * sol-thread.c (sol_thread_fetch_registers,
9233 sol_thread_store_registers): Likewise.
9234 * sparc-nat.c (sparc_fetch_inferior_registers,
9235 sparc_store_inferior_registers): Likewise.
9236 * tilegx-linux-nat.c (fetch_inferior_registers,
9237 store_inferior_registers): Likewise.
9238 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9239 vaxbsd_store_inferior_registers): Likewise.
9240 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9241 store_xtregs): Likewise.
9242
c0f55cc6
AV
92432017-03-20 Artemiy Volkov <artemiyv@acm.org>
9244
9245 PR gdb/14441
9246 * NEWS: Mention support for rvalue references in GDB and python.
9247 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9248 supports both lvalue and rvalue references.
9249
15c0a2a9
AV
92502017-03-20 Artemiy Volkov <artemiyv@acm.org>
9251
9252 PR gdb/14441
9253 * gdbtypes.c (rank_one_type): Implement overloading
9254 resolution rules regarding rvalue references.
9255
aa006118
AV
92562017-03-20 Artemiy Volkov <artemiyv@acm.org>
9257
9258 PR gdb/14441
9259 * aarch64-tdep.c (aarch64_type_align)
9260 (aarch64_extract_return_value, aarch64_store_return_value): Change
9261 lvalue reference type checks to general reference type checks.
9262 * amd64-tdep.c (amd64_classify): Likewise.
9263 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9264 Likewise.
9265 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9266 (arm_store_return_value): Likewise.
9267 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9268 * c-typeprint.c (c_print_type): Likewise.
9269 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9270 (cplus_number_of_children, cplus_describe_child): Likewise.
9271 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9272 * completer.c (expression_completer): Likewise.
9273 * cp-support.c (make_symbol_overload_list_adl_namespace):
9274 Likewise.
9275 * darwin-nat-info.c (info_mach_region_command): Likewise.
9276 * dwarf2loc.c (entry_data_value_coerce_ref)
9277 (value_of_dwarf_reg_entry): Likewise.
9278 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9279 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9280 Likewise.
9281 * findvar.c (extract_typed_address, store_typed_address):
9282 Likewise.
9283 * gdbtypes.c (rank_one_type): Likewise.
9284 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9285 * infcall.c (value_arg_coerce): Likewise.
9286 * language.c (pointer_type): Likewise.
9287 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9288 Likewise.
9289 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9290 * mn10300-tdep.c (mn10300_type_align): Likewise.
9291 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9292 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9293 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9294 Likewise.
9295 * printcmd.c (print_formatted, x_command): Likewise.
9296 * python/py-type.c (typy_get_composite, typy_template_argument):
9297 Likewise.
9298 * python/py-value.c (valpy_referenced_value)
9299 (valpy_get_dynamic_type, value_has_field): Likewise.
9300 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9301 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9302 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9303 * spu-tdep.c (spu_scalar_value_p): Likewise.
9304 * symtab.c (lookup_symbol_aux): Likewise.
9305 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9306 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9307 Likewise.
9308 * valops.c (value_cast_pointers, value_cast)
9309 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9310 (value_struct_elt, value_struct_elt_bitpos)
9311 (value_find_oload_method_list, find_overload_match)
9312 (value_rtti_indirect_type): Likewise.
9313 * valprint.c (val_print_scalar_type_p, generic_val_print):
9314 Likewise.
9315 * value.c (value_actual_type, value_as_address, unpack_long)
9316 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9317 (coerce_ref): Likewise.
9318 * varobj.c (varobj_get_value_type): Likewise.
9319
3fcf899d
AV
93202017-03-20 Artemiy Volkov <artemiyv@acm.org>
9321
9322 PR gdb/14441
9323 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9324 table of constants.
9325 * python/lib/gdb/command/explore.py: Support exploring values
9326 of rvalue reference types.
9327 * python/lib/gdb/types.py: Implement get_basic_type() for
9328 rvalue reference types.
9329 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9330 constant.
9331 * python/py-value.c (valpy_getitem): Add an rvalue reference
9332 check.
9333 (valpy_reference_value): Add new parameter "refcode".
9334 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9335 New wrappers for valpy_reference_value().
9336 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9337 (gdbpy_invoke_xmethod): Likewise.
9338
4297a3f0
AV
93392017-03-20 Artemiy Volkov <artemiyv@acm.org>
9340
9341 PR gdb/14441
9342 * dwarf2read.c (process_die, read_type_die_1): Handle the
9343 DW_TAG_rvalue_reference_type DIE.
9344 (read_tag_reference_type): Add new parameter "refcode".
9345
e1cb3213
AV
93462017-03-20 Artemiy Volkov <artemiyv@acm.org>
9347
9348 PR gdb/14441
9349 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9350 (c_type_print_modifier, c_type_print_varspec_suffix)
9351 (c_type_print_base): Support printing rvalue reference types.
9352 * c-valprint.c (c_val_print, c_value_print): Support printing
9353 rvalue reference values.
9354
e4347c89
AV
93552017-03-20 Artemiy Volkov <artemiyv@acm.org>
9356
9357 PR gdb/14441
9358 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9359 typename.
9360 * cp-support.c (replace_typedefs): Handle
9361 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9362 * python/py-type.c (typy_lookup_type): Likewise.
9363
53cc15f5
AV
93642017-03-20 Artemiy Volkov <artemiyv@acm.org>
9365
9366 PR gdb/14441
9367 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9368 * parse.c (insert_type): Change assert statement.
9369 (follow_types): Handle rvalue reference types.
9370 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9371 constant.
9372
a65cfae5
AV
93732017-03-20 Artemiy Volkov <artemiyv@acm.org>
9374
9375 PR gdb/14441
9376 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9377 value_ref() interface.
9378 * c-valprint.c (c_value_print): Likewise.
9379 * infcall.c (value_arg_coerce): Likewise.
9380 * python/py-value.c (valpy_reference_value): Likewise.
9381 * valops.c (value_cast, value_reinterpret_cast)
9382 (value_dynamic_cast, typecmp): Likewise.
9383 (value_ref): Parameterize by kind of return value reference type.
9384 * value.h (value_ref): Add new parameter "refcode".
9385
3b224330
AV
93862017-03-20 Artemiy Volkov <artemiyv@acm.org>
9387
9388 PR gdb/14441
9389 * dwarf2read.c (read_tag_reference_type): Use
9390 lookup_lvalue_reference_type() instead of lookup_reference_type().
9391 * eval.c (evaluate_subexp_standard): Likewise.
9392 * f-exp.y: Likewise.
9393 * gdbtypes.c (make_reference_type, lookup_reference_type):
9394 Generalize with rvalue reference types.
9395 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9396 convenience wrappers for lookup_reference_type().
9397 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9398 reference kind parameter.
9399 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9400 wrappers for lookup_reference_type().
9401 * guile/scm-type.c (gdbscm_type_reference): Use
9402 lookup_lvalue_reference_type() instead of lookup_reference_type().
9403 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9404 * parse.c (follow_types): Likewise.
9405 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9406 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9407 Likewise.
9408 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9409 (gdbpy_invoke_xmethod): Likewise.
9410 * stabsread.c: Provide extra argument to make_reference_type()
9411 call.
9412 * valops.c (value_ref, value_rtti_indirect_type): Use
9413 lookup_lvalue_reference_type() instead of lookup_reference_type().
9414
f9aeb8d4
AV
94152017-03-20 Artemiy Volkov <artemiyv@acm.org>
9416
9417 PR gdb/14441
9418 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9419 (TYPE_IS_REFERENCE): New macro.
9420 (struct type): Add rvalue_reference_type field.
9421 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9422
51457a05
MAL
94232017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9424
9425 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9426 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9427 New function definition.
9428 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9429 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9430 New function declaration.
9431 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9432 * mi/mi-interp.h: New file.
9433 * solib.c (info_sharedlibrary_command): Replace for loop with
9434 ALL_SO_LIBS macro
9435 * solib.h (update_solib_list): New function declaration.
9436 (so_list_head): Move macro.
9437 * solist.h (ALL_SO_LIBS): New macro.
9438
e696b3ad
MAL
94392017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9440
9441 * infcmd.c (post_create_inferior): Remove unused argument in
9442 call to solib_add.
9443 * remote.c (remote_start_remote): Likewise.
9444 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9445 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9446 (enable_break): Likewise.
9447 * solib.c (update_solib_list): Remove unused target argument
9448 and its documentation.
9449 (solib_add): Remove unused target argument. Remove unused
9450 argument in call to update_solib_list.
9451 (info_sharedlibrary_command): Remove unused argument in call
9452 to update_solib_list.
9453 (sharedlibrary_command): Remove unused argument in call to
9454 solib_add.
9455 (handle_solib_event): Likewise.
9456 (reload_shared_libraries): Likewise.
9457 * solib.h (solib_add): Remove unused target argument.
9458
dcb84eda
AA
94592017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9460
9461 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9462 (s390_displaced_step_fixup): Cover relative branches with the
9463 default fixup handling. This fixes lack of support for some
9464 relative branch instructions.
9465
d9cb6cdc
SM
94662017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9467
9468 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9469 ptid from regcache.
9470
1afaf9f4
SM
94712017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9472
9473 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9474 i386_darwin_store_inferior_registers): Use ptid from regcache.
9475
aac12e24
SM
94762017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9477
9478 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9479 i386bsd_store_inferior_registers): Use ptid from regcache.
9480
bbe1eef1
SM
94812017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9482
9483 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9484 hppaobsd_store_registers): Use ptid from regcache.
9485
10799020
SM
94862017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9487
9488 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9489 hppanbsd_store_registers): Use ptid from regcache.
9490
00204cf7
SM
94912017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9492
9493 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9494 from regcache. Use get_ptrace_pid.
9495
11a33714
SM
94962017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9497
9498 * corelow.c (get_core_register_section): Use ptid from regcache,
9499 update doc.
9500
317cd492
SM
95012017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9502
9503 * bsd-uthread.c (bsd_uthread_fetch_registers,
9504 bsd_uthread_store_registers): Use ptid from regcache, set and
9505 restore inferior_ptid.
9506
9ac8a7c2
SM
95072017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9508
9509 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9510 fetch_fp_regs, store_register, store_regs, store_fp_register,
9511 store_fp_regs): Use ptid from regcache.
9512
4ac4bb6a
SM
95132017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9514
9515 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9516 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9517 store_vfp_regs): Use ptid from regcache.
9518
9bcbdca8
PA
95192017-03-17 Pedro Alves <palves@redhat.com>
9520
9521 PR remote/21188
9522 * ser-base.c (ser_base_wait_for): Add comment.
9523 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9524 version.
9525 * ser-unix.c (hardwire_raw): Remove reference to
9526 scb->current_timeout.
9527 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9528 (hardwire_ops): Install ser_base_readchar instead of
9529 hardwire_readchar.
9530 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9531 Remove fields.
9532
7503099f
JG
95332017-03-17 Jonah Graham <jonah@kichwacoders.com>
9534
9535 PR gdb/19637
9536 * python/lib/gdb/printer/bound_registers.py: Add support for
9537 Python 3.
9538
7942e96e
AA
95392017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9540
9541 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9542 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9543 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9544 byte_offset to subobj_byte_offset. Fix the handling of
9545 DWARF_VALUE_STACK on big-endian targets when coming via an
9546 implicit pointer.
9547 (dwarf2_evaluate_loc_desc): Adjust call to
9548 dwarf2_evaluate_loc_desc_full.
9549 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9550 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9551
ba14f379
YQ
95522017-03-16 Yao Qi <yao.qi@linaro.org>
9553
9554 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9555 and REVSH instructions.
9556
b121eeb9
YQ
95572017-03-16 Yao Qi <yao.qi@linaro.org>
9558
9559 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9560 (arm_record_test): Declare.
9561 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9562 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9563 align with the manual.
9564 (thumb_record_misc): Adjust the code order to align with the
9565 manual.
9566 (thumb2_record_decode_insn_handler): Fix instruction matching.
9567 (instruction_reader_thumb): New class.
9568 (arm_record_test): New function.
9569
728a7913
YQ
95702017-03-16 Yao Qi <yao.qi@linaro.org>
9571
9572 * arm-tdep.c (abstract_memory_reader): New class.
9573 (instruction_reader): New class.
9574 (extract_arm_insn): Add argument 'reader'. Callers updated.
9575 (decode_insn): Likewise.
9576
34b43320
DE
95772017-03-16 Doug Evans <dje@google.com>
9578
a7c0469f
DE
9579 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9580 member. Change type of TYPE member to SCM. All uses updated.
9581 (lsscm_make_lazy_string_smob): Add assert.
9582 (lsscm_make_lazy_string): Flag bad length values.
9583 (lsscm_elt_type): New function.
9584 (gdbscm_lazy_string_to_value): Rewrite to use
9585 lsscm_safe_lazy_string_to_value.
9586 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9587 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9588 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9589 in incoming type.
9590 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9591 * guile/scm-type.c (tyscm_scm_to_type): New function.
9592
95932017-03-15 Doug Evans <dje@google.com>
9594
34b43320
DE
9595 PR python/17728, python/18439, python/18779
9596 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9597 member. Change type of TYPE member to PyObject *. All uses updated.
9598 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9599 (gdbpy_create_lazy_string_object): Flag bad length values.
9600 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9601 Handle typedefs in incoming type.
9602 (stpy_lazy_string_elt_type): New function.
9603 (gdbpy_extract_lazy_string): Call it.
9604 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9605 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9606 typedefs in incoming type.
9607
a3a5fecc
DE
96082017-03-16 Doug Evans <dje@google.com>
9609
9610 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9611 * guile/scm-type.c (tyscm_scm_to_type): New function.
9612
28f1c605
JW
96132017-03-16 Jiong Wang <jiong.wang@arm.com>
9614
9615 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9616 "ULONGEST" for "skip".
9617
87c336f6
AA
96182017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9619
9620 PR gdb/21220
9621 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9622 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9623 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9624 over ptrace peek/poke until end of buffer or error.
9625
cf81cf60
SM
96262017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9627
9628 * parse.c (length_of_subexp): Make static.
9629 * parser-defs.h (length_of_subexp): Remove.
9630
a379284a
AA
96312017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9632
9633 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9634 as well.
9635
8a6200ba
PA
96362017-03-14 Pedro Alves <palves@redhat.com>
9637
9638 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9639 (main): Use std::unique_ptr. Remove calls to
9640 cp_demangled_name_parse_free.
9641
f79ec206
SM
96422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9643
9644 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9645 alphabsd_store_inferior_registers): Use regcache->ptid instead
9646 of inferior_ptid.
9647
edb5fb00
SM
96482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9649
9650 * aix-thread.c (aix_thread_fetch_registers,
9651 aix_thread_store_registers): Use regcache->ptid instead of
9652 inferior_ptid.
9653
55119686
SM
96542017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9655
9656 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9657 store_gregs_to_thread, fetch_fpregs_from_thread,
9658 store_fpregs_to_thread): Use regcache->ptid instead of
9659 inferior_ptid.
9660
6a06fbb7
SM
96612017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9662
9663 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9664 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9665 instead of inferior_ptid.
9666
c6386875
SM
96672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9668
9669 * target.c (target_fetch_registers, target_store_registers): Add
9670 assert.
9671
ddaaf0fb
SM
96722017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9673
9674 * regcache.h (regcache_get_ptid): New function.
9675 * regcache.c (regcache_get_ptid): New function.
9676
b9da89d1 96772017-03-13 Mark Wielaard <mark@klomp.org>
9678
9679 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9680
5f4d1085
KS
96812017-03-10 Keith Seitz <keiths@redhat.com>
9682
9683 PR c++/8218
9684 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9685
c65d6b55
PA
96862017-03-08 Pedro Alves <palves@redhat.com>
9687
9688 PR gdb/18360
9689 * infrun.c (start_step_over, do_target_resume, resume)
9690 (restart_threads): Assert we're not resuming a thread that is
9691 meant to be stopped.
9692 (infrun_thread_stop_requested_callback): Delete.
9693 (infrun_thread_stop_requested): If the thread is internally
9694 stopped, queue a pending stop event and clear the thread's
9695 inline-frame state.
9696 (handle_stop_requested): New function.
9697 (handle_syscall_event, handle_inferior_event_1): Use
9698 handle_stop_requested.
9699 (handle_stop_requested): New function.
9700 (handle_signal_stop): Set the thread's stop_signal here instead of
9701 at caller.
9702 (finish_step_over): Clear step over info unconditionally.
9703 (handle_signal_stop): If the user had interrupted the event
9704 thread, consider the stop a random signal.
9705 (handle_signal_stop) <signal arrived while stepping over
9706 breakpoint>: Don't restart threads here.
9707 (stop_waiting): Don't clear step-over info here.
9708
15c22686
PA
97092017-03-08 Pedro Alves <palves@redhat.com>
9710
9711 PR 21206
9712 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9713 goes to argument 2, not 1.
9714
6e5d74e7
PA
97152017-03-08 Pedro Alves <palves@redhat.com>
9716
9717 PR cli/21218
9718 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9719 display_gdb_prompt.
9720 (command_line_input): Add comment.
9721
9753a2f6
PA
97222017-03-08 Pedro Alves <palves@redhat.com>
9723
9724 PR tui/21216
9725 * tui/tui-file.c (tui_file::write): New.
9726 * tui/tui-file.h (tui_file): Override "write".
9727 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9728 factored out from ...
9729 (tui_puts): ... here.
9730 (tui_putc): Use them.
9731 (tui_write): New function.
9732 * tui/tui-io.h (tui_write): Declare.
9733
1672e0d9
SDJ
97342017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9735
9736 * Makefile.in (SFILES): Replace "environ.c" with
9737 "common/environ.c".
9738 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9739 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9740 to...
9741 * common/environ.c: ... here.
9742 * environ.h: Moved to...
9743 * common/environ.h: ... here.
9744
f7bb4e3a
PB
97452017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9746
9747 * gdbarch.sh (pstring_ptr): New static function.
9748 (gdbarch_disassembler_options): Use it.
9749 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9750 not valid_disassembler_option->name.
9751 * gdbarch.c: Regenerate.
9752
e45ced6c
PB
97532017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9754
9755 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9756
5f6fd321
PA
97572017-03-07 Pedro Alves <palves@redhat.com>
9758
9759 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9760
6dbb839a 97612017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
9762
9763 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9764 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9765 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 9766 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 9767
d274ecf4
SM
97682017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9769
9770 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9771
df97be55
SM
97722017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9773
9774 * remote.c (remote_add_target_side_commands): Use range-based
9775 for loop.
9776
7d45f3df
YQ
97772017-03-03 Yao Qi <yao.qi@linaro.org>
9778
9779 PR gdb/21165
9780 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9781 value is lazy.
9782 * valprint.c (common_val_print): Likewise.
9783
65b48a81
PB
97842017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9785
9786 * NEWS: Mention new set/show disassembler-options commands.
9787 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9788 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9789 (prospective_options): New static variable.
9790 (gdb_disassembler::gdb_disassembler): Initialize
9791 m_di.disassembler_options.
9792 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9793 (get_disassembler_options): New function.
9794 (set_disassembler_options): Likewise.
9795 (set_disassembler_options_sfunc): Likewise.
9796 (show_disassembler_options_sfunc): Likewise.
9797 (disassembler_options_completer): Likewise.
9798 (_initialize_disasm): Likewise.
9799 * disasm.h (get_disassembler_options): New prototype.
9800 (set_disassembler_options): Likewise.
9801 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9802 (gdbarch_verify_disassembler_options): Likewise.
9803 * gdbarch.c: Regenerate.
9804 * gdbarch.h: Likewise.
9805 * arm-tdep.c (num_disassembly_options): Delete.
9806 (set_disassembly_style): Likewise.
9807 (arm_disassembler_options): New static variable.
9808 (set_disassembly_style_sfunc): Convert short style name into long
9809 option name. Call set_disassembler_options.
9810 (show_disassembly_style_sfunc): New function.
9811 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9812 set_gdbarch_verify_disassembler_options.
9813 (_initialize_arm_tdep): Delete regnames variable and update callers.
9814 (arm_disassembler_options): Initialize.
9815 (disasm_options): New variable.
9816 (num_disassembly_options): Rename from this...
9817 (num_disassembly_styles): ...to this. Compute by scanning through
9818 disasm_options.
9819 (valid_disassembly_styles): Initialize using disasm_options.
9820 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9821 set_arm_regname_option.
9822 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9823 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9824 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9825 set_gdbarch_verify_disassembler_options.
9826 * s390-tdep.c (s390_disassembler_options): New static variable.
9827 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9828 set_gdbarch_verify_disassembler_options.
9829
d538e36d
SM
98302017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9831
9832 * remote.c (remote_add_target_side_condition): Remove "struct"
9833 keyword from range-based for loop.
9834
83621223
SM
98352017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9836
9837 * remote.c (remote_add_target_side_condition): Use range-based
9838 for loop. Update comment.
9839
2123df0e
YQ
98402017-02-27 Yao Qi <yao.qi@linaro.org>
9841
9842 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9843
8e368124
AH
98442017-02-26 Alan Hayward <alan.hayward@arm.com>
9845
9846 * regcache.c (regcache_raw_update): New function.
9847 (regcache_raw_read): Move code to regcache_raw_update.
9848 * regcache.h (regcache_raw_update): New declaration.
9849 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9850
a49dd8dd
JK
98512017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9852
9853 * dwarf2read.c (create_debug_type_hash_table): Initialize
9854 header.signature and header.type_offset_in_tu.
9855
34e4bae9
PA
98562017-02-24 Pedro Alves <palves@redhat.com>
9857
9858 * symtab.c (make_file_symbol_completion_list_1): Use
9859 add_symtab_completions.
9860
b0e4b369
AH
98612017-02-24 Alan Hayward <alan.hayward@arm.com>
9862
9863 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9864
975c21ab
AH
98652017-02-24 Alan Hayward <alan.hayward@arm.com>
9866
9867 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9868 I386_MAX_REGISTER_SIZE.
9869 (i386_pseudo_register_write): Likewise.
9870 (i386_process_record): Likewise.
9871 * i387-tdep.c (i387_supply_xsave): Likewise.
9872 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9873 (store_register): Likewise.
9874
14bc53a8
PA
98752017-02-23 Pedro Alves <palves@redhat.com>
9876
9877 * ada-lang.c: Include "common/function-view.h".
9878 (ada_iterate_over_symbols): Adjust to use function_view as
9879 callback type.
9880 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9881 (ada_make_symbol_completion_list): Use a lambda.
9882 (ada_exc_search_name_matches): Delete.
9883 (name_matches_regex): New.
9884 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9885 * compile/compile-c-support.c: Include "common/function-view.h".
9886 (print_one_macro): Change prototype to accept a ui_file pointer.
9887 (write_macro_definitions): Use a lambda.
9888 * dwarf2read.c: Include "common/function-view.h".
9889 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9890 (dw2_expand_symtabs_matching): Adjust to use function_view as
9891 callback type.
9892 * language.h: Include "common/function-view.h".
9893 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9894 function_view as callback type.
9895 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9896 * linespec.c: Include "common/function-view.h".
9897 (collect_info::add_symbol): New method.
9898 (struct symbol_and_data_callback, iterate_inline_only, struct
9899 symbol_matcher_data, iterate_name_matcher): Delete.
9900 (iterate_over_all_matching_symtabs): Adjust to use function_view
9901 as callback type and lambdas.
9902 (iterate_over_file_blocks): Adjust to use function_view as
9903 callback type.
9904 (decode_compound_collector): Now a class with private fields.
9905 (decode_compound_collector::release_symbols): New method.
9906 (collect_one_symbol): Rename to...
9907 (decode_compound_collector::operator()): ... this and adjust.
9908 (lookup_prefix_sym): decode_compound_collector construction bits
9909 move to decode_compound_collector ctor. Pass the
9910 decode_compound_collector object directly as callback. Remove
9911 cleanups and use decode_compound_collector::release_symbols
9912 instead.
9913 (symtab_collector): Now a class with private fields.
9914 (symtab_collector::release_symtabs): New method.
9915 (add_symtabs_to_list): Rename to...
9916 (symtab_collector::operator()): ... this and adjust.
9917 (collect_symtabs_from_filename): symtab_collector construction
9918 bits move to symtab_collector ctor. Pass the symtab_collector
9919 object directly as callback. Remove cleanups and use
9920 symtab_collector::release_symtabs instead.
9921 (collect_symbols): Delete.
9922 (add_matching_symbols_to_info): Use lambdas.
9923 * macrocmd.c (print_macro_callback): Delete.
9924 (info_macro_command): Use a lambda.
9925 (info_macros_command): Pass print_macro_definition as callable
9926 directly.
9927 (print_one_macro): Remove 'ignore' parameter.
9928 (macro_list_command): Adjust.
9929 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9930 (macro_for_each_data::user_data): Delete field.
9931 (foreach_macro): Adjust to call the function_view.
9932 (macro_for_each): Adjust to use function_view as callback type.
9933 (foreach_macro_in_scope): Adjust to call the function_view.
9934 (macro_for_each_in_scope): Adjust to use function_view as callback
9935 type.
9936 * macrotab.h: Include "common/function-view.h".
9937 (macro_callback_fn): Declare a prototype instead of a pointer.
9938 Remove "user_data" parameter.
9939 (macro_for_each, macro_for_each_in_scope): Adjust to use
9940 function_view as callback type.
9941 * psymtab.c (partial_map_expand_apply)
9942 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9943 Adjust to use function_view as callback type and to return bool.
9944 (psym_expand_symtabs_matching): Adjust to use function_view as
9945 callback types.
9946 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9947 to use function_view as callback type and to return bool.
9948 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9949 callback types.
9950 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9951 as callback types.
9952 * symfile.h: Include "common/function-view.h".
9953 (expand_symtabs_file_matcher_ftype)
9954 (expand_symtabs_symbol_matcher_ftype)
9955 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9956 return bool.
9957 (quick_symbol_functions::map_symtabs_matching_filename)
9958 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9959 function_view as callback type and return bool.
9960 (expand_symtabs_matching): Adjust to use function_view as callback
9961 type.
9962 (maintenance_expand_name_matcher)
9963 (maintenance_expand_file_matcher): Delete.
9964 (maintenance_expand_symtabs): Use lambdas.
9965 * symtab.c (iterate_over_some_symtabs): Adjust to use
9966 function_view as callback types and return bool.
9967 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9968 of a cleanup.
9969 (lookup_symtab_callback): Delete.
9970 (lookup_symtab): Use a lambda.
9971 (iterate_over_symbols): Adjust to use function_view as callback
9972 type.
9973 (struct search_symbols_data, search_symbols_file_matches)
9974 (search_symbols_name_matches): Delete.
9975 (search_symbols): Use a pair of lambdas.
9976 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9977 (symtab_expansion_callback): Delete.
9978 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9979 * symtab.h: Include "common/function-view.h".
9980 (iterate_over_some_symtabs): Adjust to use function_view as
9981 callback type and return bool.
9982 (iterate_over_symtabs): Adjust to use function_view as callback
9983 type.
9984 (symbol_found_callback_ftype): Remove 'data' parameter and return
9985 bool.
9986 (iterate_over_symbols): Adjust to use function_view as callback
9987 type.
9988
07e253aa
PA
99892017-02-23 Pedro Alves <palves@redhat.com>
9990
9991 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9992 (%.o) <unittests/%.c>: New pattern.
9993 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9994 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9995 * common/function-view.h: New file.
9996 * unittests/function-view-selftests.c: New file.
9997 * configure: Regenerate.
9998
8eaf5320
SM
99992017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10000
10001 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10002 inferior_ptid.
10003 * go32-nat.c (go32_thread_alive): Likewise.
10004
38768751
YQ
100052017-02-23 Yao Qi <yao.qi@linaro.org>
10006
10007 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10008 delete.
10009
0a8beaba
YQ
100102017-02-23 Yao Qi <yao.qi@linaro.org>
10011
10012 * varobj.c (varobj_clear_saved_item): Use delete instead of
10013 xfree.
10014 (update_dynamic_varobj_children): Likewise.
10015
58fdfd2c
JK
100162017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10017
10018 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10019
1b90b139
SM
100202017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10021
10022 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10023 m_enum_value to 0 in default constructor.
10024
2039d74e
EBM
100252017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10026
10027 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10028 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10029 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10030 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10031 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10032 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10033 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10034 IS_STORE_CONDITIONAL_INSN.
10035
7814882a
JK
100362017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10037
10038 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10039
0ae60b63
JK
100402017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10041
10042 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10043
0224619f
JK
100442017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10045
10046 * dwarf2read.c (skip_one_die, read_attribute_value)
10047 (dwarf2_const_value_attr, dump_die_shallow)
10048 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10049 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10050
0af92d60
JK
100512017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10052
10053 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10054 (dwarf_parse_macro_header): Accept DWARF version 5.
10055 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10056
216f72a1
JK
100572017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10058
10059 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10060 DW_AT_GNU_*.
10061 * common/common-exceptions.h (enum errors): Likewise.
10062 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10063 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10064 (dwarf_expr_context::execute_stack_op): Likewise.
10065 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10066 Likewise.
10067 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10068 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10069 (show_entry_values_debug, call_site_to_target_addr)
10070 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10071 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10072 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10073 (value_of_dwarf_block_entry, indirect_pieced_value)
10074 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10075 (disassemble_dwarf_expression): Likewise.
10076 * dwarf2read.c (process_die, inherit_abstract_dies)
10077 (read_call_site_scope): Likewise.
10078 * gdbtypes.h (struct func_type, struct call_site_parameter)
10079 (struct call_site): Likewise.
10080 * stack.c (read_frame_arg): Likewise.
10081 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10082
43988095
JK
100832017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10084
10085 * defs.h (read_unsigned_leb128): New declaration.
10086 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10087 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10088 (dwarf2_find_location_expression): Call also
10089 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10090 * dwarf2loc.h (dwarf2_version): New declaration.
10091 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10092 rnglists.
10093 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10094 .debug_rnglists.
10095 (struct dwop_section_names): Add loclists_dwo.
10096 (dwop_section_names): Add .debug_loclists.dwo.
10097 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10098 (struct dwarf2_per_cu_data): Add dwarf_version.
10099 (struct dwo_sections): Add loclists.
10100 (struct attr_abbrev): Add implicit_const.
10101 (read_indirect_line_string): New declaration.
10102 (read_unsigned_leb128): Delete declaration.
10103 (rcuh_kind): New definition.
10104 (read_and_check_comp_unit_head): Change parameter
10105 is_debug_types_section to section_kind.
10106 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10107 (read_comp_unit_head): Change parameter abfd to section, add parameter
10108 section_kind. Handle DWARF-5.
10109 (error_check_comp_unit_head): Accept also DWARF version 5.
10110 (read_and_check_comp_unit_head): Change parameter
10111 is_debug_types_section to section_kind.
10112 (read_and_check_type_unit_head): Delete function.
10113 (read_abbrev_offset): Handle DWARF-5.
10114 (create_debug_type_hash_table): Add parameter section_kind. Process
10115 only DW_UT_type. Use signature and type_offset_in_tu from struct
10116 comp_unit_head.
10117 (create_debug_types_hash_table): Update create_debug_type_hash_table
10118 caller.
10119 (create_all_type_units): Call create_debug_type_hash_table.
10120 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10121 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10122 caller.
10123 (skip_one_die): Handle DW_FORM_implicit_const.
10124 (dwarf2_rnglists_process): New function.
10125 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10126 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10127 (read_attribute_value): Handle DW_FORM_implicit_const,
10128 DW_FORM_line_strp.
10129 (read_attribute): Handle DW_FORM_implicit_const.
10130 (read_indirect_string_at_offset_from): New function from
10131 read_indirect_string_at_offset.
10132 (read_indirect_string_at_offset): Call
10133 read_indirect_string_at_offset_from.
10134 (read_indirect_line_string_at_offset): New function.
10135 (read_indirect_string): New function comment.
10136 (read_indirect_line_string): New function.
10137 (read_unsigned_leb128): Make it global.
10138 (dwarf2_string_attr): Handle DWARF-5.
10139 (add_include_dir_stub, read_formatted_entries): New functions.
10140 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10141 Handle DWARF-5.
10142 (per_cu_header_read_in): Update read_comp_unit_head caller.
10143 (dwarf2_version): New function.
10144 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10145 rnglists.
10146 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10147 fields.
10148
22d2f3ab
JK
101492017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10150
10151 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10152
5f46c5a5
JK
101532017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10154
10155 * dwarf2read.c (dwarf2_ranges_process): New function from
10156 dwarf2_ranges_read.
10157 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10158 dwarf2_ranges_process.
10159
78d4d2c5
JK
101602017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10161
10162 * dwarf2read.c (create_debug_type_hash_table): New function from
10163 create_debug_types_hash_table.
10164 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10165 (create_all_type_units, open_and_init_dwo_file): Update
10166 create_debug_types_hash_table callers.
10167
1b076f25
SDJ
101682017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10169
10170 PR gdb/16188
10171 * fork-child.c (trace_start_error): Fix thinko. va_end should
10172 refer to 'ap', not 'args'.
10173
0db8980c
SDJ
101742017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10175 Pedro Alves <palves@redhat.com>
10176
10177 PR gdb/16188
10178 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10179 calls succeeded.
10180 * fork-child.c (trace_start_error): New function.
10181 (trace_start_error_with_name): Likewise.
10182 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10183 * inf-ptrace.c (inf_ptrace_me): Likewise.
10184 * inferior.h (trace_start_error): New prototype.
10185 (trace_start_error_with_name): Likewise.
10186
99e8a4f9
SDJ
101872017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10188
10189 PR gdb/21164
10190 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10191 NULL before using it.
10192 * symmisc.c (maintenance_print_symbols): Likewise.
10193 (maintenance_print_msymbols): Likewise.
10194
4e746bb6
TW
101952017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10196
10197 * NEWS: Add record Python bindings entry.
10198
101992017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10200
10201 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10202 py-record-full.o.
10203 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10204 * python/py-record-btrace.c, python/py-record-btrace.h,
10205 python/py-record-full.c, python/py-record-full.h: New file.
10206 * python/py-record.c: Add include for py-record-btrace.h and
10207 py-record-full.h.
10208 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10209 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10210 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10211 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10212 New definition.
10213 (gdbpy_initialize_btrace): New export.
10214 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10215
102162017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10217
10218 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10219 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10220 * python/py-record.c: New file.
10221 * python/python-internal.h (gdbpy_start_recording,
10222 gdbpy_current_recording, gdpy_stop_recording,
10223 gdbpy_initialize_record): New export.
10224 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10225 (python_GdbMethods): Add gdbpy_start_recording,
10226 gdbpy_current_recording and gdbpy_stop_recording.
10227
102282017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10229
10230 * record-btrace.c (record_btrace_record_method): New function.
10231 (init_record_btrace_ops): Initialize to_record_method.
10232 * record-full.c (record_full_record_method): New function.
10233 (init_record_full_ops, init_record_full_core_ops): Add
10234 record_full_record_method.
10235 * record.h (enum record_method): New enum.
10236 * target-debug.h (target_debug_print_enum_record_method: New define.
10237 * target-delegates.c: Regenerate.
10238 * target.c (target_record_method): New function.
10239 * target.h: Include record.h.
10240 (struct target_ops) <to_record_method>: New field.
10241 (target_record_method): New export.
10242
102432017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10244
10245 * record.h (record_start, record_stop): New export.
10246 * record.c (record_start, record_stop): New function.
10247
102482017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10249
10250 * btrace.c (btrace_fetch): Copy function call segments pointer
10251 into a vector.
10252 (btrace_clear): Clear the vector.
10253 (btrace_find_insn_by_number): Use binary search to find the correct
10254 function call segment.
10255 * btrace.h (brace_fun_p): New typedef.
10256 (struct btrace_thread_info) <functions>: New field.
10257
102582017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10259
10260 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10261 * btrace.c (btrace_decode_error): ... here. New function.
10262 * btrace.h (btrace_decode_error): New export.
10263
102642017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10265
10266 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10267 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10268 btrace_find_insn_by_number): Remove special case for gaps.
10269 * btrace.h (btrace_insn_get_error): New export.
10270 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10271 * record-btrace.c (btrace_insn_history): Print number for gaps.
10272 (record_btrace_info, record_btrace_goto): Handle gaps.
10273
3f77c769
TT
102742017-02-14 Tom Tromey <tom@tromey.com>
10275
10276 PR python/13598:
10277 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10278 event.
10279 * python/py-evts.c (gdbpy_initialize_py_events): Add
10280 before_prompt registry.
10281 * python/py-events.h (events_object) <before_prompt>: New field.
10282
4c2c7ac6
MM
102832017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10284
10285 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10286
5cf30ebf
LM
102872017-02-13 Luis Machado <lgustavo@codesourcery.com>
10288
10289 * symfile (_initialize_symfile): Add usage text to the load command's
10290 help text.
10291
26a06916
SM
102922017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10293
10294 * utils.c (defaulted_query): Don't query on secondary UIs.
10295
0b145e37
TT
102962017-02-10 Tom Tromey <tom@tromey.com>
10297
10298 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10299
2d8365c4
TT
103002017-02-10 Tom Tromey <tom@tromey.com>
10301
10302 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10303 "cleanup" local.
10304 * python/py-type.c (typy_legacy_template_argument): Remove
10305 unnecessary "cleanup" local.
10306
2bb8f231
TT
103072017-02-10 Tom Tromey <tom@tromey.com>
10308
10309 * python/python.c (do_start_initialization): New function, from
10310 _initialize_python.
10311 (_initialize_python): Call do_start_initialization.
10312 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10313 goto.
10314
1bdfaf42
TT
103152017-02-10 Tom Tromey <tom@tromey.com>
10316
10317 * python/py-prettyprint.c (pretty_print_one_value): Use
10318 gdbpy_ref.
10319
88b6faea
TT
103202017-02-10 Tom Tromey <tom@tromey.com>
10321
10322 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10323 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10324 gdbpy_ref.
10325 * python/py-type.c (field_new): Use gdbpy_ref.
10326 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10327 gdbpy_ref.
10328 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10329 (py_free_pspace): Likewise.
10330 (pspace_to_pspace_object): Likewise.
10331 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10332 (py_free_objfile): Likewise.
10333 (objfile_to_objfile_object): Likewise.
10334 * python/py-inferior.c (delete_thread_object): Use
10335 gdbpy_ref.
10336 (infpy_read_memory): Likewise.
10337 (py_free_inferior): Likewise.
10338 * python/py-evtregistry.c (create_eventregistry_object): Use
10339 gdbpy_ref.
10340 * python/py-event.c (create_event_object): Use gdbpy_ref.
10341
7780f186
TT
103422017-02-10 Tom Tromey <tom@tromey.com>
10343
10344 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10345 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10346 used.
10347 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10348 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10349 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10350 python/py-framefilter.c, python/py-function.c,
10351 python/py-inferior.c, python/py-infevents.c,
10352 python/py-linetable.c, python/py-newobjfileevent.c,
10353 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10354 python/py-signalevent.c, python/py-stopevent.c,
10355 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10356 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10357 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10358 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10359
d4b0bb18
TT
103602017-02-10 Tom Tromey <tom@tromey.com>
10361
10362 * ui-out.h (ui_out_emit_type): New class.
10363 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10364 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10365 and ui_out_emit_tuple.
10366 (enumerate_locals): Likewise.
10367 (py_mi_print_variables, py_print_locals, py_print_args): Use
10368 ui_out_emit_list.
10369 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10370 ui_out_emit_list.
10371 * common/gdb_optional.h: New file.
10372
f67f945c
MG
103732017-02-10 Martin Galvan <martingalvan@sourceware.org>
10374
10375 * MAINTAINERS (Write After Approval): Update my e-mail address.
10376
18da0c51
MG
103772017-02-10 Martin Galvan <martingalvan@sourceware.org>
10378
10379 PR gdb/21122
10380 * breakpoint.c (_initialize_breakpoint): Update the help description
10381 of the 'commands' command to indicate that it takes a list argument.
10382
62c14536
SM
103832017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10384
10385 * interps.c (current_interp_set_logging): Remove "return".
10386
ff6fa247
GB
103872017-02-09 Gary Benson <gbenson@redhat.com>
10388
10389 * symtab.c (add_symtab_completions): Prevent NULL pointer
10390 dereference.
10391
a474bd8e
PA
103922017-02-08 Pedro Alves <palves@redhat.com>
10393
10394 * interps.c (interp::interp): Remove reference to quiet_p.
10395 (interp_set): Make static. Remove dead "Switching to" output
10396 code.
10397 (interp_quiet_p, interp_set_quiet): Delete.
10398 (interpreter_exec_cmd): Don't set the interpreter quiet.
10399 * interps.h (interp_quiet_p): Make static.
10400 (class interp) <quiet_p>: Remove field
10401
3d7b173c
JG
104022017-02-08 Jerome Guitton <guitton@adacore.com>
10403
604c4576
JG
10404 * cli/cli-decode.c (find_command_name_length): Make it extern.
10405 * cli/cli-decode.h (find_command_name_length): Declare.
10406 * cli/cli-script.c (command_name_equals, line_first_arg):
10407 New functions.
10408 (process_next_line): Use cli-decode to parse command names.
10409 (build_command_line): Make args a constant pointer.
10410
104112017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 10412
3d7b173c
JG
10413 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10414 Remove case-insensitive search.
10415
1291063d
JM
104162017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10417
10418 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10419 at the end of the line. Avoids an ARI warning.
10420
20b477a7
LM
104212017-02-06 Luis Machado <lgustavo@codesourcery.com>
10422
10423 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10424 rdseed instructions.
10425 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10426
3f7b46f2
IR
104272017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10428
10429 PR tdep/20936
10430 Provide and use sparc32 and sparc64 target description XML files.
10431 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10432 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10433 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10434 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10435 * features/sparc/sparc32-solaris.xml: New file.
10436 * features/sparc/sparc64-solaris.xml: New file.
10437 * features/sparc/sparc32-solaris.c: Generated.
10438 * features/sparc/sparc64-solaris.c: Generated.
10439 * sparc-tdep.h: Account for differences in target descriptions.
10440 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10441 (sparc32_register_type): Use target provided registers.
10442 (validate_tdesc_registers): New function.
10443 (sparc32_gdbarch_init): Use tdesc_has_registers.
10444 Set pseudoregister functions.
10445 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10446 (sparc64_register_type): Use target provided registers.
10447 (sparc64_init_abi): Set pseudoregister functions.
10448
f0fd41c1
TT
104492017-02-03 Tom Tromey <tom@tromey.com>
10450
10451 PR rust/21097:
10452 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10453 with a single member.
10454
d6f9b0fb
PA
104552017-02-03 Pedro Alves <palves@redhat.com>
10456
10457 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10458 (cli_interp_base::~cli_interp_base): New.
10459 (cli_interp): New struct.
10460 (as_cli_interp): Cast the interp itself to cli_interp.
10461 (cli_interpreter_pre_command_loop): Rename to ...
10462 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10463 parameter.
10464 (cli_interpreter_init): Rename to ...
10465 (cli_interp::init): ... this. Remove 'self' parameter. Use
10466 boolean. Make extern.
10467 (cli_interpreter_resume): Rename to ...
10468 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10469 extern.
10470 (cli_interpreter_suspend): Rename to ...
10471 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10472 extern.
10473 (cli_interpreter_exec): Rename to ...
10474 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10475 extern.
10476 (cli_interpreter_supports_command_editing): Rename to ...
10477 (cli_interp_base::supports_command_editing): ... this. Remove
10478 'interp' parameter. Make extern.
10479 (cli_ui_out): Rename to ...
10480 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10481 Make extern.
10482 (cli_set_logging): Rename to ...
10483 (cli_interp_base::set_logging): ... this. Remove 'interp'
10484 parameter. Make extern.
10485 (cli_interp_procs): Delete.
10486 (cli_interp_factory): Adjust to use "new".
10487 * cli/cli-interp.h: Include "interps.h".
10488 (struct cli_interp_base): New struct.
10489 * interps.c (struct interp): Delete. Fields moved to interps.h.
10490 (interp_new): Delete.
10491 (interp::interp, interp::~interp): New.
10492 (interp_set): Use bool, and return void. Assume the interpreter
10493 has suspend, init and resume methods, and that the all return
10494 void.
10495 (set_top_level_interpreter): interp_set returns void.
10496 (interp_ui_out): Adapt.
10497 (current_interp_set_logging): Adapt.
10498 (interp_data): Delete.
10499 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10500 (interp_exec): Adapt.
10501 (top_level_interpreter_data): Delete.
10502 * interps.h (interp_init_ftype, interp_resume_ftype)
10503 (interp_suspend_ftype, interp_exec_ftype)
10504 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10505 (class interp): New.
10506 (interp_new): Delete.
10507 (interp_set): Now returns void. Use bool.
10508 (interp_data, top_level_interpreter_data): Delete.
10509 * mi/mi-common.h: Include interps.h.
10510 (class mi_interp): Inherit from interp. Define a ctor. Declare
10511 init, resume, suspect, exec, interp_ui_out, set_logging and
10512 pre_command_loop methods.
10513 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10514 (mi_interpreter_init): Rename to ...
10515 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10516 bool, return void and make extern. Adjust.
10517 (mi_interpreter_resume): ... Rename to ...
10518 (mi_interp::resume): ... this. Remove the 'data' parameter,
10519 return void and make extern. Adjust.
10520 (mi_interpreter_suspend): ... Rename to ...
10521 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10522 return void and make extern. Adjust.
10523 (mi_interpreter_exec): ... Rename to ...
10524 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10525 extern. Adjust.
10526 (mi_interpreter_pre_command_loop): ... Rename to ...
10527 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10528 parameter and make extern.
10529 (mi_on_normal_stop_1): Adjust.
10530 (mi_ui_out): Rename to ...
10531 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10532 parameter and make extern. Adjust.
10533 (mi_set_logging): Rename to ...
10534 (mi_interp::set_logging): ... this. Remove the 'interp'
10535 parameter and make extern. Adjust.
10536 (mi_interp_procs): Delete.
10537 (mi_interp_factory): Adjust to use 'new'.
10538 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10539 (mi_print_exception, mi_execute_command, mi_load_progress):
10540 Adjust.
10541 * tui/tui-interp.c (tui_interp): New class.
10542 (as_tui_interp): Return a tui_interp pointer.
10543 (tui_on_normal_stop, tui_on_signal_received)
10544 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10545 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10546 to use interp::interp_ui_out.
10547 (tui_init): Rename to ...
10548 (tui_interp::init): ... this. Remove the 'self' parameter, use
10549 bool, return void and make extern. Adjust.
10550 (tui_resume): Rename to ...
10551 (tui_interp::resume): ... this. Remove the 'data' parameter,
10552 return void and make extern. Adjust.
10553 (tui_suspend): Rename to ...
10554 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10555 return void and make extern. Adjust.
10556 (tui_ui_out): Rename to ...
10557 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10558 parameter, and make extern. Adjust.
10559 (tui_exec): Rename to ...
10560 (tui_interp::exec): ... this. Remove the 'data' parameter and
10561 make extern.
10562 (tui_interp_procs): Delete.
10563 (tui_interp_factory): Use "new".
10564
65c40c95
TT
105652017-02-02 Tom Tromey <tom@tromey.com>
10566
10567 * rust-exp.y (ends_raw_string, space_then_number)
10568 (rust_identifier_start_p): Return bool.
10569 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10570 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10571 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10572 (rust_chartype_p): Return bool.
10573 (val_print_struct, rust_print_struct_def, rust_print_type):
10574 Update.
10575 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10576 Return bool.
10577
b50f188d
TT
105782017-02-02 Tom Tromey <tom@tromey.com>
10579
10580 * rust-lang.c: Reindent.
10581
03c85b11
TT
105822017-02-02 Tom Tromey <tom@tromey.com>
10583
10584 * rust-lang.h (rust_crate_for_block): Update.
10585 * rust-lang.c (rust_crate_for_block): Return std::string.
10586 (rust_get_disr_info): Use std:;string, not
10587 gdb::unique_xmalloc_ptr.
10588 * rust-exp.y (crate_name): Update.
10589
9b6da501
PA
105902017-02-02 Pedro Alves <palves@redhat.com>
10591
10592 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10593 field out of gdb_disassembler_test and make it static.
10594
ec4cb20b
PA
105952017-02-02 Pedro Alves <palves@redhat.com>
10596
10597 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10598 mi1_interp and mi_interp fields.
10599
5be5dbf0
PA
106002017-02-02 Pedro Alves <palves@redhat.com>
10601
616268b6
PA
10602 * cli/cli-interp.c (struct saved_output_files, saved_output):
10603 Moved from cli/cli-logging.c.
10604 (cli_set_logging): New function.
10605 (cli_interp_procs): Install cli_set_logging.
10606 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10607 Declare.
10608 * cli/cli-logging.c (struct saved_output_files, saved_output):
10609 Moved to cli/cli-interp.c.
10610 (pop_output_files): Don't save outputs here.
10611 (make_logging_output): New function.
10612 (handle_redirections): Don't build tee nor save previous outputs
10613 here.
10614 * interps.c (current_interp_set_logging): Change prototype.
10615 Assume there's always a set_logging_proc method installed.
10616 * interps.h (interp_set_logging_ftype): Change prototype.
10617 (current_interp_set_logging): Change prototype and adjust comment.
10618 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10619 use make_logging_output.
10620 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
106212017-02-02 Pedro Alves <palves@redhat.com>
10622
5be5dbf0
PA
10623 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10624 from ...
10625 (set_logging_overwrite): ... here.
10626 (logging_no_redirect_file): Delete.
10627 (set_logging_redirect): Don't handle redirection on the fly.
10628 Instead warn that "logging off" / "logging on" is necessary.
10629 (pop_output_files): Delete references to logging_no_redirect_file.
10630 (show_logging_command): Always speak in terms of what will happen
10631 once logging is reenabled.
10632
c99cc448
PA
106332017-02-02 Pedro Alves <palves@redhat.com>
10634
10635 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10636
8b172ce7
PA
106372017-02-02 Pedro Alves <palves@redhat.com>
10638
10639 * disasm.c (gdb_pretty_print_insn): Rename to ...
10640 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10641 Remove gdbarch parameter. Adapt to clear the object's buffers
10642 instead of allocating new buffers, and to print using the object's
10643 gdb_disassembler instead of calling gdb_print_insn.
10644 (dump_insns): Use gdb_pretty_print_disassembler.
10645 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10646 (gdb_pretty_print_disassembler): New class.
10647 * record-btrace.c (btrace_insn_history): Use
10648 gdb_pretty_print_disassembler.
10649
d7e74731
PA
106502017-02-02 Pedro Alves <palves@redhat.com>
10651
10652 * ada-lang.c (type_as_string): Use string_file.
10653 * ada-valprint.c (ada_print_floating): Use string_file.
10654 * ada-varobj.c (ada_varobj_scalar_image)
10655 (ada_varobj_get_value_image): Use string_file.
10656 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10657 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10658 * breakpoint.c (update_inserted_breakpoint_locations)
10659 (insert_breakpoint_locations, reattach_breakpoints)
10660 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10661 (print_it_watchpoint): Use string_file.
10662 (save_breakpoints): Use stdio_file.
10663 * c-exp.y (oper): Use string_file.
10664 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10665 tee_file.
10666 (pop_output_files): Use delete.
10667 (handle_redirections): Use stdio_file and tee_file.
10668 * cli/cli-setshow.c (do_show_command): Use string_file.
10669 * compile/compile-c-support.c (c_compute_program): Use
10670 string_file.
10671 * compile/compile-c-symbols.c (generate_vla_size): Take a
10672 'string_file &' instead of a 'ui_file *'.
10673 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10674 of a 'ui_file *'. Use string_file.
10675 (generate_c_for_variable_locations): Take a 'string_file &'
10676 instead of a 'ui_file *'.
10677 * compile/compile-internal.h (generate_c_for_for_one_variable):
10678 Take a 'string_file &' instead of a 'ui_file *'.
10679 * compile/compile-loc2c.c (push, pushf, unary, binary)
10680 (print_label, pushf_register_address, pushf_register)
10681 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10682 'ui_file *'. Adjust.
10683 * compile/compile.c (compile_to_object): Use string_file.
10684 * compile/compile.h (compile_dwarf_expr_to_c)
10685 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10686 'ui_file *'.
10687 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10688 (replace_typedefs_qualified_name): Use string_file and
10689 obstack_copy0.
10690 * disasm.c (gdb_pretty_print_insn): Use string_file.
10691 (gdb_disassembly): Adjust reference the null_stream global.
10692 (do_ui_file_delete): Delete.
10693 (gdb_insn_length): Use null_stream.
10694 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10695 * dwarf2loc.c (dwarf2_compile_property_to_c)
10696 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10697 'string_file &' instead of a 'ui_file *'.
10698 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10699 * dwarf2read.c (do_ui_file_peek_last): Delete.
10700 (dwarf2_compute_name): Use string_file.
10701 * event-top.c (gdb_setup_readline): Use stdio_file.
10702 * gdbarch.sh (verify_gdbarch): Use string_file.
10703 * gdbtypes.c (safe_parse_type): Use null_stream.
10704 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10705 string_file.
10706 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10707 'string_file *' instead of a 'ui_file *'.
10708 (gdbscm_arch_disassemble): Use string_file.
10709 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10710 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10711 inherits from ui_file.
10712 (ioscm_file_port_delete, ioscm_file_port_rewind)
10713 (ioscm_file_port_put): Delete.
10714 (ioscm_file_port_write): Rename to ...
10715 (ioscm_file_port::write): ... this. Remove file_port_magic
10716 checks.
10717 (ioscm_file_port_new): Delete.
10718 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10719 ui_file_up.
10720 * guile/scm-type.c (tyscm_type_name): Use string_file.
10721 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10722 Use string_file.
10723 * infcmd.c (print_return_value_1): Use string_file.
10724 * infrun.c (print_target_wait_results): Use string_file.
10725 * language.c (add_language): Use string_file.
10726 * location.c (explicit_to_string_internal): Use string_file.
10727 * main.c (captured_main_1): Use null_file.
10728 * maint.c (maintenance_print_architecture): Use stdio_file.
10729 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10730 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10731 event_channel>: Change type to mi_console_file pointer.
10732 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10733 (mi_console_file_delete): Delete.
10734 (struct mi_console_file): Delete.
10735 (mi_console_file_magic): Delete.
10736 (mi_console_file_new): Delete.
10737 (mi_console_file::mi_console_file): New.
10738 (mi_console_file_delete): Delete.
10739 (mi_console_file_fputs): Delete.
10740 (mi_console_file::write): New.
10741 (mi_console_raw_packet): Delete.
10742 (mi_console_file::flush): New.
10743 (mi_console_file_flush): Delete.
10744 (mi_console_set_raw): Rename to ...
10745 (mi_console_file::set_raw): ... this.
10746 * mi/mi-console.h (class mi_console_file): New class.
10747 (mi_console_file_new, mi_console_set_raw): Delete.
10748 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10749 (mi_set_logging): Use delete and tee_file. Adjust.
10750 * mi/mi-main.c (output_register): Use string_file.
10751 (mi_cmd_data_evaluate_expression): Use string_file.
10752 (mi_cmd_data_read_memory): Use string_file.
10753 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10754 * mi/mi-out.c (mi_ui_out::main_stream): New.
10755 (mi_ui_out::rewind): Use main_stream and
10756 string_file.
10757 (mi_ui_out::put): Use main_stream and string_file.
10758 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10759 Allocate a 'string_file' instead.
10760 (mi_out_new): Don't allocate a mem_fileopen stream here.
10761 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10762 (mi_ui_out::main_stream): Declare method.
10763 * printcmd.c (eval_command): Use string_file.
10764 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10765 * python/py-arch.c (archpy_disassemble): Use string_file.
10766 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10767 * python/py-frame.c (frapy_str): Use string_file.
10768 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10769 Use string_file.
10770 * python/py-type.c (typy_str): Use string_file.
10771 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10772 * python/py-value.c (valpy_str): Use string_file.
10773 * record-btrace.c (btrace_insn_history): Use string_file.
10774 * regcache.c (regcache_print): Use stdio_file.
10775 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10776 * remote.c (escape_buffer): Use string_file.
10777 * rust-lang.c (rust_get_disr_info): Use string_file.
10778 * serial.c (serial_open_ops_1): Use stdio_file.
10779 (do_serial_close): Use delete.
10780 * stack.c (print_frame_arg): Use string_file.
10781 (print_frame_args): Remove local mem_fileopen stream, not used.
10782 (print_frame): Use string_file.
10783 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10784 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10785 Take a 'string_file *' instead of a 'ui_file *'.
10786 * top.c (new_ui): Use stdio_file and stderr_file.
10787 (free_ui): Use delete.
10788 (execute_command_to_string): Use string_file.
10789 (quit_confirm): Use string_file.
10790 * tracepoint.c (collection_list::append_exp): Use string_file.
10791 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10792 * tui/tui-file.c: Don't include "ui-file.h".
10793 (enum streamtype, struct tui_stream): Delete.
10794 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10795 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10796 (tui_file::tui_file): New method.
10797 (tui_file_fputs): Delete.
10798 (tui_file_get_strbuf): Delete.
10799 (tui_file::puts): New method.
10800 (tui_file_adjust_strbuf): Delete.
10801 (tui_file_flush): Delete.
10802 (tui_file::flush): New method.
10803 * tui/tui-file.h: Tweak intro comment.
10804 Include ui-file.h.
10805 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10806 (tui_file_adjust_strbuf): Delete declarations.
10807 (class tui_file): New class.
10808 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10809 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10810 (tui_register_format): Use string_stream.
10811 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10812 (tui_get_function_from_frame): Use string_file.
10813 * typeprint.c (type_to_string): Use string_file.
10814 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10815 (null_stream): New global.
10816 (ui_file_delete): Delete.
10817 (ui_file::ui_file): New.
10818 (null_file_isatty): Delete.
10819 (ui_file::~ui_file): New.
10820 (null_file_rewind): Delete.
10821 (ui_file::printf): New.
10822 (null_file_put): Delete.
10823 (null_file_flush): Delete.
10824 (ui_file::putstr): New.
10825 (null_file_write): Delete.
10826 (ui_file::putstrn): New.
10827 (null_file_read): Delete.
10828 (ui_file::putc): New.
10829 (null_file_fputs): Delete.
10830 (null_file_write_async_safe): Delete.
10831 (ui_file::vprintf): New.
10832 (null_file_delete): Delete.
10833 (null_file::write): New.
10834 (null_file_fseek): Delete.
10835 (null_file::puts): New.
10836 (ui_file_data): Delete.
10837 (null_file::write_async_safe): New.
10838 (gdb_flush, ui_file_isatty): Adjust.
10839 (ui_file_put, ui_file_rewind): Delete.
10840 (ui_file_write): Adjust.
10841 (ui_file_write_for_put): Delete.
10842 (ui_file_write_async_safe, ui_file_read): Adjust.
10843 (ui_file_fseek): Delete.
10844 (fputs_unfiltered): Adjust.
10845 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10846 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10847 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10848 (set_ui_file_data): Delete.
10849 (string_file::~string_file, string_file::write)
10850 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10851 (do_ui_file_as_string, ui_file_as_string): Delete.
10852 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10853 (struct mem_file): Delete.
10854 (mem_file_new): Delete.
10855 (stdio_file::stdio_file): New.
10856 (mem_file_delete): Delete.
10857 (stdio_file::stdio_file): New.
10858 (mem_fileopen): Delete.
10859 (stdio_file::~stdio_file): New.
10860 (mem_file_rewind): Delete.
10861 (stdio_file::set_stream): New.
10862 (mem_file_put): Delete.
10863 (stdio_file::open): New.
10864 (mem_file_write): Delete.
10865 (stdio_file_magic, struct stdio_file): Delete.
10866 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10867 (stdio_file::flush): New.
10868 (stdio_file_read): Rename to ...
10869 (stdio_file::read): ... this. Adjust.
10870 (stdio_file_write): Rename to ...
10871 (stdio_file::write): ... this. Adjust.
10872 (stdio_file_write_async_safe): Rename to ...
10873 (stdio_file::write_async_safe) ... this. Adjust.
10874 (stdio_file_fputs): Rename to ...
10875 (stdio_file::puts) ... this. Adjust.
10876 (stdio_file_isatty): Delete.
10877 (stdio_file_fseek): Delete.
10878 (stdio_file::isatty): New.
10879 (stderr_file_write): Rename to ...
10880 (stderr_file::write) ... this. Adjust.
10881 (stderr_file_fputs): Rename to ...
10882 (stderr_file::puts) ... this. Adjust.
10883 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10884 (stderr_file::stderr_file): New.
10885 (tee_file_magic): Delete.
10886 (struct tee_file): Delete.
10887 (tee_file::tee_file): New.
10888 (tee_file_new): Delete.
10889 (tee_file::~tee_file): New.
10890 (tee_file_delete): Delete.
10891 (tee_file_flush): Rename to ...
10892 (tee_file::flush): ... this. Adjust.
10893 (tee_file_write): Rename to ...
10894 (tee_file::write): ... this. Adjust.
10895 (tee_file::write_async_safe): New.
10896 (tee_file_fputs): Rename to ...
10897 (tee_file::puts): ... this. Adjust.
10898 (tee_file_isatty): Rename to ...
10899 (tee_file::isatty): ... this. Adjust.
10900 * ui-file.h (struct obstack, struct ui_file): Don't
10901 forward-declare.
10902 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10903 (ui_file_write_ftype)
10904 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10905 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10906 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10907 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10908 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10909 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10910 (set_ui_file_fseek): Delete.
10911 (ui_file_data, ui_file_delete, ui_file_rewind)
10912 (struct ui_file): New.
10913 (ui_file_up): New.
10914 (class null_file): New.
10915 (null_stream): Declare.
10916 (ui_file_write_for_put, ui_file_put): Delete.
10917 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10918 Delete.
10919 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10920 (gdb_fopen, tee_file_new): Delete.
10921 (struct string_file): New.
10922 (struct stdio_file): New.
10923 (stdio_file_up): New.
10924 (struct stderr_file): New.
10925 (class tee_file): New.
10926 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10927 of a 'ui_file *'. Adjust.
10928 * ui-out.h (class ui_out) <field_stream>: Likewise.
10929 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10930 (null_stream): Delete.
10931 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10932 Adjust.
10933 * utils.h (struct ui_file): Delete forward declaration..
10934 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10935 (error_stream): Take a 'string_file &' instead of a
10936 'ui_file *'.
10937 * varobj.c (varobj_value_get_print_value): Use string_file.
10938 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10939 * gdbarch.c: Regenerate.
10940
187808b0
PA
109412017-02-02 Pedro Alves <palves@redhat.com>
10942
10943 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10944 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10945 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10946 Adjust to call gdb_print_insn instead of
10947 gdb_disassembler::print_insn.
10948 (dump_insns, do_mixed_source_and_assembly_deprecated)
10949 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10950 'gdbarch' parameter. Remove gdb_disassembler parameter.
10951 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10952 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10953 declaration.
10954 (gdb_pretty_print_insn): Re-add declaration.
10955 * record-btrace.c (btrace_insn_history): Don't allocate a
10956 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10957
7a8eb317
SM
109582017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10959
10960 * disasm.h (gdb_disassembly): Remove file_string parameter.
10961 * disasm.c (gdb_disassembly): Likewise.
10962 * cli/cli-cmds.c (print_disassembly): Adapt.
10963 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10964 * stack.c (do_gdb_disassembly): Likewise.
10965
7346ef59
AA
109662017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10967
10968 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10969 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10970 targets. And if the implicit value is longer than needed, extract
10971 the first bytes instead of the "least significant" ones.
10972
cd4007e4
MM
109732017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10974
10975 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10976 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10977 (btrace_fetch): Assert can_access_registers_ptid.
10978 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10979 validate_registers_access.
10980
cf77c34e
MM
109812017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10982
10983 * gdbthread.h (can_access_registers_ptid): New.
10984 * thread.c (can_access_registers_ptid): New.
10985
be85ce7d
PA
109862017-02-01 Pedro Alves <palves@redhat.com>
10987
10988 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10989
29b0b251
PA
109902017-01-31 Pedro Alves <palves@redhat.com>
10991
10992 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10993 Fix typos.
10994
289b5b24
PA
109952017-01-31 Pedro Alves <palves@redhat.com>
10996
10997 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10998 not used.
10999
b47413b4
PA
110002017-01-31 Pedro Alves <palves@redhat.com>
11001
11002 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11003
60adb36c
PA
110042017-01-31 Pedro Alves <palves@redhat.com>
11005
11006 * common/scoped_restore.h
11007 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11008 change the value's parameter type to T2.
11009 (make_scoped_restore): Likewise.
11010
2735833d
WT
110112017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11012 Richard Henderson <rth@redhat.com>
11013
11014 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11015 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11016 GS_BASE for older kernels.
11017 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11018 GS_BASE for older kernels.
11019 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11020 and GS_BASE to the offset table.
11021 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11022 system register group.
11023 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11024 for older kernels.
11025 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11026 amd64 ABI.
11027 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11028 AMD64_GSBASE_REGNUM.
11029 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11030 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11031 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11032 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11033 i386/64bit-segments.xml in those rules.
11034 * features/i386/64bit-segments.xml: New file.
11035 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11036 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11037 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11038 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11039 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11040 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11041 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11042 * features/i386/amd64-avx-linux.c: Regenerated.
11043 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11044 * features/i386/amd64-avx-mpx.c: Regenerated.
11045 * features/i386/amd64-avx512-linux.c: Regenerated.
11046 * features/i386/amd64-linux.c: Regenerated.
11047 * features/i386/amd64-mpx-linux.c: Regenerated.
11048 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11049 * features/i386/i386-avx-mpx.c: Regenerated.
11050 * features/i386/x32-avx-linux.c: Regenerated.
11051 * features/i386/x32-avx512-linux.c: Regenerated.
11052 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11053 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11054 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11055 * regformats/i386/amd64-linux.dat: Regenerated.
11056 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11057 * regformats/i386/x32-avx-linux.dat: Regenerated.
11058 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11059 * regformats/i386/x32-linux.dat: Regenerated.
11060
8884e97e
WT
110612017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11062
11063 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11064 Set to AMD64_NUM_REGS.
11065
7005d26a
WT
110662017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11067
11068 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11069 that checks validity of a register number.
11070
4bd2e1b2
KC
110712017-01-27 Kees Cook <keescook@google.com>
11072
11073 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11074 fetch_fpregs if target has fpa registers.
11075 (arm_linux_store_inferior_registers): Call store_fpregs if target
11076 has fpa registers.
11077
7cf1de6c
AA
110782017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11079
11080 * cris-tdep.c (cris_gdbarch_init): Remove check for
11081 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11082
874a1c8c
AT
110832017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11084
11085 * corelow.c (get_core_register_section): Check for regset
11086 existence before checking for REGSET_VARIABLE_SIZE.
11087
d8b49cf0
YQ
110882017-01-26 Yao Qi <yao.qi@linaro.org>
11089 Pedro Alves <palves@redhat.com>
11090
11091 PR gdb/20939
11092 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11093 call memory_error, save memaddr instead.
11094 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11095 negative, cal memory_error.
11096 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11097
658ca58c
YQ
110982017-01-26 Yao Qi <yao.qi@linaro.org>
11099
11100 * disasm-selftests.c (memory_error_test): New function.
11101 (_initialize_disasm_selftests): Register memory_error_test.
11102
79843d45
YQ
111032017-01-26 Yao Qi <yao.qi@linaro.org>
11104
11105 * Makefile.in (SFILES): Add disasm-selftests.c and
11106 selftest-arch.c.
11107 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11108 * disasm-selftests.c: New file.
11109 * selftest-arch.c: New file.
11110 * selftest-arch.h: New file.
11111
8cafda32
YQ
111122017-01-26 Yao Qi <yao.qi@linaro.org>
11113
11114 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11115 to bfd_arch_mep. Don't return 0 if section is not
11116 found. Call print_insn_mep.
11117
e47ad6c0
YQ
111182017-01-26 Pedro Alves <palves@redhat.com>
11119 Yao Qi <yao.qi@linaro.org>
11120
11121 * arm-tdep.c: Include "disasm.h".
11122 (gdb_print_insn_arm): Update code to get gdbarch.
11123 * disasm.c (dis_asm_read_memory): Change it to
11124 gdb_disassembler::dis_asm_read_memory.
11125 (dis_asm_memory_error): Likewise.
11126 (dis_asm_print_address): Likewise.
11127 (gdb_pretty_print_insn): Change it to
11128 gdb_disassembler::pretty_print_insn.
11129 (dump_insns): Add one argument gdb_disassemlber. All
11130 callers updated.
11131 (do_mixed_source_and_assembly_deprecated): Likewise.
11132 (do_mixed_source_and_assembly): Likewise.
11133 (do_assembly_only): Likewise.
11134 (gdb_disassembler::gdb_disassembler): New.
11135 (gdb_disassembler::print_insn): New.
11136 * disasm.h (class gdb_disassembler): New.
11137 (gdb_pretty_print_insn): Remove declaration.
11138 (gdb_disassemble_info): Likewise.
11139 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11140 (gdbscm_disasm_read_memory_worker): Update.
11141 (gdbscm_disasm_read_memory): Update.
11142 (gdbscm_disasm_memory_error): Remove.
11143 (gdbscm_disasm_print_address): Remove.
11144 (gdbscm_disassembler::gdbscm_disassembler): New.
11145 (gdbscm_print_insn_from_port): Update.
11146 * mips-tdep.c: Include disasm.h.
11147 (gdb_print_insn_mips): Update code to get gdbarch.
11148 * record-btrace.c (btrace_insn_history): Update.
11149 * spu-tdep.c: Include disasm.h.
11150 (struct spu_dis_asm_data): Remove.
11151 (struct spu_dis_asm_info): New.
11152 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11153 SPU id.
11154 (gdb_print_insn_spu): Cast disassemble_info to
11155 spu_dis_asm_info.
11156
80d75874
YQ
111572017-01-26 Yao Qi <yao.qi@linaro.org>
11158
11159 * disasm.c (do_ui_file_delete): Delete.
11160 (gdb_insn_length): Move code creating stream to ...
11161 * utils.c (null_stream): ... here. New function.
11162 * utils.h (null_stream): Declare.
11163
60685cd0
SM
111642017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11165
11166 * python/py-inferior.c (find_thread_object): Return directly
11167 from the loop. Remove "found" variable.
11168
eb1cdb62
JB
111692017-01-21 Joel Brobecker <brobecker@adacore.com>
11170
11171 GDB 7.12.1 released.
11172
b1ce6568
SM
111732017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11174
11175 * python/py-function.c (fnpy_call): Reorder declarations to have
11176 the gdbpy_enter object declared first.
11177 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11178
6f8b0407
SM
111792017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11180
fec93fb1 11181 PR python/21068
6f8b0407
SM
11182 * python/python-internal.h (PyMem_RawMalloc): Define for
11183 Python < 3.4.
11184 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11185 PyMem_RawMalloc instead of PyMem_Malloc.
11186
78cbbba8
LM
111872017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11188 Luis Machado <lgustavo@codesourcery.com>
11189
11190 * NEWS (New commands): Mention flash-erase.
11191 (New MI commands): Mention target-flash-erase.
11192 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11193 command.
11194 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11195 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11196 * target.c (flash_erase_command): New function.
11197 (initialize_targets): Add new flash-erase command.
11198 * target.h (flash_erase_command): New declaration.
11199
2132fe85
JB
112002017-01-20 Joel Brobecker <brobecker@adacore.com>
11201
11202 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11203 HAVE_SYS_PROCFS_H is defined.
11204
d1dff226
AH
112052017-01-18 Alan Hayward <alan.hayward@arm.com>
11206
11207 * remote.c (struct cached_reg): Change data into a pointer.
11208 * (stop_reply_dtr): Free data pointers before deleting vector.
11209 (process_stop_reply): Likewise.
11210 (remote_parse_stop_reply): Allocate space for data
11211
9890e433
AH
112122017-01-18 Alan Hayward <alan.hayward@arm.com>
11213
11214 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11215 MAX_REGISTER_SIZE.
11216 (amd64_pseudo_register_read_value): Likewise.
11217 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11218 (store_register_using_P): Likewise.
11219 * regcache.c (regcache_xfer_part): Likewise.
11220
7a36499a
IR
112212017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11222
11223 Split real and pseudo registers.
11224 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11225 (sparc32_pseudo_regnum): New enum.
11226 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11227 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11228 (SPARC32_CP0_REGISTERS): New macro.
11229 (sparc32_pseudo_register_name): New function.
11230 (sparc32_register_name): Use sparc32_pseudo_register_name.
11231 (sparc32_pseudo_register_type): New function.
11232 (sparc32_register_type): Use sparc32_pseudo_register_type.
11233 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11234 pseudo register numbers.
11235 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11236 (SPARC64_CP0_REGISTERS): New macro.
11237 (sparc64_pseudo_register_name): New function.
11238 (sparc64_register_name): Use sparc64_pseudo_register_name.
11239 (sparc64_pseudo_register_type): New function.
11240 (sparc64_register_type): Use sparc64_pseudo_register_type.
11241 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11242 pseudo register numbers.
11243 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11244 sparc64_store_arguments): Handle pseudo register numbers.
11245
6f8976bf
YQ
112462017-01-13 Yao Qi <yao.qi@linaro.org>
11247
11248 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11249 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11250 output.
11251 (getpkt_or_notif_sane_1): Likewise.
11252
e4241ace
YQ
112532017-01-13 Yao Qi <yao.qi@linaro.org>
11254
11255 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11256 of CC. Pass "-x c++-header" instead of "-x c".
11257
3015c064
SM
112582017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11259
11260 * remote.c (remote_can_async_p): Update comment.
11261
fde1b17d
SM
112622017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11263
11264 * linux-nat.c (linux_nat_can_async_p): Update comment.
11265
ca1ca08b
SM
112662017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11267
11268 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11269
4ad2da73
SM
112702017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11271
11272 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11273
c8b23b3f
TT
112742017-01-10 Tom Tromey <tom@tromey.com>
11275
11276 * python/py-type.c (typy_legacy_template_argument): Update.
11277 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11278 ~demangle_parse_info): Declare new members.
11279 (cp_demangled_name_to_comp): Return unique_ptr.
11280 (cp_demangled_name_parse_free)
11281 (make_cleanup_cp_demangled_name_parse_free)
11282 (cp_new_demangle_parse_info): Remove.
11283 * cp-support.c (do_demangled_name_parse_free_cleanup)
11284 (make_cleanup_cp_demangled_name_parse_free): Remove.
11285 (inspect_type, cp_canonicalize_string_full)
11286 (cp_canonicalize_string): Update.
11287 (mangled_name_to_comp): Change return type.
11288 (cp_class_name_from_physname, method_name_from_physname)
11289 (cp_func_name, cp_remove_params): Update.
11290 * cp-name-parser.y (demangle_parse_info): New constructor, from
11291 cp_new_demangle_parse_info.
11292 (~demangle_parse_info): New destructor, from
11293 cp_demangled_name_parse_free.
11294 (cp_merge_demangle_parse_infos): Update.
11295 (cp_demangled_name_to_comp): Change return type.
11296
1ac32117
TT
112972017-01-10 Tom Tromey <tom@tromey.com>
11298
11299 * top.c (prevent_dont_repeat): Change return type.
11300 * python/python.c (execute_gdb_command): Use std::string.
11301 Update.
11302 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11303 * command.h (prevent_dont_repeat): Change return type.
11304 * breakpoint.c (bpstat_do_actions_1): Update.
11305
0cf08227
TT
113062017-01-10 Tom Tromey <tom@tromey.com>
11307
11308 * value.h (scoped_value_mark::~scoped_value_mark): Call
11309 free_to_mark.
11310 (scoped_value_mark::free_to_mark): New method.
11311 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11312 scoped_value_mark.
11313
eb115069
TT
113142017-01-10 Tom Tromey <tom@tromey.com>
11315
11316 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11317 (valpy_reference_value, valpy_const_value, valpy_get_address)
11318 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11319 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11320 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11321 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11322 scoped_value_mark.
11323 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11324 * value.h (scoped_value_mark): New class.
11325
906768f9
TT
113262017-01-10 Tom Tromey <tom@tromey.com>
11327
11328 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11329 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11330 * psymtab.c (discard_psymtabs_upto): Remove.
11331 (make_cleanup_discard_psymtabs): Remove.
11332 (struct psymtab_state): Remove.
11333
bef155c3
TT
113342017-01-10 Tom Tromey <tom@tromey.com>
11335
11336 * record-full.c (record_full_save_cleanups): Remove.
11337 (record_full_save): Use gdb::unlinker.
11338 * gcore.c (do_bfd_delete_cleanup): Remove.
11339 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11340 cleanups.
11341 * dwarf2read.c (unlink_if_set): Remove.
11342 (write_psymtabs_to_index): Use gdb::unlinker.
11343 * common/gdb_unlinker.h: New file.
11344
192b62ce
TT
113452017-01-10 Tom Tromey <tom@tromey.com>
11346
11347 * windows-tdep.c (windows_xfer_shared_library): Update.
11348 * windows-nat.c (windows_make_so): Update.
11349 * utils.h (make_cleanup_bfd_unref): Remove.
11350 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11351 * symfile.h (symfile_bfd_open)
11352 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11353 * symfile.c (read_symbols, symbol_file_add)
11354 (separate_debug_file_exists): Update.
11355 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11356 (generic_load, reread_symbols): Update.
11357 * symfile-mem.c (symbol_file_add_from_memory): Update.
11358 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11359 (spu_symbol_file_add_from_memory): Update.
11360 * solist.h (struct target_so_ops) <bfd_open>: Return
11361 gdb_bfd_ref_ptr.
11362 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11363 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11364 gdb_bfd_ref_ptr.
11365 (solib_map_sections, reload_shared_libraries_1): Update.
11366 * solib-svr4.c (enable_break): Update.
11367 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11368 * solib-frv.c (enable_break2): Update.
11369 * solib-dsbt.c (enable_break): Update.
11370 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11371 gdb_bfd_ref_ptr.
11372 (darwin_solib_get_all_image_info_addr_at_init): Update.
11373 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11374 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11375 * record-full.c (record_full_save): Update.
11376 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11377 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11378 * minidebug.c (find_separate_debug_file_in_section): Return
11379 gdb_bfd_ref_ptr.
11380 * machoread.c (macho_add_oso_symfile): Change abfd to
11381 gdb_bfd_ref_ptr.
11382 (macho_symfile_read_all_oso): Update.
11383 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11384 (macho_symfile_read): Update.
11385 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11386 (jit_bfd_try_read_symtab): Update.
11387 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11388 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11389 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11390 gdb_bfd_ref_ptr.
11391 (gdb_bfd_ref_policy): New struct.
11392 (gdb_bfd_ref_ptr): New typedef.
11393 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11394 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11395 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11396 gdb_bfd_ref_ptr.
11397 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11398 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11399 (gcore_command): Update.
11400 * exec.c (exec_file_attach): Update.
11401 * elfread.c (elf_symfile_read): Update.
11402 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11403 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11404 (open_and_init_dwo_file): Update.
11405 (open_dwp_file): Return gdb_bfd_ref_ptr.
11406 (open_and_init_dwp_file): Update.
11407 * corelow.c (core_open): Update.
11408 * compile/compile-object-load.c (compile_object_load): Update.
11409 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11410 * coffread.c (coff_symfile_read): Update.
11411 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11412 gdb_bfd_ref_ptr. Rename.
11413 (dump_bfd_file, restore_command): Update.
11414 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11415 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11416 (find_separate_debug_file_by_buildid): Update.
11417
50315b21
TT
114182017-01-10 Tom Tromey <tom@tromey.com>
11419
11420 * common/gdb_ref_ptr.h: New file.
11421 * python/py-ref.h (struct gdbpy_ref_policy): New.
11422 (gdbpy_ref): Now a typedef.
11423
fc4007c9
TT
114242017-01-10 Tom Tromey <tom@tromey.com>
11425
11426 * utils.h (make_cleanup_htab_delete): Don't declare.
11427 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11428 Remove.
11429 * linespec.c (decode_compound_collector): Add constructor,
11430 destructor.
11431 (lookup_prefix_sym): Remove cleanup.
11432 (symtab_collector): Add constructor, destructor.
11433 (collect_symtabs_from_filename): Remove cleanup.
11434 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11435 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11436 Use htab_up.
11437 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11438 * dwarf2read.c (dw2_expand_symtabs_matching)
11439 (dw2_map_symbol_filenames, dwarf_decode_macros)
11440 (write_psymtabs_to_index): Use htab_up.
11441 * dwarf2loc.c (func_verify_no_selftailcall)
11442 (call_site_find_chain_1, func_verify_no_selftailcall)
11443 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11444 std::vector, gdb::unique_xmalloc_ptr.
11445 (call_sitep): Remove typedef.
11446 (dwarf2_locexpr_baton_eval): Remove unused variable.
11447
8dbcee67
TT
114482017-01-10 Tom Tromey <tom@tromey.com>
11449
11450 * python/python-internal.h (make_cleanup_py_decref)
11451 (make_cleanup_py_xdecref): Don't declare.
11452 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11453 (py_xdecref, make_cleanup_py_xdecref): Remove.
11454
13df46cc
TT
114552017-01-10 Tom Tromey <tom@tromey.com>
11456
11457 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11458 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11459
06fc9bf7
TT
114602017-01-10 Tom Tromey <tom@tromey.com>
11461
11462 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11463
830a4934
TT
114642017-01-10 Tom Tromey <tom@tromey.com>
11465
11466 * python/py-utils.c (unicode_to_encoded_string)
11467 (python_string_to_target_string)
11468 (python_string_to_target_python_string)
11469 (python_string_to_host_string, gdbpy_obj_to_string)
11470 (get_addr_from_python): Use gdbpy_ref.
11471
4586d543
TT
114722017-01-10 Tom Tromey <tom@tromey.com>
11473
11474 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11475 gdbpy_ref.
11476
59876f8f
TT
114772017-01-10 Tom Tromey <tom@tromey.com>
11478
11479 * python/python.c (eval_python_command, gdbpy_decode_line)
11480 (gdbpy_run_events, gdbpy_start_type_printers)
11481 (gdbpy_apply_type_printers): Use gdbpy_ref.
11482
97d83487
TT
114832017-01-10 Tom Tromey <tom@tromey.com>
11484
11485 * python/py-param.c (get_doc_string, compute_enum_values): Use
11486 gdbpy_ref.
11487
9205649a
TT
114882017-01-10 Tom Tromey <tom@tromey.com>
11489
11490 * python/py-inferior.c (find_thread_object, build_inferior_list):
11491 Use gdbpy_ref.
11492
74c49d45
TT
114932017-01-10 Tom Tromey <tom@tromey.com>
11494
11495 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11496
16361ffb
TT
114972017-01-10 Tom Tromey <tom@tromey.com>
11498
11499 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11500 gdbpy_ref.
11501
905f2cca
TT
115022017-01-10 Tom Tromey <tom@tromey.com>
11503
11504 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11505 extra incref.
11506 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11507 Use gdbpy_ref.
11508
64081434
TT
115092017-01-10 Tom Tromey <tom@tromey.com>
11510
11511 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11512 gdbpy_ref.
11513
59e9e831
TT
115142017-01-10 Tom Tromey <tom@tromey.com>
11515
11516 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11517 decref results of PyArg_ParseTupleAndKeywords.
11518
9de10f6d
TT
115192017-01-10 Tom Tromey <tom@tromey.com>
11520
11521 * python/python.c (python_run_simple_file): Use
11522 unique_xmalloc_ptr, gdbpy_ref.
11523
2bd5759d
TT
115242017-01-10 Tom Tromey <tom@tromey.com>
11525
11526 * python/py-prettyprint.c (print_stack_unless_memory_error)
11527 (print_string_repr, print_children): Use gdbpy_ref.
11528 (dummy_python_frame): New class.
11529 (dummy_python_frame::dummy_python_frame): Rename from
11530 push_dummy_python_frame.
11531 (py_restore_tstate): Remove.
11532
3b4e0e01
TT
115332017-01-10 Tom Tromey <tom@tromey.com>
11534
11535 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11536
17a22718
TT
115372017-01-10 Tom Tromey <tom@tromey.com>
11538
11539 * python/python.c (ensure_python_env, restore_python_env):
11540 Remove.
11541 * python/python-internal.h (ensure_python_env): Don't declare.
11542 * varobj.h (varobj_ensure_python_env): Don't declare.
11543 * varobj.c (varobj_ensure_python_env): Remove.
11544
68cdc557
TT
115452017-01-10 Tom Tromey <tom@tromey.com>
11546
11547 * varobj.c (varobj_value_get_print_value): Use
11548 gdbpy_enter_varobj.
11549
1eba6383
TT
115502017-01-10 Tom Tromey <tom@tromey.com>
11551
11552 * python/py-prettyprint.c (print_string_repr, print_children):
11553 Update.
11554 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11555 of "encoding".
11556 * varobj.c (varobj_value_get_print_value): Update.
11557 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11558
bde7b3e3
TT
115592017-01-10 Tom Tromey <tom@tromey.com>
11560
11561 * varobj.c (varobj_get_display_hint)
11562 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11563 (varobj_set_visualizer, free_variable): Use
11564 gdbpy_enter_varobj.
11565
a7785f8c
TT
115662017-01-10 Tom Tromey <tom@tromey.com>
11567
11568 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11569 (do_finish_initialization): New function. Use gdbpy_ref.
11570 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11571 do_finish_initialization.
11572
2865bfce
TT
115732017-01-10 Tom Tromey <tom@tromey.com>
11574
11575 * python/py-param.c (get_set_value, get_show_value): Use
11576 gdbpy_enter, gdbpy_ref.
11577
0e9dcc75
TT
115782017-01-10 Tom Tromey <tom@tromey.com>
11579
11580 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11581
12a5cedd
TT
115822017-01-10 Tom Tromey <tom@tromey.com>
11583
11584 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11585
788f2586
TT
115862017-01-10 Tom Tromey <tom@tromey.com>
11587
11588 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11589 Use gdbpy_enter_varobj.
11590
6cd67bea
TT
115912017-01-10 Tom Tromey <tom@tromey.com>
11592
11593 * varobj.c (gdbpy_enter_varobj): New constructor.
11594 * python/python-internal.h (gdbpy_enter_varobj): New class.
11595 * python/py-varobj.c (py_varobj_get_iterator): Use
11596 gdbpy_enter_varobj.
11597
14b122bf
TT
115982017-01-10 Tom Tromey <tom@tromey.com>
11599
11600 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11601 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11602 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11603 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11604 unique_xmalloc_ptr.
11605 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11606
bf1ca3b9
TT
116072017-01-10 Tom Tromey <tom@tromey.com>
11608
11609 * python/py-xmethods.c (invoke_match_method): Use
11610 gdbpy_ref.
11611
572a5524
TT
116122017-01-10 Tom Tromey <tom@tromey.com>
11613
11614 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11615 gdbpy_enter, gdbpy_ref.
11616
396a78b6
TT
116172017-01-10 Tom Tromey <tom@tromey.com>
11618
11619 * python/python.c (python_interactive_command): Use gdbpy_enter.
11620
a88b13c7
TT
116212017-01-10 Tom Tromey <tom@tromey.com>
11622
11623 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11624 gdbpy_ref.
11625
e9f0c363
TT
116262017-01-10 Tom Tromey <tom@tromey.com>
11627
11628 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11629 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11630
6349f452
TT
116312017-01-10 Tom Tromey <tom@tromey.com>
11632
11633 * utils.h (htab_deleter): New struct.
11634 (htab_up): New typedef.
11635 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11636 gdbpy_enter, gdbpy_ref, htab_up.
11637
c0171de6
TT
116382017-01-10 Tom Tromey <tom@tromey.com>
11639
11640 * python/py-unwind.c (pending_frame_invalidate): Remove.
11641 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11642
f18e226f
TT
116432017-01-10 Tom Tromey <tom@tromey.com>
11644
11645 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11646 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11647
c57af3f1
TT
116482017-01-10 Tom Tromey <tom@tromey.com>
11649
11650 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11651
60e600ec
TT
116522017-01-10 Tom Tromey <tom@tromey.com>
11653
11654 * python/python.c (gdbpy_eval_from_control_command)
11655 (gdbpy_source_script, gdbpy_run_events)
11656 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11657 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11658 gdbpy_enter.
11659
bf7da5b0
TT
116602017-01-10 Tom Tromey <tom@tromey.com>
11661
11662 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11663
2d38bced
TT
116642017-01-10 Tom Tromey <tom@tromey.com>
11665
11666 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11667
07bc7329
TT
116682017-01-10 Tom Tromey <tom@tromey.com>
11669
11670 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11671 (python_on_inferior_call_pre, python_on_inferior_call_post)
11672 (python_on_memory_change, python_on_register_change)
11673 (python_inferior_exit, python_new_objfile, add_thread_object)
11674 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11675
6e7c365e
TT
116762017-01-10 Tom Tromey <tom@tromey.com>
11677
11678 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11679 (bpfinishpy_handle_exit): Use gdbpy_enter.
11680
6ba0cd40
TT
116812017-01-10 Tom Tromey <tom@tromey.com>
11682
11683 * python/py-cmd.c (cmdpy_destroyer)
11684 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11685 gdbpy_enter.
11686
de2dc875
TT
116872017-01-10 Tom Tromey <tom@tromey.com>
11688
11689 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11690 gdbpy_enter.
11691 (gdbpy_breakpoint_has_cond): Likewise.
11692
4ecee2c4
TT
116932017-01-10 Tom Tromey <tom@tromey.com>
11694
11695 * python/python.c (gdbpy_enter): New constructor.
11696 (~gdbpy_enter): New destructor.
11697 (restore_python_env, ensure_python_env): Rewrite.
11698 * python/python-internal.h (gdbpy_enter): New class.
11699
37fce74f
TT
117002017-01-10 Tom Tromey <tom@tromey.com>
11701
11702 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11703
53a0cca3
TT
117042017-01-10 Tom Tromey <tom@tromey.com>
11705
11706 * python/py-value.c (value_has_field, get_field_flag)
11707 (get_field_type, valpy_getitem, convert_value_from_python): Use
11708 gdbpy_ref.
11709
ff3724f5
TT
117102017-01-10 Tom Tromey <tom@tromey.com>
11711
11712 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11713 gdbpy_ref.
11714
0700aea5
TT
117152017-01-10 Tom Tromey <tom@tromey.com>
11716
11717 * python/py-prettyprint.c (search_pp_list)
11718 (find_pretty_printer_from_objfiles)
11719 (find_pretty_printer_from_progspace)
11720 (find_pretty_printer_from_gdb, find_pretty_printer)
11721 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11722 gdbpy_ref.
11723
1bb44c9f
TT
117242017-01-10 Tom Tromey <tom@tromey.com>
11725
11726 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11727
87ce03fd
TT
117282017-01-10 Tom Tromey <tom@tromey.com>
11729
11730 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11731 (ltpy_get_all_source_lines): Use gdbpy_ref.
11732
ee0a3fb8
TT
117332017-01-10 Tom Tromey <tom@tromey.com>
11734
11735 * python/py-framefilter.c (extract_sym, extract_value)
11736 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11737 gdbpy_ref.
11738
bf2a52fa
TT
117392017-01-10 Tom Tromey <tom@tromey.com>
11740
11741 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11742
f59fe7f8
TT
117432017-01-10 Tom Tromey <tom@tromey.com>
11744
11745 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11746
80bd970a
TT
117472017-01-10 Tom Tromey <tom@tromey.com>
11748
11749 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11750 gdbpy_ref.
11751
d1b3de2e
TT
117522017-01-10 Tom Tromey <tom@tromey.com>
11753
11754 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11755
3bb43384
TT
117562017-01-10 Tom Tromey <tom@tromey.com>
11757
11758 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11759 (typy_range): Use gdbpy_ref.
11760
abf5651e
TT
117612017-01-10 Tom Tromey <tom@tromey.com>
11762
11763 * python/py-threadevent.c (create_thread_event_object): Use
11764 gdbpy_ref.
11765 * python/py-stopevent.c (create_stop_event_object): Simplify.
11766 (emit_stop_event): Use gdbpy_ref.
11767 * python/py-signalevent.c (create_signal_event_object): Use
11768 gdbpy_ref.
11769 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11770 (emit_new_objfile_event, create_clear_objfiles_event_object)
11771 (emit_clear_objfiles_event): Use gdbpy_ref.
11772 * python/py-infevents.c (create_inferior_call_event_object)
11773 (create_register_changed_event_object)
11774 (create_memory_changed_event_object, emit_inferior_call_event)
11775 (emit_memory_changed_event, emit_register_changed_event): Use
11776 gdbpy_ref.
11777 * python/py-exitedevent.c (create_exited_event_object)
11778 (emit_exited_event): Use gdbpy_ref.
11779 * python/py-event.h (evpy_emit_event): Remove
11780 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11781 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11782 * python/py-continueevent.c (emit_continue_event): Use
11783 gdbpy_ref.
11784 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11785 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11786 gdbpy_ref.
11787 * python/py-bpevent.c (create_breakpoint_event_object): Use
11788 gdbpy_ref.
11789
a68ff33e
TT
117902017-01-10 Tom Tromey <tom@tromey.com>
11791
11792 * python/py-ref.h: New file.
11793
7becfd03
SM
117942017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11795
11796 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11797 void.
11798 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11799 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11800 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11801 * ui-out.c (ui_out::redirect): Likewise.
11802 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11803 * cli/cli-logging.c (set_logging_redirect): Update call site of
11804 ui_out::redirect.
11805 (handle_redirections): Likewise.
11806 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11807 * top.c (execute_command_to_string): Likewise.
11808 * utils.c (do_ui_out_redirect_pop): Likewise.
11809
df294654
SM
118102017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11811
11812 * stack.c (_initialize_stack): Update "frame" command help message.
11813
f5e6296e
IB
118142017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11815
11816 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11817
0e2d6fa6
YQ
118182017-01-06 Yao Qi <yao.qi@linaro.org>
11819
11820 * x86-linux-nat.h: Include gdb_proc_service.h.
11821
44d6d3f9
YQ
118222017-01-06 Yao Qi <yao.qi@linaro.org>
11823
11824 * ser-base.h: Include serial.h.
11825
656731fe
YQ
118262017-01-06 Yao Qi <yao.qi@linaro.org>
11827
11828 * ppc-linux-tdep.h: Include ppc-tdep.h.
11829
1ca8f924
YQ
118302017-01-06 Yao Qi <yao.qi@linaro.org>
11831
11832 * nat/amd64-linux-siginfo.h: Include signal.h.
11833
bc3008c4
YQ
118342017-01-06 Yao Qi <yao.qi@linaro.org>
11835
11836 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11837
66c80d03
YQ
118382017-01-06 Yao Qi <yao.qi@linaro.org>
11839
11840 * mi/mi-parse.h: Include mi-cmds.h.
11841
051d2dda
YQ
118422017-01-06 Yao Qi <yao.qi@linaro.org>
11843
11844 * inf-loop.c: Don't include "target.h".
11845 * inf-loop.h: Include it here.
11846
8018d34f
YQ
118472017-01-06 Yao Qi <yao.qi@linaro.org>
11848
11849 * dfp.h: Include "dboulest.h" and "expression.h".
11850
c0b8369c
YQ
118512017-01-06 Yao Qi <yao.qi@linaro.org>
11852
11853 * ax-gdb.h: Include "ax.h".
11854
ad5cba2a
YQ
118552017-01-06 Yao Qi <yao.qi@linaro.org>
11856
11857 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11858 with nat/gdb_ptrace.h.
11859
1c33cd7f
YQ
118602017-01-05 Yao Qi <yao.qi@linaro.org>
11861
11862 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11863 new line.
11864 (mips64_fbsd_sigframe_init): Likewise.
11865
c988ac1d
JB
118662017-01-04 John Baldwin <jhb@FreeBSD.org>
11867
11868 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11869 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11870
b268007c
JB
118712017-01-04 John Baldwin <jhb@FreeBSD.org>
11872
11873 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11874 * NEWS: Mention new FreeBSD/mips native configuration.
11875 * config/mips/fbsd.mh: New file.
11876 * configure.host: Add mips*-*-freebsd*.
11877 * mips-fbsd-nat.c: New file.
11878
387360da
JB
118792017-01-04 John Baldwin <jhb@FreeBSD.org>
11880
11881 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11882 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11883 * NEWS: Mention new FreeBSD/mips target.
11884 * configure.tgt: Add mips*-*-freebsd*.
11885 * mips-fbsd-tdep.c: New file.
11886 * mips-fbsd-tdep.h: New file.
11887
2aaaf250
YQ
118882017-01-04 Yao Qi <yao.qi@linaro.org>
11889
11890 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11891 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11892
61baf725
JB
118932017-01-01 Joel Brobecker <brobecker@adacore.com>
11894
6dbb839a 11895 Update copyright year range in all GDB files.
61baf725 11896
c113e7ff 118972017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 11898
c113e7ff 11899 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 11900
c113e7ff 11901For older changes see ChangeLog-2016.
c906108c
SS
11902\f
11903Local Variables:
11904mode: change-log
11905left-margin: 8
11906fill-column: 74
11907version-control: never
57da7796 11908coding: utf-8
c906108c 11909End:
This page took 4.4035 seconds and 4 git commands to generate.