Constify some commands in infcmd.c
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
69f476a3
TT
12017-09-27 Tom Tromey <tom@tromey.com>
2
3 * infcmd.c (environment_info, set_environment_command)
4 (unset_environment_command, path_info, info_proc_cmd_1)
5 (info_proc_cmd_mappings, info_proc_cmd_stat)
6 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
7 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
8
c4a3e68e
TT
92017-09-27 Tom Tromey <tom@tromey.com>
10
11 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
12 Constify.
13
c9d31bd6
TT
142017-09-27 Tom Tromey <tom@tromey.com>
15
16 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
17
1f3f85eb
TT
182017-09-27 Tom Tromey <tom@tromey.com>
19
20 * demangle.c (demangle_command): Constify.
21
9c504b5d
TT
222017-09-27 Tom Tromey <tom@tromey.com>
23
24 * progspace.c (maintenance_info_program_spaces_command):
25 Constify.
26
6663cf91
TT
272017-09-27 Tom Tromey <tom@tromey.com>
28
29 * compile/compile.c (check_raw_argument, compile_file_command)
30 (compile_code_command, compile_print_command): Constify.
31
34e5fa26
TT
322017-09-27 Tom Tromey <tom@tromey.com>
33
34 * reggroups.c (maintenance_print_reggroups): Constify.
35
8384c356
TT
362017-09-27 Tom Tromey <tom@tromey.com>
37
38 * dwarf2read.c (save_gdb_index_command): Constify.
39
884beb0c
TT
402017-09-27 Tom Tromey <tom@tromey.com>
41
42 * stap-probe.c (info_probes_stap_command): Constify.
43
e0b2930c
TT
442017-09-27 Tom Tromey <tom@tromey.com>
45
46 * fork-child.c (unset_exec_wrapper_command): Constify.
47
f938677d
TT
482017-09-27 Tom Tromey <tom@tromey.com>
49
50 * btrace.c (get_uint, get_context_size, no_chunk)
51 (maint_btrace_packet_history_cmd)
52 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
53 (maint_info_btrace_cmd): Constify.
54
8949cb87
TT
552017-09-27 Tom Tromey <tom@tromey.com>
56
57 * reverse.c (delete_bookmark_command): Constify.
58
ac88e2de
TT
592017-09-27 Tom Tromey <tom@tromey.com>
60
61 * remote.c (set_memory_packet_size)
62 (set_memory_write_packet_size, show_memory_write_packet_size)
63 (set_memory_read_packet_size, show_memory_read_packet_size)
64 (compare_sections_command, packet_command, remote_put_command)
65 (remote_get_command, remote_delete_command): Constify.
66
bd4c9dfe
TT
672017-09-27 Tom Tromey <tom@tromey.com>
68
69 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
70 (set_mipsfpu_double_command, set_mipsfpu_none_command)
71 (set_mipsfpu_auto_command): Constify.
72
5e93d4c6
TT
732017-09-27 Tom Tromey <tom@tromey.com>
74
75 * cli/cli-cmds.h (cd_command): Constify.
76 * cli/cli-cmds.c (cd_command): Constify.
77
fc41a75b
TT
782017-09-27 Tom Tromey <tom@tromey.com>
79
80 * thread.c (thread_name_command, thread_find_command): Constify.
81
67810076
TT
822017-09-27 Tom Tromey <tom@tromey.com>
83
84 * probe.c (enable_probes_command, disable_probes_command):
85 Constify.
86
1d8b34a7
TT
872017-09-27 Tom Tromey <tom@tromey.com>
88
89 * symfile.c (symbol_file_command): Constify.
90 * gdbcore.h (deprecated_file_changed_hook): Constify.
91 * exec.c (deprecated_file_changed_hook, exec_file_command)
92 (file_command): Constify.
93 * defs.h (symbol_file_command): Constify.
94
442019e1
TT
952017-09-27 Tom Tromey <tom@tromey.com>
96
97 * remote-fileio.c (set_system_call_allowed)
98 (show_system_call_allowed): Constify.
99
2983f7cb
TT
1002017-09-27 Tom Tromey <tom@tromey.com>
101
102 * tracepoint.c (delete_trace_variable_command)
103 (tfind_end_command, tfind_start_command, tfind_pc_command)
104 (tfind_tracepoint_command, tfind_line_command)
105 (tfind_range_command, tfind_outside_command): Constify.
106
4fd41b24
TT
1072017-09-27 Tom Tromey <tom@tromey.com>
108
109 * ax-gdb.c (maint_agent_printf_command, agent_command)
110 (agent_eval_command): Constify.
111
f2fc3015
TT
1122017-09-27 Tom Tromey <tom@tromey.com>
113
114 * tracepoint.c (info_scope_command): Constify.
115 * python/python.c (gdbpy_decode_line): Constify.
116 * python/py-breakpoint.c (bppy_init): Constify.
117 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
118 * location.h: (new_linespec_location)
119 (string_to_event_location_basic, string_to_event_location):
120 Constify.
121 * location.c (new_linespec_location)
122 (string_to_event_location_basic, string_to_event_location):
123 Constify.
124 * linespec.h (decode_line_with_current_source)
125 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
126 * linespec.c (linespec_lex_to_end)
127 (decode_line_with_current_source)
128 (decode_line_with_last_displayed): Constify.
129 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
130 Constify.
131 * cli/cli-cmds.c (edit_command, list_command): Constify.
132 * breakpoint.h (until_break_command, watch_command_wrapper)
133 (awatch_command_wrapper, rwatch_command_wrapper)
134 (init_ada_exception_breakpoint): Constify.
135 * breakpoint.c (break_command_1, dprintf_command)
136 (break_range_command, watch_command_wrapper)
137 (rwatch_command_wrapper, awatch_command_wrapper)
138 (until_break_command, init_ada_exception_breakpoint)
139 (strace_marker_create_sals_from_location, trace_command)
140 (ftrace_command, strace_command, struct tracepoint): Constify.
141 * ax-gdb.c (agent_command_1): Constify.
142 * ada-lang.c (ada_exception_sal): Constify.
143
8c2f95f4
TT
1442017-09-27 Tom Tromey <tom@tromey.com>
145
146 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
147 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
148 (get_context_size, no_chunk, get_insn_history_modifiers)
149 (cmd_record_insn_history, get_call_history_modifiers)
150 (cmd_record_call_history): Constify.
151
a0d65762
TT
1522017-09-27 Tom Tromey <tom@tromey.com>
153
154 * source.c (show_substitute_path_command)
155 (unset_substitute_path_command, set_substitute_path_command):
156 Constify.
157
58971144
TT
1582017-09-27 Tom Tromey <tom@tromey.com>
159
160 * typeprint.c (maintenance_print_type): Constify.
161 * maint.c (maintenance_dump_me, maintenance_demangle)
162 (maintenance_time_display, maintenance_info_sections)
163 (maintenance_print_statistics, maintenance_deprecate)
164 (maintenance_undeprecate): Constify.
165 (maintenance_do_deprecate): Constify. Use std::string.
166 (maintenance_selftest): Constify.
167 * gdbtypes.h (maintenance_print_type): Constify.
168
c482f52c
TT
1692017-09-27 Tom Tromey <tom@tromey.com>
170
171 * hppa-tdep.c (unwind_command): Constify.
172
e100df1a
TT
1732017-09-27 Tom Tromey <tom@tromey.com>
174
175 * target-descriptions.c (unset_tdesc_filename_cmd)
176 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
177 Constify.
178
31d56ade
TT
1792017-09-27 Tom Tromey <tom@tromey.com>
180
181 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
182
b961da0b
TT
1832017-09-27 Tom Tromey <tom@tromey.com>
184
185 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
186
e2d8ae16
TT
1872017-09-27 Tom Tromey <tom@tromey.com>
188
189 * tui/tui-regs.c (tui_reg_command): Constify.
190
863779b0
TT
1912017-09-27 Tom Tromey <tom@tromey.com>
192
193 * skip.c (skip_file_command, skip_function_command)
194 (skip_enable_command, skip_disable_command, skip_delete_command):
195 Constify.
196
cdb34d4a
TT
1972017-09-27 Tom Tromey <tom@tromey.com>
198
199 * record-btrace.c (cmd_record_btrace_bts_start)
200 (cmd_record_btrace_pt_start): Constify.
201
e99c83e7
TT
2022017-09-27 Tom Tromey <tom@tromey.com>
203
204 * symmisc.c (maintenance_print_symbols)
205 (maintenance_print_msymbols, maintenance_print_objfiles)
206 (maintenance_info_symtabs, maintenance_check_symtabs)
207 (maintenance_expand_symtabs, maintenance_info_line_tables):
208 Constify.
209
32faf971
TT
2102017-09-27 Tom Tromey <tom@tromey.com>
211
212 * top.c (new_ui_command): Constify.
213
2cf311eb
TT
2142017-09-27 Tom Tromey <tom@tromey.com>
215
216 * symfile.c (add_symbol_file_command)
217 (remove_symbol_file_command, list_overlays_command)
218 (map_overlay_command, unmap_overlay_command)
219 (overlay_auto_command, overlay_manual_command)
220 (overlay_off_command, overlay_load_command): Constify.
221
e6738699
TT
2222017-09-27 Tom Tromey <tom@tromey.com>
223
224 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
225 (info_spu_mailbox_command, info_spu_dma_command)
226 (info_spu_proxydma_command): Constify.
227
aa360cd5
TT
2282017-09-27 Tom Tromey <tom@tromey.com>
229
230 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
231
898241a5
TT
2322017-09-27 Tom Tromey <tom@tromey.com>
233
234 * cli/cli-script.c (user_defined_command): Constify.
235
2d0ac106
TT
2362017-09-27 Tom Tromey <tom@tromey.com>
237
238 * cli/cli-dump.c (dump_memory_command, dump_value_command)
239 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
240 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
241 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
242 (dump_binary_value, append_binary_memory, append_binary_value):
243 Constify.
244 (struct dump_context) <func>: Constify.
245 (add_dump_command): Update.
246
dede02ce
TT
2472017-09-27 Tom Tromey <tom@tromey.com>
248
249 * cli/cli-cmds.c (show_version, show_configuration)
250 (source_command, show_user): Constify.
251
d3cb6b99
TT
2522017-09-27 Tom Tromey <tom@tromey.com>
253
254 * target.c (maintenance_print_target_stack): Constify.
255
1970a12f
TT
2562017-09-27 Tom Tromey <tom@tromey.com>
257
258 * interps.c (interpreter_exec_cmd): Constify.
259
41243651
TT
2602017-09-27 Tom Tromey <tom@tromey.com>
261
262 * record-full.c (cmd_record_full_restore): Constify.
263
4465d9db
TT
2642017-09-27 Tom Tromey <tom@tromey.com>
265
266 * memattr.c (enable_mem_command, disable_mem_command)
267 (delete_mem_command): Constify.
268
ad25e423
TT
2692017-09-27 Tom Tromey <tom@tromey.com>
270
271 * value.c (show_convenience): Constify.
272
d64097b1
TT
2732017-09-27 Tom Tromey <tom@tromey.com>
274
275 * gdbcore.h (core_file_command): Update.
276 * corefile.c (core_file_command): Constify.
277
4d4589ef
TT
2782017-09-27 Tom Tromey <tom@tromey.com>
279
280 * user-regs.c (maintenance_print_user_registers): Constify.
281
32a7bf17
TT
2822017-09-27 Tom Tromey <tom@tromey.com>
283
284 * cp-namespace.c (maintenance_cplus_namespace): Constify.
285
4a475551
TT
2862017-09-27 Tom Tromey <tom@tromey.com>
287
288 * cp-support.c (first_component_command): Constify.
289
990b9f9f
TT
2902017-09-27 Tom Tromey <tom@tromey.com>
291
292 * psymtab.c (maintenance_print_psymbols)
293 (maintenance_info_psymtabs, maintenance_check_psymtabs):
294 Constify.
295
c281872e
TT
2962017-09-27 Tom Tromey <tom@tromey.com>
297
298 * windows-tdep.c (display_tib): Constify.
299
5b64bf74
TT
3002017-09-27 Tom Tromey <tom@tromey.com>
301
302 * linux-fork.c (delete_checkpoint_command)
303 (detach_checkpoint_command): Constify.
304
4ada038f
TT
3052017-09-27 Tom Tromey <tom@tromey.com>
306
307 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
308
57f5a81b
TT
3092017-09-27 Tom Tromey <tom@tromey.com>
310
311 * arc-tdep.c (dump_arc_instruction_command): Constify.
312
b0a8e6c4
TT
3132017-09-27 Tom Tromey <tom@tromey.com>
314
315 * valprint.c (set_radix, show_radix): Constify.
316
8d97dc1c
TT
3172017-09-27 Tom Tromey <tom@tromey.com>
318
319 * dtrace-probe.c (info_probes_dtrace_command): Constify.
320
eb7c454d
TT
3212017-09-27 Tom Tromey <tom@tromey.com>
322
323 * command.h (not_just_help_class_command): Update.
324 * cli/cli-decode.h (not_just_help_class_command): Update.
325 * cli/cli-decode.c (not_just_help_class_command): Constify.
326
e4e33335
TT
3272017-09-27 Tom Tromey <tom@tromey.com>
328
329 * gdb_bfd.c (maintenance_info_bfds): Constify.
330
0450cc4c
TT
3312017-09-27 Tom Tromey <tom@tromey.com>
332
333 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
334 overloads.
335 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
336 (do_const_cfunc): New function.
337 (cmd_cfunc_eq): New overload.
338 (cli_user_command_p): Check do_const_cfunc.
339 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
340 const_cfunc.
341 * command.h (add_cmd): Add const overload and no-function
342 overload.
343 (set_cmd_cfunc): Add const overload.
344 (cmd_const_cfunc_ftype): Declare.
345 (cmd_cfunc_eq): Add const overload.
346 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
347 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
348 overload.
349
a9bbfbd8
TT
3502017-09-27 Tom Tromey <tom@tromey.com>
351
352 * macroexp.c (get_next_token_for_substitution): New function.
353 (substitute_args): Call it. Check for __VA_OPT__.
354
5230b05a
WT
3552017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
356 Pedro Alves <palves@redhat.com>
357
358 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
359 producer_is_icc_lt_14.
360 (producer_is_icc_lt_14): New function.
361 (check_producer): Add code for checking version of ICC.
362 (producer_is_icc): Move to producer.c.
363 (read_structure_type): Restrict ICC workaround to ICC<14.
364 * producer.c: Include selftest.h.
365 (producer_is_icc, producer_parsing_tests, _initialize_producer):
366 New functions.
367 * producer.h (producer_is_icc): New declaration.
368
b32b108a
WT
3692017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
370
371 * Makefile.in (SFILES): Add producer.c.
372 (COMMON_OBS): Add producer.o
373 * amd64-tdep.c (producer.h): Add new include.
374 * dwarf2read.c (producer.h): Add new include.
375 * producer.c: New file.
376 * producer.h: New file.
377 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
378 producer.c.
379 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
380 producer.h.
381
5007d765
MK
3822017-09-26 Matthias Klose <doko@ubuntu.com>
383
384 * configure.ac: Search ncursesw before ncurses.
385 Check ncursesw/ncurses.h before ncurses/ncurses.h.
386 * gdb_curses.h: Include <ncursesw/ncurses.h>
387 * config.in, configure: Regenerate.
388
281c4447
RO
3892017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
390
391 PR gdb/22185
392 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
393 obsolete.
394 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
395 Remove i386sol2 support.
396 * configure.nat <i386sol2>: Remove.
397 <sol2-64>: Fold into ...
398 <sol2>: ... this.
399 Move common settings to default section.
400 Add sol-thread.o.
401 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
402 x86_64-*-solaris2.1[0-9]*>: Rename to ...
403 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
404 <i[34567]86-*-solaris*>: Remove.
405 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
406
407 * configure.ac: Remove wctype in libw check.
408 (_MSE_INT_H): Don't define on Solaris 7-9.
409 <solaris*>: Remove libthread_db.so.1 check.
410 * configure: Regenerate.
411 * config.in: Regenerate.
412
413 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
414 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
415 (gdb_ps_size_t): Remove.
416 Use base types in users.
417 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
418
419 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
420
39b06c20
RO
4212017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
422
423 PR build/22206
424 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
425 (adi_is_addr_mapped): Likewise.
426 (PSR_ICC): Don't redefine.
427 (PSR_IMPL): Likewise.
428
6c3e20f1
TT
4292017-09-25 Tom Tromey <tom@tromey.com>
430
431 * regcache.c (regcache::dump): Use string_printf.
432
b292235f
TT
4332017-09-25 Tom Tromey <tom@tromey.com>
434
435 * regcache.c (class regcache_invalidator): New.
436 (struct register_to_invalidate): Remove.
437 (make_cleanup_regcache_invalidate): Remove.
438 (regcache::raw_write): Use regcache_invalidator.
439
9ac86b52
TT
4402017-09-25 Tom Tromey <tom@tromey.com>
441
442 * spu-tdep.c (spu2ppu_sniffer): Update.
443 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
444 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
445 Remove.
446 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
447 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
448 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
449 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
450 (frame_pop): Update.
451
c0e383c6
TT
4522017-09-25 Tom Tromey <tom@tromey.com>
453
454 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
455 * regcache.h (regcache_xfree): Don't declare.
456 * regcache.c (regcache_xfree): Remove.
457 (do_regcache_xfree): Use delete.
458 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
459 * linux-fork.c (free_fork): Use delete.
460 (fork_save_infrun_state): Likewise.
461 * jit.c (jit_dealloc_cache): Use delete.
462 * infrun.c (discard_infcall_suspend_state): Use delete.
463
791199cc
TT
4642017-09-25 Tom Tromey <tom@tromey.com>
465
466 * regcache.h (regcache_xmalloc): Don't declare.
467 (regcache_raw_set_cached_value): Update comment.
468 * regcache.c (regcache_xmalloc): Remove.
469 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
470 * jit.c (jit_frame_sniffer): Use new.
471 * frame.c (frame_save_as_regcache): Use new.
472
289e23aa
AA
4732017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
474
475 * NEWS: Advertise support for guarded-storage registers on IBM z.
476
1b63490c
AA
4772017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
478
479 * s390-linux-nat.c (have_regset_gs): New static variable.
480 (s390_linux_fetch_inferior_registers): Handle guarded-storage
481 control block and guarded-storage broadcast control regsets.
482 (s390_read_description): Detect whether the target has
483 guarded-storage support, return appropriate tdesc.
484 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
485 (features/s390x-gs-linux64.c): Likewise.
486 (struct gdbarch_tdep) <have_gs>: New field.
487 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
488 (s390_gsbc_regset): New variables.
489 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
490 and s390_gsbc_regset, if applicable.
491 (s390_core_read_description): Check whether core file was from a
492 target with guarded-storage support; include appropriate regsets.
493 (s390_gdbarch_init): Add registers for guarded-storage support.
494 (_initialize_s390_tdep): Initialize new target descriptions that
495 include registers for guarded-storage support.
496 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
497 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
498 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
499 (S390_NUM_REGS): Adjust macro definition.
500 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
501 (tdesc_s390x_gs_linux64): New declarations.
502
96235dc1
AA
5032017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
504
505 * features/s390-gs-linux64.xml: New file.
506 * features/s390-gs.xml: New file.
507 * features/s390-gsbc.xml: New file.
508 * features/s390x-gs-linux64.xml: New file.
509 * features/Makefile (WHICH): Add s390-gs-linux64 and
510 s390x-gs-linux64.
511 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
512 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
513 * features/s390-gs-linux64.c: New generated file.
514 * features/s390x-gs-linux64.c: New file.
515 * regformats/s390-gs-linux64.dat: New file.
516 * regformats/s390x-gs-linux64.dat: New file.
517
b4a7c699
TT
5182017-09-23 Tom Tromey <tom@tromey.com>
519
520 * defs.h (make_cleanup_override_quit_handler): Don't declare.
521
c2f97536
TT
5222017-09-22 Tom Tromey <tom@tromey.com>
523
524 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
525 type to scoped_restore_tmpl.
526 <scoped_input_handler>: Initialize m_quit_handler directly.
527
43573013
SDJ
5282017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
529
530 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
531 (cd_command): Likewise. Free "current_directory" before
532 assigning to it.
533 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
534 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
535 * top.c (gdb_dirbuf): Remove global declaration.
536 * top.h (gdb_dirbuf): Likewise.
537
6ec2e0f5
SDJ
5382017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
539
540 * gnulib/aclocal.m4: Regenerate.
541 * gnulib/config.in: Regenerate.
542 * gnulib/configure: Regenerate.
543 * gnulib/import/Makefile.am: Regenerate.
544 * gnulib/import/Makefile.in: Regenerate.
545 * gnulib/import/assure.h: New file.
546 * gnulib/import/at-func.c: Likewise
547 * gnulib/import/chdir-long.c: New file.
548 * gnulib/import/chdir-long.h: New file.
549 * gnulib/import/cloexec.c: New file.
550 * gnulib/import/cloexec.h: New file.
551 * gnulib/import/close.c: New file.
552 * gnulib/import/closedir.c: New file.
553 * gnulib/import/dirent-private.h: New file.
554 * gnulib/import/dup-safer.c: New file.
555 * gnulib/import/dup.c: New file.
556 * gnulib/import/dup2.c: New file.
557 * gnulib/import/error.c: New file.
558 * gnulib/import/error.h: New file.
559 * gnulib/import/exitfail.c: New file.
560 * gnulib/import/exitfail.h: New file.
561 * gnulib/import/fchdir.c: New file.
562 * gnulib/import/fcntl.c: New file.
563 * gnulib/import/fcntl.in.h: New file.
564 * gnulib/import/fd-hook.c: New file.
565 * gnulib/import/fd-hook.h: New file.
566 * gnulib/import/fd-safer.c: New file.
567 * gnulib/import/fdopendir.c: New file.
568 * gnulib/import/filename.h: New file.
569 * gnulib/import/filenamecat-lgpl.c: New file.
570 * gnulib/import/filenamecat.h: New file.
571 * gnulib/import/fstat.c: New file.
572 * gnulib/import/fstatat.c: New file.
573 * gnulib/import/getcwd-lgpl.c: New file.
574 * gnulib/import/getcwd.c: New file.
575 * gnulib/import/getdtablesize.c: New file.
576 * gnulib/import/getlogin_r.c: New file.
577 * gnulib/import/getprogname.c: New file.
578 * gnulib/import/getprogname.h: New file.
579 * gnulib/import/gettext.h: New file.
580 * gnulib/import/glob-libc.h: New file.
581 * gnulib/import/glob.c: New file.
582 * gnulib/import/glob.in.h: New file.
583 * gnulib/import/intprops.h: New file.
584 * gnulib/import/m4/chdir-long.m4: New file.
585 * gnulib/import/m4/close.m4: New file.
586 * gnulib/import/m4/closedir.m4: New file.
587 * gnulib/import/m4/d-ino.m4: New file.
588 * gnulib/import/m4/d-type.m4: New file.
589 * gnulib/import/m4/dup.m4: New file.
590 * gnulib/import/m4/dup2.m4: New file.
591 * gnulib/import/m4/error.m4: New file.
592 * gnulib/import/m4/fchdir.m4: New file.
593 * gnulib/import/m4/fcntl.m4: New file.
594 * gnulib/import/m4/fcntl_h.m4: New file.
595 * gnulib/import/m4/fdopendir.m4: New file.
596 * gnulib/import/m4/filenamecat.m4: New file.
597 * gnulib/import/m4/fstat.m4: New file.
598 * gnulib/import/m4/fstatat.m4: New file.
599 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
600 * gnulib/import/m4/getcwd-path-max.m4: New file.
601 * gnulib/import/m4/getcwd.m4: New file.
602 * gnulib/import/m4/getdtablesize.m4: New file.
603 * gnulib/import/m4/getlogin_r.m4: New file.
604 * gnulib/import/m4/getprogname.m4: New file.
605 * gnulib/import/m4/glob.m4: New file.
606 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
607 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
608 * gnulib/import/m4/mempcpy.m4: New file.
609 * gnulib/import/m4/memrchr.m4: New file.
610 * gnulib/import/m4/mode_t.m4: New file.
611 * gnulib/import/m4/msvc-inval.m4: New file.
612 * gnulib/import/m4/msvc-nothrow.m4: New file.
613 * gnulib/import/m4/open.m4: New file.
614 * gnulib/import/m4/openat.m4: New file.
615 * gnulib/import/m4/opendir.m4: New file.
616 * gnulib/import/m4/readdir.m4: New file.
617 * gnulib/import/m4/realloc.m4: New file.
618 * gnulib/import/m4/rewinddir.m4: New file.
619 * gnulib/import/m4/save-cwd.m4: New file.
620 * gnulib/import/m4/strdup.m4: New file.
621 * gnulib/import/m4/strerror.m4: New file.
622 * gnulib/import/m4/unistd-safer.m4: New file.
623 * gnulib/import/mempcpy.c: New file.
624 * gnulib/import/memrchr.c: New file.
625 * gnulib/import/msvc-inval.c: New file.
626 * gnulib/import/msvc-inval.h: New file.
627 * gnulib/import/msvc-nothrow.c: New file.
628 * gnulib/import/msvc-nothrow.h: New file.
629 * gnulib/import/open.c: New file.
630 * gnulib/import/openat-die.c: New file.
631 * gnulib/import/openat-priv.h: New file.
632 * gnulib/import/openat-proc.c: New file.
633 * gnulib/import/openat.c: New file.
634 * gnulib/import/openat.h: New file.
635 * gnulib/import/opendir.c: New file.
636 * gnulib/import/pipe-safer.c: New file.
637 * gnulib/import/readdir.c: New file.
638 * gnulib/import/realloc.c: New file.
639 * gnulib/import/rewinddir.c: New file.
640 * gnulib/import/save-cwd.c: New file.
641 * gnulib/import/save-cwd.h: New file.
642 * gnulib/import/strdup.c: New file.
643 * gnulib/import/strerror-override.c: New file.
644 * gnulib/import/strerror-override.h: New file.
645 * gnulib/import/strerror.c: New file.
646 * gnulib/import/unistd--.h: New file.
647 * gnulib/import/unistd-safer.h: New file.
648 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
649 "getcwd" and "glob".
650 * ser-tcp.c: Undefine "close" before redefining it.
651
432ae719
SM
6522017-09-21 Simon Marchi <simon.marchi@ericsson.com>
653
654 * guile/scm-value.c (gdbscm_value_address): Initialize address,
655 get rid of res_val.
656
4fa7574e
RO
6572017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
658
659 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
660 <sol2,sparc>: Likewise.
661 <sol2-64,i386>: Likewise.
662
663 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
664 -Wdeprecated-declarations on *-*-solaris*.
665 * configure: Regenerate.
666
667 * procfs.c: Include "nat/inferior.h".
668 (procfs_info_proc): Fix typo.
669
f6327dcb
KB
6702017-09-21 Kevin Buettner <kevinb@redhat.com>
671
672 * remote.c (vector): Include.
673 (struct private_thread_info): Add field, thread_handle.
674 (free_private_thread_info): Deallocate storage associated with
675 thread handle.
676 (get_private_info_thread): Initialize `thread_handle' field.
677 (struct thread_item): Add field, thread_handle.
678 (clear_threads_listing_context): Deallocate storage associated
679 with thread handle.
680 (start_thread): Add support for "handle" attribute.
681 (thread_attributes): Add "handle".
682 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
683 field.
684 (remote_update_thread_list): Update thread_handle.
685 (remote_thread_handle_to_thread_info): New function.
686 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
687
fbbe5337
KB
6882017-09-21 Kevin Buettner <kevinb@redhat.com>
689
690 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
691 function.
692 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
693 * python/python-internal.h (thread_object_type): Declare.
694
e04ee09e
KB
6952017-09-21 Kevin Buettner <kevinb@redhat.com>
696
697 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
698 (target_thread_handle_to_thread_info): Declare.
699 * target.c (target_thread_handle_to_thread_info): New function.
700 * target-delegates.c: Regenerate.
701 * gdbthread.h (find_thread_by_handle): Declare.
702 * thread.c (find_thread_by_handle): New function.
703 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
704 function.
705 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
706
1e5b66ed
SM
7072017-09-21 Simon Marchi <simon.marchi@ericsson.com>
708
709 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
710
ebe48ba0
SM
7112017-09-21 Simon Marchi <simon.marchi@ericsson.com>
712
713 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
714
0a0bf5dc
YQ
7152017-09-21 Yao Qi <yao.qi@linaro.org>
716
717 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
718 to gdb_target_obs.
719
d1b0a7bf
TT
7202017-09-20 Tom Tromey <tom@tromey.com>
721
722 * breakpoint.c (struct counted_command_line): Remove.
723 (breakpoint_commands): Update.
724 (alloc_counted_command_line, incref_counted_command_line)
725 (decref_counted_command_line, do_cleanup_counted_command_line)
726 (make_cleanup_decref_counted_command_line): Remove.
727 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
728 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
729 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
730 (save_breakpoints): Update.
731 * breakpoint.h (counted_command_line): Now a typedef to
732 shared_ptr.
733 (struct breakpoint) <commands>: Now a counted_command_line.
734 (struct bpstats) <command>: Likewise.
735
48649e1b
TT
7362017-09-20 Tom Tromey <tom@tromey.com>
737
738 * breakpoint.c (struct commands_info, do_map_commands_command):
739 Remove.
740 (commands_command_1): Update.
741 (iterate_over_related_breakpoints): Take a function_view.
742 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
743 (delete_command): Update.
744 (map_breakpoint_numbers): Take a function_view.
745 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
746 (disable_command): Update.
747 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
748 (enable_command): Update.
749 (struct disp_data, do_enable_breakpoint_disp)
750 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
751 (do_map_enable_delete_breakpoint): Remove.
752 (enable_once_command, enable_count_command, enable_delete_command)
753 (delete_trace_variable_command): Update.
754
04afa70c
TT
7552017-09-20 Tom Tromey <tom@tromey.com>
756
757 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
758 (bpstat_clear): Use delete.
759 (bpstats): New constructors.
760 (bpstat_copy, bpstat_stop_status): Use new.
761 (dprintf_after_condition_true): Update.
762 * breakpoint.h (bpstats::bpstats): Add constructors.
763 (bpstats::~bpstats): Add destructor.
764
c83833f4
PA
7652017-09-20 Pedro Alves <palves@redhat.com>
766
767 * eval.c (make_params): Delete, refactored as ...
768 (class fake_method): ... this new type's ctor.
769 (fake_method::~fake_method): New.
770 (evaluate_subexp_standard): Use 'fake_method'.
771
223ffa71
TT
7722017-09-20 Tom Tromey <tom@tromey.com>
773
774 * windows-nat.c (get_windows_debug_event, windows_wait)
775 (do_initial_windows_stuff, windows_attach): Update.
776 * utils.c (vwarning, internal_vproblem): Update.
777 (ui_unregister_input_event_handler_cleanup)
778 (prepare_to_handle_input): Remove.
779 (class scoped_input_handler): New.
780 (defaulted_query, prompt_for_continue): Update.
781 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
782 Update.
783 * top.c (undo_terminal_modifications_before_exit): Update.
784 * target/target.h (target_terminal_init, target_terminal_inferior)
785 (target_terminal_ours): Don't declare.
786 (class target_terminal): New.
787 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
788 (target_terminal_ours_for_output)
789 (make_cleanup_restore_target_terminal): Don't declare.
790 (target_terminal_info): Remove.
791 * target.c (enum terminal_state, terminal_state): Remove.
792 (target_terminal::terminal_state): Define.
793 (target_terminal::init): Rename from target_terminal_init.
794 (target_terminal::inferior): Rename from
795 target_terminal_inferior.
796 (target_terminal::ours): Rename from target_terminal_ours.
797 (target_terminal::ours_for_output): Rename from
798 target_terminal_ours_for_output.
799 (target_terminal::info): New method.
800 (cleanup_restore_target_terminal)
801 (make_cleanup_restore_target_terminal): Remove.
802 * solib.c (handle_solib_event): Update.
803 * remote.c (remote_serial_quit_handler): Update.
804 (remote_terminal_inferior, remote_wait_as): Update.
805 * record-full.c (record_full_wait_1): Update.
806 * nto-procfs.c (procfs_create_inferior): Update.
807 * nat/fork-inferior.c (startup_inferior): Update.
808 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
809 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
810 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
811 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
812 (mi_breakpoint_created, mi_breakpoint_deleted)
813 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
814 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
815 (mi_user_selected_context_changed, report_initial_inferior):
816 Update.
817 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
818 (linux_nat_terminal_inferior): Update.
819 * infrun.c (follow_fork_inferior)
820 (handle_vfork_child_exec_or_exit, do_target_resume)
821 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
822 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
823 Update.
824 * inflow.c (child_terminal_init, info_terminal_command): Update.
825 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
826 (attach_command): Update.
827 * infcall.c (call_thread_fsm_should_stop): Update.
828 * gnu-nat.c (gnu_attach): Update.
829 * extension.c (struct active_ext_lang_state)
830 (restore_active_ext_lang): Update.
831 * exceptions.c (print_flush): Update.
832 * event-top.c (async_enable_stdin, default_quit_handler): Update.
833 (struct quit_handler_cleanup_data, restore_quit_handler)
834 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
835 Remove.
836 * cp-support.c (gdb_demangle): Update.
837 * breakpoint.c (update_inserted_breakpoint_locations)
838 (insert_breakpoint_locations, handle_jit_event)
839 (disable_breakpoints_in_unloaded_shlib): Update.
840 * annotate.c (annotate_breakpoints_invalid)
841 (annotate_frames_invalid): Update.
842
013af3fc
TT
8432017-09-20 Tom Tromey <tom@tromey.com>
844
845 * main.c (catch_command_errors): Rename from
846 catch_command_errors_const.
847 (captured_main_1): Update.
848
06871ae8
PA
8492017-09-20 Pedro Alves <palves@redhat.com>
850
851 * cli/cli-cmds.c (list_command): Use print_sal_location.
852 (print_sal_location): New function.
853 (ambiguous_line_spec): Use print_sal_location.
854 * linespec.c (symbol_to_sal): Record the symbol in the sal.
855 * symtab.c (find_function_start_sal): Likewise.
856 * symtab.h (symtab_and_line::symbol): New field.
857
e5f25bc5
PA
8582017-09-20 Pedro Alves <palves@redhat.com>
859
860 * linespec.c (minsym_found): Handle non-text minsyms.
861 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
862
1b7fa39e
WT
8632017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
864
865 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
866 backslash.
867
37dd0825
WT
8682017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
869
870 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
871 vmovups instead vmovaps.
872 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
873
4e5a4f58
JB
8742017-09-19 John Baldwin <jhb@FreeBSD.org>
875
876 * NEWS (Changes since GDB 8.0): Add starti.
877 * infcmd.c (enum run_break): New.
878 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
879 case.
880 (run_command): Use enum run_how.
881 (start_command): Likewise.
882 (starti_command): New function.
883 (RUN_ARGS_HELP): New macro.
884 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
885 commands. Add starti command.
886
aa70c9f1
YQ
8872017-09-19 Yao Qi <yao.qi@linaro.org>
888
889 * Makefile.in (monitor.o): Remove the rule.
890
d6541620
YQ
8912017-09-19 Yao Qi <yao.qi@linaro.org>
892
893 * annotate.h (struct annotate_arg_emitter): Use
894 DISABLE_COPY_AND_ASSIGN.
895 * common/refcounted-object.h (refcounted_object): Likewise.
896 * completer.h (struct completion_result): Likewise.
897 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
898 * filename-seen-cache.h (filename_seen_cache): Likewise.
899 * gdbcore.h (thread_section_name): Likewise.
900 * gdb_regex.h (compiled_regex): Likewise.
901 * gdbthread.h (scoped_restore_current_thread): Likewise.
902 * inferior.h (scoped_restore_current_inferior): Likewise.
903 * jit.c (jit_reader): Likewise.
904 * linespec.h (struct linespec_result): Likewise.
905 * mi/mi-parse.h (struct mi_parse): Likewise.
906 * nat/fork-inferior.c (execv_argv): Likewise.
907 * progspace.h (scoped_restore_current_program_space): Likewise.
908 * python/python-internal.h (class gdbpy_enter): Likewise.
909 * regcache.h (regcache): Likewise.
910 * target-descriptions.c (struct tdesc_reg): Likewise.
911 (struct tdesc_type): Likewise.
912 (struct tdesc_feature): Likewise.
913 * ui-out.h (ui_out_emit_type): Likewise.
914
0615127c
SM
9152017-09-18 Simon Marchi <simon.marchi@ericsson.com>
916
917 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
918 label abort_expression.
919
5e187554
SM
9202017-09-16 Simon Marchi <simon.marchi@ericsson.com>
921
922 * common/buffer.c (buffer_xml_printf): Adjust.
923 * common/xml-utils.c (xml_escape_text): Change return type to
924 std::string, update code accordingly.
925 * common/xml-utils.h (xml_escape_text): Change return type to
926 std::string.
927 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
928 * windows-tdep.c (windows_xfer_shared_library): Adjust.
929 * unittests/xml-utils-selftests.c (test_xml_escape_text):
930 Adjust.
931
c3d7b541
SM
9322017-09-16 Simon Marchi <simon.marchi@ericsson.com>
933
934 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
935 (SUBDIR_UNITTESTS_OBS): Add new object file.
936 * unittests/xml-utils-selftests.c: New file.
937
1526853e
SM
9382017-09-16 Simon Marchi <simon.marchi@ericsson.com>
939
940 * common/selftest.h (selftest): New struct/interface.
941 (register_test): Add name parameter, add new overload.
942 (run_tests): Add filter parameter.
943 (for_each_selftest_ftype): New typedef.
944 (for_each_selftest): New declaration.
945 * common/selftest.c (tests): Change type to
946 map<string, unique_ptr<selftest>>.
947 (simple_selftest): New struct.
948 (register_test): New function.
949 (register_test): Add name parameter and use it.
950 (run_tests): Add filter parameter and use it. Add prints.
951 Adjust to vector -> map change.
952 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
953 registering selftests.
954 * arm-tdep.c (_initialize_arm_tdep): Likewise.
955 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
956 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
957 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
958 * findvar.c (_initialize_findvar): Likewise.
959 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
960 * maint.c (maintenance_selftest): Update call to run_tests.
961 (maintenance_info_selftests): New function.
962 (_initialize_maint_cmds): Register "maintenance info selftests"
963 command. Update "maintenance selftest" doc.
964 * regcache.c (_initialize_regcache): Add names when registering
965 selftests.
966 * rust-exp.y (_initialize_rust_exp): Likewise.
967 * selftest-arch.c (gdbarch_selftest): New struct.
968 (gdbarch_tests): Remove.
969 (register_test_foreach_arch): Add name parameter. Call
970 register_test.
971 (tests_with_arch): Remove, move most content to
972 gdbarch_selftest::operator().
973 (_initialize_selftests_foreach_arch): Remove.
974 * selftest-arch.h (register_test_foreach_arch): Add name
975 parameter.
976 (run_tests_with_arch): New declaration.
977 * utils-selftests.c (_initialize_utils_selftests): Add names
978 when registering selftests.
979 * utils.c (_initialize_utils): Likewise.
980 * unittests/array-view-selftests.c
981 (_initialize_array_view_selftests): Likewise.
982 * unittests/environ-selftests.c (_initialize_environ_selftests):
983 Likewise.
984 * unittests/function-view-selftests.c
985 (_initialize_function_view_selftests): Likewise.
986 * unittests/offset-type-selftests.c
987 (_initialize_offset_type_selftests): Likewise.
988 * unittests/optional-selftests.c
989 (_initialize_optional_selftests): Likewise.
990 * unittests/scoped_restore-selftests.c
991 (_initialize_scoped_restore_selftests): Likewise.
992 * NEWS: Document "maintenance selftest" and "maint info
993 selftests".
994
5846367a
SM
9952017-09-16 Simon Marchi <simon.marchi@ericsson.com>
996
997 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
998 scoped_restore.
999
bd77e8ff
SM
10002017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1001
1002 * mi/mi-main.c (mi_load_progress): Make uiout variable
1003 a unique_ptr.
1004
26a67918
PA
10052017-09-15 Pedro Alves <palves@redhat.com>
1006
1007 * compile/compile-c-types.c (convert_enum, convert_int)
1008 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1009
3f8a7804
SM
10102017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1011
1012 * dwarf2read.c (copy_string): Remove.
1013 (parse_macro_definition): Replace copy_string with savestring.
1014
8d200706
YQ
10152017-09-15 Yao Qi <yao.qi@linaro.org>
1016
1017 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1018 gdb_target_obs.
1019 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1020 Likewise.
1021 (i[34567]86-*-linux*): Likewise.
1022
d185219d
SM
10232017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1024
1025 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1026 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1027 <stack>: Change type to std::vector.
1028 <stack_len, stack_allocated>: Remove.
1029 <grow_stack>: Remove.
1030 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1031 (dwarf_expr_context::~dwarf_expr_context): Remove.
1032 (dwarf_expr_context::grow_stack): Remove.
1033 (dwarf_expr_context::push): Adjust.
1034 (dwarf_expr_context::pop): Adjust.
1035 (dwarf_expr_context::fetch): Adjust.
1036 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1037 (dwarf_expr_context::stack_empty_p): Adjust.
1038 (dwarf_expr_context::execute_stack_op): Adjust.
1039
eccd80d6
SM
10402017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1041
1042 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1043 return type to bool.
1044 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1045
69009882
SM
10462017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1047
1048 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1049 Change type to bool.
1050 (dwarf_stack_value) <in_stack_memory>: Likewise.
1051 (dwarf_expr_context) <push_address>: Change parameter type to
1052 bool.
1053 <fetch_in_stack_memory>: Change return type to bool.
1054 <push>: Change parameter type to bool.
1055 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1056 to bool.
1057 (dwarf_expr_context::push_address): Likewise.
1058 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1059 to bool.
1060 (dwarf_expr_context::execute_stack_op): Adjust.
1061 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1062
1e467161
SM
10632017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1064
1065 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1066 (struct dwarf_expr_context) <n_pieces>: Remove.
1067 <pieces>: Change type to std::vector.
1068 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1069 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1070 pieces.
1071 (dwarf_expr_context::add_piece): Adjust.
1072 * dwarf2loc.c (struct piece_closure): Initialize fields.
1073 <n_pieces>: Remove.
1074 <pieces>: Change type to std::vector.
1075 (allocate_piece_closure): Adjust, change parameter to
1076 std::vector rvalue and std::move it to piece_closure.
1077 (rw_pieced_value): Adjust.
1078 (check_pieced_synthetic_pointer): Adjust.
1079 (indirect_synthetic_pointer): Adjust.
1080 (coerce_pieced_ref): Adjust.
1081 (free_pieced_value_closure): Adjust. Use delete to free
1082 piece_closure.
1083 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1084 to allocate_piece_closure.
1085 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1086
0782db84
SM
10872017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1088
1089 * probe.h (probe_ops_cp): Remove typedef.
1090 (DEF_VEC_P (probe_ops_cp)): Remove.
1091 (all_probe_ops): Change type to std::vector.
1092 * probe.c (info_probes_for_ops): Adjust to vector change.
1093 (probe_linespec_to_ops): Likewise.
1094 (all_probe_ops): Change type to std::vector.
1095 (_initialize_probe): Adjust to vector change.
1096 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1097 * elfread.c (elf_get_probes): Likewise.
1098 * stap-probe.c (_initialize_stap_probe): Likewise.
1099
1eac6bea
SM
11002017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1101
1102 * probe.h (struct bound_probe): Define constructors.
1103 * probe.c (bound_probe_s): Remove typedef.
1104 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1105 (collect_probes): Change return type to std::vector, remove
1106 cleanup.
1107 (compare_probes): Return bool, change parameter type. Change
1108 semantic to "less than".
1109 (gen_ui_out_table_header_info): Change parameter to std::vector
1110 and update.
1111 (exists_probe_with_pops): Likewise.
1112 (info_probes_for_ops): Update to std::vector change.
1113 (enable_probes_command): Likewise.
1114 (disable_probes_command): Likewise.
1115
aaa63a31
SM
11162017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1117
1118 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1119 vec to std::vector.
1120 * probe.c (parse_probes_in_pspace): Update.
1121 (find_probes_in_objfile): Update.
1122 (find_probe_by_pc): Update.
1123 (collect_probes): Update.
1124 (probe_any_get_probes): Update.
1125 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1126 return type to reference to std::vector.
1127 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1128 std::vector and update.
1129 (dtrace_process_dof): Likewise.
1130 (dtrace_get_probes): Likewise.
1131 * elfread.c (elf_get_probes): Change return type to std::vector,
1132 store an std::vector in bfd_data.
1133 (probe_key_free): Update to std::vector.
1134 * stap-probe.c (handle_stap_probe): Change parameter to
1135 std::vector and update.
1136 (stap_get_probes): Likewise.
1137 * symfile-debug.c (debug_sym_get_probes): Change return type to
1138 std::vector and update.
1139
cb85b21b
TT
11402017-09-11 Tom Tromey <tom@tromey.com>
1141
1142 * breakpoint.c (program_breakpoint_here_p): Update.
1143 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1144 from make_show_memory_breakpoints_cleanup. Return a
1145 scoped_restore_tmpl<int>.
1146 (restore_show_memory_breakpoints): Remove.
1147 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1148 * mem-break.c (memory_validate_breakpoint): Update.
1149 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1150 (ia64_memory_remove_breakpoint): Update.
1151 (ia64_breakpoint_from_pc): Update.
1152 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1153 from make_show_memory_breakpoints_cleanup.
1154
8fbc99ef
TT
11552017-09-11 Tom Tromey <tom@tromey.com>
1156
1157 * d-namespace.c (d_lookup_symbol): Use std::string.
1158 (find_symbol_in_baseclass): Likewise.
1159
50feb4bd
TT
11602017-09-11 Tom Tromey <tom@tromey.com>
1161
1162 * ctf.c (ctf_start): Use std::string.
1163
c6dc63a1
TT
11642017-09-11 Tom Tromey <tom@tromey.com>
1165
1166 * ada-lang.c (is_known_support_routine): Update.
1167 (ada_unhandled_exception_name_addr_from_raise): Update.
1168 * guile/scm-frame.c (gdbscm_frame_name): Update.
1169 * python/py-frame.c (frapy_name): Update.
1170 (frapy_function): Update.
1171 * stack.h (find_frame_funname): Update.
1172 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1173 (print_frame): Update.
1174
d6b9b80f
TT
11752017-09-11 Tom Tromey <tom@tromey.com>
1176
1177 * findcmd.c (put_bits): Take a gdb::byte_vector.
1178 (parse_find_args): Return gdb::byte_vector. "args" now const.
1179 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1180 cleanups.
1181 (find_command): Update.
1182
a9921622
TT
11832017-09-11 Tom Tromey <tom@tromey.com>
1184
1185 * cli/cli-script.c (class scoped_restore_hook_in): New.
1186 (clear_hook_in_cleanup): Remove.
1187 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1188 scoped_restore_hook_in.
1189
be0d7abb
TT
11902017-09-11 Tom Tromey <tom@tromey.com>
1191
1192 * cli/cli-script.c (restore_interp): Remove.
1193 (read_command_lines): Use scoped_restore_interp.
1194 * interps.c (scoped_restore_interp::set_temp): Rename from
1195 interp_set_temp.
1196 * interps.h (class scoped_restore_interp): New.
1197 (interp_set_temp): Remove.
1198
00f675ff
TT
11992017-09-11 Tom Tromey <tom@tromey.com>
1200
1201 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1202 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1203 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1204 scoped_restore.
1205 (mi_cmd_break_insert_1): Update.
1206 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1207 scoped_restore.
1208
cb791d59
TT
12092017-09-11 Tom Tromey <tom@tromey.com>
1210
1211 * demangle.c (demangle_command): Update.
1212 * breakpoint.c (disable_command): Update.
1213 (enable_command): Update.
1214 (find_location_by_number): Make "number" const. Use
1215 get_number_trailer.
1216 * cli/cli-utils.c (extract_arg): Return std::string.
1217 * probe.c (parse_probe_linespec): Update. Change types.
1218 (collect_probes): Take string arguments.
1219 (parse_probe_linespec): Likewise.
1220 (info_probes_for_ops): Update.
1221 (enable_probes_command): Update.
1222 (disable_probes_command): Update.
1223 * break-catch-sig.c (catch_signal_split_args): Update.
1224 * mi/mi-parse.c (mi_parse): Update.
1225
2039bd9f
TT
12262017-09-11 Tom Tromey <tom@tromey.com>
1227
1228 * language.h (language_enum): Make argument const.
1229 * language.c (language_enum): Make argument const.
1230
f1735a53
TT
12312017-09-11 Tom Tromey <tom@tromey.com>
1232
1233 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1234 as function.
1235 (skip_to_space): Rename from skip_to_space_const.
1236 * common/common-utils.c (skip_to_space): New function.
1237 (skip_to_space): Rename from skip_to_space_const.
1238 * cli/cli-utils.h (get_number): Rename from get_number_const.
1239 (extract_arg): Rename from extract_arg_const.
1240 * cli/cli-utils.c (get_number): Rename from get_number_const.
1241 (extract_arg): Rename from extract_arg_const.
1242 (number_or_range_parser::get_number): Use ::get_number.
1243 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1244 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1245 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1246 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1247 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1248 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1249 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1250 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1251
7d221d74
TT
12522017-09-11 Tom Tromey <tom@tromey.com>
1253
1254 * python/python.c (do_start_initialization): Use
1255 py-event-types.def to initialize types.
1256 Define all object type structures.
1257 * python/python-internal.h: Don't declare event initialization
1258 functions.
1259 * python/py-threadevent.c (thread_event_object_type): Don't
1260 define.
1261 * python/py-stopevent.c (stop_event_object_type): Don't define.
1262 * python/py-signalevent.c (signal_event_object_type): Don't
1263 declare or define.
1264 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1265 (clear_objfiles_event_object_type): Don't declare or define.
1266 * python/py-infevents.c (inferior_call_pre_event_object_type)
1267 (inferior_call_post_event_object_type)
1268 (register_changed_event_object_type)
1269 (memory_changed_event_object_type): Don't declare or define.
1270 * python/py-inferior.c (new_thread_event_object_type)
1271 (new_inferior_event_object_type)
1272 (inferior_deleted_event_object_type): Don't declare or define.
1273 * python/py-exitedevent.c (exited_event_object_type): Don't
1274 declare or define.
1275 * python/py-evts.c (gdbpy_initialize_py_events): Use
1276 py-all-events.def.
1277 * python/py-events.h (thread_event_object_type): Don't declare.
1278 (events_object): Use py-all-events.def.
1279 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1280 py-event-types.def.
1281 * python/py-event-types.def: New file.
1282 * python/py-continueevent.c (create_continue_event_object): Don't
1283 declare or define.
1284 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1285 declare or define.
1286 * python/py-all-events.def: New file.
1287
35c61a1d
TT
12882017-09-11 Tom Tromey <tom@tromey.com>
1289
1290 * python/py-threadevent.c (create_thread_event_object): Return
1291 gdbpy_ref.
1292 * python/py-stopevent.h (create_stop_event_object)
1293 (create_breakpoint_event_object, create_signal_event_object):
1294 Update.
1295 * python/py-stopevent.c (create_stop_event_object): Return
1296 gdbpy_ref.
1297 (emit_stop_event): Update.
1298 * python/py-signalevent.c (create_signal_event_object): Return
1299 gdbpy_ref.
1300 * python/py-infevents.c (create_inferior_call_event_object):
1301 Update.
1302 * python/py-event.h (create_event_object)
1303 (create_thread_event_object): Update.
1304 * python/py-event.c (create_event_object): Return gdbpy_ref.
1305 * python/py-continueevent.c: Return gdbpy_ref.
1306 * python/py-bpevent.c (create_breakpoint_event_object): Return
1307 gdbpy_ref.
1308
7c96f8c1
TT
13092017-09-11 Tom Tromey <tom@tromey.com>
1310
1311 PR python/15622:
1312 * NEWS: Add entry.
1313 * python/python.c (do_start_initialization): Initialize new event
1314 types.
1315 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1316 (gdbpy_initialize_inferior_deleted_event)
1317 (gdbpy_initialize_new_thread_event): Declare.
1318 * python/py-threadevent.c (create_thread_event_object): Add option
1319 "thread" parameter.
1320 * python/py-inferior.c (new_thread_event_object_type)
1321 (new_inferior_event_object_type)
1322 (inferior_deleted_event_object_type): Declare.
1323 (python_new_inferior, python_inferior_deleted): New functions.
1324 (add_thread_object): Emit new_thread event.
1325 (gdbpy_initialize_inferior): Attach new functions to corresponding
1326 observers.
1327 (new_thread, new_inferior, inferior_deleted): Define new event
1328 types.
1329 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1330 registries.
1331 * python/py-events.h (events_object) <new_inferior,
1332 inferior_deleted, new_thread>: New fields.
1333 * python/py-event.h (create_thread_event_breakpoint): Add optional
1334 "thread" parameter.
1335
72542b8e
AB
13362017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1337
1338 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1339 check current_ui instead.
1340 (internal_vproblem): Likewise.
1341
0d64823e
SM
13422017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1343
1344 * thread.c (print_thread_info_1): Remove unnecessary calls to
1345 uiout->is_mi_like_p.
1346
eb1e02fd
TT
13472017-09-09 Tom Tromey <tom@tromey.com>
1348
1349 * namespace.h (add_using_directive): Update.
1350 * namespace.c (add_using_directive): Change type of excludes to
1351 std::vector.
1352 * dwarf2read.c (read_import_statement): Use std::vector.
1353 (read_namespace): Update.
1354 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1355
0fc21fd8
TT
13562017-09-09 Tom Tromey <tom@tromey.com>
1357
1358 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1359
49663d05
TT
13602017-09-09 Tom Tromey <tom@tromey.com>
1361
1362 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1363
0b868b60
TT
13642017-09-09 Tom Tromey <tom@tromey.com>
1365
1366 * stack.c (func_command): Use gdb::def_vector.
1367
c0470d48
TT
13682017-09-09 Tom Tromey <tom@tromey.com>
1369
1370 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1371 ui_out_emit_list, ui_out_emit_tuple.
1372 (mi_cmd_var_update): Likewise.
1373
ca5909c7
TT
13742017-09-09 Tom Tromey <tom@tromey.com>
1375
1376 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1377 ui_out_redirect_pop.
1378 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1379 ui_out_redirect_pop.
1380 * utils.c (do_ui_out_redirect_pop)
1381 (make_cleanup_ui_out_redirect_pop): Remove.
1382 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1383 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1384 * ui-out.h (ui_out_redirect_pop): New class.
1385
e6a2252a
TT
13862017-09-09 Tom Tromey <tom@tromey.com>
1387
1388 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1389 (list_available_thread_groups, mi_cmd_list_thread_groups)
1390 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1391 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1392 Likewise.
1393
393702cd
TT
13942017-09-09 Tom Tromey <tom@tromey.com>
1395
1396 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1397 ui_out_emit_tuple.
1398
76f9c9cf
TT
13992017-09-09 Tom Tromey <tom@tromey.com>
1400
1401 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1402 * stack.c (print_frame): Use ui_out_emit_tuple.
1403 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1404 (info_spu_mailbox_command, info_spu_dma_command)
1405 (info_spu_proxydma_command): Likewise.
1406 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1407 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1408 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1409 ui_out_emit_tuple.
1410 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1411
dc9fe180
TT
14122017-09-09 Tom Tromey <tom@tromey.com>
1413
1414 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1415 (class ui_out_emit_table): Update comment.
1416 * ui-out.c (do_cleanup_table_end)
1417 (make_cleanup_ui_out_table_begin_end): Remove.
1418 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1419 (info_spu_dma_cmdlist): Likewise.
1420 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1421 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1422 ui_out_emit_table.
1423
f8cc3da6
TT
14242017-09-09 Tom Tromey <tom@tromey.com>
1425
1426 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1427 ui_out_emit_list, gdb::optional.
1428
481695ed
JB
14292017-09-09 John Baldwin <jhb@FreeBSD.org>
1430
1431 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1432 prototype.
1433 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1434 prototype.
1435 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1436 prototype.
1437 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1438 * ada-exp.y: Remove _initialize_ada_exp prototype.
1439 * ada-lang.c: Remove _initialize_ada_language prototype.
1440 * ada-tasks.c: Remove _initialize_tasks prototype.
1441 * addrmap.c: Remove _initialize_addrmap prototype.
1442 * agent.c: Remove _initialize_agent prototype.
1443 * aix-thread.c: Remove _initialize_aix_thread prototype.
1444 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1445 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1446 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1447 prototype.
1448 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1449 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1450 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1451 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1452 prototype.
1453 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1454 prototype.
1455 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1456 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1457 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1458 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1459 prototype.
1460 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1461 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1462 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1463 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1464 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1465 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1466 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1467 prototype.
1468 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1469 prototype.
1470 * annotate.c: Remove _initialize_annotate prototype.
1471 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1472 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1473 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1474 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1475 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1476 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1477 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1478 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1479 prototype.
1480 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1481 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1482 * auto-load.c: Remove _initialize_auto_load prototype.
1483 * auxv.c: Remove _initialize_auxv prototype.
1484 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1485 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1486 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1487 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1488 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1489 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1490 prototype.
1491 * break-catch-throw.c: Remove _initialize_break_catch_throw
1492 prototype.
1493 * breakpoint.c: Remove _initialize_breakpoint prototype.
1494 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1495 * btrace.c: Remove _initialize_btrace prototype.
1496 * charset.c: Remove _initialize_charset prototype.
1497 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1498 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1499 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1500 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1501 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1502 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1503 * coffread.c: Remove _initialize_coffread prototype.
1504 * compile/compile.c: Remove _initialize_compile prototype.
1505 * complaints.c: Remove _initialize_complaints prototype.
1506 * completer.c: Remove _initialize_completer prototype.
1507 * copying.awk: Remove _initialize_copying prototype.
1508 * copying.c: Regenerate.
1509 * core-regset.c: Remove _initialize_core_regset prototype.
1510 * corefile.c: Remove _initialize_core prototype.
1511 * corelow.c: Remove _initialize_corelow prototype.
1512 * cp-abi.c: Remove _initialize_cp_abi prototype.
1513 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1514 * cp-support.c: Remove _initialize_cp_support prototype.
1515 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1516 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1517 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1518 * ctf.c: Remove _initialize_ctf prototype.
1519 * d-lang.c: Remove _initialize_d_language prototype.
1520 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1521 prototype.
1522 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1523 * dbxread.c: Remove _initialize_dbxread prototype.
1524 * dcache.c: Remove _initialize_dcache prototype.
1525 * demangle.c: Remove _initialize_demangler prototype.
1526 * disasm-selftests.c: Remove _initialize_disasm_selftests
1527 prototype.
1528 * disasm.c: Remove _initialize_disasm prototype.
1529 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1530 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1531 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1532 prototype.
1533 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1534 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1535 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1536 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1537 * elfread.c: Remove _initialize_elfread prototype.
1538 * exec.c: Remove _initialize_exec prototype.
1539 * extension.c: Remove _initialize_extension prototype.
1540 * f-lang.c: Remove _initialize_f_language prototype.
1541 * f-valprint.c: Remove _initialize_f_valprint prototype.
1542 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1543 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1544 * filesystem.c: Remove _initialize_filesystem prototype.
1545 * findcmd.c: Remove _initialize_mem_search prototype.
1546 * fork-child.c: Remove _initialize_fork_child prototype.
1547 * frame-base.c: Remove _initialize_frame_base prototype.
1548 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1549 * frame.c: Remove _initialize_frame prototype.
1550 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1551 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1552 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1553 * gcore.c: Remove _initialize_gcore prototype.
1554 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1555 * gdbarch.c: Regenerate.
1556 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1557 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1558 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1559 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1560 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1561 * go-lang.c: Remove _initialize_go_language prototype.
1562 * go32-nat.c: Remove _initialize_go32_nat prototype.
1563 * guile/guile.c: Remove _initialize_guile prototype.
1564 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1565 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1566 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1567 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1568 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1569 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1570 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1571 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1572 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1573 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1574 prototype.
1575 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1576 prototype.
1577 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1578 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1579 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1580 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1581 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1582 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1583 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1584 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1585 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1586 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1587 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1588 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1589 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1590 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1591 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1592 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1593 prototype.
1594 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1595 prototype.
1596 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1597 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1598 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1599 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1600 * infcall.c: Remove _initialize_infcall prototype.
1601 * infcmd.c: Remove _initialize_infcmd prototype.
1602 * inferior.c: Remove _initialize_inferiors prototype.
1603 * inflow.c: Remove _initialize_inflow prototype.
1604 * infrun.c: Remove _initialize_infrun prototype.
1605 * interps.c: Remove _initialize_interpreter prototype.
1606 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1607 * jit.c: Remove _initialize_jit prototype.
1608 * language.c: Remove _initialize_language prototype.
1609 * linux-fork.c: Remove _initialize_linux_fork prototype.
1610 * linux-nat.c: Remove _initialize_linux_nat prototype.
1611 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1612 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1613 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1614 * m2-lang.c: Remove _initialize_m2_language prototype.
1615 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1616 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1617 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1618 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1619 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1620 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1621 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1622 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1623 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1624 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1625 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1626 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1627 * machoread.c: Remove _initialize_machoread prototype.
1628 * macrocmd.c: Remove _initialize_macrocmd prototype.
1629 * macroscope.c: Remove _initialize_macroscope prototype.
1630 * maint.c: Remove _initialize_maint_cmds prototype.
1631 * mdebugread.c: Remove _initialize_mdebugread prototype.
1632 * memattr.c: Remove _initialize_mem prototype.
1633 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1634 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1635 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1636 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1637 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1638 * microblaze-linux-tdep.c: Remove
1639 _initialize_microblaze_linux_tdep prototype.
1640 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1641 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1642 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1643 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1644 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1645 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1646 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1647 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1648 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1649 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1650 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1651 prototype.
1652 * mipsread.c: Remove _initialize_mipsread prototype.
1653 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1654 prototype.
1655 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1656 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1657 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1658 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1659 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1660 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1661 prototype.
1662 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1663 * nto-procfs.c: Remove _initialize_procfs prototype.
1664 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1665 * objc-lang.c: Remove _initialize_objc_language prototype.
1666 * objfiles.c: Remove _initialize_objfiles prototype.
1667 * observer.c: Remove observer_test_first_notification_function,
1668 observer_test_second_notification_function,
1669 observer_test_third_notification_function, and
1670 _initialize_observer prototypes.
1671 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1672 * osabi.c: Remove _initialize_gdb_osabi prototype.
1673 * osdata.c: Remove _initialize_osdata prototype.
1674 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1675 * parse.c: Remove _initialize_parse prototype.
1676 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1677 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1678 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1679 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1680 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1681 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1682 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1683 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1684 * printcmd.c: Remove _initialize_printcmd prototype.
1685 * probe.c: Remove _initialize_probe prototype.
1686 * proc-api.c: Remove _initialize_proc_api prototype.
1687 * proc-events.c: Remove _initialize_proc_events prototype.
1688 * proc-service.c: Remove _initialize_proc_service prototype.
1689 * procfs.c: Remove _initialize_procfs prototype.
1690 * psymtab.c: Remove _initialize_psymtab prototype.
1691 * python/python.c: Remove _initialize_python prototype.
1692 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1693 * record-btrace.c: Remove _initialize_record_btrace prototype.
1694 * record-full.c: Remove _initialize_record_full prototype.
1695 * record.c: Remove _initialize_record prototype.
1696 * regcache.c: Remove _initialize_regcache prototype.
1697 * reggroups.c: Remove _initialize_reggroup prototype.
1698 * remote-notif.c: Remove _initialize_notif prototype.
1699 * remote-sim.c: Remove _initialize_remote_sim prototype.
1700 * remote.c: Remove _initialize_remote prototype.
1701 * reverse.c: Remove _initialize_reverse prototype.
1702 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1703 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1704 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1705 prototype.
1706 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1707 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1708 * rust-exp.y: Remove _initialize_rust_exp prototype.
1709 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1710 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1711 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1712 * score-tdep.c: Remove _initialize_score_tdep prototype.
1713 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1714 prototype.
1715 * ser-go32.c: Remove _initialize_ser_dos prototype.
1716 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1717 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1718 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1719 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1720 * serial.c: Remove _initialize_serial prototype.
1721 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1722 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1723 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1724 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1725 * skip.c: Remove _initialize_step_skip prototype.
1726 * sol-thread.c: Remove _initialize_sol_thread prototype.
1727 * solib-aix.c: Remove _initialize_solib_aix prototype.
1728 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1729 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1730 * solib-frv.c: Remove _initialize_frv_solib prototype.
1731 * solib-spu.c: Remove _initialize_spu_solib prototype.
1732 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1733 * solib-target.c: Remove _initialize_solib_target prototype.
1734 * solib.c: Remove _initialize_solib prototype.
1735 * source.c: Remove _initialize_source prototype.
1736 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1737 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1738 prototype.
1739 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1740 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1741 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1742 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1743 prototype.
1744 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1745 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1746 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1747 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1748 prototype.
1749 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1750 prototype.
1751 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1752 prototype.
1753 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1754 prototype.
1755 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1756 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1757 prototype.
1758 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1759 prototype.
1760 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1761 prototype.
1762 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1763 prototype.
1764 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1765 prototype.
1766 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1767 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1768 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1769 * stabsread.c: Remove _initialize_stabsread prototype.
1770 * stack.c: Remove _initialize_stack prototype.
1771 * stap-probe.c: Remove _initialize_stap_probe prototype.
1772 * std-regs.c: Remove _initialize_frame_reg prototype.
1773 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1774 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1775 * symfile.c: Remove _initialize_symfile prototype.
1776 * symmisc.c: Remove _initialize_symmisc prototype.
1777 * symtab.c: Remove _initialize_symtab prototype.
1778 * target-dcache.c: Remove _initialize_target_dcache prototype.
1779 * target-descriptions.c: Remove _initialize_target_descriptions
1780 prototype.
1781 * thread.c: Remove _initialize_thread prototype.
1782 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1783 prototype.
1784 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1785 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1786 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1787 prototype.
1788 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1789 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1790 * tracefile.c: Remove _initialize_tracefile prototype.
1791 * tracepoint.c: Remove _initialize_tracepoint prototype.
1792 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1793 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1794 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1795 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1796 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1797 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1798 * tui/tui.c: Remove _initialize_tui prototype.
1799 * typeprint.c: Remove _initialize_typeprint prototype.
1800 * user-regs.c: Remove _initialize_user_regs prototype.
1801 * utils.c: Remove _initialize_utils prototype.
1802 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1803 * valarith.c: Remove _initialize_valarith prototype.
1804 * valops.c: Remove _initialize_valops prototype.
1805 * valprint.c: Remove _initialize_valprint prototype.
1806 * value.c: Remove _initialize_values prototype.
1807 * varobj.c: Remove _initialize_varobj prototype.
1808 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1809 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1810 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1811 * windows-nat.c: Remove _initialize_windows_nat,
1812 _initialize_check_for_gdb_ini, and _initialize_loadable
1813 prototypes.
1814 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1815 * xcoffread.c: Remove _initialize_xcoffread prototype.
1816 * xml-support.c: Remove _initialize_xml_support prototype.
1817 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1818 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1819 prototype.
1820 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1821 prototype.
1822 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1823
a611b5cb
KS
18242017-09-08 Keith Seitz <keiths@redhat.com>
1825
1826 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1827 field.
1828
469412dd
CW
18292017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1830
1831 * f-valprint.c (f_val_print): Remove check for one byte
1832 sized integers. Remove printing of character type.
1833
a5ad232b
FP
18342017-09-08 Frank Penczek <frank.penczek@intel.com>
1835 Christoph Weinmann <christoph.t.weinmann@intel.com>
1836 Bernhard Heckel <bernhard.heckel@intel.com>
1837
1838 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1839 to maintain proper indentation when printing pointers/refs.
1840
e5014227
JB
18412017-09-07 Joel Brobecker <brobecker@adacore.com>
1842
1843 GDB 8.0.1 released.
1844
63c99141
JB
18452017-09-07 Joel Brobecker <brobecker@adacore.com>
1846
1847 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1848
69c1e056
TT
18492017-09-05 Tom Tromey <tom@tromey.com>
1850
1851 * parse.c (funcall_chain): Now a std::vector.
1852 (start_arglist, end_arglist): Simplify.
1853 (free_funcalls): Remove.
1854 (parse_exp_in_context_1): Remove cleanup.
1855
fef704bf
TT
18562017-09-05 Tom Tromey <tom@tromey.com>
1857
1858 * go-exp.y (go_parse): Don't create a cleanup.
1859
5613c585
TT
18602017-09-05 Tom Tromey <tom@tromey.com>
1861
1862 * d-exp.y (PrimaryExpression): Use std::string.
1863 (d_parse): Don't create a cleanup.
1864
eae49211
TT
18652017-09-05 Tom Tromey <tom@tromey.com>
1866
1867 * utils.c (do_clear_parser_state): Remove.
1868 (make_cleanup_clear_parser_state): Remove.
1869 * p-exp.y (pascal_parse): Use scoped_restore.
1870 * m2-exp.y (m2_parse): Use scoped_restore.
1871 * f-exp.y (f_parse): Use scoped_restore.
1872 * d-exp.y (d_parse): Use scoped_restore.
1873 * c-exp.y (c_parse): Use scoped_restore.
1874 * ada-exp.y (ada_parse): Use scoped_restore.
1875 * utils.h (make_cleanup_clear_parser_state): Remove.
1876
73b9be8b
KS
18772017-09-06 Keith Seitz <keiths@redhat.com>
1878
1879 * dwarf2read.c (dw2_linkage_name_attr): New function.
1880 (dw2_linkage_name): New function.
1881 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1882 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1883 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1884
a102602b
KR
18852017-09-06 Kamil Rytarowski <n54@gmx.com>
1886
1887 * config/djgpp/djconfig.sh: Correct shell portability issue.
1888
28ad437d
KR
18892017-09-06 Kamil Rytarowski <n54@gmx.com>
1890
1891 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1892
351787dd
JB
18932017-09-06 John Baldwin <jhb@FreeBSD.org>
1894
1895 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1896 * NEWS: Mention new FreeBSD/mips native configuration.
1897 * configure.host: Add aarch64*-*-freebsd*.
1898 * configure.nat: Likewise.
1899 * aarch64-fbsd-nat.c: New file.
1900
c0f84956
JB
19012017-09-06 John Baldwin <jhb@FreeBSD.org>
1902
1903 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1904 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1905 * NEWS: Mention new FreeBSD/aarch64 target.
1906 * configure.tgt: Add aarch64*-*-freebsd*.
1907 * aarch64-fbsd-tdep.c: New file.
1908 * aarch64-fbsd-tdep.h: New file.
1909
7610297a
KR
19102017-09-06 Kamil Rytarowski <n54@gmx.com>
1911
1912 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1913
fbd1b771
JK
19142017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1915
1916 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1917 of TLS symbols.
1918
5ca79eae
PW
19192017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1920
1921 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1922 call.
1923
bf93d7ba
SM
19242017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1925
1926 * infrun.c (follow_exec): Call add_thread after
1927 target_find_description.
1928
1bb7c059
SM
19292017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1930
1931 * infrun.c (handle_inferior_event_1): When exec'ing, read
1932 stop_pc after follow_exec.
1933
fc809827
SM
19342017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1935
1936 * remote.c (process_g_packet): Update error message.
1937
d2fcdd85
YQ
19382017-09-05 Yao Qi <yao.qi@linaro.org>
1939
1940 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1941 targets.
1942
e69570ee
PA
19432017-09-05 Pedro Alves <palves@redhat.com>
1944
1945 * eval.c (eval_call, evaluate_funcall): New functions, factored
1946 out from ...
1947 (evaluate_subexp_standard): ... this.
1948
22916b07
YQ
19492017-09-05 Yao Qi <yao.qi@linaro.org>
1950
1951 * amd64-tdep.c (amd64_target_description): Create target
1952 descriptions.
1953 (_initialize_amd64_tdep): Don't call functions
1954 initialize_tdesc_amd64_*. Add self tests.
1955 * arch/amd64.c (amd64_create_target_description): Add parameter
1956 is_linux. Call set_tdesc_osabi if is_linux is true.
1957 * arch/amd64.h (amd64_create_target_description): Update the
1958 declaration.
1959 * arch/i386.c (i386_create_target_description): Add parameter
1960 is_linux. Call set_tdesc_osabi if is_linux is true.
1961 * arch/i386.h (i386_create_target_description): Update
1962 declaration.
1963 * configure.tgt: Add i386.o to gdb_target_obs.
1964 * features/Makefile (XMLTOC): Remove i386/*.xml.
1965 * features/i386/amd64-avx-avx512.c: Remove.
1966 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1967 * features/i386/amd64-avx-mpx.c: Remove.
1968 * features/i386/amd64-avx.c: Remove.
1969 * features/i386/amd64-mpx.c: Remove.
1970 * features/i386/amd64.c: Remove.
1971 * features/i386/i386-avx-avx512.c: Remove.
1972 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1973 * features/i386/i386-avx-mpx.c: Remove.
1974 * features/i386/i386-avx.c: Remove.
1975 * features/i386/i386-mmx.c: Remove.
1976 * features/i386/i386-mpx.c: Remove.
1977 * features/i386/i386.c: Remove.
1978 * i386-tdep.c: Don't include features/i386/i386*.c., include
1979 target-descriptions.h and arch/i386.h.
1980 (i386_target_description): Create target descriptions.
1981 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1982 functions. Do self tests.
1983
0854b7b1
YQ
19842017-09-05 Yao Qi <yao.qi@linaro.org>
1985
1986 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1987 * features/i386/amd64-avx-avx512-linux.c: Removed.
1988 * features/i386/amd64-avx-linux.c: Removed.
1989 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1990 * features/i386/amd64-avx-mpx-linux.c: Removed.
1991 * features/i386/amd64-linux.c: Removed.
1992 * features/i386/amd64-mpx-linux.c: Removed.
1993 * features/i386/x32-avx-avx512-linux.c: Removed.
1994 * features/i386/x32-avx-linux.c: Removed.
1995 * features/i386/x32-linux.c: Removed.
1996
b4570e4b
YQ
19972017-09-05 Yao Qi <yao.qi@linaro.org>
1998
1999 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2000 features/i386/*.c.
2001 (amd64_linux_read_description): Call
2002 amd64_create_target_description.
2003 * arch/amd64.c: New file.
2004 * arch/amd64.h: New file.
2005 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2006 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2007
6c73f67f
YQ
20082017-09-05 Yao Qi <yao.qi@linaro.org>
2009
2010 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2011 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2012 (amd64_linux_read_description): Create target descriptions.
2013 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2014 functions. Add unit tests.
2015 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2016 x32-core.xml.
2017 * features/i386/64bit-avx.c: Generated.
2018 * features/i386/64bit-avx512.c: Generated.
2019 * features/i386/64bit-core.c: Generated.
2020 * features/i386/64bit-linux.c: Generated.
2021 * features/i386/64bit-mpx.c: Generated.
2022 * features/i386/64bit-pkeys.c: Generated.
2023 * features/i386/64bit-segments.c: Generated.
2024 * features/i386/64bit-sse.c: Generated.
2025 * features/i386/x32-core.c: Generated.
2026 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2027 c files for amd64-linux and x32-linux.
2028
9d3d478b
YQ
20292017-09-05 Yao Qi <yao.qi@linaro.org>
2030
2031 * amd64-linux-tdep.c (amd64_linux_read_description): New
2032 function.
2033 (amd64_linux_core_read_description): Call
2034 amd64_linux_read_description.
2035 (amd64_linux_init_abi): Likewise.
2036 (amd64_x32_linux_init_abi): Likewise.
2037 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2038 * x86-linux-nat.c (x86_linux_read_description): Call
2039 amd64_linux_read_description.
2040
b9f1d50f
YQ
20412017-09-05 Yao Qi <yao.qi@linaro.org>
2042
2043 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2044 comments.
2045
188c9e6d
YQ
20462017-09-05 Yao Qi <yao.qi@linaro.org>
2047
2048 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2049 * features/i386/i386-avx-avx512-linux.c: Remove.
2050 * features/i386/i386-avx-linux.c: Remove.
2051 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2052 * features/i386/i386-avx-mpx-linux.c: Remove.
2053 * features/i386/i386-linux.c: Remove.
2054 * features/i386/i386-mmx-linux.c: Remove.
2055 * features/i386/i386-mpx-linux.c: Remove.
2056
5f035c07
YQ
20572017-09-05 Yao Qi <yao.qi@linaro.org>
2058
2059 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2060 (SFILES): Add arch/i386.c.
2061 (HFILES_NO_SRCDIR): Add arch/i386.h.
2062 * arch/i386.c: New file.
2063 * arch/i386.h: New file.
2064 * arch/tdesc.h (allocate_target_description): Declare.
2065 (set_tdesc_architecture): Declare.
2066 (set_tdesc_osabi): Declare.
2067 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2068 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2069 include arch/i386.h.
2070 (i386_linux_read_description): Remove code and call
2071 i386_create_target_description.
2072 (set_tdesc_architecture): New function.
2073 (set_tdesc_osabi): New function.
2074 * target-descriptions.h (allocate_target_description): Remove.
2075
0abe8a89
YQ
20762017-09-05 Yao Qi <yao.qi@linaro.org>
2077
2078 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2079 * target-descriptions.c (tdesc_create_feature): Likewise, and
2080 adjust code.
2081 * features/i386/32bit-avx.c: Re-generated.
2082 * features/i386/32bit-avx512.c: Re-generated.
2083 * features/i386/32bit-core.c: Re-generated.
2084 * features/i386/32bit-linux.c: Re-generated.
2085 * features/i386/32bit-mpx.c: Re-generated.
2086 * features/i386/32bit-pkeys.c: Re-generated.
2087 * features/i386/32bit-sse.c: Re-generated.
2088
0a188386
YQ
20892017-09-05 Yao Qi <yao.qi@linaro.org>
2090
2091 * regformats/regdef.h (struct reg): Override operator == and !=.
2092
f49ff000
YQ
20932017-09-05 Yao Qi <yao.qi@linaro.org>
2094
2095 * arch/tdesc.h: New file.
2096 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2097 * target-descriptions.c: Update comments.
2098 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2099 declarations.
2100 * features/i386/32bit-avx.c: Re-generated.
2101 * features/i386/32bit-avx512.c: Re-generated.
2102 * features/i386/32bit-core.c: Re-generated.
2103 * features/i386/32bit-linux.c: Re-generated.
2104 * features/i386/32bit-mpx.c: Re-generated.
2105 * features/i386/32bit-pkeys.c: Re-generated.
2106 * features/i386/32bit-sse.c: Re-generated.
2107
f7000548
YQ
21082017-09-05 Yao Qi <yao.qi@linaro.org>
2109
2110 * regformats/regdat.sh: Update generated code.
2111
c9a5e2a5
YQ
21122017-09-05 Yao Qi <yao.qi@linaro.org>
2113
2114 * regformats/regdat.sh: Adjust code order.
2115
d6b687ac
SM
21162017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2117
2118 * expprint.c (dump_subexp_body_standard): Use constant format
2119 string in fprintf_filtered call.
2120
a379bfd0
JB
21212017-09-04 John Baldwin <jhb@FreeBSD.org>
2122
2123 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2124 NetBSD/i386.
2125 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2126
f7efc967
JB
21272017-09-04 John Baldwin <jhb@FreeBSD.org>
2128
2129 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2130
c49fbc6c
JB
21312017-09-04 John Baldwin <jhb@FreeBSD.org>
2132
2133 * bsd-kvm.o: Define _KMEMUSER.
2134 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2135 * configure: Regenerate.
2136
26562e73
JB
21372017-09-04 John Baldwin <jhb@FreeBSD.org>
2138
2139 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2140 * i386-fbsd-nat.c: Likewise.
2141
31cf1487
JB
21422017-09-04 John Baldwin <jhb@FreeBSD.org>
2143
2144 * unittests/array-view-selftests.c: Add include of <array>.
2145
5b9f8a7c
JB
21462017-09-04 John Baldwin <jhb@FreeBSD.org>
2147
2148 * spu-tdep.c (flush_ea_cache): Add missing argument to
2149 call_function_by_hand.
2150
d69cf9b2
PA
21512017-09-04 Pedro Alves <palves@redhat.com>
2152
2153 * NEWS (Safer support for debugging with no debug info): New.
2154
3693fdb3
PA
21552017-09-04 Pedro Alves <palves@redhat.com>
2156
2157 * c-exp.y (function_method, function_method_void): Add current
2158 instance flags to TYPE_INSTANCE.
2159 * dwarf2read.c (check_modifier): New.
2160 (compute_delayed_physnames): Assert that only C++ adds delayed
2161 physnames. Mark fn_fields as const/volatile depending on
2162 physname.
2163 * eval.c (make_params): New type_instance_flags parameter. Use
2164 it as the new type's instance flags.
2165 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2166 flags element and pass it to make_params.
2167 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2168 instance flags element.
2169 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2170 * gdbtypes.h: Include "enum-flags.h".
2171 (type_instance_flags): New enum-flags type.
2172 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2173 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2174 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2175 (follow_type_instance_flags): New function.
2176 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2177 * parser-defs.h (follow_type_instance_flags): Declare.
2178 * valops.c (value_struct_elt_for_reference): const/volatile must
2179 match too.
2180
e68cb8e0
PA
21812017-09-04 Pedro Alves <palves@redhat.com>
2182
2183 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2184 function/method scopes; lookup the nested name as a function local
2185 static variable.
2186
858be34c
PA
21872017-09-04 Pedro Alves <palves@redhat.com>
2188
2189 (%type <voidval>): Add function_method.
2190 * c-exp.y (exp): New production for calls with no arguments.
2191 (function_method, function_method_void_or_typelist): New
2192 productions.
2193 (exp): New production for "method()::static_var".
2194 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2195 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2196 Handle OP_FUNC_STATIC_VAR.
2197 * parse.c (operator_length_standard):
2198 Handle OP_FUNC_STATIC_VAR.
2199
dd5901a6
PA
22002017-09-04 Pedro Alves <palves@redhat.com>
2201
2202 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2203 handling.
2204 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2205 Ditto.
2206 * parse.c (operator_length_standard, operator_check_standard):
2207 Ditto.
2208 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2209
46a4882b
PA
22102017-09-04 Pedro Alves <palves@redhat.com>
2211
2212 * ax-gdb.c: Include "typeprint.h".
2213 (gen_expr_for_cast): New function.
2214 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2215 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2216 type is unknown.
2217 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2218 nodebug_data_symbol.
2219 * eval.c: Include "typeprint.h".
2220 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2221 Error out if symbol has unknown type.
2222 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2223 evaluate_subexp_for_cast.
2224 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2225 OP_VAR_MSYM_VALUE.
2226 (evaluate_subexp_for_cast): New function.
2227 * gdbtypes.c (init_nodebug_var_type): New function.
2228 (objfile_type): Use it to initialize types of variables with no
2229 debug info.
2230 * typeprint.c (error_unknown_type): New.
2231 * typeprint.h (error_unknown_type): New declaration.
2232 * compile/compile-c-types.c (convert_type_basic): Handle
2233 TYPE_CODE_ERROR; warn and fallback to int for variables with
2234 unknown type.
2235
fe13dfec
PA
22362017-09-04 Pedro Alves <palves@redhat.com>
2237
2238 * eval.c (evaluate_var_value): New function, factored out from ...
2239 (evaluate_subexp_standard): ... here.
2240
d008ee21
PA
22412017-09-04 Pedro Alves <palves@redhat.com>
2242
2243 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2244 Remove useless assignments to 'op'.
2245
827d0c51
PA
22462017-09-04 Pedro Alves <palves@redhat.com>
2247
2248 * eval.c (eval_skip_value): New function.
2249 (evaluate_subexp_standard): Use it.
2250
2c5a2be1
PA
22512017-09-04 Pedro Alves <palves@redhat.com>
2252
2253 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2254 function name from symbol/minsym and pass it to
2255 error_call_unknown_return_type.
2256
74ea4be4
PA
22572017-09-04 Pedro Alves <palves@redhat.com>
2258
2259 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2260 * ax-gdb.c (gen_msym_var_ref): New function.
2261 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2262 * eval.c (evaluate_var_msym_value): New function.
2263 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2264 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2265 to call_function_by_hand.
2266 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2267 Handle OP_VAR_MSYM_VALUE.
2268 (union exp_element) <msymbol>: New field.
2269 * minsyms.h (struct type): Forward declare.
2270 (find_minsym_type_and_address): Declare.
2271 * parse.c (write_exp_elt_msym): New function.
2272 (write_exp_msymbol): Delete, refactored as ...
2273 (find_minsym_type_and_address): ... this new function.
2274 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2275 (operator_length_standard, operator_check_standard): Handle
2276 OP_VAR_MSYM_VALUE.
2277 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2278
7022349d
PA
22792017-09-04 Pedro Alves <palves@redhat.com>
2280
2281 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2282 TYPE_GNU_IFUNC specially here. Throw error if return type is
2283 unknown.
2284 * ada-typeprint.c (print_func_type): Handle functions with unknown
2285 return type.
2286 * c-typeprint.c (c_type_print_base): Handle functions and methods
2287 with unknown return type.
2288 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2289 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2290 * compile/compile-c-types.c: Include "objfiles.h".
2291 (convert_func): For functions with unknown return type, warn and
2292 default to int.
2293 * compile/compile-object-run.c (compile_object_run): Adjust call
2294 to call_function_by_hand_dummy.
2295 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2296 call_function_by_hand.
2297 * eval.c (evaluate_subexp_standard): Adjust calls to
2298 call_function_by_hand. Handle functions and methods with unknown
2299 return type. Pass expect_type to call_function_by_hand.
2300 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2301 return type.
2302 * gcore.c (call_target_sbrk): Adjust call to
2303 call_function_by_hand.
2304 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2305 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2306 an integer address type instead of nodebug.
2307 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2308 call_function_by_hand.
2309 * infcall.c (error_call_unknown_return_type): New function.
2310 (call_function_by_hand): New "default_return_type" parameter.
2311 Pass it down.
2312 (call_function_by_hand_dummy): New "default_return_type"
2313 parameter. Use it instead of defaulting to int. If there's no
2314 default and the return type is unknown, throw an error. If
2315 there's a default return type, and the called function has no
2316 debug info, then assume the function is prototyped.
2317 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2318 New "default_return_type" parameter.
2319 (error_call_unknown_return_type): New declaration.
2320 * linux-fork.c (call_lseek): Cast return type of lseek.
2321 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2322 call_function_by_hand.
2323 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2324 calls to call_function_by_hand.
2325 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2326 return type.
2327 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2328 (value_nsstring, print_object_command): Adjust calls to
2329 call_function_by_hand.
2330 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2331 functions with unknown return type.
2332 (pascal_type_print_func_varspec_suffix): New function.
2333 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2334 TYPE_CODE_METHOD>: Use it.
2335 * python/py-value.c (valpy_call): Adjust call to
2336 call_function_by_hand.
2337 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2338 call_function_by_hand.
2339 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2340 call_function_by_hand.
2341 * valops.c (value_allocate_space_in_inferior): Adjust call to
2342 call_function_by_hand.
2343 * typeprint.c (type_print_unknown_return_type): New function.
2344 * typeprint.h (type_print_unknown_return_type): New declaration.
2345
54990598
PA
23462017-09-04 Pedro Alves <palves@redhat.com>
2347
2348 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2349 types with more than one parameter as prototyped.
2350
9a24775b
PA
23512017-09-04 Pedro Alves <palves@redhat.com>
2352
2353 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2354 (disassemble_command): Use gdb_disassembly_flags instead of bare
2355 int.
2356 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2357 (dump_insns, do_mixed_source_and_assembly_deprecated)
2358 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2359 Use gdb_disassembly_flags instead of bare int.
2360 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2361 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2362 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2363 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2364 (enum gdb_disassembly_flag): ... values of this new enumeration.
2365 (gdb_disassembly_flags): Define.
2366 (gdb_disassembly)
2367 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2368 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2369 gdb_disassembly_flags instead of bare int.
2370 * record-btrace.c (btrace_insn_history)
2371 (record_btrace_insn_history, record_btrace_insn_history_range)
2372 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2373 instead of bare int.
2374 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2375 Use gdb_disassembly_flags instead of bare int.
2376 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2377 Define.
2378 * target-delegates.c: Regenerate.
2379 * target.c (target_insn_history, target_insn_history_from)
2380 (target_insn_history_range): Use gdb_disassembly_flags instead of
2381 bare int.
2382 * target.h: Include "disasm.h".
2383 (struct target_ops) <to_insn_history, to_insn_history_from,
2384 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2385 int.
2386 (target_insn_history, target_insn_history_from)
2387 (target_insn_history_range): Use gdb_disassembly_flags instead of
2388 bare int.
2389
80a65e9b
SM
23902017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2391
2392 * cli/cli-script.c (build_command_line): For if/while commands,
2393 check whether args is empty.
2394
6b66338c
SM
23952017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2396
2397 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2398 (enum command_control_type): Likewise.
2399 (struct command_line): Likewise.
2400 (free_command_lines): Likewise.
2401 (struct command_lines_deleter): Likewise.
2402 (command_line_up): Likewise.
2403 (read_command_lines): Likewise.
2404 (read_command_lines_1): Likewise.
2405 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2406 (enum command_control_type): Likewise.
2407 (struct command_line): Likewise.
2408 (free_command_lines): Likewise.
2409 (struct command_lines_deleter): Likewise.
2410 (command_line_up): Likewise.
2411 (read_command_lines): Likewise.
2412 (read_command_lines_1): Likewise.
2413 * breakpoint.h: Include cli/cli-script.h.
2414 * extension-priv.h: Likewise.
2415 * gdbcmd.h: Likewise.
2416
51abb421
PA
24172017-09-04 Pedro Alves <palves@redhat.com>
2418
2419 * ada-lang.c (is_known_support_routine): Move sal declaration to
2420 where it is initialized.
2421 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2422 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2423 (clear_command, update_static_tracepoint): Remove init_sal
2424 references. Move declarations closer to initializations.
2425 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2426 initializations.
2427 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2428 references. Move sal declarations closer to initializations.
2429 * frame.c (find_frame_sal): Return a symtab_and_line via function
2430 return instead of output parameter. Remove init_sal references.
2431 * frame.h (find_frame_sal): Return a symtab_and_line via function
2432 return instead of output parameter.
2433 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2434 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2435 instead of memset.
2436 (gdbscm_find_pc_line): Remove init_sal reference.
2437 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2438 references. Move declarations closer to initializations.
2439 * infcmd.c (set_step_frame): Update. Move declarations closer to
2440 initializations.
2441 (finish_backward): Remove init_sal references. Move declarations
2442 closer to initializations.
2443 * infrun.c (process_event_stop_test, handle_step_into_function)
2444 (insert_hp_step_resume_breakpoint_at_frame)
2445 (insert_step_resume_breakpoint_at_caller): Likewise.
2446 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2447 (symbol_to_sal): Likewise.
2448 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2449 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2450 to its initialization.
2451 * reverse.c (save_bookmark_command): Use new/delete. Remove
2452 init_sal references. Move declarations closer to initializations.
2453 * source.c (get_current_source_symtab_and_line): Remove brace
2454 initialization.
2455 (set_current_source_symtab_and_line): Now takes the sal by const
2456 reference. Remove brace initialization.
2457 (line_info): Remove init_sal reference.
2458 * source.h (set_current_source_symtab_and_line): Now takes a
2459 symtab_and_line via const reference.
2460 * stack.c (set_current_sal_from_frame): Adjust.
2461 (print_frame_info): Adjust.
2462 (get_last_displayed_sal): Return the sal via function return
2463 instead of via output parameter. Simplify.
2464 (frame_info): Adjust.
2465 * stack.h (get_last_displayed_sal): Return the sal via function
2466 return instead of via output parameter.
2467 * symtab.c (init_sal): Delete.
2468 (find_pc_sect_line): Remove init_sal references. Move
2469 declarations closer to initializations.
2470 (find_function_start_sal): Remove init_sal references. Move
2471 declarations closer to initializations.
2472 * symtab.h (struct symtab_and_line): In-class initialize all
2473 fields.
2474 * tracepoint.c (set_traceframe_context)
2475 (print_one_static_tracepoint_marker): Remove init_sal references.
2476 Move declarations closer to initializations.
2477 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2478 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2479 declarations closer to initializations.
2480 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2481 init_sal references. Adjust.
2482
6c5b2ebe
PA
24832017-09-04 Pedro Alves <palves@redhat.com>
2484
2485 * ax-gdb.c (agent_command_1): Use range-for.
2486 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2487 * breakpoint.c: Include "common/array-view.h".
2488 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2489 parameter from struct symtabs_and_lines to
2490 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2491 (breakpoint_sals_to_pc): Change sals parameter from struct
2492 symtabs_and_lines to std::vector reference.
2493 (check_fast_tracepoint_sals): Change sals parameter from struct
2494 symtabs_and_lines to std::array_view. Use range-for.
2495 (decode_static_tracepoint_spec): Return a std::vector instead of
2496 symtabs_and_lines. Update.
2497 (create_breakpoint): Update.
2498 (break_range_command, until_break_command, clear_command): Update.
2499 (base_breakpoint_decode_location, bkpt_decode_location)
2500 (bkpt_probe_create_sals_from_location)
2501 (bkpt_probe_decode_location, tracepoint_decode_location)
2502 (tracepoint_probe_decode_location)
2503 (strace_marker_create_sals_from_location): Return a std::vector
2504 instead of symtabs_and_lines.
2505 (strace_marker_create_breakpoints_sal): Update.
2506 (strace_marker_decode_location): Return a std::vector instead of
2507 symtabs_and_lines. Update.
2508 (update_breakpoint_locations): Change struct symtabs_and_lines
2509 parameters to gdb::array_view. Adjust.
2510 (location_to_sals): Return a std::vector instead of
2511 symtabs_and_lines. Update.
2512 (breakpoint_re_set_default): Use std::vector instead of struct
2513 symtabs_and_lines.
2514 (decode_location_default): Return a std::vector instead of
2515 symtabs_and_lines. Update.
2516 * breakpoint.h: Include "common/array-view.h".
2517 (struct breakpoint_ops) <decode_location>: Now returns a
2518 std::vector instead of returning a symtabs_and_lines via output
2519 parameter.
2520 (update_breakpoint_locations): Change sals parameters to use
2521 gdb::array_view.
2522 * cli/cli-cmds.c (edit_command, list_command): Update to use
2523 std::vector and gdb::array_view.
2524 (ambiguous_line_spec): Adjust to use gdb::array_view and
2525 range-for.
2526 (compare_symtabs): Rename to ...
2527 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2528 const reference and adjust.
2529 (filter_sals): Rewrite using std::vector and standard algorithms.
2530 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2531 (jump_command): Update to use std::vector.
2532 * linespec.c (struct linespec_state) <canonical_names>: Update
2533 comment.
2534 (add_sal_to_sals_basic): Delete.
2535 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2536 (decode_line_2, create_sals_line_offset)
2537 (convert_address_location_to_sals, convert_linespec_to_sals)
2538 (convert_explicit_location_to_sals, parse_linespec)
2539 (event_location_to_sals, decode_line_full, decode_line_1)
2540 (decode_line_with_current_source)
2541 (decode_line_with_last_displayed, decode_objc)
2542 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2543 (linespec_result::~linespec_result): Adjust to use std::vector
2544 instead of symtabs_and_lines.
2545 * linespec.h (linespec_sals::sals): Now a std::vector.
2546 (struct linespec_result): Use std::vector, bool, and in-class
2547 initialization.
2548 (decode_line_1, decode_line_with_current_source)
2549 (decode_line_with_last_displayed): Return std::vector.
2550 * macrocmd.c (info_macros_command): Use std::vector.
2551 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2552 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2553 std::vector.
2554 * probe.h (parse_probes): Return a std::vector.
2555 * python/python.c (gdbpy_decode_line): Use std::vector and
2556 gdb::array_view.
2557 * source.c (select_source_symtab, line_info): Use std::vector.
2558 * stack.c (func_command): Use std::vector.
2559 * symtab.h (struct symtabs_and_lines): Delete.
2560 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2561
7c44b49c
PA
25622017-09-04 Pedro Alves <palves@redhat.com>
2563
2564 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2565 unittests/array-view-selftests.c.
2566 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2567 * common/array-view.h: New file.
2568 * unittests/array-view-selftests.c: New file.
2569
e439fa14
PA
25702017-09-04 Pedro Alves <palves@redhat.com>
2571
2572 * cli/cli-cmds.c (edit_command): Pass message to
2573 ambiguous_line_spec.
2574 (list_command): Pass message to ambiguous_line_spec. Say
2575 "first"/"last" instead of "start" and "end" to be consistent with
2576 the manual.
2577 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2578 them to print formatted message.
2579
7525b645
PA
25802017-09-04 Pedro Alves <palves@redhat.com>
2581
2582 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2583 ftrace_update_insns by reference instead of pointer.
2584
badc0020
YQ
25852017-09-04 Yao Qi <yao.qi@linaro.org>
2586
2587 * i386-go32-tdep.c: Include x86-xstate.h.
2588 (i386_go32_init_abi): Call i386_target_description.
2589 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2590 if xcr0 is X86_XSTATE_X87_MASK.
2591 * i386-tdep.h (tdesc_i386): Remove the declaration.
2592 (tdesc_i386_mmx): Likewise.
2593
d78bdb54
YQ
25942017-09-04 Yao Qi <yao.qi@linaro.org>
2595
2596 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2597 X86_XSTATE_SSE_MASK instead of 0.
2598
ca1fa5ee
YQ
25992017-09-04 Yao Qi <yao.qi@linaro.org>
2600
2601 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2602 i386_target_description.
2603 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2604 i386_target_description.
2605 * i386-tdep.c (i386_gdbarch_init): Likewise.
2606
2434b019
YQ
26072017-09-04 Yao Qi <yao.qi@linaro.org>
2608
2609 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2610 (x86_darwin_init_abi_64): Call amd64_target_description.
2611 * amd64-dicos-tdep.c: Likewise.
2612 * amd64-fbsd-nat.c: Likewise.
2613 * amd64-fbsd-tdep.c: Likewise.
2614 * amd64-nbsd-tdep.c: Likewise.
2615 * amd64-obsd-tdep.c: Likewise.
2616 * amd64-sol2-tdep.c: Likewise.
2617 * amd64-windows-tdep.c: Likewise.
2618 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2619
0860c437
SM
26202017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2621
2622 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2623 (btrace_function) <insn>: Change type to use std::vector.
2624 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2625 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2626 ftrace_update_insns, ftrace_compute_global_level_offset,
2627 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2628 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2629 change to std::vector.
2630 (ftrace_update_insns): Adjust to change to std::vector, change
2631 type of INSN parameter.
2632 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2633 * record-btrace.c (btrace_call_history_insn_range,
2634 btrace_compute_src_line_range,
2635 record_btrace_frame_prev_register): Adjust to change to
2636 std::vector.
2637 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2638 to change to std::vector.
2639
0638b7f9
TT
26402017-09-03 Tom Tromey <tom@tromey.com>
2641
2642 * corefile.c (reopen_exec_file): Use std::string.
2643
8f84fb0e
TT
26442017-09-03 Tom Tromey <tom@tromey.com>
2645
2646 * compile/compile.c (compile_register_name_mangled): Return
2647 std::string.
2648 * compile/compile-loc2c.c (pushf_register_address): Update.
2649 (pushf_register): Update.
2650 * compile/compile-c-types.c (convert_array): Update.
2651 * compile/compile-c-symbols.c (generate_vla_size): Update.
2652 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2653 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2654 (convert_one_symbol): Update.
2655 (generate_c_for_for_one_variable): Update.
2656 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2657 std::string.
2658 (generate_register_struct): Update.
2659 * compile/compile-internal.h (c_get_range_decl_name): Return a
2660 std::string.
2661 (compile_register_name_mangled): Return std::string.
2662
18e9961f
TT
26632017-09-03 Tom Tromey <tom@tromey.com>
2664
2665 * utils.c (perror_string): Return a std::string.
2666 (throw_perror_with_name, perror_warning_with_name): Update.
2667
45343786
TT
26682017-09-03 Tom Tromey <tom@tromey.com>
2669
2670 * demangle.c (demangle_command): Use std::string,
2671 unique_xmalloc_ptr.
2672
b57af503
TT
26732017-09-03 Tom Tromey <tom@tromey.com>
2674
2675 * cli/cli-setshow.c (do_set_command): Use std::string.
2676
6eecf35f
TT
26772017-09-03 Tom Tromey <tom@tromey.com>
2678
2679 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2680
56496dd4
TT
26812017-09-03 Tom Tromey <tom@tromey.com>
2682
2683 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2684
e91a1fa7
TT
26852017-09-03 Tom Tromey <tom@tromey.com>
2686
2687 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2688 gdb::unique_xmalloc_ptr.
2689
7ffd83d7
TT
26902017-09-03 Tom Tromey <tom@tromey.com>
2691
2692 * thread.c (print_thread_info_1): Use string_printf.
2693 (thread_apply_command, thread_apply_all_command): Use
2694 std::string.
2695
1ccbe998
TT
26962017-09-03 Tom Tromey <tom@tromey.com>
2697
2698 * valprint.c (val_print_string): Update.
2699 * gdbcore.h (memory_error_message): Return std::string.
2700 * corefile.c (memory_error_message): Return std::string.
2701 (memory_error): Update.
2702 * breakpoint.c (insert_bp_location): Update.
2703
23fdd69e
SM
27042017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2705
2706 * target/waitstatus.h (target_waitstatus_to_string): Change
2707 return type to std::string.
2708 * target/waitstatus.c (target_waitstatus_to_string): Return
2709 std::string.
2710 * target.h (target_waitstatus_to_string): Remove declaration.
2711 * infrun.c (resume, clear_proceed_status_thread,
2712 print_target_wait_results, do_target_wait, save_waitstatus,
2713 stop_all_threads): Adjust.
2714 * record-btrace.c (record_btrace_wait): Adjust.
2715 * target-debug.h
2716 (target_debug_print_struct_target_waitstatus_p): Adjust.
2717
5c811d30
JK
27182017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2719
2720 PR gdb/22046
2721 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2722 detection.
2723
0a2dde4a
SDJ
27242017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2725
2726 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2727 for setting/unsetting environment variables on the remote target.
2728 (New remote packets): Add entries for QEnvironmentHexEncoded,
2729 QEnvironmentUnset and QEnvironmentReset.
2730 * common/environ.c (gdb_environ::operator=): Extend method to
2731 handle m_user_set_env_list and m_user_unset_env_list.
2732 (gdb_environ::clear): Likewise.
2733 (match_var_in_string): Change type of first parameter from 'char
2734 *' to 'const char *'.
2735 (gdb_environ::set): Extend method to handle
2736 m_user_set_env_list and m_user_unset_env_list.
2737 (gdb_environ::unset): Likewise.
2738 (gdb_environ::clear_user_set_env): New method.
2739 (gdb_environ::user_set_envp): Likewise.
2740 (gdb_environ::user_unset_envp): Likewise.
2741 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2742 m_user_unset_env_list on move constructor/assignment.
2743 (unset): Add new default parameter 'update_unset_list = true'.
2744 (clear_user_set_env): New method.
2745 (user_set_envp): Likewise.
2746 (user_unset_envp): Likewise.
2747 (m_user_set_env_list): New std::set.
2748 (m_user_unset_env_list): Likewise.
2749 * common/rsp-low.c (hex2str): New function.
2750 (bin2hex): New overload for bin2hex function.
2751 * common/rsp-low.c (hex2str): New prototype.
2752 (str2hex): New overload prototype.
2753 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2754 QEnvironmentUnset and QEnvironmentReset.
2755 (remote_protocol_features): Add QEnvironmentHexEncoded,
2756 QEnvironmentUnset and QEnvironmentReset packets.
2757 (send_environment_packet): New function.
2758 (extended_remote_environment_support): Likewise.
2759 (extended_remote_create_inferior): Call
2760 extended_remote_environment_support.
2761 (_initialize_remote): Add QEnvironmentHexEncoded,
2762 QEnvironmentUnset and QEnvironmentReset packet configs.
2763 * unittests/environ-selftests.c (gdb_selftest_env_var):
2764 New variable.
2765 (test_vector_initialization): New function.
2766 (test_init_from_host_environ): Likewise.
2767 (test_reinit_from_host_environ): Likewise.
2768 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2769 Likewise.
2770 (test_unset_set_empty_vector): Likewise.
2771 (test_vector_clear): Likewise.
2772 (test_std_move): Likewise.
2773 (test_move_constructor):
2774 (test_self_move): Likewise.
2775 (test_set_unset_reset): Likewise.
2776 (run_tests): Rewrite in terms of the functions above.
2777
654670a4
WP
27782017-08-31 Weimin Pan <weimin.pan@oracle.com>
2779
2780 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2781 (adi_available): Use a temp variable of type CORE_ADDR as argument
2782 3 when calling target_auxv_search.
2783 (adi_normalize_address): Use masks and xor operators to calculate
2784 normalized address.
2785 (adi_read_versions, adi_write_versions, adi_print_versions)
2786 (do_examine, do_assign): Use paddress.
2787
7755ddb7
JB
27882017-08-29 John Baldwin <jhb@FreeBSD.org>
2789
2790 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2791 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2792 out of loop and add supply of FIR.
2793 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2794 add collect of FIR.
2795
fd437cbc
SM
27962017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2797
3804a343 2798 PR gdb/21827
fd437cbc
SM
2799 * cli/cli-script.c (define_command): Don't convert command name
2800 to lower case.
2801
988f6b3d
JB
28022017-08-25 Joel Brobecker <brobecker@adacore.com>
2803
2804 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2805 Update all callers accordingly. Remove all code blocks handling
2806 the case where DISPP is not NULL.
2807
663c44ac
JK
28082017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2809
2810 PR symtab/22003
2811 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2812 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2813 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2814
f1902523
JK
28152017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2816
2817 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2818 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2819 (read_comp_units_from_section): New parameter abbrev_section, use
2820 read_and_check_comp_unit_head, allocate signatured_type if needed.
2821 (create_all_comp_units): Update read_comp_units_from_section caller.
2822
87215ad1
SDJ
28232017-08-23 Pedro Alves <palves@redhat.com>
2824
2825 PR remote/21852
2826 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2827 to null_ptid and switch to thread without reading the registers
2828 after adding the inferior.
2829
6e41ddec
JK
28302017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2831
2832 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2833 compile-gcc.
2834 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2835 (compile_to_object): Implement compile_gcc.
2836 (_initialize_compile): Install "set compile-gcc". Initialize
2837 compile_gcc.
2838
e68c32d5
JK
28392017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2840
2841 * compile/compile.c (compile_to_object): Conditionally call
2842 set_verbose. Conditionally call compile or compile_v0.
2843
58afddc6
WP
28442017-08-07 Weimin Pan <weimin.pan@oracle.com>
2845
2846 * sparc64-tdep.h: (adi_normalize_address): New export.
2847 * sparc-nat.h: (open_adi_tag_fd): New export.
2848 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2849 * sparc64-linux-tdep.c:
2850 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2851 (sparc64_linux_handle_segmentation_fault): New function.
2852 (sparc64_linux_init_abi): Register
2853 sparc64_linux_handle_segmentation_fault
2854 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2855 (sparc64_addr_bits_remove): New function.
2856 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2857 (MAX_PROC_NAME_SIZE): New macro.
2858 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2859 (sparc64adilist): New variable.
2860 (adi_proc_list): New variable.
2861 (find_adi_info): New function.
2862 (add_adi_info): New function.
2863 (get_adi_info_proc): New function.
2864 (get_adi_info): New function.
2865 (info_adi_command): New function.
2866 (read_maps_entry): New function.
2867 (adi_available): New function.
2868 (adi_normalize_address): New function.
2869 (adi_align_address): New function.
2870 (adi_convert_byte_count): New function.
2871 (adi_tag_fd): New function.
2872 (adi_is_addr_mapped): New function.
2873 (adi_read_versions): New function.
2874 (adi_write_versions): New function.
2875 (adi_print_versions): New function.
2876 (do_examine): New function.
2877 (do_assign): New function.
2878 (adi_examine_command): New function.
2879 (adi_assign_command): New function.
2880 (_initialize_sparc64_adi_tdep): New function.
2881
11db9430
SM
28822017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2883
2884 * breakpoint.c (breakpoints_info): Rename to ...
2885 (info_breakpoints_command): ... this.
2886 (watchpoints_info): Rename to ...
2887 (info_watchpoints_command): ... this.
2888 (tracepoints_info): Rename to ...
2889 (info_tracepoints_command): ... this.
2890 (_initialize_breakpoint): Adjust.
2891 * dcache.c (dcache_info): Rename to ...
2892 (info_display_command): ... this.
2893 (_initialize_dcache): Adjust.
2894 * frame.h (args_info): Rename to ...
2895 (info_args_command): ... this.
2896 (locals_info): Rename to ...
2897 (info_locals_command): ... this.
2898 * infcmd.c (nofp_registers_info): Rename to ...
2899 (info_registers_command): ... this.
2900 (float_info): Rename to ...
2901 (info_float_command): ... this.
2902 (program_info): Rename to ...
2903 (info_program_command): ... this.
2904 (all_registers_info): Rename to ...
2905 (info_all_registers_command): ... this.
2906 (vector_info): Rename to ...
2907 (info_vector_command): ... this.
2908 (float_info): Rename to ...
2909 (info_float_command): ... this.
2910 (_initialize_infcmd): Adjust.
2911 * inferior.h (term_info): Rename to ...
2912 (info_terminal_command): ... this.
2913 * inflow.c (term_info): Rename to ...
2914 (info_terminal_command): ... this.
2915 (_initialize_inflow): Adjust.
2916 * infrun.c (signals_info): Rename to ...
2917 (info_signals_command): ... this.
2918 (_initialize_infrun): Adjust.
2919 * objc-lang.c (classes_info): Rename to ...
2920 (info_classes_command): ... this.
2921 (selectors_info): Rename to ...
2922 (info_selectors_command): ... this.
2923 (_initialize_objc_language): Adjust.
2924 * printcmd.c (sym_info): Rename to ...
2925 (info_symbol_command): ... this.
2926 (address_info): Rename to ...
2927 (info_address_command): ... this.
2928 (display_info): Rename to ...
2929 (info_display_command): ... this.
2930 (_initialize_printcmd): Adjust.
2931 * reverse.c (bookmarks_info): Rename to ...
2932 (info_breakpoints_command): ... this.
2933 (_initialize_reverse): Adjust.
2934 * ser-go32.c (dos_info): Rename to ...
2935 (info_serial_command): ... this.
2936 (_initialize_ser_dos): Adjust.
2937 * skip.c (skip_info): Rename to ...
2938 (info_skip_command): ... this.
2939 (_initialize_step_skip): Adjust.
2940 * source.c (line_info): Rename to ...
2941 (info_line_command): ... this.
2942 (source_info): Rename to ...
2943 (info_source_command)
2944 * stack.c (frame_info): Rename to ...
2945 (info_frame_command): ... this.
2946 (locals_info): Rename to ...
2947 (info_locals_command): ... this.
2948 (args_info): Rename to ...
2949 (info_args_command): ... this.
2950 (_initialize_stack): Adjust.
2951 * symtab.c (sources_info): Rename to ...
2952 (info_sources_command): ... this.
2953 (variables_info): Rename to ...
2954 (info_variables_command): ... this.
2955 (functions_info): Rename to ...
2956 (info_functions_command): ... this.
2957 (types_info): Rename to ...
2958 (info_types_command): ... this.
2959 (_initialize_symtab): Adjust.
2960 * target.c (target_info): Rename to ...
2961 (info_target_command): ... this.
2962 (initialize_targets): Adjust.
2963 * tracepoint.c (tvariables_info): Rename to ...
2964 (info_tvariables_command): ... this.
2965 (scope_info): Rename to ...
2966 (info_scope_command): ... this.
2967 (trace_dump_actions): Adjust.
2968 (_initialize_tracepoint): Adjust.
2969
b270e6f9
TT
29702017-08-22 Tom Tromey <tom@tromey.com>
2971
2972 * breakpoint.h (install_breakpoint): Update.
2973 * breakpoint.c (add_solib_catchpoint): Update.
2974 (install_breakpoint): Change argument to a std::unique_ptr.
2975 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2976 (create_breakpoint_sal, create_breakpoint): Update.
2977 (watch_command_1, catch_exec_command_1)
2978 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2979 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2980 Return the breakpoint.
2981 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2982 (new_single_step_breakpoint): Update.
2983 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2984 std::unique_ptr.
2985 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2986 std::unique_ptr.
2987 * break-catch-sig.c (create_signal_catchpoint): Use
2988 std::unique_ptr.
2989 * ada-lang.c (create_ada_exception_catchpoint): Use
2990 std::unique_ptr.
2991
36bd8eaa
TT
29922017-08-22 Tom Tromey <tom@tromey.com>
2993
2994 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2995
56f37645
TT
29962017-08-22 Tom Tromey <tom@tromey.com>
2997
2998 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2999 (lookup_partial_symbol): Update.
3000
0b581c69
TT
30012017-08-22 Tom Tromey <tom@tromey.com>
3002
3003 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3004 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3005 (find_and_open_source, symtab_to_fullname): Update.
3006 * psymtab.c (psymtab_to_fullname): Update.
3007
14278e1f
TT
30082017-08-22 Tom Tromey <tom@tromey.com>
3009
3010 * exec.c (exec_file_attach): Update.
3011 * linux-thread-db.c (try_thread_db_load): Update.
3012 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3013 * utils.c (gdb_realpath): Change return type.
3014 (gdb_realpath_keepfile): Update.
3015 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3016 (_initialize_utils): Register the new self test.
3017 * source.c (openp): Update.
3018 (find_and_open_source): Update.
3019 * nto-tdep.c (nto_find_and_open_solib): Update.
3020 * main.c (set_gdb_data_directory): Update.
3021 (captured_main_1): Update.
3022 * dwarf2read.c (dwarf2_get_dwz_file): Update
3023 (dw2_map_symbol_filenames): Update.
3024 * auto-load.c (auto_load_safe_path_vec_update): Update.
3025 (filename_is_in_auto_load_safe_path_vec): Change type of
3026 "filename_realp".
3027 (auto_load_objfile_script): Update.
3028 (file_is_auto_load_safe): Update. Use std::string.
3029 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3030
4971c9a7
TT
30312017-08-22 Tom Tromey <tom@tromey.com>
3032
3033 * utils.c (gdb_realpath_keepfile): Return a
3034 gdb::unique_xmalloc_ptr.
3035 * exec.c (exec_file_attach): Update.
3036 * utils.h (gdb_realpath_keepfile): Return a
3037 gdb::unique_xmalloc_ptr.
3038
e3e41d58
TT
30392017-08-22 Tom Tromey <tom@tromey.com>
3040
3041 * compile/compile.c (compile_file_command): Use
3042 gdb::unique_xmalloc_ptr, std::string.
3043 * utils.c (gdb_abspath): Change return type.
3044 * source.c (openp): Update.
3045 * objfiles.c (allocate_objfile): Update.
3046 * main.c (set_gdb_data_directory): Update.
3047 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3048
0d999a6e
ZZ
30492017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3050
3051 * cli-cmds.c (list_commands): List actual code around more than
3052 one location.
3053
329d5e7e
JB
30542017-08-21 John Baldwin <jhb@FreeBSD.org>
3055
3056 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3057
bf223d3e
PA
30582017-08-21 Pedro Alves <palves@redhat.com>
3059
3060 PR gdb/19487
3061 * c-exp.y (variable production): Handle function aliases.
3062 * minsyms.c (msymbol_is_text): New function.
3063 * minsyms.h (msymbol_is_text): Declare.
3064 * symtab.c (find_function_alias_target): New function.
3065 * symtab.h (find_function_alias_target): Declare.
3066
c973d0aa
PA
30672017-08-21 Pedro Alves <palves@redhat.com>
3068
3069 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3070 typedefs.
3071 * typeprint.c (whatis_exp): If handling "whatis", and expression
3072 is OP_TYPE, strip one typedef level. Otherwise don't strip
3073 typedefs here.
3074 * valops.c (value_cast): Save "to" type before resolving
3075 stubs/typedefs. Use that type as resulting value's type.
3076
2989a365
TT
30772017-08-18 Tom Tromey <tom@tromey.com>
3078 Pedro Alves <palves@redhat.com>
3079
3080 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3081 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3082 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3083 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3084 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3085 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3086 (linux_get_siginfo_data): Add "thread" argument. Use
3087 scoped_restore.
3088 * linux-nat.c (linux_child_follow_fork)
3089 (check_stopped_by_watchpoint): Use scoped_restore.
3090 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3091 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3092 (restore_inferior_ptid, save_inferior_ptid): Remove.
3093 * btrace.c (btrace_fetch): Use scoped_restore.
3094 * bsd-uthread.c (bsd_uthread_fetch_registers)
3095 (bsd_uthread_store_registers): Use scoped_restore.
3096 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3097 scoped_restore.
3098 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3099 (aix_thread_xfer_partial): Use scoped_restore.
3100 * inferior.h (save_inferior_ptid): Remove.
3101
e60eb288
YQ
31022017-08-18 Yao Qi <yao.qi@linaro.org>
3103
3104 PR tdep/21818
3105 * arm-tdep.c (gdb_print_insn_arm): Mark
3106 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3107
6d580b63
YQ
31082017-08-18 Yao Qi <yao.qi@linaro.org>
3109
3110 * NEWS: Mention GDBserver's new option "--selftest".
3111 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3112 * selftest.c: Move it to common/selftest.c.
3113 * selftest.h: Move it to common/selftest.h.
3114 * selftest-arch.c (reset): New function.
3115 (tests_with_arch): Call reset.
3116
86dcbf50
YQ
31172017-08-18 Yao Qi <yao.qi@linaro.org>
3118
3119 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3120 instead of exception_fprintf and printf_filtered.
3121
7649770c
YQ
31222017-08-18 Yao Qi <yao.qi@linaro.org>
3123
3124 * selftest.c (register_self_test): Rename it to
3125 selftests::register_test.
3126 (run_self_tests): selftest::run_tests.
3127 * selftest.h: Update declarations.
3128 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3129 selftests::register_test_foreach_arch.
3130 * selftest-arch.h: Update declaration.
3131 * aarch64-tdep.c: Update.
3132 * arm-tdep.c: Likewise.
3133 * disasm-selftests.c: Likewise.
3134 * dwarf2loc.c: Likewise.
3135 * dwarf2-frame.c: Likewise.
3136 * findvar.c: Likewise.
3137 * gdbarch-selftests.c: Likewise.
3138 * maint.c (maintenance_selftest): Likewise.
3139 * regcache.c: Likewise.
3140 * rust-exp.y: Likewise.
3141 * selftest-arch.c: Likewise.
3142 * unittests/environ-selftests.c: Likewise.
3143 * unittests/function-view-selftests.c: Likewise.
3144 * unittests/offset-type-selftests.c: Likewise.
3145 * unittests/optional-selftests.c: Likewise.
3146 * unittests/scoped_restore-selftests.c: Likewise.
3147 * utils-selftests.c: Likewise.
3148
b0cba12e
PA
31492017-08-17 Pedro Alves <palves@redhat.com>
3150
3151 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3152 local.
3153
4c8aa72d
PA
31542017-08-17 Pedro Alves <palves@redhat.com>
3155
3156 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3157 field.
3158 (reset_die_in_process): Delete, replaced by ...
3159 (process_die_scope): ... this new class. Make it responsible for
3160 freeing cu->line_header too.
3161 (process_die): Use process_die_scope.
3162 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3163 cu->line_header_die_owner. Don't release the line header if it's
3164 owned by the CU.
3165 (setup_type_unit_groups): Make the CU/DIE own the line header.
3166 Don't release the line header here.
3167
ba713918
AL
31682017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3169
3170 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3171
44d0fb3a
RK
31722017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3173
3174 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3175 Single-Key mode
3176
a5afdb16
RK
31772017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3178
3179 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3180 mode command list.
3181
47613aeb
SH
31822017-08-15 Stafford Horne <shorne@gmail.com>
3183
3184 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3185
9c3cc999
SH
31862017-08-15 Stafford Horne <shorne@gmail.com>
3187
3188 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3189
206726fb
SDJ
31902017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3191
3192 PR gdb/21954
3193 * infcmd.c (unset_environment_command): Use the 'clear' method on
3194 the environment instead of resetting it.
3195
0335ac6d
JB
31962017-08-15 John Baldwin <jhb@FreeBSD.org>
3197
3198 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3199 platforms.
3200
d3abe1c8
TT
32012017-08-14 Tom Tromey <tom@tromey.com>
3202
3203 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3204 (print_binary_chars): Likewise.
3205 (BITS_IN_BYTES): Remove.
3206
d6382fff
TT
32072017-08-14 Tom Tromey <tom@tromey.com>
3208
3209 PR gdb/21675
3210 * valprint.c (LOW_ZERO): Change value to 034.
3211 (print_octal_chars): Add static_asserts for octal constants.
3212 * printcmd.c (print_scalar_formatted): Add 'd' case.
3213
f978cb06
TT
32142017-08-11 Tom Tromey <tom@tromey.com>
3215
3216 * symfile.c (add_symbol_file_command): Use std::vector.
3217
2f5404b3
TT
32182017-08-14 Tom Tromey <tom@tromey.com>
3219
3220 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3221 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3222 std::move.
3223 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3224
de7985c3
PA
32252017-08-11 Pedro Alves <palves@redhat.com>
3226
3227 * infrun.c (process_event_stop_test): Adjust
3228 function_name_is_marked_for_skip call.
3229 * skip.c: Include <list>.
3230 (skiplist_entry): Make it a class with private fields, and
3231 getters/setters.
3232 (skiplist_entry_chain): Delete.
3233 (skiplist_entries): New.
3234 (skiplist_entry_count): Delete.
3235 (highest_skiplist_entry_num): New.
3236 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3237 (add_skiplist_entry): Delete.
3238 (skiplist_entry::skiplist_entry): New.
3239 (skiplist_entry::add_entry): New.
3240 (skip_file_command, skip_function): Adjust.
3241 (compile_skip_regexp): Delete.
3242 (skip_command): Don't compile regexp here. Adjust to use
3243 skiplist_entry::add_entry.
3244 (skip_info): Adjust to use range-for and getters.
3245 (skip_enable_command, skip_disable_command): Adjust to use
3246 range-for and setters.
3247 (skip_delete_command): Adjust to use std::list.
3248 (add_skiplist_entry): Delete.
3249 (skip_file_p): Delete, refactored as ...
3250 (skiplist_entry::do_skip_file_p): ... this new method.
3251 (skip_gfile_p): Delete, refactored as ...
3252 (skiplist_entry::do_gskip_file_p): ... this new method.
3253 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3254 (skiplist_entry::skip_function_p): ... this new method.
3255 (function_name_is_marked_for_skip): Now returns bool, and takes
3256 the function sal by const reference. Adjust to use range-for and
3257 skiplist_entry methods.
3258 (_initialize_step_skip): Remove references to
3259 skiplist_entry_chain, skiplist_entry_count.
3260 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3261 takes the function sal by const reference.
3262
be7d3cd5
YQ
32632017-08-11 Yao Qi <yao.qi@linaro.org>
3264
3265 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3266 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3267 (dwarf2_frame_cache):
3268 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3269 RETURN_MASK_ALL and set *this_case to NULL.
3270 * frame-unwind.h: Update comments.
3271
1c90d9f0
YQ
32722017-08-11 Yao Qi <yao.qi@linaro.org>
3273
3274 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3275 (dwarf2_frame_state_copy_regs): Remove.
3276 (dwarf2_frame_state_free_regs): Remove.
3277 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3278 (dwarf2_restore_rule): Call method .alloc_regs instead of
3279 dwarf2_frame_state_alloc_regs.
3280 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3281 constructor. Call std::move.
3282 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3283 (dwarf2_frame_cache): Likewise.
3284
3285 [GDB_SELF_TEST]: Include selftest.h and
3286 selftest-arch.h.
3287 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3288 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3289 execute_cfa_program_test.
3290
3291 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3292 copy ctor, assignment operator, move assignment.
3293 <alloc_regs>: New method.
3294 <swap>: New method.
3295 (struct dwarf2_frame_state): Delete dtor.
3296 (dwarf2_frame_state_alloc_regs): Remove declaration.
3297 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3298 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3299
afe37d6b
YQ
33002017-08-11 Yao Qi <yao.qi@linaro.org>
3301
3302 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3303 (dwarf2_frame_state::dwarf2_frame_state): New.
3304 (dwarf2_frame_state::~dwarf2_frame_state): New.
3305 (dwarf2_fetch_cfa_info): Update.
3306 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3307 rather than a pointer. Update code.
3308 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3309 dtor.
3310 <data_align, code_align, retaddr_column>: Change them to const.
3311 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3312 to bool.
3313
b348037f
YQ
33142017-08-11 Yao Qi <yao.qi@linaro.org>
3315
3316 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3317 <loc.exp>: New field.
3318 * dwarf2-frame.c (execute_cfa_program): Update.
3319 (dwarf2_frame_prev_register): Update.
3320
e7c9de26
PA
33212017-08-10 Pedro Alves <palves@redhat.com>
3322
3323 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3324
e8c6b620
JB
33252017-08-09 John Baldwin <jhb@FreeBSD.org>
3326
3327 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3328 (fbsd_pending_children): Use std::list.
3329 (fbsd_remember_child): Likewise.
3330 (fbsd_is_child_pending): Likewise.
3331 (fbsd_pending_vfork_done): Use std::forward_list.
3332 (fbsd_add_vfork_done): Likewise.
3333 (fbsd_is_vfork_done_pending): Likewise.
3334 (fbsd_next_vfork_done): Likewise.
3335
e4a26669
JB
33362017-08-09 John Baldwin <jhb@FreeBSD.org>
3337
3338 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3339 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3340 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3341 for `mapfilename'.
3342 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 3343 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 3344
142311d3
JB
33452017-08-09 John Baldwin <jhb@FreeBSD.org>
3346
3347 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3348 "filestuff.h".
3349 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3350
42fa2e0e
TT
33512017-08-09 Tom Tromey <tom@tromey.com>
3352
3353 * skip.c (skiplist_entry): New constructor.
3354 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3355 (skiplist_entry::file_is_glob): Now bool.
3356 (skiplist_entry::file, skiplist_entry::function): Now
3357 std::string.
3358 (make_skip_entry): Return a unique_ptr. Use new.
3359 (free_skiplist_entry, free_skiplist_entry_cleanup)
3360 (make_free_skiplist_entry_cleanup): Remove.
3361 (skip_command, skip_disable_command, add_skiplist_entry)
3362 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3363 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3364 (function_name_is_marked_for_skip): Update.
3365 (skip_delete_command): Update. Use delete.
3366
cd3af38d
JW
33672017-08-09 Jiong Wang <jiong.wang@arm.com>
3368
3369 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3370 (aarch64_linux_core_read_description): New function.
3371 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3372
29592bde
PA
33732017-08-09 Pedro Alves <palves@redhat.com>
3374
3375 * cp-name-parser.y (cp_comp_to_string): Return a
3376 gdb::unique_xmalloc_ptr<char>.
3377 * cp-support.c (replace_typedefs_qualified_name)
3378 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3379 (cp_canonicalize_string_full): Use op= instead of explicit
3380 convertion.
3381 (cp_class_name_from_physname, method_name_from_physname)
3382 (cp_func_name, cp_remove_params): Adjust to use
3383 gdb::unique_xmalloc_ptr<char>.
3384 * cp-support.h (cp_comp_to_string): Return a
3385 gdb::unique_xmalloc_ptr<char>.
3386 * python/py-type.c (typy_lookup_type): Adjust to use
3387 gdb::unique_xmalloc_ptr<char>.
3388
b3340438
L
33892017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3390
3391 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3392
e88e8651
YQ
33932017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3394 Yao Qi <yao.qi@linaro.org>
3395
3396 * cp-support.c (cp_canonicalize_string_full): Use
3397 gdb::unique_xmalloc_ptr<char>.
3398 (cp_canonicalize_string): Likewise.
3399
f5a29eb0
YQ
34002017-08-09 Yao Qi <yao.qi@linaro.org>
3401
3402 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3403 * regformats/i386/amd64-avx-avx512.dat: Remove.
3404 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3405 * regformats/i386/amd64-avx-mpx.dat:Remove.
3406 * regformats/i386/amd64-avx.dat: Remove.
3407 * regformats/i386/amd64-mpx.dat: Remove.
3408 * regformats/i386/i386-avx-avx512.dat: Remove.
3409 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3410 * regformats/i386/i386-avx-mpx.dat: Remove.
3411 * regformats/i386/i386-mmx.dat: Remove.
3412 * regformats/i386/i386-mpx.dat: Remove.
3413
57757c2f
YQ
34142017-08-09 Yao Qi <yao.qi@linaro.org>
3415
3416 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3417 * amd64-tdep.c: Don't include features/i386/x32*.c.
3418 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3419 functions.
3420 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3421 and i386/x32-avx-avx512.
3422 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3423 and i386/x32.xml.
3424 * features/i386/x32-avx-avx512.c: Removed.
3425 * features/i386/x32-avx-avx512.xml: Removed.
3426 * features/i386/x32-avx.c: Removed.
3427 * features/i386/x32-avx.xml: Removed.
3428 * features/i386/x32.c: Removed.
3429 * features/i386/x32.xml: Removed.
3430 * regformats/i386/x32-avx-avx512.dat: Removed.
3431 * regformats/i386/x32-avx.dat: Removed.
3432 * regformats/i386/x32.dat: Removed.
3433
ba7b109b
MR
34342017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3435
3436 PR breakpoints/21886
3437 * mem-break.c (default_memory_insert_breakpoint): Use
3438 `->placed_address' rather than `->reqstd_address' for the
3439 breakpoint location.
3440
e347efc3
MR
34412017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3442
3443 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3444 assertions.
3445
0dba2a6c
MR
34462017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3447
3448 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3449 a union of `tdep_info', `tdesc_data' and `id'.
3450 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3451 rather than `info.tdep_info'.
3452 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3453 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3454 * i386-tdep.c (i386_gdbarch_init): Likewise.
3455 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3456 * mips-tdep.c (mips_gdbarch_init): Likewise.
3457 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3458 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3459 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3460 `info.tdep_info'.
3461 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3462 `info.tdep_info'.
3463 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3464 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3465 `info.tdep_info'.
3466 * spu-tdep.c (spu_gdbarch_init): Likewise.
3467 * gdbarch.h: Regenerate.
3468
16eb6b2d
LS
34692017-08-07 Leszek Swirski <leszeks@google.com>
3470
7b005726 3471 PR symtab/20899
16eb6b2d
LS
3472 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3473
74cbb09e
SM
34742017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3475
3476 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3477 (gdbsim_open): Rename gdb_argv args object to argv.
3478
ee0c3293
TT
34792017-08-05 Tom Tromey <tom@tromey.com>
3480
3481 * compile/compile-object-load.c (compile_object_load): Use
3482 gdb::unique_xmalloc_ptr.
3483 * cli/cli-dump.c (scan_filename): Rename from
3484 scan_filename_with_cleanup. Change return type.
3485 (scan_expression): Rename from scan_expression_with_cleanup.
3486 Change return type.
3487 (dump_memory_to_file, dump_value_to_file, restore_command):
3488 Use gdb::unique_xmalloc_ptr. Update.
3489 * cli/cli-cmds.c (find_and_open_script): Use
3490 gdb::unique_xmalloc_ptr.
3491 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3492 * symmisc.c (maintenance_print_symbols)
3493 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3494 * symfile.c (symfile_bfd_open, generic_load)
3495 (add_symbol_file_command, remove_symbol_file_command): Use
3496 gdb::unique_xmalloc_ptr.
3497 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3498 * psymtab.c (maintenance_print_psymbols): Use
3499 gdb::unique_xmalloc_ptr.
3500 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3501 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3502 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3503 (reload_shared_libraries_1): Likewise.
3504
3232fabd
TT
35052017-08-05 Tom Tromey <tom@tromey.com>
3506
3507 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3508 (rust_op_vector, rust_set_vector): New typedefs.
3509 (current_parser): New global.
3510 (work_obstack): Change to pointer type. Update all users.
3511 (rust_ast, pstate): Remove globals.
3512 (struct rust_parser): New.
3513 (%union) <params, field_inits>: Change type.
3514 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3515 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3516 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3517 (convert_params_to_types, convert_params_to_expression): Change
3518 type of "params".
3519 (ast_string): Change type of "fields".
3520 (rust_parse): Make a rust_parser. Remove cleanups.
3521 (rust_lex_tests): Make and install an auto_obstack.
3522
f02fd774
YQ
35232017-08-04 Yao Qi <yao.qi@linaro.org>
3524
3525 * configure.srv (ipa_x32_linux_regobj): New.
3526 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3527 instead of X86_TDESC_AVX512.
3528 (initialize_low_tracepoint): Call
3529 init_registers_x32_avx_avx512_linux.
3530
91975afd
YQ
35312017-08-04 Yao Qi <yao.qi@linaro.org>
3532
3533 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3534
2331fa3a
RK
35352017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3536
3537 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3538
744e4fe1
TT
35392017-08-03 Tom Tromey <tom@tromey.com>
3540
3541 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3542 Remove.
3543 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3544
1c034b67
TT
35452017-08-03 Tom Tromey <tom@tromey.com>
3546
3547 * python/py-param.c (compute_enum_values): Use gdb_argv.
3548
773a1edc
TT
35492017-08-03 Tom Tromey <tom@tromey.com>
3550
3551 * utils.h (struct gdb_argv_deleter): New.
3552 (gdb_argv): New class.
3553 * utils.c (gdb_argv::reset): New method.
3554 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3555 * tracefile.c (tsave_command): Use gdb_argv.
3556 * top.c (new_ui_command): Use gdb_argv.
3557 * symmisc.c (maintenance_print_symbols)
3558 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3559 * symfile.c (symbol_file_command, generic_load)
3560 (remove_symbol_file_command): Use gdb_argv.
3561 * stack.c (backtrace_command): Use gdb_argv.
3562 * source.c (add_path, show_substitute_path_command)
3563 (unset_substitute_path_command, set_substitute_path_command):
3564 Use gdb_argv.
3565 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3566 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3567 * remote.c (extended_remote_run, remote_put_command)
3568 (remote_get_command, remote_delete_command): Use gdb_argv.
3569 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3570 (gdbsim_open): Use gdb_argv.
3571 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3572 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3573 * procfs.c (procfs_info_proc): Use gdb_argv.
3574 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3575 * infrun.c (handle_command): Use gdb_argv.
3576 * inferior.c (add_inferior_command, clone_inferior_command):
3577 Use gdb_argv.
3578 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3579 * exec.c (exec_file_command): Use gdb_argv.
3580 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3581 * compile/compile.c (build_argc_argv): Use gdb_argv.
3582
0d50bde3
TT
35832017-08-03 Tom Tromey <tom@tromey.com>
3584
3585 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3586
7f968c89
TT
35872017-08-03 Tom Tromey <tom@tromey.com>
3588
3589 * python/python.c (compute_python_string): Return std::string.
3590 (gdbpy_eval_from_control_command): Update.
3591 (do_start_initialization): Use std::string.
3592 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3593 xstrprintf.
3594 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3595 xstrprintf.
3596
3c9ebddd
TT
35972017-08-03 Tom Tromey <tom@tromey.com>
3598
3599 * top.h (do_restore_instream_cleanup): Remove.
3600 * top.c (do_restore_instream_cleanup): Remove.
3601 (read_command_file): Use scoped_restore.
3602 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3603
b51b225e
TT
36042017-08-03 Tom Tromey <tom@tromey.com>
3605
3606 * cli/cli-script.c (execute_user_command)
3607 (execute_control_command): Use scoped_restore.
3608
ac991630
TT
36092017-08-03 Tom Tromey <tom@tromey.com>
3610
3611 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3612 (execute_user_command): Remove user_call_depth; use
3613 user_args_stack's size instead.
3614
898e0c8e
TT
36152017-08-03 Tom Tromey <tom@tromey.com>
3616
3617 * top.h (in_user_command): Remove.
3618 * top.c (in_user_command): Remove.
3619 * cli/cli-script.c (do_restore_user_call_depth)
3620 (execute_user_command): Update.
3621
26fcd5d7
TT
36222017-08-03 Tom Tromey <tom@tromey.com>
3623
3624 * valops.c (search_struct_method): Use gdb::byte_vector.
3625 * valarith.c (value_concat): Use std::vector.
3626 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3627 (simple_search_memory): Likewise.
3628 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3629 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3630 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3631 * elfread.c (elf_rel_plt_read): Use std::string.
3632 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3633 * cli/cli-dump.c (restore_section_callback): Use
3634 gdb::byte_vector.
3635
7c218e6c
TT
36362017-08-03 Tom Tromey <tom@tromey.com>
3637
3638 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3639
31b68d4a
TT
36402017-08-03 Tom Tromey <tom@tromey.com>
3641
3642 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3643 (tui_register_format): Use scoped_restore.
3644
2ec845e7
TT
36452017-08-03 Tom Tromey <tom@tromey.com>
3646
3647 * reverse.c (exec_direction_default): Remove.
3648 (exec_reverse_once): Use scoped_restore.
3649 * remote.c (restore_remote_timeout): Remove.
3650 (remote_flash_erase, remote_flash_write, remote_flash_done)
3651 (readchar, remote_serial_write): Use scoped_restore.
3652 * cli/cli-script.c (struct source_cleanup_lines_args)
3653 (source_cleanup_lines): Remove.
3654 (script_from_file): Use scoped_restore.
3655 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3656 (source_command): Use scoped_restore.
3657
b3bc8453
TT
36582017-08-03 Tom Tromey <tom@tromey.com>
3659
3660 * utils.h (make_cleanup_free_so): Remove.
3661 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3662 * solist.h (struct so_deleter): New.
3663 (so_list_up): New typedef.
3664 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3665
e3ad2841
TT
36662017-08-03 Tom Tromey <tom@tromey.com>
3667
3668 * utils.h (make_cleanup_restore_current_language): Remove.
3669 * utils.c (do_restore_current_language)
3670 (make_cleanup_restore_current_language): Remove.
3671 * parse.c (parse_exp_in_context_1)
3672 (parse_expression_with_language): Use
3673 scoped_restore_current_language.
3674 * mi/mi-main.c (mi_cmd_execute): Use
3675 scoped_restore_current_language.
3676 * language.h (scoped_restore_current_language): New class.
3677
b80cf838
TT
36782017-08-03 Tom Tromey <tom@tromey.com>
3679
3680 * compile/compile.c (cleanup_unlink_file): Remove.
3681 (compile_to_object): Use gdb::unlinker.
3682 (eval_compile_command): Likewise.
3683
fad0444a
TT
36842017-08-03 Tom Tromey <tom@tromey.com>
3685
3686 * utils.h (make_cleanup_fclose): Remove.
3687 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3688
6e7bc05c
TT
36892017-08-03 Tom Tromey <tom@tromey.com>
3690
3691 * top.c (open_terminal_stream): Return gdb_file_up.
3692 (new_ui_command): Update.
3693
4a45905b
TT
36942017-08-03 Tom Tromey <tom@tromey.com>
3695
3696 * source.c (print_source_lines_base, forward_search_command)
3697 (reverse_search_command): Use gdb_file_up.
3698
7cd06d6e
TT
36992017-08-03 Tom Tromey <tom@tromey.com>
3700
3701 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3702
ed166945
TT
37032017-08-03 Tom Tromey <tom@tromey.com>
3704
3705 * cli/cli-cmds.c (find_and_open_script): Change return type.
3706 Remove "streamp" and "full_path" parameters.
3707 (source_script_with_search): Update.
3708 * auto-load.c (source_script_file): Update.
3709 * cli/cli-cmds.h (find_and_open_script): Change type.
3710 (open_script): New struct.
3711
d419f42d
TT
37122017-08-03 Tom Tromey <tom@tromey.com>
3713
3714 * xml-support.c (xml_fetch_content_from_file): Update.
3715 * ui-file.c (stdio_file::open): Update.
3716 * tracefile-tfile.c (tfile_start): Update.
3717 * remote.c (remote_file_put, remote_file_get): Update.
3718 * nat/linux-procfs.c (linux_proc_get_int)
3719 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3720 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3721 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3722 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3723 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3724 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3725 * linux-nat.c (linux_proc_pending_signals): Update.
3726 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3727 (file_closer): Remove.
3728 * compile/compile.c (compile_to_object): Update.
3729 * common/filestuff.h (struct gdb_file_deleter): New.
3730 (gdb_file_up): New typedef.
3731 (gdb_fopen_cloexec): Change return type.
3732 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3733 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3734 (dump_binary_file, restore_binary_file): Update.
3735 * auto-load.c (auto_load_objfile_script_1): Update.
3736
4a2b031d
TT
37372017-08-03 Tom Tromey <tom@tromey.com>
3738
3739 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3740 (info_static_tracepoint_markers_command): Likewise.
3741 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3742 * skip.c (skip_info): Use ui_out_emit_table.
3743 * progspace.c (print_program_space): Use ui_out_emit_table.
3744 * osdata.c (info_osdata): Use ui_out_emit_table.
3745 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3746 ui_out_emit_table.
3747 * linux-thread-db.c (info_auto_load_libthread_db): Use
3748 ui_out_emit_table.
3749 * inferior.c (print_inferior): Use ui_out_emit_table.
3750 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3751 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3752 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3753 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3754 * ui-out.h (class ui_out_emit_table): New.
3755
a4f320fd
MR
37562017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3757
3758 * mips-tdep.c (mips_fpu_type_str): New function.
3759 (mips_dump_tdep): Call it.
3760
a2f1f308
MR
37612017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3762
3763 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3764 `->mips_fpu_type'.
3765
7e5ed83b
XR
37662017-07-31 Xavier Roirand <roirand@adacore.com>
3767
3768 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3769
4c9dc811
XR
37702017-07-27 Xavier Roirand <roirand@adacore.com>
3771
3772 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3773
27d41eac
YQ
37742017-07-26 Yao Qi <yao.qi@linaro.org>
3775
3776 * cli/cli-cmds.c (maintenancechecklist): New variable.
3777 * gdbcmd.h (maintenancechecklist): Declare it.
3778 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3779 Call i386_linux_read_description with different masks.
3780 * maint.c (maintenance_check_command): New function.
3781 (_initialize_maint_cmds): Call add_prefix_cmd.
3782 * target-descriptions.c (tdesc_reg): override operator != and ==.
3783 (tdesc_type): Likewise.
3784 (tdesc_feature): Likewise.
3785 (target_desc): Likewise.
3786 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3787 (maintenance_check_xml_descriptions): New function.
3788 (_initialize_target_descriptions) Add command "xml-descriptions".
3789 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3790
ea03d0d3
YQ
37912017-07-26 Yao Qi <yao.qi@linaro.org>
3792
3793 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3794 Include features/i386/32bit-*.c.
3795 (i386_linux_read_description): Generate target description if it
3796 doesn't exist.
3797 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3798 functions.
3799 * features/i386/32bit-linux.c: Re-generated.
3800 * features/i386/32bit-sse.c: Likewise.
3801 * target-descriptions.c (print_c_feature::visit): Print code to
3802 set register number if needed.
3803 (print_c_feature) <m_next_regnum>: New field.
3804
25aa13e5
YQ
38052017-07-26 Yao Qi <yao.qi@linaro.org>
3806
3807 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3808 (FEATURE_XMLFILES): New.
3809 (FEATURE_CFILES): New.
3810 New rules.
3811 (clean-cfiles): Remove generated c files.
3812 * features/i386/32bit-avx.c: Generated.
3813 * features/i386/32bit-avx512.c: Generated.
3814 * features/i386/32bit-core.c: Generated.
3815 * features/i386/32bit-linux.c: Generated.
3816 * features/i386/32bit-mpx.c: Generated.
3817 * features/i386/32bit-pkeys.c: Generated.
3818 * features/i386/32bit-sse.c: Generated.
3819 * target-descriptions.c: Include algorithm.
3820 (tdesc_element_visitor): Add method visit_end.
3821 (print_c_tdesc): Implement visit_end.
3822 (print_c_tdesc:: m_filename_after_features): Move it to
3823 protected.
3824 (print_c_feature): New class.
3825 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3826 name starts with "i386/32bit-".
3827
6eb1e6a8
YQ
38282017-07-26 Yao Qi <yao.qi@linaro.org>
3829
3830 * target-descriptions.c (tdesc_element_visitor): New class.
3831 (tdesc_element): New class.
3832 (tdesc_reg): Inherit from tdesc_element.
3833 (tdesc_reg::accept): New function.
3834 (tdesc_type): Inherit from tdesc_element.
3835 (tdesc_type::accept): New function.
3836 (tdesc_feature): Inherit from tdesc_element.
3837 (tdesc_feature::accept): New function.
3838 (target_desc): Inherit from tdesc_element.
3839 (target_desc::target_desc): New.
3840 (target_desc::~target_desc): New.
3841 (target_desc::accept): New.
3842 (allocate_target_description): Use new.
3843 (free_target_description): Use delete.
3844 (print_c_tdesc): New class.
3845 (maint_print_c_tdesc_cmd): Adjust.
3846
3847 * features/aarch64.c: Re-generated.
3848 * features/arc-arcompact.c: Re-generated.
3849 * features/arc-v2.c: Re-generated.
3850 * features/arm/arm-with-iwmmxt.c: Re-generated.
3851 * features/arm/arm-with-m.c: Re-generated.
3852 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3853 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3854 * features/arm/arm-with-neon.c: Re-generated.
3855 * features/arm/arm-with-vfpv2.c: Re-generated.
3856 * features/arm/arm-with-vfpv3.c: Re-generated.
3857 * features/i386/amd64-avx-avx512.c: Re-generated.
3858 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3859 * features/i386/amd64-avx.c: Re-generated.
3860 * features/i386/amd64-avx-linux.c: Re-generated.
3861 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3862 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3863 * features/i386/amd64-avx-mpx.c: Re-generated.
3864 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3865 * features/i386/amd64.c: Re-generated.
3866 * features/i386/amd64-linux.c: Re-generated.
3867 * features/i386/amd64-mpx.c: Re-generated.
3868 * features/i386/amd64-mpx-linux.c: Re-generated.
3869 * features/i386/i386-avx-avx512.c: Re-generated.
3870 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3871 * features/i386/i386-avx.c: Re-generated.
3872 * features/i386/i386-avx-linux.c: Re-generated.
3873 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3874 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3875 * features/i386/i386-avx-mpx.c: Re-generated.
3876 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3877 * features/i386/i386.c: Re-generated.
3878 * features/i386/i386-linux.c: Re-generated.
3879 * features/i386/i386-mmx.c: Re-generated.
3880 * features/i386/i386-mmx-linux.c: Re-generated.
3881 * features/i386/i386-mpx.c: Re-generated.
3882 * features/i386/i386-mpx-linux.c: Re-generated.
3883 * features/i386/x32-avx-avx512.c: Re-generated.
3884 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3885 * features/i386/x32-avx.c: Re-generated.
3886 * features/i386/x32-avx-linux.c: Re-generated.
3887 * features/i386/x32.c: Re-generated.
3888 * features/i386/x32-linux.c: Re-generated.
3889 * features/microblaze.c: Re-generated.
3890 * features/microblaze-with-stack-protect.c: Re-generated.
3891 * features/mips64-dsp-linux.c: Re-generated.
3892 * features/mips64-linux.c: Re-generated.
3893 * features/mips-dsp-linux.c: Re-generated.
3894 * features/mips-linux.c: Re-generated.
3895 * features/nds32.c: Re-generated.
3896 * features/nios2.c: Re-generated.
3897 * features/nios2-linux.c: Re-generated.
3898 * features/rs6000/powerpc-32.c: Re-generated.
3899 * features/rs6000/powerpc-32l.c: Re-generated.
3900 * features/rs6000/powerpc-403.c: Re-generated.
3901 * features/rs6000/powerpc-403gc.c : Re-generated.
3902 * features/rs6000/powerpc-405.c: Re-generated.
3903 * features/rs6000/powerpc-505.c: Re-generated.
3904 * features/rs6000/powerpc-601.c: Re-generated.
3905 * features/rs6000/powerpc-602.c: Re-generated.
3906 * features/rs6000/powerpc-603.c: Re-generated.
3907 * features/rs6000/powerpc-604.c: Re-generated.
3908 * features/rs6000/powerpc-64.c: Re-generated.
3909 * features/rs6000/powerpc-64l.c: Re-generated.
3910 * features/rs6000/powerpc-7400.c: Re-generated.
3911 * features/rs6000/powerpc-750.c: Re-generated.
3912 * features/rs6000/powerpc-860.c: Re-generated.
3913 * features/rs6000/powerpc-altivec32.c: Re-generated.
3914 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3915 * features/rs6000/powerpc-altivec64.c: Re-generated.
3916 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3917 * features/rs6000/powerpc-cell32l.c: Re-generated.
3918 * features/rs6000/powerpc-cell64l.c: Re-generated.
3919 * features/rs6000/powerpc-e500.c: Re-generated.
3920 * features/rs6000/powerpc-e500l.c: Re-generated.
3921 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3922 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3923 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3924 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3925 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3926 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3927 * features/rs6000/powerpc-vsx32.c: Re-generated.
3928 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3929 * features/rs6000/powerpc-vsx64.c: Re-generated.
3930 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3931 * features/rs6000/rs6000.c: Re-generated.
3932 * features/s390-linux32.c: Re-generated.
3933 * features/s390-linux32v1.c: Re-generated.
3934 * features/s390-linux32v2.c: Re-generated.
3935 * features/s390-linux64.c: Re-generated.
3936 * features/s390-linux64v1.c: Re-generated.
3937 * features/s390-linux64v2.c: Re-generated.
3938 * features/s390-te-linux64.c: Re-generated.
3939 * features/s390-tevx-linux64.c: Re-generated.
3940 * features/s390-vx-linux64.c: Re-generated.
3941 * features/s390x-linux64.c: Re-generated.
3942 * features/s390x-linux64v1.c: Re-generated.
3943 * features/s390x-linux64v2.c: Re-generated.
3944 * features/s390x-te-linux64.c: Re-generated.
3945 * features/s390x-tevx-linux64.c: Re-generated.
3946 * features/s390x-vx-linux64.c: Re-generated.
3947 * features/sparc/sparc32-solaris.c: Re-generated.
3948 * features/sparc/sparc64-solaris.c: Re-generated.
3949 * features/tic6x-c62x.c: Re-generated.
3950 * features/tic6x-c62x-linux.c: Re-generated.
3951 * features/tic6x-c64x.c: Re-generated.
3952 * features/tic6x-c64x-linux.c: Re-generated.
3953 * features/tic6x-c64xp.c: Re-generated.
3954 * features/tic6x-c64xp-linux.c: Re-generated.
3955
35b4818d
YQ
39562017-07-26 Yao Qi <yao.qi@linaro.org>
3957
3958 * i386-linux-tdep.c (i386_linux_read_description): New function.
3959 (i386_linux_core_read_description): Call
3960 i386_linux_read_description.
3961 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3962 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3963 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3964 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3965 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3966 * x86-linux-nat.c (x86_linux_read_description): Call
3967 i386_linux_read_description.
3968
8e2141c6
YQ
39692017-07-26 Yao Qi <yao.qi@linaro.org>
3970
3971 * NEWS: Mention it.
3972 * features/Makefile (%.c: %.xml): Pass the xml file name to
3973 command "maint print c-tdesc".
3974 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3975 name from 'arg'.
3976
b468ff4c
YQ
39772017-07-26 Yao Qi <yao.qi@linaro.org>
3978
3979 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3980 in-class initialization.
3981 (tdesc_create_feature): Call new instead of XCNEW.
3982 (free_target_description): Ue delete.
3983
b9c0e1b4
JB
39842017-07-25 John Baldwin <jhb@FreeBSD.org>
3985
3986 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3987
a04b5337
YQ
39882017-07-25 Yao Qi <yao.qi@linaro.org>
3989
3990 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3991 constant.
3992 (amd64_x32_init_abi): Likewise.
3993 * amd64-tdep.h (amd64_init_abi): Update declaration.
3994 (amd64_x32_init_abi): Likewise.
3995
02ad7fc2
YQ
39962017-07-25 Yao Qi <yao.qi@linaro.org>
3997
3998 PR tdep/21717
3999 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4000 condition for FPSCR.
4001 (arm_linux_store_inferior_registers): Likewise.
4002
b6f48cb0
TT
40032017-07-22 Tom Tromey <tom@tromey.com>
4004
4005 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4006 <syscalls_counts>: Now a std::vector.
4007 (get_catch_syscall_inferior_data): Use "new".
4008 (catch_syscall_inferior_data_cleanup): Use "delete".
4009 (insert_catch_syscall, remove_catch_syscall)
4010 (clear_syscall_counts): Update.
4011
e12c9b7a
TT
40122017-07-22 Tom Tromey <tom@tromey.com>
4013
4014 * break-catch-syscall.c (syscall_catchpoint)
4015 <syscalls_to_be_caught>: Now a std::vector<int>
4016 (~syscall_catchpoint): Remove.
4017 (insert_catch_syscall, remove_catch_syscall)
4018 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4019 (print_mention_catch_syscall, print_recreate_catch_syscall):
4020 Update.
4021 (create_syscall_event_catchpoint): Change type of "filter"
4022 parameter.
4023 (catch_syscall_split_args): Return a std::vector.
4024 (catch_syscall_command_1, catching_syscall_number_1): Update.
4025
4fa8aeac
TT
40262017-07-22 Tom Tromey <tom@tromey.com>
4027
4028 * break-catch-throw.c (struct exception_catchpoint)
4029 <exception_rx>: Now a std::string.
4030 (~exception_catchpoint): Remove.
4031 (print_one_detail_exception_catchpoint): Update.
4032 (handle_gnu_v3_exceptions): Change type of except_rx.
4033 (extract_exception_regexp): Return a std::string.
4034 (catch_exception_command_1): Update.
4035
f746a154
TT
40362017-07-22 Tom Tromey <tom@tromey.com>
4037
4038 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4039 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4040 std::vector.
4041 <catch_all>: Now a bool.
4042 (~signal_catchpoint): Remove.
4043 (signal_catchpoint_insert_location)
4044 (signal_catchpoint_remove_location)
4045 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4046 (signal_catchpoint_print_mention)
4047 (signal_catchpoint_print_recreate)
4048 (signal_catchpoint_explains_signal): Update.
4049 (create_signal_catchpoint): Change type of "filter" and
4050 "catch_all".
4051 (catch_signal_split_args): Return a std::vector. Change type of
4052 "catch_all".
4053 (catch_signal_command): Update.
4054
47e77640
PA
40552017-07-20 Pedro Alves <palves@redhat.com>
4056
4057 * ada-lang.c (ada_language_defn): Make extern.
4058 (_initialize_ada_language): Remove add_language call.
4059 * c-lang.c (c_language_defn, cplus_language_defn)
4060 (asm_language_defn, minimal_language_defn): Make extern.
4061 (_initialize_c_language): Delete.
4062 * completer.c (compare_cstrings): Delete, moved to utils.h.
4063 * d-lang.c (d_language_defn): Make extern.
4064 (_initialize_d_language): Remove add_language calls.
4065 * defs.h (enum language): Add comment.
4066 * f-lang.c (f_language_defn): Make extern.
4067 (_initialize_f_language): Remove add_language call.
4068 * go-lang.c (go_language_defn): Make extern.
4069 (_initialize_go_language): Remove add_language call.
4070 * language.c: Include <algorithm>.
4071 (languages): Redefine as const array.
4072 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4073 (set_language_command): Handle "local". Use for-range loop.
4074 (set_language): Remove loop.
4075 (language_enum): Rewrite.
4076 (language_def, language_str): Remove loops.
4077 (add_language): Delete.
4078 (add_set_language_command): New, based on add_languages.
4079 (skip_language_trampoline): Adjust.
4080 (local_language_defn): Delete.
4081 (language_gdbarch_post_init): Adjust.
4082 (_initialize_language): Remove add_language calls. Call
4083 add_set_language_command.
4084 * language.h (add_language): Delete.
4085 (auto_language_defn)
4086 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4087 (asm_language_defn, c_language_defn, cplus_language_defn)
4088 (d_language_defn, f_language_defn, go_language_defn)
4089 (m2_language_defn, objc_language_defn, opencl_language_defn)
4090 (pascal_language_defn, rust_language_defn): Declare.
4091 * m2-lang.c (m2_language_defn): Make extern.
4092 (_initialize_m2_language): Remove add_language call.
4093 * objc-lang.c (objc_language_defn): Make extern.
4094 (_initialize_objc_language): Remove add_language call.
4095 * opencl-lang.c (opencl_language_defn): Make extern.
4096 (_initialize_opencl_language): Remove add_language call.
4097 * p-lang.c (pascal_language_defn): Make extern.
4098 (_initialize_pascal_language): Delete.
4099 * rust-lang.c (rust_language_defn): Make extern.
4100 (_initialize_rust_language): Delete.
4101 * utils.h (compare_cstrings): New static inline function.
4102
edb0c9cb
PA
41032017-07-20 Pedro Alves <palves@redhat.com>
4104
4105 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4106 (get_var_value): Constify parameters.
4107 (get_int_var_value): Change prototype.
4108 (to_fixed_range_type): Adjust.
4109 * ada-lang.h (get_int_var_value): Change prototype.
4110
a778f165
PA
41112017-07-20 Pedro Alves <palves@redhat.com>
4112
4113 * dwarf2read.c (dw2_lookup_symbol): Use
4114 SYMBOL_MATCHES_SEARCH_NAME.
4115 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4116
42edd901
PA
41172017-07-20 Pedro Alves <palves@redhat.com>
4118
4119 * block.c (block_iter_name_step, block_iter_name_first)
4120 (block_iter_name_next): Delete.
4121 (block_lookup_symbol_primary): Adjust to use
4122 dict_iter_match_first/dict_iter_match_next.
4123 * block.h (block_iter_name_first, block_iter_name_next): Delete
4124 declarations.
4125 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4126 dict_iter_match_first/dict_iter_match_next.
4127
cf325299
PA
41282017-07-20 Pedro Alves <palves@redhat.com>
4129
4130 * cp-support.c (cp_find_first_component_aux): Add missing case for
4131 end of string.
4132
c5ed0576
DB
41332017-07-18 David Blaikie <dblaikie@gmail.com>
4134
4135 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4136 of dwo_cu's dwo_file.
4137
27841e76
YQ
41382017-07-18 Yao Qi <yao.qi@linaro.org>
4139
4140 * remote.c (store_registers_using_G): Remove one line comment.
4141
cfb7e58b
YQ
41422017-07-18 Yao Qi <yao.qi@linaro.org>
4143
4144 * regcache.c (regcache_cpy): Simplify it.
4145 (regcache::cpy_no_passthrough): Remove it.
4146 * regcache.h (cpy_no_passthrough): Remove it.
4147 (regcache_dup, regcache_cpy): Update comments.
4148
386535dd
PA
41492017-07-18 Pedro Alves <palves@redhat.com>
4150
4151 * remote-sim.c (sim_command_completer): Adjust to work with a
4152 completion_tracker instead of a VEC.
4153
c45ec17c
PA
41542017-07-17 Pedro Alves <palves@redhat.com>
4155
4156 * completer.c (complete_source_filenames): New function.
4157 (complete_address_and_linespec_locations): New function.
4158 (location_completer): Use complete_address_and_linespec_locations.
4159 (completion_tracker::build_completion_result): Honor the tracker's
4160 request to suppress append.
4161 * completer.h (completion_tracker::suppress_append_ws)
4162 (completion_tracker::set_suppress_append_ws): New methods.
4163 (completion_tracker::m_suppress_append_ws): New field.
4164 (complete_source_filenames): New declaration.
4165 * linespec.c (linespec_complete_what): New.
4166 (struct ls_parser) <complete_what, completion_word,
4167 completion_quote_char, completion_quote_end, completion_tracker>:
4168 New fields.
4169 (string_find_incomplete_keyword_at_end): New.
4170 (linespec_lexer_lex_string): Record quote char. If in completion
4171 mode, don't throw.
4172 (linespec_lexer_consume_token): Advance the completion word point.
4173 (linespec_lexer_peek_token): Save/restore completion info.
4174 (save_stream_and_consume_token): New.
4175 (set_completion_after_number): New.
4176 (linespec_parse_basic): Set what to complete next depending on
4177 token. Handle function and label completions specially.
4178 (parse_linespec): Disable objc shortcut in completion mode. Set
4179 what to complete next depending on token type. Skip keyword if in
4180 completion mode.
4181 (complete_linespec_component, linespec_complete): New.
4182 * linespec.h (linespec_complete): Declare.
4183
be966d42
PA
41842017-07-17 Pedro Alves <palves@redhat.com>
4185
4186 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4187 Handle 'operator<' / 'operator<<'.
4188
a2459270
PA
41892017-07-17 Pedro Alves <palves@redhat.com>
4190
4191 * completer.c (collect_explicit_location_matches): Handle
4192 MATCH_LABEL.
4193 (convert_explicit_location_to_linespec): New, factored out from
4194 ...
4195 (convert_explicit_location_to_sals): ... this.
4196 (complete_label): New.
4197 (linespec_complete_label, find_label_symbols_in_block): New.
4198 (find_label_symbols): Add completion_mode parameter and adjust to
4199 call find_label_symbols_in_block.
4200 * linespec.h (linespec_complete_label): Declare.
4201
c6756f62
PA
42022017-07-17 Pedro Alves <palves@redhat.com>
4203
4204 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4205 complete_symbol_mode parameter.
4206 * cli/cli-cmds.c (complete_command): Get the completion result out
4207 of the handle_brkchars tracker if used a custom word point.
4208 * completer.c: Include "linespec.h".
4209 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4210 (advance_to_expression_complete_word_point): New.
4211 (completion_tracker::completes_to_completion_word): New.
4212 (complete_files_symbols): Pass down
4213 complete_symbol_mode::EXPRESSION.
4214 (explicit_options, probe_options): New.
4215 (collect_explicit_location_matches): Complete on the
4216 explictit_loc->foo instead of word. Use
4217 linespec_complete_function. Handle MATCH_LINE. Handle offering
4218 keyword and options completions.
4219 (backup_text_ptr): Delete.
4220 (skip_keyword): New.
4221 (complete_explicit_location): Remove 'word' parameter. Add
4222 language, quoted_arg_start and quoted_arg_end parameters.
4223 Rewrite, parsing left to right.
4224 (location_completer): Rewrite.
4225 (location_completer_handle_brkchars): New function.
4226 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4227 (enum complete_line_internal_reason): Adjust comments.
4228 (completion_tracker::discard_completions): New.
4229 (completer_handle_brkchars_func_for_completer): Handle
4230 location_completer.
4231 (gdb_custom_word_point_brkchars)
4232 (gdb_org_rl_basic_quote_characters): New.
4233 (gdb_completion_word_break_characters_throw)
4234 (completion_find_completion_word): Handle trackers that use a
4235 custom word point.
4236 (completion_tracker::advance_custom_word_point_by): New.
4237 (completion_tracker::build_completion_result): Don't rely on
4238 readline appending the quote char.
4239 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4240 use a custom word point.
4241 (gdb_rl_attempted_completion_function): Restore
4242 rl_basic_quote_characters.
4243 * completer.h (class completion_tracker): Extend intro comment.
4244 (completion_tracker::set_quote_char)
4245 (completion_tracker::quote_char)
4246 (completion_tracker::set_use_custom_word_point)
4247 (completion_tracker::use_custom_word_point)
4248 (completion_tracker::custom_word_point)
4249 (completion_tracker::set_custom_word_point)
4250 (completion_tracker::advance_custom_word_point_by)
4251 (completion_tracker::completes_to_completion_word)
4252 (completion_tracker::discard_completions): New methods.
4253 (completion_tracker::m_quote_char)
4254 (completion_tracker::m_use_custom_word_point)
4255 (completion_tracker::m_custom_word_point): New fields.
4256 (advance_to_expression_complete_word_point): Declare.
4257 * f-lang.c (f_collect_symbol_completion_matches): Add
4258 complete_symbol_mode parameter.
4259 * language.h (struct language_defn)
4260 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4261 parameter.
4262 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4263 (linespec_complete_function): New function.
4264 (linespec_lexer_lex_keyword): Adjust.
4265 * linespec.h (linespec_keywords, linespec_complete_function): New
4266 declarations.
4267 * location.c (find_end_quote): New function.
4268 (explicit_location_lex_one): Add explicit_completion_info
4269 parameter. Save quoting info. Don't throw if being called for
4270 completion. Don't handle Ada operators here.
4271 (is_cp_operator, skip_op_false_positives, first_of)
4272 (explicit_location_lex_one_function): New function.
4273 (string_to_explicit_location): Replace 'dont_throw' parameter with
4274 an explicit_completion_info pointer parameter. Handle it. Don't
4275 use explicit_location_lex_one to lex function names. Use
4276 explicit_location_lex_one_function instead.
4277 * location.h (struct explicit_completion_info): New.
4278 (string_to_explicit_location): Replace 'dont_throw' parameter with
4279 an explicit_completion_info pointer parameter.
4280 * symtab.c (default_collect_symbol_completion_matches_break_on):
4281 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4282 (default_collect_symbol_completion_matches)
4283 (collect_symbol_completion_matches): Add complete_symbol_mode
4284 parameter.
4285 (collect_symbol_completion_matches_type): Pass down
4286 complete_symbol_mode::EXPRESSION.
4287 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4288 parameter. Handle LINESPEC mode.
4289 * symtab.h (complete_symbol_mode): New.
4290 (default_collect_symbol_completion_matches_break_on)
4291 (default_collect_symbol_completion_matches)
4292 (collect_symbol_completion_matches)
4293 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4294 parameter.
4295
1d550c82
PA
42962017-07-17 Pedro Alves <palves@redhat.com>
4297
4298 * utils.c (enum class strncmp_iw_mode): New.
4299 (strcmp_iw): Rename to ...
4300 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4301 parameters. Handle them.
4302 (strncmp_iw): New.
4303 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4304 * utils.h (strncmp_iw): Declare.
4305 (strcmp_iw): Move describing comments here.
4306
8090b426
PA
43072017-07-17 Pedro Alves <palves@redhat.com>
4308
4309 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4310 CP_OPERATOR_STR.
4311 * c-typeprint.c (is_type_conversion_operator): Use
4312 CP_OPERATOR_STR.
4313 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4314 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4315 CP_OPERATOR_LEN.
4316 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4317 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4318 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4319 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4320 CP_OPERATOR_STR.
4321 * location.c: Include "cp-support.h".
4322 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4323 CP_OPERATOR_STR.
4324 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4325 CP_OPERATOR_LEN.
4326
6a2c1b87
PA
43272017-07-17 Pedro Alves <palves@redhat.com>
4328
4329 * cli/cli-cmds.c (complete_command): Use a completion tracker
4330 along with completion_find_completion_word for handle_brkchars
4331 phase.
4332 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4333 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4334 (struct gdb_rl_completion_word_info): New.
4335 (gdb_rl_find_completion_word): New.
4336 (completion_find_completion_word): New.
4337 * completer.h (completion_find_completion_word): Declare.
4338
eb3ff9a5
PA
43392017-07-17 Pedro Alves <palves@redhat.com>
4340
4341 * ada-lang.c (symbol_completion_match): Adjust comments.
4342 (symbol_completion_add): Replace vector parameter with
4343 completion_tracker parameter. Use it.
4344 (ada_make_symbol_completion_list): Rename to...
4345 (ada_collect_symbol_completion_matches): ... this. Add
4346 completion_tracker parameter and use it.
4347 (ada_language_defn): Adjust.
4348 * break-catch-syscall.c (catch_syscall_completer): Adjust
4349 prototype and work with completion_tracker instead of VEC.
4350 * breakpoint.c (condition_completer): Adjust prototype and work
4351 with completion_tracker instead of VEC.
4352 * c-lang.c (c_language_defn, cplus_language_defn)
4353 (asm_language_defn, minimal_language_defn): Adjust to renames.
4354 * cli/cli-cmds.c (complete_command): Rework using
4355 completion_tracker. Catch exceptions when completing.
4356 * cli/cli-decode.c (integer_unlimited_completer)
4357 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4358 with completion_tracker instead of VEC.
4359 * command.h (struct completion_tracker): Forward declare.
4360 (completer_ftype, completer_handle_brkchars_ftype): Change
4361 types.
4362 (complete_on_cmdlist, complete_on_enum): Adjust.
4363 * completer.c: Include <algorithm>.
4364 (struct gdb_completer_state): New.
4365 (current_completion): New global.
4366 (readline_line_completion_function): Delete.
4367 (noop_completer, filename_completer)
4368 (filename_completer_handle_brkchars, complete_files_symbols)
4369 (linespec_location_completer): Adjust to work with a
4370 completion_tracker instead of a VEC.
4371 (string_or_empty): New.
4372 (collect_explicit_location_matches): Adjust to work with a
4373 completion_tracker instead of a VEC.
4374 (explicit_location_completer): Rename to ...
4375 (complete_explicit_location): ... this and adjust to work with a
4376 completion_tracker instead of a VEC.
4377 (location_completer): Adjust to work with a completion_tracker
4378 instead of a VEC.
4379 (add_struct_fields): Adjust to work with a completion_list instead
4380 of VEC.
4381 (expression_completer): Rename to ...
4382 (complete_expression): ... this and adjust to work with a
4383 completion_tracker instead of a VEC. Use complete_files_symbols.
4384 (expression_completer): Reimplement on top of complete_expression.
4385 (symbol_completer): Adjust to work with a completion_tracker
4386 instead of a VEC.
4387 (enum complete_line_internal_reason): Add describing comments.
4388 (complete_line_internal_normal_command): Adjust to work with a
4389 completion_tracker instead of a VEC.
4390 (complete_line_internal): Rename to ...
4391 (complete_line_internal_1): ... this and adjust to work with a
4392 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4393 handle_brkchars phase.
4394 (new_completion_tracker): Delete.
4395 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4396 complete_line_internal_1.
4397 (free_completion_tracker): Delete.
4398 (INITIAL_COMPLETION_HTAB_SIZE): New.
4399 (completion_tracker::completion_tracker)
4400 (completion_tracker::~completion_tracker): New.
4401 (maybe_add_completion): Delete.
4402 (completion_tracker::maybe_add_completion)
4403 (completion_tracker::add_completion)
4404 (completion_tracker::add_completions): New.
4405 (throw_max_completions_reached_error): Delete.
4406 (complete_line): Adjust to work with a completion_tracker instead
4407 of a VEC. Don't create a completion_tracker_t or check for max
4408 completions here.
4409 (command_completer, command_completer_handle_brkchars)
4410 (signal_completer, reg_or_group_completer_1)
4411 (reg_or_group_completer, default_completer_handle_brkchars):
4412 Adjust to work with a completion_tracker.
4413 (gdb_completion_word_break_characters_throw): New.
4414 (gdb_completion_word_break_characters): Reimplement.
4415 (line_completion_function): Delete.
4416 (completion_tracker::recompute_lowest_common_denominator)
4417 (expand_preserving_ws)
4418 (completion_tracker::build_completion_result)
4419 (completion_result::completion_result)
4420 (completion_result::completion_result)
4421 (completion_result::~completion_result)
4422 (completion_result::completion_result)
4423 (completion_result::release_match_list, compare_cstrings)
4424 (completion_result::sort_match_list)
4425 (completion_result::reset_match_list)
4426 (gdb_rl_attempted_completion_function_throw)
4427 (gdb_rl_attempted_completion_function): New.
4428 * completer.h (completion_list, struct completion_result)
4429 (class completion_tracker): New.
4430 (complete_line): Add completion_tracker parameter.
4431 (readline_line_completion_function): Delete.
4432 (gdb_rl_attempted_completion_function): New.
4433 (noop_completer, filename_completer, expression_completer)
4434 (location_completer, symbol_completer, command_completer)
4435 (signal_completer, reg_or_group_completer): Update prototypes.
4436 (completion_tracker_t, new_completion_tracker)
4437 (make_cleanup_free_completion_tracker): Delete.
4438 (enum maybe_add_completion_enum): Delete.
4439 (maybe_add_completion): Delete.
4440 (throw_max_completions_reached_error): Delete.
4441 * corefile.c (complete_set_gnutarget): Adjust to work with a
4442 completion_tracker instead of a VEC.
4443 * cp-abi.c (cp_abi_completer): Adjust to work with a
4444 completion_tracker instead of a VEC.
4445 * d-lang.c (d_language_defn): Adjust.
4446 * disasm.c (disassembler_options_completer): Adjust to work with a
4447 completion_tracker instead of a VEC.
4448 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4449 (f_collect_symbol_completion_matches): ... this. Adjust to work
4450 with a completion_tracker instead of a VEC.
4451 (f_language_defn): Adjust.
4452 * go-lang.c (go_language_defn): Adjust.
4453 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4454 Adjust to work with a completion_tracker instead of a VEC.
4455 * infrun.c (handle_completer): Likewise.
4456 * interps.c (interpreter_completer): Likewise.
4457 * interps.h (interpreter_completer): Likewise.
4458 * language.c (unknown_language_defn, auto_language_defn)
4459 (local_language_defn): Adjust.
4460 * language.h (language_defn::la_make_symbol_completion_list):
4461 Rename to ...
4462 (language_defn::la_collect_symbol_completion_matches): ... this
4463 and adjust to work with a completion_tracker instead of a VEC.
4464 * m2-lang.c (m2_language_defn): Adjust.
4465 * objc-lang.c (objc_language_defn): Adjust.
4466 * opencl-lang.c (opencl_language_defn): Adjust.
4467 * p-lang.c (pascal_language_defn): Adjust.
4468 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4469 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4470 with a completion_tracker.
4471 * rust-lang.c (rust_language_defn): Adjust.
4472 * symtab.c (free_completion_list, do_free_completion_list)
4473 (return_val, completion_tracker): Delete.
4474 (completion_list_add_name, completion_list_add_symbol)
4475 (completion_list_add_msymbol, completion_list_objc_symbol)
4476 (completion_list_add_fields, add_symtab_completions): Add
4477 completion_tracker parameter and use it.
4478 (default_make_symbol_completion_list_break_on_1): Rename to...
4479 (default_collect_symbol_completion_matches_break_on): ... this.
4480 Add completion_tracker parameter and use it instead of allocating
4481 a completion tracker here.
4482 (default_make_symbol_completion_list_break_on): Delete old
4483 implementation.
4484 (default_make_symbol_completion_list): Delete.
4485 (default_collect_symbol_completion_matches): New.
4486 (make_symbol_completion_list): Delete.
4487 (collect_symbol_completion_matches): New.
4488 (make_symbol_completion_type): Rename to ...
4489 (collect_symbol_completion_matches_type): ... this. Add
4490 completion_tracker parameter and use it instead of VEC.
4491 (make_file_symbol_completion_list_1): Rename to...
4492 (collect_file_symbol_completion_matches): ... this. Add
4493 completion_tracker parameter and use it instead of VEC.
4494 (make_file_symbol_completion_list): Delete.
4495 (add_filename_to_list): Use completion_list instead of a VEC.
4496 (add_partial_filename_data::list): Now a completion_list.
4497 (make_source_files_completion_list): Work with a completion_list
4498 instead of a VEC.
4499 * symtab.h: Include "completer.h".
4500 (default_make_symbol_completion_list_break_on)
4501 (default_make_symbol_completion_list, make_symbol_completion_list)
4502 (make_symbol_completion_type, make_file_symbol_completion_list)
4503 (make_source_files_completion_list): Delete.
4504 (default_collect_symbol_completion_matches_break_on)
4505 (default_collect_symbol_completion_matches)
4506 (collect_symbol_completion_matches)
4507 (collect_symbol_completion_matches_type)
4508 (collect_file_symbol_completion_matches)
4509 (make_source_files_completion_list): New.
4510 * top.c (init_main): Don't install a rl_completion_entry_function
4511 hook. Install a rl_attempted_completion_function hook instead.
4512 * tui/tui-layout.c (layout_completer): Adjust to work with a
4513 completion_tracker.
4514 * tui/tui-regs.c (tui_reggroup_completer):
4515 * tui/tui-win.c (window_name_completer, focus_completer)
4516 (winheight_completer): Adjust to work with a completion_tracker.
4517 * value.c: Include "completer.h".
4518 (complete_internalvar): Adjust to work with a completion_tracker.
4519 * value.h (complete_internalvar): Likewise.
4520
6e1dbf8c
PA
45212017-07-17 Pedro Alves <palves@redhat.com>
4522
4523 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4524 renames.
4525 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4526 comments to completer_ftype's declaration.
4527 <completer_handle_brkchars>: Change type to
4528 completer_handle_brkchars_ftype.
4529 * command.h (completer_ftype): Add describing comment and give
4530 names to parameters.
4531 (completer_ftype_void): Rename to ...
4532 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4533 (set_cmd_completer_handle_brkchars): Adjust.
4534 * completer.c (filename_completer_handle_brkchars): New function.
4535 (complete_line_internal_normal_command): New function, factored
4536 out from ...
4537 (complete_line_internal): ... here.
4538 (command_completer_handle_brkchars)
4539 (default_completer_handle_brkchars)
4540 (completer_handle_brkchars_func_for_completer): New functions.
4541 * completer.h (set_gdb_completion_word_break_characters): Delete
4542 declaration.
4543 (completer_handle_brkchars_func_for_completer): New declaration.
4544 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4545 completer_handle_brkchars_func_for_completer.
4546
78b13106
PA
45472017-07-17 Pedro Alves <palves@redhat.com>
4548
4549 * completer.c (symbol_completer): New function, based on
4550 make_symbol_completion_list_fn.
4551 * completer.h (symbol_completer): New declaration.
4552 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4553 * python/py-cmd.c (completers): Adjust.
4554 * symtab.c (make_symbol_completion_list_fn): Delete.
4555 * symtab.h (make_symbol_completion_list_fn): Delete.
4556 * cli/cli-decode.c (add_cmd): Adjust.
4557
bbf2f4df
PA
45582017-07-17 Pedro Alves <palves@redhat.com>
4559
4560 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4561 * dwarf2read.c: Include "filename-seen-cache.h".
4562 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4563 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4564 * filename-seen-cache.c: New file.
4565 * filename-seen-cache.h: New file.
4566 * symtab.c: Include "filename-seen-cache.h".
4567 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4568 (create_filename_seen_cache, clear_filename_seen_cache)
4569 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4570 to filename-seen-cache.h/filename-seen-cache.c.
4571 (output_source_filename, sources_info)
4572 (maybe_add_partial_symtab_filename)
4573 (make_source_files_completion_list): Adjust to use
4574 filename_seen_cache.
4575
330cdd98
PA
45762017-07-17 Pedro Alves <palves@redhat.com>
4577
4578 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4579 fields.
4580 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4581 dwarf2_debug_sections*)): New.
4582 (dwarf2_per_objfile::dwarf2_per_objfile(const
4583 dwarf2_per_objfile&)): Declare as deleted.
4584 (dwarf2_per_objfile::operator=): Declare as deleted.
4585 (dwarf2_per_objfile::dwarf2_per_objfile)
4586 (dwarf2_per_objfile::~dwarf2_per_objfile)
4587 (dwarf2_per_objfile::free_cached_comp_units): New.
4588 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4589 ctor. Call dwarf2_per_objfile's ctor manually.
4590 (dwarf2_locate_sections): Deleted/refactored as ...
4591 (dwarf2_per_objfile::locate_sections): ... this new method.
4592 (free_cached_comp_units): Defer to
4593 dwarf2_per_objfile::free_cached_comp_units.
4594 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4595
8880f2a9
TT
45962017-07-14 Tom Tromey <tom@tromey.com>
4597
4598 PR rust/21764:
4599 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4600 parameter.
4601 <UNOP_SIZEOF>: Split into separate case.
4602 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4603
65547233
TT
46042017-07-14 Tom Tromey <tom@tromey.com>
4605
4606 PR rust/21763:
4607 * symtab.c (symbol_matches_domain): Add language_rust to special
4608 case.
4609 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4610 treat LOC_TYPEDEF symbols as variables.
4611
8f14146e
PA
46122017-07-14 Pedro Alves <palves@redhat.com>
4613
4614 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4615 symtabs matching all symtabs with SRCFILE as file name instead of
4616 only considering the first hit, with lookup_symtab.
4617
2347965c
SM
46182017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4619
4620 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4621 operator_name parameters.
4622 (gen_expr): Update function call.
4623
40f4af28
SM
46242017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4625
4626 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4627 parameter.
4628 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4629 Likewise.
4630 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4631 parameter, use agent_expr::gdbarch instead, update function
4632 calls.
4633 (locexpr_tracepoint_var_ref): Likewise.
4634 (loclist_tracepoint_var_ref): Likewise.
4635 * ax-gdb.c (gen_trace_static_fields): Likewise.
4636 (gen_traced_pop): Likewise.
4637 (gen_frame_args_address): Likewise.
4638 (gen_frame_locals_address): Likewise.
4639 (gen_var_ref): Likewise.
4640 (gen_struct_ref_recursive): Likewise.
4641 (gen_static_field): Likewise.
4642 (gen_maybe_namespace_elt): Likewise.
4643 (gen_expr): Likewise.
4644 (gen_trace_for_var): Likewise.
4645 (gen_trace_for_expr): Likewise.
4646 (gen_trace_for_return_address): Likewise.
4647
053f8057
SM
46482017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4649
4650 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4651 parameter.
4652 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4653
6661ad48
SM
46542017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4655
4656 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4657 from ax, update calls.
4658 (gen_usual_arithmetic): Likewise.
4659 (gen_integral_promotions): Likewise.
4660 (gen_bitfield_ref): Likewise.
4661 (gen_primitive_field): Likewise.
4662 (gen_struct_ref_recursive): Likewise.
4663 (gen_struct_ref): Likewise.
4664 (gen_maybe_namespace_elt): Likewise.
4665 (gen_struct_elt_for_reference): Likewise.
4666 (gen_namespace_elt): Likewise.
4667 (gen_aggregate_elt_ref): Likewise.
4668 (gen_expr): Get gdbarch from ax, update calls.
4669 (gen_expr_binop_rest): Likewise.
4670
c55a47e7
PA
46712017-07-13 Pedro Alves <palves@redhat.com>
4672
4673 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4674 as default tdesc.
4675 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4676 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4677 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4678 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4679 tdep.
4680 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4681 Get final tdesc from the tdep.
4682 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4683 default tdesc.
4684 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4685 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4686 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4687 Use it as default tdesc.
4688 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4689 down to amd_init_abi. No longer handle fallback tdesc here.
4690 * amd64-tdep.h (tdesc_x32): Declare.
4691 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4692 parameter.
4693 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4694 as default tdesc.
4695
55efceab
AA
46962017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4697
4698 * s390-linux-tdep.c (s390_process_record): Add support for
4699 instructions new in arch12.
4700
0aa37b65
JB
47012017-07-11 John Baldwin <jhb@FreeBSD.org>
4702
4703 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4704 PT_GETFSBASE and PT_GETGSBASE.
4705 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4706 PT_SETGSBASE.
4707
48aeef91
JB
47082017-07-11 John Baldwin <jhb@FreeBSD.org>
4709
4710 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4711 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4712 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4713 those rules.
4714 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4715 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4716 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4717 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4718 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4719 * features/i386/amd64.xml: Add 64bit-segments.xml.
4720 * features/i386/amd64-avx-avx512.c: Regenerated.
4721 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4722 * features/i386/amd64-avx-mpx.c: Regenerated.
4723 * features/i386/amd64-avx.c: Regenerated.
4724 * features/i386/amd64-mpx.c: Regenerated.
4725 * features/i386/amd64.c: Regenerated.
4726 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4727 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4728 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4729 * regformats/i386/amd64-avx.dat: Regenerated.
4730 * regformats/i386/amd64-mpx.dat: Regenerated.
4731 * regformats/i386/amd64.dat: Regenerated.
4732
77c501bc
YQ
47332017-07-10 Yao Qi <yao.qi@linaro.org>
4734
4735 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4736 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4737
6dc8d757
AK
47382017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4739
4740 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4741 unsetenv.
4742 * gnulib/aclocal.m4: Regenerate.
4743 * gnulib/config.in: Regenerate.
4744 * gnulib/configure: Regenerate.
4745 * gnulib/import/Makefile.am: Regenerate.
4746 * gnulib/import/Makefile.in: Regenerate.
4747 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4748 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4749 * gnulib/import/m4/environ.m4: New file.
4750 * gnulib/import/m4/setenv.m4: New file.
4751 * gnulib/import/setenv.c: New file.
4752 * gnulib/import/unsetenv.c: New file.
4753
266934d1
SM
47542017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4755
4756 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4757 address when op is DW_OP_addr.
4758
03278692
TT
47592017-07-09 Tom Tromey <tom@tromey.com>
4760
4761 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4762 check and apply to outer type.
4763
4b654465
JB
47642017-07-07 John Baldwin <jhb@FreeBSD.org>
4765
4766 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4767 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4768 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4769 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4770
2af9fc44
JB
47712017-07-07 John Baldwin <jhb@FreeBSD.org>
4772
4773 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4774
382b69bb
JB
47752017-07-07 John Baldwin <jhb@FreeBSD.org>
4776
4777 * corelow.c (get_core_siginfo): Remove.
4778 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4779 instead of get_core_siginfo.
4780 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4781 * gdbarch.h: Re-generate.
4782 * gdbarch.c: Re-generate.
4783 * linux-tdep.c (linux_core_xfer_siginfo): New.
4784 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4785
6e5eab33
JB
47862017-07-07 John Baldwin <jhb@FreeBSD.org>
4787
4788 * corelow.c (thread_section_name): Move to ...
4789 * gdbcore.h (thread_section_name): ... here.
4790
929edea9
JB
47912017-07-07 John Baldwin <jhb@FreeBSD.org>
4792
4793 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4794 (struct siginfo32): New.
4795 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4796 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4797 via ptrace(PT_LWPINFO).
4798
762c974a
JB
47992017-07-07 John Baldwin <jhb@FreeBSD.org>
4800
4801 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4802 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4803 (fbsd_get_siginfo_type): New.
4804 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4805 (_initialize_fbsd_tdep): New.
4806
33c5cd75
DB
48072017-07-06 David Blaikie <dblaikie@gmail.com>
4808
4809 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4810 a singular dwo_unit*) to support multiple CUs in the same way that
4811 multiple TUs are supported.
4812 (create_cus_hash_table): Replace create_dwo_cu with a function for
4813 parsing multiple CUs from a DWO file.
4814 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4815 create_dwo_cu.
4816 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4817 htab_find, rather than comparing the signature to a singleton CU in
4818 the dwo_file.
4819
8455d262
PA
48202017-07-06 Pedro Alves <palves@redhat.com>
4821
4822 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4823
4da3eb35
PA
48242017-07-04 Pedro Alves <palves@redhat.com>
4825
4826 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4827 * gdbtypes.h (TYPE_STATIC): Delete.
4828 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4829 is_synchronized, is_native>: Delete.
4830 <dummy>: Bump.
4831 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4832 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4833 (TYPE_FN_FIELD_ABSTRACT): Delete.
4834
5bfd255c
SM
48352017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4836
4837 * buffer.h (buffer_finish): Fix spelling mistakes.
4838
25c54127
EZ
48392017-07-01 Eli Zaretskii <eliz@gnu.org>
4840
4841 * .dir-locals.el: Automatically switch to C-style comments in
4842 versions of Emacs that support the feature.
4843
dc4bde35
SDJ
48442017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4845 Pedro Alves <palves@redhat.com>
4846
4847 PR cli/21688
4848 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4849 (process_next_line): New variable 'inline_cmd'.
4850 Adjust 'if' clauses for "python", "compile" and "guile" to use
4851 'command_name_equals' and check for '!inline_cmd'.
4852
51ed89aa
SDJ
48532017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4854
4855 PR cli/21688
4856 * cli/cli-script.c (command_name_equals_not_inline): New function.
4857 (process_next_line): Adjust 'if' clauses for "python", "compile"
4858 and "guile" to use command_name_equals_not_inline.
4859
eb17d413
PA
48602017-06-29 Pedro Alves <palves@redhat.com>
4861
4862 * completer.c (expression_completer): Call
4863 linespec_location_completer instead of location_completer.
4864
195bcdd5
PA
48652017-06-29 Pedro Alves <palves@redhat.com>
4866
4867 * completer.c (expression_completer): Remove code that recomputes
4868 'text' from 'word'.
4869
adc764e7
YQ
48702017-06-29 Yao Qi <yao.qi@linaro.org>
4871
4872 * regformats/regdat.sh: Generate code with
4873 "ifndef IN_PROCESS_AGENT".
4874
6e75794e
PA
48752017-06-28 Pedro Alves <palves@redhat.com>
4876
4877 * command.h: Include "common/scoped_restore.h".
4878
bc491f2e
YQ
48792017-06-28 Yao Qi <yao.qi@linaro.org>
4880
4881 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4882 instead of obstack_grow.
4883
41664b45
DG
48842017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4885
4886 PR gdb/21337
4887 * symfile.c (reread_symbols): Call objfiles_changed just before
4888 read_symbols.
4889
6da67eb1
PA
48902017-06-27 Pedro Alves <palves@redhat.com>
4891
4892 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4893 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4894 (completion_list_add_symbol, completion_list_add_msymbol):
4895 ... these new functions.
4896 (add_symtab_completions)
4897 (default_make_symbol_completion_list_break_on_1): Adjust.
4898
23732b1e
PA
48992017-06-27 Pedro Alves <palves@redhat.com>
4900
4901 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4902 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4903 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4904 dtor.
4905 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4906 'storage_obstack' field an auto_obstack. In-class initialize all
4907 non-bitfield fields. Make minsyms_read bool.
4908 * symfile.c (read_symbols): Adjust.
4909
a4d1e79a
AH
49102017-06-27 Alan Hayward <alan.hayward@arm.com>
4911
4912 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4913 (gdbsim_store_register): Likewise.
4914
8268c778
PA
49152017-06-27 Pedro Alves <palves@redhat.com>
4916
4917 * c-exp.y (name_obstack): Now an auto_obstack.
4918 (yylex): Use auto_obstack::clear.
4919 (c_parse): Use auto_obstack::clear instead of reinitializing and
4920 freeing the obstack.
4921 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4922 * d-exp.y (name_obstack): Now an auto_obstack.
4923 (yylex): Use auto_obstack::clear.
4924 (d_parse): Use auto_obstack::clear instead of reinitializing and
4925 freeing the obstack.
4926 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4927 auto_obstack.
4928 * dwarf2read.c (create_addrmap_from_index)
4929 (dwarf2_build_psymtabs_hard)
4930 (update_enumeration_type_from_children): Likewise.
4931 * gdb_obstack.h (auto_obstack): New type.
4932 * go-exp.y (name_obstack): Now an auto_obstack.
4933 (build_packaged_name): Use auto_obstack::clear.
4934 (go_parse): Use auto_obstack::clear instead of reinitializing and
4935 freeing the obstack.
4936 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4937 auto_obstack.
4938 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4939 * rust-exp.y (work_obstack): Now an auto_obstack.
4940 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4941 reinitializing and freeing the obstack.
4942 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4943 (host_char_to_target): Use auto_obstack.
4944 * utils.h (make_cleanup_obstack_free): Delete declaration.
4945 * valprint.c (generic_emit_char, generic_printstr): Use
4946 auto_obstack.
4947
db665f42
SM
49482017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4949
4950 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4951 thread.
4952 (darwin_init_thread_list): Don't update dummy thread.
4953 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4954
873c0814
SM
49552017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4956
4957 * record-full.c (netorder16): Remove.
4958
8b5a7a6e
SM
49592017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4960
4961 * common/diagnostics.h: Define macros for GCC.
4962 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4963 * common/vec.h: Include diagnostics.h.
4964 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4965 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4966 warning.
4967
d1435379
SM
49682017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4969
4970 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4971 New macro.
4972 * ada-lex.l: Ignore deprecated register warnings.
4973
cc75e0fd
SM
49742017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4975
4976 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4977 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4978
07809eaf
SM
49792017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4980
4981 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4982 its own line.
4983
f076f034
SM
49842017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4985
4986 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4987
0dd5cbc5
AH
49882017-06-23 Alan Hayward <alan.hayward@arm.com>
4989
4990 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4991 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4992 (xtensa_register_read_masked): Likewise.
4993
d4c6ce5b
SDJ
49942017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4995
4996 * common/environ.c (gdb_environ::unset): Update comment.
4997
16892a03
AH
49982017-06-22 Alan Hayward <alan.hayward@arm.com>
4999
5000 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5001 registers.
5002
d7dcbefc
AH
50032017-06-22 Alan Hayward <alan.hayward@arm.com>
5004
5005 * record-full.c (record_full_exec_insn): Use byte_vector.
5006
b30ff123
YQ
50072017-06-22 Yao Qi <yao.qi@linaro.org>
5008
5009 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5010 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5011
4fa847d7
AH
50122017-06-22 Alan Hayward <alan.hayward@arm.com>
5013
5014 * remote.c (cached_reg): Move from here...
5015 * regcache.h (cached_reg): ...to here.
5016 * python/py-unwind.c (struct reg_info): Remove.
5017 (cached_frame_info): Use cached_reg_t.
5018 (pyuw_prev_register): Likewise.
5019 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5020 (pyuw_dealloc_cache): Free all registers.
5021
f4906a9a
PA
50222017-06-22 Pedro Alves <palves@redhat.com>
5023 Simon Marchi <simon.marchi@ericsson.com>
5024
5025 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5026 warning.
5027 * common/diagnostics.h: New file.
5028
b45a1208
PA
50292017-06-22 Pedro Alves <palves@redhat.com>
5030
5031 * common/agent.h: Add include guards.
5032
e4da2c61
SM
50332017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5034
5035 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5036 talk about addressable units instead of bytes.
5037
96160d60
SDJ
50382017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5039
5040 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5041 of '::const_iterator'.
5042
9a6c7d9c
SDJ
50432017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5044
5045 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5046 'unittests/environ-selftests.c'.
5047 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5048 * charset.c (find_charset_names): Declare object 'iconv_env'.
5049 Update code to use 'iconv_env' object. Remove call to
5050 'free_environ'.
5051 * common/environ.c: Include <utility>.
5052 (make_environ): Delete function.
5053 (free_environ): Delete function.
5054 (gdb_environ::clear): New function.
5055 (gdb_environ::operator=): New function.
5056 (gdb_environ::get): Likewise.
5057 (environ_vector): Delete function.
5058 (set_in_environ): Delete function.
5059 (gdb_environ::set): New function.
5060 (unset_in_environ): Delete function.
5061 (gdb_environ::unset): New function.
5062 (gdb_environ::envp): Likewise.
5063 * common/environ.h: Include <vector>.
5064 (struct gdb_environ): Delete; transform into...
5065 (class gdb_environ): ... this class.
5066 (free_environ): Delete prototype.
5067 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5068 environ_vector): Likewise.
5069 * infcmd.c (run_command_1): Update code to call
5070 'envp' from 'gdb_environ' class.
5071 (environment_info): Update code to call methods from 'gdb_environ'
5072 class.
5073 (unset_environment_command): Likewise.
5074 (path_info): Likewise.
5075 (path_command): Likewise.
5076 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5077 (inferior::inferior): Initialize 'environment' using the host's
5078 information.
5079 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5080 Include "environ.h".
5081 (class inferior) <environment>: Change type from 'struct
5082 gdb_environ' to 'gdb_environ'.
5083 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5084 methods from 'gdb_environ' class.
5085 * solib.c (solib_find_1): Likewise
5086 * unittests/environ-selftests.c: New file.
5087
75c554cf
YQ
50882017-06-20 Yao Qi <yao.qi@linaro.org>
5089
5090 * features/i386/i386-linux.xml: Exchange the order of including
5091 32bit-linux.xml and 32bit-sse.xml.
5092 * features/i386/i386-linux.c: Regenerated.
5093
72ddacb7
YQ
50942017-06-20 Yao Qi <yao.qi@linaro.org>
5095
5096 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5097 Delete copy ctor and assignment operator.
5098 (tdesc_type): Likewise.
5099 (tdesc_feature): Likewise.
5100 (tdesc_free_reg): Remove.
5101 (tdesc_create_reg): Use new.
5102 (tdesc_free_type): Remove.
5103 (tdesc_create_vector): Use new.
5104 (tdesc_create_union): Likewise.
5105 (tdesc_create_flags): Likewise.
5106 (tdesc_create_enum): Likewise.
5107 (tdesc_free_feature): Delete.
5108 (free_target_description): Use delete.
5109
325c9fd4
JB
51102017-06-19 John Baldwin <jhb@FreeBSD.org>
5111
5112 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5113 registers.
5114
16b7a719
PA
51152017-06-19 Pedro Alves <palves@redhat.com>
5116
5117 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5118 after gdb::unlinker.
5119
1c8e01c9
SDJ
51202017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5121
5122 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5123 gdb_environ to access an environment variable.
5124
ffce45d2
TP
51252017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5126
5127 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5128 gdb_byte*.
5129
1d4fbac9
SM
51302017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5131
5132 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5133
8465943a
SM
51342017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5135
5136 * configure: Re-generate.
5137 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5138
3e019bdc
SM
51392017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5140
5141 * configure: Re-generate.
5142 * warning.m4: Pass -Werror to compiler when checking for
5143 supported warning flags.
5144
cf0dd6f0
SM
51452017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5146
5147 * Makefile.in (COMPILE.pre): Add "-x c++".
5148
6f98355c
YQ
51492017-06-16 Alan Hayward <alan.hayward@arm.com>
5150 Pedro Alves <palves@redhat.com>
5151 Yao Qi <yao.qi@linaro.org>
5152
5153 * defs.h (RequireLongest): New.
5154 (extract_integer): Declare function template.
5155 (extract_signed_integer): Remove the declaration, but define it
5156 static inline.
5157 (extract_unsigned_integer): Likewise.
5158 (store_integer): Declare function template.
5159 (store_signed_integer): Remove the declaration, but define it
5160 static inline.
5161 (store_unsigned_integer): Likewise.
5162 * findvar.c (extract_integer): New function template.
5163 (extract_signed_integer): Remove.
5164 (extract_unsigned_integer): Remove.
5165 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5166 instantiations.
5167 (store_integer): New function template.
5168 (store_signed_integer): Remove.
5169 (store_unsigned_integer): Remove.
5170 (store_integer): Explicit instantiations.
5171 * regcache.c (regcache_raw_read_signed): Update.
5172 (regcache::raw_read): New function.
5173 (regcache::raw_read_signed): Remove.
5174 (regcache::raw_read_unsigned): Remove.
5175 (regcache_raw_read_unsigned): Update.
5176 (regcache_raw_write_unsigned): Update.
5177 (regcache::raw_write_signed): Remove.
5178 (regcache::raw_write): New function.
5179 (regcache_cooked_read_signed): Update.
5180 (regcache::raw_write_unsigned): Remove.
5181 (regcache::cooked_read_signed): Remove.
5182 (regcache_cooked_read_unsigned): Update.
5183 (regcache::cooked_read_unsigned): Remove.
5184 (regcache_cooked_write_signed): Update.
5185 (regcache_cooked_write_unsigned): Update.
5186 * regcache.h (regcache) <raw_read_signed>: Remove.
5187 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5188 <raw_read, raw_write>: New.
5189 <cooked_read_signed, cooked_write_signed>: Remove.
5190 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5191 <cooked_read, cooked_write>: New.
5192 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5193 (sh64_pseudo_register_write): Update.
5194
a87dc45a
AK
51952017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5196
5197 * arc-tdep.c (arc_disassembler_options): New variable.
5198 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5199 of default_print_insn.
5200 (arc_delayed_print_insn): Set info->section when needed,
5201 use default_print_insn to retrieve a disassembler.
5202
45159d6a
SDJ
52032017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5204
5205 PR gdb/21574
5206 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5207 to mention $SHELL and startup-with-shell.
5208
b46c4cf0
MF
52092017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5210
5211 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5212
6394c606
YQ
52132017-06-14 Yao Qi <yao.qi@linaro.org>
5214
5215 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5216 default_print_insn instead of print_insn_aarch64.
5217 * arm-tdep.c (gdb_print_insn_arm): Call
5218 default_print_insn instead of print_insn_big_arm
5219 and print_insn_little_arm.
5220 * i386-tdep.c (i386_print_insn): Call default_print_insn
5221 instead of print_insn_i386.
5222 * ia64-tdep.c (ia64_print_insn): Call
5223 default_print_insn instead of print_insn_ia64.
5224 * mips-tdep.c (gdb_print_insn_mips): Call
5225 default_print_insn instead of print_insn_big_mips
5226 and print_insn_little_mips.
5227 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5228 instead of print_insn_spu.
5229
d5722aa2
PA
52302017-06-14 Pedro Alves <palves@redhat.com>
5231
5232 * ada-lang.c: Include "common/byte-vector.h".
5233 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5234 * charset.c (wchar_iterator::iterate): Resize the vector instead
5235 of reserving it.
5236 * common/byte-vector.h: Include "common/def-vector.h".
5237 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5238 * cli/cli-dump.c: Include "common/byte-vector.h".
5239 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5240 * common/byte-vector.h: New file.
5241 * common/def-vector.h: New file.
5242 * common/default-init-alloc.h: New file.
5243 * dwarf2loc.c: Include "common/byte-vector.h".
5244 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5245 instead of reserving it.
5246 * dwarf2read.c: Include "common/byte-vector.h".
5247 (data_buf::m_vec): Now a gdb::byte_vector.
5248 * gdb_regex.c: Include "common/def-vector.h".
5249 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5250 * mi/mi-main.c: Include "common/byte-vector.h".
5251 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5252 * printcmd.c: Include "common/byte-vector.h".
5253 (print_scalar_formatted): Use gdb::byte_vector.
5254 * valprint.c: Include "common/byte-vector.h".
5255 (maybe_negate_by_bytes, print_decimal_chars): Use
5256 gdb::byte_vector.
5257
01ec7a27
SM
52582017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5259
5260 * darwin-nat.c: Include "nat/fork-inferior.h".
5261
848d9074
SM
52622017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5263
5264 * configure.nat: Factor out Darwin bits that are not
5265 architecture-specific. Add fork-inferior.o.
5266
3b912944
SM
52672017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5268
5269 * configure.nat: Factor out AIX bits that are not
5270 architecture-specific. Add fork-inferior.o.
5271
55acdf22
AA
52722017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5273
5274 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5275 (read_pieced_value, write_pieced_value): ...here. Reduce to
5276 wrappers that just call rw_pieced_value.
5277
f65e2044
AA
52782017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5279
5280 * dwarf2loc.c (write_pieced_value): When writing the data for a
5281 memory piece, use write_memory_with_notification instead of
5282 write_memory.
5283
23f945bf
AA
52842017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5285
5286 * valops.c (read_value_memory): Change embedded_offset to
5287 represent a bit offset instead of a byte offset.
5288 * value.h (read_value_memory): Adjust comment.
5289
f236533e
AA
52902017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5291
5292 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5293 dest_offset_bits and source_offset_bits.
5294 (write_pieced_value): Likewise.
5295
65d84b76
AA
52962017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5297
5298 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5299 given by DW_OP_bit_piece.
5300 (write_pieced_value): Likewise.
5301
242d31ab
AA
53022017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5303
5304 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5305 some other preparations to the places where sufficient information
5306 is available.
5307 (write_pieced_value): Likewise.
5308
03c8af18
AA
53092017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5310
5311 * dwarf2loc.c (bits_to_bytes): New function.
5312 (read_pieced_value): Fix offset calculations for register pieces
5313 on big-endian targets.
5314 (write_pieced_value): Likewise.
5315
840989c1
AA
53162017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5317
5318 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5319 (write_pieced_value): Likewise.
5320
359b19bb
AA
53212017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5322
5323 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5324 transfer the source value's least significant bits, instead of its
5325 lowest-addressed ones. Rename type_len to max_offset.
5326 (read_pieced_value): Mirror above changes to write_pieced_value as
5327 applicable.
5328
07c9ca3b
AA
53292017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5330
5331 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5332 truncate full bytes from dest_offset_bits before using it as an
5333 offset into the buffer.
5334
f1cc9874
AA
53352017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5336
5337 * dwarf2loc.c (write_pieced_value): Include transfer size in
5338 byte-wise check.
5339
cdaac320
AA
53402017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5341
5342 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5343 calculation of this_size.
5344
af547a96
AA
53452017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5346
5347 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5348 when targeting a bit-field.
5349 (write_pieced_value): Likewise.
5350
ddd7882a
AA
53512017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5352
5353 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5354 (allocate_piece_closure): Drop addr_size parameter.
5355 (dwarf2_evaluate_loc_desc_full): Adjust call to
5356 allocate_piece_closure.
5357
e9352324
AA
53582017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5359
5360 PR gdb/21226
5361 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5362 the LSB end, independent of endianness.
5363
d5d1163e
AA
53642017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5365
5366 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5367 size capping.
5368
032bb6ea
YQ
53692017-06-13 Yao Qi <yao.qi@linaro.org>
5370
5371 * mips-linux-nat.c: Move include features/mips*-linux.c to
5372 mips-linux-tdep.c.
5373 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5374 to mips-linux-tdep.c.
5375 * mips-linux-tdep.c: Include features/mips*-linux.c
5376 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5377 functions.
5378 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5379 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5380 (tdesc_mips64_dsp_linux): Declare.
5381
f12f6bad
TT
53822017-06-12 Tom Tromey <tom@tromey.com>
5383
5384 * valprint.h (val_print_type_code_int): Remove.
5385 * valprint.c (generic_val_print_int): Always call
5386 val_print_scalar_formatted.
5387 (val_print_type_code_int): Remove.
5388 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5389 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5390 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5391 * ada-valprint.c (ada_val_print_num): Use
5392 val_print_scalar_formatted.
5393
d9109c80
TT
53942017-06-12 Tom Tromey <tom@tromey.com>
5395
5396 * printcmd.c (print_scalar_formatted): Unify the two switches.
5397 Don't convert scalars to LONGEST.
5398
4ac0cb1c
TT
53992017-06-12 Tom Tromey <tom@tromey.com>
5400
5401 PR exp/16225:
5402 * valprint.h (print_decimal_chars): Update.
5403 * valprint.c (maybe_negate_by_bytes): New function.
5404 (print_decimal_chars): Add "is_signed" argument.
5405 * printcmd.c (print_scalar_formatted): Update.
5406
30a25466
TT
54072017-06-12 Tom Tromey <tom@tromey.com>
5408
5409 PR exp/16225:
5410 * valprint.h (print_binary_chars, print_hex_chars): Update.
5411 * valprint.c (val_print_type_code_int): Update.
5412 (print_binary_chars): Add "zero_pad" argument.
5413 (emit_octal_digit): New function.
5414 (print_octal_chars): Don't zero-pad.
5415 (print_decimal_chars): Likewise.
5416 (print_hex_chars): Add "zero_pad" argument.
5417 * sh64-tdep.c (sh64_do_fp_register): Update.
5418 * regcache.c (regcache::dump): Update.
5419 * printcmd.c (print_scalar_formatted): Update.
5420 * infcmd.c (default_print_one_register_info): Update.
5421
b3464d03
PA
54222017-06-12 Pedro Alves <palves@redhat.com>
5423 Alan Hayward <alan.hayward@arm.com>
5424
5425 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5426 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5427 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5428 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5429 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5430
4b76cda9
PA
54312017-06-12 Pedro Alves <palves@redhat.com>
5432
5433 * dwarf2read.c (mapped_symtab::data): Now a vector of
5434 symtab_index_entry instead of vector of
5435 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5436 whether an element's name is NULL instead of checking whether the
5437 element itself is NULL.
5438 (find_slot): Change return type. Adjust.
5439 (hash_expand, , add_index_entry, uniquify_cu_indices)
5440 (write_hash_table): Adjust.
5441
e8f8bcb3
PA
54422017-06-12 Pedro Alves <palves@redhat.com>
5443
5444 * dwarf2read.c (recursively_count_psymbols): New function.
5445 (write_psymtabs_to_index): Call it to compute number of psyms and
5446 pass estimate size of psyms_seen to unordered_set's ctor.
5447
70a1152b
PA
54482017-06-12 Pedro Alves <palves@redhat.com>
5449
5450 * dwarf2read.c (write_hash_table): Check if key already exists
5451 before emplacing.
5452
c2f134ac
PA
54532017-06-12 Pedro Alves <palves@redhat.com>
5454
5455 * dwarf2read.c (data_buf::append_space): Rename to...
5456 (data_buf::grow): ... this, and make private. Adjust all callers.
5457 (data_buf::append_uint): New method.
5458 (add_address_entry, write_one_signatured_type)
5459 (write_psymtabs_to_index): Use it.
5460
a81e6d4d
PA
54612017-06-12 Pedro Alves <palves@redhat.com>
5462
5463 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5464 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5465 (data_buf::file_write): Call ::fwrite directly.
5466
6fd931f2
PA
54672017-06-12 Pedro Alves <palves@redhat.com>
5468
5469 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5470 std::vector::erase.
5471
bc8f2430
JK
54722017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5473
5474 Code cleanup: C++ify .gdb_index producer.
5475 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5476 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5477 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5478 (create_strtab, add_string): Remove.
5479 (file_write, data_buf): New.
5480 (struct symtab_index_entry): Use std::vector for cu_indices.
5481 (struct mapped_symtab): Use std::vector for data.
5482 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5483 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5484 Remove.
5485 (find_slot): Change return type. Update it to the new data structures.
5486 (hash_expand, add_index_entry): Update it to the new data structures.
5487 (offset_type_compare): Remove.
5488 (uniquify_cu_indices): Update it to the new data structures.
5489 (c_str_view, c_str_view_hasher, vector_hasher): New.
5490 (add_indices_to_cpool): Remove.
5491 (write_hash_table): Update it to the new data structures.
5492 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5493 (eq_psymtab_cu_index): Remove.
5494 (psym_index_map): New typedef.
5495 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5496 reference and std::unordered_map for cu_index_htab.
5497 (add_address_entry, add_address_entry_worker, write_address_map)
5498 (write_psymbols): Update it to the new data structures.
5499 (write_obstack): Remove.
5500 (struct signatured_type_index_data): Change types_list to a data_buf
5501 reference and psyms_seen to a std::unordered_set reference.
5502 (write_one_signatured_type, recursively_write_psymbols)
5503 (write_psymtabs_to_index): Update it to the new data structures.
5504
c4dcb155
SM
55052017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5506
5507 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5508 separate-debug-file commands.
5509 * symfile.h (separate_debug_file_debug): New global.
5510 * symfile.c (separate_debug_file_debug): New global.
5511 (separate_debug_file_exists, find_separate_debug_file): Add
5512 debug output.
5513 (_initialize_symfile): Add "set debug separate-debug-file"
5514 command.
5515 * build-id.c (build_id_to_debug_bfd,
5516 find_separate_debug_file_by_buildid): Add debug output.
5517
6d45d4b4
SM
55182017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5519
5520 * gdbarch.sh (displaced_step_free_closure): Remove.
5521 * gdbarch.h, gdbarch.c: Re-generate.
5522 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5523 displaced_step_free_closure.
5524 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5525 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5526 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5527 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5528 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5529 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5530 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5531 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5532 * infrun.c (displaced_step_clear): Call xfree instead of
5533 gdbarch_displaced_step_free_closure.
5534
2f91880f
SDJ
55352017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5536
5537 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5538 NULL".
5539
b8b6e72f
AH
55402017-06-08 Alan Hayward <alan.hayward@arm.com>
5541
5542 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5543 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5544 (mn10300_push_dummy_call): Likewise.
5545
5369082e
AH
55462017-06-08 Alan Hayward <alan.hayward@arm.com>
5547
5548 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5549
ff4ca5ac
AH
55502017-06-08 Alan Hayward <alan.hayward@arm.com>
5551
5552 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5553
aefd8b33
SDJ
55542017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5555
5556 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5557 able to start inferiors using a shell.
5558 (New remote packets): Announce new packet "QStartupWithShell".
5559 * remote.c: Add PACKET_QStartupWithShell.
5560 (extended_remote_create_inferior): Handle new
5561 PACKET_QStartupWithShell.
5562 (remote_protocol_features) <QStartupWithShell>: New entry for
5563 PACKET_QStartupWithShell.
5564 (_initialize_remote): Call "add_packet_config_cmd" for
5565 QStartupShell.
5566
2090129c
SDJ
55672017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5568 Pedro Alves <palves@redhat.com>
5569
5570 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5571 and "nat/fork-inferior.h".
5572 * common/common-inferior.h: New file, with contents from
5573 "gdb/inferior.h".
5574 * commom/common-utils.c: Include "common-utils.h".
5575 (stringify_argv): New function.
5576 * common/common-utils.h (stringify_argv): New prototype.
5577 * configure.nat: Add "fork-inferior.o" as a dependency for
5578 "*linux*", "fbsd*" and "nbsd*" hosts.
5579 * corefile.c (get_exec_file): Update comment.
5580 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5581 instead of "startup_inferior".
5582 (darwin_create_inferior): Call "add_thread_silent" after
5583 "fork_inferior".
5584 * fork-child.c: Cleanup unnecessary includes.
5585 (SHELL_FILE): Move to "common/common-fork-child.c".
5586 (environ): Likewise.
5587 (exec_wrapper): Initialize.
5588 (get_exec_wrapper): New function.
5589 (breakup_args): Move to "common/common-fork-child.c"; rename to
5590 "breakup_args_for_exec".
5591 (escape_bang_in_quoted_argument): Move to
5592 "common/common-fork-child.c".
5593 (saved_ui): New variable.
5594 (prefork_hook): New function.
5595 (postfork_hook): Likewise.
5596 (postfork_child_hook): Likewise.
5597 (gdb_startup_inferior): Likewise.
5598 (fork_inferior): Move to "common/common-fork-child.c". Update
5599 function to support gdbserver.
5600 (startup_inferior): Likewise.
5601 * gdbcore.h (get_exec_file): Remove declaration.
5602 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5603 instead of "startup_inferior". Call "add_thread_silent" after
5604 "fork_inferior".
5605 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5606 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5607 instead of "startup_inferior". Call "add_thread_silent" after
5608 "fork_inferior".
5609 * inferior.h: Include "common-inferior.h".
5610 (trace_start_error): Move to "common/common-utils.h".
5611 (trace_start_error_with_name): Likewise.
5612 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5613 (startup_inferior): Likewise.
5614 (gdb_startup_inferior): New prototype.
5615 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5616 * nat/fork-inferior.h: New file.
5617 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5618 instead of "startup_inferior". Call "add_thread_silent" after
5619 "fork_inferior".
5620 * target.h (target_terminal_init): Move prototype to
5621 "target/target.h".
5622 (target_terminal_inferior): Likewise.
5623 (target_terminal_ours): Likewise.
5624 * target/target.h (target_terminal_init): New prototype, moved
5625 from "target.h".
5626 (target_terminal_inferior): Likewise.
5627 (target_terminal_ours): Likewise.
5628 * utils.c (gdb_flush_out_err): New function.
5629
043a4934
SDJ
56302017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5631
5632 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5633 * common/common-gdbthread.h: New file, with parts from
5634 "gdb/gdbthread.h".
5635 * gdbthread.h: Include "common-gdbthread.h".
5636 (switch_to_thread): Moved to "common/common-gdbthread.h".
5637
15652511
SDJ
56382017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5639
5640 * Makefile.in (SFILES): Add "common/job-control.c".
5641 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5642 (COMMON_OBS): Add "job-control.o".
5643 * common/job-control.c: New file, with contents from
5644 "gdb/inflow.c".
5645 * common/job-control.h: New file, with contents from "terminal.h".
5646 * fork-child.c: Include "job-control.h".
5647 * inflow.c: Include "job-control.h".
5648 (gdb_setpgid): Move to "common/common-inflow.c".
5649 (_initialize_inflow): Move setting of "job_control" to
5650 "handle_job_control".
5651 * terminal.h (job_control): Moved to "common/common-terminal.h".
5652 (gdb_setpgid): Likewise.
5653 * top.c: Include "job_control.h".
5654 * utils.c: Likewise.
5655 (job_control): Moved to "job-control.c".
5656
2d7cc5c7
PA
56572017-06-07 Pedro Alves <palves@redhat.com>
5658
5659 * Makefile.in (SFILES): Add gdb_regex.c.
5660 (COMMON_OBS): Add gdb_regex.o.
5661 * ada-lang.c (ada_add_standard_exceptions)
5662 (ada_add_exceptions_from_frame, name_matches_regex)
5663 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5664 parameter type to compiled_regex. Adjust.
5665 (ada_exceptions_list): Use compiled_regex.
5666 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5667 std::unique_ptr<compiled_regex>.
5668 (exception_catchpoint::~exception_catchpoint): Remove regfree
5669 call.
5670 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5671 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5672 * breakpoint.c (solib_catchpoint::compiled): Now a
5673 std::unique_ptr<compiled_regex>.
5674 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5675 (check_status_catch_solib): Adjust to use compiled_regex.
5676 (add_solib_catchpoint): Adjust to use compiled_regex.
5677 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5678 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5679 compiled_regex reference. Adjust to use it.
5680 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5681 declaration. Include "gdb_regex.h".
5682 (apropos_cmd): Change regex parameter to compiled_regex reference.
5683 * gdb_regex.c: New file.
5684 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5685 declarations.
5686 (class compiled_regex): New.
5687 * linux-tdep.c: Include "common/gdb_optional.h".
5688 (struct mapping_regexes): New, factored out from
5689 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5690 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5691 gdb::optional and remove cleanups. Adjust to compiled_regex.
5692 * probe.c: Include "common/gdb_optional.h".
5693 (collect_probes): Use compiled_regex and gdb::optional and remove
5694 cleanups.
5695 * skip.c: Include "common/gdb_optional.h".
5696 (skiplist_entry::compiled_function_regexp): Now a
5697 gdb::optional<compiled_regex>.
5698 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5699 (free_skiplist_entry): Remove regfree call.
5700 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5701 compiled_regex and gdb::optional.
5702 * symtab.c: Include "common/gdb_optional.h".
5703 (search_symbols): Use compiled_regex and gdb::optional.
5704 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5705 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5706 to gdb_regex.c.
5707
50d6adef
AH
57082017-06-07 Alan Hayward <alan.hayward@arm.com>
5709
5710 * regcache.c (regcache::save): Avoid buffer use.
5711 (regcache::dump): Likewise.
5712
4a8a33c8
AH
57132017-06-07 Alan Hayward <alan.hayward@arm.com>
5714
5715 * sh-tdep.c (sh_pseudo_register_read): Remove
5716 MAX_REGISTER_SIZE.
5717 (sh_pseudo_register_write): Likewise.
5718 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5719 (sh64_pseudo_register_write): Likewise
5720
d1be909e
AH
57212017-06-07 Alan Hayward <alan.hayward@arm.com>
5722
5723 * aarch64-tdep.c (aarch64_store_return_value): Use
5724 V_REGISTER_SIZE.
5725 (aarch64_pseudo_read_value): Likewise.
5726 (aarch64_pseudo_write): Likewise.
5727
f4a65042
YQ
57282017-06-06 Yao Qi <yao.qi@linaro.org>
5729
5730 * regformats/regdef.h (set_register_cache): Remove the
5731 declaration.
5732
9f7fb0aa
AH
57332017-06-06 Alan Hayward <alan.hayward@arm.com>
5734
5735 * frame.c (frame_unwind_register_signed): Use
5736 frame_unwind_register_value.
5737
e1e01040
PA
57382017-06-06 Pedro Alves <palves@redhat.com>
5739
5740 PR breakpoints/21553
5741 * breakpoint.c (create_breakpoints_sal_default)
5742 (init_breakpoint_sal, create_breakpoint_sal): Use
5743 gdb::unique_xmalloc_ptr for string parameters.
5744 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5745 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5746 (base_breakpoint_create_breakpoints_sal)
5747 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5748 (strace_marker_create_breakpoints_sal)
5749 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5750 string parameters.
5751 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5752 gdb::unique_xmalloc_ptr for string parameters.
5753 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5754 parameters.
5755
fbe654c8
AH
57562017-06-06 Alan Hayward <alan.hayward@arm.com>
5757
5758 * alpha-tdep.c (alpha_register_to_value): Use
5759 get_frame_register_value.
5760 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5761
ae0d01d6
AH
57622017-06-06 Alan Hayward <alan.hayward@arm.com>
5763
5764 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5765 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5766 (ia64_value_to_register): Likewise.
5767 (ia64_extract_return_value): Likewise.
5768 (ia64_store_return_value): Likewise.
5769 (ia64_push_dummy_call): Likewise.
5770
49cf576c
JB
57712017-06-04 Joel Brobecker <brobecker@adacore.com>
5772
5773 GDB 8.0 released.
5774
26b6a6ab
SM
57752017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5776
5777 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5778
22827c51
SM
57792017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5780
5781 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5782 parameter.
5783 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5784
0e05cf3a
SM
57852017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5786
5787 * event-loop.c (poll_timers): Unallocate timer using delete
5788 instead of xfree.
5789
c1fc2657
SM
57902017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5791
5792 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5793 (struct breakpoint) <~breakpoint>: New.
5794 (struct watchpoint): Inherit from breakpoint.
5795 <~watchpoint>: New.
5796 <base>: Remove.
5797 (struct tracepoint): Inherit from breakpoint.
5798 <base>: Remove.
5799 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5800 (struct longjmp_breakpoint): Inherit from breakpoint.
5801 <~longjmp_breakpoint>: New.
5802 <base>: Remove.
5803 (new_breakpoint_from_type): Remove casts.
5804 (watchpoint_in_thread_scope): Remove reference to base field.
5805 (watchpoint_del_at_next_stop): Likewise.
5806 (update_watchpoint): Likewise.
5807 (watchpoint_check): Likewise.
5808 (bpstat_check_watchpoint): Likewise.
5809 (set_longjmp_breakpoint): Likewise.
5810 (struct fork_catchpoint): Inherit from breakpoint.
5811 <base>: Remove.
5812 (struct solib_catchpoint): Inherit from breakpoint.
5813 <~solib_catchpoint>: New.
5814 <base>: Remove.
5815 (dtor_catch_solib): Change to ...
5816 (solib_catchpoint::~solib_catchpoint): ... this.
5817 (breakpoint_hit_catch_solib): Remove reference to base field.
5818 (add_solib_catchpoint): Likewise.
5819 (create_fork_vfork_event_catchpoint): Likewise.
5820 (struct exec_catchpoint): Inherit from breakpoint.
5821 <~exec_catchpoint>: New.
5822 <base>: Remove.
5823 (dtor_catch_exec): Change to ...
5824 (exec_catchpoint::~exec_catchpoint): ... this.
5825 (dtor_watchpoint): Change to ...
5826 (watchpoint::~watchpoint): ... this.
5827 (watch_command_1): Remove reference to base field.
5828 (catch_exec_command_1): Likewise.
5829 (base_breakpoint_dtor): Change to ...
5830 (breakpoint::~breakpoint): ... this.
5831 (base_breakpoint_ops): Remove dtor field value.
5832 (longjmp_bkpt_dtor): Change to ...
5833 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5834 (strace_marker_create_breakpoints_sal): Remove reference to base
5835 field.
5836 (delete_breakpoint): Don't manually call breakpoint destructor.
5837 (create_tracepoint_from_upload): Remove reference to base field.
5838 (trace_pass_set_count): Likewise.
5839 (initialize_breakpoint_ops): Don't initialize
5840 momentary_breakpoint_ops, don't set dtors.
5841 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5842 <~ada_catchpoint>: New.
5843 <base>: Remove.
5844 (create_excep_cond_exprs): Remove reference to base field.
5845 (dtor_exception): Change to ...
5846 (ada_catchpoint::~ada_catchpoint): ... this.
5847 (dtor_catch_exception): Remove.
5848 (dtor_catch_exception_unhandled): Remove.
5849 (dtor_catch_assert): Remove.
5850 (create_ada_exception_catchpoint): Remove reference to base
5851 field.
5852 (initialize_ada_catchpoint_ops): Don't set dtors.
5853 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5854 breakpoint.
5855 <~signal_catchpoint>: New.
5856 <base>: Remove.
5857 (signal_catchpoint_dtor): Change to ...
5858 (signal_catchpoint::~signal_catchpoint): ... this.
5859 (create_signal_catchpoint): Remove reference to base field.
5860 (initialize_signal_catchpoint_ops): Don't set dtor.
5861 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5862 from breakpoint.
5863 <~syscall_catchpoint>: New.
5864 <base>: Remove.
5865 (dtor_catch_syscall): Change to ...
5866 (syscall_catchpoint::~syscall_catchpoint): ... this.
5867 (create_syscall_event_catchpoint): Remove reference to base
5868 field.
5869 (initialize_syscall_catchpoint_ops): Don't set dtor.
5870 * break-catch-throw.c (struct exception_catchpoint): Inherit
5871 from breakpoint.
5872 <~exception_catchpoint>: New.
5873 <base>: Remove.
5874 (dtor_exception_catchpoint): Change to ...
5875 (exception_catchpoint::~exception_catchpoint): ... this.
5876 (handle_gnu_v3_exceptions): Remove reference to base field.
5877 (initialize_throw_catchpoint_ops): Don't set dtor.
5878 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5879 field.
5880 * remote.c (remote_get_tracepoint_status): Likewise.
5881 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5882 * tracefile.c (tracefile_fetch_registers): Likewise.
5883 * tracepoint.c (actions_command): Likewise.
5884 (validate_actionline): Likewise.
5885 (tfind_1): Likewise.
5886 (get_traceframe_location): Likewise.
5887 (find_matching_tracepoint_location): Likewise.
5888 (parse_tracepoint_status): Likewise.
5889 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5890
3b0871f4
SM
58912017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5892
5893 * breakpoint.c (struct longjmp_breakpoint): New struct.
5894 (is_tracepoint_type): Change return type to bool.
5895 (is_longjmp_type): New function.
5896 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5897 (set_raw_breakpoint_without_location): Use
5898 new_breakpoint_from_type.
5899 (set_raw_breakpoint): Likewise.
5900
a5e364af
SM
59012017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5902
5903 * breakpoint.c (new_breakpoint_from_type): New function.
5904 (create_breakpoint_sal): Use new_breakpoint_from_type and
5905 unique_ptr.
5906 (create_breakpoint): Likewise.
5907
ae3b3f34
SM
59082017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5909
5910 * memattr.c (mem_info_command): Rename to ...
5911 (info_mem_command): ... this.
5912 (mem_enable_command): Rename to ...
5913 (enable_mem_command): ... this.
5914 (mem_disable_command): Rename to ...
5915 (disable_mem_command): ... this.
5916 (mem_delete_command): Rename to ...
5917 (delete_mem_command): ... this.
5918 (_initialize_mem): Adjust function names.
5919
13ace077
MM
59202017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5921
5922 * btrace.c (handle_pt_insn_events): New.
5923 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5924 STATUS. Split into this and ...
5925 (handle_pt_insn_event_flags): ... this.
5926
c56ccc05
MM
59272017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5928
5929 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5930 and struct pt_insn.resynced.
5931 * configure: Regenerated.
5932 * config.in: Regenerated.
5933
08c3f6d2
TW
59342017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5935
5936 * btrace.c (ftrace_find_call_by_number): New function.
5937 (ftrace_new_function): Store objects, not pointers.
5938 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5939 ftrace_new_gap, ftrace_update_function,
5940 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5941 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5942 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5943 btrace_ends_with_single_insn, btrace_call_get): Account for
5944 btrace_thread_info::functions now storing objects.
5945 * btrace.h (struct btrace_thread_info): Add constructor.
5946 (struct btrace_thread_info) <functions>: Make std::vector.
5947 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5948 Initialize with default values.
5949 * record-btrace.c (record_btrace_frame_sniffer): Account for
5950 btrace_thread_info::functions now storing objects.
5951
8ffd39f2
TW
59522017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5953
5954 * btrace.c: Remove typedef bfun_s.
5955 (ftrace_new_gap): Directly add gaps to the list of gaps.
5956 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5957 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5958 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5959 instead of gdb VEC.
5960
4aeb0dfc
TW
59612017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5962
5963 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5964 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5965 with btrace_thread_info::next_segment and
5966 btrace_thread_info::prev_segment.
5967 * btrace.h: Remove struct btrace_func_link.
5968 (struct btrace_function): Replace pair of function segment pointers
5969 with pair of indices.
5970 * python/py-record-btrace.c (btpy_call_prev_sibling,
5971 btpy_call_next_sibling): Replace references to
5972 btrace_thread_info::segment with btrace_thread_info::next_segment and
5973 btrace_thread_info::prev_segment.
5974 * record-btrace.c (record_btrace_frame_this_id): Use
5975 btrace_find_call_by_number.
5976
eb8f2b9c
TW
59772017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5978
5979 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5980 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5981 btrace_insn_next, btrace_insn_prev): Remove references to
5982 btrace_thread_info::flow.
5983 * btrace.h (struct btrace_function): Remove FLOW.
5984
42bfe59e
TW
59852017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5986
5987 * btrace.c (ftrace_find_call_by_number): New function.
5988 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5989 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5990 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5991 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5992 index.
5993 * btrace.h (struct btrace_function): Turn UP into an index.
5994 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5995 as an index.
5996 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5997 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5998 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5999
b54b03bd
TW
60002017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6001
6002 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6003 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6004 ftrace_update_function, ftrace_compute_global_level_offset,
6005 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6006 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6007 btrace_insn_end, btrace_is_empty): Remove references to
6008 btrace_thread_info::begin and btrace_thread_info::end.
6009 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6010 (struct btrace_thread_info) <functions>: Adjust comment.
6011 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6012 btrace_thread_info::begin.
6013
8286623c
TW
60142017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6015
6016 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6017 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6018 ftrace_update_function): Remove arguments that implicitly were always
6019 BTINFO->END.
6020 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6021 Don't pass BTINFO->END.
6022
a0f1b963
TW
60232017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6024
6025 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6026 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6027 btrace_find_insn_by_number): Replace function segment pointer with
6028 index.
6029 (btrace_insn_cmp): Simplify.
6030 * btrace.h: (struct btrace_insn_iterator) Rename index to
6031 insn_index. Replace function segment pointer with index into function
6032 segment vector.
6033 * record-btrace.c (record_btrace_call_history): Replace function
6034 segment pointer use with index.
6035 (record_btrace_frame_sniffer): Retrieve function call segment through
6036 vector.
6037 (record_btrace_set_replay): Remove defunc't safety check.
6038
f158f208
TW
60392017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6040
6041 * btrace.c (btrace_ends_with_single_insn): New function.
6042 (btrace_call_get, btrace_call_number, btrace_call_begin,
6043 btrace_call_end, btrace_call_next, btrace_call_prev,
6044 btrace_find_call_by_number): Use index into call segment vector
6045 instead of pointer.
6046 (btrace_call_cmp): Simplify.
6047 * btrace.h (struct btrace_call_iterator): Replace function call segment
6048 pointer with index into vector.
6049 * record-btrace.c (record_btrace_call_history): Use index instead of
6050 pointer.
6051
521103fd
TW
60522017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6053
6054 * btrace.c (btrace_insn_begin, btrace_insn_end,
6055 btrace_find_insn_by_number): Add btinfo to iterator.
6056 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6057
17b89b34
TW
60582017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6059
6060 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6061 and save pointers directly.
6062 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6063 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6064 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6065 changed signature of functions.
6066 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6067 (btrace_fetch): Remove code that adds btrace_function pointers to
6068 vector of btrace_functions.
6069 (btrace_clear): Simplify freeing vector of btrace_functions.
6070
2b51eddc
TW
60712017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6072
6073 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6074 Replace VEC_* with std::vector functions.
6075 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6076 (struct btrace_thread_info)<functions>: Change type to std::vector.
6077
db6be0d5
SM
60782017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6079
6080 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6081 "Removed targets and native configurations" up. Merge duplicate
6082 "New commands" sub-sections. Add "New options" sub-sections.
6083
b057297a
AH
60842017-05-26 Alan Hayward <alan.hayward@arm.com>
6085
6086 * defs.h (copy_integer_to_size): New declaration.
6087 * findvar.c (copy_integer_to_size): New function.
6088 (do_cint_test): New selftest function.
6089 (copy_integer_to_size_test): Likewise.
6090 (_initialize_findvar): Likewise.
6091 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6092 (mips_fbsd_collect_reg): Use raw_collect_integer.
6093 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6094 (mips64_fill_gregset): Use raw_collect_integer
6095 (mips64_fill_fpregset): Use raw_supply_integer.
6096 * regcache.c (regcache::raw_supply_integer): New function.
6097 (regcache::raw_collect_integer): Likewise.
6098 * regcache.h: (regcache::raw_supply_integer): New declaration.
6099 (regcache::raw_collect_integer): Likewise.
6100
b77b02a5
YQ
61012017-05-24 Yao Qi <yao.qi@linaro.org>
6102
6103 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6104 (COMMON_OBS): Add gdbarch-selftests.o.
6105 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6106 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6107 * gdbarch-selftests.c: New file.
6108 * regcache.h (regcache) <~regcache>: Mark it virtual if
6109 GDB_SELF_TEST.
6110 <raw_write>: Likewise.
6111
e521e87e
YQ
61122017-05-24 Yao Qi <yao.qi@linaro.org>
6113
6114 * regcache.c (current_regcache): Change it to
6115 regcache::current_regcache.
6116 (regcache_observer_target_changed): Update.
6117 (regcache_thread_ptid_changed): Make it a regcache static
6118 method.
6119 (regcache_thread_ptid_changed): Update.
6120 (class regcache_access): New.
6121 (current_regcache_test): Update.
6122 (_initialize_regcache): Update.
6123 * regcache.h: Include forward_list.
6124 (regcache): Declare regcache_thread_ptid_changed and declare
6125 registers_changed_ptid as friend.
6126
d8e07dda
YQ
61272017-05-24 Yao Qi <yao.qi@linaro.org>
6128
6129 * i387-tdep.c (i387_register_to_value): Use register_size
6130 instead of TYPE_LENGTH.
6131 * m68k-tdep.c (m68k_register_to_value): Likewise.
6132
8c8f9122
YQ
61332017-05-24 Yao Qi <yao.qi@linaro.org>
6134
6135 * i387-tdep.c (i387_convert_register_p): Return false if type
6136 code isn't TYPE_CODE_FLT.
6137
68fce50f
YQ
61382017-05-24 Yao Qi <yao.qi@linaro.org>
6139
6140 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6141 length is 4.
6142 (alpha_register_to_value): Remove type length check.
6143 (alpha_value_to_register): Likewise.
6144
88954b49
YQ
61452017-05-24 Yao Qi <yao.qi@linaro.org>
6146
6147 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6148 TYPE_CODE_FLT.
6149
e3ec9b69
YQ
61502017-05-24 Yao Qi <yao.qi@linaro.org>
6151
6152 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6153 TYPE_CODE_FLT or not.
6154
cdd238da
YQ
61552017-05-24 Yao Qi <yao.qi@linaro.org>
6156
6157 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6158 * avr-tdep.c (avr_gdbarch_init): Likewise.
6159 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6160 * cris-tdep.c (cris_gdbarch_init): Likewise.
6161 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6162 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6163 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6164 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6165 * mep-tdep.c (mep_gdbarch_init): Likewise.
6166 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6167 * mips-tdep.c (mips_gdbarch_init): Likewise.
6168 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6169 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6170 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6171 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6172 * v850-tdep.c (v850_gdbarch_init): Likewise.
6173
7a3929c4
YQ
61742017-05-24 Yao Qi <yao.qi@linaro.org>
6175
6176 * selftest-arch.c (tests_with_arch): Call registers_changed
6177 and reinit_frame_cache.
6178 * selftest.c (run_self_tests): Likewise.
6179
f4985dba
YQ
61802017-05-24 Yao Qi <yao.qi@linaro.org>
6181
6182 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6183 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6184
ab20fa4a
YQ
61852017-05-24 Yao Qi <yao.qi@linaro.org>
6186
6187 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6188 set_gdbarch_print_insn.
6189
f532ab94
YQ
61902017-05-24 Yao Qi <yao.qi@linaro.org>
6191
6192 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6193 set_gdbarch_print_insn.
6194
39503f82
YQ
61952017-05-24 Yao Qi <yao.qi@linaro.org>
6196
6197 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6198 set_gdbarch_print_insn.
6199 * arc-tdep.c (arc_gdbarch_init): Likewise.
6200 * arch-utils.c: include dis-asm.h.
6201 (default_print_insn): New function.
6202 * arch-utils.h (default_print_insn): Declare.
6203 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6204 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6205 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6206 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6207 * frv-tdep.c (frv_gdbarch_init): Likewise.
6208 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6209 * gdbarch.sh (print_insn): Use default_print_insn.
6210 * gdbarch.c: Regenerated.
6211 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6212 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6213 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6214 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6215 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6216 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6217 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6218 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6219 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6220 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6221 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6222 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6223 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6224 * mt-tdep.c (mt_gdbarch_init): Likewise.
6225 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6226 * nios2-tdep.c (nios2_print_insn): Remove.
6227 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6228 * rx-tdep.c (rx_gdbarch_init): Likewise.
6229 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6230 * score-tdep.c (score_print_insn): Remove.
6231 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6232 * sh-tdep.c (sh_gdbarch_init): Likewise.
6233 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6234 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6235 * tic6x-tdep.c (tic6x_print_insn): Remove.
6236 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6237 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6238 * v850-tdep.c (v850_gdbarch_init): Likewise.
6239 * vax-tdep.c (vax_gdbarch_init): Likewise.
6240 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6241 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6242
f7241d4f
JB
62432017-05-23 John Baldwin <jhb@FreeBSD.org>
6244
6245 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6246 (MIPS_FP0_REGNUM): Remove.
6247 (MIPS_FSR_REGNUM): Remove.
6248 (mips_fbsd_supply_fpregs): Use mips_regnum.
6249 (mips_fbsd_supply_gregs): Likewise.
6250 (mips_fbsd_collect_fpregs): Likewise.
6251 (mips_fbsd_collect_gregs): Likewise.
6252
d489d81d
JB
62532017-05-23 John Baldwin <jhb@FreeBSD.org>
6254
6255 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6256 (getpfpregs_supplies): New function.
6257 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6258 getfpregs_supplies.
6259 (mips_fbsd_store_inferior_registers): Likewise.
6260
e11b3cdc
PA
62612017-05-22 Pedro Alves <palves@redhat.com>
6262
6263 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6264 maintainer.
6265
0f068fb5
AH
62662017-05-22 Alan Hayward <alan.hayward@arm.com>
6267
6268 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6269 (store_register): Likewise.
6270 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6271 (get_decimal_float_return_value): Likewise.
6272 (do_ppc_sysv_return_value): Likewise.
6273 (ppc64_sysv_abi_push_integer): Likewise.
6274 (ppc64_sysv_abi_push_freg): Likewise.
6275 (ppc64_sysv_abi_return_value_base): Likewise.
6276 (ppc64_sysv_abi_return_value): Likewise.
6277 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6278 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6279 * rs6000-nat.c: Likewise.
6280 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6281 (rs6000_value_to_register): Likewise.
6282 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6283
e6cf65f2
TT
62842017-05-21 Tom Tromey <tom@tromey.com>
6285
6286 PR rust/21466:
6287 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6288 arrays as "[T]", not "[T; ]".
6289
43cc5389
TT
62902017-05-19 Tom Tromey <tom@tromey.com>
6291
6292 PR rust/21484:
6293 * rust-lang.c (exp_descriptor_rust): New function.
6294 (rust_language_defn): Use it.
6295 * p-lang.c (pascal_language_defn): Update.
6296 * opencl-lang.c (opencl_language_defn): Update.
6297 * objc-lang.c (objc_language_defn): Update.
6298 * m2-lang.c (m2_language_defn): Update.
6299 * language.h (struct language_defn)
6300 <la_watch_location_expression>: New member.
6301 * language.c (unknown_language_defn, auto_language_defn)
6302 (local_language_defn): Update.
6303 * go-lang.c (go_language_defn): Update.
6304 * f-lang.c (f_language_defn): Update.
6305 * d-lang.c (d_language_defn): Update.
6306 * c-lang.h (c_watch_location_expression): Declare.
6307 * c-lang.c (c_watch_location_expression): New function.
6308 (c_language_defn, cplus_language_defn, asm_language_defn)
6309 (minimal_language_defn): Use it.
6310 * breakpoint.c (watch_command_1): Call
6311 la_watch_location_expression.
6312 * ada-lang.c (ada_language_defn): Update.
6313
7a6e7fcc
RO
63142017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6315
6e7e1744
RO
6316 PR tui/21482
6317 * gdb_curses.h (NOMACROS): Define.
6318 (NCURSES_NOMACROS): Define.
6319
63202017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6321
6322 PR tui/21482
7a6e7fcc
RO
6323 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6324 arg to char *.
6325 * tui/tui-wingeneral.c (box_win): Likewise.
6326 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6327 (tui_show_source_line): Likewise.
6328 (tui_show_exec_info_content): Likewise.
6329
1933fd8e
VM
63302017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6331
6332 * sparc-tdep.c (sparc_structure_return_p)
6333 (sparc_arg_on_registers_p): New functions.
6334 (sparc32_store_arguments): Use them.
6335 * sparc64-tdep.c (sparc64_16_byte_align_p)
6336 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6337 Handle TYPE_CODE_ARRAY.
6338
21873064
YQ
63392017-05-17 Yao Qi <yao.qi@linaro.org>
6340
6341 * cli/cli-decode.c (add_alias_cmd): New function.
6342 * command.h (add_alias_cmd): Declare.
6343 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6344 instead call add_alias_cmd.
6345
2b351b19
PA
63462017-05-17 Pedro Alves <palves@redhat.com>
6347
6348 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6349 (nat_makefile_frag): ... this. All references updated.
6350 * configure.ac: Likewise.
6351 * configure.nat: Likewise. Enhance comments.
6352 * configure: Regenerate.
6353
5f2ad7a3
RO
63542017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6355
6356 * procfs.c (procfs_create_inferior): Change prototype to match
6357 definition.
6358
adf3dde5
EZ
63592017-05-13 Eli Zaretskii <eliz@gnu.org>
6360
6361 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6362 C++ compiler warning.
6363
6830f270
TT
63642017-05-12 Tom Tromey <tom@tromey.com>
6365
6366 PR rust/21483:
6367 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6368 recurse, just call value_struct_elt directly.
6369
68f2f2e3
TT
63702017-05-12 Tom Tromey <tom@tromey.com>
6371
6372 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6373 OP_RUST_ARRAY>: Fix.
6374
256afbc2
TT
63752017-05-12 Tom Tromey <tom@tromey.com>
6376
6377 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6378
94bb8dfe
YQ
63792017-05-09 Yao Qi <yao.qi@linaro.org>
6380
6381 * regcache.c: Include <forward_list>.
6382 (struct regcache_list): Remove.
6383 (current_regcache): Update.
6384 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6385 (regcache_thread_ptid_changed): Likewise.
6386 (registers_changed_ptid): Likewise.
6387 (current_regcache_size): Likewise.
6388
8248946c
YQ
63892017-05-09 Yao Qi <yao.qi@linaro.org>
6390
6391 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6392 (current_regcache_size): New function.
6393 (current_regcache_test): New function.
6394 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6395
313c5961
AH
63962017-05-08 Alan Hayward <alan.hayward@arm.com>
6397
6398 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6399 (print_gp_register_row): Use get_frame_register_value.
6400
27bfc1d1
AH
64012017-05-08 Alan Hayward <alan.hayward@arm.com>
6402
6403 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6404 (mips_supply_fpregset): Likewise.
6405 (mips64_supply_gregset): Likewise.
6406
146e6c5c
AH
64072017-05-08 Alan Hayward <alan.hayward@arm.com>
6408
6409 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6410 regcache->raw_supply_zeroed.
6411
e50f25ec
SDJ
64122017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6413
6414 * configure.nat: Rearrange 'case' statements to match
6415 host before cpu.
6416
21ea5acd
SDJ
64172017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6418
6419 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6420 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6421 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6422 "@nat_extra_makefile_frag@".
6423 (Makefile): Remove dependency on "@frags@".
6424 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6425 (data-directory/Makefile): Likewise.
6426 * config/aarch64/linux.mh: Deleted; moved contents to
6427 "gdb/configure.nat".
6428 * config/alpha/alpha-linux.mh: Likewise.
6429 * config/alpha/nbsd.mh: Likewise.
6430 * config/arm/linux.mh: Likewise.
6431 * config/arm/nbsdelf.mh: Likewise.
6432 * config/i386/cygwin.mh: Likewise.
6433 * config/i386/cygwin64.mh: Likewise.
6434 * config/i386/darwin.mh: Likewise.
6435 * config/i386/fbsd.mh: Likewise.
6436 * config/i386/fbsd64.mh: Likewise.
6437 * config/i386/go32.mh: Likewise.
6438 * config/i386/i386gnu.mh: Likewise.
6439 * config/i386/i386sol2.mh: Likewise.
6440 * config/i386/linux.mh: Likewise.
6441 * config/i386/linux64.mh: Likewise.
6442 * config/i386/mingw.mh: Likewise.
6443 * config/i386/mingw64.mh: Likewise.
6444 * config/i386/nbsd64.mh: Likewise.
6445 * config/i386/nbsdelf.mh: Likewise.
6446 * config/i386/nto.mh: Likewise.
6447 * config/i386/obsd.mh: Likewise.
6448 * config/i386/obsd64.mh: Likewise.
6449 * config/i386/sol2-64.mh: Likewise.
6450 * config/ia64/linux.mh: Likewise.
6451 * config/m32r/linux.mh: Likewise.
6452 * config/m68k/linux.mh: Likewise.
6453 * config/m68k/nbsdelf.mh: Likewise.
6454 * config/m68k/obsd.mh: Likewise.
6455 * config/m88k/obsd.mh: Likewise.
6456 * config/mips/fbsd.mh: Likewise.
6457 * config/mips/linux.mh: Likewise.
6458 * config/mips/nbsd.mh: Likewise.
6459 * config/mips/obsd64.mh: Likewise.
6460 * config/pa/linux.mh: Likewise.
6461 * config/pa/nbsd.mh: Likewise.
6462 * config/pa/obsd.mh: Likewise.
6463 * config/powerpc/aix.mh: Likewise.
6464 * config/powerpc/fbsd.mh: Likewise.
6465 * config/powerpc/linux.mh: Likewise.
6466 * config/powerpc/nbsd.mh: Likewise.
6467 * config/powerpc/obsd.mh: Likewise.
6468 * config/powerpc/ppc64-linux.mh: Likewise.
6469 * config/powerpc/spu-linux.mh: Likewise.
6470 * config/s390/linux.mh: Likewise.
6471 * config/sh/nbsd.mh: Likewise.
6472 * config/sparc/fbsd.mh: Likewise.
6473 * config/sparc/linux.mh: Likewise.
6474 * config/sparc/linux64.mh: Likewise.
6475 * config/sparc/nbsd64.mh: Likewise.
6476 * config/sparc/nbsdelf.mh: Likewise.
6477 * config/sparc/obsd64.mh: Likewise.
6478 * config/sparc/sol2.mh: Likewise.
6479 * config/tilegx/linux.mh: Likewise.
6480 * config/vax/nbsdelf.mh: Likewise.
6481 * config/vax/obsd.mh: Likewise.
6482 * config/xtensa/linux.mh: Likewise.
6483 * config/i386/i386gnu.mn: New file, with excerpts from
6484 "config/i386/i386gnu.mh".
6485 * configure: Regenerate.
6486 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6487 *.mh files under "gdb/config".
6488 * configure.nat: New file, with contents from the
6489 "gdb/config/*/*.mh" files.
6490
7ed1acaf
TW
64912017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6492
6493 * btrace.c (btrace_clear): Free insn vector.
6494
e13cb306
PA
64952017-05-05 Pedro Alves <palves@redhat.com>
6496
6497 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6498 * configure: Regenerate.
6499
5ed8105e
PA
65002017-05-04 Pedro Alves <palves@redhat.com>
6501
6502 * Makefile.in (SFILES): Add progspace-and-thread.c.
6503 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6504 (COMMON_OBS): Add progspace-and-thread.o.
6505 * breakpoint.c: Include "progspace-and-thread.h".
6506 (update_inserted_breakpoint_locations)
6507 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6508 Use scoped_restore_current_pspace_and_thread.
6509 (create_std_terminate_master_breakpoint): Use
6510 scoped_restore_current_program_space.
6511 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6512 (print_breakpoint_location): Use
6513 scoped_restore_current_program_space.
6514 (bp_loc_is_permanent): Use
6515 scoped_restore_current_pspace_and_thread.
6516 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6517 (download_tracepoint_locations): Use
6518 scoped_restore_current_pspace_and_thread.
6519 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6520 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6521 (enum step_over_calls_kind): Moved from inferior.h.
6522 (class scoped_restore_current_thread): New class.
6523 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6524 declaration.
6525 (scoped_restore_current_thread): New class.
6526 * infcmd.c: Include "common/gdb_optional.h".
6527 (continue_1, proceed_after_attach): Use
6528 scoped_restore_current_thread.
6529 (notice_new_inferior): Use scoped_restore_current_thread.
6530 * inferior.c: Include "progspace-and-thread.h".
6531 (restore_inferior, save_current_inferior): Delete.
6532 (add_inferior_command, clone_inferior_command): Use
6533 scoped_restore_current_pspace_and_thread.
6534 * inferior.h (scoped_restore_current_inferior): New class.
6535 * infrun.c: Include "progspace-and-thread.h" and
6536 "common/gdb_optional.h".
6537 (follow_fork_inferior): Use
6538 scoped_restore_current_pspace_and_thread.
6539 (scoped_restore_exited_inferior): New class.
6540 (handle_vfork_child_exec_or_exit): Use
6541 scoped_restore_exited_inferior,
6542 scoped_restore_current_pspace_and_thread,
6543 scoped_restore_current_thread and scoped_restore.
6544 (fetch_inferior_event): Use scoped_restore_current_thread.
6545 * linespec.c (decode_line_full, decode_line_1): Use
6546 scoped_restore_current_program_space.
6547 * mi/mi-main.c: Include "progspace-and-thread.h".
6548 (exec_continue): Use scoped_restore_current_thread.
6549 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6550 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6551 * proc-service.c (ps_pglobal_lookup): Use
6552 scoped_restore_current_program_space.
6553 * progspace-and-thread.c: New file.
6554 * progspace-and-thread.h: New file.
6555 * progspace.c (release_program_space, clone_program_space): Use
6556 scoped_restore_current_program_space.
6557 (restore_program_space, save_current_program_space)
6558 (save_current_space_and_thread): Delete.
6559 (switch_to_program_space_and_thread): Moved to
6560 progspace-and-thread.c.
6561 * progspace.h (save_current_program_space)
6562 (save_current_space_and_thread): Delete declarations.
6563 (scoped_restore_current_program_space): New class.
6564 * remote.c (remote_btrace_maybe_reopen): Use
6565 scoped_restore_current_thread.
6566 * symtab.c: Include "progspace-and-thread.h".
6567 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6568 * thread.c (print_thread_info_1): Use
6569 scoped_restore_current_thread.
6570 (struct current_thread_cleanup): Delete.
6571 (do_restore_current_thread_cleanup)
6572 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6573 (scoped_restore_current_thread::~scoped_restore_current_thread):
6574 ... this new dtor.
6575 (make_cleanup_restore_current_thread): Rename/convert to ...
6576 (scoped_restore_current_thread::scoped_restore_current_thread):
6577 ... this new ctor.
6578 (thread_apply_all_command): Use scoped_restore_current_thread.
6579 (thread_apply_command): Use scoped_restore_current_thread.
6580 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6581 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6582
f6223dbb
PA
65832017-05-04 Pedro Alves <palves@redhat.com>
6584
6585 * thread.c (make_cleanup_restore_current_thread): Move
6586 find_thread_ptid call before the is_stopped call. Assert that the
6587 thread is found. Replace is_stopped call by checking the thread's
6588 state directly. Remove unnecessary NULL-thread check.
6589
3c3ae77e
PA
65902017-05-04 Pedro Alves <palves@redhat.com>
6591
6592 * corelow.c (thread_section_name): New class.
6593 (get_core_register_section, get_core_siginfo): Use it.
6594
45eba0ab
AA
65952017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6596
6597 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6598 (get_core_register_section): Remove xfree of NULL pointer.
6599
f81fdd35
AH
66002017-05-03 Alan Hayward <alan.hayward@arm.com>
6601
6602 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6603 * regcache.c (regcache::raw_supply_zeroed): New function.
6604 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6605
35837774
SM
66062017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6607
6608 * gdbarch.sh: Remove commented out definition of
6609 TARGET_CHAR_BIT.
6610 * gdbarch.h: Re-generate.
6611
c94fee56
SDJ
66122017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6613
6614 * configure: Regenerate.
6615
d17f7b36
SM
66162017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6617
6618 * solib-target.c (solib_target_relocate_section_addresses):
6619 Remove num_section_bases, num_bases, segment_bases variables.
6620
b560ebd6
SM
66212017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6622
6623 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6624
f2f46dfc
SM
66252017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6626
6627 * solib-target.c: Include <vector>
6628 (struct lm_info_target) <~lm_info_target>: Remove.
6629 <segment_bases, section_bases>: Change type to
6630 std::vector<CORE_ADDR>.
6631 (library_list_start_segment, library_list_start_section,
6632 library_list_end_library,
6633 solib_target_relocate_section_addresses): Adjust.
6634
a0ff9e1a
SM
66352017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6636
6637 * gdbarch.sh (software_single_step): Change return type to
6638 std::vector<CORE_ADDR>.
6639 * gdbarch.c, gdbarch.h: Re-generate.
6640 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6641 Adjust.
6642 (arm_deal_with_atomic_sequence_raw): Adjust.
6643 (thumb_get_next_pcs_raw): Adjust.
6644 (arm_get_next_pcs_raw): Adjust.
6645 (arm_get_next_pcs): Adjust.
6646 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6647 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6648 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6649 (alpha_software_single_step): Adjust.
6650 * alpha-tdep.h (alpha_software_single_step): Adjust.
6651 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6652 * arm-tdep.c (arm_software_single_step): Adjust.
6653 (arm_breakpoint_kind_from_current_state): Adjust.
6654 * arm-tdep.h (arm_software_single_step): Adjust.
6655 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6656 * cris-tdep.c (cris_software_single_step): Adjust.
6657 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6658 (micromips_deal_with_atomic_sequence): Adjust.
6659 (deal_with_atomic_sequence): Adjust.
6660 (mips_software_single_step): Adjust.
6661 * mips-tdep.h (mips_software_single_step): Adjust.
6662 * moxie-tdep.c (moxie_software_single_step): Adjust.
6663 * nios2-tdep.c (nios2_software_single_step): Adjust.
6664 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6665 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6666 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6667 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6668 * sparc-tdep.c (sparc_software_single_step): Adjust.
6669 * spu-tdep.c (spu_software_single_step): Adjust.
6670 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6671
ea480a30
SM
66722017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6673
6674 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6675 * gdbarch.h: Re-generate.
6676
d050f7d7
TW
66772017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6678
6679 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6680 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6681 * python/py-instruction.c, python/py-instruction.h: New file.
6682 * python/py-record.c: Add py-instruction.h include.
6683 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6684 gdb.RecordInstruction.
6685 * python/python-internal.h: Add gdbpy_initialize_instruction
6686 declaration.
6687 * python/python.c (do_start_initialization): Add
6688 gdbpy_initialize_instruction.
6689
14f819c8
TW
66902017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6691
6692 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6693 Remove.
6694 (btrace_func_from_recpy_func): New function.
6695 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6696 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6697 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6698 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6699 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6700 Also, use new helper functions.
6701 (btpy_list_item): Use new helper functions.
6702 (recpy_bt_function_call_history): Use new type name.
6703 (btpy_call_getset): Remove.
6704 (gdbpy_initialize_btrace): Remove code to initialize
6705 gdb.BtraceFunctionCall.
6706 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6707 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6708 recpy_bt_func_prev, recpy_bt_func_next): New export.
6709 * python/py-record.c (recpy_func_type): New static object.
6710 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6711 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6712 recpy_func_next): New function.
6713 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6714 (recpy_func_getset): New static object.
6715 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6716 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6717
0ed5da75
TW
67182017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6719
6720 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6721 (btpy_object, btpy_insn_type, btpy_new): Remove.
6722 (btpy_list_object): Use gdb.RecordInstruction type instead of
6723 gdb.BtraceInstruction type.
6724 (btrace_insn_from_recpy_insn): New function.
6725 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6726 btpy_new.
6727 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6728 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6729 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6730 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6731 instead of btpy_object.
6732 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6733 btpy_insn_data, btpy_insn_decode): Rename to ...
6734 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6735 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6736 recpy_bt_insn_decode): This. Also, use new helper functions.
6737 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6738 recpy_insn_type.
6739 (btpy_insn_getset): Remove.
6740 (gdbpy_initialize_btrace): Remove code to initialize
6741 gdb.BtraceInstruction. Use recpy_element_object.
6742 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6743 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6744 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6745 * python/py-record.c (recpy_insn_type): New static object.
6746 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6747 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6748 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6749 New function.
6750 (recpy_insn_getset): New static object.
6751 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6752 * python/py-record.h (recpy_element_object): New typedef.
6753 (recpy_insn_type, recpy_insn_new): New export.
6754
913aeadd
TW
67552017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6756
6757 * py-record-btrace.c (btpy_insn_new): Removed.
6758 (btpy_insn_or_gap_new): New function.
6759 (btpy_insn_error): Removed.
6760 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6761 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6762 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6763 btpy_insn_or_gap_new instead of btpy_insn_new.
6764 (btpy_insn_getset): Remove btpy_insn_error.
6765 * py-record.c (recpy_gap_type): New static object.
6766 (recpy_gap_object): New typedef.
6767 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6768 recpy_gap_reason_string): New function.
6769 (recpy_gap_getset): New static object.
6770 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6771 * py-record.h (recpy_gap_new): New export.
6772
a3be24ad
TW
67732017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6774
6775 * python/py-record.c (recpy_ptid): Remove.
6776 (recpy_record_getset): Remove recpy_ptid.
6777
ae20e79a
TW
67782017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6779
6780 * btrace.c (btrace_fetch): Set inferior_ptid.
6781 * python/py-record-btrace.c: Add "py-record.h" include.
6782 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6783 recpy_bt_end, recpy_bt_instruction_history,
6784 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6785 in gdb.Record object instead of current ptid.
6786 * python/py-record.c: Include new "py-record.h" file.
6787 (recpy_record_object): Moved to py-record.h.
6788 * python/py-record.h: New file.
6789
8d0050ea
TW
67902017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6791
6792 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6793 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6794 indentation.
6795
3f380b50
JB
67962017-05-01 Joel Brobecker <brobecker@adacore.com>
6797
6798 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6799 the past maintainers section.
6800
07495424
YQ
68012017-04-28 Yao Qi <yao.qi@linaro.org>
6802
6803 * infcmd.c (get_return_value): Use regcache ctor, and remove
6804 cleanup.
6805
deb1fa3e
YQ
68062017-04-28 Yao Qi <yao.qi@linaro.org>
6807 Pedro Alves <palves@redhat.com>
6808
6809 * regcache.c (regcache::regcache): New tag dispatch ctor.
6810 (do_cooked_read): Moved above.
6811 (regcache_dup): Use the tag dispatch ctor..
6812 * regcache.h (regcache): Declare ctor, delete copy ctor and
6813 assignment operator, remove friend regcache_dup.
6814
b421c83c
YQ
68152017-04-28 Yao Qi <yao.qi@linaro.org>
6816
6817 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6818 call method save instead of regcache_cpy.
6819 * regcache.h (struct regcache): Make regcache_dup a friend.
6820
ef79d9a3
YQ
68212017-04-28 Yao Qi <yao.qi@linaro.org>
6822
6823 * regcache.c (struct regcache): Move to regcache.h
6824 (regcache::arch): New method.
6825 (regcache_get_ptid): Update.
6826 (get_regcache_arch): Call arch method.
6827 (get_regcache_aspace): Call method aspace.
6828 (register_buffer): Change it to method.
6829 (regcache_save): Change it to regcache::save.
6830 (regcache_restore): Likewise.
6831 (regcache_cpy_no_passthrough): Remove the declaration.
6832 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6833 (regcache_cpy_no_passthrough): Change it to method
6834 cpy_no_passthrough.
6835 (regcache_register_status): Change it to method
6836 get_register_status.
6837 (regcache_invalidate): Change it to method invalidate.
6838 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6839 (regcache_raw_update): Change it to method raw_update.
6840 (regcache_raw_read): Likewise.
6841 (regcache_raw_read_signed): Likewise.
6842 (regcache_raw_read_unsigned): Likewise.
6843 (regcache_raw_write_signed): Likewise.
6844 (regcache_raw_write_unsigned): Likewise.
6845 (regcache_cooked_read): Likewise.
6846 (regcache_cooked_read_value): Likewise.
6847 (regcache_cooked_read_signed): Likewise.
6848 (regcache_cooked_read_unsigned): Likewise.
6849 (regcache_cooked_write_signed): Likewise.
6850 (regcache_cooked_write_unsigned): Likewise.
6851 (regcache_raw_set_cached_value): Likewise.
6852 (regcache_raw_write): Likewise.
6853 (regcache_cooked_write): Likewise.
6854 (regcache_xfer_part): Likewise.
6855 (regcache_raw_read_part): Likewise.
6856 (regcache_raw_write_part): Likewise.
6857 (regcache_cooked_read_part): Likewise.
6858 (regcache_cooked_write_part): Likewise.
6859 (regcache_raw_supply): Likewise.
6860 (regcache_raw_collect): Likewise.
6861 (regcache_transfer_regset): Likewise.
6862 (regcache_supply_regset): Likewise.
6863 (regcache_collect_regset): Likewise.
6864 (regcache_debug_print_register): Likewise.
6865 (enum regcache_dump_what): Move it to regcache.h.
6866 (regcache_dump): Change it to method dump.
6867 * regcache.h (enum regcache_dump_what): New.
6868 (class regcache): New.
6869 * target.c (target_fetch_registers): Call method
6870 debug_print_register.
6871 (target_store_registers): Likewise.
6872
f8fdb78e
SM
68732017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6874
6875 * windows-nat.c (struct lm_info_windows): Initialize field.
6876 (windows_make_so): Allocate lm_info_windows with new.
6877 (windows_free_so): Free lm_info_windows with delete.
6878
9ccbfd7b
SM
68792017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6880
6881 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6882 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6883 cleanup.
6884 (darwin_free_so): Free lm_info_darwin with delete.
6885
76e75227
SM
68862017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6887
6888 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6889 <l_addr_p>: Change type to bool.
6890 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6891 (svr4_free_so): Free lm_info_svr4 with delete.
6892 (svr4_copy_library_list): Replace memcpy with call to copy
6893 constructor.
6894 (library_list_start_library, svr4_default_sos): Allocate
6895 lm_info_svr4 with new.
6896
51046d9e
SM
68972017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6898
6899 * solib-target.c (struct lm_info_target): Add destructor,
6900 initialize fields.
6901 <name>: Change type to std::string.
6902 (library_list_start_library): Allocate lm_info_target with new.
6903 (solib_target_free_library_list): Free lm_info_target with
6904 delete.
6905 (solib_target_current_sos): Adapt to std::string.
6906 (solib_target_free_so): Free lm_info_target with delete.
6907
4023ae76
SM
69082017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6909
6910 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6911 fields.
6912 (frv_current_sos): Allocate lm_info_frv with new.
6913 (frv_relocate_main_executable): Free lm_info_frv with delete,
6914 allocate with new.
6915 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6916
af43057b
SM
69172017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6918
6919 * solib-frv.c (struct lm_info_frv): Fix indentation.
6920
b0911207
SM
69212017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6922
6923 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6924 map field.
6925 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6926 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6927 and allocate with new.
6928 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6929
6c401f72
SM
69302017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6931
6932 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6933 <filename, member_name>: Change type to std::string.
6934 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6935 (library_list_start_library): Allocate lm_info_aix with new.
6936 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6937 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6938 with copy constructor.
6939
d0e449a1
SM
69402017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6941
6942 * solist.h (struct lm_info): Remove.
6943 (struct lm_info_base): New class.
6944 (struct so_list) <lm_info>: Change type to lm_info_base *.
6945 * nto-tdep.c (struct lm_info): Remove.
6946 (lm_addr): Adjust.
6947 * solib-aix.c (struct lm_info): Rename to ...
6948 (struct lm_info_aix): ... this. Extend lm_info_base.
6949 (lm_info_p): Rename to ...
6950 (lm_info_aix_p): ... this, and adjust.
6951 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6952 solib_aix_parse_libraries, library_list_start_library,
6953 solib_aix_free_library_list, solib_aix_parse_libraries,
6954 solib_aix_get_library_list,
6955 solib_aix_relocate_section_addresses, solib_aix_free_so,
6956 solib_aix_get_section_offsets,
6957 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6958 Adjust.
6959 (struct solib_aix_inferior_data) <library_list>: Adjust.
6960 * solib-darwin.c (struct lm_info): Rename to ...
6961 (struct lm_info_darwin): ... this. Extend lm_info_base.
6962 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6963 * solib-dsbt.c (struct lm_info): Rename to ...
6964 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6965 (struct dsbt_info) <main_executable_lm_info): Adjust.
6966 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6967 dsbt_relocate_section_addresses): Adjust.
6968 * solib-frv.c (struct lm_info): Rename to ...
6969 (struct lm_info_frv): ... this. Extend lm_info_base.
6970 (main_executable_lm_info): Adjust.
6971 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6972 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6973 find_canonical_descriptor_in_load_object,
6974 frv_fdpic_find_canonical_descriptor): Adjust.
6975 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6976 to lm_info_svr4.
6977 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6978 svr4_clear_so, svr4_copy_library_list,
6979 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6980 svr4_current_sos, svr4_fetch_objfile_link_map,
6981 solist_update_incremental): Adjust.
6982 * solib-svr4.h (struct lm_info_svr4): Move here from
6983 solib-svr4.c.
6984 * solib-target.c (struct lm_info): Rename to ...
6985 (struct lm_info_target): ... this. Extend lm_info_base.
6986 (lm_info_p): Rename to ...
6987 (lm_info_target_p): ... this.
6988 (solib_target_parse_libraries, library_list_start_segment,
6989 library_list_start_section, library_list_start_library,
6990 library_list_end_library, solib_target_free_library_list,
6991 solib_target_current_sos, solib_target_free_so,
6992 solib_target_relocate_section_addresses): Adjust.
6993 * windows-nat.c (struct lm_info): Rename to ...
6994 (struct lm_info_windows): ... this. Extend lm_info_base.
6995 (windows_make_so, handle_load_dll, handle_unload_dll,
6996 windows_xfer_shared_libraries): Adjust.
6997
434a4023
SM
69982017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6999
7000 * solib-darwin.c (struct darwin_so_list): Remove.
7001 (darwin_current_sos): Allocate an so_list object instead of a
7002 darwin_so_list, separately allocate an lm_info object.
7003 (darwin_free_so): Free lm_info.
7004
428544e8
JB
70052017-04-28 John Baldwin <jhb@FreeBSD.org>
7006
7007 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7008 with fprintf_filtered.
7009
4621115f
YQ
70102017-04-28 Yao Qi <yao.qi@linaro.org>
7011
7012 * regcache.c (regcache::regcache): New function.
7013 (regcache::~regcache): New function.
7014 (regcache_xmalloc_1): Remove.
7015 (regcache_xmalloc): Call new regcache.
7016 (regcache_xfree): Call delete regcache.
7017 (get_thread_arch_aspace_regcache): Call new regcache.
7018
339053c2
YQ
70192017-04-28 Yao Qi <yao.qi@linaro.org>
7020
7021 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7022 lwp instead of ptid_get_lwp.
7023
7974a605
YQ
70242017-04-28 Yao Qi <yao.qi@linaro.org>
7025
7026 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7027 lwp_info instead of getting from inferior_ptid.
7028
e15c3eb4
KS
70292017-04-27 Keith Seitz <keiths@redhat.com>
7030
7031 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7032 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7033 (CV_CONVERSION_BADNESS): Define.
7034 (rank_one_type): Remove overly restrictive rvalue reference
7035 rank checks.
7036 Add cv-qualifier checks and subranks for type equality.
7037 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7038 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7039 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7040
72bc1d24
SM
70412017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7042
7043 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7044 count when creating the object.
7045
55bcecda
UW
70462017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7047 Ulrich Weigand <uweigand@de.ibm.com>
7048
7049 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7050 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7051 is used in AIX.
7052 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7053 (process_xcoff_symbol): Likewise.
7054 (scan_xcoff_symtab): Likewise.
7055
5c99fcf8
AH
70562017-04-26 Alan Hayward <alan.hayward@arm.com>
7057
7058 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7059 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7060 (ia64_access_reg): Use get_frame_register_unsigned.
7061 (ia64_access_rse_reg): Likewise.
7062 (ia64_libunwind_frame_prev_register): Likewise.
7063
b41c5a85
JW
70642017-04-26 Jiong Wang <jiong.wang@arm.com>
7065
7066 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7067 * gdbarch.c: Regenerated.
7068 * gdbarch.h: Regenerated.
7069 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7070 visibility external.
7071 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7072 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7073 (enum cfa_how_kind): Move to ...
7074 (struct dwarf2_frame_state_reg_info): Likewise.
7075 (struct dwarf2_frame_state): Likewise.
7076 * dwarf2-frame.h: ... here.
7077 (dwarf2_frame_state_alloc_regs): New declaration.
7078 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7079 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7080
c185f580
AH
70812017-04-26 Alan Hayward <alan.hayward@arm.com>
7082
7083 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7084 regcache_raw_read_unsigned.
7085 (xtensa_pseudo_register_write): Likewise.
7086
19c45594
AH
70872017-04-26 Alan Hayward <alan.hayward@arm.com>
7088
7089 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7090 (nds32_pseudo_register_write): Likewise.
7091
4658f12e
YQ
70922017-04-25 Yao Qi <yao.qi@linaro.org>
7093
7094 * regcache.c (struct regcache) <readonly_p>: Change its type
7095 to bool.
7096 (regcache_xmalloc_1): Update parameter type and callers update.
7097
d581dda8
YQ
70982017-04-25 Yao Qi <yao.qi@linaro.org>
7099
7100 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7101 set_gdbarch_wchar_bit.
7102 * arm-tdep.c (arm_gdbarch_init): Likewise.
7103
debed3db
PA
71042017-04-25 Pedro Alves <palves@redhat.com>
7105
7106 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7107 (BothAreRelocatable, memcopy, memmove): Don't define.
7108 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7109 macros.
7110
b0b92aeb
PA
71112017-04-25 Pedro Alves <palves@redhat.com>
7112
7113 * common/common-defs.h: Include "common/poison.h".
7114 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7115 and adjust.
7116 * common/poison.h: New file.
7117 * common/traits.h: Include <type_traits>.
7118 (Not, Or, Requires): New, moved from common/function-view.h.
7119
16c4d54a
PA
71202017-04-25 Pedro Alves <palves@redhat.com>
7121
7122 * breakpoint.h (struct breakpoint): In-class initialize all
7123 fields. Make boolean fields "bool".
7124 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7125 memset call and initializations no longer necessary.
7126
b5c36682
PA
71272017-04-25 Pedro Alves <palves@redhat.com>
7128
7129 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7130 reference.
7131 (pt_btrace_insn): New function.
7132 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7133
5625a286
PA
71342017-04-25 Pedro Alves <palves@redhat.com>
7135
7136 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7137 "base" field and inherit from "bp_location" instead. Add
7138 non-default ctor.
7139 (allocate_location_exception): Use new non-default ctor.
7140 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7141 (init_bp_location): Convert to ...
7142 (bp_location::bp_location): ... this new ctor, and remove memset
7143 call.
7144 (base_breakpoint_allocate_location): Use the new non-default ctor.
7145 * breakpoint.h (bp_location): Now a class. Declare default and
7146 non-default ctors. In-class initialize all members.
7147 (init_bp_location): Remove declaration.
7148
23bcc18f
PA
71492017-04-25 Pedro Alves <palves@redhat.com>
7150
7151 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7152 assignment operator.
7153
e1ba3053
YQ
71542017-04-24 Yao Qi <yao.qi@linaro.org>
7155
7156 * doublest.c (convert_doublest_to_floatformat): Call
7157 floatformat_totalsize_bytes.
7158
10f489e5
TT
71592017-04-22 Tom Tromey <tom@tromey.com>
7160
7161 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7162 ui_out_emit_list.
7163 * stack.c (print_frame): Use ui_out_emit_list.
7164 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7165 ui_out_emit_list.
7166 * mi/mi-main.c (print_one_inferior)
7167 (mi_cmd_data_list_register_names)
7168 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7169 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7170 ui_out_emit_list.
7171 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7172 (mi_output_solib_attribs): Use ui_out_emit_list,
7173 ui_out_emit_tuple.
7174 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7175 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7176 (mi_cmd_stack_list_args, list_args_or_locals): Use
7177 ui_out_emit_list.
7178 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7179 * breakpoint.c (print_solib_event, output_thread_groups): Use
7180 ui_out_emit_list.
7181
0092b74d
TT
71822017-04-22 Tom Tromey <tom@tromey.com>
7183
7184 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7185 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7186 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7187
a14a62dd
TT
71882017-04-22 Tom Tromey <tom@tromey.com>
7189
7190 * tracepoint.c (tvariables_info_1)
7191 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7192
46b9c129
TT
71932017-04-22 Tom Tromey <tom@tromey.com>
7194
7195 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7196 annotate_arg_emitter.
7197 * breakpoint.c (print_mention_watchpoint)
7198 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7199 * annotate.h (struct annotate_arg_emitter): New.
7200
2e783024
TT
72012017-04-22 Tom Tromey <tom@tromey.com>
7202
7203 * record-btrace.c (record_btrace_insn_history)
7204 (record_btrace_insn_history_range, record_btrace_call_history)
7205 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7206 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7207 ui_out_emit_tuple.
7208 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7209 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7210 * skip.c (skip_info): Use ui_out_emit_tuple.
7211 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7212 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7213 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7214 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7215 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7216 ui_out_emit_tuple.
7217 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7218 (output_register, mi_cmd_data_read_memory)
7219 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7220 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7221 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7222 Use ui_out_emit_tuple.
7223 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7224 ui_out_emit_tuple.
7225 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7226 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7227 * linux-thread-db.c (info_auto_load_libthread_db): Use
7228 ui_out_emit_tuple.
7229 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7230 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7231 * disasm.c (do_mixed_source_and_assembly_deprecated)
7232 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7233 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7234 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7235 * breakpoint.c (print_one_breakpoint_location)
7236 (print_one_breakpoint): Use ui_out_emit_tuple.
7237 * auto-load.c (print_script, info_auto_load_cmd): Use
7238 ui_out_emit_tuple.
7239 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7240
9be21bb4
SM
72412017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7242
7243 * thread.c (print_thread_info_1): Remove dead code.
7244
0d4c07af
JK
72452017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7246
7247 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7248 GDB_SELF_TEST.
7249 * arm-tdep.c (selftests::arm_record_test): Likewise.
7250
4daf993d
YQ
72512017-04-21 Yao Qi <yao.qi@linaro.org>
7252
7253 * regcache.c (regcache_restore): Remove argument 2. Replace
7254 argument 3 with regcache. Get register status from
7255 src->register_status and get register contents from
7256 register_buffer (src, regnum).
7257 (regcache_cpy): Update.
7258
a6c21d4a
PA
72592017-04-19 Pedro Alves <palves@redhat.com>
7260
7261 * gdbthread.h (thread): Add missing closing parenthesis in
7262 comment.
7263
3a3fd0fd
PA
72642017-04-19 Pedro Alves <palves@redhat.com>
7265
7266 * common/refcounted-object.h: New file.
7267 * gdbthread.h: Include "common/refcounted-object.h".
7268 (thread_info): Inherit from refcounted_object and add comments.
7269 (thread_info::incref, thread_info::decref)
7270 (thread_info::m_refcount): Delete.
7271 (thread_info::deletable): Use the refcounted_object::refcount()
7272 method.
7273 * inferior.c (current_inferior_): Add comment.
7274 (set_current_inferior): Increment/decrement refcounts.
7275 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7276 not-deletable instead of comparing with the current inferior.
7277 (initialize_inferiors): Increment the initial inferior's refcount.
7278 * inferior.h (struct inferior): Forward declare.
7279 Include "common/refcounted-object.h".
7280 (current_inferior, set_current_inferior): Move declaration to
7281 before struct inferior's definition, and fix comment.
7282 (inferior): Inherit from refcounted_object. Add comments.
7283 * thread.c (switch_to_thread_no_regs): Reference the thread's
7284 inferior pointer directly instead of doing a ptid lookup.
7285 (switch_to_no_thread): New function.
7286 (switch_to_thread(thread_info *)): New function, factored out
7287 from ...
7288 (switch_to_thread(ptid_t)): ... this.
7289 (restore_current_thread): Delete.
7290 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7291 fields, and add 'inf' field.
7292 (do_restore_current_thread_cleanup): Check whether old->inf is
7293 alive instead of looking up an inferior by ptid. Use
7294 switch_to_thread and switch_to_no_thread.
7295 (restore_current_thread_cleanup_dtor): Use old->inf directly
7296 instead of lookup up an inferior by id. Decref the inferior.
7297 Don't restore 'removable'.
7298 (make_cleanup_restore_current_thread): Same the inferior pointer
7299 in old, instead of the inferior number. Incref the inferior.
7300 Don't save/clear 'removable'.
7301
9bcb1f16
PA
73022017-04-19 Pedro Alves <palves@redhat.com>
7303
7304 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7305 unittests/scoped_restore-selftests.c.
7306 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7307 * common/scoped_restore.h (scoped_restore_base): Make "class".
7308 (scoped_restore_base::release): New public method.
7309 (scoped_restore_base::scoped_restore_base): New protected ctor.
7310 (scoped_restore_base::m_saved_var): New protected field.
7311 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7312 scoped_restore_base base class instead of m_saved_var directly.
7313 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7314 (scoped_restore_tmpl::scoped_restore_tmpl(const
7315 scoped_restore_tmpl<T>&)): Likewise.
7316 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7317 method.
7318 (scoped_restore_tmpl::saved_var): New method.
7319 (scoped_restore_tmpl::m_saved_var): Delete.
7320 * inferior.h (inferior::detaching): Now a bool.
7321 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7322 cleanup.
7323 * unittests/scoped_restore-selftests.c: New file.
7324
26fcd539
PA
73252017-04-19 Pedro Alves <palves@redhat.com>
7326
7327 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7328 Re-sort in alphabetic order.
7329
fdd243b0
PA
73302017-04-18 Pedro Alves <palves@redhat.com>
7331
7332 * xml-support.c (obstack_xml_printf): Delete.
7333 * xml-support.h (obstack_xml_printf): Delete.
7334
4895cde2
PA
73352017-04-18 Pedro Alves <palves@redhat.com>
7336
7337 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7338 vdebug, verror, body_text, start_element, end_element, name,
7339 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7340 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7341 is_xinclude>: Make private and add m_ prefix.
7342 (gdb_xml_parser::body_text): New method, based on ...
7343 (gdb_xml_body_text): ... this. Adjust.
7344 (gdb_xml_parser::vdebug): New method, based on ...
7345 (gdb_xml_debug): ... this. Adjust.
7346 (gdb_xml_parser::verror): New method, based on ...
7347 (gdb_xml_error): ... this. Adjust.
7348 (gdb_xml_parser::start_element): New method, based on ...
7349 (gdb_xml_start_element): ... this. Adjust.
7350 (gdb_xml_start_element_wrapper): Defer to
7351 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7352 (gdb_xml_parser::end_element): New method, based on ...
7353 (gdb_xml_end_element_wrapper): ... this. Adjust.
7354 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7355 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7356 (gdb_xml_parser::use_dtd): New method, based on ...
7357 (gdb_xml_use_dtd): ... this. Adjust.
7358 (gdb_xml_parser::parse): New method, based on ...
7359 (gdb_xml_parse): ... this. Adjust.
7360 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7361 (xinclude_start_include): Adjust to call the parser's name method.
7362 (xml_xinclude_default, xml_xinclude_start_doctype)
7363 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7364 method.
7365 (xml_process_xincludes): Adjust to call parser methods.
7366 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7367 declarations.
7368
bd8a901f
PA
73692017-04-18 Pedro Alves <palves@redhat.com>
7370
7371 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7372 gdb::optional<std::string>.
7373 * xml-support.c: Include <string>.
7374 (scope_level::scope_level(scope_level &&))
7375 (scope_level::~scope_level): Delete.
7376 (scope_level::body): Now a std::string.
7377 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7378 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7379 parameter.
7380 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7381 (xinclude_parsing_data::output): Now a std::string reference.
7382 (xinclude_start_include): Adjust.
7383 (xml_xinclude_default): Adjust.
7384 (xml_process_xincludes): Add 'output' parameter, and return bool.
7385 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7386 and return bool.
7387 * xml-tdesc.c: Include <unordered_map> and <string>.
7388 (tdesc_xml_cache): Delete.
7389 (tdesc_xml_cache_s): Delete.
7390 (xml_cache): Now an std::unordered_map.
7391 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7392 (target_fetch_description_xml): Change return type to
7393 gdb::optional<std::string>, and adjust.
7394 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7395 (target_fetch_description_xml): Change return type to
7396 gdb::optional<std::string>.
7397
d35d1958
PA
73982017-04-18 Pedro Alves <palves@redhat.com>
7399
7400 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7401 unittests/optional-selftests.c.
7402 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7403 * unittests/optional-selftests.c: New file.
7404 * unittests/optional/assignment/1.cc: New file.
7405 * unittests/optional/assignment/2.cc: New file.
7406 * unittests/optional/assignment/3.cc: New file.
7407 * unittests/optional/assignment/4.cc: New file.
7408 * unittests/optional/assignment/5.cc: New file.
7409 * unittests/optional/assignment/6.cc: New file.
7410 * unittests/optional/assignment/7.cc: New file.
7411 * unittests/optional/cons/copy.cc: New file.
7412 * unittests/optional/cons/default.cc: New file.
7413 * unittests/optional/cons/move.cc: New file.
7414 * unittests/optional/cons/value.cc: New file.
7415 * unittests/optional/in_place.cc: New file.
7416 * unittests/optional/observers/1.cc: New file.
7417 * unittests/optional/observers/2.cc: New file.
7418
22796e97
PA
74192017-04-18 Pedro Alves <palves@redhat.com>
7420
7421 * common/gdb_optional.h: Include common/traits.h.
7422 (in_place_t): New type.
7423 (in_place): New constexpr variable.
7424 (optional::optional): Remove member initialization of
7425 m_instantiated.
7426 (optional::optional(in_place_t...)): New constructor.
7427 (optional::~optional): Use reset.
7428 (optional::optional(const optional&)): New.
7429 (optional::optional(const optional&&)): New.
7430 (optional::optional(T &)): New.
7431 (optional::optional(T &&)): New.
7432 (operator::operator=(const optional &)): New.
7433 (operator::operator=(optional &&)): New.
7434 (operator::operator= (const T &))
7435 (operator::operator= (T &&))
7436 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7437 (operator::reset): New.
7438 (operator::m_instantiated):: Add in-class initializer.
7439 * common/traits.h: Include <type_traits>.
7440 (struct And): New types.
7441
a7fc9b61
PA
74422017-04-18 Pedro Alves <palves@redhat.com>
7443
7444 * xml-support.c: Include <vector>.
7445 (scope_level::scope_level(const gdb_xml_element *))
7446 (scope_level::scope_level(scope_level&&)): New.
7447 (scope_level::~scope_level): New.
7448 (scope_level_s): Delete.
7449 (gdb_xml_parser::scopes): Now a std::vector.
7450 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7451 Use std::vector.
7452 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7453 scope cleanup code.
7454 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7455 of the scopes member. Use std::vector::emplace_back.
7456
010151c9
PA
74572017-04-18 Pedro Alves <palves@redhat.com>
7458
7459 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7460 a bool.
7461 (gdb_xml_end_element): Change type of first parameter.
7462 (gdb_xml_cleanup): Rename to ...
7463 (gdb_xml_parser::~gdb_xml_parser): ... this.
7464 (gdb_xml_create_parser_and_cleanup): Delete with ...
7465 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7466 to this new ctor.
7467 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7468 using gdb_xml_create_parser_and_cleanup.
7469 (xinclude_parsing_data): Add ctor/dtor.
7470 (xml_xinclude_cleanup): Delete.
7471 (xml_process_xincludes): Create a local xinclude_parsing_data
7472 instead of heap-allocating one. Create a local gdb_xml_parser
7473 instead of heap-allocating one with
7474 gdb_xml_create_parser_and_cleanup.
7475
d56060f0
JB
74762017-04-18 John Baldwin <jhb@FreeBSD.org>
7477
7478 PR threads/20743
7479 * fbsd-nat.c (resume_one_thread_cb): Remove.
7480 (resume_all_threads_cb): Remove.
7481 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7482 iterate_over_threads.
7483
305d16a9
JB
74842017-04-17 Joel Brobecker <brobecker@adacore.com>
7485
7486 * NEWS: Create a new section for the next release branch.
7487 Rename the section of the current branch, now that it has
7488 been cut.
7489
8bb57231
JB
74902017-04-17 Joel Brobecker <brobecker@adacore.com>
7491
7492 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7493 * version.in: Bump version to 8.0.50.DATE-git.
7494
096c92dd
SDJ
74952017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7496
7497 PR gdb/21385
7498 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7499 independently of the host, and fix build breakage on Cygwin.
7500
0550c955
PA
75012017-04-13 Pedro Alves <palves@redhat.com>
7502
7503 * inferior.c (free_inferior): Convert to ...
7504 (inferior::~inferior): ... this dtor.
7505 (inferior::inferior): New ctor, factored out from ...
7506 (add_inferior_silent): ... here. Allocate the inferior with a new
7507 expression.
7508 (delete_inferior): Call delete instead of free_inferior.
7509 * inferior.h (gdb_environ, continuation): Forward declare.
7510 (inferior): Now a class. Add in-class initialization to all
7511 members. Make boolean fields bool, except 'detaching'.
7512 (inferior::inferior): New explicit ctor.
7513 (inferior::~inferior): New.
7514
e3d60dfc
PA
75152017-04-13 Pedro Alves <palves@redhat.com>
7516
7517 * inferior.c (init_inferior_list): Delete.
7518 * inferior.h (init_inferior_list): Delete.
7519
5fd69d0a
PA
75202017-04-13 Pedro Alves <palves@redhat.com>
7521
7522 PR threads/13217
7523 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7524 (top level): Call it twice, with different thread sets.
7525
c6609450
PA
75262017-04-13 Pedro Alves <palves@redhat.com>
7527
7528 * thread.c: Include <algorithm>.
7529 (thread_array_cleanup): Delete.
7530 (scoped_inc_dec_ref): New class.
7531 (live_threads_count): New function.
7532 (set_thread_refcount): Delete.
7533 (tp_array_compar_ascending): Now a bool.
7534 (tp_array_compar): Convert to a std::sort comparison function.
7535 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7536 and live_threads_count.
7537
2a00d7ce
PA
75382017-04-13 Pedro Alves <palves@redhat.com>
7539
7540 * infrun.c (follow_fork_inferior): Also switch the current
7541 inferior.
7542
441d7c93
PA
75432017-04-13 Pedro Alves <palves@redhat.com>
7544
7545 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7546 before calling create_internal_breakpoint.
7547
808480f6
PA
75482017-04-13 Pedro Alves <palves@redhat.com>
7549
7550 * fork-child.c (execv_argv): New class.
7551 (breakup_args): Refactored as ...
7552 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7553 Copy arguments to storage and replace separators with NULL
7554 terminators in place.
7555 (escape_bang_in_quoted_argument): Adjust to return bool.
7556 (execv_argv::execv_argv): New ctor.
7557 (execv_argv::init_for_shell): New method, factored out from
7558 fork_inferior. Don't strdup strings into the vector.
7559 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7560 Remove free_vector_argv call.
7561
ad3d022a
YQ
75622017-04-13 Yao Qi <yao.qi@linaro.org>
7563
7564 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7565 tdep->rx_psw_type.
7566
e6ddc3bf
YQ
75672017-04-13 Yao Qi <yao.qi@linaro.org>
7568
7569 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7570 * rx-tdep.c (rx_gdbarch_init): Likewise.
7571
bfb8cf90
PA
75722017-04-13 Pedro Alves <palves@redhat.com>
7573
7574 * breakpoint.h (struct breakpoint): Reindent.
7575
f5336ca5
PA
75762017-04-13 Pedro Alves <palves@redhat.com>
7577
7578 * breakpoint.c (bp_location): Rename to ...
7579 (bp_locations): ... this. All references updated.
7580 (bp_location_count): Rename to ...
7581 (bp_locations_count): ... this. All references updated.
7582 (bp_location_placed_address_before_address_max): Rename to ...
7583 (bp_locations_placed_address_before_address_max): ... this. All
7584 references updated.
7585 (bp_location_shadow_len_after_address_max): Rename to ...
7586 (bp_locations_shadow_len_after_address_max): ... this. All
7587 references updated.
7588 (bp_location_compare_addrs): Rename to ...
7589 (bp_locations_compare_addrs): ... this. All references updated.
7590 (bp_location_compare):Rename to ...
7591 (bp_locations_compare): ... this. All references updated.
7592 (bp_location_target_extensions_update): Rename to ...
7593 (bp_locations_target_extensions_update): ... this. All references
7594 updated.
7595
be628ab8
SDJ
75962017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7597
7598 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7599 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7600 'sgtty.h'.
7601 * common/gdb_termios.h: New file, with parts of "terminal.h".
7602 * inflow.c: Include "gdb_termios.h".
7603 * ser-unix.c: Include "gdb_termios.h".
7604 * terminal.h: Move terminal-related defines to
7605 "common/gdb_termios.h".
7606
8e9e35b1
TT
76072017-04-12 Tom Tromey <tom@tromey.com>
7608
7609 * probe.c (parse_probes): Update.
7610 * location.h (delete_event_location): Don't declare.
7611 (event_location_deleter::operator()): Update.
7612 * location.c (event_location_deleter::operator()): Rename from
7613 delete_event_location.
7614 * linespec.h (linespec_result) <location>: Change type to
7615 event_location_up.
7616 * linespec.c (canonicalize_linespec, event_location_to_sals)
7617 (decode_objc): Update.
7618 (linespec_result): Don't call delete_event_location.
7619 * breakpoint.c (create_breakpoints_sal)
7620 (bkpt_probe_create_sals_from_location)
7621 (strace_marker_create_sals_from_location): Update.
7622
16e802b9
TT
76232017-04-12 Tom Tromey <tom@tromey.com>
7624
7625 * linespec.h (struct linespec_result): Add constructor and
7626 destructor.
7627 (init_linespec_result, destroy_linespec_result)
7628 (make_cleanup_destroy_linespec_result): Don't declare.
7629 * linespec.c (init_linespec_result): Remove.
7630 (linespec_result::~linespec_result): Rename from
7631 destroy_linespec_result. Update.
7632 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7633 Remove.
7634 * breakpoint.c (create_breakpoint, break_range_command)
7635 (decode_location_default): Update.
7636 * ax-gdb.c (agent_command_1): Update.
7637
d28cd78a
TT
76382017-04-12 Tom Tromey <tom@tromey.com>
7639
7640 * remote.c (remote_download_tracepoint): Update.
7641 * python/py-breakpoint.c (bppy_get_location): Update.
7642 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7643 (gdbscm_breakpoint_location): Update.
7644 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7645 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7646 Change type to event_location_up.
7647 * breakpoint.c (create_overlay_event_breakpoint)
7648 (create_longjmp_master_breakpoint)
7649 (create_std_terminate_master_breakpoint)
7650 (create_exception_master_breakpoint)
7651 (breakpoint_event_location_empty_p, print_breakpoint_location)
7652 (print_one_breakpoint_location, create_thread_event_breakpoint)
7653 (init_breakpoint_sal, create_breakpoint)
7654 (print_recreate_ranged_breakpoint, break_range_command)
7655 (init_ada_exception_breakpoint, say_where): Update.
7656 (base_breakpoint_dtor): Don't call delete_event_location.
7657 (bkpt_print_recreate, tracepoint_print_recreate)
7658 (dprintf_print_recreate, update_static_tracepoint)
7659 (breakpoint_re_set_default): Update.
7660
711799d5
TT
76612017-04-12 Tom Tromey <tom@tromey.com>
7662
7663 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7664 type of "to_do". Update.
7665 (compute_stack_depth): Use std::vector.
7666
52d214d3
TT
76672017-04-12 Tom Tromey <tom@tromey.com>
7668
7669 * printcmd.c (find_instruction_backward): Use std::vector.
7670
4c404b8b
TT
76712017-04-12 Tom Tromey <tom@tromey.com>
7672
7673 * symfile.c (objfilep): Remove typedef.
7674 (reread_symbols): Use a std::vector.
7675
156d9eab
TT
76762017-04-12 Tom Tromey <tom@tromey.com>
7677
7678 * mi/mi-main.c (exec_direction_forward): Remove.
7679 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7680 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7681 scoped_restore.
7682 * guile/guile.c (guile_repl_command, guile_command)
7683 (gdbscm_execute_gdb_command): Use scoped_restore.
7684 * go-exp.y (go_parse): Use scoped_restore.
7685 * d-exp.y (d_parse): Use scoped_restore.
7686 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7687 * c-exp.y (c_parse): Use scoped_restore.
7688
4d89769a
TT
76892017-04-12 Tom Tromey <tom@tromey.com>
7690
7691 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7692 (mi_parse): Update return type.
7693 (mi_parse_free): Remove.
7694 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7695 (mi_parse::~mi_parse): Rename from mi_parse_free.
7696 (mi_parse_cleanup): Remove.
7697 (mi_parse): Return a unique_ptr. Use new.
7698 * mi/mi-main.c (mi_execute_command): Update.
7699
4b217cc7
TT
77002017-04-12 Tom Tromey <tom@tromey.com>
7701
7702 * location.c (explicit_location_lex_one): Return a
7703 unique_xmalloc_ptr.
7704 (string_to_explicit_location): Update. Remove cleanups.
7705
59d3651b
TT
77062017-04-12 Tom Tromey <tom@tromey.com>
7707
7708 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7709 (compare_value_and_voffset): Change type. Update.
7710 (compute_vtable_size): Change type of "offset_vec".
7711 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7712 (gnuv3_get_typeid): Remove extraneous declaration.
7713
b24b0d6c
TT
77142017-04-12 Tom Tromey <tom@tromey.com>
7715
7716 * charset.h (wchar_iterator): Fix comment.
7717
80a3b8c5
TT
77182017-04-12 Tom Tromey <tom@tromey.com>
7719
7720 * charset.c (iconv_wrapper): New class.
7721 (cleanup_iconv): Remove.
7722 (convert_between_encodings): Use it.
7723
c83dd867
TT
77242017-04-12 Tom Tromey <tom@tromey.com>
7725
7726 * symfile.h (increment_reading_symtab): Update type.
7727 * symfile.c (decrement_reading_symtab): Remove.
7728 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7729 * psymtab.c (psymtab_to_symtab): Update.
7730 * dwarf2read.c (dw2_instantiate_symtab): Update.
7731
0e8621a0
TT
77322017-04-12 Tom Tromey <tom@tromey.com>
7733
7734 * jit.c (struct jit_reader): Declare separately. Add constructor
7735 and destructor. Change type of "handle".
7736 (loaded_jit_reader): Define separately.
7737 (jit_reader_load): Update. New "new".
7738 (jit_reader_unload_command): Use "delete".
7739 * gdb-dlfcn.h (struct dlclose_deleter): New.
7740 (gdb_dlhandle_up): New typedef.
7741 (gdb_dlopen, gdb_dlsym): Update types.
7742 (gdb_dlclose): Remove.
7743 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7744 (gdb_dlsym): Change type of "handle".
7745 (make_cleanup_dlclose): Remove.
7746 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7747 * compile/compile-c-support.c (load_libcc): Update.
7748
67d89901
TT
77492017-04-12 Tom Tromey <tom@tromey.com>
7750
7751 * symtab.h (find_pcs_for_symtab_line): Change return type.
7752 * symtab.c (find_pcs_for_symtab_line): Change return type.
7753 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7754 type of "vec". Update.
7755 (ltpy_get_pcs_for_line): Update.
7756 * linespec.c (decode_digits_ordinary): Update.
7757
93921405
TT
77582017-04-12 Tom Tromey <tom@tromey.com>
7759
7760 * tracepoint.c (actions_command): Update.
7761 * python/python.c (python_command, python_interactive_command):
7762 Update.
7763 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7764 * guile/guile.c (guile_command): Update.
7765 * defs.h (read_command_lines, read_command_lines_1): Return
7766 command_line_up.
7767 (command_lines_deleter): New struct.
7768 (command_line_up): New typedef.
7769 * compile/compile.c (compile_code_command)
7770 (compile_print_command): Update.
7771 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7772 command_line_up.
7773 (make_cleanup_free_command_lines): Remove.
7774 * cli/cli-script.c (get_command_line, read_command_lines_1)
7775 (copy_command_lines): Return command_line_up.
7776 (while_command, if_command, read_command_lines, define_command)
7777 (document_command): Update.
7778 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7779 Remove.
7780 * breakpoint.h (breakpoint_set_commands): Change type of
7781 "commands".
7782 * breakpoint.c (breakpoint_set_commands): Change type of
7783 "commands". Update.
7784 (do_map_commands_command, update_dprintf_command_list)
7785 (create_tracepoint_from_upload): Update.
7786
ffc2605c
TT
77872017-04-12 Tom Tromey <tom@tromey.com>
7788
7789 * tracepoint.c (scope_info): Update.
7790 * spu-tdep.c (spu_catch_start): Update.
7791 * python/python.c (gdbpy_decode_line): Update.
7792 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7793 * python/py-breakpoint.c (bppy_init): Update.
7794 * probe.c (parse_probes): Update.
7795 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7796 * location.h (event_location_deleter): New struct.
7797 (event_location_up): New typedef.
7798 (new_linespec_location, new_address_location, new_probe_location)
7799 (new_explicit_location, copy_event_location)
7800 (string_to_event_location, string_to_event_location_basic)
7801 (string_to_explicit_location): Update return type.
7802 (make_cleanup_delete_event_location): Remove.
7803 * location.c (new_linespec_location, new_address_location)
7804 (new_probe_location, new_explicit_location, copy_event_location):
7805 Return event_location_up.
7806 (delete_event_location_cleanup)
7807 (make_cleanup_delete_event_location): Remove.
7808 (string_to_explicit_location, string_to_event_location_basic)
7809 (string_to_event_location): Return event_location_up.
7810 * linespec.c (canonicalize_linespec, event_location_to_sals)
7811 (decode_line_with_current_source)
7812 (decode_line_with_last_displayed, decode_objc): Update.
7813 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7814 * completer.c (location_completer): Update.
7815 * cli/cli-cmds.c (edit_command, list_command): Update.
7816 * breakpoint.c (create_overlay_event_breakpoint)
7817 (create_longjmp_master_breakpoint)
7818 (create_std_terminate_master_breakpoint)
7819 (create_exception_master_breakpoint)
7820 (create_thread_event_breakpoint): Update.
7821 (init_breakpoint_sal): Update. Remove some dead code.
7822 (create_breakpoint_sal): Change type of "location". Update.
7823 (create_breakpoints_sal, create_breakpoint, break_command_1)
7824 (dprintf_command, break_range_command, until_break_command)
7825 (init_ada_exception_breakpoint)
7826 (strace_marker_create_sals_from_location)
7827 (update_static_tracepoint, trace_command, ftrace_command)
7828 (strace_command, create_tracepoint_from_upload): Update.
7829 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7830 * ax-gdb.c (agent_command_1): Update.
7831
8f10c932
PA
78322017-04-12 Pedro Alves <palves@redhat.com>
7833
7834 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7835 * configure.tgt: Handle i[34567]86-*-go32* and
7836 i[34567]86-*-msdosdjgpp*.
7837 * i386-tdep.c (i386_svr4_reg_to_regnum):
7838 Make extern.
7839 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7840 i386-go32-tdep.c.
7841 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7842 * i386-go32-tdep.c: New file.
7843 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7844 declarations.
7845
0a31ccfb
SM
78462017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7847
7848 * aix-thread.c (pd_status2str): Change return type to const char *.
7849
e9bb3fbb
PA
78502017-04-12 Pedro Alves <palves@redhat.com>
7851
7852 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7853 calls to set_gdbarch_gnu_triplet_regexp.
7854
53375380
PA
78552017-04-12 Pedro Alves <palves@redhat.com>
7856
7857 PR gdb/21323
7858 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7859 New enum value.
7860 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7861 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7862 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7863 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7864 * gdbarch.h, gdbarch.c: Regenerate.
7865 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7866 gdbarch_wchar_bit and gdbarch_wchar_signed.
7867 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7868 * arm-tdep.c (arm_gdbarch_init): Likewise.
7869 * avr-tdep.c (avr_gdbarch_init): Likewise.
7870 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7871 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7872 * i386-tdep.c (i386_go32_init_abi): Likewise.
7873 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7874 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7875 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7876 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7877 * sh-tdep.c (sh_gdbarch_init): Likewise.
7878 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7879 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7880 * windows-tdep.c (windows_init_abi): Likewise.
7881 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7882
53e710ac
PA
78832017-04-12 Pedro Alves <palves@redhat.com>
7884
7885 PR c++/21323
7886 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7887 cplus_primitive_type_char32_t>: New enum values.
7888 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7889 and cplus_primitive_type_char32_t.
7890 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7891 32, use the archtecture's built-in type for char16_t and char32_t,
7892 respectively. Otherwise, fallback to init_integer_type as before,
7893 but make the type unsigned, and issue a complaint.
7894 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7895
ab0538b8
AH
78962017-04-12 Alan Hayward <alan.hayward@arm.com>
7897
5e0e0422 7898 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
7899 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7900
5430098f
SDJ
79012017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7902
7903 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7904 'const char *'.
7905
7c5ded6a
SDJ
79062017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7907
7908 * common/common-utils.c (free_vector_argv): New function.
7909 * common/common-utils.h: Include <vector>.
7910 (free_vector_argv): New prototype.
7911 * darwin-nat.c (darwin_create_inferior): Rewrite function
7912 prototype in order to constify "exec_file" and accept a
7913 "std::string" for "allargs".
7914 * fork-child.c: Include <vector>.
7915 (breakup_args): Rewrite function, using C++.
7916 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7917 and accept "std::string" for "allargs". Update the code to
7918 calculate "argv" based on "allargs". Update calls to "exec_fun"
7919 and "execvp".
7920 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7921 order to constify "exec_file" and accept a "std::string" for
7922 "allargs".
7923 * go32-nat.c (go32_create_inferior): Likewise.
7924 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7925 * infcmd.c (run_command_1): Constify "exec_file". Use
7926 "std::string" for inferior arguments.
7927 * inferior.h (fork_inferior): Update prototype.
7928 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7929 prototype in order to constify "exec_file" and accept a
7930 "std::string" for "allargs".
7931 * nto-procfs.c (procfs_create_inferior): Likewise.
7932 * procfs.c (procfs_create_inferior): Likewise.
7933 * remote-sim.c (gdbsim_create_inferior): Likewise.
7934 * remote.c (extended_remote_run): Update code to accept
7935 "std::string" as argument.
7936 (extended_remote_create_inferior): Rewrite function prototype in
7937 order to constify "exec_file" and accept a "std::string" for
7938 "allargs".
7939 * rs6000-nat.c (super_create_inferior): Likewise.
7940 (rs6000_create_inferior): Likewise.
7941 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7942 * windows-nat.c (windows_create_inferior): Likewise.
7943
ae0eee42
PA
79442017-04-11 Pedro Alves <palves@redhat.com>
7945
7946 * thread.c: Fix whitespace throughout.
7947
a6acac06
PR
79482017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7949
7950 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7951
64403bd1
AH
79522017-04-11 Alan Hayward <alan.hayward@arm.com>
7953
7954 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7955
a5bef50f
SDJ
79562017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7957
7958 PR gdb/21364
7959 * osdata.c (info_osdata): Check if 'type' is an empty string
7960 instead of NULL.
7961
9295a5a9
PA
79622017-04-10 Pedro Alves <palves@redhat.com>
7963
7964 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7965 (ptid_to_global_thread_id, in_thread_list)
7966 (do_captured_list_thread_ids, set_resumed, set_running)
7967 (set_executing, set_stop_requested, finish_thread_state)
7968 (validate_registers_access, can_access_registers_ptid)
7969 (print_thread_info_1, switch_to_thread)
7970 (do_restore_current_thread_cleanup)
7971 (make_cleanup_restore_current_thread, thread_command)
7972 (thread_name_command): Use operator== instead of ptid_equal.
7973
996812e3
PA
79742017-04-10 Pedro Alves <palves@redhat.com>
7975
7976 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7977 (current_thread_cleanup_chain): Delete.
7978 (restore_current_thread_cleanup_dtor)
7979 (make_cleanup_restore_current_thread): Remove references to
7980 current_thread_cleanup_chain.
7981
845b344f
AH
79822017-04-10 Alan Hayward <alan.hayward@arm.com>
7983
7984 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7985 REG_UNKNOWN.
7986
803bdfe4
YQ
79872017-04-10 Yao Qi <yao.qi@linaro.org>
7988
7989 PR gdb/19942
7990 * gdbthread.h (thread_info::deletable): New method.
7991 (thread_info::incref): New method.
7992 (thread_info::decref): New method.
7993 (thread_info::refcount): Move it to private.
7994 * infrun.c (save_stop_context): Call inc_refcount.
7995 (release_stop_context_cleanup): Likewise.
7996 * thread.c (set_thread_exited): New function.
7997 (init_thread_list): Delete "tp" only it is deletable, otherwise
7998 call set_thread_exited.
7999 (delete_thread_1): Call set_thread_exited.
8000 (current_thread_cleanup) <inferior_pid>: Remove.
8001 <thread>: New field.
8002 (restore_current_thread_ptid_changed): Removed.
8003 (do_restore_current_thread_cleanup): Adjust.
8004 (restore_current_thread_cleanup_dtor): Don't call
8005 find_thread_ptid.
8006 (set_thread_refcount): Use dec_refcount.
8007 (make_cleanup_restore_current_thread): Adjust.
8008 (thread_apply_all_command): Call inc_refcount.
8009 (_initialize_thread): Don't call
8010 observer_attach_thread_ptid_changed.
8011
8c25b497
YQ
80122017-04-10 Yao Qi <yao.qi@linaro.org>
8013
8014 * thread.c (delete_thread_1): Hoist code on marking thread as
8015 exited.
8016
8473b447
SM
80172017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8018
8019 * windows-nat.c (windows_detach): Initialize ptid with
8020 minus_one_ptid.
8021
6670ec13
SM
80222017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8023
8024 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8025
ba2f91bb
AH
80262017-04-07 Alan Hayward <alan.hayward@arm.com>
8027
8028 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8029 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8030 (bfin_pseudo_register_write): Likewise
8031
436252de
SM
80322017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8033
8034 * common/ptid.h (struct ptid): Change to...
8035 (class ptid_t): ... this.
8036 <ptid_t>: New constructors.
8037 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8038 matches>: New methods.
8039 <make_null, make_minus_one>: New static methods.
8040 <pid>: Rename to...
8041 <m_pid>: ...this.
8042 <lwp>: Rename to...
8043 <m_lwp>: ...this.
8044 <tid>: Rename to...
8045 <m_tid>: ...this.
8046 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8047 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8048 as references, move comment to class ptid_t.
8049 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8050 ptid_t static methods.
8051 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8052 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8053 Take ptid arguments as references, implement using ptid_t methods.
8054 * unittests/ptid-selftests.c: New file.
8055 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8056 unittests/ptid-selftests.c.
8057 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8058
0dedf377
TP
80592017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8060
8061 * python/python.c (python_run_simple_file): Cast mode literal to
8062 non-const char pointer as expected by PyFile_FromString.
8063
4e9868d4
SM
80642017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8065
8066 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8067 minus_one_ptid and null_ptid.
8068
9bf2a700
PA
80692017-04-05 Pedro Alves <palves@redhat.com>
8070
8071 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8072 * configure: Regenerate.
8073
a121b7c1
PA
80742017-04-05 Pedro Alves <palves@redhat.com>
8075
8076 * ada-exp.y (yyerror): Constify.
8077 * ada-lang.c (bound_name, get_selections)
8078 (ada_variant_discrim_type)
8079 (ada_variant_discrim_name, ada_value_struct_elt)
8080 (ada_lookup_struct_elt_type, is_unchecked_variant)
8081 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8082 (catch_ada_exception_command_split)
8083 (catch_ada_assert_command_split, catch_assert_command)
8084 (ada_op_name): Constify.
8085 * ada-lang.h (ada_yyerror, get_selections)
8086 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8087 * arc-tdep.c (arc_print_frame_cache): Constify.
8088 * arm-tdep.c (arm_skip_stub): Constify.
8089 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8090 (gen_aggregate_elt_ref): Constify.
8091 * bcache.c (print_bcache_statistics): Constify.
8092 * bcache.h (print_bcache_statistics): Constify.
8093 * break-catch-throw.c (catch_exception_command_1):
8094 * breakpoint.c (struct ep_type_description::description):
8095 Constify.
8096 (add_solib_catchpoint): Constify.
8097 (catch_fork_command_1): Add cast.
8098 (add_catch_command): Constify.
8099 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8100 Constify.
8101 * bsd-uthread.c (bsd_uthread_state): Constify.
8102 * buildsym.c (patch_subfile_names): Constify.
8103 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8104 Constify.
8105 * c-exp.y (yyerror): Constify.
8106 (token::oper): Constify.
8107 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8108 * c-varobj.c (cplus_describe_child): Constify.
8109 * charset.c (find_charset_names): Add cast.
8110 (find_charset_names): Constify array and add const_cast.
8111 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8112 (edit_command): Constify.
8113 * cli/cli-decode.c (lookup_cmd): Constify.
8114 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8115 Constify.
8116 (struct dump_context): Constify.
8117 (add_dump_command, restore_command): Constify.
8118 * cli/cli-script.c (get_command_line): Constify.
8119 * cli/cli-script.h (get_command_line): Constify.
8120 * cli/cli-utils.c (check_for_argument): Constify.
8121 * cli/cli-utils.h (check_for_argument): Constify.
8122 * coff-pe-read.c (struct read_pe_section_data): Constify.
8123 * command.h (lookup_cmd): Constify.
8124 * common/print-utils.c (decimal2str): Constify.
8125 * completer.c (gdb_print_filename): Constify.
8126 * corefile.c (set_gnutarget): Constify.
8127 * cp-name-parser.y (yyerror): Constify.
8128 * cp-valprint.c (cp_print_class_member): Constify.
8129 * cris-tdep.c (cris_register_name, crisv32_register_name):
8130 Constify.
8131 * d-exp.y (yyerror): Constify.
8132 (struct token::oper): Constify.
8133 * d-lang.h (d_yyerror): Constify.
8134 * dbxread.c (struct header_file_location::name): Constify.
8135 (add_old_header_file, add_new_header_file, last_function_name)
8136 (dbx_next_symbol_text, add_bincl_to_list)
8137 (find_corresponding_bincl_psymtab, set_namestring)
8138 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8139 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8140 * defs.h (command_line_input, print_address_symbolic)
8141 (deprecated_readline_begin_hook): Constify.
8142 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8143 Constify.
8144 * event-top.c (handle_line_of_input): Constify and add cast.
8145 * exceptions.c (catch_errors): Constify.
8146 * exceptions.h (catch_errors): Constify.
8147 * expprint.c (print_subexp_standard, op_string, op_name)
8148 (op_name_standard, dump_raw_expression, dump_raw_expression):
8149 * expression.h (op_name, op_string, dump_raw_expression):
8150 Constify.
8151 * f-exp.y (yyerror): Constify.
8152 (struct token::oper): Constify.
8153 (struct f77_boolean_val::name): Constify.
8154 * f-lang.c (f_word_break_characters): Constify.
8155 * f-lang.h (f_yyerror): Constify.
8156 * fork-child.c (fork_inferior): Add cast.
8157 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8158 (new_variant): Constify.
8159 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8160 * gdbarch.c: Regenerate.
8161 * gdbcore.h (set_gnutarget): Constify.
8162 * go-exp.y (yyerror): Constify.
8163 (token::oper): Constify.
8164 * go-lang.h (go_yyerror): Constify.
8165 * go32-nat.c (go32_sysinfo): Constify.
8166 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8167 * guile/scm-cmd.c (cmdscm_function): Constify.
8168 * guile/scm-param.c (pascm_param_value): Constify.
8169 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8170 (h8300sx_register_name): Constify.
8171 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8172 Constify.
8173 * ia64-tdep.c (ia64_register_names): Constify.
8174 * infcmd.c (construct_inferior_arguments): Constify.
8175 (path_command, attach_post_wait): Constify.
8176 * language.c (show_range_command, show_case_command)
8177 (unk_lang_error): Constify.
8178 * language.h (language_defn::la_error)
8179 (language_defn::la_name_of_this): Constify.
8180 * linespec.c (decode_line_2): Constify.
8181 * linux-thread-db.c (thread_db_err_str): Constify.
8182 * lm32-tdep.c (lm32_register_name): Constify.
8183 * m2-exp.y (yyerror): Constify.
8184 * m2-lang.h (m2_yyerror): Constify.
8185 * m32r-tdep.c (m32r_register_names): Constify and make static.
8186 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8187 * m88k-tdep.c (m88k_register_name): Constify.
8188 * macroexp.c (appendmem): Constify.
8189 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8190 (upgrade_type, parse_external, parse_partial_symbols)
8191 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8192 (new_symbol): Constify.
8193 * memattr.c (mem_info_command): Constify.
8194 * mep-tdep.c (register_name_from_keyword): Constify.
8195 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8196 Constify.
8197 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8198 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8199 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8200 cast.
8201 (mi_execute_async_cli_command): Constify.
8202 * mips-tdep.c (mips_register_name): Constify.
8203 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8204 (am33_register_name, am33_2_register_name)
8205 * moxie-tdep.c (moxie_register_names): Constify.
8206 * nat/linux-osdata.c (osdata_type): Constify fields.
8207 * nto-tdep.c (nto_parse_redirection): Constify.
8208 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8209 (lookup_child_selector): Constify.
8210 (objc_methcall::name): Constify.
8211 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8212 (lookup_struct_typedef): Constify.
8213 * objfiles.c (pc_in_section): Constify.
8214 * objfiles.h (pc_in_section): Constify.
8215 * p-exp.y (struct token::oper): Constify.
8216 (yyerror): Constify.
8217 * p-lang.h (pascal_yyerror): Constify.
8218 * parser-defs.h (op_name_standard): Constify.
8219 (op_print::string): Constify.
8220 (exp_descriptor::op_name): Constify.
8221 * printcmd.c (print_address_symbolic): Constify.
8222 * psymtab.c (print_partial_symbols): Constify.
8223 * python/py-breakpoint.c (stop_func): Constify.
8224 (bppy_get_expression): Constify.
8225 * python/py-cmd.c (cmdpy_completer::name): Constify.
8226 (cmdpy_function): Constify.
8227 * python/py-event.c (evpy_add_attribute)
8228 (gdbpy_initialize_event_generic): Constify.
8229 * python/py-event.h (evpy_add_attribute)
8230 (gdbpy_initialize_event_generic): Constify.
8231 * python/py-evts.c (add_new_registry): Constify.
8232 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8233 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8234 * python/py-inferior.c (get_buffer): Add cast.
8235 * python/py-param.c (parm_constant::name): Constify.
8236 * python/py-unwind.c (fprint_frame_id): Constify.
8237 * python/python.c (gdbpy_parameter_value): Constify.
8238 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8239 * remote.c (memory_packet_config::name): Constify.
8240 (show_packet_config_cmd, remote_write_bytes)
8241 (remote_buffer_add_string):
8242 * reverse.c (exec_reverse_once): Constify.
8243 * rs6000-tdep.c (variant::name, variant::description): Constify.
8244 * rust-exp.y (rustyyerror): Constify.
8245 * rust-lang.c (rust_op_name): Constify.
8246 * rust-lang.h (rustyyerror): Constify.
8247 * serial.h (serial_ops::name): Constify.
8248 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8249 (sh_sh3e_register_name, sh_sh2e_register_name)
8250 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8251 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8252 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8253 (sh_sh4al_dsp_register_name): Constify.
8254 * sh64-tdep.c (sh64_register_name): Constify.
8255 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8256 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8257 * stabsread.c (patch_block_stabs, read_type_number)
8258 (ref_map::stabs, ref_add, process_reference)
8259 (symbol_reference_defined, define_symbol, define_symbol)
8260 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8261 (read_one_struct_field, read_struct_fields, read_baseclasses)
8262 (read_tilde_fields, read_struct_type, read_array_type)
8263 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8264 (read_huge_number, read_range_type, read_args, common_block_start)
8265 (find_name_end): Constify.
8266 * stabsread.h (common_block_start, define_symbol)
8267 (process_one_symbol, symbol_reference_defined, ref_add):
8268 * symfile.c (get_section_index, add_symbol_file_command):
8269 * symfile.h (get_section_index): Constify.
8270 * target-descriptions.c (tdesc_type::name): Constify.
8271 (tdesc_free_type): Add cast.
8272 * target.c (find_default_run_target):
8273 (add_deprecated_target_alias, find_default_run_target)
8274 (target_announce_detach): Constify.
8275 (do_option): Constify.
8276 * target.h (add_deprecated_target_alias): Constify.
8277 * thread.c (print_thread_info_1): Constify.
8278 * top.c (deprecated_readline_begin_hook, command_line_input):
8279 Constify.
8280 (init_main): Add casts.
8281 * top.h (handle_line_of_input): Constify.
8282 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8283 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8284 (tfind_command): Rename to ...
8285 (tfind_command_1): ... this and constify.
8286 (tfind_command): New function.
8287 (tfind_end_command, tfind_start_command): Adjust.
8288 (encode_source_string): Constify.
8289 * tracepoint.h (encode_source_string): Constify.
8290 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8291 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8292 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8293 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8294 * tui/tui-win.c (parse_scrolling_args): Constify.
8295 * tui/tui-windata.c (tui_erase_data_content): Constify.
8296 * tui/tui-windata.h (tui_erase_data_content): Constify.
8297 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8298 * tui/tui.c (tui_enable): Add cast.
8299 * utils.c (defaulted_query): Constify.
8300 (init_page_info): Add cast.
8301 (puts_debug, subset_compare): Constify.
8302 * utils.h (subset_compare): Constify.
8303 * varobj.c (varobj_format_string): Constify.
8304 * varobj.h (varobj_format_string): Constify.
8305 * vax-tdep.c (vax_register_name): Constify.
8306 * windows-nat.c (windows_detach): Constify.
8307 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8308 * xml-support.c (gdb_xml_end_element): Constify.
8309 * xml-tdesc.c (tdesc_start_reg): Constify.
8310 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8311 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8312 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8313
995816ba
PA
83142017-04-05 Pedro Alves <palves@redhat.com>
8315
8316 * proc-api.c (struct trans): Constify.
8317 (procfs_note): Constify.
8318 * proc-events.c (struct trans, syscall_table):
8319 * proc-flags.c (struct trans): Constify.
8320 * proc-utils.h (procfs_note): Constify.
8321 * proc-why.c (struct trans): Constify.
8322 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8323 (procfs_detach): Constify.
8324 * sol-thread.c (struct string_map): Constify.
8325 (td_err_string, td_state_string): Constify.
8326
3e83a920
PA
83272017-04-05 Pedro Alves <palves@redhat.com>
8328
8329 * proc-api.c (procfs_filename): Don't initialize
8330 procfs_filename.
8331 (prepare_to_trace): Assume procfs_filename is non-NULL.
8332 (_initialize_proc_api): Give procfs_filename a default value here.
8333
63160a43
PA
83342017-04-05 Pedro Alves <palves@redhat.com>
8335
8336 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8337 'cond_string' parameter.
8338 (extract_exception_regexp): Constify 'string' parameter.
8339 (catch_exception_command_1): Constify.
8340 * breakpoint.c (init_catchpoint)
8341 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8342 parameter.
8343 (ep_parse_optional_if_clause, catch_fork_command_1)
8344 (catch_exec_command_1): Constify.
8345 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8346 parameter.
8347 (ep_parse_optional_if_clause): Constify.
8348 * cli/cli-utils.c (remove_trailing_whitespace)
8349 (check_for_argument): Constify.
8350 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8351 non-const overload.
8352 (check_for_argument): Likewise.
8353
9b2eba3d
PA
83542017-04-05 Pedro Alves <palves@redhat.com>
8355
8356 * event-top.c (command_line_handler): Add cast to execute_command
8357 call.
8358 * record-btrace.c (cmd_record_btrace_bts_start)
8359 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8360 (cmd_record_btrace_start): Add cast to execute_command call.
8361 * record-full.c (record_full_goto_insn):
8362 * record.c (record_start, record_stop): Add cast to
8363 execute_command_to_string calls.
8364 (cmd_record_start): Add cast to execute_command calls.
8365
2adadf51
PA
83662017-04-05 Pedro Alves <palves@redhat.com>
8367
8368 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8369 static inline function.
8370 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8371 array and use gdb_PyArg_ParseTupleAndKeywords.
8372 * python/py-cmd.c (cmdpy_init): Likewise.
8373 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8374 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8375 (infpy_search_memory): Likewise.
8376 * python/py-objfile.c (objfpy_add_separate_debug_file)
8377 (gdbpy_lookup_objfile): Likewise.
8378 * python/py-symbol.c (gdbpy_lookup_symbol)
8379 (gdbpy_lookup_global_symbol): Likewise.
8380 * python/py-type.c (gdbpy_lookup_type): Likewise.
8381 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8382 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8383 Likewise.
8384
0d1f4ceb
PA
83852017-04-05 Pedro Alves <palves@redhat.com>
8386
8387 * python/python-internal.h (gdb_PyGetSetDef): New type.
8388 * python/py-block.c (block_object_getset)
8389 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8390 * python/py-event.c (event_object_getset)
8391 (finish_breakpoint_object_getset): Likewise.
8392 * python/py-inferior.c (inferior_object_getset): Likewise.
8393 * python/py-infthread.c (thread_object_getset): Likewise.
8394 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8395 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8396 * python/py-objfile.c (objfile_getset): Likewise.
8397 * python/py-progspace.c (pspace_getset): Likewise.
8398 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8399 Likewise.
8400 * python/py-record.c (recpy_record_getset): Likewise.
8401 * python/py-symbol.c (symbol_object_getset): Likewise.
8402 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8403 Likewise.
8404 * python/py-type.c (type_object_getset, field_object_getset):
8405 Likewise.
8406 * python/py-value.c (value_object_getset): Likewise.
8407
4d759979
PA
84082017-04-05 Pedro Alves <palves@redhat.com>
8409
8410 * python/python-internal.h (gdb_PyObject_CallMethod)
8411 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8412 New functions.
8413 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8414 (PySys_GetObject, PySys_SetPath): New macros.
8415
fdf9e36f
PA
84162017-04-05 Pedro Alves <palves@redhat.com>
8417
8418 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8419 info_osdata_command.
8420 * osdata.c (info_osdata_command): Rename to ...
8421 (info_osdata): ... this. Constify 'type' parameter, and remove
8422 the 'from_tty' parameter. Accept NULL TYPE.
8423 (info_osdata_command): New function.
8424 * osdata.h (info_osdata_command): Remove declaration.
8425 (info_osdata): New declaration.
8426
9f33b8b7
PA
84272017-04-05 Pedro Alves <palves@redhat.com>
8428
8429 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8430 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8431 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8432 parameter.
8433 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8434 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8435 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8436 parameter.
8437 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8438 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8439 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8440 (mi_cmd_file_list_exec_source_files)
8441 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8442 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8443 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8444 parameter.
8445 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8446 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8447 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8448 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8449 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8450 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8451 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8452 'command' parameter.
8453 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8454 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8455 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8456 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8457 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8458 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8459 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8460 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8461 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8462 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8463 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8464 parameter.
8465 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8466 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8467 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8468 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8469 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8470 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8471 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8472 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8473 (mi_cmd_data_list_changed_registers)
8474 (mi_cmd_data_write_register_values)
8475 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8476 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8477 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8478 (mi_cmd_list_features, mi_cmd_list_target_features)
8479 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8480 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8481 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8482 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8483 (mi_cmd_trace_frame_collected): Constify 'command'
8484 parameter.
8485 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8486 'command' parameter.
8487
67cb5b2d
PA
84882017-04-05 Pedro Alves <palves@redhat.com>
8489
8490 * ada-lang.c (ada_completer_word_break_characters): Now a const
8491 array.
8492 (ada_get_gdb_completer_word_break_characters): Constify.
8493 * completer.c (gdb_completer_command_word_break_characters)
8494 (gdb_completer_file_name_break_characters)
8495 (gdb_completer_quote_characters): Now const arrays.
8496 (get_gdb_completer_quote_characters): Constify.
8497 (set_rl_completer_word_break_characters): New function.
8498 (set_gdb_completion_word_break_characters)
8499 (complete_line_internal): Use it.
8500 * completer.h (get_gdb_completer_quote_characters): Constify.
8501 (set_rl_completer_word_break_characters): Declare.
8502 * f-lang.c (f_word_break_characters): Constify.
8503 * language.c (default_word_break_characters): Constify.
8504 * language.h (language_defn::la_word_break_characters): Constify.
8505 (default_word_break_characters): Constify.
8506 * top.c (init_main): Use set_rl_completer_word_break_characters.
8507
7a114964
PA
85082017-04-05 Pedro Alves <palves@redhat.com>
8509
8510 * aix-thread.c (aix_thread_pid_to_str)
8511 (aix_thread_extra_thread_info): Constify.
8512 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8513 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8514 (bsd_uthread_pid_to_str): Constify.
8515 * corelow.c (core_pid_to_str): Constify.
8516 * darwin-nat.c (darwin_pid_to_str): Constify.
8517 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8518 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8519 Constify.
8520 * gnu-nat.c (gnu_pid_to_str): Constify.
8521 * go32-nat.c (go32_pid_to_str): Constify.
8522 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8523 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8524 * inferior.c (inferior_pid_to_str): Constify.
8525 * linux-nat.c (linux_nat_pid_to_str): Constify.
8526 * linux-tdep.c (linux_core_pid_to_str): Constify.
8527 * linux-thread-db.c (thread_db_pid_to_str)
8528 (thread_db_extra_thread_info): Constify.
8529 * nto-tdep.c (nto_extra_thread_info): Constify.
8530 * nto-tdep.h (nto_extra_thread_info): Constify.
8531 * obsd-nat.c (obsd_pid_to_str): Constify.
8532 * procfs.c (procfs_pid_to_str): Constify.
8533 * ravenscar-thread.c (ravenscar_extra_thread_info)
8534 (ravenscar_pid_to_str): Constify.
8535 * remote-sim.c (gdbsim_pid_to_str): Constify.
8536 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8537 Constify.
8538 * sol-thread.c (solaris_pid_to_str): Constify.
8539 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8540 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8541 * target.c (default_pid_to_str, target_pid_to_str)
8542 (normal_pid_to_str, default_pid_to_str): Constify.
8543 * target.h (target_ops::to_pid_to_str)
8544 (target_ops::to_extra_thread_info): Constify.
8545 (target_pid_to_str, normal_pid_to_str): Constify.
8546 * windows-nat.c (windows_pid_to_str): Constify.
8547 * gdbarch.sh (core_pid_to_str): Constify.
8548 * target-delegates.c: Regenerate.
8549 * gdbarch.h, gdbarch.c: Regenerate.
8550
69bbf465
PA
85512017-04-05 Pedro Alves <palves@redhat.com>
8552
8553 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8554 the memory of the temporary warning_pre_print override.
8555 * utils.c (warning_pre_print): Constify.
8556 * utils.h (warning_pre_print): Constify.
8557
be47f9e8
PA
85582017-04-05 Pedro Alves <palves@redhat.com>
8559
8560 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8561 (shell_command): New function.
8562 (make_command): Use std::string.
8563 (init_cli_cmds): Register shell_command instead of shell_escape.
8564
bde6261a
PA
85652017-04-05 Pedro Alves <palves@redhat.com>
8566
8567 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8568 * tracepoint.c (default_collect): Don't initialize.
8569
b38ef47f
PA
85702017-04-05 Pedro Alves <palves@redhat.com>
8571
8572 * macroexp.c (macro_buffer::shared): Now a bool.
8573 (init_buffer): Update.
8574 (init_shared_buffer): Constify 'addr' parameter.
8575 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8576 casts.
8577
f995bbe8
PA
85782017-04-05 Pedro Alves <palves@redhat.com>
8579
8580 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8581 * disasm.c (set_disassembler_options): Constify local.
8582 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8583
4a596fe2
SDJ
85842017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8585
8586 PR gdb/21352
8587 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8588 option.
8589
2cad08ea
YQ
85902017-04-05 Yao Qi <yao.qi@linaro.org>
8591
8592 * frame.c (frame_unwind_register_unsigned): Call
8593 frame_unwind_register_value.
8594
55a98976
YQ
85952017-04-05 Yao Qi <yao.qi@linaro.org>
8596
8597 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8598 Use gdb_test_multiple, and don't match anchor.
8599
4ac40124
PA
86002017-04-05 Pedro Alves <palves@redhat.com>
8601
8602 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8603 (Write After Approval): Remove Simon Marchi.
8604
c053b654
PA
86052017-04-05 Pedro Alves <palves@redhat.com>
8606
8607 * common/gdb_optional.h (optional::optional): Make constexpr and
8608 initialize m_dummy.
8609
4c7bf4f9
JB
86102017-04-04 John Baldwin <jhb@FreeBSD.org>
8611
8612 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8613 (amd64fbsd_jmp_buf_reg_offset): Remove.
8614 (amd64fbsd_supply_uthread): Remove function.
8615 (amd64fbsd_collect_uthread): Remove function.
8616 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8617 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8618 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8619 (fbsd-nat.c): Update comment.
8620 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8621 (i386fbsd_jmp_buf_reg_offset): Remove.
8622 (i386fbsd_supply_uthread): Remove function.
8623 (i386fbsd_collect_uthread): Remove function.
8624 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8625
1e1a8bef
JB
86262017-04-04 John Baldwin <jhb@FreeBSD.org>
8627
8628 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8629 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8630 * NEWS: Mention that support for FreeBSD/alpha was removed.
8631 * alpha-fbsd-tdep.c: Delete file.
8632 * config/alpha/fbsd.mh: Delete file.
8633 * configure.host: Delete alpha*-*-freebsd* and
8634 alpha*-*-kfreebsd*-gnu.
8635 * configure.tgt: Delete alpha*-*-freebsd* and
8636 alpha*-*-kfreebsd*-gnu.
8637
49907934
JB
86382017-04-04 John Baldwin <jhb@FreeBSD.org>
8639
8640 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8641 amd64bsd_store_inferior_registers): Use ptid from regcache.
8642
6f77053d
PA
86432017-04-04 Pedro Alves <palves@redhat.com>
8644
8645 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8646 data fields, make them private and add "m_" prefixes.
8647 (lnp_state_machine::lnp_state_machine): New ctor.
8648 (record_line, check_line_address, handle_set_discriminator)
8649 (handle_set_address, handle_advance_pc, handle_special_opcode)
8650 (handle_advance_line, handle_set_file, handle_negate_stmt)
8651 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8652 (end_sequence, advance_line): New methods.
8653 (m_gdbarch, m_record_lines_p): New fields.
8654 (lnp_reader_state): Delete.
8655 (dwarf_record_line): Rename to ...
8656 (lnp_state_machine::record_line): ... adjust.
8657 (init_lnp_state_machine): Delete.
8658 (lnp_state_machine::lnp_state_machine): New.
8659 (check_line_address): Rename to ...
8660 (lnp_state_machine::check_line_address): This.
8661 (dwarf_decode_lines_1): Remove reference to "reader_state".
8662 Adjust lnp_state_machine having a non-default ctor. Use bool.
8663 State machine internal state manipulation moved to
8664 lnp_state_machine methods.
8665
9c541725
PA
86662017-04-04 Pedro Alves <palves@redhat.com>
8667
8668 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8669 unittests/offset-type-selftests.c.
8670 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8671 * common/offset-type.h: New file.
8672 * common/preprocessor.h: New file.
8673 * common/traits.h: New file.
8674 * common/valid-expr.h: New file.
8675 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8676 sect_offset and cu_offset strong typedefs throughout.
8677 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8678 typedefs throughout.
8679 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8680 sect_offset and cu_offset strong typedefs throughout.
8681 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8682 typedefs throughout.
8683 * gdbtypes.h: Include "common/offset-type.h".
8684 (cu_offset): Now an offset type (strong typedef) instead of a
8685 struct.
8686 (sect_offset): Likewise.
8687 (union call_site_parameter_u): Rename "param_offset" field to
8688 "param_cu_off".
8689 * unittests/offset-type-selftests.c: New file.
8690
ecfb656c
PA
86912017-04-04 Pedro Alves <palves@redhat.com>
8692
8693 * common/underlying.h: New file.
8694 * dwarf2read.c: Include "common/gdb_optional.h" and
8695 "common/underlying.h".
8696 (dir_index, file_name_index): New types.
8697 (file_entry): Use them.
8698 (file_entry::include): Use to_underlying.
8699 (line_header::add_file_name): Use dir_index.
8700 (read_formatted_entries): Use gdb::optional. Read form before
8701 writting to file_entry.
8702 (dwarf_decode_line_header): Use dir_index.
8703 (lnp_state_machine::current_file): Use to_underlying.
8704 (lnp_state_machine::file): Change type to file_name_index.
8705 (dwarf_record_line): Use to_underlying.
8706 (init_lnp_state_machine): Use file_name_index.
8707 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8708
d194f1fe
PA
87092017-04-04 Pedro Alves <palves@redhat.com>
8710
8711 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8712 operator bool, has_value and get methods.
8713
fff8551c
PA
87142017-04-04 Pedro Alves <palves@redhat.com>
8715
8716 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8717 fields.
8718 (line_header): Initialize all data fields. Change type of
8719 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8720 Change type of include_dirs to std::vector<const char *>. Remove
8721 num_include_dirs, include_dirs_size. Change type of file_names to
8722 std::vector<file_entry>. Remove num_file_names, file_names_size.
8723 (line_header::line_header): New.
8724 (line_header::add_include_dir, line_header::add_file_name): New
8725 methods.
8726 (line_header::include_dir_at): Remove NULL check.
8727 (line_header::file_name_at): Add const overload.
8728 (line_header_up): New unique_ptr typedef.
8729 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8730 std::vector. Remove free_line_header call.
8731 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8732 free_line_header call.
8733 (free_cu_line_header): Delete.
8734 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8735 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8736 Adjust to use std::vector.
8737 (free_line_header): Delete.
8738 (free_line_header_voidp): Use delete.
8739 (add_include_dir): Replace with ...
8740 (line_header::add_include_dir): ... this method. Use std::vector.
8741 (add_file_name): Replace with ...
8742 (line_header::add_file_name): ... this method. Use std::vector.
8743 (add_include_dir_stub): Delete.
8744 (read_formatted_entries): Remove memset.
8745 (dwarf_decode_line_header): Return a line_header_up instead of a
8746 raw pointer. Remove cleanup handling. Pass lambdas to
8747 read_formatted_entries. Adjust to use line_header methods.
8748 (dwarf_decode_lines_1): Adjust to use line_header methods.
8749 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8750 use std::vector.
8751
d62a8ae2
SM
87522017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8753
8754 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8755 instead of struct ptid.
8756
db3a1dc7
AH
87572017-05-04 Alan Hayward <alan.hayward@arm.com>
8758
8759 * frame.c (get_frame_register_bytes): Unwind using value.
8760 (put_frame_register_bytes): Likewise.
8761
b1b45502
IB
87622017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8763
8764 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8765 aggregate-like.
8766
ec13808e
JK
87672017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8768
8769 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8770
12316564
YQ
87712017-03-29 Yao Qi <yao.qi@linaro.org>
8772
8773 * gdbthread.h (struct thread_info): Declare constructor and
8774 destructor. Add some in-class member initializers.
8775 * thread.c (free_thread): Remove.
8776 (init_thread_list): Call delete instead of free_thread.
8777 (new_thread): Call thread_info constructor.
8778 (thread_info::thread_info): New function.
8779 (thread_info::~thread_info): New function.
8780 (delete_thread_1): Call delete instead of free_thread.
8781 (make_cleanup_restore_current_thread): Move tp and frame to
8782 inner block.
8783
fe5f7374
AK
87842017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8785
8786 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8787 (arc_skip_prologue): Likewise.
8788 (arc_make_frame_cache): Likewise.
8789 (arc_pv_get_operand): New function.
8790 (arc_is_in_prologue): Likewise.
8791 (arc_analyze_prologue): Likewise.
8792 (arc_print_frame_cache): Likewise.
8793 (MAX_PROLOGUE_LENGTH): New constant.
8794
eea78757
AK
87952017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8796
8797 * configure.tgt: Add arc-insn.o.
8798 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8799 (dump_arc_instruction_command): New function.
8800 (arc_fprintf_disasm): Likewise.
8801 (arc_disassemble_info): Likewise.
8802 (arc_insn_get_operand_value): Likewise.
8803 (arc_insn_get_operand_value_signed): Likewise.
8804 (arc_insn_get_memory_base_reg): Likewise.
8805 (arc_insn_get_memory_offset): Likewise.
8806 (arc_insn_get_branch_target): Likewise.
8807 (arc_insn_dump): Likewise.
8808 (arc_insn_get_linear_next_pc): Likewise.
8809 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8810 (arc_disassemble_info): Likewise.
8811 (arc_insn_get_branch_target): Likewise.
8812 (arc_insn_get_linear_next_pc): Likewise.
8813 * NEWS: Mention new "maint print arc arc-instruction".
8814
3be78afd
AK
88152017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8816
8817 * arc-tdep (maintenance_print_arc_list): New variable.
8818 (maintenance_print_arc_command): New function.
8819
296ec4fa
AK
88202017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8821
8822 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8823 Add "limm" and "reserved".
8824 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8825 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8826 * arc-tdep.h (arc_regnum): Likewise.
8827
f74f865e
MF
88282017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8829
8830 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8831 for THREADPTR register.
8832 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8833 register.
8834 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8835 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8836 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8837
0d0bf81a
MF
88382017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8839
8840 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8841 registers above gdbarch_num_regs (gdbarch) as privileged in
8842 call0 ABI.
8843
0ce4291e
MF
88442017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8845
8846 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8847 for a single specified register or for all registers in
8848 a0_base..a0_base + C0_NREGS range.
8849 (supply_gregset_reg): Call regcache_raw_supply for a single
8850 specified register or for all registers in a0_base..a0_base +
8851 C0_NREGS range.
8852
c56054f9
MF
88532017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8854
8855 * arch/xtensa.h (C0_NREGS): Add definition.
8856 * xtensa-tdep.c (C0_NREGS): Remove definition.
8857
a4398628
MF
88582017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8859
8860 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8861 Drop xtensa_default_isa initialization.
8862 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8863
8c43009f
PA
88642017-03-27 Pedro Alves <palves@redhat.com>
8865
8866 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8867 (file_entry::include_dir): New method.
8868 (line_header::include_dir_at, line_header::file_name_at): New
8869 methods.
8870 (setup_type_unit_groups, setup_type_unit_groups)
8871 (psymtab_include_file_name): Simplify using the new methods.
8872 (lnp_state_machine) <the_line_header>: New field.
8873 <file>: Add comment.
8874 (lnp_state_machine::current_file): New method.
8875 (dwarf_record_line): Simplify using the new methods.
8876 (init_lnp_state_machine): Initialize the "the_line_header" field.
8877 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8878 Simplify using the new methods.
8879
a7e80b9e
PA
88802017-03-27 Pedro Alves <palves@redhat.com>
8881
8882 * cp-name-parser.y (make_empty): Delete.
8883 (demangler_special, nested_name, ptr_operator, array_indicator)
8884 (direct_declarator, declarator_1): Use fill_comp instead of
8885 make_empty.
8886
21047726
PA
88872017-03-27 Pedro Alves <palves@redhat.com>
8888
8889 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8890 to ATTRIBUTE_PRINTF.
8891 * solib-target.c (library_list_start_list): Print "string" not
8892 "version".
8893 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8894 gdb_xml_error call.
8895
d721ba37
PA
88962017-03-27 Pedro Alves <palves@redhat.com>
8897
8898 * dwarf2read.c (struct file_and_directory): New.
8899 (dwarf2_get_dwz_file): Adjust to use std::string.
8900 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8901 (find_file_and_directory): Adjust to return a file_and_directory
8902 object.
8903 (read_file_scope): Adjust to use file_and_directory. Remove
8904 make_cleanup/do_cleanups calls.
8905 (open_and_init_dwp_file): Adjust to use std::string. Remove
8906 make_cleanup/do_cleanups calls.
8907 * python/python.c (do_start_initialization): Adjust to ldirname
8908 returning a std::string.
8909 * utils.c (ldirname): Now returns a std::string.
8910 * utils.h (ldirname): Change return type to std::string.
8911 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8912 returning a std::string.
8913 * xml-tdesc.c (file_read_description_xml): Likewise.
8914
ed771251
AH
89152017-03-24 Alan Hayward <alan.hayward@arm.com>
8916
8917 * regcache.c (regcache_debug_print_register): New function.
8918 * regcache.h (regcache_debug_print_register): New declaration.
8919 * target.c (debug_print_register): Remove.
8920 (target_fetch_registers): Call regcache_debug_print_register.
8921 (target_store_registers): Likewise.
8922
568c1b9f
PB
89232017-03-24 Pádraig Brady <pbrady@fb.com>
8924
8925 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8926 reference beyond the 'lh->include_dirs' array before accessing to
8927 it.
8928 (psymtab_include_file_name): Likewise.
8929 (dwarf_decode_lines_1): Likewise.
8930 (dwarf_decode_lines): Likewise.
8931 (file_file_name): Likewise.
8932
3e00d44f
SM
89332017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8934
8935 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8936 inferior_ptid.
8937 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8938 ps_lsetfpregs): Likewise.
8939 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8940 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8941 ps_lsetfpregs): Likewise.
8942 * target.c (target_fetch_registers, target_store_registers):
8943 Remove asserts.
8944
077ae656
AH
89452017-03-23 Alan Hayward <alan.hayward@arm.com>
8946
8947 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8948
1e2b521d
YQ
89492017-03-23 Yao Qi <yao.qi@linaro.org>
8950
8951 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8952 (_initialize_aarch64_tdep): Register it.
8953 (aarch64_record_load_store): Handle PRFM instruction.
8954 (aarch64_process_record_test): New function.
8955
33877125
YQ
89562017-03-23 Yao Qi <yao.qi@linaro.org>
8957
8958 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8959 indentation.
8960
a0eef940
YQ
89612017-03-23 Yao Qi <yao.qi@linaro.org>
8962
8963 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8964
3f2a3564
PR
89652017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8966
8967 python/python.c (do_start_initialization): Fix memory leak.
8968
b67aeab0
SM
89692017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8970
8971 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8972 using get_ptrace_pid.
8973 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8974 inferior_ptid.
8975 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8976 inferior_ptid instead of pid.
8977
ffdbe864
YQ
89782017-03-22 Yao Qi <yao.qi@linaro.org>
8979
8980 * aarch64-tdep.c: Wrap locally used classes in anonymous
8981 namespace.
8982 * arm-tdep.c: Likewise.
8983 * linespec.c: Likewise.
8984 * ui-out.c: Likewise.
8985
9d736fbf
JG
89862017-03-22 Jonah Graham <jonah@kichwacoders.com>
8987
8988 PR gdb/19637
8989 * python/lib/gdb/printer/bound_registers.py: Import sys.
8990
3de88e9a
SM
89912017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8992
8993 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8994 windows_thread_info parameter and use it instead of
8995 current_thread.
8996 (windows_fetch_inferior_registers): Don't set current_thread,
8997 pass the thread to do_windows_fetch_inferior_registers. Use
8998 ptid from regcache instead of inferior_ptid.
8999 (do_windows_store_inferior_registers): Add windows_thread_info
9000 parameter and use it instead of current_thread.
9001 (windows_store_inferior_registers): Don't set current_thread,
9002 pass the thread to do_windows_store_inferior_registers. Use
9003 ptid from regcache instead of inferior_ptid.
9004
0e7b8f61
SM
90052017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9006
9007 * ser-mingw.c (ser_windows_raw): Remove reference to
9008 struct serial::current_timeout.
9009
5badf10a
IR
90102017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9011
9012 PR tdep/20928
9013 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9014 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9015 (sparc64_fsr_type): Fix %fsr decoding.
9016
cee59b3f
TW
90172017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9018
9019 * python/py-record-btrace.c (btpy_insn_data): Change return type
9020 for Python 2.
9021
639a9038
SM
90222017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9023
9024 * spu-linux-nat.c (spu_fetch_inferior_registers,
9025 spu_store_inferior_registers): Use ptid from regcache, set and
9026 restore inferior_ptid.
9027 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9028 Likewise.
9029
bcc0c096
SM
90302017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9031
9032 * i386-linux-nat.c (fetch_register, store_register,
9033 i386_linux_fetch_inferior_registers,
9034 i386_linux_store_inferior_registers): Use ptid from regcache.
9035 * ia64-linux-nat.c (ia64_linux_fetch_register,
9036 ia64_linux_store_register): Likewise.
9037 * inf-ptrace.c (inf_ptrace_fetch_register,
9038 inf_ptrace_store_register): Likewise.
9039 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9040 m32r_linux_store_inferior_registers): Likewise.
9041 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9042 m68kbsd_store_inferior_registers): Likewise.
9043 * m68k-linux-nat.c (fetch_register, store_register,
9044 m68k_linux_fetch_inferior_registers,
9045 m68k_linux_store_inferior_registers): Likewise.
9046 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9047 m88kbsd_store_inferior_registers): Likewise.
9048 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9049 mips_fbsd_store_inferior_registers): Likewise.
9050 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9051 mips64_linux_regsets_store_registers): Likewise.
9052 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9053 mipsnbsd_store_inferior_registers): Likewise.
9054 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9055 mips64obsd_store_inferior_registers): Likewise.
9056 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9057 Likewise.
9058 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9059 ppcfbsd_store_inferior_registers): Likewise.
9060 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9061 ppc_linux_store_inferior_registers): Likewise.
9062 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9063 ppcnbsd_store_inferior_registers): Likewise.
9064 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9065 ppcobsd_store_registers): Likewise.
9066 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9067 Likewise.
9068 * ravenscar-thread.c (ravenscar_fetch_registers,
9069 ravenscar_store_registers, ravenscar_prepare_to_store):
9070 Likewise.
9071 * record-btrace.c (record_btrace_fetch_registers,
9072 record_btrace_store_registers, record_btrace_prepare_to_store):
9073 Likewise.
9074 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9075 Lookup inferior using ptid from regcache, instead of
9076 current_inferior.
9077 * remote.c (remote_fetch_registers, remote_store_registers): Use
9078 ptid from regcache.
9079 * rs6000-nat.c (fetch_register, store_register): Likewise.
9080 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9081 s390_linux_store_inferior_registers): Likewise.
9082 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9083 shnbsd_store_inferior_registers): Likewise.
9084 * sol-thread.c (sol_thread_fetch_registers,
9085 sol_thread_store_registers): Likewise.
9086 * sparc-nat.c (sparc_fetch_inferior_registers,
9087 sparc_store_inferior_registers): Likewise.
9088 * tilegx-linux-nat.c (fetch_inferior_registers,
9089 store_inferior_registers): Likewise.
9090 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9091 vaxbsd_store_inferior_registers): Likewise.
9092 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9093 store_xtregs): Likewise.
9094
c0f55cc6
AV
90952017-03-20 Artemiy Volkov <artemiyv@acm.org>
9096
9097 PR gdb/14441
9098 * NEWS: Mention support for rvalue references in GDB and python.
9099 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9100 supports both lvalue and rvalue references.
9101
15c0a2a9
AV
91022017-03-20 Artemiy Volkov <artemiyv@acm.org>
9103
9104 PR gdb/14441
9105 * gdbtypes.c (rank_one_type): Implement overloading
9106 resolution rules regarding rvalue references.
9107
aa006118
AV
91082017-03-20 Artemiy Volkov <artemiyv@acm.org>
9109
9110 PR gdb/14441
9111 * aarch64-tdep.c (aarch64_type_align)
9112 (aarch64_extract_return_value, aarch64_store_return_value): Change
9113 lvalue reference type checks to general reference type checks.
9114 * amd64-tdep.c (amd64_classify): Likewise.
9115 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9116 Likewise.
9117 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9118 (arm_store_return_value): Likewise.
9119 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9120 * c-typeprint.c (c_print_type): Likewise.
9121 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9122 (cplus_number_of_children, cplus_describe_child): Likewise.
9123 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9124 * completer.c (expression_completer): Likewise.
9125 * cp-support.c (make_symbol_overload_list_adl_namespace):
9126 Likewise.
9127 * darwin-nat-info.c (info_mach_region_command): Likewise.
9128 * dwarf2loc.c (entry_data_value_coerce_ref)
9129 (value_of_dwarf_reg_entry): Likewise.
9130 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9131 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9132 Likewise.
9133 * findvar.c (extract_typed_address, store_typed_address):
9134 Likewise.
9135 * gdbtypes.c (rank_one_type): Likewise.
9136 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9137 * infcall.c (value_arg_coerce): Likewise.
9138 * language.c (pointer_type): Likewise.
9139 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9140 Likewise.
9141 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9142 * mn10300-tdep.c (mn10300_type_align): Likewise.
9143 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9144 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9145 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9146 Likewise.
9147 * printcmd.c (print_formatted, x_command): Likewise.
9148 * python/py-type.c (typy_get_composite, typy_template_argument):
9149 Likewise.
9150 * python/py-value.c (valpy_referenced_value)
9151 (valpy_get_dynamic_type, value_has_field): Likewise.
9152 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9153 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9154 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9155 * spu-tdep.c (spu_scalar_value_p): Likewise.
9156 * symtab.c (lookup_symbol_aux): Likewise.
9157 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9158 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9159 Likewise.
9160 * valops.c (value_cast_pointers, value_cast)
9161 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9162 (value_struct_elt, value_struct_elt_bitpos)
9163 (value_find_oload_method_list, find_overload_match)
9164 (value_rtti_indirect_type): Likewise.
9165 * valprint.c (val_print_scalar_type_p, generic_val_print):
9166 Likewise.
9167 * value.c (value_actual_type, value_as_address, unpack_long)
9168 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9169 (coerce_ref): Likewise.
9170 * varobj.c (varobj_get_value_type): Likewise.
9171
3fcf899d
AV
91722017-03-20 Artemiy Volkov <artemiyv@acm.org>
9173
9174 PR gdb/14441
9175 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9176 table of constants.
9177 * python/lib/gdb/command/explore.py: Support exploring values
9178 of rvalue reference types.
9179 * python/lib/gdb/types.py: Implement get_basic_type() for
9180 rvalue reference types.
9181 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9182 constant.
9183 * python/py-value.c (valpy_getitem): Add an rvalue reference
9184 check.
9185 (valpy_reference_value): Add new parameter "refcode".
9186 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9187 New wrappers for valpy_reference_value().
9188 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9189 (gdbpy_invoke_xmethod): Likewise.
9190
4297a3f0
AV
91912017-03-20 Artemiy Volkov <artemiyv@acm.org>
9192
9193 PR gdb/14441
9194 * dwarf2read.c (process_die, read_type_die_1): Handle the
9195 DW_TAG_rvalue_reference_type DIE.
9196 (read_tag_reference_type): Add new parameter "refcode".
9197
e1cb3213
AV
91982017-03-20 Artemiy Volkov <artemiyv@acm.org>
9199
9200 PR gdb/14441
9201 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9202 (c_type_print_modifier, c_type_print_varspec_suffix)
9203 (c_type_print_base): Support printing rvalue reference types.
9204 * c-valprint.c (c_val_print, c_value_print): Support printing
9205 rvalue reference values.
9206
e4347c89
AV
92072017-03-20 Artemiy Volkov <artemiyv@acm.org>
9208
9209 PR gdb/14441
9210 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9211 typename.
9212 * cp-support.c (replace_typedefs): Handle
9213 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9214 * python/py-type.c (typy_lookup_type): Likewise.
9215
53cc15f5
AV
92162017-03-20 Artemiy Volkov <artemiyv@acm.org>
9217
9218 PR gdb/14441
9219 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9220 * parse.c (insert_type): Change assert statement.
9221 (follow_types): Handle rvalue reference types.
9222 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9223 constant.
9224
a65cfae5
AV
92252017-03-20 Artemiy Volkov <artemiyv@acm.org>
9226
9227 PR gdb/14441
9228 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9229 value_ref() interface.
9230 * c-valprint.c (c_value_print): Likewise.
9231 * infcall.c (value_arg_coerce): Likewise.
9232 * python/py-value.c (valpy_reference_value): Likewise.
9233 * valops.c (value_cast, value_reinterpret_cast)
9234 (value_dynamic_cast, typecmp): Likewise.
9235 (value_ref): Parameterize by kind of return value reference type.
9236 * value.h (value_ref): Add new parameter "refcode".
9237
3b224330
AV
92382017-03-20 Artemiy Volkov <artemiyv@acm.org>
9239
9240 PR gdb/14441
9241 * dwarf2read.c (read_tag_reference_type): Use
9242 lookup_lvalue_reference_type() instead of lookup_reference_type().
9243 * eval.c (evaluate_subexp_standard): Likewise.
9244 * f-exp.y: Likewise.
9245 * gdbtypes.c (make_reference_type, lookup_reference_type):
9246 Generalize with rvalue reference types.
9247 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9248 convenience wrappers for lookup_reference_type().
9249 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9250 reference kind parameter.
9251 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9252 wrappers for lookup_reference_type().
9253 * guile/scm-type.c (gdbscm_type_reference): Use
9254 lookup_lvalue_reference_type() instead of lookup_reference_type().
9255 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9256 * parse.c (follow_types): Likewise.
9257 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9258 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9259 Likewise.
9260 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9261 (gdbpy_invoke_xmethod): Likewise.
9262 * stabsread.c: Provide extra argument to make_reference_type()
9263 call.
9264 * valops.c (value_ref, value_rtti_indirect_type): Use
9265 lookup_lvalue_reference_type() instead of lookup_reference_type().
9266
f9aeb8d4
AV
92672017-03-20 Artemiy Volkov <artemiyv@acm.org>
9268
9269 PR gdb/14441
9270 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9271 (TYPE_IS_REFERENCE): New macro.
9272 (struct type): Add rvalue_reference_type field.
9273 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9274
51457a05
MAL
92752017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9276
9277 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9278 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9279 New function definition.
9280 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9281 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9282 New function declaration.
9283 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9284 * mi/mi-interp.h: New file.
9285 * solib.c (info_sharedlibrary_command): Replace for loop with
9286 ALL_SO_LIBS macro
9287 * solib.h (update_solib_list): New function declaration.
9288 (so_list_head): Move macro.
9289 * solist.h (ALL_SO_LIBS): New macro.
9290
e696b3ad
MAL
92912017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9292
9293 * infcmd.c (post_create_inferior): Remove unused argument in
9294 call to solib_add.
9295 * remote.c (remote_start_remote): Likewise.
9296 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9297 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9298 (enable_break): Likewise.
9299 * solib.c (update_solib_list): Remove unused target argument
9300 and its documentation.
9301 (solib_add): Remove unused target argument. Remove unused
9302 argument in call to update_solib_list.
9303 (info_sharedlibrary_command): Remove unused argument in call
9304 to update_solib_list.
9305 (sharedlibrary_command): Remove unused argument in call to
9306 solib_add.
9307 (handle_solib_event): Likewise.
9308 (reload_shared_libraries): Likewise.
9309 * solib.h (solib_add): Remove unused target argument.
9310
dcb84eda
AA
93112017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9312
9313 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9314 (s390_displaced_step_fixup): Cover relative branches with the
9315 default fixup handling. This fixes lack of support for some
9316 relative branch instructions.
9317
d9cb6cdc
SM
93182017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9319
9320 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9321 ptid from regcache.
9322
1afaf9f4
SM
93232017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9324
9325 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9326 i386_darwin_store_inferior_registers): Use ptid from regcache.
9327
aac12e24
SM
93282017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9329
9330 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9331 i386bsd_store_inferior_registers): Use ptid from regcache.
9332
bbe1eef1
SM
93332017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9334
9335 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9336 hppaobsd_store_registers): Use ptid from regcache.
9337
10799020
SM
93382017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9339
9340 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9341 hppanbsd_store_registers): Use ptid from regcache.
9342
00204cf7
SM
93432017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9344
9345 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9346 from regcache. Use get_ptrace_pid.
9347
11a33714
SM
93482017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9349
9350 * corelow.c (get_core_register_section): Use ptid from regcache,
9351 update doc.
9352
317cd492
SM
93532017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9354
9355 * bsd-uthread.c (bsd_uthread_fetch_registers,
9356 bsd_uthread_store_registers): Use ptid from regcache, set and
9357 restore inferior_ptid.
9358
9ac8a7c2
SM
93592017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9360
9361 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9362 fetch_fp_regs, store_register, store_regs, store_fp_register,
9363 store_fp_regs): Use ptid from regcache.
9364
4ac4bb6a
SM
93652017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9366
9367 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9368 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9369 store_vfp_regs): Use ptid from regcache.
9370
9bcbdca8
PA
93712017-03-17 Pedro Alves <palves@redhat.com>
9372
9373 PR remote/21188
9374 * ser-base.c (ser_base_wait_for): Add comment.
9375 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9376 version.
9377 * ser-unix.c (hardwire_raw): Remove reference to
9378 scb->current_timeout.
9379 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9380 (hardwire_ops): Install ser_base_readchar instead of
9381 hardwire_readchar.
9382 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9383 Remove fields.
9384
7503099f
JG
93852017-03-17 Jonah Graham <jonah@kichwacoders.com>
9386
9387 PR gdb/19637
9388 * python/lib/gdb/printer/bound_registers.py: Add support for
9389 Python 3.
9390
7942e96e
AA
93912017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9392
9393 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9394 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9395 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9396 byte_offset to subobj_byte_offset. Fix the handling of
9397 DWARF_VALUE_STACK on big-endian targets when coming via an
9398 implicit pointer.
9399 (dwarf2_evaluate_loc_desc): Adjust call to
9400 dwarf2_evaluate_loc_desc_full.
9401 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9402 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9403
ba14f379
YQ
94042017-03-16 Yao Qi <yao.qi@linaro.org>
9405
9406 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9407 and REVSH instructions.
9408
b121eeb9
YQ
94092017-03-16 Yao Qi <yao.qi@linaro.org>
9410
9411 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9412 (arm_record_test): Declare.
9413 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9414 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9415 align with the manual.
9416 (thumb_record_misc): Adjust the code order to align with the
9417 manual.
9418 (thumb2_record_decode_insn_handler): Fix instruction matching.
9419 (instruction_reader_thumb): New class.
9420 (arm_record_test): New function.
9421
728a7913
YQ
94222017-03-16 Yao Qi <yao.qi@linaro.org>
9423
9424 * arm-tdep.c (abstract_memory_reader): New class.
9425 (instruction_reader): New class.
9426 (extract_arm_insn): Add argument 'reader'. Callers updated.
9427 (decode_insn): Likewise.
9428
34b43320
DE
94292017-03-16 Doug Evans <dje@google.com>
9430
a7c0469f
DE
9431 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9432 member. Change type of TYPE member to SCM. All uses updated.
9433 (lsscm_make_lazy_string_smob): Add assert.
9434 (lsscm_make_lazy_string): Flag bad length values.
9435 (lsscm_elt_type): New function.
9436 (gdbscm_lazy_string_to_value): Rewrite to use
9437 lsscm_safe_lazy_string_to_value.
9438 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9439 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9440 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9441 in incoming type.
9442 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9443 * guile/scm-type.c (tyscm_scm_to_type): New function.
9444
94452017-03-15 Doug Evans <dje@google.com>
9446
34b43320
DE
9447 PR python/17728, python/18439, python/18779
9448 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9449 member. Change type of TYPE member to PyObject *. All uses updated.
9450 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9451 (gdbpy_create_lazy_string_object): Flag bad length values.
9452 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9453 Handle typedefs in incoming type.
9454 (stpy_lazy_string_elt_type): New function.
9455 (gdbpy_extract_lazy_string): Call it.
9456 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9457 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9458 typedefs in incoming type.
9459
a3a5fecc
DE
94602017-03-16 Doug Evans <dje@google.com>
9461
9462 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9463 * guile/scm-type.c (tyscm_scm_to_type): New function.
9464
28f1c605
JW
94652017-03-16 Jiong Wang <jiong.wang@arm.com>
9466
9467 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9468 "ULONGEST" for "skip".
9469
87c336f6
AA
94702017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9471
9472 PR gdb/21220
9473 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9474 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9475 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9476 over ptrace peek/poke until end of buffer or error.
9477
cf81cf60
SM
94782017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9479
9480 * parse.c (length_of_subexp): Make static.
9481 * parser-defs.h (length_of_subexp): Remove.
9482
a379284a
AA
94832017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9484
9485 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9486 as well.
9487
8a6200ba
PA
94882017-03-14 Pedro Alves <palves@redhat.com>
9489
9490 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9491 (main): Use std::unique_ptr. Remove calls to
9492 cp_demangled_name_parse_free.
9493
f79ec206
SM
94942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9495
9496 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9497 alphabsd_store_inferior_registers): Use regcache->ptid instead
9498 of inferior_ptid.
9499
edb5fb00
SM
95002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9501
9502 * aix-thread.c (aix_thread_fetch_registers,
9503 aix_thread_store_registers): Use regcache->ptid instead of
9504 inferior_ptid.
9505
55119686
SM
95062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9507
9508 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9509 store_gregs_to_thread, fetch_fpregs_from_thread,
9510 store_fpregs_to_thread): Use regcache->ptid instead of
9511 inferior_ptid.
9512
6a06fbb7
SM
95132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9514
9515 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9516 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9517 instead of inferior_ptid.
9518
c6386875
SM
95192017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9520
9521 * target.c (target_fetch_registers, target_store_registers): Add
9522 assert.
9523
ddaaf0fb
SM
95242017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9525
9526 * regcache.h (regcache_get_ptid): New function.
9527 * regcache.c (regcache_get_ptid): New function.
9528
b9da89d1 95292017-03-13 Mark Wielaard <mark@klomp.org>
9530
9531 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9532
5f4d1085
KS
95332017-03-10 Keith Seitz <keiths@redhat.com>
9534
9535 PR c++/8218
9536 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9537
c65d6b55
PA
95382017-03-08 Pedro Alves <palves@redhat.com>
9539
9540 PR gdb/18360
9541 * infrun.c (start_step_over, do_target_resume, resume)
9542 (restart_threads): Assert we're not resuming a thread that is
9543 meant to be stopped.
9544 (infrun_thread_stop_requested_callback): Delete.
9545 (infrun_thread_stop_requested): If the thread is internally
9546 stopped, queue a pending stop event and clear the thread's
9547 inline-frame state.
9548 (handle_stop_requested): New function.
9549 (handle_syscall_event, handle_inferior_event_1): Use
9550 handle_stop_requested.
9551 (handle_stop_requested): New function.
9552 (handle_signal_stop): Set the thread's stop_signal here instead of
9553 at caller.
9554 (finish_step_over): Clear step over info unconditionally.
9555 (handle_signal_stop): If the user had interrupted the event
9556 thread, consider the stop a random signal.
9557 (handle_signal_stop) <signal arrived while stepping over
9558 breakpoint>: Don't restart threads here.
9559 (stop_waiting): Don't clear step-over info here.
9560
15c22686
PA
95612017-03-08 Pedro Alves <palves@redhat.com>
9562
9563 PR 21206
9564 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9565 goes to argument 2, not 1.
9566
6e5d74e7
PA
95672017-03-08 Pedro Alves <palves@redhat.com>
9568
9569 PR cli/21218
9570 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9571 display_gdb_prompt.
9572 (command_line_input): Add comment.
9573
9753a2f6
PA
95742017-03-08 Pedro Alves <palves@redhat.com>
9575
9576 PR tui/21216
9577 * tui/tui-file.c (tui_file::write): New.
9578 * tui/tui-file.h (tui_file): Override "write".
9579 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9580 factored out from ...
9581 (tui_puts): ... here.
9582 (tui_putc): Use them.
9583 (tui_write): New function.
9584 * tui/tui-io.h (tui_write): Declare.
9585
1672e0d9
SDJ
95862017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9587
9588 * Makefile.in (SFILES): Replace "environ.c" with
9589 "common/environ.c".
9590 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9591 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9592 to...
9593 * common/environ.c: ... here.
9594 * environ.h: Moved to...
9595 * common/environ.h: ... here.
9596
f7bb4e3a
PB
95972017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9598
9599 * gdbarch.sh (pstring_ptr): New static function.
9600 (gdbarch_disassembler_options): Use it.
9601 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9602 not valid_disassembler_option->name.
9603 * gdbarch.c: Regenerate.
9604
e45ced6c
PB
96052017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9606
9607 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9608
5f6fd321
PA
96092017-03-07 Pedro Alves <palves@redhat.com>
9610
9611 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9612
6dbb839a 96132017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
9614
9615 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9616 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9617 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 9618 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 9619
d274ecf4
SM
96202017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9621
9622 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9623
df97be55
SM
96242017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9625
9626 * remote.c (remote_add_target_side_commands): Use range-based
9627 for loop.
9628
7d45f3df
YQ
96292017-03-03 Yao Qi <yao.qi@linaro.org>
9630
9631 PR gdb/21165
9632 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9633 value is lazy.
9634 * valprint.c (common_val_print): Likewise.
9635
65b48a81
PB
96362017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9637
9638 * NEWS: Mention new set/show disassembler-options commands.
9639 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9640 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9641 (prospective_options): New static variable.
9642 (gdb_disassembler::gdb_disassembler): Initialize
9643 m_di.disassembler_options.
9644 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9645 (get_disassembler_options): New function.
9646 (set_disassembler_options): Likewise.
9647 (set_disassembler_options_sfunc): Likewise.
9648 (show_disassembler_options_sfunc): Likewise.
9649 (disassembler_options_completer): Likewise.
9650 (_initialize_disasm): Likewise.
9651 * disasm.h (get_disassembler_options): New prototype.
9652 (set_disassembler_options): Likewise.
9653 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9654 (gdbarch_verify_disassembler_options): Likewise.
9655 * gdbarch.c: Regenerate.
9656 * gdbarch.h: Likewise.
9657 * arm-tdep.c (num_disassembly_options): Delete.
9658 (set_disassembly_style): Likewise.
9659 (arm_disassembler_options): New static variable.
9660 (set_disassembly_style_sfunc): Convert short style name into long
9661 option name. Call set_disassembler_options.
9662 (show_disassembly_style_sfunc): New function.
9663 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9664 set_gdbarch_verify_disassembler_options.
9665 (_initialize_arm_tdep): Delete regnames variable and update callers.
9666 (arm_disassembler_options): Initialize.
9667 (disasm_options): New variable.
9668 (num_disassembly_options): Rename from this...
9669 (num_disassembly_styles): ...to this. Compute by scanning through
9670 disasm_options.
9671 (valid_disassembly_styles): Initialize using disasm_options.
9672 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9673 set_arm_regname_option.
9674 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9675 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9676 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9677 set_gdbarch_verify_disassembler_options.
9678 * s390-tdep.c (s390_disassembler_options): New static variable.
9679 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9680 set_gdbarch_verify_disassembler_options.
9681
d538e36d
SM
96822017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9683
9684 * remote.c (remote_add_target_side_condition): Remove "struct"
9685 keyword from range-based for loop.
9686
83621223
SM
96872017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9688
9689 * remote.c (remote_add_target_side_condition): Use range-based
9690 for loop. Update comment.
9691
2123df0e
YQ
96922017-02-27 Yao Qi <yao.qi@linaro.org>
9693
9694 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9695
8e368124
AH
96962017-02-26 Alan Hayward <alan.hayward@arm.com>
9697
9698 * regcache.c (regcache_raw_update): New function.
9699 (regcache_raw_read): Move code to regcache_raw_update.
9700 * regcache.h (regcache_raw_update): New declaration.
9701 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9702
a49dd8dd
JK
97032017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9704
9705 * dwarf2read.c (create_debug_type_hash_table): Initialize
9706 header.signature and header.type_offset_in_tu.
9707
34e4bae9
PA
97082017-02-24 Pedro Alves <palves@redhat.com>
9709
9710 * symtab.c (make_file_symbol_completion_list_1): Use
9711 add_symtab_completions.
9712
b0e4b369
AH
97132017-02-24 Alan Hayward <alan.hayward@arm.com>
9714
9715 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9716
975c21ab
AH
97172017-02-24 Alan Hayward <alan.hayward@arm.com>
9718
9719 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9720 I386_MAX_REGISTER_SIZE.
9721 (i386_pseudo_register_write): Likewise.
9722 (i386_process_record): Likewise.
9723 * i387-tdep.c (i387_supply_xsave): Likewise.
9724 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9725 (store_register): Likewise.
9726
14bc53a8
PA
97272017-02-23 Pedro Alves <palves@redhat.com>
9728
9729 * ada-lang.c: Include "common/function-view.h".
9730 (ada_iterate_over_symbols): Adjust to use function_view as
9731 callback type.
9732 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9733 (ada_make_symbol_completion_list): Use a lambda.
9734 (ada_exc_search_name_matches): Delete.
9735 (name_matches_regex): New.
9736 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9737 * compile/compile-c-support.c: Include "common/function-view.h".
9738 (print_one_macro): Change prototype to accept a ui_file pointer.
9739 (write_macro_definitions): Use a lambda.
9740 * dwarf2read.c: Include "common/function-view.h".
9741 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9742 (dw2_expand_symtabs_matching): Adjust to use function_view as
9743 callback type.
9744 * language.h: Include "common/function-view.h".
9745 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9746 function_view as callback type.
9747 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9748 * linespec.c: Include "common/function-view.h".
9749 (collect_info::add_symbol): New method.
9750 (struct symbol_and_data_callback, iterate_inline_only, struct
9751 symbol_matcher_data, iterate_name_matcher): Delete.
9752 (iterate_over_all_matching_symtabs): Adjust to use function_view
9753 as callback type and lambdas.
9754 (iterate_over_file_blocks): Adjust to use function_view as
9755 callback type.
9756 (decode_compound_collector): Now a class with private fields.
9757 (decode_compound_collector::release_symbols): New method.
9758 (collect_one_symbol): Rename to...
9759 (decode_compound_collector::operator()): ... this and adjust.
9760 (lookup_prefix_sym): decode_compound_collector construction bits
9761 move to decode_compound_collector ctor. Pass the
9762 decode_compound_collector object directly as callback. Remove
9763 cleanups and use decode_compound_collector::release_symbols
9764 instead.
9765 (symtab_collector): Now a class with private fields.
9766 (symtab_collector::release_symtabs): New method.
9767 (add_symtabs_to_list): Rename to...
9768 (symtab_collector::operator()): ... this and adjust.
9769 (collect_symtabs_from_filename): symtab_collector construction
9770 bits move to symtab_collector ctor. Pass the symtab_collector
9771 object directly as callback. Remove cleanups and use
9772 symtab_collector::release_symtabs instead.
9773 (collect_symbols): Delete.
9774 (add_matching_symbols_to_info): Use lambdas.
9775 * macrocmd.c (print_macro_callback): Delete.
9776 (info_macro_command): Use a lambda.
9777 (info_macros_command): Pass print_macro_definition as callable
9778 directly.
9779 (print_one_macro): Remove 'ignore' parameter.
9780 (macro_list_command): Adjust.
9781 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9782 (macro_for_each_data::user_data): Delete field.
9783 (foreach_macro): Adjust to call the function_view.
9784 (macro_for_each): Adjust to use function_view as callback type.
9785 (foreach_macro_in_scope): Adjust to call the function_view.
9786 (macro_for_each_in_scope): Adjust to use function_view as callback
9787 type.
9788 * macrotab.h: Include "common/function-view.h".
9789 (macro_callback_fn): Declare a prototype instead of a pointer.
9790 Remove "user_data" parameter.
9791 (macro_for_each, macro_for_each_in_scope): Adjust to use
9792 function_view as callback type.
9793 * psymtab.c (partial_map_expand_apply)
9794 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9795 Adjust to use function_view as callback type and to return bool.
9796 (psym_expand_symtabs_matching): Adjust to use function_view as
9797 callback types.
9798 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9799 to use function_view as callback type and to return bool.
9800 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9801 callback types.
9802 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9803 as callback types.
9804 * symfile.h: Include "common/function-view.h".
9805 (expand_symtabs_file_matcher_ftype)
9806 (expand_symtabs_symbol_matcher_ftype)
9807 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9808 return bool.
9809 (quick_symbol_functions::map_symtabs_matching_filename)
9810 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9811 function_view as callback type and return bool.
9812 (expand_symtabs_matching): Adjust to use function_view as callback
9813 type.
9814 (maintenance_expand_name_matcher)
9815 (maintenance_expand_file_matcher): Delete.
9816 (maintenance_expand_symtabs): Use lambdas.
9817 * symtab.c (iterate_over_some_symtabs): Adjust to use
9818 function_view as callback types and return bool.
9819 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9820 of a cleanup.
9821 (lookup_symtab_callback): Delete.
9822 (lookup_symtab): Use a lambda.
9823 (iterate_over_symbols): Adjust to use function_view as callback
9824 type.
9825 (struct search_symbols_data, search_symbols_file_matches)
9826 (search_symbols_name_matches): Delete.
9827 (search_symbols): Use a pair of lambdas.
9828 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9829 (symtab_expansion_callback): Delete.
9830 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9831 * symtab.h: Include "common/function-view.h".
9832 (iterate_over_some_symtabs): Adjust to use function_view as
9833 callback type and return bool.
9834 (iterate_over_symtabs): Adjust to use function_view as callback
9835 type.
9836 (symbol_found_callback_ftype): Remove 'data' parameter and return
9837 bool.
9838 (iterate_over_symbols): Adjust to use function_view as callback
9839 type.
9840
07e253aa
PA
98412017-02-23 Pedro Alves <palves@redhat.com>
9842
9843 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9844 (%.o) <unittests/%.c>: New pattern.
9845 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9846 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9847 * common/function-view.h: New file.
9848 * unittests/function-view-selftests.c: New file.
9849 * configure: Regenerate.
9850
8eaf5320
SM
98512017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9852
9853 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9854 inferior_ptid.
9855 * go32-nat.c (go32_thread_alive): Likewise.
9856
38768751
YQ
98572017-02-23 Yao Qi <yao.qi@linaro.org>
9858
9859 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9860 delete.
9861
0a8beaba
YQ
98622017-02-23 Yao Qi <yao.qi@linaro.org>
9863
9864 * varobj.c (varobj_clear_saved_item): Use delete instead of
9865 xfree.
9866 (update_dynamic_varobj_children): Likewise.
9867
58fdfd2c
JK
98682017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9869
9870 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9871
1b90b139
SM
98722017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9873
9874 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9875 m_enum_value to 0 in default constructor.
9876
2039d74e
EBM
98772017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9878
9879 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9880 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9881 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9882 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9883 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9884 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9885 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9886 IS_STORE_CONDITIONAL_INSN.
9887
7814882a
JK
98882017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9889
9890 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9891
0ae60b63
JK
98922017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9893
9894 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9895
0224619f
JK
98962017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9897
9898 * dwarf2read.c (skip_one_die, read_attribute_value)
9899 (dwarf2_const_value_attr, dump_die_shallow)
9900 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9901 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9902
0af92d60
JK
99032017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9904
9905 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9906 (dwarf_parse_macro_header): Accept DWARF version 5.
9907 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9908
216f72a1
JK
99092017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9910
9911 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9912 DW_AT_GNU_*.
9913 * common/common-exceptions.h (enum errors): Likewise.
9914 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9915 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9916 (dwarf_expr_context::execute_stack_op): Likewise.
9917 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9918 Likewise.
9919 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9920 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9921 (show_entry_values_debug, call_site_to_target_addr)
9922 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9923 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9924 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9925 (value_of_dwarf_block_entry, indirect_pieced_value)
9926 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9927 (disassemble_dwarf_expression): Likewise.
9928 * dwarf2read.c (process_die, inherit_abstract_dies)
9929 (read_call_site_scope): Likewise.
9930 * gdbtypes.h (struct func_type, struct call_site_parameter)
9931 (struct call_site): Likewise.
9932 * stack.c (read_frame_arg): Likewise.
9933 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9934
43988095
JK
99352017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9936
9937 * defs.h (read_unsigned_leb128): New declaration.
9938 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9939 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9940 (dwarf2_find_location_expression): Call also
9941 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9942 * dwarf2loc.h (dwarf2_version): New declaration.
9943 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9944 rnglists.
9945 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9946 .debug_rnglists.
9947 (struct dwop_section_names): Add loclists_dwo.
9948 (dwop_section_names): Add .debug_loclists.dwo.
9949 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9950 (struct dwarf2_per_cu_data): Add dwarf_version.
9951 (struct dwo_sections): Add loclists.
9952 (struct attr_abbrev): Add implicit_const.
9953 (read_indirect_line_string): New declaration.
9954 (read_unsigned_leb128): Delete declaration.
9955 (rcuh_kind): New definition.
9956 (read_and_check_comp_unit_head): Change parameter
9957 is_debug_types_section to section_kind.
9958 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9959 (read_comp_unit_head): Change parameter abfd to section, add parameter
9960 section_kind. Handle DWARF-5.
9961 (error_check_comp_unit_head): Accept also DWARF version 5.
9962 (read_and_check_comp_unit_head): Change parameter
9963 is_debug_types_section to section_kind.
9964 (read_and_check_type_unit_head): Delete function.
9965 (read_abbrev_offset): Handle DWARF-5.
9966 (create_debug_type_hash_table): Add parameter section_kind. Process
9967 only DW_UT_type. Use signature and type_offset_in_tu from struct
9968 comp_unit_head.
9969 (create_debug_types_hash_table): Update create_debug_type_hash_table
9970 caller.
9971 (create_all_type_units): Call create_debug_type_hash_table.
9972 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9973 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9974 caller.
9975 (skip_one_die): Handle DW_FORM_implicit_const.
9976 (dwarf2_rnglists_process): New function.
9977 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9978 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9979 (read_attribute_value): Handle DW_FORM_implicit_const,
9980 DW_FORM_line_strp.
9981 (read_attribute): Handle DW_FORM_implicit_const.
9982 (read_indirect_string_at_offset_from): New function from
9983 read_indirect_string_at_offset.
9984 (read_indirect_string_at_offset): Call
9985 read_indirect_string_at_offset_from.
9986 (read_indirect_line_string_at_offset): New function.
9987 (read_indirect_string): New function comment.
9988 (read_indirect_line_string): New function.
9989 (read_unsigned_leb128): Make it global.
9990 (dwarf2_string_attr): Handle DWARF-5.
9991 (add_include_dir_stub, read_formatted_entries): New functions.
9992 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9993 Handle DWARF-5.
9994 (per_cu_header_read_in): Update read_comp_unit_head caller.
9995 (dwarf2_version): New function.
9996 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9997 rnglists.
9998 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9999 fields.
10000
22d2f3ab
JK
100012017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10002
10003 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10004
5f46c5a5
JK
100052017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10006
10007 * dwarf2read.c (dwarf2_ranges_process): New function from
10008 dwarf2_ranges_read.
10009 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10010 dwarf2_ranges_process.
10011
78d4d2c5
JK
100122017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10013
10014 * dwarf2read.c (create_debug_type_hash_table): New function from
10015 create_debug_types_hash_table.
10016 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10017 (create_all_type_units, open_and_init_dwo_file): Update
10018 create_debug_types_hash_table callers.
10019
1b076f25
SDJ
100202017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10021
10022 PR gdb/16188
10023 * fork-child.c (trace_start_error): Fix thinko. va_end should
10024 refer to 'ap', not 'args'.
10025
0db8980c
SDJ
100262017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10027 Pedro Alves <palves@redhat.com>
10028
10029 PR gdb/16188
10030 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10031 calls succeeded.
10032 * fork-child.c (trace_start_error): New function.
10033 (trace_start_error_with_name): Likewise.
10034 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10035 * inf-ptrace.c (inf_ptrace_me): Likewise.
10036 * inferior.h (trace_start_error): New prototype.
10037 (trace_start_error_with_name): Likewise.
10038
99e8a4f9
SDJ
100392017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10040
10041 PR gdb/21164
10042 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10043 NULL before using it.
10044 * symmisc.c (maintenance_print_symbols): Likewise.
10045 (maintenance_print_msymbols): Likewise.
10046
4e746bb6
TW
100472017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10048
10049 * NEWS: Add record Python bindings entry.
10050
100512017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10052
10053 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10054 py-record-full.o.
10055 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10056 * python/py-record-btrace.c, python/py-record-btrace.h,
10057 python/py-record-full.c, python/py-record-full.h: New file.
10058 * python/py-record.c: Add include for py-record-btrace.h and
10059 py-record-full.h.
10060 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10061 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10062 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10063 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10064 New definition.
10065 (gdbpy_initialize_btrace): New export.
10066 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10067
100682017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10069
10070 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10071 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10072 * python/py-record.c: New file.
10073 * python/python-internal.h (gdbpy_start_recording,
10074 gdbpy_current_recording, gdpy_stop_recording,
10075 gdbpy_initialize_record): New export.
10076 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10077 (python_GdbMethods): Add gdbpy_start_recording,
10078 gdbpy_current_recording and gdbpy_stop_recording.
10079
100802017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10081
10082 * record-btrace.c (record_btrace_record_method): New function.
10083 (init_record_btrace_ops): Initialize to_record_method.
10084 * record-full.c (record_full_record_method): New function.
10085 (init_record_full_ops, init_record_full_core_ops): Add
10086 record_full_record_method.
10087 * record.h (enum record_method): New enum.
10088 * target-debug.h (target_debug_print_enum_record_method: New define.
10089 * target-delegates.c: Regenerate.
10090 * target.c (target_record_method): New function.
10091 * target.h: Include record.h.
10092 (struct target_ops) <to_record_method>: New field.
10093 (target_record_method): New export.
10094
100952017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10096
10097 * record.h (record_start, record_stop): New export.
10098 * record.c (record_start, record_stop): New function.
10099
101002017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10101
10102 * btrace.c (btrace_fetch): Copy function call segments pointer
10103 into a vector.
10104 (btrace_clear): Clear the vector.
10105 (btrace_find_insn_by_number): Use binary search to find the correct
10106 function call segment.
10107 * btrace.h (brace_fun_p): New typedef.
10108 (struct btrace_thread_info) <functions>: New field.
10109
101102017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10111
10112 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10113 * btrace.c (btrace_decode_error): ... here. New function.
10114 * btrace.h (btrace_decode_error): New export.
10115
101162017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10117
10118 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10119 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10120 btrace_find_insn_by_number): Remove special case for gaps.
10121 * btrace.h (btrace_insn_get_error): New export.
10122 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10123 * record-btrace.c (btrace_insn_history): Print number for gaps.
10124 (record_btrace_info, record_btrace_goto): Handle gaps.
10125
3f77c769
TT
101262017-02-14 Tom Tromey <tom@tromey.com>
10127
10128 PR python/13598:
10129 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10130 event.
10131 * python/py-evts.c (gdbpy_initialize_py_events): Add
10132 before_prompt registry.
10133 * python/py-events.h (events_object) <before_prompt>: New field.
10134
4c2c7ac6
MM
101352017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10136
10137 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10138
5cf30ebf
LM
101392017-02-13 Luis Machado <lgustavo@codesourcery.com>
10140
10141 * symfile (_initialize_symfile): Add usage text to the load command's
10142 help text.
10143
26a06916
SM
101442017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10145
10146 * utils.c (defaulted_query): Don't query on secondary UIs.
10147
0b145e37
TT
101482017-02-10 Tom Tromey <tom@tromey.com>
10149
10150 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10151
2d8365c4
TT
101522017-02-10 Tom Tromey <tom@tromey.com>
10153
10154 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10155 "cleanup" local.
10156 * python/py-type.c (typy_legacy_template_argument): Remove
10157 unnecessary "cleanup" local.
10158
2bb8f231
TT
101592017-02-10 Tom Tromey <tom@tromey.com>
10160
10161 * python/python.c (do_start_initialization): New function, from
10162 _initialize_python.
10163 (_initialize_python): Call do_start_initialization.
10164 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10165 goto.
10166
1bdfaf42
TT
101672017-02-10 Tom Tromey <tom@tromey.com>
10168
10169 * python/py-prettyprint.c (pretty_print_one_value): Use
10170 gdbpy_ref.
10171
88b6faea
TT
101722017-02-10 Tom Tromey <tom@tromey.com>
10173
10174 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10175 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10176 gdbpy_ref.
10177 * python/py-type.c (field_new): Use gdbpy_ref.
10178 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10179 gdbpy_ref.
10180 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10181 (py_free_pspace): Likewise.
10182 (pspace_to_pspace_object): Likewise.
10183 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10184 (py_free_objfile): Likewise.
10185 (objfile_to_objfile_object): Likewise.
10186 * python/py-inferior.c (delete_thread_object): Use
10187 gdbpy_ref.
10188 (infpy_read_memory): Likewise.
10189 (py_free_inferior): Likewise.
10190 * python/py-evtregistry.c (create_eventregistry_object): Use
10191 gdbpy_ref.
10192 * python/py-event.c (create_event_object): Use gdbpy_ref.
10193
7780f186
TT
101942017-02-10 Tom Tromey <tom@tromey.com>
10195
10196 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10197 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10198 used.
10199 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10200 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10201 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10202 python/py-framefilter.c, python/py-function.c,
10203 python/py-inferior.c, python/py-infevents.c,
10204 python/py-linetable.c, python/py-newobjfileevent.c,
10205 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10206 python/py-signalevent.c, python/py-stopevent.c,
10207 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10208 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10209 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10210 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10211
d4b0bb18
TT
102122017-02-10 Tom Tromey <tom@tromey.com>
10213
10214 * ui-out.h (ui_out_emit_type): New class.
10215 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10216 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10217 and ui_out_emit_tuple.
10218 (enumerate_locals): Likewise.
10219 (py_mi_print_variables, py_print_locals, py_print_args): Use
10220 ui_out_emit_list.
10221 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10222 ui_out_emit_list.
10223 * common/gdb_optional.h: New file.
10224
f67f945c
MG
102252017-02-10 Martin Galvan <martingalvan@sourceware.org>
10226
10227 * MAINTAINERS (Write After Approval): Update my e-mail address.
10228
18da0c51
MG
102292017-02-10 Martin Galvan <martingalvan@sourceware.org>
10230
10231 PR gdb/21122
10232 * breakpoint.c (_initialize_breakpoint): Update the help description
10233 of the 'commands' command to indicate that it takes a list argument.
10234
62c14536
SM
102352017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10236
10237 * interps.c (current_interp_set_logging): Remove "return".
10238
ff6fa247
GB
102392017-02-09 Gary Benson <gbenson@redhat.com>
10240
10241 * symtab.c (add_symtab_completions): Prevent NULL pointer
10242 dereference.
10243
a474bd8e
PA
102442017-02-08 Pedro Alves <palves@redhat.com>
10245
10246 * interps.c (interp::interp): Remove reference to quiet_p.
10247 (interp_set): Make static. Remove dead "Switching to" output
10248 code.
10249 (interp_quiet_p, interp_set_quiet): Delete.
10250 (interpreter_exec_cmd): Don't set the interpreter quiet.
10251 * interps.h (interp_quiet_p): Make static.
10252 (class interp) <quiet_p>: Remove field
10253
3d7b173c
JG
102542017-02-08 Jerome Guitton <guitton@adacore.com>
10255
604c4576
JG
10256 * cli/cli-decode.c (find_command_name_length): Make it extern.
10257 * cli/cli-decode.h (find_command_name_length): Declare.
10258 * cli/cli-script.c (command_name_equals, line_first_arg):
10259 New functions.
10260 (process_next_line): Use cli-decode to parse command names.
10261 (build_command_line): Make args a constant pointer.
10262
102632017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 10264
3d7b173c
JG
10265 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10266 Remove case-insensitive search.
10267
1291063d
JM
102682017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10269
10270 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10271 at the end of the line. Avoids an ARI warning.
10272
20b477a7
LM
102732017-02-06 Luis Machado <lgustavo@codesourcery.com>
10274
10275 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10276 rdseed instructions.
10277 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10278
3f7b46f2
IR
102792017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10280
10281 PR tdep/20936
10282 Provide and use sparc32 and sparc64 target description XML files.
10283 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10284 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10285 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10286 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10287 * features/sparc/sparc32-solaris.xml: New file.
10288 * features/sparc/sparc64-solaris.xml: New file.
10289 * features/sparc/sparc32-solaris.c: Generated.
10290 * features/sparc/sparc64-solaris.c: Generated.
10291 * sparc-tdep.h: Account for differences in target descriptions.
10292 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10293 (sparc32_register_type): Use target provided registers.
10294 (validate_tdesc_registers): New function.
10295 (sparc32_gdbarch_init): Use tdesc_has_registers.
10296 Set pseudoregister functions.
10297 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10298 (sparc64_register_type): Use target provided registers.
10299 (sparc64_init_abi): Set pseudoregister functions.
10300
f0fd41c1
TT
103012017-02-03 Tom Tromey <tom@tromey.com>
10302
10303 PR rust/21097:
10304 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10305 with a single member.
10306
d6f9b0fb
PA
103072017-02-03 Pedro Alves <palves@redhat.com>
10308
10309 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10310 (cli_interp_base::~cli_interp_base): New.
10311 (cli_interp): New struct.
10312 (as_cli_interp): Cast the interp itself to cli_interp.
10313 (cli_interpreter_pre_command_loop): Rename to ...
10314 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10315 parameter.
10316 (cli_interpreter_init): Rename to ...
10317 (cli_interp::init): ... this. Remove 'self' parameter. Use
10318 boolean. Make extern.
10319 (cli_interpreter_resume): Rename to ...
10320 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10321 extern.
10322 (cli_interpreter_suspend): Rename to ...
10323 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10324 extern.
10325 (cli_interpreter_exec): Rename to ...
10326 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10327 extern.
10328 (cli_interpreter_supports_command_editing): Rename to ...
10329 (cli_interp_base::supports_command_editing): ... this. Remove
10330 'interp' parameter. Make extern.
10331 (cli_ui_out): Rename to ...
10332 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10333 Make extern.
10334 (cli_set_logging): Rename to ...
10335 (cli_interp_base::set_logging): ... this. Remove 'interp'
10336 parameter. Make extern.
10337 (cli_interp_procs): Delete.
10338 (cli_interp_factory): Adjust to use "new".
10339 * cli/cli-interp.h: Include "interps.h".
10340 (struct cli_interp_base): New struct.
10341 * interps.c (struct interp): Delete. Fields moved to interps.h.
10342 (interp_new): Delete.
10343 (interp::interp, interp::~interp): New.
10344 (interp_set): Use bool, and return void. Assume the interpreter
10345 has suspend, init and resume methods, and that the all return
10346 void.
10347 (set_top_level_interpreter): interp_set returns void.
10348 (interp_ui_out): Adapt.
10349 (current_interp_set_logging): Adapt.
10350 (interp_data): Delete.
10351 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10352 (interp_exec): Adapt.
10353 (top_level_interpreter_data): Delete.
10354 * interps.h (interp_init_ftype, interp_resume_ftype)
10355 (interp_suspend_ftype, interp_exec_ftype)
10356 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10357 (class interp): New.
10358 (interp_new): Delete.
10359 (interp_set): Now returns void. Use bool.
10360 (interp_data, top_level_interpreter_data): Delete.
10361 * mi/mi-common.h: Include interps.h.
10362 (class mi_interp): Inherit from interp. Define a ctor. Declare
10363 init, resume, suspect, exec, interp_ui_out, set_logging and
10364 pre_command_loop methods.
10365 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10366 (mi_interpreter_init): Rename to ...
10367 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10368 bool, return void and make extern. Adjust.
10369 (mi_interpreter_resume): ... Rename to ...
10370 (mi_interp::resume): ... this. Remove the 'data' parameter,
10371 return void and make extern. Adjust.
10372 (mi_interpreter_suspend): ... Rename to ...
10373 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10374 return void and make extern. Adjust.
10375 (mi_interpreter_exec): ... Rename to ...
10376 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10377 extern. Adjust.
10378 (mi_interpreter_pre_command_loop): ... Rename to ...
10379 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10380 parameter and make extern.
10381 (mi_on_normal_stop_1): Adjust.
10382 (mi_ui_out): Rename to ...
10383 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10384 parameter and make extern. Adjust.
10385 (mi_set_logging): Rename to ...
10386 (mi_interp::set_logging): ... this. Remove the 'interp'
10387 parameter and make extern. Adjust.
10388 (mi_interp_procs): Delete.
10389 (mi_interp_factory): Adjust to use 'new'.
10390 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10391 (mi_print_exception, mi_execute_command, mi_load_progress):
10392 Adjust.
10393 * tui/tui-interp.c (tui_interp): New class.
10394 (as_tui_interp): Return a tui_interp pointer.
10395 (tui_on_normal_stop, tui_on_signal_received)
10396 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10397 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10398 to use interp::interp_ui_out.
10399 (tui_init): Rename to ...
10400 (tui_interp::init): ... this. Remove the 'self' parameter, use
10401 bool, return void and make extern. Adjust.
10402 (tui_resume): Rename to ...
10403 (tui_interp::resume): ... this. Remove the 'data' parameter,
10404 return void and make extern. Adjust.
10405 (tui_suspend): Rename to ...
10406 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10407 return void and make extern. Adjust.
10408 (tui_ui_out): Rename to ...
10409 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10410 parameter, and make extern. Adjust.
10411 (tui_exec): Rename to ...
10412 (tui_interp::exec): ... this. Remove the 'data' parameter and
10413 make extern.
10414 (tui_interp_procs): Delete.
10415 (tui_interp_factory): Use "new".
10416
65c40c95
TT
104172017-02-02 Tom Tromey <tom@tromey.com>
10418
10419 * rust-exp.y (ends_raw_string, space_then_number)
10420 (rust_identifier_start_p): Return bool.
10421 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10422 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10423 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10424 (rust_chartype_p): Return bool.
10425 (val_print_struct, rust_print_struct_def, rust_print_type):
10426 Update.
10427 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10428 Return bool.
10429
b50f188d
TT
104302017-02-02 Tom Tromey <tom@tromey.com>
10431
10432 * rust-lang.c: Reindent.
10433
03c85b11
TT
104342017-02-02 Tom Tromey <tom@tromey.com>
10435
10436 * rust-lang.h (rust_crate_for_block): Update.
10437 * rust-lang.c (rust_crate_for_block): Return std::string.
10438 (rust_get_disr_info): Use std:;string, not
10439 gdb::unique_xmalloc_ptr.
10440 * rust-exp.y (crate_name): Update.
10441
9b6da501
PA
104422017-02-02 Pedro Alves <palves@redhat.com>
10443
10444 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10445 field out of gdb_disassembler_test and make it static.
10446
ec4cb20b
PA
104472017-02-02 Pedro Alves <palves@redhat.com>
10448
10449 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10450 mi1_interp and mi_interp fields.
10451
5be5dbf0
PA
104522017-02-02 Pedro Alves <palves@redhat.com>
10453
616268b6
PA
10454 * cli/cli-interp.c (struct saved_output_files, saved_output):
10455 Moved from cli/cli-logging.c.
10456 (cli_set_logging): New function.
10457 (cli_interp_procs): Install cli_set_logging.
10458 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10459 Declare.
10460 * cli/cli-logging.c (struct saved_output_files, saved_output):
10461 Moved to cli/cli-interp.c.
10462 (pop_output_files): Don't save outputs here.
10463 (make_logging_output): New function.
10464 (handle_redirections): Don't build tee nor save previous outputs
10465 here.
10466 * interps.c (current_interp_set_logging): Change prototype.
10467 Assume there's always a set_logging_proc method installed.
10468 * interps.h (interp_set_logging_ftype): Change prototype.
10469 (current_interp_set_logging): Change prototype and adjust comment.
10470 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10471 use make_logging_output.
10472 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
104732017-02-02 Pedro Alves <palves@redhat.com>
10474
5be5dbf0
PA
10475 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10476 from ...
10477 (set_logging_overwrite): ... here.
10478 (logging_no_redirect_file): Delete.
10479 (set_logging_redirect): Don't handle redirection on the fly.
10480 Instead warn that "logging off" / "logging on" is necessary.
10481 (pop_output_files): Delete references to logging_no_redirect_file.
10482 (show_logging_command): Always speak in terms of what will happen
10483 once logging is reenabled.
10484
c99cc448
PA
104852017-02-02 Pedro Alves <palves@redhat.com>
10486
10487 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10488
8b172ce7
PA
104892017-02-02 Pedro Alves <palves@redhat.com>
10490
10491 * disasm.c (gdb_pretty_print_insn): Rename to ...
10492 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10493 Remove gdbarch parameter. Adapt to clear the object's buffers
10494 instead of allocating new buffers, and to print using the object's
10495 gdb_disassembler instead of calling gdb_print_insn.
10496 (dump_insns): Use gdb_pretty_print_disassembler.
10497 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10498 (gdb_pretty_print_disassembler): New class.
10499 * record-btrace.c (btrace_insn_history): Use
10500 gdb_pretty_print_disassembler.
10501
d7e74731
PA
105022017-02-02 Pedro Alves <palves@redhat.com>
10503
10504 * ada-lang.c (type_as_string): Use string_file.
10505 * ada-valprint.c (ada_print_floating): Use string_file.
10506 * ada-varobj.c (ada_varobj_scalar_image)
10507 (ada_varobj_get_value_image): Use string_file.
10508 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10509 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10510 * breakpoint.c (update_inserted_breakpoint_locations)
10511 (insert_breakpoint_locations, reattach_breakpoints)
10512 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10513 (print_it_watchpoint): Use string_file.
10514 (save_breakpoints): Use stdio_file.
10515 * c-exp.y (oper): Use string_file.
10516 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10517 tee_file.
10518 (pop_output_files): Use delete.
10519 (handle_redirections): Use stdio_file and tee_file.
10520 * cli/cli-setshow.c (do_show_command): Use string_file.
10521 * compile/compile-c-support.c (c_compute_program): Use
10522 string_file.
10523 * compile/compile-c-symbols.c (generate_vla_size): Take a
10524 'string_file &' instead of a 'ui_file *'.
10525 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10526 of a 'ui_file *'. Use string_file.
10527 (generate_c_for_variable_locations): Take a 'string_file &'
10528 instead of a 'ui_file *'.
10529 * compile/compile-internal.h (generate_c_for_for_one_variable):
10530 Take a 'string_file &' instead of a 'ui_file *'.
10531 * compile/compile-loc2c.c (push, pushf, unary, binary)
10532 (print_label, pushf_register_address, pushf_register)
10533 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10534 'ui_file *'. Adjust.
10535 * compile/compile.c (compile_to_object): Use string_file.
10536 * compile/compile.h (compile_dwarf_expr_to_c)
10537 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10538 'ui_file *'.
10539 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10540 (replace_typedefs_qualified_name): Use string_file and
10541 obstack_copy0.
10542 * disasm.c (gdb_pretty_print_insn): Use string_file.
10543 (gdb_disassembly): Adjust reference the null_stream global.
10544 (do_ui_file_delete): Delete.
10545 (gdb_insn_length): Use null_stream.
10546 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10547 * dwarf2loc.c (dwarf2_compile_property_to_c)
10548 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10549 'string_file &' instead of a 'ui_file *'.
10550 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10551 * dwarf2read.c (do_ui_file_peek_last): Delete.
10552 (dwarf2_compute_name): Use string_file.
10553 * event-top.c (gdb_setup_readline): Use stdio_file.
10554 * gdbarch.sh (verify_gdbarch): Use string_file.
10555 * gdbtypes.c (safe_parse_type): Use null_stream.
10556 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10557 string_file.
10558 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10559 'string_file *' instead of a 'ui_file *'.
10560 (gdbscm_arch_disassemble): Use string_file.
10561 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10562 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10563 inherits from ui_file.
10564 (ioscm_file_port_delete, ioscm_file_port_rewind)
10565 (ioscm_file_port_put): Delete.
10566 (ioscm_file_port_write): Rename to ...
10567 (ioscm_file_port::write): ... this. Remove file_port_magic
10568 checks.
10569 (ioscm_file_port_new): Delete.
10570 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10571 ui_file_up.
10572 * guile/scm-type.c (tyscm_type_name): Use string_file.
10573 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10574 Use string_file.
10575 * infcmd.c (print_return_value_1): Use string_file.
10576 * infrun.c (print_target_wait_results): Use string_file.
10577 * language.c (add_language): Use string_file.
10578 * location.c (explicit_to_string_internal): Use string_file.
10579 * main.c (captured_main_1): Use null_file.
10580 * maint.c (maintenance_print_architecture): Use stdio_file.
10581 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10582 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10583 event_channel>: Change type to mi_console_file pointer.
10584 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10585 (mi_console_file_delete): Delete.
10586 (struct mi_console_file): Delete.
10587 (mi_console_file_magic): Delete.
10588 (mi_console_file_new): Delete.
10589 (mi_console_file::mi_console_file): New.
10590 (mi_console_file_delete): Delete.
10591 (mi_console_file_fputs): Delete.
10592 (mi_console_file::write): New.
10593 (mi_console_raw_packet): Delete.
10594 (mi_console_file::flush): New.
10595 (mi_console_file_flush): Delete.
10596 (mi_console_set_raw): Rename to ...
10597 (mi_console_file::set_raw): ... this.
10598 * mi/mi-console.h (class mi_console_file): New class.
10599 (mi_console_file_new, mi_console_set_raw): Delete.
10600 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10601 (mi_set_logging): Use delete and tee_file. Adjust.
10602 * mi/mi-main.c (output_register): Use string_file.
10603 (mi_cmd_data_evaluate_expression): Use string_file.
10604 (mi_cmd_data_read_memory): Use string_file.
10605 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10606 * mi/mi-out.c (mi_ui_out::main_stream): New.
10607 (mi_ui_out::rewind): Use main_stream and
10608 string_file.
10609 (mi_ui_out::put): Use main_stream and string_file.
10610 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10611 Allocate a 'string_file' instead.
10612 (mi_out_new): Don't allocate a mem_fileopen stream here.
10613 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10614 (mi_ui_out::main_stream): Declare method.
10615 * printcmd.c (eval_command): Use string_file.
10616 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10617 * python/py-arch.c (archpy_disassemble): Use string_file.
10618 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10619 * python/py-frame.c (frapy_str): Use string_file.
10620 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10621 Use string_file.
10622 * python/py-type.c (typy_str): Use string_file.
10623 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10624 * python/py-value.c (valpy_str): Use string_file.
10625 * record-btrace.c (btrace_insn_history): Use string_file.
10626 * regcache.c (regcache_print): Use stdio_file.
10627 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10628 * remote.c (escape_buffer): Use string_file.
10629 * rust-lang.c (rust_get_disr_info): Use string_file.
10630 * serial.c (serial_open_ops_1): Use stdio_file.
10631 (do_serial_close): Use delete.
10632 * stack.c (print_frame_arg): Use string_file.
10633 (print_frame_args): Remove local mem_fileopen stream, not used.
10634 (print_frame): Use string_file.
10635 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10636 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10637 Take a 'string_file *' instead of a 'ui_file *'.
10638 * top.c (new_ui): Use stdio_file and stderr_file.
10639 (free_ui): Use delete.
10640 (execute_command_to_string): Use string_file.
10641 (quit_confirm): Use string_file.
10642 * tracepoint.c (collection_list::append_exp): Use string_file.
10643 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10644 * tui/tui-file.c: Don't include "ui-file.h".
10645 (enum streamtype, struct tui_stream): Delete.
10646 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10647 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10648 (tui_file::tui_file): New method.
10649 (tui_file_fputs): Delete.
10650 (tui_file_get_strbuf): Delete.
10651 (tui_file::puts): New method.
10652 (tui_file_adjust_strbuf): Delete.
10653 (tui_file_flush): Delete.
10654 (tui_file::flush): New method.
10655 * tui/tui-file.h: Tweak intro comment.
10656 Include ui-file.h.
10657 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10658 (tui_file_adjust_strbuf): Delete declarations.
10659 (class tui_file): New class.
10660 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10661 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10662 (tui_register_format): Use string_stream.
10663 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10664 (tui_get_function_from_frame): Use string_file.
10665 * typeprint.c (type_to_string): Use string_file.
10666 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10667 (null_stream): New global.
10668 (ui_file_delete): Delete.
10669 (ui_file::ui_file): New.
10670 (null_file_isatty): Delete.
10671 (ui_file::~ui_file): New.
10672 (null_file_rewind): Delete.
10673 (ui_file::printf): New.
10674 (null_file_put): Delete.
10675 (null_file_flush): Delete.
10676 (ui_file::putstr): New.
10677 (null_file_write): Delete.
10678 (ui_file::putstrn): New.
10679 (null_file_read): Delete.
10680 (ui_file::putc): New.
10681 (null_file_fputs): Delete.
10682 (null_file_write_async_safe): Delete.
10683 (ui_file::vprintf): New.
10684 (null_file_delete): Delete.
10685 (null_file::write): New.
10686 (null_file_fseek): Delete.
10687 (null_file::puts): New.
10688 (ui_file_data): Delete.
10689 (null_file::write_async_safe): New.
10690 (gdb_flush, ui_file_isatty): Adjust.
10691 (ui_file_put, ui_file_rewind): Delete.
10692 (ui_file_write): Adjust.
10693 (ui_file_write_for_put): Delete.
10694 (ui_file_write_async_safe, ui_file_read): Adjust.
10695 (ui_file_fseek): Delete.
10696 (fputs_unfiltered): Adjust.
10697 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10698 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10699 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10700 (set_ui_file_data): Delete.
10701 (string_file::~string_file, string_file::write)
10702 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10703 (do_ui_file_as_string, ui_file_as_string): Delete.
10704 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10705 (struct mem_file): Delete.
10706 (mem_file_new): Delete.
10707 (stdio_file::stdio_file): New.
10708 (mem_file_delete): Delete.
10709 (stdio_file::stdio_file): New.
10710 (mem_fileopen): Delete.
10711 (stdio_file::~stdio_file): New.
10712 (mem_file_rewind): Delete.
10713 (stdio_file::set_stream): New.
10714 (mem_file_put): Delete.
10715 (stdio_file::open): New.
10716 (mem_file_write): Delete.
10717 (stdio_file_magic, struct stdio_file): Delete.
10718 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10719 (stdio_file::flush): New.
10720 (stdio_file_read): Rename to ...
10721 (stdio_file::read): ... this. Adjust.
10722 (stdio_file_write): Rename to ...
10723 (stdio_file::write): ... this. Adjust.
10724 (stdio_file_write_async_safe): Rename to ...
10725 (stdio_file::write_async_safe) ... this. Adjust.
10726 (stdio_file_fputs): Rename to ...
10727 (stdio_file::puts) ... this. Adjust.
10728 (stdio_file_isatty): Delete.
10729 (stdio_file_fseek): Delete.
10730 (stdio_file::isatty): New.
10731 (stderr_file_write): Rename to ...
10732 (stderr_file::write) ... this. Adjust.
10733 (stderr_file_fputs): Rename to ...
10734 (stderr_file::puts) ... this. Adjust.
10735 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10736 (stderr_file::stderr_file): New.
10737 (tee_file_magic): Delete.
10738 (struct tee_file): Delete.
10739 (tee_file::tee_file): New.
10740 (tee_file_new): Delete.
10741 (tee_file::~tee_file): New.
10742 (tee_file_delete): Delete.
10743 (tee_file_flush): Rename to ...
10744 (tee_file::flush): ... this. Adjust.
10745 (tee_file_write): Rename to ...
10746 (tee_file::write): ... this. Adjust.
10747 (tee_file::write_async_safe): New.
10748 (tee_file_fputs): Rename to ...
10749 (tee_file::puts): ... this. Adjust.
10750 (tee_file_isatty): Rename to ...
10751 (tee_file::isatty): ... this. Adjust.
10752 * ui-file.h (struct obstack, struct ui_file): Don't
10753 forward-declare.
10754 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10755 (ui_file_write_ftype)
10756 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10757 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10758 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10759 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10760 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10761 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10762 (set_ui_file_fseek): Delete.
10763 (ui_file_data, ui_file_delete, ui_file_rewind)
10764 (struct ui_file): New.
10765 (ui_file_up): New.
10766 (class null_file): New.
10767 (null_stream): Declare.
10768 (ui_file_write_for_put, ui_file_put): Delete.
10769 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10770 Delete.
10771 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10772 (gdb_fopen, tee_file_new): Delete.
10773 (struct string_file): New.
10774 (struct stdio_file): New.
10775 (stdio_file_up): New.
10776 (struct stderr_file): New.
10777 (class tee_file): New.
10778 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10779 of a 'ui_file *'. Adjust.
10780 * ui-out.h (class ui_out) <field_stream>: Likewise.
10781 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10782 (null_stream): Delete.
10783 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10784 Adjust.
10785 * utils.h (struct ui_file): Delete forward declaration..
10786 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10787 (error_stream): Take a 'string_file &' instead of a
10788 'ui_file *'.
10789 * varobj.c (varobj_value_get_print_value): Use string_file.
10790 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10791 * gdbarch.c: Regenerate.
10792
187808b0
PA
107932017-02-02 Pedro Alves <palves@redhat.com>
10794
10795 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10796 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10797 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10798 Adjust to call gdb_print_insn instead of
10799 gdb_disassembler::print_insn.
10800 (dump_insns, do_mixed_source_and_assembly_deprecated)
10801 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10802 'gdbarch' parameter. Remove gdb_disassembler parameter.
10803 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10804 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10805 declaration.
10806 (gdb_pretty_print_insn): Re-add declaration.
10807 * record-btrace.c (btrace_insn_history): Don't allocate a
10808 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10809
7a8eb317
SM
108102017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10811
10812 * disasm.h (gdb_disassembly): Remove file_string parameter.
10813 * disasm.c (gdb_disassembly): Likewise.
10814 * cli/cli-cmds.c (print_disassembly): Adapt.
10815 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10816 * stack.c (do_gdb_disassembly): Likewise.
10817
7346ef59
AA
108182017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10819
10820 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10821 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10822 targets. And if the implicit value is longer than needed, extract
10823 the first bytes instead of the "least significant" ones.
10824
cd4007e4
MM
108252017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10826
10827 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10828 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10829 (btrace_fetch): Assert can_access_registers_ptid.
10830 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10831 validate_registers_access.
10832
cf77c34e
MM
108332017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10834
10835 * gdbthread.h (can_access_registers_ptid): New.
10836 * thread.c (can_access_registers_ptid): New.
10837
be85ce7d
PA
108382017-02-01 Pedro Alves <palves@redhat.com>
10839
10840 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10841
29b0b251
PA
108422017-01-31 Pedro Alves <palves@redhat.com>
10843
10844 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10845 Fix typos.
10846
289b5b24
PA
108472017-01-31 Pedro Alves <palves@redhat.com>
10848
10849 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10850 not used.
10851
b47413b4
PA
108522017-01-31 Pedro Alves <palves@redhat.com>
10853
10854 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10855
60adb36c
PA
108562017-01-31 Pedro Alves <palves@redhat.com>
10857
10858 * common/scoped_restore.h
10859 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10860 change the value's parameter type to T2.
10861 (make_scoped_restore): Likewise.
10862
2735833d
WT
108632017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10864 Richard Henderson <rth@redhat.com>
10865
10866 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10867 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10868 GS_BASE for older kernels.
10869 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10870 GS_BASE for older kernels.
10871 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10872 and GS_BASE to the offset table.
10873 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10874 system register group.
10875 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10876 for older kernels.
10877 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10878 amd64 ABI.
10879 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10880 AMD64_GSBASE_REGNUM.
10881 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10882 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10883 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10884 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10885 i386/64bit-segments.xml in those rules.
10886 * features/i386/64bit-segments.xml: New file.
10887 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10888 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10889 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10890 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10891 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10892 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10893 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10894 * features/i386/amd64-avx-linux.c: Regenerated.
10895 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10896 * features/i386/amd64-avx-mpx.c: Regenerated.
10897 * features/i386/amd64-avx512-linux.c: Regenerated.
10898 * features/i386/amd64-linux.c: Regenerated.
10899 * features/i386/amd64-mpx-linux.c: Regenerated.
10900 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10901 * features/i386/i386-avx-mpx.c: Regenerated.
10902 * features/i386/x32-avx-linux.c: Regenerated.
10903 * features/i386/x32-avx512-linux.c: Regenerated.
10904 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10905 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10906 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10907 * regformats/i386/amd64-linux.dat: Regenerated.
10908 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10909 * regformats/i386/x32-avx-linux.dat: Regenerated.
10910 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10911 * regformats/i386/x32-linux.dat: Regenerated.
10912
8884e97e
WT
109132017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10914
10915 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10916 Set to AMD64_NUM_REGS.
10917
7005d26a
WT
109182017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10919
10920 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10921 that checks validity of a register number.
10922
4bd2e1b2
KC
109232017-01-27 Kees Cook <keescook@google.com>
10924
10925 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10926 fetch_fpregs if target has fpa registers.
10927 (arm_linux_store_inferior_registers): Call store_fpregs if target
10928 has fpa registers.
10929
7cf1de6c
AA
109302017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10931
10932 * cris-tdep.c (cris_gdbarch_init): Remove check for
10933 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10934
874a1c8c
AT
109352017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10936
10937 * corelow.c (get_core_register_section): Check for regset
10938 existence before checking for REGSET_VARIABLE_SIZE.
10939
d8b49cf0
YQ
109402017-01-26 Yao Qi <yao.qi@linaro.org>
10941 Pedro Alves <palves@redhat.com>
10942
10943 PR gdb/20939
10944 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10945 call memory_error, save memaddr instead.
10946 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10947 negative, cal memory_error.
10948 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10949
658ca58c
YQ
109502017-01-26 Yao Qi <yao.qi@linaro.org>
10951
10952 * disasm-selftests.c (memory_error_test): New function.
10953 (_initialize_disasm_selftests): Register memory_error_test.
10954
79843d45
YQ
109552017-01-26 Yao Qi <yao.qi@linaro.org>
10956
10957 * Makefile.in (SFILES): Add disasm-selftests.c and
10958 selftest-arch.c.
10959 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10960 * disasm-selftests.c: New file.
10961 * selftest-arch.c: New file.
10962 * selftest-arch.h: New file.
10963
8cafda32
YQ
109642017-01-26 Yao Qi <yao.qi@linaro.org>
10965
10966 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10967 to bfd_arch_mep. Don't return 0 if section is not
10968 found. Call print_insn_mep.
10969
e47ad6c0
YQ
109702017-01-26 Pedro Alves <palves@redhat.com>
10971 Yao Qi <yao.qi@linaro.org>
10972
10973 * arm-tdep.c: Include "disasm.h".
10974 (gdb_print_insn_arm): Update code to get gdbarch.
10975 * disasm.c (dis_asm_read_memory): Change it to
10976 gdb_disassembler::dis_asm_read_memory.
10977 (dis_asm_memory_error): Likewise.
10978 (dis_asm_print_address): Likewise.
10979 (gdb_pretty_print_insn): Change it to
10980 gdb_disassembler::pretty_print_insn.
10981 (dump_insns): Add one argument gdb_disassemlber. All
10982 callers updated.
10983 (do_mixed_source_and_assembly_deprecated): Likewise.
10984 (do_mixed_source_and_assembly): Likewise.
10985 (do_assembly_only): Likewise.
10986 (gdb_disassembler::gdb_disassembler): New.
10987 (gdb_disassembler::print_insn): New.
10988 * disasm.h (class gdb_disassembler): New.
10989 (gdb_pretty_print_insn): Remove declaration.
10990 (gdb_disassemble_info): Likewise.
10991 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10992 (gdbscm_disasm_read_memory_worker): Update.
10993 (gdbscm_disasm_read_memory): Update.
10994 (gdbscm_disasm_memory_error): Remove.
10995 (gdbscm_disasm_print_address): Remove.
10996 (gdbscm_disassembler::gdbscm_disassembler): New.
10997 (gdbscm_print_insn_from_port): Update.
10998 * mips-tdep.c: Include disasm.h.
10999 (gdb_print_insn_mips): Update code to get gdbarch.
11000 * record-btrace.c (btrace_insn_history): Update.
11001 * spu-tdep.c: Include disasm.h.
11002 (struct spu_dis_asm_data): Remove.
11003 (struct spu_dis_asm_info): New.
11004 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11005 SPU id.
11006 (gdb_print_insn_spu): Cast disassemble_info to
11007 spu_dis_asm_info.
11008
80d75874
YQ
110092017-01-26 Yao Qi <yao.qi@linaro.org>
11010
11011 * disasm.c (do_ui_file_delete): Delete.
11012 (gdb_insn_length): Move code creating stream to ...
11013 * utils.c (null_stream): ... here. New function.
11014 * utils.h (null_stream): Declare.
11015
60685cd0
SM
110162017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11017
11018 * python/py-inferior.c (find_thread_object): Return directly
11019 from the loop. Remove "found" variable.
11020
eb1cdb62
JB
110212017-01-21 Joel Brobecker <brobecker@adacore.com>
11022
11023 GDB 7.12.1 released.
11024
b1ce6568
SM
110252017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11026
11027 * python/py-function.c (fnpy_call): Reorder declarations to have
11028 the gdbpy_enter object declared first.
11029 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11030
6f8b0407
SM
110312017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11032
fec93fb1 11033 PR python/21068
6f8b0407
SM
11034 * python/python-internal.h (PyMem_RawMalloc): Define for
11035 Python < 3.4.
11036 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11037 PyMem_RawMalloc instead of PyMem_Malloc.
11038
78cbbba8
LM
110392017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11040 Luis Machado <lgustavo@codesourcery.com>
11041
11042 * NEWS (New commands): Mention flash-erase.
11043 (New MI commands): Mention target-flash-erase.
11044 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11045 command.
11046 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11047 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11048 * target.c (flash_erase_command): New function.
11049 (initialize_targets): Add new flash-erase command.
11050 * target.h (flash_erase_command): New declaration.
11051
2132fe85
JB
110522017-01-20 Joel Brobecker <brobecker@adacore.com>
11053
11054 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11055 HAVE_SYS_PROCFS_H is defined.
11056
d1dff226
AH
110572017-01-18 Alan Hayward <alan.hayward@arm.com>
11058
11059 * remote.c (struct cached_reg): Change data into a pointer.
11060 * (stop_reply_dtr): Free data pointers before deleting vector.
11061 (process_stop_reply): Likewise.
11062 (remote_parse_stop_reply): Allocate space for data
11063
9890e433
AH
110642017-01-18 Alan Hayward <alan.hayward@arm.com>
11065
11066 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11067 MAX_REGISTER_SIZE.
11068 (amd64_pseudo_register_read_value): Likewise.
11069 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11070 (store_register_using_P): Likewise.
11071 * regcache.c (regcache_xfer_part): Likewise.
11072
7a36499a
IR
110732017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11074
11075 Split real and pseudo registers.
11076 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11077 (sparc32_pseudo_regnum): New enum.
11078 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11079 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11080 (SPARC32_CP0_REGISTERS): New macro.
11081 (sparc32_pseudo_register_name): New function.
11082 (sparc32_register_name): Use sparc32_pseudo_register_name.
11083 (sparc32_pseudo_register_type): New function.
11084 (sparc32_register_type): Use sparc32_pseudo_register_type.
11085 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11086 pseudo register numbers.
11087 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11088 (SPARC64_CP0_REGISTERS): New macro.
11089 (sparc64_pseudo_register_name): New function.
11090 (sparc64_register_name): Use sparc64_pseudo_register_name.
11091 (sparc64_pseudo_register_type): New function.
11092 (sparc64_register_type): Use sparc64_pseudo_register_type.
11093 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11094 pseudo register numbers.
11095 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11096 sparc64_store_arguments): Handle pseudo register numbers.
11097
6f8976bf
YQ
110982017-01-13 Yao Qi <yao.qi@linaro.org>
11099
11100 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11101 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11102 output.
11103 (getpkt_or_notif_sane_1): Likewise.
11104
e4241ace
YQ
111052017-01-13 Yao Qi <yao.qi@linaro.org>
11106
11107 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11108 of CC. Pass "-x c++-header" instead of "-x c".
11109
3015c064
SM
111102017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11111
11112 * remote.c (remote_can_async_p): Update comment.
11113
fde1b17d
SM
111142017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11115
11116 * linux-nat.c (linux_nat_can_async_p): Update comment.
11117
ca1ca08b
SM
111182017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11119
11120 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11121
4ad2da73
SM
111222017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11123
11124 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11125
c8b23b3f
TT
111262017-01-10 Tom Tromey <tom@tromey.com>
11127
11128 * python/py-type.c (typy_legacy_template_argument): Update.
11129 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11130 ~demangle_parse_info): Declare new members.
11131 (cp_demangled_name_to_comp): Return unique_ptr.
11132 (cp_demangled_name_parse_free)
11133 (make_cleanup_cp_demangled_name_parse_free)
11134 (cp_new_demangle_parse_info): Remove.
11135 * cp-support.c (do_demangled_name_parse_free_cleanup)
11136 (make_cleanup_cp_demangled_name_parse_free): Remove.
11137 (inspect_type, cp_canonicalize_string_full)
11138 (cp_canonicalize_string): Update.
11139 (mangled_name_to_comp): Change return type.
11140 (cp_class_name_from_physname, method_name_from_physname)
11141 (cp_func_name, cp_remove_params): Update.
11142 * cp-name-parser.y (demangle_parse_info): New constructor, from
11143 cp_new_demangle_parse_info.
11144 (~demangle_parse_info): New destructor, from
11145 cp_demangled_name_parse_free.
11146 (cp_merge_demangle_parse_infos): Update.
11147 (cp_demangled_name_to_comp): Change return type.
11148
1ac32117
TT
111492017-01-10 Tom Tromey <tom@tromey.com>
11150
11151 * top.c (prevent_dont_repeat): Change return type.
11152 * python/python.c (execute_gdb_command): Use std::string.
11153 Update.
11154 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11155 * command.h (prevent_dont_repeat): Change return type.
11156 * breakpoint.c (bpstat_do_actions_1): Update.
11157
0cf08227
TT
111582017-01-10 Tom Tromey <tom@tromey.com>
11159
11160 * value.h (scoped_value_mark::~scoped_value_mark): Call
11161 free_to_mark.
11162 (scoped_value_mark::free_to_mark): New method.
11163 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11164 scoped_value_mark.
11165
eb115069
TT
111662017-01-10 Tom Tromey <tom@tromey.com>
11167
11168 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11169 (valpy_reference_value, valpy_const_value, valpy_get_address)
11170 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11171 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11172 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11173 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11174 scoped_value_mark.
11175 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11176 * value.h (scoped_value_mark): New class.
11177
906768f9
TT
111782017-01-10 Tom Tromey <tom@tromey.com>
11179
11180 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11181 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11182 * psymtab.c (discard_psymtabs_upto): Remove.
11183 (make_cleanup_discard_psymtabs): Remove.
11184 (struct psymtab_state): Remove.
11185
bef155c3
TT
111862017-01-10 Tom Tromey <tom@tromey.com>
11187
11188 * record-full.c (record_full_save_cleanups): Remove.
11189 (record_full_save): Use gdb::unlinker.
11190 * gcore.c (do_bfd_delete_cleanup): Remove.
11191 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11192 cleanups.
11193 * dwarf2read.c (unlink_if_set): Remove.
11194 (write_psymtabs_to_index): Use gdb::unlinker.
11195 * common/gdb_unlinker.h: New file.
11196
192b62ce
TT
111972017-01-10 Tom Tromey <tom@tromey.com>
11198
11199 * windows-tdep.c (windows_xfer_shared_library): Update.
11200 * windows-nat.c (windows_make_so): Update.
11201 * utils.h (make_cleanup_bfd_unref): Remove.
11202 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11203 * symfile.h (symfile_bfd_open)
11204 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11205 * symfile.c (read_symbols, symbol_file_add)
11206 (separate_debug_file_exists): Update.
11207 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11208 (generic_load, reread_symbols): Update.
11209 * symfile-mem.c (symbol_file_add_from_memory): Update.
11210 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11211 (spu_symbol_file_add_from_memory): Update.
11212 * solist.h (struct target_so_ops) <bfd_open>: Return
11213 gdb_bfd_ref_ptr.
11214 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11215 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11216 gdb_bfd_ref_ptr.
11217 (solib_map_sections, reload_shared_libraries_1): Update.
11218 * solib-svr4.c (enable_break): Update.
11219 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11220 * solib-frv.c (enable_break2): Update.
11221 * solib-dsbt.c (enable_break): Update.
11222 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11223 gdb_bfd_ref_ptr.
11224 (darwin_solib_get_all_image_info_addr_at_init): Update.
11225 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11226 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11227 * record-full.c (record_full_save): Update.
11228 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11229 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11230 * minidebug.c (find_separate_debug_file_in_section): Return
11231 gdb_bfd_ref_ptr.
11232 * machoread.c (macho_add_oso_symfile): Change abfd to
11233 gdb_bfd_ref_ptr.
11234 (macho_symfile_read_all_oso): Update.
11235 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11236 (macho_symfile_read): Update.
11237 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11238 (jit_bfd_try_read_symtab): Update.
11239 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11240 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11241 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11242 gdb_bfd_ref_ptr.
11243 (gdb_bfd_ref_policy): New struct.
11244 (gdb_bfd_ref_ptr): New typedef.
11245 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11246 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11247 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11248 gdb_bfd_ref_ptr.
11249 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11250 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11251 (gcore_command): Update.
11252 * exec.c (exec_file_attach): Update.
11253 * elfread.c (elf_symfile_read): Update.
11254 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11255 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11256 (open_and_init_dwo_file): Update.
11257 (open_dwp_file): Return gdb_bfd_ref_ptr.
11258 (open_and_init_dwp_file): Update.
11259 * corelow.c (core_open): Update.
11260 * compile/compile-object-load.c (compile_object_load): Update.
11261 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11262 * coffread.c (coff_symfile_read): Update.
11263 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11264 gdb_bfd_ref_ptr. Rename.
11265 (dump_bfd_file, restore_command): Update.
11266 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11267 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11268 (find_separate_debug_file_by_buildid): Update.
11269
50315b21
TT
112702017-01-10 Tom Tromey <tom@tromey.com>
11271
11272 * common/gdb_ref_ptr.h: New file.
11273 * python/py-ref.h (struct gdbpy_ref_policy): New.
11274 (gdbpy_ref): Now a typedef.
11275
fc4007c9
TT
112762017-01-10 Tom Tromey <tom@tromey.com>
11277
11278 * utils.h (make_cleanup_htab_delete): Don't declare.
11279 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11280 Remove.
11281 * linespec.c (decode_compound_collector): Add constructor,
11282 destructor.
11283 (lookup_prefix_sym): Remove cleanup.
11284 (symtab_collector): Add constructor, destructor.
11285 (collect_symtabs_from_filename): Remove cleanup.
11286 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11287 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11288 Use htab_up.
11289 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11290 * dwarf2read.c (dw2_expand_symtabs_matching)
11291 (dw2_map_symbol_filenames, dwarf_decode_macros)
11292 (write_psymtabs_to_index): Use htab_up.
11293 * dwarf2loc.c (func_verify_no_selftailcall)
11294 (call_site_find_chain_1, func_verify_no_selftailcall)
11295 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11296 std::vector, gdb::unique_xmalloc_ptr.
11297 (call_sitep): Remove typedef.
11298 (dwarf2_locexpr_baton_eval): Remove unused variable.
11299
8dbcee67
TT
113002017-01-10 Tom Tromey <tom@tromey.com>
11301
11302 * python/python-internal.h (make_cleanup_py_decref)
11303 (make_cleanup_py_xdecref): Don't declare.
11304 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11305 (py_xdecref, make_cleanup_py_xdecref): Remove.
11306
13df46cc
TT
113072017-01-10 Tom Tromey <tom@tromey.com>
11308
11309 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11310 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11311
06fc9bf7
TT
113122017-01-10 Tom Tromey <tom@tromey.com>
11313
11314 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11315
830a4934
TT
113162017-01-10 Tom Tromey <tom@tromey.com>
11317
11318 * python/py-utils.c (unicode_to_encoded_string)
11319 (python_string_to_target_string)
11320 (python_string_to_target_python_string)
11321 (python_string_to_host_string, gdbpy_obj_to_string)
11322 (get_addr_from_python): Use gdbpy_ref.
11323
4586d543
TT
113242017-01-10 Tom Tromey <tom@tromey.com>
11325
11326 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11327 gdbpy_ref.
11328
59876f8f
TT
113292017-01-10 Tom Tromey <tom@tromey.com>
11330
11331 * python/python.c (eval_python_command, gdbpy_decode_line)
11332 (gdbpy_run_events, gdbpy_start_type_printers)
11333 (gdbpy_apply_type_printers): Use gdbpy_ref.
11334
97d83487
TT
113352017-01-10 Tom Tromey <tom@tromey.com>
11336
11337 * python/py-param.c (get_doc_string, compute_enum_values): Use
11338 gdbpy_ref.
11339
9205649a
TT
113402017-01-10 Tom Tromey <tom@tromey.com>
11341
11342 * python/py-inferior.c (find_thread_object, build_inferior_list):
11343 Use gdbpy_ref.
11344
74c49d45
TT
113452017-01-10 Tom Tromey <tom@tromey.com>
11346
11347 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11348
16361ffb
TT
113492017-01-10 Tom Tromey <tom@tromey.com>
11350
11351 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11352 gdbpy_ref.
11353
905f2cca
TT
113542017-01-10 Tom Tromey <tom@tromey.com>
11355
11356 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11357 extra incref.
11358 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11359 Use gdbpy_ref.
11360
64081434
TT
113612017-01-10 Tom Tromey <tom@tromey.com>
11362
11363 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11364 gdbpy_ref.
11365
59e9e831
TT
113662017-01-10 Tom Tromey <tom@tromey.com>
11367
11368 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11369 decref results of PyArg_ParseTupleAndKeywords.
11370
9de10f6d
TT
113712017-01-10 Tom Tromey <tom@tromey.com>
11372
11373 * python/python.c (python_run_simple_file): Use
11374 unique_xmalloc_ptr, gdbpy_ref.
11375
2bd5759d
TT
113762017-01-10 Tom Tromey <tom@tromey.com>
11377
11378 * python/py-prettyprint.c (print_stack_unless_memory_error)
11379 (print_string_repr, print_children): Use gdbpy_ref.
11380 (dummy_python_frame): New class.
11381 (dummy_python_frame::dummy_python_frame): Rename from
11382 push_dummy_python_frame.
11383 (py_restore_tstate): Remove.
11384
3b4e0e01
TT
113852017-01-10 Tom Tromey <tom@tromey.com>
11386
11387 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11388
17a22718
TT
113892017-01-10 Tom Tromey <tom@tromey.com>
11390
11391 * python/python.c (ensure_python_env, restore_python_env):
11392 Remove.
11393 * python/python-internal.h (ensure_python_env): Don't declare.
11394 * varobj.h (varobj_ensure_python_env): Don't declare.
11395 * varobj.c (varobj_ensure_python_env): Remove.
11396
68cdc557
TT
113972017-01-10 Tom Tromey <tom@tromey.com>
11398
11399 * varobj.c (varobj_value_get_print_value): Use
11400 gdbpy_enter_varobj.
11401
1eba6383
TT
114022017-01-10 Tom Tromey <tom@tromey.com>
11403
11404 * python/py-prettyprint.c (print_string_repr, print_children):
11405 Update.
11406 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11407 of "encoding".
11408 * varobj.c (varobj_value_get_print_value): Update.
11409 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11410
bde7b3e3
TT
114112017-01-10 Tom Tromey <tom@tromey.com>
11412
11413 * varobj.c (varobj_get_display_hint)
11414 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11415 (varobj_set_visualizer, free_variable): Use
11416 gdbpy_enter_varobj.
11417
a7785f8c
TT
114182017-01-10 Tom Tromey <tom@tromey.com>
11419
11420 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11421 (do_finish_initialization): New function. Use gdbpy_ref.
11422 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11423 do_finish_initialization.
11424
2865bfce
TT
114252017-01-10 Tom Tromey <tom@tromey.com>
11426
11427 * python/py-param.c (get_set_value, get_show_value): Use
11428 gdbpy_enter, gdbpy_ref.
11429
0e9dcc75
TT
114302017-01-10 Tom Tromey <tom@tromey.com>
11431
11432 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11433
12a5cedd
TT
114342017-01-10 Tom Tromey <tom@tromey.com>
11435
11436 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11437
788f2586
TT
114382017-01-10 Tom Tromey <tom@tromey.com>
11439
11440 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11441 Use gdbpy_enter_varobj.
11442
6cd67bea
TT
114432017-01-10 Tom Tromey <tom@tromey.com>
11444
11445 * varobj.c (gdbpy_enter_varobj): New constructor.
11446 * python/python-internal.h (gdbpy_enter_varobj): New class.
11447 * python/py-varobj.c (py_varobj_get_iterator): Use
11448 gdbpy_enter_varobj.
11449
14b122bf
TT
114502017-01-10 Tom Tromey <tom@tromey.com>
11451
11452 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11453 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11454 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11455 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11456 unique_xmalloc_ptr.
11457 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11458
bf1ca3b9
TT
114592017-01-10 Tom Tromey <tom@tromey.com>
11460
11461 * python/py-xmethods.c (invoke_match_method): Use
11462 gdbpy_ref.
11463
572a5524
TT
114642017-01-10 Tom Tromey <tom@tromey.com>
11465
11466 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11467 gdbpy_enter, gdbpy_ref.
11468
396a78b6
TT
114692017-01-10 Tom Tromey <tom@tromey.com>
11470
11471 * python/python.c (python_interactive_command): Use gdbpy_enter.
11472
a88b13c7
TT
114732017-01-10 Tom Tromey <tom@tromey.com>
11474
11475 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11476 gdbpy_ref.
11477
e9f0c363
TT
114782017-01-10 Tom Tromey <tom@tromey.com>
11479
11480 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11481 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11482
6349f452
TT
114832017-01-10 Tom Tromey <tom@tromey.com>
11484
11485 * utils.h (htab_deleter): New struct.
11486 (htab_up): New typedef.
11487 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11488 gdbpy_enter, gdbpy_ref, htab_up.
11489
c0171de6
TT
114902017-01-10 Tom Tromey <tom@tromey.com>
11491
11492 * python/py-unwind.c (pending_frame_invalidate): Remove.
11493 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11494
f18e226f
TT
114952017-01-10 Tom Tromey <tom@tromey.com>
11496
11497 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11498 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11499
c57af3f1
TT
115002017-01-10 Tom Tromey <tom@tromey.com>
11501
11502 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11503
60e600ec
TT
115042017-01-10 Tom Tromey <tom@tromey.com>
11505
11506 * python/python.c (gdbpy_eval_from_control_command)
11507 (gdbpy_source_script, gdbpy_run_events)
11508 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11509 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11510 gdbpy_enter.
11511
bf7da5b0
TT
115122017-01-10 Tom Tromey <tom@tromey.com>
11513
11514 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11515
2d38bced
TT
115162017-01-10 Tom Tromey <tom@tromey.com>
11517
11518 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11519
07bc7329
TT
115202017-01-10 Tom Tromey <tom@tromey.com>
11521
11522 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11523 (python_on_inferior_call_pre, python_on_inferior_call_post)
11524 (python_on_memory_change, python_on_register_change)
11525 (python_inferior_exit, python_new_objfile, add_thread_object)
11526 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11527
6e7c365e
TT
115282017-01-10 Tom Tromey <tom@tromey.com>
11529
11530 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11531 (bpfinishpy_handle_exit): Use gdbpy_enter.
11532
6ba0cd40
TT
115332017-01-10 Tom Tromey <tom@tromey.com>
11534
11535 * python/py-cmd.c (cmdpy_destroyer)
11536 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11537 gdbpy_enter.
11538
de2dc875
TT
115392017-01-10 Tom Tromey <tom@tromey.com>
11540
11541 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11542 gdbpy_enter.
11543 (gdbpy_breakpoint_has_cond): Likewise.
11544
4ecee2c4
TT
115452017-01-10 Tom Tromey <tom@tromey.com>
11546
11547 * python/python.c (gdbpy_enter): New constructor.
11548 (~gdbpy_enter): New destructor.
11549 (restore_python_env, ensure_python_env): Rewrite.
11550 * python/python-internal.h (gdbpy_enter): New class.
11551
37fce74f
TT
115522017-01-10 Tom Tromey <tom@tromey.com>
11553
11554 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11555
53a0cca3
TT
115562017-01-10 Tom Tromey <tom@tromey.com>
11557
11558 * python/py-value.c (value_has_field, get_field_flag)
11559 (get_field_type, valpy_getitem, convert_value_from_python): Use
11560 gdbpy_ref.
11561
ff3724f5
TT
115622017-01-10 Tom Tromey <tom@tromey.com>
11563
11564 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11565 gdbpy_ref.
11566
0700aea5
TT
115672017-01-10 Tom Tromey <tom@tromey.com>
11568
11569 * python/py-prettyprint.c (search_pp_list)
11570 (find_pretty_printer_from_objfiles)
11571 (find_pretty_printer_from_progspace)
11572 (find_pretty_printer_from_gdb, find_pretty_printer)
11573 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11574 gdbpy_ref.
11575
1bb44c9f
TT
115762017-01-10 Tom Tromey <tom@tromey.com>
11577
11578 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11579
87ce03fd
TT
115802017-01-10 Tom Tromey <tom@tromey.com>
11581
11582 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11583 (ltpy_get_all_source_lines): Use gdbpy_ref.
11584
ee0a3fb8
TT
115852017-01-10 Tom Tromey <tom@tromey.com>
11586
11587 * python/py-framefilter.c (extract_sym, extract_value)
11588 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11589 gdbpy_ref.
11590
bf2a52fa
TT
115912017-01-10 Tom Tromey <tom@tromey.com>
11592
11593 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11594
f59fe7f8
TT
115952017-01-10 Tom Tromey <tom@tromey.com>
11596
11597 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11598
80bd970a
TT
115992017-01-10 Tom Tromey <tom@tromey.com>
11600
11601 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11602 gdbpy_ref.
11603
d1b3de2e
TT
116042017-01-10 Tom Tromey <tom@tromey.com>
11605
11606 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11607
3bb43384
TT
116082017-01-10 Tom Tromey <tom@tromey.com>
11609
11610 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11611 (typy_range): Use gdbpy_ref.
11612
abf5651e
TT
116132017-01-10 Tom Tromey <tom@tromey.com>
11614
11615 * python/py-threadevent.c (create_thread_event_object): Use
11616 gdbpy_ref.
11617 * python/py-stopevent.c (create_stop_event_object): Simplify.
11618 (emit_stop_event): Use gdbpy_ref.
11619 * python/py-signalevent.c (create_signal_event_object): Use
11620 gdbpy_ref.
11621 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11622 (emit_new_objfile_event, create_clear_objfiles_event_object)
11623 (emit_clear_objfiles_event): Use gdbpy_ref.
11624 * python/py-infevents.c (create_inferior_call_event_object)
11625 (create_register_changed_event_object)
11626 (create_memory_changed_event_object, emit_inferior_call_event)
11627 (emit_memory_changed_event, emit_register_changed_event): Use
11628 gdbpy_ref.
11629 * python/py-exitedevent.c (create_exited_event_object)
11630 (emit_exited_event): Use gdbpy_ref.
11631 * python/py-event.h (evpy_emit_event): Remove
11632 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11633 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11634 * python/py-continueevent.c (emit_continue_event): Use
11635 gdbpy_ref.
11636 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11637 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11638 gdbpy_ref.
11639 * python/py-bpevent.c (create_breakpoint_event_object): Use
11640 gdbpy_ref.
11641
a68ff33e
TT
116422017-01-10 Tom Tromey <tom@tromey.com>
11643
11644 * python/py-ref.h: New file.
11645
7becfd03
SM
116462017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11647
11648 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11649 void.
11650 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11651 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11652 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11653 * ui-out.c (ui_out::redirect): Likewise.
11654 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11655 * cli/cli-logging.c (set_logging_redirect): Update call site of
11656 ui_out::redirect.
11657 (handle_redirections): Likewise.
11658 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11659 * top.c (execute_command_to_string): Likewise.
11660 * utils.c (do_ui_out_redirect_pop): Likewise.
11661
df294654
SM
116622017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11663
11664 * stack.c (_initialize_stack): Update "frame" command help message.
11665
f5e6296e
IB
116662017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11667
11668 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11669
0e2d6fa6
YQ
116702017-01-06 Yao Qi <yao.qi@linaro.org>
11671
11672 * x86-linux-nat.h: Include gdb_proc_service.h.
11673
44d6d3f9
YQ
116742017-01-06 Yao Qi <yao.qi@linaro.org>
11675
11676 * ser-base.h: Include serial.h.
11677
656731fe
YQ
116782017-01-06 Yao Qi <yao.qi@linaro.org>
11679
11680 * ppc-linux-tdep.h: Include ppc-tdep.h.
11681
1ca8f924
YQ
116822017-01-06 Yao Qi <yao.qi@linaro.org>
11683
11684 * nat/amd64-linux-siginfo.h: Include signal.h.
11685
bc3008c4
YQ
116862017-01-06 Yao Qi <yao.qi@linaro.org>
11687
11688 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11689
66c80d03
YQ
116902017-01-06 Yao Qi <yao.qi@linaro.org>
11691
11692 * mi/mi-parse.h: Include mi-cmds.h.
11693
051d2dda
YQ
116942017-01-06 Yao Qi <yao.qi@linaro.org>
11695
11696 * inf-loop.c: Don't include "target.h".
11697 * inf-loop.h: Include it here.
11698
8018d34f
YQ
116992017-01-06 Yao Qi <yao.qi@linaro.org>
11700
11701 * dfp.h: Include "dboulest.h" and "expression.h".
11702
c0b8369c
YQ
117032017-01-06 Yao Qi <yao.qi@linaro.org>
11704
11705 * ax-gdb.h: Include "ax.h".
11706
ad5cba2a
YQ
117072017-01-06 Yao Qi <yao.qi@linaro.org>
11708
11709 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11710 with nat/gdb_ptrace.h.
11711
1c33cd7f
YQ
117122017-01-05 Yao Qi <yao.qi@linaro.org>
11713
11714 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11715 new line.
11716 (mips64_fbsd_sigframe_init): Likewise.
11717
c988ac1d
JB
117182017-01-04 John Baldwin <jhb@FreeBSD.org>
11719
11720 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11721 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11722
b268007c
JB
117232017-01-04 John Baldwin <jhb@FreeBSD.org>
11724
11725 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11726 * NEWS: Mention new FreeBSD/mips native configuration.
11727 * config/mips/fbsd.mh: New file.
11728 * configure.host: Add mips*-*-freebsd*.
11729 * mips-fbsd-nat.c: New file.
11730
387360da
JB
117312017-01-04 John Baldwin <jhb@FreeBSD.org>
11732
11733 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11734 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11735 * NEWS: Mention new FreeBSD/mips target.
11736 * configure.tgt: Add mips*-*-freebsd*.
11737 * mips-fbsd-tdep.c: New file.
11738 * mips-fbsd-tdep.h: New file.
11739
2aaaf250
YQ
117402017-01-04 Yao Qi <yao.qi@linaro.org>
11741
11742 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11743 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11744
61baf725
JB
117452017-01-01 Joel Brobecker <brobecker@adacore.com>
11746
6dbb839a 11747 Update copyright year range in all GDB files.
61baf725 11748
c113e7ff 117492017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 11750
c113e7ff 11751 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 11752
c113e7ff 11753For older changes see ChangeLog-2016.
c906108c
SS
11754\f
11755Local Variables:
11756mode: change-log
11757left-margin: 8
11758fill-column: 74
11759version-control: never
57da7796 11760coding: utf-8
c906108c 11761End:
This page took 2.542342 seconds and 4 git commands to generate.