Constify some commands in regcache.c
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
4e001312
TT
12017-09-27 Tom Tromey <tom@tromey.com>
2
3 * regcache.c (regcache_print, maintenance_print_registers)
4 (maintenance_print_raw_registers)
5 (maintenance_print_cooked_registers)
6 (maintenance_print_register_groups)
7 (maintenance_print_remote_registers): Constify.
8
77763700
TT
92017-09-27 Tom Tromey <tom@tromey.com>
10
11 * printcmd.c (map_display_numbers, undisplay_command)
12 (enable_disable_display_command, enable_display_command)
13 (disable_display_command): Constify.
14
4495129a
TT
152017-09-27 Tom Tromey <tom@tromey.com>
16
17 * breakpoint.h (delete_command): Don't declare.
18 * breakpoint.c (delete_command, enable_once_command)
19 (enable_count_command, enable_delete_command, breakpoint_1)
20 (maintenance_info_breakpoints, stopin_command, stopat_command)
21 (delete_command, delete_trace_command, save_breakpoints)
22 (save_breakpoints_command, save_tracepoints_command): Constify.
23
3088cf40
TT
242017-09-27 Tom Tromey <tom@tromey.com>
25
26 * macrocmd.c (macro_expand_command, macro_expand_once_command)
27 (skip_ws, extract_identifier, macro_define_command)
28 (macro_undef_command, macro_list_command): Constify.
29
69f476a3
TT
302017-09-27 Tom Tromey <tom@tromey.com>
31
32 * infcmd.c (environment_info, set_environment_command)
33 (unset_environment_command, path_info, info_proc_cmd_1)
34 (info_proc_cmd_mappings, info_proc_cmd_stat)
35 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
36 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
37
c4a3e68e
TT
382017-09-27 Tom Tromey <tom@tromey.com>
39
40 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
41 Constify.
42
c9d31bd6
TT
432017-09-27 Tom Tromey <tom@tromey.com>
44
45 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
46
1f3f85eb
TT
472017-09-27 Tom Tromey <tom@tromey.com>
48
49 * demangle.c (demangle_command): Constify.
50
9c504b5d
TT
512017-09-27 Tom Tromey <tom@tromey.com>
52
53 * progspace.c (maintenance_info_program_spaces_command):
54 Constify.
55
6663cf91
TT
562017-09-27 Tom Tromey <tom@tromey.com>
57
58 * compile/compile.c (check_raw_argument, compile_file_command)
59 (compile_code_command, compile_print_command): Constify.
60
34e5fa26
TT
612017-09-27 Tom Tromey <tom@tromey.com>
62
63 * reggroups.c (maintenance_print_reggroups): Constify.
64
8384c356
TT
652017-09-27 Tom Tromey <tom@tromey.com>
66
67 * dwarf2read.c (save_gdb_index_command): Constify.
68
884beb0c
TT
692017-09-27 Tom Tromey <tom@tromey.com>
70
71 * stap-probe.c (info_probes_stap_command): Constify.
72
e0b2930c
TT
732017-09-27 Tom Tromey <tom@tromey.com>
74
75 * fork-child.c (unset_exec_wrapper_command): Constify.
76
f938677d
TT
772017-09-27 Tom Tromey <tom@tromey.com>
78
79 * btrace.c (get_uint, get_context_size, no_chunk)
80 (maint_btrace_packet_history_cmd)
81 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
82 (maint_info_btrace_cmd): Constify.
83
8949cb87
TT
842017-09-27 Tom Tromey <tom@tromey.com>
85
86 * reverse.c (delete_bookmark_command): Constify.
87
ac88e2de
TT
882017-09-27 Tom Tromey <tom@tromey.com>
89
90 * remote.c (set_memory_packet_size)
91 (set_memory_write_packet_size, show_memory_write_packet_size)
92 (set_memory_read_packet_size, show_memory_read_packet_size)
93 (compare_sections_command, packet_command, remote_put_command)
94 (remote_get_command, remote_delete_command): Constify.
95
bd4c9dfe
TT
962017-09-27 Tom Tromey <tom@tromey.com>
97
98 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
99 (set_mipsfpu_double_command, set_mipsfpu_none_command)
100 (set_mipsfpu_auto_command): Constify.
101
5e93d4c6
TT
1022017-09-27 Tom Tromey <tom@tromey.com>
103
104 * cli/cli-cmds.h (cd_command): Constify.
105 * cli/cli-cmds.c (cd_command): Constify.
106
fc41a75b
TT
1072017-09-27 Tom Tromey <tom@tromey.com>
108
109 * thread.c (thread_name_command, thread_find_command): Constify.
110
67810076
TT
1112017-09-27 Tom Tromey <tom@tromey.com>
112
113 * probe.c (enable_probes_command, disable_probes_command):
114 Constify.
115
1d8b34a7
TT
1162017-09-27 Tom Tromey <tom@tromey.com>
117
118 * symfile.c (symbol_file_command): Constify.
119 * gdbcore.h (deprecated_file_changed_hook): Constify.
120 * exec.c (deprecated_file_changed_hook, exec_file_command)
121 (file_command): Constify.
122 * defs.h (symbol_file_command): Constify.
123
442019e1
TT
1242017-09-27 Tom Tromey <tom@tromey.com>
125
126 * remote-fileio.c (set_system_call_allowed)
127 (show_system_call_allowed): Constify.
128
2983f7cb
TT
1292017-09-27 Tom Tromey <tom@tromey.com>
130
131 * tracepoint.c (delete_trace_variable_command)
132 (tfind_end_command, tfind_start_command, tfind_pc_command)
133 (tfind_tracepoint_command, tfind_line_command)
134 (tfind_range_command, tfind_outside_command): Constify.
135
4fd41b24
TT
1362017-09-27 Tom Tromey <tom@tromey.com>
137
138 * ax-gdb.c (maint_agent_printf_command, agent_command)
139 (agent_eval_command): Constify.
140
f2fc3015
TT
1412017-09-27 Tom Tromey <tom@tromey.com>
142
143 * tracepoint.c (info_scope_command): Constify.
144 * python/python.c (gdbpy_decode_line): Constify.
145 * python/py-breakpoint.c (bppy_init): Constify.
146 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
147 * location.h: (new_linespec_location)
148 (string_to_event_location_basic, string_to_event_location):
149 Constify.
150 * location.c (new_linespec_location)
151 (string_to_event_location_basic, string_to_event_location):
152 Constify.
153 * linespec.h (decode_line_with_current_source)
154 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
155 * linespec.c (linespec_lex_to_end)
156 (decode_line_with_current_source)
157 (decode_line_with_last_displayed): Constify.
158 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
159 Constify.
160 * cli/cli-cmds.c (edit_command, list_command): Constify.
161 * breakpoint.h (until_break_command, watch_command_wrapper)
162 (awatch_command_wrapper, rwatch_command_wrapper)
163 (init_ada_exception_breakpoint): Constify.
164 * breakpoint.c (break_command_1, dprintf_command)
165 (break_range_command, watch_command_wrapper)
166 (rwatch_command_wrapper, awatch_command_wrapper)
167 (until_break_command, init_ada_exception_breakpoint)
168 (strace_marker_create_sals_from_location, trace_command)
169 (ftrace_command, strace_command, struct tracepoint): Constify.
170 * ax-gdb.c (agent_command_1): Constify.
171 * ada-lang.c (ada_exception_sal): Constify.
172
8c2f95f4
TT
1732017-09-27 Tom Tromey <tom@tromey.com>
174
175 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
176 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
177 (get_context_size, no_chunk, get_insn_history_modifiers)
178 (cmd_record_insn_history, get_call_history_modifiers)
179 (cmd_record_call_history): Constify.
180
a0d65762
TT
1812017-09-27 Tom Tromey <tom@tromey.com>
182
183 * source.c (show_substitute_path_command)
184 (unset_substitute_path_command, set_substitute_path_command):
185 Constify.
186
58971144
TT
1872017-09-27 Tom Tromey <tom@tromey.com>
188
189 * typeprint.c (maintenance_print_type): Constify.
190 * maint.c (maintenance_dump_me, maintenance_demangle)
191 (maintenance_time_display, maintenance_info_sections)
192 (maintenance_print_statistics, maintenance_deprecate)
193 (maintenance_undeprecate): Constify.
194 (maintenance_do_deprecate): Constify. Use std::string.
195 (maintenance_selftest): Constify.
196 * gdbtypes.h (maintenance_print_type): Constify.
197
c482f52c
TT
1982017-09-27 Tom Tromey <tom@tromey.com>
199
200 * hppa-tdep.c (unwind_command): Constify.
201
e100df1a
TT
2022017-09-27 Tom Tromey <tom@tromey.com>
203
204 * target-descriptions.c (unset_tdesc_filename_cmd)
205 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
206 Constify.
207
31d56ade
TT
2082017-09-27 Tom Tromey <tom@tromey.com>
209
210 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
211
b961da0b
TT
2122017-09-27 Tom Tromey <tom@tromey.com>
213
214 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
215
e2d8ae16
TT
2162017-09-27 Tom Tromey <tom@tromey.com>
217
218 * tui/tui-regs.c (tui_reg_command): Constify.
219
863779b0
TT
2202017-09-27 Tom Tromey <tom@tromey.com>
221
222 * skip.c (skip_file_command, skip_function_command)
223 (skip_enable_command, skip_disable_command, skip_delete_command):
224 Constify.
225
cdb34d4a
TT
2262017-09-27 Tom Tromey <tom@tromey.com>
227
228 * record-btrace.c (cmd_record_btrace_bts_start)
229 (cmd_record_btrace_pt_start): Constify.
230
e99c83e7
TT
2312017-09-27 Tom Tromey <tom@tromey.com>
232
233 * symmisc.c (maintenance_print_symbols)
234 (maintenance_print_msymbols, maintenance_print_objfiles)
235 (maintenance_info_symtabs, maintenance_check_symtabs)
236 (maintenance_expand_symtabs, maintenance_info_line_tables):
237 Constify.
238
32faf971
TT
2392017-09-27 Tom Tromey <tom@tromey.com>
240
241 * top.c (new_ui_command): Constify.
242
2cf311eb
TT
2432017-09-27 Tom Tromey <tom@tromey.com>
244
245 * symfile.c (add_symbol_file_command)
246 (remove_symbol_file_command, list_overlays_command)
247 (map_overlay_command, unmap_overlay_command)
248 (overlay_auto_command, overlay_manual_command)
249 (overlay_off_command, overlay_load_command): Constify.
250
e6738699
TT
2512017-09-27 Tom Tromey <tom@tromey.com>
252
253 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
254 (info_spu_mailbox_command, info_spu_dma_command)
255 (info_spu_proxydma_command): Constify.
256
aa360cd5
TT
2572017-09-27 Tom Tromey <tom@tromey.com>
258
259 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
260
898241a5
TT
2612017-09-27 Tom Tromey <tom@tromey.com>
262
263 * cli/cli-script.c (user_defined_command): Constify.
264
2d0ac106
TT
2652017-09-27 Tom Tromey <tom@tromey.com>
266
267 * cli/cli-dump.c (dump_memory_command, dump_value_command)
268 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
269 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
270 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
271 (dump_binary_value, append_binary_memory, append_binary_value):
272 Constify.
273 (struct dump_context) <func>: Constify.
274 (add_dump_command): Update.
275
dede02ce
TT
2762017-09-27 Tom Tromey <tom@tromey.com>
277
278 * cli/cli-cmds.c (show_version, show_configuration)
279 (source_command, show_user): Constify.
280
d3cb6b99
TT
2812017-09-27 Tom Tromey <tom@tromey.com>
282
283 * target.c (maintenance_print_target_stack): Constify.
284
1970a12f
TT
2852017-09-27 Tom Tromey <tom@tromey.com>
286
287 * interps.c (interpreter_exec_cmd): Constify.
288
41243651
TT
2892017-09-27 Tom Tromey <tom@tromey.com>
290
291 * record-full.c (cmd_record_full_restore): Constify.
292
4465d9db
TT
2932017-09-27 Tom Tromey <tom@tromey.com>
294
295 * memattr.c (enable_mem_command, disable_mem_command)
296 (delete_mem_command): Constify.
297
ad25e423
TT
2982017-09-27 Tom Tromey <tom@tromey.com>
299
300 * value.c (show_convenience): Constify.
301
d64097b1
TT
3022017-09-27 Tom Tromey <tom@tromey.com>
303
304 * gdbcore.h (core_file_command): Update.
305 * corefile.c (core_file_command): Constify.
306
4d4589ef
TT
3072017-09-27 Tom Tromey <tom@tromey.com>
308
309 * user-regs.c (maintenance_print_user_registers): Constify.
310
32a7bf17
TT
3112017-09-27 Tom Tromey <tom@tromey.com>
312
313 * cp-namespace.c (maintenance_cplus_namespace): Constify.
314
4a475551
TT
3152017-09-27 Tom Tromey <tom@tromey.com>
316
317 * cp-support.c (first_component_command): Constify.
318
990b9f9f
TT
3192017-09-27 Tom Tromey <tom@tromey.com>
320
321 * psymtab.c (maintenance_print_psymbols)
322 (maintenance_info_psymtabs, maintenance_check_psymtabs):
323 Constify.
324
c281872e
TT
3252017-09-27 Tom Tromey <tom@tromey.com>
326
327 * windows-tdep.c (display_tib): Constify.
328
5b64bf74
TT
3292017-09-27 Tom Tromey <tom@tromey.com>
330
331 * linux-fork.c (delete_checkpoint_command)
332 (detach_checkpoint_command): Constify.
333
4ada038f
TT
3342017-09-27 Tom Tromey <tom@tromey.com>
335
336 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
337
57f5a81b
TT
3382017-09-27 Tom Tromey <tom@tromey.com>
339
340 * arc-tdep.c (dump_arc_instruction_command): Constify.
341
b0a8e6c4
TT
3422017-09-27 Tom Tromey <tom@tromey.com>
343
344 * valprint.c (set_radix, show_radix): Constify.
345
8d97dc1c
TT
3462017-09-27 Tom Tromey <tom@tromey.com>
347
348 * dtrace-probe.c (info_probes_dtrace_command): Constify.
349
eb7c454d
TT
3502017-09-27 Tom Tromey <tom@tromey.com>
351
352 * command.h (not_just_help_class_command): Update.
353 * cli/cli-decode.h (not_just_help_class_command): Update.
354 * cli/cli-decode.c (not_just_help_class_command): Constify.
355
e4e33335
TT
3562017-09-27 Tom Tromey <tom@tromey.com>
357
358 * gdb_bfd.c (maintenance_info_bfds): Constify.
359
0450cc4c
TT
3602017-09-27 Tom Tromey <tom@tromey.com>
361
362 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
363 overloads.
364 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
365 (do_const_cfunc): New function.
366 (cmd_cfunc_eq): New overload.
367 (cli_user_command_p): Check do_const_cfunc.
368 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
369 const_cfunc.
370 * command.h (add_cmd): Add const overload and no-function
371 overload.
372 (set_cmd_cfunc): Add const overload.
373 (cmd_const_cfunc_ftype): Declare.
374 (cmd_cfunc_eq): Add const overload.
375 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
376 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
377 overload.
378
a9bbfbd8
TT
3792017-09-27 Tom Tromey <tom@tromey.com>
380
381 * macroexp.c (get_next_token_for_substitution): New function.
382 (substitute_args): Call it. Check for __VA_OPT__.
383
5230b05a
WT
3842017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
385 Pedro Alves <palves@redhat.com>
386
387 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
388 producer_is_icc_lt_14.
389 (producer_is_icc_lt_14): New function.
390 (check_producer): Add code for checking version of ICC.
391 (producer_is_icc): Move to producer.c.
392 (read_structure_type): Restrict ICC workaround to ICC<14.
393 * producer.c: Include selftest.h.
394 (producer_is_icc, producer_parsing_tests, _initialize_producer):
395 New functions.
396 * producer.h (producer_is_icc): New declaration.
397
b32b108a
WT
3982017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
399
400 * Makefile.in (SFILES): Add producer.c.
401 (COMMON_OBS): Add producer.o
402 * amd64-tdep.c (producer.h): Add new include.
403 * dwarf2read.c (producer.h): Add new include.
404 * producer.c: New file.
405 * producer.h: New file.
406 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
407 producer.c.
408 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
409 producer.h.
410
5007d765
MK
4112017-09-26 Matthias Klose <doko@ubuntu.com>
412
413 * configure.ac: Search ncursesw before ncurses.
414 Check ncursesw/ncurses.h before ncurses/ncurses.h.
415 * gdb_curses.h: Include <ncursesw/ncurses.h>
416 * config.in, configure: Regenerate.
417
281c4447
RO
4182017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
419
420 PR gdb/22185
421 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
422 obsolete.
423 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
424 Remove i386sol2 support.
425 * configure.nat <i386sol2>: Remove.
426 <sol2-64>: Fold into ...
427 <sol2>: ... this.
428 Move common settings to default section.
429 Add sol-thread.o.
430 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
431 x86_64-*-solaris2.1[0-9]*>: Rename to ...
432 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
433 <i[34567]86-*-solaris*>: Remove.
434 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
435
436 * configure.ac: Remove wctype in libw check.
437 (_MSE_INT_H): Don't define on Solaris 7-9.
438 <solaris*>: Remove libthread_db.so.1 check.
439 * configure: Regenerate.
440 * config.in: Regenerate.
441
442 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
443 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
444 (gdb_ps_size_t): Remove.
445 Use base types in users.
446 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
447
448 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
449
39b06c20
RO
4502017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
451
452 PR build/22206
453 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
454 (adi_is_addr_mapped): Likewise.
455 (PSR_ICC): Don't redefine.
456 (PSR_IMPL): Likewise.
457
6c3e20f1
TT
4582017-09-25 Tom Tromey <tom@tromey.com>
459
460 * regcache.c (regcache::dump): Use string_printf.
461
b292235f
TT
4622017-09-25 Tom Tromey <tom@tromey.com>
463
464 * regcache.c (class regcache_invalidator): New.
465 (struct register_to_invalidate): Remove.
466 (make_cleanup_regcache_invalidate): Remove.
467 (regcache::raw_write): Use regcache_invalidator.
468
9ac86b52
TT
4692017-09-25 Tom Tromey <tom@tromey.com>
470
471 * spu-tdep.c (spu2ppu_sniffer): Update.
472 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
473 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
474 Remove.
475 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
476 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
477 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
478 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
479 (frame_pop): Update.
480
c0e383c6
TT
4812017-09-25 Tom Tromey <tom@tromey.com>
482
483 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
484 * regcache.h (regcache_xfree): Don't declare.
485 * regcache.c (regcache_xfree): Remove.
486 (do_regcache_xfree): Use delete.
487 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
488 * linux-fork.c (free_fork): Use delete.
489 (fork_save_infrun_state): Likewise.
490 * jit.c (jit_dealloc_cache): Use delete.
491 * infrun.c (discard_infcall_suspend_state): Use delete.
492
791199cc
TT
4932017-09-25 Tom Tromey <tom@tromey.com>
494
495 * regcache.h (regcache_xmalloc): Don't declare.
496 (regcache_raw_set_cached_value): Update comment.
497 * regcache.c (regcache_xmalloc): Remove.
498 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
499 * jit.c (jit_frame_sniffer): Use new.
500 * frame.c (frame_save_as_regcache): Use new.
501
289e23aa
AA
5022017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
503
504 * NEWS: Advertise support for guarded-storage registers on IBM z.
505
1b63490c
AA
5062017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
507
508 * s390-linux-nat.c (have_regset_gs): New static variable.
509 (s390_linux_fetch_inferior_registers): Handle guarded-storage
510 control block and guarded-storage broadcast control regsets.
511 (s390_read_description): Detect whether the target has
512 guarded-storage support, return appropriate tdesc.
513 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
514 (features/s390x-gs-linux64.c): Likewise.
515 (struct gdbarch_tdep) <have_gs>: New field.
516 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
517 (s390_gsbc_regset): New variables.
518 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
519 and s390_gsbc_regset, if applicable.
520 (s390_core_read_description): Check whether core file was from a
521 target with guarded-storage support; include appropriate regsets.
522 (s390_gdbarch_init): Add registers for guarded-storage support.
523 (_initialize_s390_tdep): Initialize new target descriptions that
524 include registers for guarded-storage support.
525 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
526 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
527 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
528 (S390_NUM_REGS): Adjust macro definition.
529 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
530 (tdesc_s390x_gs_linux64): New declarations.
531
96235dc1
AA
5322017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
533
534 * features/s390-gs-linux64.xml: New file.
535 * features/s390-gs.xml: New file.
536 * features/s390-gsbc.xml: New file.
537 * features/s390x-gs-linux64.xml: New file.
538 * features/Makefile (WHICH): Add s390-gs-linux64 and
539 s390x-gs-linux64.
540 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
541 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
542 * features/s390-gs-linux64.c: New generated file.
543 * features/s390x-gs-linux64.c: New file.
544 * regformats/s390-gs-linux64.dat: New file.
545 * regformats/s390x-gs-linux64.dat: New file.
546
b4a7c699
TT
5472017-09-23 Tom Tromey <tom@tromey.com>
548
549 * defs.h (make_cleanup_override_quit_handler): Don't declare.
550
c2f97536
TT
5512017-09-22 Tom Tromey <tom@tromey.com>
552
553 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
554 type to scoped_restore_tmpl.
555 <scoped_input_handler>: Initialize m_quit_handler directly.
556
43573013
SDJ
5572017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
558
559 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
560 (cd_command): Likewise. Free "current_directory" before
561 assigning to it.
562 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
563 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
564 * top.c (gdb_dirbuf): Remove global declaration.
565 * top.h (gdb_dirbuf): Likewise.
566
6ec2e0f5
SDJ
5672017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
568
569 * gnulib/aclocal.m4: Regenerate.
570 * gnulib/config.in: Regenerate.
571 * gnulib/configure: Regenerate.
572 * gnulib/import/Makefile.am: Regenerate.
573 * gnulib/import/Makefile.in: Regenerate.
574 * gnulib/import/assure.h: New file.
575 * gnulib/import/at-func.c: Likewise
576 * gnulib/import/chdir-long.c: New file.
577 * gnulib/import/chdir-long.h: New file.
578 * gnulib/import/cloexec.c: New file.
579 * gnulib/import/cloexec.h: New file.
580 * gnulib/import/close.c: New file.
581 * gnulib/import/closedir.c: New file.
582 * gnulib/import/dirent-private.h: New file.
583 * gnulib/import/dup-safer.c: New file.
584 * gnulib/import/dup.c: New file.
585 * gnulib/import/dup2.c: New file.
586 * gnulib/import/error.c: New file.
587 * gnulib/import/error.h: New file.
588 * gnulib/import/exitfail.c: New file.
589 * gnulib/import/exitfail.h: New file.
590 * gnulib/import/fchdir.c: New file.
591 * gnulib/import/fcntl.c: New file.
592 * gnulib/import/fcntl.in.h: New file.
593 * gnulib/import/fd-hook.c: New file.
594 * gnulib/import/fd-hook.h: New file.
595 * gnulib/import/fd-safer.c: New file.
596 * gnulib/import/fdopendir.c: New file.
597 * gnulib/import/filename.h: New file.
598 * gnulib/import/filenamecat-lgpl.c: New file.
599 * gnulib/import/filenamecat.h: New file.
600 * gnulib/import/fstat.c: New file.
601 * gnulib/import/fstatat.c: New file.
602 * gnulib/import/getcwd-lgpl.c: New file.
603 * gnulib/import/getcwd.c: New file.
604 * gnulib/import/getdtablesize.c: New file.
605 * gnulib/import/getlogin_r.c: New file.
606 * gnulib/import/getprogname.c: New file.
607 * gnulib/import/getprogname.h: New file.
608 * gnulib/import/gettext.h: New file.
609 * gnulib/import/glob-libc.h: New file.
610 * gnulib/import/glob.c: New file.
611 * gnulib/import/glob.in.h: New file.
612 * gnulib/import/intprops.h: New file.
613 * gnulib/import/m4/chdir-long.m4: New file.
614 * gnulib/import/m4/close.m4: New file.
615 * gnulib/import/m4/closedir.m4: New file.
616 * gnulib/import/m4/d-ino.m4: New file.
617 * gnulib/import/m4/d-type.m4: New file.
618 * gnulib/import/m4/dup.m4: New file.
619 * gnulib/import/m4/dup2.m4: New file.
620 * gnulib/import/m4/error.m4: New file.
621 * gnulib/import/m4/fchdir.m4: New file.
622 * gnulib/import/m4/fcntl.m4: New file.
623 * gnulib/import/m4/fcntl_h.m4: New file.
624 * gnulib/import/m4/fdopendir.m4: New file.
625 * gnulib/import/m4/filenamecat.m4: New file.
626 * gnulib/import/m4/fstat.m4: New file.
627 * gnulib/import/m4/fstatat.m4: New file.
628 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
629 * gnulib/import/m4/getcwd-path-max.m4: New file.
630 * gnulib/import/m4/getcwd.m4: New file.
631 * gnulib/import/m4/getdtablesize.m4: New file.
632 * gnulib/import/m4/getlogin_r.m4: New file.
633 * gnulib/import/m4/getprogname.m4: New file.
634 * gnulib/import/m4/glob.m4: New file.
635 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
636 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
637 * gnulib/import/m4/mempcpy.m4: New file.
638 * gnulib/import/m4/memrchr.m4: New file.
639 * gnulib/import/m4/mode_t.m4: New file.
640 * gnulib/import/m4/msvc-inval.m4: New file.
641 * gnulib/import/m4/msvc-nothrow.m4: New file.
642 * gnulib/import/m4/open.m4: New file.
643 * gnulib/import/m4/openat.m4: New file.
644 * gnulib/import/m4/opendir.m4: New file.
645 * gnulib/import/m4/readdir.m4: New file.
646 * gnulib/import/m4/realloc.m4: New file.
647 * gnulib/import/m4/rewinddir.m4: New file.
648 * gnulib/import/m4/save-cwd.m4: New file.
649 * gnulib/import/m4/strdup.m4: New file.
650 * gnulib/import/m4/strerror.m4: New file.
651 * gnulib/import/m4/unistd-safer.m4: New file.
652 * gnulib/import/mempcpy.c: New file.
653 * gnulib/import/memrchr.c: New file.
654 * gnulib/import/msvc-inval.c: New file.
655 * gnulib/import/msvc-inval.h: New file.
656 * gnulib/import/msvc-nothrow.c: New file.
657 * gnulib/import/msvc-nothrow.h: New file.
658 * gnulib/import/open.c: New file.
659 * gnulib/import/openat-die.c: New file.
660 * gnulib/import/openat-priv.h: New file.
661 * gnulib/import/openat-proc.c: New file.
662 * gnulib/import/openat.c: New file.
663 * gnulib/import/openat.h: New file.
664 * gnulib/import/opendir.c: New file.
665 * gnulib/import/pipe-safer.c: New file.
666 * gnulib/import/readdir.c: New file.
667 * gnulib/import/realloc.c: New file.
668 * gnulib/import/rewinddir.c: New file.
669 * gnulib/import/save-cwd.c: New file.
670 * gnulib/import/save-cwd.h: New file.
671 * gnulib/import/strdup.c: New file.
672 * gnulib/import/strerror-override.c: New file.
673 * gnulib/import/strerror-override.h: New file.
674 * gnulib/import/strerror.c: New file.
675 * gnulib/import/unistd--.h: New file.
676 * gnulib/import/unistd-safer.h: New file.
677 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
678 "getcwd" and "glob".
679 * ser-tcp.c: Undefine "close" before redefining it.
680
432ae719
SM
6812017-09-21 Simon Marchi <simon.marchi@ericsson.com>
682
683 * guile/scm-value.c (gdbscm_value_address): Initialize address,
684 get rid of res_val.
685
4fa7574e
RO
6862017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
687
688 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
689 <sol2,sparc>: Likewise.
690 <sol2-64,i386>: Likewise.
691
692 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
693 -Wdeprecated-declarations on *-*-solaris*.
694 * configure: Regenerate.
695
696 * procfs.c: Include "nat/inferior.h".
697 (procfs_info_proc): Fix typo.
698
f6327dcb
KB
6992017-09-21 Kevin Buettner <kevinb@redhat.com>
700
701 * remote.c (vector): Include.
702 (struct private_thread_info): Add field, thread_handle.
703 (free_private_thread_info): Deallocate storage associated with
704 thread handle.
705 (get_private_info_thread): Initialize `thread_handle' field.
706 (struct thread_item): Add field, thread_handle.
707 (clear_threads_listing_context): Deallocate storage associated
708 with thread handle.
709 (start_thread): Add support for "handle" attribute.
710 (thread_attributes): Add "handle".
711 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
712 field.
713 (remote_update_thread_list): Update thread_handle.
714 (remote_thread_handle_to_thread_info): New function.
715 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
716
fbbe5337
KB
7172017-09-21 Kevin Buettner <kevinb@redhat.com>
718
719 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
720 function.
721 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
722 * python/python-internal.h (thread_object_type): Declare.
723
e04ee09e
KB
7242017-09-21 Kevin Buettner <kevinb@redhat.com>
725
726 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
727 (target_thread_handle_to_thread_info): Declare.
728 * target.c (target_thread_handle_to_thread_info): New function.
729 * target-delegates.c: Regenerate.
730 * gdbthread.h (find_thread_by_handle): Declare.
731 * thread.c (find_thread_by_handle): New function.
732 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
733 function.
734 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
735
1e5b66ed
SM
7362017-09-21 Simon Marchi <simon.marchi@ericsson.com>
737
738 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
739
ebe48ba0
SM
7402017-09-21 Simon Marchi <simon.marchi@ericsson.com>
741
742 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
743
0a0bf5dc
YQ
7442017-09-21 Yao Qi <yao.qi@linaro.org>
745
746 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
747 to gdb_target_obs.
748
d1b0a7bf
TT
7492017-09-20 Tom Tromey <tom@tromey.com>
750
751 * breakpoint.c (struct counted_command_line): Remove.
752 (breakpoint_commands): Update.
753 (alloc_counted_command_line, incref_counted_command_line)
754 (decref_counted_command_line, do_cleanup_counted_command_line)
755 (make_cleanup_decref_counted_command_line): Remove.
756 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
757 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
758 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
759 (save_breakpoints): Update.
760 * breakpoint.h (counted_command_line): Now a typedef to
761 shared_ptr.
762 (struct breakpoint) <commands>: Now a counted_command_line.
763 (struct bpstats) <command>: Likewise.
764
48649e1b
TT
7652017-09-20 Tom Tromey <tom@tromey.com>
766
767 * breakpoint.c (struct commands_info, do_map_commands_command):
768 Remove.
769 (commands_command_1): Update.
770 (iterate_over_related_breakpoints): Take a function_view.
771 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
772 (delete_command): Update.
773 (map_breakpoint_numbers): Take a function_view.
774 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
775 (disable_command): Update.
776 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
777 (enable_command): Update.
778 (struct disp_data, do_enable_breakpoint_disp)
779 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
780 (do_map_enable_delete_breakpoint): Remove.
781 (enable_once_command, enable_count_command, enable_delete_command)
782 (delete_trace_variable_command): Update.
783
04afa70c
TT
7842017-09-20 Tom Tromey <tom@tromey.com>
785
786 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
787 (bpstat_clear): Use delete.
788 (bpstats): New constructors.
789 (bpstat_copy, bpstat_stop_status): Use new.
790 (dprintf_after_condition_true): Update.
791 * breakpoint.h (bpstats::bpstats): Add constructors.
792 (bpstats::~bpstats): Add destructor.
793
c83833f4
PA
7942017-09-20 Pedro Alves <palves@redhat.com>
795
796 * eval.c (make_params): Delete, refactored as ...
797 (class fake_method): ... this new type's ctor.
798 (fake_method::~fake_method): New.
799 (evaluate_subexp_standard): Use 'fake_method'.
800
223ffa71
TT
8012017-09-20 Tom Tromey <tom@tromey.com>
802
803 * windows-nat.c (get_windows_debug_event, windows_wait)
804 (do_initial_windows_stuff, windows_attach): Update.
805 * utils.c (vwarning, internal_vproblem): Update.
806 (ui_unregister_input_event_handler_cleanup)
807 (prepare_to_handle_input): Remove.
808 (class scoped_input_handler): New.
809 (defaulted_query, prompt_for_continue): Update.
810 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
811 Update.
812 * top.c (undo_terminal_modifications_before_exit): Update.
813 * target/target.h (target_terminal_init, target_terminal_inferior)
814 (target_terminal_ours): Don't declare.
815 (class target_terminal): New.
816 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
817 (target_terminal_ours_for_output)
818 (make_cleanup_restore_target_terminal): Don't declare.
819 (target_terminal_info): Remove.
820 * target.c (enum terminal_state, terminal_state): Remove.
821 (target_terminal::terminal_state): Define.
822 (target_terminal::init): Rename from target_terminal_init.
823 (target_terminal::inferior): Rename from
824 target_terminal_inferior.
825 (target_terminal::ours): Rename from target_terminal_ours.
826 (target_terminal::ours_for_output): Rename from
827 target_terminal_ours_for_output.
828 (target_terminal::info): New method.
829 (cleanup_restore_target_terminal)
830 (make_cleanup_restore_target_terminal): Remove.
831 * solib.c (handle_solib_event): Update.
832 * remote.c (remote_serial_quit_handler): Update.
833 (remote_terminal_inferior, remote_wait_as): Update.
834 * record-full.c (record_full_wait_1): Update.
835 * nto-procfs.c (procfs_create_inferior): Update.
836 * nat/fork-inferior.c (startup_inferior): Update.
837 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
838 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
839 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
840 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
841 (mi_breakpoint_created, mi_breakpoint_deleted)
842 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
843 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
844 (mi_user_selected_context_changed, report_initial_inferior):
845 Update.
846 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
847 (linux_nat_terminal_inferior): Update.
848 * infrun.c (follow_fork_inferior)
849 (handle_vfork_child_exec_or_exit, do_target_resume)
850 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
851 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
852 Update.
853 * inflow.c (child_terminal_init, info_terminal_command): Update.
854 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
855 (attach_command): Update.
856 * infcall.c (call_thread_fsm_should_stop): Update.
857 * gnu-nat.c (gnu_attach): Update.
858 * extension.c (struct active_ext_lang_state)
859 (restore_active_ext_lang): Update.
860 * exceptions.c (print_flush): Update.
861 * event-top.c (async_enable_stdin, default_quit_handler): Update.
862 (struct quit_handler_cleanup_data, restore_quit_handler)
863 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
864 Remove.
865 * cp-support.c (gdb_demangle): Update.
866 * breakpoint.c (update_inserted_breakpoint_locations)
867 (insert_breakpoint_locations, handle_jit_event)
868 (disable_breakpoints_in_unloaded_shlib): Update.
869 * annotate.c (annotate_breakpoints_invalid)
870 (annotate_frames_invalid): Update.
871
013af3fc
TT
8722017-09-20 Tom Tromey <tom@tromey.com>
873
874 * main.c (catch_command_errors): Rename from
875 catch_command_errors_const.
876 (captured_main_1): Update.
877
06871ae8
PA
8782017-09-20 Pedro Alves <palves@redhat.com>
879
880 * cli/cli-cmds.c (list_command): Use print_sal_location.
881 (print_sal_location): New function.
882 (ambiguous_line_spec): Use print_sal_location.
883 * linespec.c (symbol_to_sal): Record the symbol in the sal.
884 * symtab.c (find_function_start_sal): Likewise.
885 * symtab.h (symtab_and_line::symbol): New field.
886
e5f25bc5
PA
8872017-09-20 Pedro Alves <palves@redhat.com>
888
889 * linespec.c (minsym_found): Handle non-text minsyms.
890 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
891
1b7fa39e
WT
8922017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
893
894 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
895 backslash.
896
37dd0825
WT
8972017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
898
899 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
900 vmovups instead vmovaps.
901 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
902
4e5a4f58
JB
9032017-09-19 John Baldwin <jhb@FreeBSD.org>
904
905 * NEWS (Changes since GDB 8.0): Add starti.
906 * infcmd.c (enum run_break): New.
907 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
908 case.
909 (run_command): Use enum run_how.
910 (start_command): Likewise.
911 (starti_command): New function.
912 (RUN_ARGS_HELP): New macro.
913 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
914 commands. Add starti command.
915
aa70c9f1
YQ
9162017-09-19 Yao Qi <yao.qi@linaro.org>
917
918 * Makefile.in (monitor.o): Remove the rule.
919
d6541620
YQ
9202017-09-19 Yao Qi <yao.qi@linaro.org>
921
922 * annotate.h (struct annotate_arg_emitter): Use
923 DISABLE_COPY_AND_ASSIGN.
924 * common/refcounted-object.h (refcounted_object): Likewise.
925 * completer.h (struct completion_result): Likewise.
926 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
927 * filename-seen-cache.h (filename_seen_cache): Likewise.
928 * gdbcore.h (thread_section_name): Likewise.
929 * gdb_regex.h (compiled_regex): Likewise.
930 * gdbthread.h (scoped_restore_current_thread): Likewise.
931 * inferior.h (scoped_restore_current_inferior): Likewise.
932 * jit.c (jit_reader): Likewise.
933 * linespec.h (struct linespec_result): Likewise.
934 * mi/mi-parse.h (struct mi_parse): Likewise.
935 * nat/fork-inferior.c (execv_argv): Likewise.
936 * progspace.h (scoped_restore_current_program_space): Likewise.
937 * python/python-internal.h (class gdbpy_enter): Likewise.
938 * regcache.h (regcache): Likewise.
939 * target-descriptions.c (struct tdesc_reg): Likewise.
940 (struct tdesc_type): Likewise.
941 (struct tdesc_feature): Likewise.
942 * ui-out.h (ui_out_emit_type): Likewise.
943
0615127c
SM
9442017-09-18 Simon Marchi <simon.marchi@ericsson.com>
945
946 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
947 label abort_expression.
948
5e187554
SM
9492017-09-16 Simon Marchi <simon.marchi@ericsson.com>
950
951 * common/buffer.c (buffer_xml_printf): Adjust.
952 * common/xml-utils.c (xml_escape_text): Change return type to
953 std::string, update code accordingly.
954 * common/xml-utils.h (xml_escape_text): Change return type to
955 std::string.
956 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
957 * windows-tdep.c (windows_xfer_shared_library): Adjust.
958 * unittests/xml-utils-selftests.c (test_xml_escape_text):
959 Adjust.
960
c3d7b541
SM
9612017-09-16 Simon Marchi <simon.marchi@ericsson.com>
962
963 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
964 (SUBDIR_UNITTESTS_OBS): Add new object file.
965 * unittests/xml-utils-selftests.c: New file.
966
1526853e
SM
9672017-09-16 Simon Marchi <simon.marchi@ericsson.com>
968
969 * common/selftest.h (selftest): New struct/interface.
970 (register_test): Add name parameter, add new overload.
971 (run_tests): Add filter parameter.
972 (for_each_selftest_ftype): New typedef.
973 (for_each_selftest): New declaration.
974 * common/selftest.c (tests): Change type to
975 map<string, unique_ptr<selftest>>.
976 (simple_selftest): New struct.
977 (register_test): New function.
978 (register_test): Add name parameter and use it.
979 (run_tests): Add filter parameter and use it. Add prints.
980 Adjust to vector -> map change.
981 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
982 registering selftests.
983 * arm-tdep.c (_initialize_arm_tdep): Likewise.
984 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
985 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
986 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
987 * findvar.c (_initialize_findvar): Likewise.
988 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
989 * maint.c (maintenance_selftest): Update call to run_tests.
990 (maintenance_info_selftests): New function.
991 (_initialize_maint_cmds): Register "maintenance info selftests"
992 command. Update "maintenance selftest" doc.
993 * regcache.c (_initialize_regcache): Add names when registering
994 selftests.
995 * rust-exp.y (_initialize_rust_exp): Likewise.
996 * selftest-arch.c (gdbarch_selftest): New struct.
997 (gdbarch_tests): Remove.
998 (register_test_foreach_arch): Add name parameter. Call
999 register_test.
1000 (tests_with_arch): Remove, move most content to
1001 gdbarch_selftest::operator().
1002 (_initialize_selftests_foreach_arch): Remove.
1003 * selftest-arch.h (register_test_foreach_arch): Add name
1004 parameter.
1005 (run_tests_with_arch): New declaration.
1006 * utils-selftests.c (_initialize_utils_selftests): Add names
1007 when registering selftests.
1008 * utils.c (_initialize_utils): Likewise.
1009 * unittests/array-view-selftests.c
1010 (_initialize_array_view_selftests): Likewise.
1011 * unittests/environ-selftests.c (_initialize_environ_selftests):
1012 Likewise.
1013 * unittests/function-view-selftests.c
1014 (_initialize_function_view_selftests): Likewise.
1015 * unittests/offset-type-selftests.c
1016 (_initialize_offset_type_selftests): Likewise.
1017 * unittests/optional-selftests.c
1018 (_initialize_optional_selftests): Likewise.
1019 * unittests/scoped_restore-selftests.c
1020 (_initialize_scoped_restore_selftests): Likewise.
1021 * NEWS: Document "maintenance selftest" and "maint info
1022 selftests".
1023
5846367a
SM
10242017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1025
1026 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1027 scoped_restore.
1028
bd77e8ff
SM
10292017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1030
1031 * mi/mi-main.c (mi_load_progress): Make uiout variable
1032 a unique_ptr.
1033
26a67918
PA
10342017-09-15 Pedro Alves <palves@redhat.com>
1035
1036 * compile/compile-c-types.c (convert_enum, convert_int)
1037 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1038
3f8a7804
SM
10392017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1040
1041 * dwarf2read.c (copy_string): Remove.
1042 (parse_macro_definition): Replace copy_string with savestring.
1043
8d200706
YQ
10442017-09-15 Yao Qi <yao.qi@linaro.org>
1045
1046 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1047 gdb_target_obs.
1048 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1049 Likewise.
1050 (i[34567]86-*-linux*): Likewise.
1051
d185219d
SM
10522017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1053
1054 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1055 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1056 <stack>: Change type to std::vector.
1057 <stack_len, stack_allocated>: Remove.
1058 <grow_stack>: Remove.
1059 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1060 (dwarf_expr_context::~dwarf_expr_context): Remove.
1061 (dwarf_expr_context::grow_stack): Remove.
1062 (dwarf_expr_context::push): Adjust.
1063 (dwarf_expr_context::pop): Adjust.
1064 (dwarf_expr_context::fetch): Adjust.
1065 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1066 (dwarf_expr_context::stack_empty_p): Adjust.
1067 (dwarf_expr_context::execute_stack_op): Adjust.
1068
eccd80d6
SM
10692017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1070
1071 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1072 return type to bool.
1073 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1074
69009882
SM
10752017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1076
1077 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1078 Change type to bool.
1079 (dwarf_stack_value) <in_stack_memory>: Likewise.
1080 (dwarf_expr_context) <push_address>: Change parameter type to
1081 bool.
1082 <fetch_in_stack_memory>: Change return type to bool.
1083 <push>: Change parameter type to bool.
1084 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1085 to bool.
1086 (dwarf_expr_context::push_address): Likewise.
1087 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1088 to bool.
1089 (dwarf_expr_context::execute_stack_op): Adjust.
1090 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1091
1e467161
SM
10922017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1093
1094 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1095 (struct dwarf_expr_context) <n_pieces>: Remove.
1096 <pieces>: Change type to std::vector.
1097 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1098 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1099 pieces.
1100 (dwarf_expr_context::add_piece): Adjust.
1101 * dwarf2loc.c (struct piece_closure): Initialize fields.
1102 <n_pieces>: Remove.
1103 <pieces>: Change type to std::vector.
1104 (allocate_piece_closure): Adjust, change parameter to
1105 std::vector rvalue and std::move it to piece_closure.
1106 (rw_pieced_value): Adjust.
1107 (check_pieced_synthetic_pointer): Adjust.
1108 (indirect_synthetic_pointer): Adjust.
1109 (coerce_pieced_ref): Adjust.
1110 (free_pieced_value_closure): Adjust. Use delete to free
1111 piece_closure.
1112 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1113 to allocate_piece_closure.
1114 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1115
0782db84
SM
11162017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1117
1118 * probe.h (probe_ops_cp): Remove typedef.
1119 (DEF_VEC_P (probe_ops_cp)): Remove.
1120 (all_probe_ops): Change type to std::vector.
1121 * probe.c (info_probes_for_ops): Adjust to vector change.
1122 (probe_linespec_to_ops): Likewise.
1123 (all_probe_ops): Change type to std::vector.
1124 (_initialize_probe): Adjust to vector change.
1125 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1126 * elfread.c (elf_get_probes): Likewise.
1127 * stap-probe.c (_initialize_stap_probe): Likewise.
1128
1eac6bea
SM
11292017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1130
1131 * probe.h (struct bound_probe): Define constructors.
1132 * probe.c (bound_probe_s): Remove typedef.
1133 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1134 (collect_probes): Change return type to std::vector, remove
1135 cleanup.
1136 (compare_probes): Return bool, change parameter type. Change
1137 semantic to "less than".
1138 (gen_ui_out_table_header_info): Change parameter to std::vector
1139 and update.
1140 (exists_probe_with_pops): Likewise.
1141 (info_probes_for_ops): Update to std::vector change.
1142 (enable_probes_command): Likewise.
1143 (disable_probes_command): Likewise.
1144
aaa63a31
SM
11452017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1146
1147 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1148 vec to std::vector.
1149 * probe.c (parse_probes_in_pspace): Update.
1150 (find_probes_in_objfile): Update.
1151 (find_probe_by_pc): Update.
1152 (collect_probes): Update.
1153 (probe_any_get_probes): Update.
1154 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1155 return type to reference to std::vector.
1156 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1157 std::vector and update.
1158 (dtrace_process_dof): Likewise.
1159 (dtrace_get_probes): Likewise.
1160 * elfread.c (elf_get_probes): Change return type to std::vector,
1161 store an std::vector in bfd_data.
1162 (probe_key_free): Update to std::vector.
1163 * stap-probe.c (handle_stap_probe): Change parameter to
1164 std::vector and update.
1165 (stap_get_probes): Likewise.
1166 * symfile-debug.c (debug_sym_get_probes): Change return type to
1167 std::vector and update.
1168
cb85b21b
TT
11692017-09-11 Tom Tromey <tom@tromey.com>
1170
1171 * breakpoint.c (program_breakpoint_here_p): Update.
1172 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1173 from make_show_memory_breakpoints_cleanup. Return a
1174 scoped_restore_tmpl<int>.
1175 (restore_show_memory_breakpoints): Remove.
1176 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1177 * mem-break.c (memory_validate_breakpoint): Update.
1178 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1179 (ia64_memory_remove_breakpoint): Update.
1180 (ia64_breakpoint_from_pc): Update.
1181 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1182 from make_show_memory_breakpoints_cleanup.
1183
8fbc99ef
TT
11842017-09-11 Tom Tromey <tom@tromey.com>
1185
1186 * d-namespace.c (d_lookup_symbol): Use std::string.
1187 (find_symbol_in_baseclass): Likewise.
1188
50feb4bd
TT
11892017-09-11 Tom Tromey <tom@tromey.com>
1190
1191 * ctf.c (ctf_start): Use std::string.
1192
c6dc63a1
TT
11932017-09-11 Tom Tromey <tom@tromey.com>
1194
1195 * ada-lang.c (is_known_support_routine): Update.
1196 (ada_unhandled_exception_name_addr_from_raise): Update.
1197 * guile/scm-frame.c (gdbscm_frame_name): Update.
1198 * python/py-frame.c (frapy_name): Update.
1199 (frapy_function): Update.
1200 * stack.h (find_frame_funname): Update.
1201 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1202 (print_frame): Update.
1203
d6b9b80f
TT
12042017-09-11 Tom Tromey <tom@tromey.com>
1205
1206 * findcmd.c (put_bits): Take a gdb::byte_vector.
1207 (parse_find_args): Return gdb::byte_vector. "args" now const.
1208 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1209 cleanups.
1210 (find_command): Update.
1211
a9921622
TT
12122017-09-11 Tom Tromey <tom@tromey.com>
1213
1214 * cli/cli-script.c (class scoped_restore_hook_in): New.
1215 (clear_hook_in_cleanup): Remove.
1216 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1217 scoped_restore_hook_in.
1218
be0d7abb
TT
12192017-09-11 Tom Tromey <tom@tromey.com>
1220
1221 * cli/cli-script.c (restore_interp): Remove.
1222 (read_command_lines): Use scoped_restore_interp.
1223 * interps.c (scoped_restore_interp::set_temp): Rename from
1224 interp_set_temp.
1225 * interps.h (class scoped_restore_interp): New.
1226 (interp_set_temp): Remove.
1227
00f675ff
TT
12282017-09-11 Tom Tromey <tom@tromey.com>
1229
1230 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1231 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1232 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1233 scoped_restore.
1234 (mi_cmd_break_insert_1): Update.
1235 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1236 scoped_restore.
1237
cb791d59
TT
12382017-09-11 Tom Tromey <tom@tromey.com>
1239
1240 * demangle.c (demangle_command): Update.
1241 * breakpoint.c (disable_command): Update.
1242 (enable_command): Update.
1243 (find_location_by_number): Make "number" const. Use
1244 get_number_trailer.
1245 * cli/cli-utils.c (extract_arg): Return std::string.
1246 * probe.c (parse_probe_linespec): Update. Change types.
1247 (collect_probes): Take string arguments.
1248 (parse_probe_linespec): Likewise.
1249 (info_probes_for_ops): Update.
1250 (enable_probes_command): Update.
1251 (disable_probes_command): Update.
1252 * break-catch-sig.c (catch_signal_split_args): Update.
1253 * mi/mi-parse.c (mi_parse): Update.
1254
2039bd9f
TT
12552017-09-11 Tom Tromey <tom@tromey.com>
1256
1257 * language.h (language_enum): Make argument const.
1258 * language.c (language_enum): Make argument const.
1259
f1735a53
TT
12602017-09-11 Tom Tromey <tom@tromey.com>
1261
1262 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1263 as function.
1264 (skip_to_space): Rename from skip_to_space_const.
1265 * common/common-utils.c (skip_to_space): New function.
1266 (skip_to_space): Rename from skip_to_space_const.
1267 * cli/cli-utils.h (get_number): Rename from get_number_const.
1268 (extract_arg): Rename from extract_arg_const.
1269 * cli/cli-utils.c (get_number): Rename from get_number_const.
1270 (extract_arg): Rename from extract_arg_const.
1271 (number_or_range_parser::get_number): Use ::get_number.
1272 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1273 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1274 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1275 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1276 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1277 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1278 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1279 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1280
7d221d74
TT
12812017-09-11 Tom Tromey <tom@tromey.com>
1282
1283 * python/python.c (do_start_initialization): Use
1284 py-event-types.def to initialize types.
1285 Define all object type structures.
1286 * python/python-internal.h: Don't declare event initialization
1287 functions.
1288 * python/py-threadevent.c (thread_event_object_type): Don't
1289 define.
1290 * python/py-stopevent.c (stop_event_object_type): Don't define.
1291 * python/py-signalevent.c (signal_event_object_type): Don't
1292 declare or define.
1293 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1294 (clear_objfiles_event_object_type): Don't declare or define.
1295 * python/py-infevents.c (inferior_call_pre_event_object_type)
1296 (inferior_call_post_event_object_type)
1297 (register_changed_event_object_type)
1298 (memory_changed_event_object_type): Don't declare or define.
1299 * python/py-inferior.c (new_thread_event_object_type)
1300 (new_inferior_event_object_type)
1301 (inferior_deleted_event_object_type): Don't declare or define.
1302 * python/py-exitedevent.c (exited_event_object_type): Don't
1303 declare or define.
1304 * python/py-evts.c (gdbpy_initialize_py_events): Use
1305 py-all-events.def.
1306 * python/py-events.h (thread_event_object_type): Don't declare.
1307 (events_object): Use py-all-events.def.
1308 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1309 py-event-types.def.
1310 * python/py-event-types.def: New file.
1311 * python/py-continueevent.c (create_continue_event_object): Don't
1312 declare or define.
1313 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1314 declare or define.
1315 * python/py-all-events.def: New file.
1316
35c61a1d
TT
13172017-09-11 Tom Tromey <tom@tromey.com>
1318
1319 * python/py-threadevent.c (create_thread_event_object): Return
1320 gdbpy_ref.
1321 * python/py-stopevent.h (create_stop_event_object)
1322 (create_breakpoint_event_object, create_signal_event_object):
1323 Update.
1324 * python/py-stopevent.c (create_stop_event_object): Return
1325 gdbpy_ref.
1326 (emit_stop_event): Update.
1327 * python/py-signalevent.c (create_signal_event_object): Return
1328 gdbpy_ref.
1329 * python/py-infevents.c (create_inferior_call_event_object):
1330 Update.
1331 * python/py-event.h (create_event_object)
1332 (create_thread_event_object): Update.
1333 * python/py-event.c (create_event_object): Return gdbpy_ref.
1334 * python/py-continueevent.c: Return gdbpy_ref.
1335 * python/py-bpevent.c (create_breakpoint_event_object): Return
1336 gdbpy_ref.
1337
7c96f8c1
TT
13382017-09-11 Tom Tromey <tom@tromey.com>
1339
1340 PR python/15622:
1341 * NEWS: Add entry.
1342 * python/python.c (do_start_initialization): Initialize new event
1343 types.
1344 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1345 (gdbpy_initialize_inferior_deleted_event)
1346 (gdbpy_initialize_new_thread_event): Declare.
1347 * python/py-threadevent.c (create_thread_event_object): Add option
1348 "thread" parameter.
1349 * python/py-inferior.c (new_thread_event_object_type)
1350 (new_inferior_event_object_type)
1351 (inferior_deleted_event_object_type): Declare.
1352 (python_new_inferior, python_inferior_deleted): New functions.
1353 (add_thread_object): Emit new_thread event.
1354 (gdbpy_initialize_inferior): Attach new functions to corresponding
1355 observers.
1356 (new_thread, new_inferior, inferior_deleted): Define new event
1357 types.
1358 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1359 registries.
1360 * python/py-events.h (events_object) <new_inferior,
1361 inferior_deleted, new_thread>: New fields.
1362 * python/py-event.h (create_thread_event_breakpoint): Add optional
1363 "thread" parameter.
1364
72542b8e
AB
13652017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1366
1367 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1368 check current_ui instead.
1369 (internal_vproblem): Likewise.
1370
0d64823e
SM
13712017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1372
1373 * thread.c (print_thread_info_1): Remove unnecessary calls to
1374 uiout->is_mi_like_p.
1375
eb1e02fd
TT
13762017-09-09 Tom Tromey <tom@tromey.com>
1377
1378 * namespace.h (add_using_directive): Update.
1379 * namespace.c (add_using_directive): Change type of excludes to
1380 std::vector.
1381 * dwarf2read.c (read_import_statement): Use std::vector.
1382 (read_namespace): Update.
1383 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1384
0fc21fd8
TT
13852017-09-09 Tom Tromey <tom@tromey.com>
1386
1387 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1388
49663d05
TT
13892017-09-09 Tom Tromey <tom@tromey.com>
1390
1391 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1392
0b868b60
TT
13932017-09-09 Tom Tromey <tom@tromey.com>
1394
1395 * stack.c (func_command): Use gdb::def_vector.
1396
c0470d48
TT
13972017-09-09 Tom Tromey <tom@tromey.com>
1398
1399 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1400 ui_out_emit_list, ui_out_emit_tuple.
1401 (mi_cmd_var_update): Likewise.
1402
ca5909c7
TT
14032017-09-09 Tom Tromey <tom@tromey.com>
1404
1405 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1406 ui_out_redirect_pop.
1407 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1408 ui_out_redirect_pop.
1409 * utils.c (do_ui_out_redirect_pop)
1410 (make_cleanup_ui_out_redirect_pop): Remove.
1411 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1412 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1413 * ui-out.h (ui_out_redirect_pop): New class.
1414
e6a2252a
TT
14152017-09-09 Tom Tromey <tom@tromey.com>
1416
1417 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1418 (list_available_thread_groups, mi_cmd_list_thread_groups)
1419 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1420 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1421 Likewise.
1422
393702cd
TT
14232017-09-09 Tom Tromey <tom@tromey.com>
1424
1425 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1426 ui_out_emit_tuple.
1427
76f9c9cf
TT
14282017-09-09 Tom Tromey <tom@tromey.com>
1429
1430 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1431 * stack.c (print_frame): Use ui_out_emit_tuple.
1432 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1433 (info_spu_mailbox_command, info_spu_dma_command)
1434 (info_spu_proxydma_command): Likewise.
1435 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1436 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1437 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1438 ui_out_emit_tuple.
1439 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1440
dc9fe180
TT
14412017-09-09 Tom Tromey <tom@tromey.com>
1442
1443 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1444 (class ui_out_emit_table): Update comment.
1445 * ui-out.c (do_cleanup_table_end)
1446 (make_cleanup_ui_out_table_begin_end): Remove.
1447 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1448 (info_spu_dma_cmdlist): Likewise.
1449 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1450 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1451 ui_out_emit_table.
1452
f8cc3da6
TT
14532017-09-09 Tom Tromey <tom@tromey.com>
1454
1455 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1456 ui_out_emit_list, gdb::optional.
1457
481695ed
JB
14582017-09-09 John Baldwin <jhb@FreeBSD.org>
1459
1460 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1461 prototype.
1462 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1463 prototype.
1464 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1465 prototype.
1466 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1467 * ada-exp.y: Remove _initialize_ada_exp prototype.
1468 * ada-lang.c: Remove _initialize_ada_language prototype.
1469 * ada-tasks.c: Remove _initialize_tasks prototype.
1470 * addrmap.c: Remove _initialize_addrmap prototype.
1471 * agent.c: Remove _initialize_agent prototype.
1472 * aix-thread.c: Remove _initialize_aix_thread prototype.
1473 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1474 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1475 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1476 prototype.
1477 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1478 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1479 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1480 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1481 prototype.
1482 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1483 prototype.
1484 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1485 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1486 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1487 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1488 prototype.
1489 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1490 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1491 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1492 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1493 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1494 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1495 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1496 prototype.
1497 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1498 prototype.
1499 * annotate.c: Remove _initialize_annotate prototype.
1500 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1501 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1502 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1503 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1504 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1505 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1506 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1507 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1508 prototype.
1509 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1510 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1511 * auto-load.c: Remove _initialize_auto_load prototype.
1512 * auxv.c: Remove _initialize_auxv prototype.
1513 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1514 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1515 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1516 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1517 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1518 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1519 prototype.
1520 * break-catch-throw.c: Remove _initialize_break_catch_throw
1521 prototype.
1522 * breakpoint.c: Remove _initialize_breakpoint prototype.
1523 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1524 * btrace.c: Remove _initialize_btrace prototype.
1525 * charset.c: Remove _initialize_charset prototype.
1526 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1527 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1528 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1529 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1530 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1531 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1532 * coffread.c: Remove _initialize_coffread prototype.
1533 * compile/compile.c: Remove _initialize_compile prototype.
1534 * complaints.c: Remove _initialize_complaints prototype.
1535 * completer.c: Remove _initialize_completer prototype.
1536 * copying.awk: Remove _initialize_copying prototype.
1537 * copying.c: Regenerate.
1538 * core-regset.c: Remove _initialize_core_regset prototype.
1539 * corefile.c: Remove _initialize_core prototype.
1540 * corelow.c: Remove _initialize_corelow prototype.
1541 * cp-abi.c: Remove _initialize_cp_abi prototype.
1542 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1543 * cp-support.c: Remove _initialize_cp_support prototype.
1544 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1545 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1546 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1547 * ctf.c: Remove _initialize_ctf prototype.
1548 * d-lang.c: Remove _initialize_d_language prototype.
1549 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1550 prototype.
1551 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1552 * dbxread.c: Remove _initialize_dbxread prototype.
1553 * dcache.c: Remove _initialize_dcache prototype.
1554 * demangle.c: Remove _initialize_demangler prototype.
1555 * disasm-selftests.c: Remove _initialize_disasm_selftests
1556 prototype.
1557 * disasm.c: Remove _initialize_disasm prototype.
1558 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1559 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1560 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1561 prototype.
1562 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1563 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1564 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1565 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1566 * elfread.c: Remove _initialize_elfread prototype.
1567 * exec.c: Remove _initialize_exec prototype.
1568 * extension.c: Remove _initialize_extension prototype.
1569 * f-lang.c: Remove _initialize_f_language prototype.
1570 * f-valprint.c: Remove _initialize_f_valprint prototype.
1571 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1572 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1573 * filesystem.c: Remove _initialize_filesystem prototype.
1574 * findcmd.c: Remove _initialize_mem_search prototype.
1575 * fork-child.c: Remove _initialize_fork_child prototype.
1576 * frame-base.c: Remove _initialize_frame_base prototype.
1577 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1578 * frame.c: Remove _initialize_frame prototype.
1579 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1580 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1581 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1582 * gcore.c: Remove _initialize_gcore prototype.
1583 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1584 * gdbarch.c: Regenerate.
1585 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1586 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1587 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1588 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1589 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1590 * go-lang.c: Remove _initialize_go_language prototype.
1591 * go32-nat.c: Remove _initialize_go32_nat prototype.
1592 * guile/guile.c: Remove _initialize_guile prototype.
1593 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1594 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1595 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1596 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1597 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1598 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1599 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1600 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1601 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1602 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1603 prototype.
1604 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1605 prototype.
1606 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1607 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1608 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1609 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1610 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1611 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1612 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1613 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1614 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1615 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1616 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1617 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1618 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1619 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1620 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1621 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1622 prototype.
1623 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1624 prototype.
1625 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1626 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1627 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1628 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1629 * infcall.c: Remove _initialize_infcall prototype.
1630 * infcmd.c: Remove _initialize_infcmd prototype.
1631 * inferior.c: Remove _initialize_inferiors prototype.
1632 * inflow.c: Remove _initialize_inflow prototype.
1633 * infrun.c: Remove _initialize_infrun prototype.
1634 * interps.c: Remove _initialize_interpreter prototype.
1635 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1636 * jit.c: Remove _initialize_jit prototype.
1637 * language.c: Remove _initialize_language prototype.
1638 * linux-fork.c: Remove _initialize_linux_fork prototype.
1639 * linux-nat.c: Remove _initialize_linux_nat prototype.
1640 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1641 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1642 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1643 * m2-lang.c: Remove _initialize_m2_language prototype.
1644 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1645 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1646 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1647 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1648 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1649 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1650 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1651 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1652 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1653 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1654 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1655 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1656 * machoread.c: Remove _initialize_machoread prototype.
1657 * macrocmd.c: Remove _initialize_macrocmd prototype.
1658 * macroscope.c: Remove _initialize_macroscope prototype.
1659 * maint.c: Remove _initialize_maint_cmds prototype.
1660 * mdebugread.c: Remove _initialize_mdebugread prototype.
1661 * memattr.c: Remove _initialize_mem prototype.
1662 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1663 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1664 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1665 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1666 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1667 * microblaze-linux-tdep.c: Remove
1668 _initialize_microblaze_linux_tdep prototype.
1669 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1670 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1671 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1672 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1673 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1674 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1675 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1676 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1677 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1678 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1679 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1680 prototype.
1681 * mipsread.c: Remove _initialize_mipsread prototype.
1682 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1683 prototype.
1684 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1685 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1686 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1687 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1688 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1689 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1690 prototype.
1691 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1692 * nto-procfs.c: Remove _initialize_procfs prototype.
1693 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1694 * objc-lang.c: Remove _initialize_objc_language prototype.
1695 * objfiles.c: Remove _initialize_objfiles prototype.
1696 * observer.c: Remove observer_test_first_notification_function,
1697 observer_test_second_notification_function,
1698 observer_test_third_notification_function, and
1699 _initialize_observer prototypes.
1700 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1701 * osabi.c: Remove _initialize_gdb_osabi prototype.
1702 * osdata.c: Remove _initialize_osdata prototype.
1703 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1704 * parse.c: Remove _initialize_parse prototype.
1705 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1706 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1707 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1708 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1709 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1710 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1711 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1712 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1713 * printcmd.c: Remove _initialize_printcmd prototype.
1714 * probe.c: Remove _initialize_probe prototype.
1715 * proc-api.c: Remove _initialize_proc_api prototype.
1716 * proc-events.c: Remove _initialize_proc_events prototype.
1717 * proc-service.c: Remove _initialize_proc_service prototype.
1718 * procfs.c: Remove _initialize_procfs prototype.
1719 * psymtab.c: Remove _initialize_psymtab prototype.
1720 * python/python.c: Remove _initialize_python prototype.
1721 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1722 * record-btrace.c: Remove _initialize_record_btrace prototype.
1723 * record-full.c: Remove _initialize_record_full prototype.
1724 * record.c: Remove _initialize_record prototype.
1725 * regcache.c: Remove _initialize_regcache prototype.
1726 * reggroups.c: Remove _initialize_reggroup prototype.
1727 * remote-notif.c: Remove _initialize_notif prototype.
1728 * remote-sim.c: Remove _initialize_remote_sim prototype.
1729 * remote.c: Remove _initialize_remote prototype.
1730 * reverse.c: Remove _initialize_reverse prototype.
1731 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1732 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1733 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1734 prototype.
1735 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1736 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1737 * rust-exp.y: Remove _initialize_rust_exp prototype.
1738 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1739 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1740 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1741 * score-tdep.c: Remove _initialize_score_tdep prototype.
1742 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1743 prototype.
1744 * ser-go32.c: Remove _initialize_ser_dos prototype.
1745 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1746 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1747 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1748 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1749 * serial.c: Remove _initialize_serial prototype.
1750 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1751 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1752 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1753 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1754 * skip.c: Remove _initialize_step_skip prototype.
1755 * sol-thread.c: Remove _initialize_sol_thread prototype.
1756 * solib-aix.c: Remove _initialize_solib_aix prototype.
1757 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1758 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1759 * solib-frv.c: Remove _initialize_frv_solib prototype.
1760 * solib-spu.c: Remove _initialize_spu_solib prototype.
1761 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1762 * solib-target.c: Remove _initialize_solib_target prototype.
1763 * solib.c: Remove _initialize_solib prototype.
1764 * source.c: Remove _initialize_source prototype.
1765 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1766 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1767 prototype.
1768 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1769 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1770 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1771 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1772 prototype.
1773 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1774 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1775 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1776 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1777 prototype.
1778 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1779 prototype.
1780 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1781 prototype.
1782 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1783 prototype.
1784 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1785 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1786 prototype.
1787 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1788 prototype.
1789 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1790 prototype.
1791 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1792 prototype.
1793 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1794 prototype.
1795 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1796 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1797 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1798 * stabsread.c: Remove _initialize_stabsread prototype.
1799 * stack.c: Remove _initialize_stack prototype.
1800 * stap-probe.c: Remove _initialize_stap_probe prototype.
1801 * std-regs.c: Remove _initialize_frame_reg prototype.
1802 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1803 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1804 * symfile.c: Remove _initialize_symfile prototype.
1805 * symmisc.c: Remove _initialize_symmisc prototype.
1806 * symtab.c: Remove _initialize_symtab prototype.
1807 * target-dcache.c: Remove _initialize_target_dcache prototype.
1808 * target-descriptions.c: Remove _initialize_target_descriptions
1809 prototype.
1810 * thread.c: Remove _initialize_thread prototype.
1811 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1812 prototype.
1813 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1814 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1815 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1816 prototype.
1817 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1818 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1819 * tracefile.c: Remove _initialize_tracefile prototype.
1820 * tracepoint.c: Remove _initialize_tracepoint prototype.
1821 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1822 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1823 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1824 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1825 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1826 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1827 * tui/tui.c: Remove _initialize_tui prototype.
1828 * typeprint.c: Remove _initialize_typeprint prototype.
1829 * user-regs.c: Remove _initialize_user_regs prototype.
1830 * utils.c: Remove _initialize_utils prototype.
1831 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1832 * valarith.c: Remove _initialize_valarith prototype.
1833 * valops.c: Remove _initialize_valops prototype.
1834 * valprint.c: Remove _initialize_valprint prototype.
1835 * value.c: Remove _initialize_values prototype.
1836 * varobj.c: Remove _initialize_varobj prototype.
1837 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1838 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1839 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1840 * windows-nat.c: Remove _initialize_windows_nat,
1841 _initialize_check_for_gdb_ini, and _initialize_loadable
1842 prototypes.
1843 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1844 * xcoffread.c: Remove _initialize_xcoffread prototype.
1845 * xml-support.c: Remove _initialize_xml_support prototype.
1846 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1847 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1848 prototype.
1849 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1850 prototype.
1851 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1852
a611b5cb
KS
18532017-09-08 Keith Seitz <keiths@redhat.com>
1854
1855 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1856 field.
1857
469412dd
CW
18582017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1859
1860 * f-valprint.c (f_val_print): Remove check for one byte
1861 sized integers. Remove printing of character type.
1862
a5ad232b
FP
18632017-09-08 Frank Penczek <frank.penczek@intel.com>
1864 Christoph Weinmann <christoph.t.weinmann@intel.com>
1865 Bernhard Heckel <bernhard.heckel@intel.com>
1866
1867 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1868 to maintain proper indentation when printing pointers/refs.
1869
e5014227
JB
18702017-09-07 Joel Brobecker <brobecker@adacore.com>
1871
1872 GDB 8.0.1 released.
1873
63c99141
JB
18742017-09-07 Joel Brobecker <brobecker@adacore.com>
1875
1876 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1877
69c1e056
TT
18782017-09-05 Tom Tromey <tom@tromey.com>
1879
1880 * parse.c (funcall_chain): Now a std::vector.
1881 (start_arglist, end_arglist): Simplify.
1882 (free_funcalls): Remove.
1883 (parse_exp_in_context_1): Remove cleanup.
1884
fef704bf
TT
18852017-09-05 Tom Tromey <tom@tromey.com>
1886
1887 * go-exp.y (go_parse): Don't create a cleanup.
1888
5613c585
TT
18892017-09-05 Tom Tromey <tom@tromey.com>
1890
1891 * d-exp.y (PrimaryExpression): Use std::string.
1892 (d_parse): Don't create a cleanup.
1893
eae49211
TT
18942017-09-05 Tom Tromey <tom@tromey.com>
1895
1896 * utils.c (do_clear_parser_state): Remove.
1897 (make_cleanup_clear_parser_state): Remove.
1898 * p-exp.y (pascal_parse): Use scoped_restore.
1899 * m2-exp.y (m2_parse): Use scoped_restore.
1900 * f-exp.y (f_parse): Use scoped_restore.
1901 * d-exp.y (d_parse): Use scoped_restore.
1902 * c-exp.y (c_parse): Use scoped_restore.
1903 * ada-exp.y (ada_parse): Use scoped_restore.
1904 * utils.h (make_cleanup_clear_parser_state): Remove.
1905
73b9be8b
KS
19062017-09-06 Keith Seitz <keiths@redhat.com>
1907
1908 * dwarf2read.c (dw2_linkage_name_attr): New function.
1909 (dw2_linkage_name): New function.
1910 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1911 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1912 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1913
a102602b
KR
19142017-09-06 Kamil Rytarowski <n54@gmx.com>
1915
1916 * config/djgpp/djconfig.sh: Correct shell portability issue.
1917
28ad437d
KR
19182017-09-06 Kamil Rytarowski <n54@gmx.com>
1919
1920 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1921
351787dd
JB
19222017-09-06 John Baldwin <jhb@FreeBSD.org>
1923
1924 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1925 * NEWS: Mention new FreeBSD/mips native configuration.
1926 * configure.host: Add aarch64*-*-freebsd*.
1927 * configure.nat: Likewise.
1928 * aarch64-fbsd-nat.c: New file.
1929
c0f84956
JB
19302017-09-06 John Baldwin <jhb@FreeBSD.org>
1931
1932 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1933 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1934 * NEWS: Mention new FreeBSD/aarch64 target.
1935 * configure.tgt: Add aarch64*-*-freebsd*.
1936 * aarch64-fbsd-tdep.c: New file.
1937 * aarch64-fbsd-tdep.h: New file.
1938
7610297a
KR
19392017-09-06 Kamil Rytarowski <n54@gmx.com>
1940
1941 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1942
fbd1b771
JK
19432017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1944
1945 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1946 of TLS symbols.
1947
5ca79eae
PW
19482017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1949
1950 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1951 call.
1952
bf93d7ba
SM
19532017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1954
1955 * infrun.c (follow_exec): Call add_thread after
1956 target_find_description.
1957
1bb7c059
SM
19582017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1959
1960 * infrun.c (handle_inferior_event_1): When exec'ing, read
1961 stop_pc after follow_exec.
1962
fc809827
SM
19632017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1964
1965 * remote.c (process_g_packet): Update error message.
1966
d2fcdd85
YQ
19672017-09-05 Yao Qi <yao.qi@linaro.org>
1968
1969 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1970 targets.
1971
e69570ee
PA
19722017-09-05 Pedro Alves <palves@redhat.com>
1973
1974 * eval.c (eval_call, evaluate_funcall): New functions, factored
1975 out from ...
1976 (evaluate_subexp_standard): ... this.
1977
22916b07
YQ
19782017-09-05 Yao Qi <yao.qi@linaro.org>
1979
1980 * amd64-tdep.c (amd64_target_description): Create target
1981 descriptions.
1982 (_initialize_amd64_tdep): Don't call functions
1983 initialize_tdesc_amd64_*. Add self tests.
1984 * arch/amd64.c (amd64_create_target_description): Add parameter
1985 is_linux. Call set_tdesc_osabi if is_linux is true.
1986 * arch/amd64.h (amd64_create_target_description): Update the
1987 declaration.
1988 * arch/i386.c (i386_create_target_description): Add parameter
1989 is_linux. Call set_tdesc_osabi if is_linux is true.
1990 * arch/i386.h (i386_create_target_description): Update
1991 declaration.
1992 * configure.tgt: Add i386.o to gdb_target_obs.
1993 * features/Makefile (XMLTOC): Remove i386/*.xml.
1994 * features/i386/amd64-avx-avx512.c: Remove.
1995 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1996 * features/i386/amd64-avx-mpx.c: Remove.
1997 * features/i386/amd64-avx.c: Remove.
1998 * features/i386/amd64-mpx.c: Remove.
1999 * features/i386/amd64.c: Remove.
2000 * features/i386/i386-avx-avx512.c: Remove.
2001 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2002 * features/i386/i386-avx-mpx.c: Remove.
2003 * features/i386/i386-avx.c: Remove.
2004 * features/i386/i386-mmx.c: Remove.
2005 * features/i386/i386-mpx.c: Remove.
2006 * features/i386/i386.c: Remove.
2007 * i386-tdep.c: Don't include features/i386/i386*.c., include
2008 target-descriptions.h and arch/i386.h.
2009 (i386_target_description): Create target descriptions.
2010 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2011 functions. Do self tests.
2012
0854b7b1
YQ
20132017-09-05 Yao Qi <yao.qi@linaro.org>
2014
2015 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2016 * features/i386/amd64-avx-avx512-linux.c: Removed.
2017 * features/i386/amd64-avx-linux.c: Removed.
2018 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2019 * features/i386/amd64-avx-mpx-linux.c: Removed.
2020 * features/i386/amd64-linux.c: Removed.
2021 * features/i386/amd64-mpx-linux.c: Removed.
2022 * features/i386/x32-avx-avx512-linux.c: Removed.
2023 * features/i386/x32-avx-linux.c: Removed.
2024 * features/i386/x32-linux.c: Removed.
2025
b4570e4b
YQ
20262017-09-05 Yao Qi <yao.qi@linaro.org>
2027
2028 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2029 features/i386/*.c.
2030 (amd64_linux_read_description): Call
2031 amd64_create_target_description.
2032 * arch/amd64.c: New file.
2033 * arch/amd64.h: New file.
2034 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2035 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2036
6c73f67f
YQ
20372017-09-05 Yao Qi <yao.qi@linaro.org>
2038
2039 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2040 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2041 (amd64_linux_read_description): Create target descriptions.
2042 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2043 functions. Add unit tests.
2044 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2045 x32-core.xml.
2046 * features/i386/64bit-avx.c: Generated.
2047 * features/i386/64bit-avx512.c: Generated.
2048 * features/i386/64bit-core.c: Generated.
2049 * features/i386/64bit-linux.c: Generated.
2050 * features/i386/64bit-mpx.c: Generated.
2051 * features/i386/64bit-pkeys.c: Generated.
2052 * features/i386/64bit-segments.c: Generated.
2053 * features/i386/64bit-sse.c: Generated.
2054 * features/i386/x32-core.c: Generated.
2055 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2056 c files for amd64-linux and x32-linux.
2057
9d3d478b
YQ
20582017-09-05 Yao Qi <yao.qi@linaro.org>
2059
2060 * amd64-linux-tdep.c (amd64_linux_read_description): New
2061 function.
2062 (amd64_linux_core_read_description): Call
2063 amd64_linux_read_description.
2064 (amd64_linux_init_abi): Likewise.
2065 (amd64_x32_linux_init_abi): Likewise.
2066 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2067 * x86-linux-nat.c (x86_linux_read_description): Call
2068 amd64_linux_read_description.
2069
b9f1d50f
YQ
20702017-09-05 Yao Qi <yao.qi@linaro.org>
2071
2072 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2073 comments.
2074
188c9e6d
YQ
20752017-09-05 Yao Qi <yao.qi@linaro.org>
2076
2077 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2078 * features/i386/i386-avx-avx512-linux.c: Remove.
2079 * features/i386/i386-avx-linux.c: Remove.
2080 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2081 * features/i386/i386-avx-mpx-linux.c: Remove.
2082 * features/i386/i386-linux.c: Remove.
2083 * features/i386/i386-mmx-linux.c: Remove.
2084 * features/i386/i386-mpx-linux.c: Remove.
2085
5f035c07
YQ
20862017-09-05 Yao Qi <yao.qi@linaro.org>
2087
2088 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2089 (SFILES): Add arch/i386.c.
2090 (HFILES_NO_SRCDIR): Add arch/i386.h.
2091 * arch/i386.c: New file.
2092 * arch/i386.h: New file.
2093 * arch/tdesc.h (allocate_target_description): Declare.
2094 (set_tdesc_architecture): Declare.
2095 (set_tdesc_osabi): Declare.
2096 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2097 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2098 include arch/i386.h.
2099 (i386_linux_read_description): Remove code and call
2100 i386_create_target_description.
2101 (set_tdesc_architecture): New function.
2102 (set_tdesc_osabi): New function.
2103 * target-descriptions.h (allocate_target_description): Remove.
2104
0abe8a89
YQ
21052017-09-05 Yao Qi <yao.qi@linaro.org>
2106
2107 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2108 * target-descriptions.c (tdesc_create_feature): Likewise, and
2109 adjust code.
2110 * features/i386/32bit-avx.c: Re-generated.
2111 * features/i386/32bit-avx512.c: Re-generated.
2112 * features/i386/32bit-core.c: Re-generated.
2113 * features/i386/32bit-linux.c: Re-generated.
2114 * features/i386/32bit-mpx.c: Re-generated.
2115 * features/i386/32bit-pkeys.c: Re-generated.
2116 * features/i386/32bit-sse.c: Re-generated.
2117
0a188386
YQ
21182017-09-05 Yao Qi <yao.qi@linaro.org>
2119
2120 * regformats/regdef.h (struct reg): Override operator == and !=.
2121
f49ff000
YQ
21222017-09-05 Yao Qi <yao.qi@linaro.org>
2123
2124 * arch/tdesc.h: New file.
2125 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2126 * target-descriptions.c: Update comments.
2127 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2128 declarations.
2129 * features/i386/32bit-avx.c: Re-generated.
2130 * features/i386/32bit-avx512.c: Re-generated.
2131 * features/i386/32bit-core.c: Re-generated.
2132 * features/i386/32bit-linux.c: Re-generated.
2133 * features/i386/32bit-mpx.c: Re-generated.
2134 * features/i386/32bit-pkeys.c: Re-generated.
2135 * features/i386/32bit-sse.c: Re-generated.
2136
f7000548
YQ
21372017-09-05 Yao Qi <yao.qi@linaro.org>
2138
2139 * regformats/regdat.sh: Update generated code.
2140
c9a5e2a5
YQ
21412017-09-05 Yao Qi <yao.qi@linaro.org>
2142
2143 * regformats/regdat.sh: Adjust code order.
2144
d6b687ac
SM
21452017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2146
2147 * expprint.c (dump_subexp_body_standard): Use constant format
2148 string in fprintf_filtered call.
2149
a379bfd0
JB
21502017-09-04 John Baldwin <jhb@FreeBSD.org>
2151
2152 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2153 NetBSD/i386.
2154 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2155
f7efc967
JB
21562017-09-04 John Baldwin <jhb@FreeBSD.org>
2157
2158 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2159
c49fbc6c
JB
21602017-09-04 John Baldwin <jhb@FreeBSD.org>
2161
2162 * bsd-kvm.o: Define _KMEMUSER.
2163 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2164 * configure: Regenerate.
2165
26562e73
JB
21662017-09-04 John Baldwin <jhb@FreeBSD.org>
2167
2168 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2169 * i386-fbsd-nat.c: Likewise.
2170
31cf1487
JB
21712017-09-04 John Baldwin <jhb@FreeBSD.org>
2172
2173 * unittests/array-view-selftests.c: Add include of <array>.
2174
5b9f8a7c
JB
21752017-09-04 John Baldwin <jhb@FreeBSD.org>
2176
2177 * spu-tdep.c (flush_ea_cache): Add missing argument to
2178 call_function_by_hand.
2179
d69cf9b2
PA
21802017-09-04 Pedro Alves <palves@redhat.com>
2181
2182 * NEWS (Safer support for debugging with no debug info): New.
2183
3693fdb3
PA
21842017-09-04 Pedro Alves <palves@redhat.com>
2185
2186 * c-exp.y (function_method, function_method_void): Add current
2187 instance flags to TYPE_INSTANCE.
2188 * dwarf2read.c (check_modifier): New.
2189 (compute_delayed_physnames): Assert that only C++ adds delayed
2190 physnames. Mark fn_fields as const/volatile depending on
2191 physname.
2192 * eval.c (make_params): New type_instance_flags parameter. Use
2193 it as the new type's instance flags.
2194 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2195 flags element and pass it to make_params.
2196 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2197 instance flags element.
2198 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2199 * gdbtypes.h: Include "enum-flags.h".
2200 (type_instance_flags): New enum-flags type.
2201 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2202 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2203 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2204 (follow_type_instance_flags): New function.
2205 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2206 * parser-defs.h (follow_type_instance_flags): Declare.
2207 * valops.c (value_struct_elt_for_reference): const/volatile must
2208 match too.
2209
e68cb8e0
PA
22102017-09-04 Pedro Alves <palves@redhat.com>
2211
2212 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2213 function/method scopes; lookup the nested name as a function local
2214 static variable.
2215
858be34c
PA
22162017-09-04 Pedro Alves <palves@redhat.com>
2217
2218 (%type <voidval>): Add function_method.
2219 * c-exp.y (exp): New production for calls with no arguments.
2220 (function_method, function_method_void_or_typelist): New
2221 productions.
2222 (exp): New production for "method()::static_var".
2223 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2224 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2225 Handle OP_FUNC_STATIC_VAR.
2226 * parse.c (operator_length_standard):
2227 Handle OP_FUNC_STATIC_VAR.
2228
dd5901a6
PA
22292017-09-04 Pedro Alves <palves@redhat.com>
2230
2231 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2232 handling.
2233 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2234 Ditto.
2235 * parse.c (operator_length_standard, operator_check_standard):
2236 Ditto.
2237 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2238
46a4882b
PA
22392017-09-04 Pedro Alves <palves@redhat.com>
2240
2241 * ax-gdb.c: Include "typeprint.h".
2242 (gen_expr_for_cast): New function.
2243 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2244 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2245 type is unknown.
2246 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2247 nodebug_data_symbol.
2248 * eval.c: Include "typeprint.h".
2249 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2250 Error out if symbol has unknown type.
2251 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2252 evaluate_subexp_for_cast.
2253 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2254 OP_VAR_MSYM_VALUE.
2255 (evaluate_subexp_for_cast): New function.
2256 * gdbtypes.c (init_nodebug_var_type): New function.
2257 (objfile_type): Use it to initialize types of variables with no
2258 debug info.
2259 * typeprint.c (error_unknown_type): New.
2260 * typeprint.h (error_unknown_type): New declaration.
2261 * compile/compile-c-types.c (convert_type_basic): Handle
2262 TYPE_CODE_ERROR; warn and fallback to int for variables with
2263 unknown type.
2264
fe13dfec
PA
22652017-09-04 Pedro Alves <palves@redhat.com>
2266
2267 * eval.c (evaluate_var_value): New function, factored out from ...
2268 (evaluate_subexp_standard): ... here.
2269
d008ee21
PA
22702017-09-04 Pedro Alves <palves@redhat.com>
2271
2272 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2273 Remove useless assignments to 'op'.
2274
827d0c51
PA
22752017-09-04 Pedro Alves <palves@redhat.com>
2276
2277 * eval.c (eval_skip_value): New function.
2278 (evaluate_subexp_standard): Use it.
2279
2c5a2be1
PA
22802017-09-04 Pedro Alves <palves@redhat.com>
2281
2282 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2283 function name from symbol/minsym and pass it to
2284 error_call_unknown_return_type.
2285
74ea4be4
PA
22862017-09-04 Pedro Alves <palves@redhat.com>
2287
2288 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2289 * ax-gdb.c (gen_msym_var_ref): New function.
2290 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2291 * eval.c (evaluate_var_msym_value): New function.
2292 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2293 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2294 to call_function_by_hand.
2295 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2296 Handle OP_VAR_MSYM_VALUE.
2297 (union exp_element) <msymbol>: New field.
2298 * minsyms.h (struct type): Forward declare.
2299 (find_minsym_type_and_address): Declare.
2300 * parse.c (write_exp_elt_msym): New function.
2301 (write_exp_msymbol): Delete, refactored as ...
2302 (find_minsym_type_and_address): ... this new function.
2303 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2304 (operator_length_standard, operator_check_standard): Handle
2305 OP_VAR_MSYM_VALUE.
2306 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2307
7022349d
PA
23082017-09-04 Pedro Alves <palves@redhat.com>
2309
2310 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2311 TYPE_GNU_IFUNC specially here. Throw error if return type is
2312 unknown.
2313 * ada-typeprint.c (print_func_type): Handle functions with unknown
2314 return type.
2315 * c-typeprint.c (c_type_print_base): Handle functions and methods
2316 with unknown return type.
2317 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2318 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2319 * compile/compile-c-types.c: Include "objfiles.h".
2320 (convert_func): For functions with unknown return type, warn and
2321 default to int.
2322 * compile/compile-object-run.c (compile_object_run): Adjust call
2323 to call_function_by_hand_dummy.
2324 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2325 call_function_by_hand.
2326 * eval.c (evaluate_subexp_standard): Adjust calls to
2327 call_function_by_hand. Handle functions and methods with unknown
2328 return type. Pass expect_type to call_function_by_hand.
2329 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2330 return type.
2331 * gcore.c (call_target_sbrk): Adjust call to
2332 call_function_by_hand.
2333 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2334 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2335 an integer address type instead of nodebug.
2336 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2337 call_function_by_hand.
2338 * infcall.c (error_call_unknown_return_type): New function.
2339 (call_function_by_hand): New "default_return_type" parameter.
2340 Pass it down.
2341 (call_function_by_hand_dummy): New "default_return_type"
2342 parameter. Use it instead of defaulting to int. If there's no
2343 default and the return type is unknown, throw an error. If
2344 there's a default return type, and the called function has no
2345 debug info, then assume the function is prototyped.
2346 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2347 New "default_return_type" parameter.
2348 (error_call_unknown_return_type): New declaration.
2349 * linux-fork.c (call_lseek): Cast return type of lseek.
2350 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2351 call_function_by_hand.
2352 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2353 calls to call_function_by_hand.
2354 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2355 return type.
2356 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2357 (value_nsstring, print_object_command): Adjust calls to
2358 call_function_by_hand.
2359 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2360 functions with unknown return type.
2361 (pascal_type_print_func_varspec_suffix): New function.
2362 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2363 TYPE_CODE_METHOD>: Use it.
2364 * python/py-value.c (valpy_call): Adjust call to
2365 call_function_by_hand.
2366 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2367 call_function_by_hand.
2368 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2369 call_function_by_hand.
2370 * valops.c (value_allocate_space_in_inferior): Adjust call to
2371 call_function_by_hand.
2372 * typeprint.c (type_print_unknown_return_type): New function.
2373 * typeprint.h (type_print_unknown_return_type): New declaration.
2374
54990598
PA
23752017-09-04 Pedro Alves <palves@redhat.com>
2376
2377 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2378 types with more than one parameter as prototyped.
2379
9a24775b
PA
23802017-09-04 Pedro Alves <palves@redhat.com>
2381
2382 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2383 (disassemble_command): Use gdb_disassembly_flags instead of bare
2384 int.
2385 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2386 (dump_insns, do_mixed_source_and_assembly_deprecated)
2387 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2388 Use gdb_disassembly_flags instead of bare int.
2389 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2390 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2391 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2392 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2393 (enum gdb_disassembly_flag): ... values of this new enumeration.
2394 (gdb_disassembly_flags): Define.
2395 (gdb_disassembly)
2396 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2397 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2398 gdb_disassembly_flags instead of bare int.
2399 * record-btrace.c (btrace_insn_history)
2400 (record_btrace_insn_history, record_btrace_insn_history_range)
2401 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2402 instead of bare int.
2403 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2404 Use gdb_disassembly_flags instead of bare int.
2405 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2406 Define.
2407 * target-delegates.c: Regenerate.
2408 * target.c (target_insn_history, target_insn_history_from)
2409 (target_insn_history_range): Use gdb_disassembly_flags instead of
2410 bare int.
2411 * target.h: Include "disasm.h".
2412 (struct target_ops) <to_insn_history, to_insn_history_from,
2413 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2414 int.
2415 (target_insn_history, target_insn_history_from)
2416 (target_insn_history_range): Use gdb_disassembly_flags instead of
2417 bare int.
2418
80a65e9b
SM
24192017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2420
2421 * cli/cli-script.c (build_command_line): For if/while commands,
2422 check whether args is empty.
2423
6b66338c
SM
24242017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2425
2426 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2427 (enum command_control_type): Likewise.
2428 (struct command_line): Likewise.
2429 (free_command_lines): Likewise.
2430 (struct command_lines_deleter): Likewise.
2431 (command_line_up): Likewise.
2432 (read_command_lines): Likewise.
2433 (read_command_lines_1): Likewise.
2434 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2435 (enum command_control_type): Likewise.
2436 (struct command_line): Likewise.
2437 (free_command_lines): Likewise.
2438 (struct command_lines_deleter): Likewise.
2439 (command_line_up): Likewise.
2440 (read_command_lines): Likewise.
2441 (read_command_lines_1): Likewise.
2442 * breakpoint.h: Include cli/cli-script.h.
2443 * extension-priv.h: Likewise.
2444 * gdbcmd.h: Likewise.
2445
51abb421
PA
24462017-09-04 Pedro Alves <palves@redhat.com>
2447
2448 * ada-lang.c (is_known_support_routine): Move sal declaration to
2449 where it is initialized.
2450 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2451 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2452 (clear_command, update_static_tracepoint): Remove init_sal
2453 references. Move declarations closer to initializations.
2454 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2455 initializations.
2456 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2457 references. Move sal declarations closer to initializations.
2458 * frame.c (find_frame_sal): Return a symtab_and_line via function
2459 return instead of output parameter. Remove init_sal references.
2460 * frame.h (find_frame_sal): Return a symtab_and_line via function
2461 return instead of output parameter.
2462 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2463 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2464 instead of memset.
2465 (gdbscm_find_pc_line): Remove init_sal reference.
2466 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2467 references. Move declarations closer to initializations.
2468 * infcmd.c (set_step_frame): Update. Move declarations closer to
2469 initializations.
2470 (finish_backward): Remove init_sal references. Move declarations
2471 closer to initializations.
2472 * infrun.c (process_event_stop_test, handle_step_into_function)
2473 (insert_hp_step_resume_breakpoint_at_frame)
2474 (insert_step_resume_breakpoint_at_caller): Likewise.
2475 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2476 (symbol_to_sal): Likewise.
2477 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2478 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2479 to its initialization.
2480 * reverse.c (save_bookmark_command): Use new/delete. Remove
2481 init_sal references. Move declarations closer to initializations.
2482 * source.c (get_current_source_symtab_and_line): Remove brace
2483 initialization.
2484 (set_current_source_symtab_and_line): Now takes the sal by const
2485 reference. Remove brace initialization.
2486 (line_info): Remove init_sal reference.
2487 * source.h (set_current_source_symtab_and_line): Now takes a
2488 symtab_and_line via const reference.
2489 * stack.c (set_current_sal_from_frame): Adjust.
2490 (print_frame_info): Adjust.
2491 (get_last_displayed_sal): Return the sal via function return
2492 instead of via output parameter. Simplify.
2493 (frame_info): Adjust.
2494 * stack.h (get_last_displayed_sal): Return the sal via function
2495 return instead of via output parameter.
2496 * symtab.c (init_sal): Delete.
2497 (find_pc_sect_line): Remove init_sal references. Move
2498 declarations closer to initializations.
2499 (find_function_start_sal): Remove init_sal references. Move
2500 declarations closer to initializations.
2501 * symtab.h (struct symtab_and_line): In-class initialize all
2502 fields.
2503 * tracepoint.c (set_traceframe_context)
2504 (print_one_static_tracepoint_marker): Remove init_sal references.
2505 Move declarations closer to initializations.
2506 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2507 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2508 declarations closer to initializations.
2509 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2510 init_sal references. Adjust.
2511
6c5b2ebe
PA
25122017-09-04 Pedro Alves <palves@redhat.com>
2513
2514 * ax-gdb.c (agent_command_1): Use range-for.
2515 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2516 * breakpoint.c: Include "common/array-view.h".
2517 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2518 parameter from struct symtabs_and_lines to
2519 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2520 (breakpoint_sals_to_pc): Change sals parameter from struct
2521 symtabs_and_lines to std::vector reference.
2522 (check_fast_tracepoint_sals): Change sals parameter from struct
2523 symtabs_and_lines to std::array_view. Use range-for.
2524 (decode_static_tracepoint_spec): Return a std::vector instead of
2525 symtabs_and_lines. Update.
2526 (create_breakpoint): Update.
2527 (break_range_command, until_break_command, clear_command): Update.
2528 (base_breakpoint_decode_location, bkpt_decode_location)
2529 (bkpt_probe_create_sals_from_location)
2530 (bkpt_probe_decode_location, tracepoint_decode_location)
2531 (tracepoint_probe_decode_location)
2532 (strace_marker_create_sals_from_location): Return a std::vector
2533 instead of symtabs_and_lines.
2534 (strace_marker_create_breakpoints_sal): Update.
2535 (strace_marker_decode_location): Return a std::vector instead of
2536 symtabs_and_lines. Update.
2537 (update_breakpoint_locations): Change struct symtabs_and_lines
2538 parameters to gdb::array_view. Adjust.
2539 (location_to_sals): Return a std::vector instead of
2540 symtabs_and_lines. Update.
2541 (breakpoint_re_set_default): Use std::vector instead of struct
2542 symtabs_and_lines.
2543 (decode_location_default): Return a std::vector instead of
2544 symtabs_and_lines. Update.
2545 * breakpoint.h: Include "common/array-view.h".
2546 (struct breakpoint_ops) <decode_location>: Now returns a
2547 std::vector instead of returning a symtabs_and_lines via output
2548 parameter.
2549 (update_breakpoint_locations): Change sals parameters to use
2550 gdb::array_view.
2551 * cli/cli-cmds.c (edit_command, list_command): Update to use
2552 std::vector and gdb::array_view.
2553 (ambiguous_line_spec): Adjust to use gdb::array_view and
2554 range-for.
2555 (compare_symtabs): Rename to ...
2556 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2557 const reference and adjust.
2558 (filter_sals): Rewrite using std::vector and standard algorithms.
2559 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2560 (jump_command): Update to use std::vector.
2561 * linespec.c (struct linespec_state) <canonical_names>: Update
2562 comment.
2563 (add_sal_to_sals_basic): Delete.
2564 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2565 (decode_line_2, create_sals_line_offset)
2566 (convert_address_location_to_sals, convert_linespec_to_sals)
2567 (convert_explicit_location_to_sals, parse_linespec)
2568 (event_location_to_sals, decode_line_full, decode_line_1)
2569 (decode_line_with_current_source)
2570 (decode_line_with_last_displayed, decode_objc)
2571 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2572 (linespec_result::~linespec_result): Adjust to use std::vector
2573 instead of symtabs_and_lines.
2574 * linespec.h (linespec_sals::sals): Now a std::vector.
2575 (struct linespec_result): Use std::vector, bool, and in-class
2576 initialization.
2577 (decode_line_1, decode_line_with_current_source)
2578 (decode_line_with_last_displayed): Return std::vector.
2579 * macrocmd.c (info_macros_command): Use std::vector.
2580 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2581 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2582 std::vector.
2583 * probe.h (parse_probes): Return a std::vector.
2584 * python/python.c (gdbpy_decode_line): Use std::vector and
2585 gdb::array_view.
2586 * source.c (select_source_symtab, line_info): Use std::vector.
2587 * stack.c (func_command): Use std::vector.
2588 * symtab.h (struct symtabs_and_lines): Delete.
2589 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2590
7c44b49c
PA
25912017-09-04 Pedro Alves <palves@redhat.com>
2592
2593 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2594 unittests/array-view-selftests.c.
2595 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2596 * common/array-view.h: New file.
2597 * unittests/array-view-selftests.c: New file.
2598
e439fa14
PA
25992017-09-04 Pedro Alves <palves@redhat.com>
2600
2601 * cli/cli-cmds.c (edit_command): Pass message to
2602 ambiguous_line_spec.
2603 (list_command): Pass message to ambiguous_line_spec. Say
2604 "first"/"last" instead of "start" and "end" to be consistent with
2605 the manual.
2606 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2607 them to print formatted message.
2608
7525b645
PA
26092017-09-04 Pedro Alves <palves@redhat.com>
2610
2611 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2612 ftrace_update_insns by reference instead of pointer.
2613
badc0020
YQ
26142017-09-04 Yao Qi <yao.qi@linaro.org>
2615
2616 * i386-go32-tdep.c: Include x86-xstate.h.
2617 (i386_go32_init_abi): Call i386_target_description.
2618 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2619 if xcr0 is X86_XSTATE_X87_MASK.
2620 * i386-tdep.h (tdesc_i386): Remove the declaration.
2621 (tdesc_i386_mmx): Likewise.
2622
d78bdb54
YQ
26232017-09-04 Yao Qi <yao.qi@linaro.org>
2624
2625 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2626 X86_XSTATE_SSE_MASK instead of 0.
2627
ca1fa5ee
YQ
26282017-09-04 Yao Qi <yao.qi@linaro.org>
2629
2630 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2631 i386_target_description.
2632 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2633 i386_target_description.
2634 * i386-tdep.c (i386_gdbarch_init): Likewise.
2635
2434b019
YQ
26362017-09-04 Yao Qi <yao.qi@linaro.org>
2637
2638 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2639 (x86_darwin_init_abi_64): Call amd64_target_description.
2640 * amd64-dicos-tdep.c: Likewise.
2641 * amd64-fbsd-nat.c: Likewise.
2642 * amd64-fbsd-tdep.c: Likewise.
2643 * amd64-nbsd-tdep.c: Likewise.
2644 * amd64-obsd-tdep.c: Likewise.
2645 * amd64-sol2-tdep.c: Likewise.
2646 * amd64-windows-tdep.c: Likewise.
2647 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2648
0860c437
SM
26492017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2650
2651 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2652 (btrace_function) <insn>: Change type to use std::vector.
2653 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2654 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2655 ftrace_update_insns, ftrace_compute_global_level_offset,
2656 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2657 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2658 change to std::vector.
2659 (ftrace_update_insns): Adjust to change to std::vector, change
2660 type of INSN parameter.
2661 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2662 * record-btrace.c (btrace_call_history_insn_range,
2663 btrace_compute_src_line_range,
2664 record_btrace_frame_prev_register): Adjust to change to
2665 std::vector.
2666 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2667 to change to std::vector.
2668
0638b7f9
TT
26692017-09-03 Tom Tromey <tom@tromey.com>
2670
2671 * corefile.c (reopen_exec_file): Use std::string.
2672
8f84fb0e
TT
26732017-09-03 Tom Tromey <tom@tromey.com>
2674
2675 * compile/compile.c (compile_register_name_mangled): Return
2676 std::string.
2677 * compile/compile-loc2c.c (pushf_register_address): Update.
2678 (pushf_register): Update.
2679 * compile/compile-c-types.c (convert_array): Update.
2680 * compile/compile-c-symbols.c (generate_vla_size): Update.
2681 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2682 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2683 (convert_one_symbol): Update.
2684 (generate_c_for_for_one_variable): Update.
2685 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2686 std::string.
2687 (generate_register_struct): Update.
2688 * compile/compile-internal.h (c_get_range_decl_name): Return a
2689 std::string.
2690 (compile_register_name_mangled): Return std::string.
2691
18e9961f
TT
26922017-09-03 Tom Tromey <tom@tromey.com>
2693
2694 * utils.c (perror_string): Return a std::string.
2695 (throw_perror_with_name, perror_warning_with_name): Update.
2696
45343786
TT
26972017-09-03 Tom Tromey <tom@tromey.com>
2698
2699 * demangle.c (demangle_command): Use std::string,
2700 unique_xmalloc_ptr.
2701
b57af503
TT
27022017-09-03 Tom Tromey <tom@tromey.com>
2703
2704 * cli/cli-setshow.c (do_set_command): Use std::string.
2705
6eecf35f
TT
27062017-09-03 Tom Tromey <tom@tromey.com>
2707
2708 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2709
56496dd4
TT
27102017-09-03 Tom Tromey <tom@tromey.com>
2711
2712 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2713
e91a1fa7
TT
27142017-09-03 Tom Tromey <tom@tromey.com>
2715
2716 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2717 gdb::unique_xmalloc_ptr.
2718
7ffd83d7
TT
27192017-09-03 Tom Tromey <tom@tromey.com>
2720
2721 * thread.c (print_thread_info_1): Use string_printf.
2722 (thread_apply_command, thread_apply_all_command): Use
2723 std::string.
2724
1ccbe998
TT
27252017-09-03 Tom Tromey <tom@tromey.com>
2726
2727 * valprint.c (val_print_string): Update.
2728 * gdbcore.h (memory_error_message): Return std::string.
2729 * corefile.c (memory_error_message): Return std::string.
2730 (memory_error): Update.
2731 * breakpoint.c (insert_bp_location): Update.
2732
23fdd69e
SM
27332017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2734
2735 * target/waitstatus.h (target_waitstatus_to_string): Change
2736 return type to std::string.
2737 * target/waitstatus.c (target_waitstatus_to_string): Return
2738 std::string.
2739 * target.h (target_waitstatus_to_string): Remove declaration.
2740 * infrun.c (resume, clear_proceed_status_thread,
2741 print_target_wait_results, do_target_wait, save_waitstatus,
2742 stop_all_threads): Adjust.
2743 * record-btrace.c (record_btrace_wait): Adjust.
2744 * target-debug.h
2745 (target_debug_print_struct_target_waitstatus_p): Adjust.
2746
5c811d30
JK
27472017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2748
2749 PR gdb/22046
2750 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2751 detection.
2752
0a2dde4a
SDJ
27532017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2754
2755 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2756 for setting/unsetting environment variables on the remote target.
2757 (New remote packets): Add entries for QEnvironmentHexEncoded,
2758 QEnvironmentUnset and QEnvironmentReset.
2759 * common/environ.c (gdb_environ::operator=): Extend method to
2760 handle m_user_set_env_list and m_user_unset_env_list.
2761 (gdb_environ::clear): Likewise.
2762 (match_var_in_string): Change type of first parameter from 'char
2763 *' to 'const char *'.
2764 (gdb_environ::set): Extend method to handle
2765 m_user_set_env_list and m_user_unset_env_list.
2766 (gdb_environ::unset): Likewise.
2767 (gdb_environ::clear_user_set_env): New method.
2768 (gdb_environ::user_set_envp): Likewise.
2769 (gdb_environ::user_unset_envp): Likewise.
2770 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2771 m_user_unset_env_list on move constructor/assignment.
2772 (unset): Add new default parameter 'update_unset_list = true'.
2773 (clear_user_set_env): New method.
2774 (user_set_envp): Likewise.
2775 (user_unset_envp): Likewise.
2776 (m_user_set_env_list): New std::set.
2777 (m_user_unset_env_list): Likewise.
2778 * common/rsp-low.c (hex2str): New function.
2779 (bin2hex): New overload for bin2hex function.
2780 * common/rsp-low.c (hex2str): New prototype.
2781 (str2hex): New overload prototype.
2782 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2783 QEnvironmentUnset and QEnvironmentReset.
2784 (remote_protocol_features): Add QEnvironmentHexEncoded,
2785 QEnvironmentUnset and QEnvironmentReset packets.
2786 (send_environment_packet): New function.
2787 (extended_remote_environment_support): Likewise.
2788 (extended_remote_create_inferior): Call
2789 extended_remote_environment_support.
2790 (_initialize_remote): Add QEnvironmentHexEncoded,
2791 QEnvironmentUnset and QEnvironmentReset packet configs.
2792 * unittests/environ-selftests.c (gdb_selftest_env_var):
2793 New variable.
2794 (test_vector_initialization): New function.
2795 (test_init_from_host_environ): Likewise.
2796 (test_reinit_from_host_environ): Likewise.
2797 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2798 Likewise.
2799 (test_unset_set_empty_vector): Likewise.
2800 (test_vector_clear): Likewise.
2801 (test_std_move): Likewise.
2802 (test_move_constructor):
2803 (test_self_move): Likewise.
2804 (test_set_unset_reset): Likewise.
2805 (run_tests): Rewrite in terms of the functions above.
2806
654670a4
WP
28072017-08-31 Weimin Pan <weimin.pan@oracle.com>
2808
2809 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2810 (adi_available): Use a temp variable of type CORE_ADDR as argument
2811 3 when calling target_auxv_search.
2812 (adi_normalize_address): Use masks and xor operators to calculate
2813 normalized address.
2814 (adi_read_versions, adi_write_versions, adi_print_versions)
2815 (do_examine, do_assign): Use paddress.
2816
7755ddb7
JB
28172017-08-29 John Baldwin <jhb@FreeBSD.org>
2818
2819 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2820 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2821 out of loop and add supply of FIR.
2822 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2823 add collect of FIR.
2824
fd437cbc
SM
28252017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2826
3804a343 2827 PR gdb/21827
fd437cbc
SM
2828 * cli/cli-script.c (define_command): Don't convert command name
2829 to lower case.
2830
988f6b3d
JB
28312017-08-25 Joel Brobecker <brobecker@adacore.com>
2832
2833 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2834 Update all callers accordingly. Remove all code blocks handling
2835 the case where DISPP is not NULL.
2836
663c44ac
JK
28372017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2838
2839 PR symtab/22003
2840 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2841 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2842 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2843
f1902523
JK
28442017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2845
2846 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2847 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2848 (read_comp_units_from_section): New parameter abbrev_section, use
2849 read_and_check_comp_unit_head, allocate signatured_type if needed.
2850 (create_all_comp_units): Update read_comp_units_from_section caller.
2851
87215ad1
SDJ
28522017-08-23 Pedro Alves <palves@redhat.com>
2853
2854 PR remote/21852
2855 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2856 to null_ptid and switch to thread without reading the registers
2857 after adding the inferior.
2858
6e41ddec
JK
28592017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2860
2861 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2862 compile-gcc.
2863 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2864 (compile_to_object): Implement compile_gcc.
2865 (_initialize_compile): Install "set compile-gcc". Initialize
2866 compile_gcc.
2867
e68c32d5
JK
28682017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2869
2870 * compile/compile.c (compile_to_object): Conditionally call
2871 set_verbose. Conditionally call compile or compile_v0.
2872
58afddc6
WP
28732017-08-07 Weimin Pan <weimin.pan@oracle.com>
2874
2875 * sparc64-tdep.h: (adi_normalize_address): New export.
2876 * sparc-nat.h: (open_adi_tag_fd): New export.
2877 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2878 * sparc64-linux-tdep.c:
2879 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2880 (sparc64_linux_handle_segmentation_fault): New function.
2881 (sparc64_linux_init_abi): Register
2882 sparc64_linux_handle_segmentation_fault
2883 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2884 (sparc64_addr_bits_remove): New function.
2885 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2886 (MAX_PROC_NAME_SIZE): New macro.
2887 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2888 (sparc64adilist): New variable.
2889 (adi_proc_list): New variable.
2890 (find_adi_info): New function.
2891 (add_adi_info): New function.
2892 (get_adi_info_proc): New function.
2893 (get_adi_info): New function.
2894 (info_adi_command): New function.
2895 (read_maps_entry): New function.
2896 (adi_available): New function.
2897 (adi_normalize_address): New function.
2898 (adi_align_address): New function.
2899 (adi_convert_byte_count): New function.
2900 (adi_tag_fd): New function.
2901 (adi_is_addr_mapped): New function.
2902 (adi_read_versions): New function.
2903 (adi_write_versions): New function.
2904 (adi_print_versions): New function.
2905 (do_examine): New function.
2906 (do_assign): New function.
2907 (adi_examine_command): New function.
2908 (adi_assign_command): New function.
2909 (_initialize_sparc64_adi_tdep): New function.
2910
11db9430
SM
29112017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2912
2913 * breakpoint.c (breakpoints_info): Rename to ...
2914 (info_breakpoints_command): ... this.
2915 (watchpoints_info): Rename to ...
2916 (info_watchpoints_command): ... this.
2917 (tracepoints_info): Rename to ...
2918 (info_tracepoints_command): ... this.
2919 (_initialize_breakpoint): Adjust.
2920 * dcache.c (dcache_info): Rename to ...
2921 (info_display_command): ... this.
2922 (_initialize_dcache): Adjust.
2923 * frame.h (args_info): Rename to ...
2924 (info_args_command): ... this.
2925 (locals_info): Rename to ...
2926 (info_locals_command): ... this.
2927 * infcmd.c (nofp_registers_info): Rename to ...
2928 (info_registers_command): ... this.
2929 (float_info): Rename to ...
2930 (info_float_command): ... this.
2931 (program_info): Rename to ...
2932 (info_program_command): ... this.
2933 (all_registers_info): Rename to ...
2934 (info_all_registers_command): ... this.
2935 (vector_info): Rename to ...
2936 (info_vector_command): ... this.
2937 (float_info): Rename to ...
2938 (info_float_command): ... this.
2939 (_initialize_infcmd): Adjust.
2940 * inferior.h (term_info): Rename to ...
2941 (info_terminal_command): ... this.
2942 * inflow.c (term_info): Rename to ...
2943 (info_terminal_command): ... this.
2944 (_initialize_inflow): Adjust.
2945 * infrun.c (signals_info): Rename to ...
2946 (info_signals_command): ... this.
2947 (_initialize_infrun): Adjust.
2948 * objc-lang.c (classes_info): Rename to ...
2949 (info_classes_command): ... this.
2950 (selectors_info): Rename to ...
2951 (info_selectors_command): ... this.
2952 (_initialize_objc_language): Adjust.
2953 * printcmd.c (sym_info): Rename to ...
2954 (info_symbol_command): ... this.
2955 (address_info): Rename to ...
2956 (info_address_command): ... this.
2957 (display_info): Rename to ...
2958 (info_display_command): ... this.
2959 (_initialize_printcmd): Adjust.
2960 * reverse.c (bookmarks_info): Rename to ...
2961 (info_breakpoints_command): ... this.
2962 (_initialize_reverse): Adjust.
2963 * ser-go32.c (dos_info): Rename to ...
2964 (info_serial_command): ... this.
2965 (_initialize_ser_dos): Adjust.
2966 * skip.c (skip_info): Rename to ...
2967 (info_skip_command): ... this.
2968 (_initialize_step_skip): Adjust.
2969 * source.c (line_info): Rename to ...
2970 (info_line_command): ... this.
2971 (source_info): Rename to ...
2972 (info_source_command)
2973 * stack.c (frame_info): Rename to ...
2974 (info_frame_command): ... this.
2975 (locals_info): Rename to ...
2976 (info_locals_command): ... this.
2977 (args_info): Rename to ...
2978 (info_args_command): ... this.
2979 (_initialize_stack): Adjust.
2980 * symtab.c (sources_info): Rename to ...
2981 (info_sources_command): ... this.
2982 (variables_info): Rename to ...
2983 (info_variables_command): ... this.
2984 (functions_info): Rename to ...
2985 (info_functions_command): ... this.
2986 (types_info): Rename to ...
2987 (info_types_command): ... this.
2988 (_initialize_symtab): Adjust.
2989 * target.c (target_info): Rename to ...
2990 (info_target_command): ... this.
2991 (initialize_targets): Adjust.
2992 * tracepoint.c (tvariables_info): Rename to ...
2993 (info_tvariables_command): ... this.
2994 (scope_info): Rename to ...
2995 (info_scope_command): ... this.
2996 (trace_dump_actions): Adjust.
2997 (_initialize_tracepoint): Adjust.
2998
b270e6f9
TT
29992017-08-22 Tom Tromey <tom@tromey.com>
3000
3001 * breakpoint.h (install_breakpoint): Update.
3002 * breakpoint.c (add_solib_catchpoint): Update.
3003 (install_breakpoint): Change argument to a std::unique_ptr.
3004 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3005 (create_breakpoint_sal, create_breakpoint): Update.
3006 (watch_command_1, catch_exec_command_1)
3007 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3008 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3009 Return the breakpoint.
3010 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3011 (new_single_step_breakpoint): Update.
3012 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3013 std::unique_ptr.
3014 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3015 std::unique_ptr.
3016 * break-catch-sig.c (create_signal_catchpoint): Use
3017 std::unique_ptr.
3018 * ada-lang.c (create_ada_exception_catchpoint): Use
3019 std::unique_ptr.
3020
36bd8eaa
TT
30212017-08-22 Tom Tromey <tom@tromey.com>
3022
3023 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3024
56f37645
TT
30252017-08-22 Tom Tromey <tom@tromey.com>
3026
3027 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3028 (lookup_partial_symbol): Update.
3029
0b581c69
TT
30302017-08-22 Tom Tromey <tom@tromey.com>
3031
3032 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3033 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3034 (find_and_open_source, symtab_to_fullname): Update.
3035 * psymtab.c (psymtab_to_fullname): Update.
3036
14278e1f
TT
30372017-08-22 Tom Tromey <tom@tromey.com>
3038
3039 * exec.c (exec_file_attach): Update.
3040 * linux-thread-db.c (try_thread_db_load): Update.
3041 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3042 * utils.c (gdb_realpath): Change return type.
3043 (gdb_realpath_keepfile): Update.
3044 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3045 (_initialize_utils): Register the new self test.
3046 * source.c (openp): Update.
3047 (find_and_open_source): Update.
3048 * nto-tdep.c (nto_find_and_open_solib): Update.
3049 * main.c (set_gdb_data_directory): Update.
3050 (captured_main_1): Update.
3051 * dwarf2read.c (dwarf2_get_dwz_file): Update
3052 (dw2_map_symbol_filenames): Update.
3053 * auto-load.c (auto_load_safe_path_vec_update): Update.
3054 (filename_is_in_auto_load_safe_path_vec): Change type of
3055 "filename_realp".
3056 (auto_load_objfile_script): Update.
3057 (file_is_auto_load_safe): Update. Use std::string.
3058 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3059
4971c9a7
TT
30602017-08-22 Tom Tromey <tom@tromey.com>
3061
3062 * utils.c (gdb_realpath_keepfile): Return a
3063 gdb::unique_xmalloc_ptr.
3064 * exec.c (exec_file_attach): Update.
3065 * utils.h (gdb_realpath_keepfile): Return a
3066 gdb::unique_xmalloc_ptr.
3067
e3e41d58
TT
30682017-08-22 Tom Tromey <tom@tromey.com>
3069
3070 * compile/compile.c (compile_file_command): Use
3071 gdb::unique_xmalloc_ptr, std::string.
3072 * utils.c (gdb_abspath): Change return type.
3073 * source.c (openp): Update.
3074 * objfiles.c (allocate_objfile): Update.
3075 * main.c (set_gdb_data_directory): Update.
3076 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3077
0d999a6e
ZZ
30782017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3079
3080 * cli-cmds.c (list_commands): List actual code around more than
3081 one location.
3082
329d5e7e
JB
30832017-08-21 John Baldwin <jhb@FreeBSD.org>
3084
3085 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3086
bf223d3e
PA
30872017-08-21 Pedro Alves <palves@redhat.com>
3088
3089 PR gdb/19487
3090 * c-exp.y (variable production): Handle function aliases.
3091 * minsyms.c (msymbol_is_text): New function.
3092 * minsyms.h (msymbol_is_text): Declare.
3093 * symtab.c (find_function_alias_target): New function.
3094 * symtab.h (find_function_alias_target): Declare.
3095
c973d0aa
PA
30962017-08-21 Pedro Alves <palves@redhat.com>
3097
3098 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3099 typedefs.
3100 * typeprint.c (whatis_exp): If handling "whatis", and expression
3101 is OP_TYPE, strip one typedef level. Otherwise don't strip
3102 typedefs here.
3103 * valops.c (value_cast): Save "to" type before resolving
3104 stubs/typedefs. Use that type as resulting value's type.
3105
2989a365
TT
31062017-08-18 Tom Tromey <tom@tromey.com>
3107 Pedro Alves <palves@redhat.com>
3108
3109 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3110 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3111 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3112 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3113 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3114 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3115 (linux_get_siginfo_data): Add "thread" argument. Use
3116 scoped_restore.
3117 * linux-nat.c (linux_child_follow_fork)
3118 (check_stopped_by_watchpoint): Use scoped_restore.
3119 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3120 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3121 (restore_inferior_ptid, save_inferior_ptid): Remove.
3122 * btrace.c (btrace_fetch): Use scoped_restore.
3123 * bsd-uthread.c (bsd_uthread_fetch_registers)
3124 (bsd_uthread_store_registers): Use scoped_restore.
3125 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3126 scoped_restore.
3127 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3128 (aix_thread_xfer_partial): Use scoped_restore.
3129 * inferior.h (save_inferior_ptid): Remove.
3130
e60eb288
YQ
31312017-08-18 Yao Qi <yao.qi@linaro.org>
3132
3133 PR tdep/21818
3134 * arm-tdep.c (gdb_print_insn_arm): Mark
3135 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3136
6d580b63
YQ
31372017-08-18 Yao Qi <yao.qi@linaro.org>
3138
3139 * NEWS: Mention GDBserver's new option "--selftest".
3140 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3141 * selftest.c: Move it to common/selftest.c.
3142 * selftest.h: Move it to common/selftest.h.
3143 * selftest-arch.c (reset): New function.
3144 (tests_with_arch): Call reset.
3145
86dcbf50
YQ
31462017-08-18 Yao Qi <yao.qi@linaro.org>
3147
3148 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3149 instead of exception_fprintf and printf_filtered.
3150
7649770c
YQ
31512017-08-18 Yao Qi <yao.qi@linaro.org>
3152
3153 * selftest.c (register_self_test): Rename it to
3154 selftests::register_test.
3155 (run_self_tests): selftest::run_tests.
3156 * selftest.h: Update declarations.
3157 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3158 selftests::register_test_foreach_arch.
3159 * selftest-arch.h: Update declaration.
3160 * aarch64-tdep.c: Update.
3161 * arm-tdep.c: Likewise.
3162 * disasm-selftests.c: Likewise.
3163 * dwarf2loc.c: Likewise.
3164 * dwarf2-frame.c: Likewise.
3165 * findvar.c: Likewise.
3166 * gdbarch-selftests.c: Likewise.
3167 * maint.c (maintenance_selftest): Likewise.
3168 * regcache.c: Likewise.
3169 * rust-exp.y: Likewise.
3170 * selftest-arch.c: Likewise.
3171 * unittests/environ-selftests.c: Likewise.
3172 * unittests/function-view-selftests.c: Likewise.
3173 * unittests/offset-type-selftests.c: Likewise.
3174 * unittests/optional-selftests.c: Likewise.
3175 * unittests/scoped_restore-selftests.c: Likewise.
3176 * utils-selftests.c: Likewise.
3177
b0cba12e
PA
31782017-08-17 Pedro Alves <palves@redhat.com>
3179
3180 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3181 local.
3182
4c8aa72d
PA
31832017-08-17 Pedro Alves <palves@redhat.com>
3184
3185 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3186 field.
3187 (reset_die_in_process): Delete, replaced by ...
3188 (process_die_scope): ... this new class. Make it responsible for
3189 freeing cu->line_header too.
3190 (process_die): Use process_die_scope.
3191 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3192 cu->line_header_die_owner. Don't release the line header if it's
3193 owned by the CU.
3194 (setup_type_unit_groups): Make the CU/DIE own the line header.
3195 Don't release the line header here.
3196
ba713918
AL
31972017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3198
3199 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3200
44d0fb3a
RK
32012017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3202
3203 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3204 Single-Key mode
3205
a5afdb16
RK
32062017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3207
3208 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3209 mode command list.
3210
47613aeb
SH
32112017-08-15 Stafford Horne <shorne@gmail.com>
3212
3213 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3214
9c3cc999
SH
32152017-08-15 Stafford Horne <shorne@gmail.com>
3216
3217 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3218
206726fb
SDJ
32192017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3220
3221 PR gdb/21954
3222 * infcmd.c (unset_environment_command): Use the 'clear' method on
3223 the environment instead of resetting it.
3224
0335ac6d
JB
32252017-08-15 John Baldwin <jhb@FreeBSD.org>
3226
3227 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3228 platforms.
3229
d3abe1c8
TT
32302017-08-14 Tom Tromey <tom@tromey.com>
3231
3232 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3233 (print_binary_chars): Likewise.
3234 (BITS_IN_BYTES): Remove.
3235
d6382fff
TT
32362017-08-14 Tom Tromey <tom@tromey.com>
3237
3238 PR gdb/21675
3239 * valprint.c (LOW_ZERO): Change value to 034.
3240 (print_octal_chars): Add static_asserts for octal constants.
3241 * printcmd.c (print_scalar_formatted): Add 'd' case.
3242
f978cb06
TT
32432017-08-11 Tom Tromey <tom@tromey.com>
3244
3245 * symfile.c (add_symbol_file_command): Use std::vector.
3246
2f5404b3
TT
32472017-08-14 Tom Tromey <tom@tromey.com>
3248
3249 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3250 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3251 std::move.
3252 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3253
de7985c3
PA
32542017-08-11 Pedro Alves <palves@redhat.com>
3255
3256 * infrun.c (process_event_stop_test): Adjust
3257 function_name_is_marked_for_skip call.
3258 * skip.c: Include <list>.
3259 (skiplist_entry): Make it a class with private fields, and
3260 getters/setters.
3261 (skiplist_entry_chain): Delete.
3262 (skiplist_entries): New.
3263 (skiplist_entry_count): Delete.
3264 (highest_skiplist_entry_num): New.
3265 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3266 (add_skiplist_entry): Delete.
3267 (skiplist_entry::skiplist_entry): New.
3268 (skiplist_entry::add_entry): New.
3269 (skip_file_command, skip_function): Adjust.
3270 (compile_skip_regexp): Delete.
3271 (skip_command): Don't compile regexp here. Adjust to use
3272 skiplist_entry::add_entry.
3273 (skip_info): Adjust to use range-for and getters.
3274 (skip_enable_command, skip_disable_command): Adjust to use
3275 range-for and setters.
3276 (skip_delete_command): Adjust to use std::list.
3277 (add_skiplist_entry): Delete.
3278 (skip_file_p): Delete, refactored as ...
3279 (skiplist_entry::do_skip_file_p): ... this new method.
3280 (skip_gfile_p): Delete, refactored as ...
3281 (skiplist_entry::do_gskip_file_p): ... this new method.
3282 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3283 (skiplist_entry::skip_function_p): ... this new method.
3284 (function_name_is_marked_for_skip): Now returns bool, and takes
3285 the function sal by const reference. Adjust to use range-for and
3286 skiplist_entry methods.
3287 (_initialize_step_skip): Remove references to
3288 skiplist_entry_chain, skiplist_entry_count.
3289 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3290 takes the function sal by const reference.
3291
be7d3cd5
YQ
32922017-08-11 Yao Qi <yao.qi@linaro.org>
3293
3294 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3295 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3296 (dwarf2_frame_cache):
3297 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3298 RETURN_MASK_ALL and set *this_case to NULL.
3299 * frame-unwind.h: Update comments.
3300
1c90d9f0
YQ
33012017-08-11 Yao Qi <yao.qi@linaro.org>
3302
3303 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3304 (dwarf2_frame_state_copy_regs): Remove.
3305 (dwarf2_frame_state_free_regs): Remove.
3306 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3307 (dwarf2_restore_rule): Call method .alloc_regs instead of
3308 dwarf2_frame_state_alloc_regs.
3309 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3310 constructor. Call std::move.
3311 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3312 (dwarf2_frame_cache): Likewise.
3313
3314 [GDB_SELF_TEST]: Include selftest.h and
3315 selftest-arch.h.
3316 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3317 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3318 execute_cfa_program_test.
3319
3320 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3321 copy ctor, assignment operator, move assignment.
3322 <alloc_regs>: New method.
3323 <swap>: New method.
3324 (struct dwarf2_frame_state): Delete dtor.
3325 (dwarf2_frame_state_alloc_regs): Remove declaration.
3326 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3327 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3328
afe37d6b
YQ
33292017-08-11 Yao Qi <yao.qi@linaro.org>
3330
3331 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3332 (dwarf2_frame_state::dwarf2_frame_state): New.
3333 (dwarf2_frame_state::~dwarf2_frame_state): New.
3334 (dwarf2_fetch_cfa_info): Update.
3335 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3336 rather than a pointer. Update code.
3337 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3338 dtor.
3339 <data_align, code_align, retaddr_column>: Change them to const.
3340 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3341 to bool.
3342
b348037f
YQ
33432017-08-11 Yao Qi <yao.qi@linaro.org>
3344
3345 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3346 <loc.exp>: New field.
3347 * dwarf2-frame.c (execute_cfa_program): Update.
3348 (dwarf2_frame_prev_register): Update.
3349
e7c9de26
PA
33502017-08-10 Pedro Alves <palves@redhat.com>
3351
3352 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3353
e8c6b620
JB
33542017-08-09 John Baldwin <jhb@FreeBSD.org>
3355
3356 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3357 (fbsd_pending_children): Use std::list.
3358 (fbsd_remember_child): Likewise.
3359 (fbsd_is_child_pending): Likewise.
3360 (fbsd_pending_vfork_done): Use std::forward_list.
3361 (fbsd_add_vfork_done): Likewise.
3362 (fbsd_is_vfork_done_pending): Likewise.
3363 (fbsd_next_vfork_done): Likewise.
3364
e4a26669
JB
33652017-08-09 John Baldwin <jhb@FreeBSD.org>
3366
3367 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3368 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3369 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3370 for `mapfilename'.
3371 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 3372 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 3373
142311d3
JB
33742017-08-09 John Baldwin <jhb@FreeBSD.org>
3375
3376 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3377 "filestuff.h".
3378 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3379
42fa2e0e
TT
33802017-08-09 Tom Tromey <tom@tromey.com>
3381
3382 * skip.c (skiplist_entry): New constructor.
3383 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3384 (skiplist_entry::file_is_glob): Now bool.
3385 (skiplist_entry::file, skiplist_entry::function): Now
3386 std::string.
3387 (make_skip_entry): Return a unique_ptr. Use new.
3388 (free_skiplist_entry, free_skiplist_entry_cleanup)
3389 (make_free_skiplist_entry_cleanup): Remove.
3390 (skip_command, skip_disable_command, add_skiplist_entry)
3391 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3392 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3393 (function_name_is_marked_for_skip): Update.
3394 (skip_delete_command): Update. Use delete.
3395
cd3af38d
JW
33962017-08-09 Jiong Wang <jiong.wang@arm.com>
3397
3398 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3399 (aarch64_linux_core_read_description): New function.
3400 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3401
29592bde
PA
34022017-08-09 Pedro Alves <palves@redhat.com>
3403
3404 * cp-name-parser.y (cp_comp_to_string): Return a
3405 gdb::unique_xmalloc_ptr<char>.
3406 * cp-support.c (replace_typedefs_qualified_name)
3407 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3408 (cp_canonicalize_string_full): Use op= instead of explicit
3409 convertion.
3410 (cp_class_name_from_physname, method_name_from_physname)
3411 (cp_func_name, cp_remove_params): Adjust to use
3412 gdb::unique_xmalloc_ptr<char>.
3413 * cp-support.h (cp_comp_to_string): Return a
3414 gdb::unique_xmalloc_ptr<char>.
3415 * python/py-type.c (typy_lookup_type): Adjust to use
3416 gdb::unique_xmalloc_ptr<char>.
3417
b3340438
L
34182017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3419
3420 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3421
e88e8651
YQ
34222017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3423 Yao Qi <yao.qi@linaro.org>
3424
3425 * cp-support.c (cp_canonicalize_string_full): Use
3426 gdb::unique_xmalloc_ptr<char>.
3427 (cp_canonicalize_string): Likewise.
3428
f5a29eb0
YQ
34292017-08-09 Yao Qi <yao.qi@linaro.org>
3430
3431 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3432 * regformats/i386/amd64-avx-avx512.dat: Remove.
3433 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3434 * regformats/i386/amd64-avx-mpx.dat:Remove.
3435 * regformats/i386/amd64-avx.dat: Remove.
3436 * regformats/i386/amd64-mpx.dat: Remove.
3437 * regformats/i386/i386-avx-avx512.dat: Remove.
3438 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3439 * regformats/i386/i386-avx-mpx.dat: Remove.
3440 * regformats/i386/i386-mmx.dat: Remove.
3441 * regformats/i386/i386-mpx.dat: Remove.
3442
57757c2f
YQ
34432017-08-09 Yao Qi <yao.qi@linaro.org>
3444
3445 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3446 * amd64-tdep.c: Don't include features/i386/x32*.c.
3447 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3448 functions.
3449 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3450 and i386/x32-avx-avx512.
3451 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3452 and i386/x32.xml.
3453 * features/i386/x32-avx-avx512.c: Removed.
3454 * features/i386/x32-avx-avx512.xml: Removed.
3455 * features/i386/x32-avx.c: Removed.
3456 * features/i386/x32-avx.xml: Removed.
3457 * features/i386/x32.c: Removed.
3458 * features/i386/x32.xml: Removed.
3459 * regformats/i386/x32-avx-avx512.dat: Removed.
3460 * regformats/i386/x32-avx.dat: Removed.
3461 * regformats/i386/x32.dat: Removed.
3462
ba7b109b
MR
34632017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3464
3465 PR breakpoints/21886
3466 * mem-break.c (default_memory_insert_breakpoint): Use
3467 `->placed_address' rather than `->reqstd_address' for the
3468 breakpoint location.
3469
e347efc3
MR
34702017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3471
3472 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3473 assertions.
3474
0dba2a6c
MR
34752017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3476
3477 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3478 a union of `tdep_info', `tdesc_data' and `id'.
3479 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3480 rather than `info.tdep_info'.
3481 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3482 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3483 * i386-tdep.c (i386_gdbarch_init): Likewise.
3484 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3485 * mips-tdep.c (mips_gdbarch_init): Likewise.
3486 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3487 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3488 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3489 `info.tdep_info'.
3490 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3491 `info.tdep_info'.
3492 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3493 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3494 `info.tdep_info'.
3495 * spu-tdep.c (spu_gdbarch_init): Likewise.
3496 * gdbarch.h: Regenerate.
3497
16eb6b2d
LS
34982017-08-07 Leszek Swirski <leszeks@google.com>
3499
7b005726 3500 PR symtab/20899
16eb6b2d
LS
3501 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3502
74cbb09e
SM
35032017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3504
3505 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3506 (gdbsim_open): Rename gdb_argv args object to argv.
3507
ee0c3293
TT
35082017-08-05 Tom Tromey <tom@tromey.com>
3509
3510 * compile/compile-object-load.c (compile_object_load): Use
3511 gdb::unique_xmalloc_ptr.
3512 * cli/cli-dump.c (scan_filename): Rename from
3513 scan_filename_with_cleanup. Change return type.
3514 (scan_expression): Rename from scan_expression_with_cleanup.
3515 Change return type.
3516 (dump_memory_to_file, dump_value_to_file, restore_command):
3517 Use gdb::unique_xmalloc_ptr. Update.
3518 * cli/cli-cmds.c (find_and_open_script): Use
3519 gdb::unique_xmalloc_ptr.
3520 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3521 * symmisc.c (maintenance_print_symbols)
3522 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3523 * symfile.c (symfile_bfd_open, generic_load)
3524 (add_symbol_file_command, remove_symbol_file_command): Use
3525 gdb::unique_xmalloc_ptr.
3526 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3527 * psymtab.c (maintenance_print_psymbols): Use
3528 gdb::unique_xmalloc_ptr.
3529 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3530 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3531 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3532 (reload_shared_libraries_1): Likewise.
3533
3232fabd
TT
35342017-08-05 Tom Tromey <tom@tromey.com>
3535
3536 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3537 (rust_op_vector, rust_set_vector): New typedefs.
3538 (current_parser): New global.
3539 (work_obstack): Change to pointer type. Update all users.
3540 (rust_ast, pstate): Remove globals.
3541 (struct rust_parser): New.
3542 (%union) <params, field_inits>: Change type.
3543 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3544 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3545 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3546 (convert_params_to_types, convert_params_to_expression): Change
3547 type of "params".
3548 (ast_string): Change type of "fields".
3549 (rust_parse): Make a rust_parser. Remove cleanups.
3550 (rust_lex_tests): Make and install an auto_obstack.
3551
f02fd774
YQ
35522017-08-04 Yao Qi <yao.qi@linaro.org>
3553
3554 * configure.srv (ipa_x32_linux_regobj): New.
3555 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3556 instead of X86_TDESC_AVX512.
3557 (initialize_low_tracepoint): Call
3558 init_registers_x32_avx_avx512_linux.
3559
91975afd
YQ
35602017-08-04 Yao Qi <yao.qi@linaro.org>
3561
3562 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3563
2331fa3a
RK
35642017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3565
3566 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3567
744e4fe1
TT
35682017-08-03 Tom Tromey <tom@tromey.com>
3569
3570 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3571 Remove.
3572 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3573
1c034b67
TT
35742017-08-03 Tom Tromey <tom@tromey.com>
3575
3576 * python/py-param.c (compute_enum_values): Use gdb_argv.
3577
773a1edc
TT
35782017-08-03 Tom Tromey <tom@tromey.com>
3579
3580 * utils.h (struct gdb_argv_deleter): New.
3581 (gdb_argv): New class.
3582 * utils.c (gdb_argv::reset): New method.
3583 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3584 * tracefile.c (tsave_command): Use gdb_argv.
3585 * top.c (new_ui_command): Use gdb_argv.
3586 * symmisc.c (maintenance_print_symbols)
3587 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3588 * symfile.c (symbol_file_command, generic_load)
3589 (remove_symbol_file_command): Use gdb_argv.
3590 * stack.c (backtrace_command): Use gdb_argv.
3591 * source.c (add_path, show_substitute_path_command)
3592 (unset_substitute_path_command, set_substitute_path_command):
3593 Use gdb_argv.
3594 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3595 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3596 * remote.c (extended_remote_run, remote_put_command)
3597 (remote_get_command, remote_delete_command): Use gdb_argv.
3598 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3599 (gdbsim_open): Use gdb_argv.
3600 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3601 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3602 * procfs.c (procfs_info_proc): Use gdb_argv.
3603 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3604 * infrun.c (handle_command): Use gdb_argv.
3605 * inferior.c (add_inferior_command, clone_inferior_command):
3606 Use gdb_argv.
3607 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3608 * exec.c (exec_file_command): Use gdb_argv.
3609 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3610 * compile/compile.c (build_argc_argv): Use gdb_argv.
3611
0d50bde3
TT
36122017-08-03 Tom Tromey <tom@tromey.com>
3613
3614 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3615
7f968c89
TT
36162017-08-03 Tom Tromey <tom@tromey.com>
3617
3618 * python/python.c (compute_python_string): Return std::string.
3619 (gdbpy_eval_from_control_command): Update.
3620 (do_start_initialization): Use std::string.
3621 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3622 xstrprintf.
3623 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3624 xstrprintf.
3625
3c9ebddd
TT
36262017-08-03 Tom Tromey <tom@tromey.com>
3627
3628 * top.h (do_restore_instream_cleanup): Remove.
3629 * top.c (do_restore_instream_cleanup): Remove.
3630 (read_command_file): Use scoped_restore.
3631 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3632
b51b225e
TT
36332017-08-03 Tom Tromey <tom@tromey.com>
3634
3635 * cli/cli-script.c (execute_user_command)
3636 (execute_control_command): Use scoped_restore.
3637
ac991630
TT
36382017-08-03 Tom Tromey <tom@tromey.com>
3639
3640 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3641 (execute_user_command): Remove user_call_depth; use
3642 user_args_stack's size instead.
3643
898e0c8e
TT
36442017-08-03 Tom Tromey <tom@tromey.com>
3645
3646 * top.h (in_user_command): Remove.
3647 * top.c (in_user_command): Remove.
3648 * cli/cli-script.c (do_restore_user_call_depth)
3649 (execute_user_command): Update.
3650
26fcd5d7
TT
36512017-08-03 Tom Tromey <tom@tromey.com>
3652
3653 * valops.c (search_struct_method): Use gdb::byte_vector.
3654 * valarith.c (value_concat): Use std::vector.
3655 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3656 (simple_search_memory): Likewise.
3657 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3658 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3659 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3660 * elfread.c (elf_rel_plt_read): Use std::string.
3661 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3662 * cli/cli-dump.c (restore_section_callback): Use
3663 gdb::byte_vector.
3664
7c218e6c
TT
36652017-08-03 Tom Tromey <tom@tromey.com>
3666
3667 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3668
31b68d4a
TT
36692017-08-03 Tom Tromey <tom@tromey.com>
3670
3671 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3672 (tui_register_format): Use scoped_restore.
3673
2ec845e7
TT
36742017-08-03 Tom Tromey <tom@tromey.com>
3675
3676 * reverse.c (exec_direction_default): Remove.
3677 (exec_reverse_once): Use scoped_restore.
3678 * remote.c (restore_remote_timeout): Remove.
3679 (remote_flash_erase, remote_flash_write, remote_flash_done)
3680 (readchar, remote_serial_write): Use scoped_restore.
3681 * cli/cli-script.c (struct source_cleanup_lines_args)
3682 (source_cleanup_lines): Remove.
3683 (script_from_file): Use scoped_restore.
3684 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3685 (source_command): Use scoped_restore.
3686
b3bc8453
TT
36872017-08-03 Tom Tromey <tom@tromey.com>
3688
3689 * utils.h (make_cleanup_free_so): Remove.
3690 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3691 * solist.h (struct so_deleter): New.
3692 (so_list_up): New typedef.
3693 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3694
e3ad2841
TT
36952017-08-03 Tom Tromey <tom@tromey.com>
3696
3697 * utils.h (make_cleanup_restore_current_language): Remove.
3698 * utils.c (do_restore_current_language)
3699 (make_cleanup_restore_current_language): Remove.
3700 * parse.c (parse_exp_in_context_1)
3701 (parse_expression_with_language): Use
3702 scoped_restore_current_language.
3703 * mi/mi-main.c (mi_cmd_execute): Use
3704 scoped_restore_current_language.
3705 * language.h (scoped_restore_current_language): New class.
3706
b80cf838
TT
37072017-08-03 Tom Tromey <tom@tromey.com>
3708
3709 * compile/compile.c (cleanup_unlink_file): Remove.
3710 (compile_to_object): Use gdb::unlinker.
3711 (eval_compile_command): Likewise.
3712
fad0444a
TT
37132017-08-03 Tom Tromey <tom@tromey.com>
3714
3715 * utils.h (make_cleanup_fclose): Remove.
3716 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3717
6e7bc05c
TT
37182017-08-03 Tom Tromey <tom@tromey.com>
3719
3720 * top.c (open_terminal_stream): Return gdb_file_up.
3721 (new_ui_command): Update.
3722
4a45905b
TT
37232017-08-03 Tom Tromey <tom@tromey.com>
3724
3725 * source.c (print_source_lines_base, forward_search_command)
3726 (reverse_search_command): Use gdb_file_up.
3727
7cd06d6e
TT
37282017-08-03 Tom Tromey <tom@tromey.com>
3729
3730 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3731
ed166945
TT
37322017-08-03 Tom Tromey <tom@tromey.com>
3733
3734 * cli/cli-cmds.c (find_and_open_script): Change return type.
3735 Remove "streamp" and "full_path" parameters.
3736 (source_script_with_search): Update.
3737 * auto-load.c (source_script_file): Update.
3738 * cli/cli-cmds.h (find_and_open_script): Change type.
3739 (open_script): New struct.
3740
d419f42d
TT
37412017-08-03 Tom Tromey <tom@tromey.com>
3742
3743 * xml-support.c (xml_fetch_content_from_file): Update.
3744 * ui-file.c (stdio_file::open): Update.
3745 * tracefile-tfile.c (tfile_start): Update.
3746 * remote.c (remote_file_put, remote_file_get): Update.
3747 * nat/linux-procfs.c (linux_proc_get_int)
3748 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3749 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3750 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3751 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3752 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3753 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3754 * linux-nat.c (linux_proc_pending_signals): Update.
3755 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3756 (file_closer): Remove.
3757 * compile/compile.c (compile_to_object): Update.
3758 * common/filestuff.h (struct gdb_file_deleter): New.
3759 (gdb_file_up): New typedef.
3760 (gdb_fopen_cloexec): Change return type.
3761 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3762 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3763 (dump_binary_file, restore_binary_file): Update.
3764 * auto-load.c (auto_load_objfile_script_1): Update.
3765
4a2b031d
TT
37662017-08-03 Tom Tromey <tom@tromey.com>
3767
3768 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3769 (info_static_tracepoint_markers_command): Likewise.
3770 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3771 * skip.c (skip_info): Use ui_out_emit_table.
3772 * progspace.c (print_program_space): Use ui_out_emit_table.
3773 * osdata.c (info_osdata): Use ui_out_emit_table.
3774 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3775 ui_out_emit_table.
3776 * linux-thread-db.c (info_auto_load_libthread_db): Use
3777 ui_out_emit_table.
3778 * inferior.c (print_inferior): Use ui_out_emit_table.
3779 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3780 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3781 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3782 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3783 * ui-out.h (class ui_out_emit_table): New.
3784
a4f320fd
MR
37852017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3786
3787 * mips-tdep.c (mips_fpu_type_str): New function.
3788 (mips_dump_tdep): Call it.
3789
a2f1f308
MR
37902017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3791
3792 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3793 `->mips_fpu_type'.
3794
7e5ed83b
XR
37952017-07-31 Xavier Roirand <roirand@adacore.com>
3796
3797 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3798
4c9dc811
XR
37992017-07-27 Xavier Roirand <roirand@adacore.com>
3800
3801 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3802
27d41eac
YQ
38032017-07-26 Yao Qi <yao.qi@linaro.org>
3804
3805 * cli/cli-cmds.c (maintenancechecklist): New variable.
3806 * gdbcmd.h (maintenancechecklist): Declare it.
3807 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3808 Call i386_linux_read_description with different masks.
3809 * maint.c (maintenance_check_command): New function.
3810 (_initialize_maint_cmds): Call add_prefix_cmd.
3811 * target-descriptions.c (tdesc_reg): override operator != and ==.
3812 (tdesc_type): Likewise.
3813 (tdesc_feature): Likewise.
3814 (target_desc): Likewise.
3815 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3816 (maintenance_check_xml_descriptions): New function.
3817 (_initialize_target_descriptions) Add command "xml-descriptions".
3818 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3819
ea03d0d3
YQ
38202017-07-26 Yao Qi <yao.qi@linaro.org>
3821
3822 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3823 Include features/i386/32bit-*.c.
3824 (i386_linux_read_description): Generate target description if it
3825 doesn't exist.
3826 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3827 functions.
3828 * features/i386/32bit-linux.c: Re-generated.
3829 * features/i386/32bit-sse.c: Likewise.
3830 * target-descriptions.c (print_c_feature::visit): Print code to
3831 set register number if needed.
3832 (print_c_feature) <m_next_regnum>: New field.
3833
25aa13e5
YQ
38342017-07-26 Yao Qi <yao.qi@linaro.org>
3835
3836 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3837 (FEATURE_XMLFILES): New.
3838 (FEATURE_CFILES): New.
3839 New rules.
3840 (clean-cfiles): Remove generated c files.
3841 * features/i386/32bit-avx.c: Generated.
3842 * features/i386/32bit-avx512.c: Generated.
3843 * features/i386/32bit-core.c: Generated.
3844 * features/i386/32bit-linux.c: Generated.
3845 * features/i386/32bit-mpx.c: Generated.
3846 * features/i386/32bit-pkeys.c: Generated.
3847 * features/i386/32bit-sse.c: Generated.
3848 * target-descriptions.c: Include algorithm.
3849 (tdesc_element_visitor): Add method visit_end.
3850 (print_c_tdesc): Implement visit_end.
3851 (print_c_tdesc:: m_filename_after_features): Move it to
3852 protected.
3853 (print_c_feature): New class.
3854 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3855 name starts with "i386/32bit-".
3856
6eb1e6a8
YQ
38572017-07-26 Yao Qi <yao.qi@linaro.org>
3858
3859 * target-descriptions.c (tdesc_element_visitor): New class.
3860 (tdesc_element): New class.
3861 (tdesc_reg): Inherit from tdesc_element.
3862 (tdesc_reg::accept): New function.
3863 (tdesc_type): Inherit from tdesc_element.
3864 (tdesc_type::accept): New function.
3865 (tdesc_feature): Inherit from tdesc_element.
3866 (tdesc_feature::accept): New function.
3867 (target_desc): Inherit from tdesc_element.
3868 (target_desc::target_desc): New.
3869 (target_desc::~target_desc): New.
3870 (target_desc::accept): New.
3871 (allocate_target_description): Use new.
3872 (free_target_description): Use delete.
3873 (print_c_tdesc): New class.
3874 (maint_print_c_tdesc_cmd): Adjust.
3875
3876 * features/aarch64.c: Re-generated.
3877 * features/arc-arcompact.c: Re-generated.
3878 * features/arc-v2.c: Re-generated.
3879 * features/arm/arm-with-iwmmxt.c: Re-generated.
3880 * features/arm/arm-with-m.c: Re-generated.
3881 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3882 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3883 * features/arm/arm-with-neon.c: Re-generated.
3884 * features/arm/arm-with-vfpv2.c: Re-generated.
3885 * features/arm/arm-with-vfpv3.c: Re-generated.
3886 * features/i386/amd64-avx-avx512.c: Re-generated.
3887 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3888 * features/i386/amd64-avx.c: Re-generated.
3889 * features/i386/amd64-avx-linux.c: Re-generated.
3890 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3891 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3892 * features/i386/amd64-avx-mpx.c: Re-generated.
3893 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3894 * features/i386/amd64.c: Re-generated.
3895 * features/i386/amd64-linux.c: Re-generated.
3896 * features/i386/amd64-mpx.c: Re-generated.
3897 * features/i386/amd64-mpx-linux.c: Re-generated.
3898 * features/i386/i386-avx-avx512.c: Re-generated.
3899 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3900 * features/i386/i386-avx.c: Re-generated.
3901 * features/i386/i386-avx-linux.c: Re-generated.
3902 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3903 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3904 * features/i386/i386-avx-mpx.c: Re-generated.
3905 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3906 * features/i386/i386.c: Re-generated.
3907 * features/i386/i386-linux.c: Re-generated.
3908 * features/i386/i386-mmx.c: Re-generated.
3909 * features/i386/i386-mmx-linux.c: Re-generated.
3910 * features/i386/i386-mpx.c: Re-generated.
3911 * features/i386/i386-mpx-linux.c: Re-generated.
3912 * features/i386/x32-avx-avx512.c: Re-generated.
3913 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3914 * features/i386/x32-avx.c: Re-generated.
3915 * features/i386/x32-avx-linux.c: Re-generated.
3916 * features/i386/x32.c: Re-generated.
3917 * features/i386/x32-linux.c: Re-generated.
3918 * features/microblaze.c: Re-generated.
3919 * features/microblaze-with-stack-protect.c: Re-generated.
3920 * features/mips64-dsp-linux.c: Re-generated.
3921 * features/mips64-linux.c: Re-generated.
3922 * features/mips-dsp-linux.c: Re-generated.
3923 * features/mips-linux.c: Re-generated.
3924 * features/nds32.c: Re-generated.
3925 * features/nios2.c: Re-generated.
3926 * features/nios2-linux.c: Re-generated.
3927 * features/rs6000/powerpc-32.c: Re-generated.
3928 * features/rs6000/powerpc-32l.c: Re-generated.
3929 * features/rs6000/powerpc-403.c: Re-generated.
3930 * features/rs6000/powerpc-403gc.c : Re-generated.
3931 * features/rs6000/powerpc-405.c: Re-generated.
3932 * features/rs6000/powerpc-505.c: Re-generated.
3933 * features/rs6000/powerpc-601.c: Re-generated.
3934 * features/rs6000/powerpc-602.c: Re-generated.
3935 * features/rs6000/powerpc-603.c: Re-generated.
3936 * features/rs6000/powerpc-604.c: Re-generated.
3937 * features/rs6000/powerpc-64.c: Re-generated.
3938 * features/rs6000/powerpc-64l.c: Re-generated.
3939 * features/rs6000/powerpc-7400.c: Re-generated.
3940 * features/rs6000/powerpc-750.c: Re-generated.
3941 * features/rs6000/powerpc-860.c: Re-generated.
3942 * features/rs6000/powerpc-altivec32.c: Re-generated.
3943 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3944 * features/rs6000/powerpc-altivec64.c: Re-generated.
3945 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3946 * features/rs6000/powerpc-cell32l.c: Re-generated.
3947 * features/rs6000/powerpc-cell64l.c: Re-generated.
3948 * features/rs6000/powerpc-e500.c: Re-generated.
3949 * features/rs6000/powerpc-e500l.c: Re-generated.
3950 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3951 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3952 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3953 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3954 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3955 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3956 * features/rs6000/powerpc-vsx32.c: Re-generated.
3957 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3958 * features/rs6000/powerpc-vsx64.c: Re-generated.
3959 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3960 * features/rs6000/rs6000.c: Re-generated.
3961 * features/s390-linux32.c: Re-generated.
3962 * features/s390-linux32v1.c: Re-generated.
3963 * features/s390-linux32v2.c: Re-generated.
3964 * features/s390-linux64.c: Re-generated.
3965 * features/s390-linux64v1.c: Re-generated.
3966 * features/s390-linux64v2.c: Re-generated.
3967 * features/s390-te-linux64.c: Re-generated.
3968 * features/s390-tevx-linux64.c: Re-generated.
3969 * features/s390-vx-linux64.c: Re-generated.
3970 * features/s390x-linux64.c: Re-generated.
3971 * features/s390x-linux64v1.c: Re-generated.
3972 * features/s390x-linux64v2.c: Re-generated.
3973 * features/s390x-te-linux64.c: Re-generated.
3974 * features/s390x-tevx-linux64.c: Re-generated.
3975 * features/s390x-vx-linux64.c: Re-generated.
3976 * features/sparc/sparc32-solaris.c: Re-generated.
3977 * features/sparc/sparc64-solaris.c: Re-generated.
3978 * features/tic6x-c62x.c: Re-generated.
3979 * features/tic6x-c62x-linux.c: Re-generated.
3980 * features/tic6x-c64x.c: Re-generated.
3981 * features/tic6x-c64x-linux.c: Re-generated.
3982 * features/tic6x-c64xp.c: Re-generated.
3983 * features/tic6x-c64xp-linux.c: Re-generated.
3984
35b4818d
YQ
39852017-07-26 Yao Qi <yao.qi@linaro.org>
3986
3987 * i386-linux-tdep.c (i386_linux_read_description): New function.
3988 (i386_linux_core_read_description): Call
3989 i386_linux_read_description.
3990 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3991 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3992 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3993 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3994 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3995 * x86-linux-nat.c (x86_linux_read_description): Call
3996 i386_linux_read_description.
3997
8e2141c6
YQ
39982017-07-26 Yao Qi <yao.qi@linaro.org>
3999
4000 * NEWS: Mention it.
4001 * features/Makefile (%.c: %.xml): Pass the xml file name to
4002 command "maint print c-tdesc".
4003 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4004 name from 'arg'.
4005
b468ff4c
YQ
40062017-07-26 Yao Qi <yao.qi@linaro.org>
4007
4008 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4009 in-class initialization.
4010 (tdesc_create_feature): Call new instead of XCNEW.
4011 (free_target_description): Ue delete.
4012
b9c0e1b4
JB
40132017-07-25 John Baldwin <jhb@FreeBSD.org>
4014
4015 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4016
a04b5337
YQ
40172017-07-25 Yao Qi <yao.qi@linaro.org>
4018
4019 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4020 constant.
4021 (amd64_x32_init_abi): Likewise.
4022 * amd64-tdep.h (amd64_init_abi): Update declaration.
4023 (amd64_x32_init_abi): Likewise.
4024
02ad7fc2
YQ
40252017-07-25 Yao Qi <yao.qi@linaro.org>
4026
4027 PR tdep/21717
4028 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4029 condition for FPSCR.
4030 (arm_linux_store_inferior_registers): Likewise.
4031
b6f48cb0
TT
40322017-07-22 Tom Tromey <tom@tromey.com>
4033
4034 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4035 <syscalls_counts>: Now a std::vector.
4036 (get_catch_syscall_inferior_data): Use "new".
4037 (catch_syscall_inferior_data_cleanup): Use "delete".
4038 (insert_catch_syscall, remove_catch_syscall)
4039 (clear_syscall_counts): Update.
4040
e12c9b7a
TT
40412017-07-22 Tom Tromey <tom@tromey.com>
4042
4043 * break-catch-syscall.c (syscall_catchpoint)
4044 <syscalls_to_be_caught>: Now a std::vector<int>
4045 (~syscall_catchpoint): Remove.
4046 (insert_catch_syscall, remove_catch_syscall)
4047 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4048 (print_mention_catch_syscall, print_recreate_catch_syscall):
4049 Update.
4050 (create_syscall_event_catchpoint): Change type of "filter"
4051 parameter.
4052 (catch_syscall_split_args): Return a std::vector.
4053 (catch_syscall_command_1, catching_syscall_number_1): Update.
4054
4fa8aeac
TT
40552017-07-22 Tom Tromey <tom@tromey.com>
4056
4057 * break-catch-throw.c (struct exception_catchpoint)
4058 <exception_rx>: Now a std::string.
4059 (~exception_catchpoint): Remove.
4060 (print_one_detail_exception_catchpoint): Update.
4061 (handle_gnu_v3_exceptions): Change type of except_rx.
4062 (extract_exception_regexp): Return a std::string.
4063 (catch_exception_command_1): Update.
4064
f746a154
TT
40652017-07-22 Tom Tromey <tom@tromey.com>
4066
4067 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4068 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4069 std::vector.
4070 <catch_all>: Now a bool.
4071 (~signal_catchpoint): Remove.
4072 (signal_catchpoint_insert_location)
4073 (signal_catchpoint_remove_location)
4074 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4075 (signal_catchpoint_print_mention)
4076 (signal_catchpoint_print_recreate)
4077 (signal_catchpoint_explains_signal): Update.
4078 (create_signal_catchpoint): Change type of "filter" and
4079 "catch_all".
4080 (catch_signal_split_args): Return a std::vector. Change type of
4081 "catch_all".
4082 (catch_signal_command): Update.
4083
47e77640
PA
40842017-07-20 Pedro Alves <palves@redhat.com>
4085
4086 * ada-lang.c (ada_language_defn): Make extern.
4087 (_initialize_ada_language): Remove add_language call.
4088 * c-lang.c (c_language_defn, cplus_language_defn)
4089 (asm_language_defn, minimal_language_defn): Make extern.
4090 (_initialize_c_language): Delete.
4091 * completer.c (compare_cstrings): Delete, moved to utils.h.
4092 * d-lang.c (d_language_defn): Make extern.
4093 (_initialize_d_language): Remove add_language calls.
4094 * defs.h (enum language): Add comment.
4095 * f-lang.c (f_language_defn): Make extern.
4096 (_initialize_f_language): Remove add_language call.
4097 * go-lang.c (go_language_defn): Make extern.
4098 (_initialize_go_language): Remove add_language call.
4099 * language.c: Include <algorithm>.
4100 (languages): Redefine as const array.
4101 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4102 (set_language_command): Handle "local". Use for-range loop.
4103 (set_language): Remove loop.
4104 (language_enum): Rewrite.
4105 (language_def, language_str): Remove loops.
4106 (add_language): Delete.
4107 (add_set_language_command): New, based on add_languages.
4108 (skip_language_trampoline): Adjust.
4109 (local_language_defn): Delete.
4110 (language_gdbarch_post_init): Adjust.
4111 (_initialize_language): Remove add_language calls. Call
4112 add_set_language_command.
4113 * language.h (add_language): Delete.
4114 (auto_language_defn)
4115 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4116 (asm_language_defn, c_language_defn, cplus_language_defn)
4117 (d_language_defn, f_language_defn, go_language_defn)
4118 (m2_language_defn, objc_language_defn, opencl_language_defn)
4119 (pascal_language_defn, rust_language_defn): Declare.
4120 * m2-lang.c (m2_language_defn): Make extern.
4121 (_initialize_m2_language): Remove add_language call.
4122 * objc-lang.c (objc_language_defn): Make extern.
4123 (_initialize_objc_language): Remove add_language call.
4124 * opencl-lang.c (opencl_language_defn): Make extern.
4125 (_initialize_opencl_language): Remove add_language call.
4126 * p-lang.c (pascal_language_defn): Make extern.
4127 (_initialize_pascal_language): Delete.
4128 * rust-lang.c (rust_language_defn): Make extern.
4129 (_initialize_rust_language): Delete.
4130 * utils.h (compare_cstrings): New static inline function.
4131
edb0c9cb
PA
41322017-07-20 Pedro Alves <palves@redhat.com>
4133
4134 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4135 (get_var_value): Constify parameters.
4136 (get_int_var_value): Change prototype.
4137 (to_fixed_range_type): Adjust.
4138 * ada-lang.h (get_int_var_value): Change prototype.
4139
a778f165
PA
41402017-07-20 Pedro Alves <palves@redhat.com>
4141
4142 * dwarf2read.c (dw2_lookup_symbol): Use
4143 SYMBOL_MATCHES_SEARCH_NAME.
4144 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4145
42edd901
PA
41462017-07-20 Pedro Alves <palves@redhat.com>
4147
4148 * block.c (block_iter_name_step, block_iter_name_first)
4149 (block_iter_name_next): Delete.
4150 (block_lookup_symbol_primary): Adjust to use
4151 dict_iter_match_first/dict_iter_match_next.
4152 * block.h (block_iter_name_first, block_iter_name_next): Delete
4153 declarations.
4154 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4155 dict_iter_match_first/dict_iter_match_next.
4156
cf325299
PA
41572017-07-20 Pedro Alves <palves@redhat.com>
4158
4159 * cp-support.c (cp_find_first_component_aux): Add missing case for
4160 end of string.
4161
c5ed0576
DB
41622017-07-18 David Blaikie <dblaikie@gmail.com>
4163
4164 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4165 of dwo_cu's dwo_file.
4166
27841e76
YQ
41672017-07-18 Yao Qi <yao.qi@linaro.org>
4168
4169 * remote.c (store_registers_using_G): Remove one line comment.
4170
cfb7e58b
YQ
41712017-07-18 Yao Qi <yao.qi@linaro.org>
4172
4173 * regcache.c (regcache_cpy): Simplify it.
4174 (regcache::cpy_no_passthrough): Remove it.
4175 * regcache.h (cpy_no_passthrough): Remove it.
4176 (regcache_dup, regcache_cpy): Update comments.
4177
386535dd
PA
41782017-07-18 Pedro Alves <palves@redhat.com>
4179
4180 * remote-sim.c (sim_command_completer): Adjust to work with a
4181 completion_tracker instead of a VEC.
4182
c45ec17c
PA
41832017-07-17 Pedro Alves <palves@redhat.com>
4184
4185 * completer.c (complete_source_filenames): New function.
4186 (complete_address_and_linespec_locations): New function.
4187 (location_completer): Use complete_address_and_linespec_locations.
4188 (completion_tracker::build_completion_result): Honor the tracker's
4189 request to suppress append.
4190 * completer.h (completion_tracker::suppress_append_ws)
4191 (completion_tracker::set_suppress_append_ws): New methods.
4192 (completion_tracker::m_suppress_append_ws): New field.
4193 (complete_source_filenames): New declaration.
4194 * linespec.c (linespec_complete_what): New.
4195 (struct ls_parser) <complete_what, completion_word,
4196 completion_quote_char, completion_quote_end, completion_tracker>:
4197 New fields.
4198 (string_find_incomplete_keyword_at_end): New.
4199 (linespec_lexer_lex_string): Record quote char. If in completion
4200 mode, don't throw.
4201 (linespec_lexer_consume_token): Advance the completion word point.
4202 (linespec_lexer_peek_token): Save/restore completion info.
4203 (save_stream_and_consume_token): New.
4204 (set_completion_after_number): New.
4205 (linespec_parse_basic): Set what to complete next depending on
4206 token. Handle function and label completions specially.
4207 (parse_linespec): Disable objc shortcut in completion mode. Set
4208 what to complete next depending on token type. Skip keyword if in
4209 completion mode.
4210 (complete_linespec_component, linespec_complete): New.
4211 * linespec.h (linespec_complete): Declare.
4212
be966d42
PA
42132017-07-17 Pedro Alves <palves@redhat.com>
4214
4215 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4216 Handle 'operator<' / 'operator<<'.
4217
a2459270
PA
42182017-07-17 Pedro Alves <palves@redhat.com>
4219
4220 * completer.c (collect_explicit_location_matches): Handle
4221 MATCH_LABEL.
4222 (convert_explicit_location_to_linespec): New, factored out from
4223 ...
4224 (convert_explicit_location_to_sals): ... this.
4225 (complete_label): New.
4226 (linespec_complete_label, find_label_symbols_in_block): New.
4227 (find_label_symbols): Add completion_mode parameter and adjust to
4228 call find_label_symbols_in_block.
4229 * linespec.h (linespec_complete_label): Declare.
4230
c6756f62
PA
42312017-07-17 Pedro Alves <palves@redhat.com>
4232
4233 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4234 complete_symbol_mode parameter.
4235 * cli/cli-cmds.c (complete_command): Get the completion result out
4236 of the handle_brkchars tracker if used a custom word point.
4237 * completer.c: Include "linespec.h".
4238 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4239 (advance_to_expression_complete_word_point): New.
4240 (completion_tracker::completes_to_completion_word): New.
4241 (complete_files_symbols): Pass down
4242 complete_symbol_mode::EXPRESSION.
4243 (explicit_options, probe_options): New.
4244 (collect_explicit_location_matches): Complete on the
4245 explictit_loc->foo instead of word. Use
4246 linespec_complete_function. Handle MATCH_LINE. Handle offering
4247 keyword and options completions.
4248 (backup_text_ptr): Delete.
4249 (skip_keyword): New.
4250 (complete_explicit_location): Remove 'word' parameter. Add
4251 language, quoted_arg_start and quoted_arg_end parameters.
4252 Rewrite, parsing left to right.
4253 (location_completer): Rewrite.
4254 (location_completer_handle_brkchars): New function.
4255 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4256 (enum complete_line_internal_reason): Adjust comments.
4257 (completion_tracker::discard_completions): New.
4258 (completer_handle_brkchars_func_for_completer): Handle
4259 location_completer.
4260 (gdb_custom_word_point_brkchars)
4261 (gdb_org_rl_basic_quote_characters): New.
4262 (gdb_completion_word_break_characters_throw)
4263 (completion_find_completion_word): Handle trackers that use a
4264 custom word point.
4265 (completion_tracker::advance_custom_word_point_by): New.
4266 (completion_tracker::build_completion_result): Don't rely on
4267 readline appending the quote char.
4268 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4269 use a custom word point.
4270 (gdb_rl_attempted_completion_function): Restore
4271 rl_basic_quote_characters.
4272 * completer.h (class completion_tracker): Extend intro comment.
4273 (completion_tracker::set_quote_char)
4274 (completion_tracker::quote_char)
4275 (completion_tracker::set_use_custom_word_point)
4276 (completion_tracker::use_custom_word_point)
4277 (completion_tracker::custom_word_point)
4278 (completion_tracker::set_custom_word_point)
4279 (completion_tracker::advance_custom_word_point_by)
4280 (completion_tracker::completes_to_completion_word)
4281 (completion_tracker::discard_completions): New methods.
4282 (completion_tracker::m_quote_char)
4283 (completion_tracker::m_use_custom_word_point)
4284 (completion_tracker::m_custom_word_point): New fields.
4285 (advance_to_expression_complete_word_point): Declare.
4286 * f-lang.c (f_collect_symbol_completion_matches): Add
4287 complete_symbol_mode parameter.
4288 * language.h (struct language_defn)
4289 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4290 parameter.
4291 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4292 (linespec_complete_function): New function.
4293 (linespec_lexer_lex_keyword): Adjust.
4294 * linespec.h (linespec_keywords, linespec_complete_function): New
4295 declarations.
4296 * location.c (find_end_quote): New function.
4297 (explicit_location_lex_one): Add explicit_completion_info
4298 parameter. Save quoting info. Don't throw if being called for
4299 completion. Don't handle Ada operators here.
4300 (is_cp_operator, skip_op_false_positives, first_of)
4301 (explicit_location_lex_one_function): New function.
4302 (string_to_explicit_location): Replace 'dont_throw' parameter with
4303 an explicit_completion_info pointer parameter. Handle it. Don't
4304 use explicit_location_lex_one to lex function names. Use
4305 explicit_location_lex_one_function instead.
4306 * location.h (struct explicit_completion_info): New.
4307 (string_to_explicit_location): Replace 'dont_throw' parameter with
4308 an explicit_completion_info pointer parameter.
4309 * symtab.c (default_collect_symbol_completion_matches_break_on):
4310 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4311 (default_collect_symbol_completion_matches)
4312 (collect_symbol_completion_matches): Add complete_symbol_mode
4313 parameter.
4314 (collect_symbol_completion_matches_type): Pass down
4315 complete_symbol_mode::EXPRESSION.
4316 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4317 parameter. Handle LINESPEC mode.
4318 * symtab.h (complete_symbol_mode): New.
4319 (default_collect_symbol_completion_matches_break_on)
4320 (default_collect_symbol_completion_matches)
4321 (collect_symbol_completion_matches)
4322 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4323 parameter.
4324
1d550c82
PA
43252017-07-17 Pedro Alves <palves@redhat.com>
4326
4327 * utils.c (enum class strncmp_iw_mode): New.
4328 (strcmp_iw): Rename to ...
4329 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4330 parameters. Handle them.
4331 (strncmp_iw): New.
4332 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4333 * utils.h (strncmp_iw): Declare.
4334 (strcmp_iw): Move describing comments here.
4335
8090b426
PA
43362017-07-17 Pedro Alves <palves@redhat.com>
4337
4338 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4339 CP_OPERATOR_STR.
4340 * c-typeprint.c (is_type_conversion_operator): Use
4341 CP_OPERATOR_STR.
4342 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4343 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4344 CP_OPERATOR_LEN.
4345 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4346 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4347 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4348 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4349 CP_OPERATOR_STR.
4350 * location.c: Include "cp-support.h".
4351 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4352 CP_OPERATOR_STR.
4353 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4354 CP_OPERATOR_LEN.
4355
6a2c1b87
PA
43562017-07-17 Pedro Alves <palves@redhat.com>
4357
4358 * cli/cli-cmds.c (complete_command): Use a completion tracker
4359 along with completion_find_completion_word for handle_brkchars
4360 phase.
4361 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4362 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4363 (struct gdb_rl_completion_word_info): New.
4364 (gdb_rl_find_completion_word): New.
4365 (completion_find_completion_word): New.
4366 * completer.h (completion_find_completion_word): Declare.
4367
eb3ff9a5
PA
43682017-07-17 Pedro Alves <palves@redhat.com>
4369
4370 * ada-lang.c (symbol_completion_match): Adjust comments.
4371 (symbol_completion_add): Replace vector parameter with
4372 completion_tracker parameter. Use it.
4373 (ada_make_symbol_completion_list): Rename to...
4374 (ada_collect_symbol_completion_matches): ... this. Add
4375 completion_tracker parameter and use it.
4376 (ada_language_defn): Adjust.
4377 * break-catch-syscall.c (catch_syscall_completer): Adjust
4378 prototype and work with completion_tracker instead of VEC.
4379 * breakpoint.c (condition_completer): Adjust prototype and work
4380 with completion_tracker instead of VEC.
4381 * c-lang.c (c_language_defn, cplus_language_defn)
4382 (asm_language_defn, minimal_language_defn): Adjust to renames.
4383 * cli/cli-cmds.c (complete_command): Rework using
4384 completion_tracker. Catch exceptions when completing.
4385 * cli/cli-decode.c (integer_unlimited_completer)
4386 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4387 with completion_tracker instead of VEC.
4388 * command.h (struct completion_tracker): Forward declare.
4389 (completer_ftype, completer_handle_brkchars_ftype): Change
4390 types.
4391 (complete_on_cmdlist, complete_on_enum): Adjust.
4392 * completer.c: Include <algorithm>.
4393 (struct gdb_completer_state): New.
4394 (current_completion): New global.
4395 (readline_line_completion_function): Delete.
4396 (noop_completer, filename_completer)
4397 (filename_completer_handle_brkchars, complete_files_symbols)
4398 (linespec_location_completer): Adjust to work with a
4399 completion_tracker instead of a VEC.
4400 (string_or_empty): New.
4401 (collect_explicit_location_matches): Adjust to work with a
4402 completion_tracker instead of a VEC.
4403 (explicit_location_completer): Rename to ...
4404 (complete_explicit_location): ... this and adjust to work with a
4405 completion_tracker instead of a VEC.
4406 (location_completer): Adjust to work with a completion_tracker
4407 instead of a VEC.
4408 (add_struct_fields): Adjust to work with a completion_list instead
4409 of VEC.
4410 (expression_completer): Rename to ...
4411 (complete_expression): ... this and adjust to work with a
4412 completion_tracker instead of a VEC. Use complete_files_symbols.
4413 (expression_completer): Reimplement on top of complete_expression.
4414 (symbol_completer): Adjust to work with a completion_tracker
4415 instead of a VEC.
4416 (enum complete_line_internal_reason): Add describing comments.
4417 (complete_line_internal_normal_command): Adjust to work with a
4418 completion_tracker instead of a VEC.
4419 (complete_line_internal): Rename to ...
4420 (complete_line_internal_1): ... this and adjust to work with a
4421 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4422 handle_brkchars phase.
4423 (new_completion_tracker): Delete.
4424 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4425 complete_line_internal_1.
4426 (free_completion_tracker): Delete.
4427 (INITIAL_COMPLETION_HTAB_SIZE): New.
4428 (completion_tracker::completion_tracker)
4429 (completion_tracker::~completion_tracker): New.
4430 (maybe_add_completion): Delete.
4431 (completion_tracker::maybe_add_completion)
4432 (completion_tracker::add_completion)
4433 (completion_tracker::add_completions): New.
4434 (throw_max_completions_reached_error): Delete.
4435 (complete_line): Adjust to work with a completion_tracker instead
4436 of a VEC. Don't create a completion_tracker_t or check for max
4437 completions here.
4438 (command_completer, command_completer_handle_brkchars)
4439 (signal_completer, reg_or_group_completer_1)
4440 (reg_or_group_completer, default_completer_handle_brkchars):
4441 Adjust to work with a completion_tracker.
4442 (gdb_completion_word_break_characters_throw): New.
4443 (gdb_completion_word_break_characters): Reimplement.
4444 (line_completion_function): Delete.
4445 (completion_tracker::recompute_lowest_common_denominator)
4446 (expand_preserving_ws)
4447 (completion_tracker::build_completion_result)
4448 (completion_result::completion_result)
4449 (completion_result::completion_result)
4450 (completion_result::~completion_result)
4451 (completion_result::completion_result)
4452 (completion_result::release_match_list, compare_cstrings)
4453 (completion_result::sort_match_list)
4454 (completion_result::reset_match_list)
4455 (gdb_rl_attempted_completion_function_throw)
4456 (gdb_rl_attempted_completion_function): New.
4457 * completer.h (completion_list, struct completion_result)
4458 (class completion_tracker): New.
4459 (complete_line): Add completion_tracker parameter.
4460 (readline_line_completion_function): Delete.
4461 (gdb_rl_attempted_completion_function): New.
4462 (noop_completer, filename_completer, expression_completer)
4463 (location_completer, symbol_completer, command_completer)
4464 (signal_completer, reg_or_group_completer): Update prototypes.
4465 (completion_tracker_t, new_completion_tracker)
4466 (make_cleanup_free_completion_tracker): Delete.
4467 (enum maybe_add_completion_enum): Delete.
4468 (maybe_add_completion): Delete.
4469 (throw_max_completions_reached_error): Delete.
4470 * corefile.c (complete_set_gnutarget): Adjust to work with a
4471 completion_tracker instead of a VEC.
4472 * cp-abi.c (cp_abi_completer): Adjust to work with a
4473 completion_tracker instead of a VEC.
4474 * d-lang.c (d_language_defn): Adjust.
4475 * disasm.c (disassembler_options_completer): Adjust to work with a
4476 completion_tracker instead of a VEC.
4477 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4478 (f_collect_symbol_completion_matches): ... this. Adjust to work
4479 with a completion_tracker instead of a VEC.
4480 (f_language_defn): Adjust.
4481 * go-lang.c (go_language_defn): Adjust.
4482 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4483 Adjust to work with a completion_tracker instead of a VEC.
4484 * infrun.c (handle_completer): Likewise.
4485 * interps.c (interpreter_completer): Likewise.
4486 * interps.h (interpreter_completer): Likewise.
4487 * language.c (unknown_language_defn, auto_language_defn)
4488 (local_language_defn): Adjust.
4489 * language.h (language_defn::la_make_symbol_completion_list):
4490 Rename to ...
4491 (language_defn::la_collect_symbol_completion_matches): ... this
4492 and adjust to work with a completion_tracker instead of a VEC.
4493 * m2-lang.c (m2_language_defn): Adjust.
4494 * objc-lang.c (objc_language_defn): Adjust.
4495 * opencl-lang.c (opencl_language_defn): Adjust.
4496 * p-lang.c (pascal_language_defn): Adjust.
4497 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4498 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4499 with a completion_tracker.
4500 * rust-lang.c (rust_language_defn): Adjust.
4501 * symtab.c (free_completion_list, do_free_completion_list)
4502 (return_val, completion_tracker): Delete.
4503 (completion_list_add_name, completion_list_add_symbol)
4504 (completion_list_add_msymbol, completion_list_objc_symbol)
4505 (completion_list_add_fields, add_symtab_completions): Add
4506 completion_tracker parameter and use it.
4507 (default_make_symbol_completion_list_break_on_1): Rename to...
4508 (default_collect_symbol_completion_matches_break_on): ... this.
4509 Add completion_tracker parameter and use it instead of allocating
4510 a completion tracker here.
4511 (default_make_symbol_completion_list_break_on): Delete old
4512 implementation.
4513 (default_make_symbol_completion_list): Delete.
4514 (default_collect_symbol_completion_matches): New.
4515 (make_symbol_completion_list): Delete.
4516 (collect_symbol_completion_matches): New.
4517 (make_symbol_completion_type): Rename to ...
4518 (collect_symbol_completion_matches_type): ... this. Add
4519 completion_tracker parameter and use it instead of VEC.
4520 (make_file_symbol_completion_list_1): Rename to...
4521 (collect_file_symbol_completion_matches): ... this. Add
4522 completion_tracker parameter and use it instead of VEC.
4523 (make_file_symbol_completion_list): Delete.
4524 (add_filename_to_list): Use completion_list instead of a VEC.
4525 (add_partial_filename_data::list): Now a completion_list.
4526 (make_source_files_completion_list): Work with a completion_list
4527 instead of a VEC.
4528 * symtab.h: Include "completer.h".
4529 (default_make_symbol_completion_list_break_on)
4530 (default_make_symbol_completion_list, make_symbol_completion_list)
4531 (make_symbol_completion_type, make_file_symbol_completion_list)
4532 (make_source_files_completion_list): Delete.
4533 (default_collect_symbol_completion_matches_break_on)
4534 (default_collect_symbol_completion_matches)
4535 (collect_symbol_completion_matches)
4536 (collect_symbol_completion_matches_type)
4537 (collect_file_symbol_completion_matches)
4538 (make_source_files_completion_list): New.
4539 * top.c (init_main): Don't install a rl_completion_entry_function
4540 hook. Install a rl_attempted_completion_function hook instead.
4541 * tui/tui-layout.c (layout_completer): Adjust to work with a
4542 completion_tracker.
4543 * tui/tui-regs.c (tui_reggroup_completer):
4544 * tui/tui-win.c (window_name_completer, focus_completer)
4545 (winheight_completer): Adjust to work with a completion_tracker.
4546 * value.c: Include "completer.h".
4547 (complete_internalvar): Adjust to work with a completion_tracker.
4548 * value.h (complete_internalvar): Likewise.
4549
6e1dbf8c
PA
45502017-07-17 Pedro Alves <palves@redhat.com>
4551
4552 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4553 renames.
4554 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4555 comments to completer_ftype's declaration.
4556 <completer_handle_brkchars>: Change type to
4557 completer_handle_brkchars_ftype.
4558 * command.h (completer_ftype): Add describing comment and give
4559 names to parameters.
4560 (completer_ftype_void): Rename to ...
4561 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4562 (set_cmd_completer_handle_brkchars): Adjust.
4563 * completer.c (filename_completer_handle_brkchars): New function.
4564 (complete_line_internal_normal_command): New function, factored
4565 out from ...
4566 (complete_line_internal): ... here.
4567 (command_completer_handle_brkchars)
4568 (default_completer_handle_brkchars)
4569 (completer_handle_brkchars_func_for_completer): New functions.
4570 * completer.h (set_gdb_completion_word_break_characters): Delete
4571 declaration.
4572 (completer_handle_brkchars_func_for_completer): New declaration.
4573 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4574 completer_handle_brkchars_func_for_completer.
4575
78b13106
PA
45762017-07-17 Pedro Alves <palves@redhat.com>
4577
4578 * completer.c (symbol_completer): New function, based on
4579 make_symbol_completion_list_fn.
4580 * completer.h (symbol_completer): New declaration.
4581 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4582 * python/py-cmd.c (completers): Adjust.
4583 * symtab.c (make_symbol_completion_list_fn): Delete.
4584 * symtab.h (make_symbol_completion_list_fn): Delete.
4585 * cli/cli-decode.c (add_cmd): Adjust.
4586
bbf2f4df
PA
45872017-07-17 Pedro Alves <palves@redhat.com>
4588
4589 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4590 * dwarf2read.c: Include "filename-seen-cache.h".
4591 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4592 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4593 * filename-seen-cache.c: New file.
4594 * filename-seen-cache.h: New file.
4595 * symtab.c: Include "filename-seen-cache.h".
4596 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4597 (create_filename_seen_cache, clear_filename_seen_cache)
4598 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4599 to filename-seen-cache.h/filename-seen-cache.c.
4600 (output_source_filename, sources_info)
4601 (maybe_add_partial_symtab_filename)
4602 (make_source_files_completion_list): Adjust to use
4603 filename_seen_cache.
4604
330cdd98
PA
46052017-07-17 Pedro Alves <palves@redhat.com>
4606
4607 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4608 fields.
4609 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4610 dwarf2_debug_sections*)): New.
4611 (dwarf2_per_objfile::dwarf2_per_objfile(const
4612 dwarf2_per_objfile&)): Declare as deleted.
4613 (dwarf2_per_objfile::operator=): Declare as deleted.
4614 (dwarf2_per_objfile::dwarf2_per_objfile)
4615 (dwarf2_per_objfile::~dwarf2_per_objfile)
4616 (dwarf2_per_objfile::free_cached_comp_units): New.
4617 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4618 ctor. Call dwarf2_per_objfile's ctor manually.
4619 (dwarf2_locate_sections): Deleted/refactored as ...
4620 (dwarf2_per_objfile::locate_sections): ... this new method.
4621 (free_cached_comp_units): Defer to
4622 dwarf2_per_objfile::free_cached_comp_units.
4623 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4624
8880f2a9
TT
46252017-07-14 Tom Tromey <tom@tromey.com>
4626
4627 PR rust/21764:
4628 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4629 parameter.
4630 <UNOP_SIZEOF>: Split into separate case.
4631 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4632
65547233
TT
46332017-07-14 Tom Tromey <tom@tromey.com>
4634
4635 PR rust/21763:
4636 * symtab.c (symbol_matches_domain): Add language_rust to special
4637 case.
4638 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4639 treat LOC_TYPEDEF symbols as variables.
4640
8f14146e
PA
46412017-07-14 Pedro Alves <palves@redhat.com>
4642
4643 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4644 symtabs matching all symtabs with SRCFILE as file name instead of
4645 only considering the first hit, with lookup_symtab.
4646
2347965c
SM
46472017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4648
4649 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4650 operator_name parameters.
4651 (gen_expr): Update function call.
4652
40f4af28
SM
46532017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4654
4655 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4656 parameter.
4657 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4658 Likewise.
4659 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4660 parameter, use agent_expr::gdbarch instead, update function
4661 calls.
4662 (locexpr_tracepoint_var_ref): Likewise.
4663 (loclist_tracepoint_var_ref): Likewise.
4664 * ax-gdb.c (gen_trace_static_fields): Likewise.
4665 (gen_traced_pop): Likewise.
4666 (gen_frame_args_address): Likewise.
4667 (gen_frame_locals_address): Likewise.
4668 (gen_var_ref): Likewise.
4669 (gen_struct_ref_recursive): Likewise.
4670 (gen_static_field): Likewise.
4671 (gen_maybe_namespace_elt): Likewise.
4672 (gen_expr): Likewise.
4673 (gen_trace_for_var): Likewise.
4674 (gen_trace_for_expr): Likewise.
4675 (gen_trace_for_return_address): Likewise.
4676
053f8057
SM
46772017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4678
4679 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4680 parameter.
4681 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4682
6661ad48
SM
46832017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4684
4685 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4686 from ax, update calls.
4687 (gen_usual_arithmetic): Likewise.
4688 (gen_integral_promotions): Likewise.
4689 (gen_bitfield_ref): Likewise.
4690 (gen_primitive_field): Likewise.
4691 (gen_struct_ref_recursive): Likewise.
4692 (gen_struct_ref): Likewise.
4693 (gen_maybe_namespace_elt): Likewise.
4694 (gen_struct_elt_for_reference): Likewise.
4695 (gen_namespace_elt): Likewise.
4696 (gen_aggregate_elt_ref): Likewise.
4697 (gen_expr): Get gdbarch from ax, update calls.
4698 (gen_expr_binop_rest): Likewise.
4699
c55a47e7
PA
47002017-07-13 Pedro Alves <palves@redhat.com>
4701
4702 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4703 as default tdesc.
4704 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4705 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4706 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4707 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4708 tdep.
4709 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4710 Get final tdesc from the tdep.
4711 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4712 default tdesc.
4713 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4714 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4715 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4716 Use it as default tdesc.
4717 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4718 down to amd_init_abi. No longer handle fallback tdesc here.
4719 * amd64-tdep.h (tdesc_x32): Declare.
4720 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4721 parameter.
4722 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4723 as default tdesc.
4724
55efceab
AA
47252017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4726
4727 * s390-linux-tdep.c (s390_process_record): Add support for
4728 instructions new in arch12.
4729
0aa37b65
JB
47302017-07-11 John Baldwin <jhb@FreeBSD.org>
4731
4732 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4733 PT_GETFSBASE and PT_GETGSBASE.
4734 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4735 PT_SETGSBASE.
4736
48aeef91
JB
47372017-07-11 John Baldwin <jhb@FreeBSD.org>
4738
4739 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4740 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4741 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4742 those rules.
4743 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4744 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4745 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4746 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4747 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4748 * features/i386/amd64.xml: Add 64bit-segments.xml.
4749 * features/i386/amd64-avx-avx512.c: Regenerated.
4750 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4751 * features/i386/amd64-avx-mpx.c: Regenerated.
4752 * features/i386/amd64-avx.c: Regenerated.
4753 * features/i386/amd64-mpx.c: Regenerated.
4754 * features/i386/amd64.c: Regenerated.
4755 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4756 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4757 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4758 * regformats/i386/amd64-avx.dat: Regenerated.
4759 * regformats/i386/amd64-mpx.dat: Regenerated.
4760 * regformats/i386/amd64.dat: Regenerated.
4761
77c501bc
YQ
47622017-07-10 Yao Qi <yao.qi@linaro.org>
4763
4764 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4765 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4766
6dc8d757
AK
47672017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4768
4769 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4770 unsetenv.
4771 * gnulib/aclocal.m4: Regenerate.
4772 * gnulib/config.in: Regenerate.
4773 * gnulib/configure: Regenerate.
4774 * gnulib/import/Makefile.am: Regenerate.
4775 * gnulib/import/Makefile.in: Regenerate.
4776 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4777 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4778 * gnulib/import/m4/environ.m4: New file.
4779 * gnulib/import/m4/setenv.m4: New file.
4780 * gnulib/import/setenv.c: New file.
4781 * gnulib/import/unsetenv.c: New file.
4782
266934d1
SM
47832017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4784
4785 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4786 address when op is DW_OP_addr.
4787
03278692
TT
47882017-07-09 Tom Tromey <tom@tromey.com>
4789
4790 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4791 check and apply to outer type.
4792
4b654465
JB
47932017-07-07 John Baldwin <jhb@FreeBSD.org>
4794
4795 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4796 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4797 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4798 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4799
2af9fc44
JB
48002017-07-07 John Baldwin <jhb@FreeBSD.org>
4801
4802 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4803
382b69bb
JB
48042017-07-07 John Baldwin <jhb@FreeBSD.org>
4805
4806 * corelow.c (get_core_siginfo): Remove.
4807 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4808 instead of get_core_siginfo.
4809 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4810 * gdbarch.h: Re-generate.
4811 * gdbarch.c: Re-generate.
4812 * linux-tdep.c (linux_core_xfer_siginfo): New.
4813 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4814
6e5eab33
JB
48152017-07-07 John Baldwin <jhb@FreeBSD.org>
4816
4817 * corelow.c (thread_section_name): Move to ...
4818 * gdbcore.h (thread_section_name): ... here.
4819
929edea9
JB
48202017-07-07 John Baldwin <jhb@FreeBSD.org>
4821
4822 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4823 (struct siginfo32): New.
4824 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4825 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4826 via ptrace(PT_LWPINFO).
4827
762c974a
JB
48282017-07-07 John Baldwin <jhb@FreeBSD.org>
4829
4830 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4831 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4832 (fbsd_get_siginfo_type): New.
4833 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4834 (_initialize_fbsd_tdep): New.
4835
33c5cd75
DB
48362017-07-06 David Blaikie <dblaikie@gmail.com>
4837
4838 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4839 a singular dwo_unit*) to support multiple CUs in the same way that
4840 multiple TUs are supported.
4841 (create_cus_hash_table): Replace create_dwo_cu with a function for
4842 parsing multiple CUs from a DWO file.
4843 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4844 create_dwo_cu.
4845 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4846 htab_find, rather than comparing the signature to a singleton CU in
4847 the dwo_file.
4848
8455d262
PA
48492017-07-06 Pedro Alves <palves@redhat.com>
4850
4851 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4852
4da3eb35
PA
48532017-07-04 Pedro Alves <palves@redhat.com>
4854
4855 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4856 * gdbtypes.h (TYPE_STATIC): Delete.
4857 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4858 is_synchronized, is_native>: Delete.
4859 <dummy>: Bump.
4860 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4861 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4862 (TYPE_FN_FIELD_ABSTRACT): Delete.
4863
5bfd255c
SM
48642017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4865
4866 * buffer.h (buffer_finish): Fix spelling mistakes.
4867
25c54127
EZ
48682017-07-01 Eli Zaretskii <eliz@gnu.org>
4869
4870 * .dir-locals.el: Automatically switch to C-style comments in
4871 versions of Emacs that support the feature.
4872
dc4bde35
SDJ
48732017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4874 Pedro Alves <palves@redhat.com>
4875
4876 PR cli/21688
4877 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4878 (process_next_line): New variable 'inline_cmd'.
4879 Adjust 'if' clauses for "python", "compile" and "guile" to use
4880 'command_name_equals' and check for '!inline_cmd'.
4881
51ed89aa
SDJ
48822017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4883
4884 PR cli/21688
4885 * cli/cli-script.c (command_name_equals_not_inline): New function.
4886 (process_next_line): Adjust 'if' clauses for "python", "compile"
4887 and "guile" to use command_name_equals_not_inline.
4888
eb17d413
PA
48892017-06-29 Pedro Alves <palves@redhat.com>
4890
4891 * completer.c (expression_completer): Call
4892 linespec_location_completer instead of location_completer.
4893
195bcdd5
PA
48942017-06-29 Pedro Alves <palves@redhat.com>
4895
4896 * completer.c (expression_completer): Remove code that recomputes
4897 'text' from 'word'.
4898
adc764e7
YQ
48992017-06-29 Yao Qi <yao.qi@linaro.org>
4900
4901 * regformats/regdat.sh: Generate code with
4902 "ifndef IN_PROCESS_AGENT".
4903
6e75794e
PA
49042017-06-28 Pedro Alves <palves@redhat.com>
4905
4906 * command.h: Include "common/scoped_restore.h".
4907
bc491f2e
YQ
49082017-06-28 Yao Qi <yao.qi@linaro.org>
4909
4910 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4911 instead of obstack_grow.
4912
41664b45
DG
49132017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4914
4915 PR gdb/21337
4916 * symfile.c (reread_symbols): Call objfiles_changed just before
4917 read_symbols.
4918
6da67eb1
PA
49192017-06-27 Pedro Alves <palves@redhat.com>
4920
4921 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4922 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4923 (completion_list_add_symbol, completion_list_add_msymbol):
4924 ... these new functions.
4925 (add_symtab_completions)
4926 (default_make_symbol_completion_list_break_on_1): Adjust.
4927
23732b1e
PA
49282017-06-27 Pedro Alves <palves@redhat.com>
4929
4930 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4931 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4932 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4933 dtor.
4934 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4935 'storage_obstack' field an auto_obstack. In-class initialize all
4936 non-bitfield fields. Make minsyms_read bool.
4937 * symfile.c (read_symbols): Adjust.
4938
a4d1e79a
AH
49392017-06-27 Alan Hayward <alan.hayward@arm.com>
4940
4941 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4942 (gdbsim_store_register): Likewise.
4943
8268c778
PA
49442017-06-27 Pedro Alves <palves@redhat.com>
4945
4946 * c-exp.y (name_obstack): Now an auto_obstack.
4947 (yylex): Use auto_obstack::clear.
4948 (c_parse): Use auto_obstack::clear instead of reinitializing and
4949 freeing the obstack.
4950 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4951 * d-exp.y (name_obstack): Now an auto_obstack.
4952 (yylex): Use auto_obstack::clear.
4953 (d_parse): Use auto_obstack::clear instead of reinitializing and
4954 freeing the obstack.
4955 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4956 auto_obstack.
4957 * dwarf2read.c (create_addrmap_from_index)
4958 (dwarf2_build_psymtabs_hard)
4959 (update_enumeration_type_from_children): Likewise.
4960 * gdb_obstack.h (auto_obstack): New type.
4961 * go-exp.y (name_obstack): Now an auto_obstack.
4962 (build_packaged_name): Use auto_obstack::clear.
4963 (go_parse): Use auto_obstack::clear instead of reinitializing and
4964 freeing the obstack.
4965 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4966 auto_obstack.
4967 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4968 * rust-exp.y (work_obstack): Now an auto_obstack.
4969 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4970 reinitializing and freeing the obstack.
4971 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4972 (host_char_to_target): Use auto_obstack.
4973 * utils.h (make_cleanup_obstack_free): Delete declaration.
4974 * valprint.c (generic_emit_char, generic_printstr): Use
4975 auto_obstack.
4976
db665f42
SM
49772017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4978
4979 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4980 thread.
4981 (darwin_init_thread_list): Don't update dummy thread.
4982 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4983
873c0814
SM
49842017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4985
4986 * record-full.c (netorder16): Remove.
4987
8b5a7a6e
SM
49882017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4989
4990 * common/diagnostics.h: Define macros for GCC.
4991 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4992 * common/vec.h: Include diagnostics.h.
4993 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4994 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4995 warning.
4996
d1435379
SM
49972017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4998
4999 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5000 New macro.
5001 * ada-lex.l: Ignore deprecated register warnings.
5002
cc75e0fd
SM
50032017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5004
5005 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5006 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5007
07809eaf
SM
50082017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5009
5010 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5011 its own line.
5012
f076f034
SM
50132017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5014
5015 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5016
0dd5cbc5
AH
50172017-06-23 Alan Hayward <alan.hayward@arm.com>
5018
5019 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5020 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5021 (xtensa_register_read_masked): Likewise.
5022
d4c6ce5b
SDJ
50232017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5024
5025 * common/environ.c (gdb_environ::unset): Update comment.
5026
16892a03
AH
50272017-06-22 Alan Hayward <alan.hayward@arm.com>
5028
5029 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5030 registers.
5031
d7dcbefc
AH
50322017-06-22 Alan Hayward <alan.hayward@arm.com>
5033
5034 * record-full.c (record_full_exec_insn): Use byte_vector.
5035
b30ff123
YQ
50362017-06-22 Yao Qi <yao.qi@linaro.org>
5037
5038 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5039 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5040
4fa847d7
AH
50412017-06-22 Alan Hayward <alan.hayward@arm.com>
5042
5043 * remote.c (cached_reg): Move from here...
5044 * regcache.h (cached_reg): ...to here.
5045 * python/py-unwind.c (struct reg_info): Remove.
5046 (cached_frame_info): Use cached_reg_t.
5047 (pyuw_prev_register): Likewise.
5048 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5049 (pyuw_dealloc_cache): Free all registers.
5050
f4906a9a
PA
50512017-06-22 Pedro Alves <palves@redhat.com>
5052 Simon Marchi <simon.marchi@ericsson.com>
5053
5054 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5055 warning.
5056 * common/diagnostics.h: New file.
5057
b45a1208
PA
50582017-06-22 Pedro Alves <palves@redhat.com>
5059
5060 * common/agent.h: Add include guards.
5061
e4da2c61
SM
50622017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5063
5064 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5065 talk about addressable units instead of bytes.
5066
96160d60
SDJ
50672017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5068
5069 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5070 of '::const_iterator'.
5071
9a6c7d9c
SDJ
50722017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5073
5074 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5075 'unittests/environ-selftests.c'.
5076 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5077 * charset.c (find_charset_names): Declare object 'iconv_env'.
5078 Update code to use 'iconv_env' object. Remove call to
5079 'free_environ'.
5080 * common/environ.c: Include <utility>.
5081 (make_environ): Delete function.
5082 (free_environ): Delete function.
5083 (gdb_environ::clear): New function.
5084 (gdb_environ::operator=): New function.
5085 (gdb_environ::get): Likewise.
5086 (environ_vector): Delete function.
5087 (set_in_environ): Delete function.
5088 (gdb_environ::set): New function.
5089 (unset_in_environ): Delete function.
5090 (gdb_environ::unset): New function.
5091 (gdb_environ::envp): Likewise.
5092 * common/environ.h: Include <vector>.
5093 (struct gdb_environ): Delete; transform into...
5094 (class gdb_environ): ... this class.
5095 (free_environ): Delete prototype.
5096 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5097 environ_vector): Likewise.
5098 * infcmd.c (run_command_1): Update code to call
5099 'envp' from 'gdb_environ' class.
5100 (environment_info): Update code to call methods from 'gdb_environ'
5101 class.
5102 (unset_environment_command): Likewise.
5103 (path_info): Likewise.
5104 (path_command): Likewise.
5105 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5106 (inferior::inferior): Initialize 'environment' using the host's
5107 information.
5108 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5109 Include "environ.h".
5110 (class inferior) <environment>: Change type from 'struct
5111 gdb_environ' to 'gdb_environ'.
5112 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5113 methods from 'gdb_environ' class.
5114 * solib.c (solib_find_1): Likewise
5115 * unittests/environ-selftests.c: New file.
5116
75c554cf
YQ
51172017-06-20 Yao Qi <yao.qi@linaro.org>
5118
5119 * features/i386/i386-linux.xml: Exchange the order of including
5120 32bit-linux.xml and 32bit-sse.xml.
5121 * features/i386/i386-linux.c: Regenerated.
5122
72ddacb7
YQ
51232017-06-20 Yao Qi <yao.qi@linaro.org>
5124
5125 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5126 Delete copy ctor and assignment operator.
5127 (tdesc_type): Likewise.
5128 (tdesc_feature): Likewise.
5129 (tdesc_free_reg): Remove.
5130 (tdesc_create_reg): Use new.
5131 (tdesc_free_type): Remove.
5132 (tdesc_create_vector): Use new.
5133 (tdesc_create_union): Likewise.
5134 (tdesc_create_flags): Likewise.
5135 (tdesc_create_enum): Likewise.
5136 (tdesc_free_feature): Delete.
5137 (free_target_description): Use delete.
5138
325c9fd4
JB
51392017-06-19 John Baldwin <jhb@FreeBSD.org>
5140
5141 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5142 registers.
5143
16b7a719
PA
51442017-06-19 Pedro Alves <palves@redhat.com>
5145
5146 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5147 after gdb::unlinker.
5148
1c8e01c9
SDJ
51492017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5150
5151 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5152 gdb_environ to access an environment variable.
5153
ffce45d2
TP
51542017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5155
5156 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5157 gdb_byte*.
5158
1d4fbac9
SM
51592017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5160
5161 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5162
8465943a
SM
51632017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5164
5165 * configure: Re-generate.
5166 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5167
3e019bdc
SM
51682017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5169
5170 * configure: Re-generate.
5171 * warning.m4: Pass -Werror to compiler when checking for
5172 supported warning flags.
5173
cf0dd6f0
SM
51742017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5175
5176 * Makefile.in (COMPILE.pre): Add "-x c++".
5177
6f98355c
YQ
51782017-06-16 Alan Hayward <alan.hayward@arm.com>
5179 Pedro Alves <palves@redhat.com>
5180 Yao Qi <yao.qi@linaro.org>
5181
5182 * defs.h (RequireLongest): New.
5183 (extract_integer): Declare function template.
5184 (extract_signed_integer): Remove the declaration, but define it
5185 static inline.
5186 (extract_unsigned_integer): Likewise.
5187 (store_integer): Declare function template.
5188 (store_signed_integer): Remove the declaration, but define it
5189 static inline.
5190 (store_unsigned_integer): Likewise.
5191 * findvar.c (extract_integer): New function template.
5192 (extract_signed_integer): Remove.
5193 (extract_unsigned_integer): Remove.
5194 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5195 instantiations.
5196 (store_integer): New function template.
5197 (store_signed_integer): Remove.
5198 (store_unsigned_integer): Remove.
5199 (store_integer): Explicit instantiations.
5200 * regcache.c (regcache_raw_read_signed): Update.
5201 (regcache::raw_read): New function.
5202 (regcache::raw_read_signed): Remove.
5203 (regcache::raw_read_unsigned): Remove.
5204 (regcache_raw_read_unsigned): Update.
5205 (regcache_raw_write_unsigned): Update.
5206 (regcache::raw_write_signed): Remove.
5207 (regcache::raw_write): New function.
5208 (regcache_cooked_read_signed): Update.
5209 (regcache::raw_write_unsigned): Remove.
5210 (regcache::cooked_read_signed): Remove.
5211 (regcache_cooked_read_unsigned): Update.
5212 (regcache::cooked_read_unsigned): Remove.
5213 (regcache_cooked_write_signed): Update.
5214 (regcache_cooked_write_unsigned): Update.
5215 * regcache.h (regcache) <raw_read_signed>: Remove.
5216 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5217 <raw_read, raw_write>: New.
5218 <cooked_read_signed, cooked_write_signed>: Remove.
5219 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5220 <cooked_read, cooked_write>: New.
5221 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5222 (sh64_pseudo_register_write): Update.
5223
a87dc45a
AK
52242017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5225
5226 * arc-tdep.c (arc_disassembler_options): New variable.
5227 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5228 of default_print_insn.
5229 (arc_delayed_print_insn): Set info->section when needed,
5230 use default_print_insn to retrieve a disassembler.
5231
45159d6a
SDJ
52322017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5233
5234 PR gdb/21574
5235 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5236 to mention $SHELL and startup-with-shell.
5237
b46c4cf0
MF
52382017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5239
5240 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5241
6394c606
YQ
52422017-06-14 Yao Qi <yao.qi@linaro.org>
5243
5244 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5245 default_print_insn instead of print_insn_aarch64.
5246 * arm-tdep.c (gdb_print_insn_arm): Call
5247 default_print_insn instead of print_insn_big_arm
5248 and print_insn_little_arm.
5249 * i386-tdep.c (i386_print_insn): Call default_print_insn
5250 instead of print_insn_i386.
5251 * ia64-tdep.c (ia64_print_insn): Call
5252 default_print_insn instead of print_insn_ia64.
5253 * mips-tdep.c (gdb_print_insn_mips): Call
5254 default_print_insn instead of print_insn_big_mips
5255 and print_insn_little_mips.
5256 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5257 instead of print_insn_spu.
5258
d5722aa2
PA
52592017-06-14 Pedro Alves <palves@redhat.com>
5260
5261 * ada-lang.c: Include "common/byte-vector.h".
5262 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5263 * charset.c (wchar_iterator::iterate): Resize the vector instead
5264 of reserving it.
5265 * common/byte-vector.h: Include "common/def-vector.h".
5266 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5267 * cli/cli-dump.c: Include "common/byte-vector.h".
5268 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5269 * common/byte-vector.h: New file.
5270 * common/def-vector.h: New file.
5271 * common/default-init-alloc.h: New file.
5272 * dwarf2loc.c: Include "common/byte-vector.h".
5273 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5274 instead of reserving it.
5275 * dwarf2read.c: Include "common/byte-vector.h".
5276 (data_buf::m_vec): Now a gdb::byte_vector.
5277 * gdb_regex.c: Include "common/def-vector.h".
5278 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5279 * mi/mi-main.c: Include "common/byte-vector.h".
5280 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5281 * printcmd.c: Include "common/byte-vector.h".
5282 (print_scalar_formatted): Use gdb::byte_vector.
5283 * valprint.c: Include "common/byte-vector.h".
5284 (maybe_negate_by_bytes, print_decimal_chars): Use
5285 gdb::byte_vector.
5286
01ec7a27
SM
52872017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5288
5289 * darwin-nat.c: Include "nat/fork-inferior.h".
5290
848d9074
SM
52912017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5292
5293 * configure.nat: Factor out Darwin bits that are not
5294 architecture-specific. Add fork-inferior.o.
5295
3b912944
SM
52962017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5297
5298 * configure.nat: Factor out AIX bits that are not
5299 architecture-specific. Add fork-inferior.o.
5300
55acdf22
AA
53012017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5302
5303 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5304 (read_pieced_value, write_pieced_value): ...here. Reduce to
5305 wrappers that just call rw_pieced_value.
5306
f65e2044
AA
53072017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5308
5309 * dwarf2loc.c (write_pieced_value): When writing the data for a
5310 memory piece, use write_memory_with_notification instead of
5311 write_memory.
5312
23f945bf
AA
53132017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5314
5315 * valops.c (read_value_memory): Change embedded_offset to
5316 represent a bit offset instead of a byte offset.
5317 * value.h (read_value_memory): Adjust comment.
5318
f236533e
AA
53192017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5320
5321 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5322 dest_offset_bits and source_offset_bits.
5323 (write_pieced_value): Likewise.
5324
65d84b76
AA
53252017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5326
5327 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5328 given by DW_OP_bit_piece.
5329 (write_pieced_value): Likewise.
5330
242d31ab
AA
53312017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5332
5333 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5334 some other preparations to the places where sufficient information
5335 is available.
5336 (write_pieced_value): Likewise.
5337
03c8af18
AA
53382017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5339
5340 * dwarf2loc.c (bits_to_bytes): New function.
5341 (read_pieced_value): Fix offset calculations for register pieces
5342 on big-endian targets.
5343 (write_pieced_value): Likewise.
5344
840989c1
AA
53452017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5346
5347 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5348 (write_pieced_value): Likewise.
5349
359b19bb
AA
53502017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5351
5352 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5353 transfer the source value's least significant bits, instead of its
5354 lowest-addressed ones. Rename type_len to max_offset.
5355 (read_pieced_value): Mirror above changes to write_pieced_value as
5356 applicable.
5357
07c9ca3b
AA
53582017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5359
5360 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5361 truncate full bytes from dest_offset_bits before using it as an
5362 offset into the buffer.
5363
f1cc9874
AA
53642017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5365
5366 * dwarf2loc.c (write_pieced_value): Include transfer size in
5367 byte-wise check.
5368
cdaac320
AA
53692017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5370
5371 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5372 calculation of this_size.
5373
af547a96
AA
53742017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5375
5376 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5377 when targeting a bit-field.
5378 (write_pieced_value): Likewise.
5379
ddd7882a
AA
53802017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5381
5382 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5383 (allocate_piece_closure): Drop addr_size parameter.
5384 (dwarf2_evaluate_loc_desc_full): Adjust call to
5385 allocate_piece_closure.
5386
e9352324
AA
53872017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5388
5389 PR gdb/21226
5390 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5391 the LSB end, independent of endianness.
5392
d5d1163e
AA
53932017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5394
5395 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5396 size capping.
5397
032bb6ea
YQ
53982017-06-13 Yao Qi <yao.qi@linaro.org>
5399
5400 * mips-linux-nat.c: Move include features/mips*-linux.c to
5401 mips-linux-tdep.c.
5402 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5403 to mips-linux-tdep.c.
5404 * mips-linux-tdep.c: Include features/mips*-linux.c
5405 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5406 functions.
5407 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5408 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5409 (tdesc_mips64_dsp_linux): Declare.
5410
f12f6bad
TT
54112017-06-12 Tom Tromey <tom@tromey.com>
5412
5413 * valprint.h (val_print_type_code_int): Remove.
5414 * valprint.c (generic_val_print_int): Always call
5415 val_print_scalar_formatted.
5416 (val_print_type_code_int): Remove.
5417 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5418 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5419 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5420 * ada-valprint.c (ada_val_print_num): Use
5421 val_print_scalar_formatted.
5422
d9109c80
TT
54232017-06-12 Tom Tromey <tom@tromey.com>
5424
5425 * printcmd.c (print_scalar_formatted): Unify the two switches.
5426 Don't convert scalars to LONGEST.
5427
4ac0cb1c
TT
54282017-06-12 Tom Tromey <tom@tromey.com>
5429
5430 PR exp/16225:
5431 * valprint.h (print_decimal_chars): Update.
5432 * valprint.c (maybe_negate_by_bytes): New function.
5433 (print_decimal_chars): Add "is_signed" argument.
5434 * printcmd.c (print_scalar_formatted): Update.
5435
30a25466
TT
54362017-06-12 Tom Tromey <tom@tromey.com>
5437
5438 PR exp/16225:
5439 * valprint.h (print_binary_chars, print_hex_chars): Update.
5440 * valprint.c (val_print_type_code_int): Update.
5441 (print_binary_chars): Add "zero_pad" argument.
5442 (emit_octal_digit): New function.
5443 (print_octal_chars): Don't zero-pad.
5444 (print_decimal_chars): Likewise.
5445 (print_hex_chars): Add "zero_pad" argument.
5446 * sh64-tdep.c (sh64_do_fp_register): Update.
5447 * regcache.c (regcache::dump): Update.
5448 * printcmd.c (print_scalar_formatted): Update.
5449 * infcmd.c (default_print_one_register_info): Update.
5450
b3464d03
PA
54512017-06-12 Pedro Alves <palves@redhat.com>
5452 Alan Hayward <alan.hayward@arm.com>
5453
5454 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5455 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5456 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5457 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5458 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5459
4b76cda9
PA
54602017-06-12 Pedro Alves <palves@redhat.com>
5461
5462 * dwarf2read.c (mapped_symtab::data): Now a vector of
5463 symtab_index_entry instead of vector of
5464 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5465 whether an element's name is NULL instead of checking whether the
5466 element itself is NULL.
5467 (find_slot): Change return type. Adjust.
5468 (hash_expand, , add_index_entry, uniquify_cu_indices)
5469 (write_hash_table): Adjust.
5470
e8f8bcb3
PA
54712017-06-12 Pedro Alves <palves@redhat.com>
5472
5473 * dwarf2read.c (recursively_count_psymbols): New function.
5474 (write_psymtabs_to_index): Call it to compute number of psyms and
5475 pass estimate size of psyms_seen to unordered_set's ctor.
5476
70a1152b
PA
54772017-06-12 Pedro Alves <palves@redhat.com>
5478
5479 * dwarf2read.c (write_hash_table): Check if key already exists
5480 before emplacing.
5481
c2f134ac
PA
54822017-06-12 Pedro Alves <palves@redhat.com>
5483
5484 * dwarf2read.c (data_buf::append_space): Rename to...
5485 (data_buf::grow): ... this, and make private. Adjust all callers.
5486 (data_buf::append_uint): New method.
5487 (add_address_entry, write_one_signatured_type)
5488 (write_psymtabs_to_index): Use it.
5489
a81e6d4d
PA
54902017-06-12 Pedro Alves <palves@redhat.com>
5491
5492 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5493 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5494 (data_buf::file_write): Call ::fwrite directly.
5495
6fd931f2
PA
54962017-06-12 Pedro Alves <palves@redhat.com>
5497
5498 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5499 std::vector::erase.
5500
bc8f2430
JK
55012017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5502
5503 Code cleanup: C++ify .gdb_index producer.
5504 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5505 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5506 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5507 (create_strtab, add_string): Remove.
5508 (file_write, data_buf): New.
5509 (struct symtab_index_entry): Use std::vector for cu_indices.
5510 (struct mapped_symtab): Use std::vector for data.
5511 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5512 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5513 Remove.
5514 (find_slot): Change return type. Update it to the new data structures.
5515 (hash_expand, add_index_entry): Update it to the new data structures.
5516 (offset_type_compare): Remove.
5517 (uniquify_cu_indices): Update it to the new data structures.
5518 (c_str_view, c_str_view_hasher, vector_hasher): New.
5519 (add_indices_to_cpool): Remove.
5520 (write_hash_table): Update it to the new data structures.
5521 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5522 (eq_psymtab_cu_index): Remove.
5523 (psym_index_map): New typedef.
5524 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5525 reference and std::unordered_map for cu_index_htab.
5526 (add_address_entry, add_address_entry_worker, write_address_map)
5527 (write_psymbols): Update it to the new data structures.
5528 (write_obstack): Remove.
5529 (struct signatured_type_index_data): Change types_list to a data_buf
5530 reference and psyms_seen to a std::unordered_set reference.
5531 (write_one_signatured_type, recursively_write_psymbols)
5532 (write_psymtabs_to_index): Update it to the new data structures.
5533
c4dcb155
SM
55342017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5535
5536 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5537 separate-debug-file commands.
5538 * symfile.h (separate_debug_file_debug): New global.
5539 * symfile.c (separate_debug_file_debug): New global.
5540 (separate_debug_file_exists, find_separate_debug_file): Add
5541 debug output.
5542 (_initialize_symfile): Add "set debug separate-debug-file"
5543 command.
5544 * build-id.c (build_id_to_debug_bfd,
5545 find_separate_debug_file_by_buildid): Add debug output.
5546
6d45d4b4
SM
55472017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5548
5549 * gdbarch.sh (displaced_step_free_closure): Remove.
5550 * gdbarch.h, gdbarch.c: Re-generate.
5551 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5552 displaced_step_free_closure.
5553 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5554 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5555 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5556 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5557 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5558 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5559 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5560 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5561 * infrun.c (displaced_step_clear): Call xfree instead of
5562 gdbarch_displaced_step_free_closure.
5563
2f91880f
SDJ
55642017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5565
5566 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5567 NULL".
5568
b8b6e72f
AH
55692017-06-08 Alan Hayward <alan.hayward@arm.com>
5570
5571 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5572 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5573 (mn10300_push_dummy_call): Likewise.
5574
5369082e
AH
55752017-06-08 Alan Hayward <alan.hayward@arm.com>
5576
5577 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5578
ff4ca5ac
AH
55792017-06-08 Alan Hayward <alan.hayward@arm.com>
5580
5581 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5582
aefd8b33
SDJ
55832017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5584
5585 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5586 able to start inferiors using a shell.
5587 (New remote packets): Announce new packet "QStartupWithShell".
5588 * remote.c: Add PACKET_QStartupWithShell.
5589 (extended_remote_create_inferior): Handle new
5590 PACKET_QStartupWithShell.
5591 (remote_protocol_features) <QStartupWithShell>: New entry for
5592 PACKET_QStartupWithShell.
5593 (_initialize_remote): Call "add_packet_config_cmd" for
5594 QStartupShell.
5595
2090129c
SDJ
55962017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5597 Pedro Alves <palves@redhat.com>
5598
5599 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5600 and "nat/fork-inferior.h".
5601 * common/common-inferior.h: New file, with contents from
5602 "gdb/inferior.h".
5603 * commom/common-utils.c: Include "common-utils.h".
5604 (stringify_argv): New function.
5605 * common/common-utils.h (stringify_argv): New prototype.
5606 * configure.nat: Add "fork-inferior.o" as a dependency for
5607 "*linux*", "fbsd*" and "nbsd*" hosts.
5608 * corefile.c (get_exec_file): Update comment.
5609 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5610 instead of "startup_inferior".
5611 (darwin_create_inferior): Call "add_thread_silent" after
5612 "fork_inferior".
5613 * fork-child.c: Cleanup unnecessary includes.
5614 (SHELL_FILE): Move to "common/common-fork-child.c".
5615 (environ): Likewise.
5616 (exec_wrapper): Initialize.
5617 (get_exec_wrapper): New function.
5618 (breakup_args): Move to "common/common-fork-child.c"; rename to
5619 "breakup_args_for_exec".
5620 (escape_bang_in_quoted_argument): Move to
5621 "common/common-fork-child.c".
5622 (saved_ui): New variable.
5623 (prefork_hook): New function.
5624 (postfork_hook): Likewise.
5625 (postfork_child_hook): Likewise.
5626 (gdb_startup_inferior): Likewise.
5627 (fork_inferior): Move to "common/common-fork-child.c". Update
5628 function to support gdbserver.
5629 (startup_inferior): Likewise.
5630 * gdbcore.h (get_exec_file): Remove declaration.
5631 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5632 instead of "startup_inferior". Call "add_thread_silent" after
5633 "fork_inferior".
5634 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5635 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5636 instead of "startup_inferior". Call "add_thread_silent" after
5637 "fork_inferior".
5638 * inferior.h: Include "common-inferior.h".
5639 (trace_start_error): Move to "common/common-utils.h".
5640 (trace_start_error_with_name): Likewise.
5641 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5642 (startup_inferior): Likewise.
5643 (gdb_startup_inferior): New prototype.
5644 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5645 * nat/fork-inferior.h: New file.
5646 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5647 instead of "startup_inferior". Call "add_thread_silent" after
5648 "fork_inferior".
5649 * target.h (target_terminal_init): Move prototype to
5650 "target/target.h".
5651 (target_terminal_inferior): Likewise.
5652 (target_terminal_ours): Likewise.
5653 * target/target.h (target_terminal_init): New prototype, moved
5654 from "target.h".
5655 (target_terminal_inferior): Likewise.
5656 (target_terminal_ours): Likewise.
5657 * utils.c (gdb_flush_out_err): New function.
5658
043a4934
SDJ
56592017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5660
5661 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5662 * common/common-gdbthread.h: New file, with parts from
5663 "gdb/gdbthread.h".
5664 * gdbthread.h: Include "common-gdbthread.h".
5665 (switch_to_thread): Moved to "common/common-gdbthread.h".
5666
15652511
SDJ
56672017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5668
5669 * Makefile.in (SFILES): Add "common/job-control.c".
5670 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5671 (COMMON_OBS): Add "job-control.o".
5672 * common/job-control.c: New file, with contents from
5673 "gdb/inflow.c".
5674 * common/job-control.h: New file, with contents from "terminal.h".
5675 * fork-child.c: Include "job-control.h".
5676 * inflow.c: Include "job-control.h".
5677 (gdb_setpgid): Move to "common/common-inflow.c".
5678 (_initialize_inflow): Move setting of "job_control" to
5679 "handle_job_control".
5680 * terminal.h (job_control): Moved to "common/common-terminal.h".
5681 (gdb_setpgid): Likewise.
5682 * top.c: Include "job_control.h".
5683 * utils.c: Likewise.
5684 (job_control): Moved to "job-control.c".
5685
2d7cc5c7
PA
56862017-06-07 Pedro Alves <palves@redhat.com>
5687
5688 * Makefile.in (SFILES): Add gdb_regex.c.
5689 (COMMON_OBS): Add gdb_regex.o.
5690 * ada-lang.c (ada_add_standard_exceptions)
5691 (ada_add_exceptions_from_frame, name_matches_regex)
5692 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5693 parameter type to compiled_regex. Adjust.
5694 (ada_exceptions_list): Use compiled_regex.
5695 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5696 std::unique_ptr<compiled_regex>.
5697 (exception_catchpoint::~exception_catchpoint): Remove regfree
5698 call.
5699 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5700 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5701 * breakpoint.c (solib_catchpoint::compiled): Now a
5702 std::unique_ptr<compiled_regex>.
5703 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5704 (check_status_catch_solib): Adjust to use compiled_regex.
5705 (add_solib_catchpoint): Adjust to use compiled_regex.
5706 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5707 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5708 compiled_regex reference. Adjust to use it.
5709 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5710 declaration. Include "gdb_regex.h".
5711 (apropos_cmd): Change regex parameter to compiled_regex reference.
5712 * gdb_regex.c: New file.
5713 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5714 declarations.
5715 (class compiled_regex): New.
5716 * linux-tdep.c: Include "common/gdb_optional.h".
5717 (struct mapping_regexes): New, factored out from
5718 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5719 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5720 gdb::optional and remove cleanups. Adjust to compiled_regex.
5721 * probe.c: Include "common/gdb_optional.h".
5722 (collect_probes): Use compiled_regex and gdb::optional and remove
5723 cleanups.
5724 * skip.c: Include "common/gdb_optional.h".
5725 (skiplist_entry::compiled_function_regexp): Now a
5726 gdb::optional<compiled_regex>.
5727 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5728 (free_skiplist_entry): Remove regfree call.
5729 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5730 compiled_regex and gdb::optional.
5731 * symtab.c: Include "common/gdb_optional.h".
5732 (search_symbols): Use compiled_regex and gdb::optional.
5733 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5734 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5735 to gdb_regex.c.
5736
50d6adef
AH
57372017-06-07 Alan Hayward <alan.hayward@arm.com>
5738
5739 * regcache.c (regcache::save): Avoid buffer use.
5740 (regcache::dump): Likewise.
5741
4a8a33c8
AH
57422017-06-07 Alan Hayward <alan.hayward@arm.com>
5743
5744 * sh-tdep.c (sh_pseudo_register_read): Remove
5745 MAX_REGISTER_SIZE.
5746 (sh_pseudo_register_write): Likewise.
5747 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5748 (sh64_pseudo_register_write): Likewise
5749
d1be909e
AH
57502017-06-07 Alan Hayward <alan.hayward@arm.com>
5751
5752 * aarch64-tdep.c (aarch64_store_return_value): Use
5753 V_REGISTER_SIZE.
5754 (aarch64_pseudo_read_value): Likewise.
5755 (aarch64_pseudo_write): Likewise.
5756
f4a65042
YQ
57572017-06-06 Yao Qi <yao.qi@linaro.org>
5758
5759 * regformats/regdef.h (set_register_cache): Remove the
5760 declaration.
5761
9f7fb0aa
AH
57622017-06-06 Alan Hayward <alan.hayward@arm.com>
5763
5764 * frame.c (frame_unwind_register_signed): Use
5765 frame_unwind_register_value.
5766
e1e01040
PA
57672017-06-06 Pedro Alves <palves@redhat.com>
5768
5769 PR breakpoints/21553
5770 * breakpoint.c (create_breakpoints_sal_default)
5771 (init_breakpoint_sal, create_breakpoint_sal): Use
5772 gdb::unique_xmalloc_ptr for string parameters.
5773 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5774 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5775 (base_breakpoint_create_breakpoints_sal)
5776 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5777 (strace_marker_create_breakpoints_sal)
5778 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5779 string parameters.
5780 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5781 gdb::unique_xmalloc_ptr for string parameters.
5782 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5783 parameters.
5784
fbe654c8
AH
57852017-06-06 Alan Hayward <alan.hayward@arm.com>
5786
5787 * alpha-tdep.c (alpha_register_to_value): Use
5788 get_frame_register_value.
5789 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5790
ae0d01d6
AH
57912017-06-06 Alan Hayward <alan.hayward@arm.com>
5792
5793 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5794 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5795 (ia64_value_to_register): Likewise.
5796 (ia64_extract_return_value): Likewise.
5797 (ia64_store_return_value): Likewise.
5798 (ia64_push_dummy_call): Likewise.
5799
49cf576c
JB
58002017-06-04 Joel Brobecker <brobecker@adacore.com>
5801
5802 GDB 8.0 released.
5803
26b6a6ab
SM
58042017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5805
5806 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5807
22827c51
SM
58082017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5809
5810 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5811 parameter.
5812 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5813
0e05cf3a
SM
58142017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5815
5816 * event-loop.c (poll_timers): Unallocate timer using delete
5817 instead of xfree.
5818
c1fc2657
SM
58192017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5820
5821 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5822 (struct breakpoint) <~breakpoint>: New.
5823 (struct watchpoint): Inherit from breakpoint.
5824 <~watchpoint>: New.
5825 <base>: Remove.
5826 (struct tracepoint): Inherit from breakpoint.
5827 <base>: Remove.
5828 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5829 (struct longjmp_breakpoint): Inherit from breakpoint.
5830 <~longjmp_breakpoint>: New.
5831 <base>: Remove.
5832 (new_breakpoint_from_type): Remove casts.
5833 (watchpoint_in_thread_scope): Remove reference to base field.
5834 (watchpoint_del_at_next_stop): Likewise.
5835 (update_watchpoint): Likewise.
5836 (watchpoint_check): Likewise.
5837 (bpstat_check_watchpoint): Likewise.
5838 (set_longjmp_breakpoint): Likewise.
5839 (struct fork_catchpoint): Inherit from breakpoint.
5840 <base>: Remove.
5841 (struct solib_catchpoint): Inherit from breakpoint.
5842 <~solib_catchpoint>: New.
5843 <base>: Remove.
5844 (dtor_catch_solib): Change to ...
5845 (solib_catchpoint::~solib_catchpoint): ... this.
5846 (breakpoint_hit_catch_solib): Remove reference to base field.
5847 (add_solib_catchpoint): Likewise.
5848 (create_fork_vfork_event_catchpoint): Likewise.
5849 (struct exec_catchpoint): Inherit from breakpoint.
5850 <~exec_catchpoint>: New.
5851 <base>: Remove.
5852 (dtor_catch_exec): Change to ...
5853 (exec_catchpoint::~exec_catchpoint): ... this.
5854 (dtor_watchpoint): Change to ...
5855 (watchpoint::~watchpoint): ... this.
5856 (watch_command_1): Remove reference to base field.
5857 (catch_exec_command_1): Likewise.
5858 (base_breakpoint_dtor): Change to ...
5859 (breakpoint::~breakpoint): ... this.
5860 (base_breakpoint_ops): Remove dtor field value.
5861 (longjmp_bkpt_dtor): Change to ...
5862 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5863 (strace_marker_create_breakpoints_sal): Remove reference to base
5864 field.
5865 (delete_breakpoint): Don't manually call breakpoint destructor.
5866 (create_tracepoint_from_upload): Remove reference to base field.
5867 (trace_pass_set_count): Likewise.
5868 (initialize_breakpoint_ops): Don't initialize
5869 momentary_breakpoint_ops, don't set dtors.
5870 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5871 <~ada_catchpoint>: New.
5872 <base>: Remove.
5873 (create_excep_cond_exprs): Remove reference to base field.
5874 (dtor_exception): Change to ...
5875 (ada_catchpoint::~ada_catchpoint): ... this.
5876 (dtor_catch_exception): Remove.
5877 (dtor_catch_exception_unhandled): Remove.
5878 (dtor_catch_assert): Remove.
5879 (create_ada_exception_catchpoint): Remove reference to base
5880 field.
5881 (initialize_ada_catchpoint_ops): Don't set dtors.
5882 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5883 breakpoint.
5884 <~signal_catchpoint>: New.
5885 <base>: Remove.
5886 (signal_catchpoint_dtor): Change to ...
5887 (signal_catchpoint::~signal_catchpoint): ... this.
5888 (create_signal_catchpoint): Remove reference to base field.
5889 (initialize_signal_catchpoint_ops): Don't set dtor.
5890 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5891 from breakpoint.
5892 <~syscall_catchpoint>: New.
5893 <base>: Remove.
5894 (dtor_catch_syscall): Change to ...
5895 (syscall_catchpoint::~syscall_catchpoint): ... this.
5896 (create_syscall_event_catchpoint): Remove reference to base
5897 field.
5898 (initialize_syscall_catchpoint_ops): Don't set dtor.
5899 * break-catch-throw.c (struct exception_catchpoint): Inherit
5900 from breakpoint.
5901 <~exception_catchpoint>: New.
5902 <base>: Remove.
5903 (dtor_exception_catchpoint): Change to ...
5904 (exception_catchpoint::~exception_catchpoint): ... this.
5905 (handle_gnu_v3_exceptions): Remove reference to base field.
5906 (initialize_throw_catchpoint_ops): Don't set dtor.
5907 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5908 field.
5909 * remote.c (remote_get_tracepoint_status): Likewise.
5910 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5911 * tracefile.c (tracefile_fetch_registers): Likewise.
5912 * tracepoint.c (actions_command): Likewise.
5913 (validate_actionline): Likewise.
5914 (tfind_1): Likewise.
5915 (get_traceframe_location): Likewise.
5916 (find_matching_tracepoint_location): Likewise.
5917 (parse_tracepoint_status): Likewise.
5918 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5919
3b0871f4
SM
59202017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5921
5922 * breakpoint.c (struct longjmp_breakpoint): New struct.
5923 (is_tracepoint_type): Change return type to bool.
5924 (is_longjmp_type): New function.
5925 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5926 (set_raw_breakpoint_without_location): Use
5927 new_breakpoint_from_type.
5928 (set_raw_breakpoint): Likewise.
5929
a5e364af
SM
59302017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5931
5932 * breakpoint.c (new_breakpoint_from_type): New function.
5933 (create_breakpoint_sal): Use new_breakpoint_from_type and
5934 unique_ptr.
5935 (create_breakpoint): Likewise.
5936
ae3b3f34
SM
59372017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5938
5939 * memattr.c (mem_info_command): Rename to ...
5940 (info_mem_command): ... this.
5941 (mem_enable_command): Rename to ...
5942 (enable_mem_command): ... this.
5943 (mem_disable_command): Rename to ...
5944 (disable_mem_command): ... this.
5945 (mem_delete_command): Rename to ...
5946 (delete_mem_command): ... this.
5947 (_initialize_mem): Adjust function names.
5948
13ace077
MM
59492017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5950
5951 * btrace.c (handle_pt_insn_events): New.
5952 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5953 STATUS. Split into this and ...
5954 (handle_pt_insn_event_flags): ... this.
5955
c56ccc05
MM
59562017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5957
5958 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5959 and struct pt_insn.resynced.
5960 * configure: Regenerated.
5961 * config.in: Regenerated.
5962
08c3f6d2
TW
59632017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5964
5965 * btrace.c (ftrace_find_call_by_number): New function.
5966 (ftrace_new_function): Store objects, not pointers.
5967 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5968 ftrace_new_gap, ftrace_update_function,
5969 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5970 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5971 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5972 btrace_ends_with_single_insn, btrace_call_get): Account for
5973 btrace_thread_info::functions now storing objects.
5974 * btrace.h (struct btrace_thread_info): Add constructor.
5975 (struct btrace_thread_info) <functions>: Make std::vector.
5976 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5977 Initialize with default values.
5978 * record-btrace.c (record_btrace_frame_sniffer): Account for
5979 btrace_thread_info::functions now storing objects.
5980
8ffd39f2
TW
59812017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5982
5983 * btrace.c: Remove typedef bfun_s.
5984 (ftrace_new_gap): Directly add gaps to the list of gaps.
5985 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5986 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5987 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5988 instead of gdb VEC.
5989
4aeb0dfc
TW
59902017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5991
5992 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5993 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5994 with btrace_thread_info::next_segment and
5995 btrace_thread_info::prev_segment.
5996 * btrace.h: Remove struct btrace_func_link.
5997 (struct btrace_function): Replace pair of function segment pointers
5998 with pair of indices.
5999 * python/py-record-btrace.c (btpy_call_prev_sibling,
6000 btpy_call_next_sibling): Replace references to
6001 btrace_thread_info::segment with btrace_thread_info::next_segment and
6002 btrace_thread_info::prev_segment.
6003 * record-btrace.c (record_btrace_frame_this_id): Use
6004 btrace_find_call_by_number.
6005
eb8f2b9c
TW
60062017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6007
6008 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6009 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6010 btrace_insn_next, btrace_insn_prev): Remove references to
6011 btrace_thread_info::flow.
6012 * btrace.h (struct btrace_function): Remove FLOW.
6013
42bfe59e
TW
60142017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6015
6016 * btrace.c (ftrace_find_call_by_number): New function.
6017 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6018 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6019 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6020 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6021 index.
6022 * btrace.h (struct btrace_function): Turn UP into an index.
6023 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6024 as an index.
6025 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6026 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6027 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6028
b54b03bd
TW
60292017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6030
6031 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6032 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6033 ftrace_update_function, ftrace_compute_global_level_offset,
6034 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6035 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6036 btrace_insn_end, btrace_is_empty): Remove references to
6037 btrace_thread_info::begin and btrace_thread_info::end.
6038 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6039 (struct btrace_thread_info) <functions>: Adjust comment.
6040 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6041 btrace_thread_info::begin.
6042
8286623c
TW
60432017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6044
6045 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6046 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6047 ftrace_update_function): Remove arguments that implicitly were always
6048 BTINFO->END.
6049 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6050 Don't pass BTINFO->END.
6051
a0f1b963
TW
60522017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6053
6054 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6055 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6056 btrace_find_insn_by_number): Replace function segment pointer with
6057 index.
6058 (btrace_insn_cmp): Simplify.
6059 * btrace.h: (struct btrace_insn_iterator) Rename index to
6060 insn_index. Replace function segment pointer with index into function
6061 segment vector.
6062 * record-btrace.c (record_btrace_call_history): Replace function
6063 segment pointer use with index.
6064 (record_btrace_frame_sniffer): Retrieve function call segment through
6065 vector.
6066 (record_btrace_set_replay): Remove defunc't safety check.
6067
f158f208
TW
60682017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6069
6070 * btrace.c (btrace_ends_with_single_insn): New function.
6071 (btrace_call_get, btrace_call_number, btrace_call_begin,
6072 btrace_call_end, btrace_call_next, btrace_call_prev,
6073 btrace_find_call_by_number): Use index into call segment vector
6074 instead of pointer.
6075 (btrace_call_cmp): Simplify.
6076 * btrace.h (struct btrace_call_iterator): Replace function call segment
6077 pointer with index into vector.
6078 * record-btrace.c (record_btrace_call_history): Use index instead of
6079 pointer.
6080
521103fd
TW
60812017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6082
6083 * btrace.c (btrace_insn_begin, btrace_insn_end,
6084 btrace_find_insn_by_number): Add btinfo to iterator.
6085 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6086
17b89b34
TW
60872017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6088
6089 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6090 and save pointers directly.
6091 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6092 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6093 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6094 changed signature of functions.
6095 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6096 (btrace_fetch): Remove code that adds btrace_function pointers to
6097 vector of btrace_functions.
6098 (btrace_clear): Simplify freeing vector of btrace_functions.
6099
2b51eddc
TW
61002017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6101
6102 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6103 Replace VEC_* with std::vector functions.
6104 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6105 (struct btrace_thread_info)<functions>: Change type to std::vector.
6106
db6be0d5
SM
61072017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6108
6109 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6110 "Removed targets and native configurations" up. Merge duplicate
6111 "New commands" sub-sections. Add "New options" sub-sections.
6112
b057297a
AH
61132017-05-26 Alan Hayward <alan.hayward@arm.com>
6114
6115 * defs.h (copy_integer_to_size): New declaration.
6116 * findvar.c (copy_integer_to_size): New function.
6117 (do_cint_test): New selftest function.
6118 (copy_integer_to_size_test): Likewise.
6119 (_initialize_findvar): Likewise.
6120 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6121 (mips_fbsd_collect_reg): Use raw_collect_integer.
6122 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6123 (mips64_fill_gregset): Use raw_collect_integer
6124 (mips64_fill_fpregset): Use raw_supply_integer.
6125 * regcache.c (regcache::raw_supply_integer): New function.
6126 (regcache::raw_collect_integer): Likewise.
6127 * regcache.h: (regcache::raw_supply_integer): New declaration.
6128 (regcache::raw_collect_integer): Likewise.
6129
b77b02a5
YQ
61302017-05-24 Yao Qi <yao.qi@linaro.org>
6131
6132 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6133 (COMMON_OBS): Add gdbarch-selftests.o.
6134 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6135 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6136 * gdbarch-selftests.c: New file.
6137 * regcache.h (regcache) <~regcache>: Mark it virtual if
6138 GDB_SELF_TEST.
6139 <raw_write>: Likewise.
6140
e521e87e
YQ
61412017-05-24 Yao Qi <yao.qi@linaro.org>
6142
6143 * regcache.c (current_regcache): Change it to
6144 regcache::current_regcache.
6145 (regcache_observer_target_changed): Update.
6146 (regcache_thread_ptid_changed): Make it a regcache static
6147 method.
6148 (regcache_thread_ptid_changed): Update.
6149 (class regcache_access): New.
6150 (current_regcache_test): Update.
6151 (_initialize_regcache): Update.
6152 * regcache.h: Include forward_list.
6153 (regcache): Declare regcache_thread_ptid_changed and declare
6154 registers_changed_ptid as friend.
6155
d8e07dda
YQ
61562017-05-24 Yao Qi <yao.qi@linaro.org>
6157
6158 * i387-tdep.c (i387_register_to_value): Use register_size
6159 instead of TYPE_LENGTH.
6160 * m68k-tdep.c (m68k_register_to_value): Likewise.
6161
8c8f9122
YQ
61622017-05-24 Yao Qi <yao.qi@linaro.org>
6163
6164 * i387-tdep.c (i387_convert_register_p): Return false if type
6165 code isn't TYPE_CODE_FLT.
6166
68fce50f
YQ
61672017-05-24 Yao Qi <yao.qi@linaro.org>
6168
6169 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6170 length is 4.
6171 (alpha_register_to_value): Remove type length check.
6172 (alpha_value_to_register): Likewise.
6173
88954b49
YQ
61742017-05-24 Yao Qi <yao.qi@linaro.org>
6175
6176 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6177 TYPE_CODE_FLT.
6178
e3ec9b69
YQ
61792017-05-24 Yao Qi <yao.qi@linaro.org>
6180
6181 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6182 TYPE_CODE_FLT or not.
6183
cdd238da
YQ
61842017-05-24 Yao Qi <yao.qi@linaro.org>
6185
6186 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6187 * avr-tdep.c (avr_gdbarch_init): Likewise.
6188 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6189 * cris-tdep.c (cris_gdbarch_init): Likewise.
6190 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6191 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6192 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6193 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6194 * mep-tdep.c (mep_gdbarch_init): Likewise.
6195 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6196 * mips-tdep.c (mips_gdbarch_init): Likewise.
6197 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6198 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6199 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6200 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6201 * v850-tdep.c (v850_gdbarch_init): Likewise.
6202
7a3929c4
YQ
62032017-05-24 Yao Qi <yao.qi@linaro.org>
6204
6205 * selftest-arch.c (tests_with_arch): Call registers_changed
6206 and reinit_frame_cache.
6207 * selftest.c (run_self_tests): Likewise.
6208
f4985dba
YQ
62092017-05-24 Yao Qi <yao.qi@linaro.org>
6210
6211 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6212 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6213
ab20fa4a
YQ
62142017-05-24 Yao Qi <yao.qi@linaro.org>
6215
6216 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6217 set_gdbarch_print_insn.
6218
f532ab94
YQ
62192017-05-24 Yao Qi <yao.qi@linaro.org>
6220
6221 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6222 set_gdbarch_print_insn.
6223
39503f82
YQ
62242017-05-24 Yao Qi <yao.qi@linaro.org>
6225
6226 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6227 set_gdbarch_print_insn.
6228 * arc-tdep.c (arc_gdbarch_init): Likewise.
6229 * arch-utils.c: include dis-asm.h.
6230 (default_print_insn): New function.
6231 * arch-utils.h (default_print_insn): Declare.
6232 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6233 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6234 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6235 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6236 * frv-tdep.c (frv_gdbarch_init): Likewise.
6237 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6238 * gdbarch.sh (print_insn): Use default_print_insn.
6239 * gdbarch.c: Regenerated.
6240 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6241 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6242 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6243 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6244 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6245 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6246 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6247 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6248 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6249 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6250 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6251 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6252 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6253 * mt-tdep.c (mt_gdbarch_init): Likewise.
6254 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6255 * nios2-tdep.c (nios2_print_insn): Remove.
6256 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6257 * rx-tdep.c (rx_gdbarch_init): Likewise.
6258 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6259 * score-tdep.c (score_print_insn): Remove.
6260 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6261 * sh-tdep.c (sh_gdbarch_init): Likewise.
6262 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6263 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6264 * tic6x-tdep.c (tic6x_print_insn): Remove.
6265 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6266 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6267 * v850-tdep.c (v850_gdbarch_init): Likewise.
6268 * vax-tdep.c (vax_gdbarch_init): Likewise.
6269 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6270 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6271
f7241d4f
JB
62722017-05-23 John Baldwin <jhb@FreeBSD.org>
6273
6274 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6275 (MIPS_FP0_REGNUM): Remove.
6276 (MIPS_FSR_REGNUM): Remove.
6277 (mips_fbsd_supply_fpregs): Use mips_regnum.
6278 (mips_fbsd_supply_gregs): Likewise.
6279 (mips_fbsd_collect_fpregs): Likewise.
6280 (mips_fbsd_collect_gregs): Likewise.
6281
d489d81d
JB
62822017-05-23 John Baldwin <jhb@FreeBSD.org>
6283
6284 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6285 (getpfpregs_supplies): New function.
6286 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6287 getfpregs_supplies.
6288 (mips_fbsd_store_inferior_registers): Likewise.
6289
e11b3cdc
PA
62902017-05-22 Pedro Alves <palves@redhat.com>
6291
6292 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6293 maintainer.
6294
0f068fb5
AH
62952017-05-22 Alan Hayward <alan.hayward@arm.com>
6296
6297 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6298 (store_register): Likewise.
6299 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6300 (get_decimal_float_return_value): Likewise.
6301 (do_ppc_sysv_return_value): Likewise.
6302 (ppc64_sysv_abi_push_integer): Likewise.
6303 (ppc64_sysv_abi_push_freg): Likewise.
6304 (ppc64_sysv_abi_return_value_base): Likewise.
6305 (ppc64_sysv_abi_return_value): Likewise.
6306 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6307 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6308 * rs6000-nat.c: Likewise.
6309 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6310 (rs6000_value_to_register): Likewise.
6311 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6312
e6cf65f2
TT
63132017-05-21 Tom Tromey <tom@tromey.com>
6314
6315 PR rust/21466:
6316 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6317 arrays as "[T]", not "[T; ]".
6318
43cc5389
TT
63192017-05-19 Tom Tromey <tom@tromey.com>
6320
6321 PR rust/21484:
6322 * rust-lang.c (exp_descriptor_rust): New function.
6323 (rust_language_defn): Use it.
6324 * p-lang.c (pascal_language_defn): Update.
6325 * opencl-lang.c (opencl_language_defn): Update.
6326 * objc-lang.c (objc_language_defn): Update.
6327 * m2-lang.c (m2_language_defn): Update.
6328 * language.h (struct language_defn)
6329 <la_watch_location_expression>: New member.
6330 * language.c (unknown_language_defn, auto_language_defn)
6331 (local_language_defn): Update.
6332 * go-lang.c (go_language_defn): Update.
6333 * f-lang.c (f_language_defn): Update.
6334 * d-lang.c (d_language_defn): Update.
6335 * c-lang.h (c_watch_location_expression): Declare.
6336 * c-lang.c (c_watch_location_expression): New function.
6337 (c_language_defn, cplus_language_defn, asm_language_defn)
6338 (minimal_language_defn): Use it.
6339 * breakpoint.c (watch_command_1): Call
6340 la_watch_location_expression.
6341 * ada-lang.c (ada_language_defn): Update.
6342
7a6e7fcc
RO
63432017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6344
6e7e1744
RO
6345 PR tui/21482
6346 * gdb_curses.h (NOMACROS): Define.
6347 (NCURSES_NOMACROS): Define.
6348
63492017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6350
6351 PR tui/21482
7a6e7fcc
RO
6352 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6353 arg to char *.
6354 * tui/tui-wingeneral.c (box_win): Likewise.
6355 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6356 (tui_show_source_line): Likewise.
6357 (tui_show_exec_info_content): Likewise.
6358
1933fd8e
VM
63592017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6360
6361 * sparc-tdep.c (sparc_structure_return_p)
6362 (sparc_arg_on_registers_p): New functions.
6363 (sparc32_store_arguments): Use them.
6364 * sparc64-tdep.c (sparc64_16_byte_align_p)
6365 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6366 Handle TYPE_CODE_ARRAY.
6367
21873064
YQ
63682017-05-17 Yao Qi <yao.qi@linaro.org>
6369
6370 * cli/cli-decode.c (add_alias_cmd): New function.
6371 * command.h (add_alias_cmd): Declare.
6372 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6373 instead call add_alias_cmd.
6374
2b351b19
PA
63752017-05-17 Pedro Alves <palves@redhat.com>
6376
6377 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6378 (nat_makefile_frag): ... this. All references updated.
6379 * configure.ac: Likewise.
6380 * configure.nat: Likewise. Enhance comments.
6381 * configure: Regenerate.
6382
5f2ad7a3
RO
63832017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6384
6385 * procfs.c (procfs_create_inferior): Change prototype to match
6386 definition.
6387
adf3dde5
EZ
63882017-05-13 Eli Zaretskii <eliz@gnu.org>
6389
6390 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6391 C++ compiler warning.
6392
6830f270
TT
63932017-05-12 Tom Tromey <tom@tromey.com>
6394
6395 PR rust/21483:
6396 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6397 recurse, just call value_struct_elt directly.
6398
68f2f2e3
TT
63992017-05-12 Tom Tromey <tom@tromey.com>
6400
6401 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6402 OP_RUST_ARRAY>: Fix.
6403
256afbc2
TT
64042017-05-12 Tom Tromey <tom@tromey.com>
6405
6406 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6407
94bb8dfe
YQ
64082017-05-09 Yao Qi <yao.qi@linaro.org>
6409
6410 * regcache.c: Include <forward_list>.
6411 (struct regcache_list): Remove.
6412 (current_regcache): Update.
6413 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6414 (regcache_thread_ptid_changed): Likewise.
6415 (registers_changed_ptid): Likewise.
6416 (current_regcache_size): Likewise.
6417
8248946c
YQ
64182017-05-09 Yao Qi <yao.qi@linaro.org>
6419
6420 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6421 (current_regcache_size): New function.
6422 (current_regcache_test): New function.
6423 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6424
313c5961
AH
64252017-05-08 Alan Hayward <alan.hayward@arm.com>
6426
6427 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6428 (print_gp_register_row): Use get_frame_register_value.
6429
27bfc1d1
AH
64302017-05-08 Alan Hayward <alan.hayward@arm.com>
6431
6432 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6433 (mips_supply_fpregset): Likewise.
6434 (mips64_supply_gregset): Likewise.
6435
146e6c5c
AH
64362017-05-08 Alan Hayward <alan.hayward@arm.com>
6437
6438 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6439 regcache->raw_supply_zeroed.
6440
e50f25ec
SDJ
64412017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6442
6443 * configure.nat: Rearrange 'case' statements to match
6444 host before cpu.
6445
21ea5acd
SDJ
64462017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6447
6448 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6449 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6450 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6451 "@nat_extra_makefile_frag@".
6452 (Makefile): Remove dependency on "@frags@".
6453 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6454 (data-directory/Makefile): Likewise.
6455 * config/aarch64/linux.mh: Deleted; moved contents to
6456 "gdb/configure.nat".
6457 * config/alpha/alpha-linux.mh: Likewise.
6458 * config/alpha/nbsd.mh: Likewise.
6459 * config/arm/linux.mh: Likewise.
6460 * config/arm/nbsdelf.mh: Likewise.
6461 * config/i386/cygwin.mh: Likewise.
6462 * config/i386/cygwin64.mh: Likewise.
6463 * config/i386/darwin.mh: Likewise.
6464 * config/i386/fbsd.mh: Likewise.
6465 * config/i386/fbsd64.mh: Likewise.
6466 * config/i386/go32.mh: Likewise.
6467 * config/i386/i386gnu.mh: Likewise.
6468 * config/i386/i386sol2.mh: Likewise.
6469 * config/i386/linux.mh: Likewise.
6470 * config/i386/linux64.mh: Likewise.
6471 * config/i386/mingw.mh: Likewise.
6472 * config/i386/mingw64.mh: Likewise.
6473 * config/i386/nbsd64.mh: Likewise.
6474 * config/i386/nbsdelf.mh: Likewise.
6475 * config/i386/nto.mh: Likewise.
6476 * config/i386/obsd.mh: Likewise.
6477 * config/i386/obsd64.mh: Likewise.
6478 * config/i386/sol2-64.mh: Likewise.
6479 * config/ia64/linux.mh: Likewise.
6480 * config/m32r/linux.mh: Likewise.
6481 * config/m68k/linux.mh: Likewise.
6482 * config/m68k/nbsdelf.mh: Likewise.
6483 * config/m68k/obsd.mh: Likewise.
6484 * config/m88k/obsd.mh: Likewise.
6485 * config/mips/fbsd.mh: Likewise.
6486 * config/mips/linux.mh: Likewise.
6487 * config/mips/nbsd.mh: Likewise.
6488 * config/mips/obsd64.mh: Likewise.
6489 * config/pa/linux.mh: Likewise.
6490 * config/pa/nbsd.mh: Likewise.
6491 * config/pa/obsd.mh: Likewise.
6492 * config/powerpc/aix.mh: Likewise.
6493 * config/powerpc/fbsd.mh: Likewise.
6494 * config/powerpc/linux.mh: Likewise.
6495 * config/powerpc/nbsd.mh: Likewise.
6496 * config/powerpc/obsd.mh: Likewise.
6497 * config/powerpc/ppc64-linux.mh: Likewise.
6498 * config/powerpc/spu-linux.mh: Likewise.
6499 * config/s390/linux.mh: Likewise.
6500 * config/sh/nbsd.mh: Likewise.
6501 * config/sparc/fbsd.mh: Likewise.
6502 * config/sparc/linux.mh: Likewise.
6503 * config/sparc/linux64.mh: Likewise.
6504 * config/sparc/nbsd64.mh: Likewise.
6505 * config/sparc/nbsdelf.mh: Likewise.
6506 * config/sparc/obsd64.mh: Likewise.
6507 * config/sparc/sol2.mh: Likewise.
6508 * config/tilegx/linux.mh: Likewise.
6509 * config/vax/nbsdelf.mh: Likewise.
6510 * config/vax/obsd.mh: Likewise.
6511 * config/xtensa/linux.mh: Likewise.
6512 * config/i386/i386gnu.mn: New file, with excerpts from
6513 "config/i386/i386gnu.mh".
6514 * configure: Regenerate.
6515 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6516 *.mh files under "gdb/config".
6517 * configure.nat: New file, with contents from the
6518 "gdb/config/*/*.mh" files.
6519
7ed1acaf
TW
65202017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6521
6522 * btrace.c (btrace_clear): Free insn vector.
6523
e13cb306
PA
65242017-05-05 Pedro Alves <palves@redhat.com>
6525
6526 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6527 * configure: Regenerate.
6528
5ed8105e
PA
65292017-05-04 Pedro Alves <palves@redhat.com>
6530
6531 * Makefile.in (SFILES): Add progspace-and-thread.c.
6532 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6533 (COMMON_OBS): Add progspace-and-thread.o.
6534 * breakpoint.c: Include "progspace-and-thread.h".
6535 (update_inserted_breakpoint_locations)
6536 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6537 Use scoped_restore_current_pspace_and_thread.
6538 (create_std_terminate_master_breakpoint): Use
6539 scoped_restore_current_program_space.
6540 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6541 (print_breakpoint_location): Use
6542 scoped_restore_current_program_space.
6543 (bp_loc_is_permanent): Use
6544 scoped_restore_current_pspace_and_thread.
6545 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6546 (download_tracepoint_locations): Use
6547 scoped_restore_current_pspace_and_thread.
6548 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6549 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6550 (enum step_over_calls_kind): Moved from inferior.h.
6551 (class scoped_restore_current_thread): New class.
6552 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6553 declaration.
6554 (scoped_restore_current_thread): New class.
6555 * infcmd.c: Include "common/gdb_optional.h".
6556 (continue_1, proceed_after_attach): Use
6557 scoped_restore_current_thread.
6558 (notice_new_inferior): Use scoped_restore_current_thread.
6559 * inferior.c: Include "progspace-and-thread.h".
6560 (restore_inferior, save_current_inferior): Delete.
6561 (add_inferior_command, clone_inferior_command): Use
6562 scoped_restore_current_pspace_and_thread.
6563 * inferior.h (scoped_restore_current_inferior): New class.
6564 * infrun.c: Include "progspace-and-thread.h" and
6565 "common/gdb_optional.h".
6566 (follow_fork_inferior): Use
6567 scoped_restore_current_pspace_and_thread.
6568 (scoped_restore_exited_inferior): New class.
6569 (handle_vfork_child_exec_or_exit): Use
6570 scoped_restore_exited_inferior,
6571 scoped_restore_current_pspace_and_thread,
6572 scoped_restore_current_thread and scoped_restore.
6573 (fetch_inferior_event): Use scoped_restore_current_thread.
6574 * linespec.c (decode_line_full, decode_line_1): Use
6575 scoped_restore_current_program_space.
6576 * mi/mi-main.c: Include "progspace-and-thread.h".
6577 (exec_continue): Use scoped_restore_current_thread.
6578 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6579 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6580 * proc-service.c (ps_pglobal_lookup): Use
6581 scoped_restore_current_program_space.
6582 * progspace-and-thread.c: New file.
6583 * progspace-and-thread.h: New file.
6584 * progspace.c (release_program_space, clone_program_space): Use
6585 scoped_restore_current_program_space.
6586 (restore_program_space, save_current_program_space)
6587 (save_current_space_and_thread): Delete.
6588 (switch_to_program_space_and_thread): Moved to
6589 progspace-and-thread.c.
6590 * progspace.h (save_current_program_space)
6591 (save_current_space_and_thread): Delete declarations.
6592 (scoped_restore_current_program_space): New class.
6593 * remote.c (remote_btrace_maybe_reopen): Use
6594 scoped_restore_current_thread.
6595 * symtab.c: Include "progspace-and-thread.h".
6596 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6597 * thread.c (print_thread_info_1): Use
6598 scoped_restore_current_thread.
6599 (struct current_thread_cleanup): Delete.
6600 (do_restore_current_thread_cleanup)
6601 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6602 (scoped_restore_current_thread::~scoped_restore_current_thread):
6603 ... this new dtor.
6604 (make_cleanup_restore_current_thread): Rename/convert to ...
6605 (scoped_restore_current_thread::scoped_restore_current_thread):
6606 ... this new ctor.
6607 (thread_apply_all_command): Use scoped_restore_current_thread.
6608 (thread_apply_command): Use scoped_restore_current_thread.
6609 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6610 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6611
f6223dbb
PA
66122017-05-04 Pedro Alves <palves@redhat.com>
6613
6614 * thread.c (make_cleanup_restore_current_thread): Move
6615 find_thread_ptid call before the is_stopped call. Assert that the
6616 thread is found. Replace is_stopped call by checking the thread's
6617 state directly. Remove unnecessary NULL-thread check.
6618
3c3ae77e
PA
66192017-05-04 Pedro Alves <palves@redhat.com>
6620
6621 * corelow.c (thread_section_name): New class.
6622 (get_core_register_section, get_core_siginfo): Use it.
6623
45eba0ab
AA
66242017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6625
6626 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6627 (get_core_register_section): Remove xfree of NULL pointer.
6628
f81fdd35
AH
66292017-05-03 Alan Hayward <alan.hayward@arm.com>
6630
6631 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6632 * regcache.c (regcache::raw_supply_zeroed): New function.
6633 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6634
35837774
SM
66352017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6636
6637 * gdbarch.sh: Remove commented out definition of
6638 TARGET_CHAR_BIT.
6639 * gdbarch.h: Re-generate.
6640
c94fee56
SDJ
66412017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6642
6643 * configure: Regenerate.
6644
d17f7b36
SM
66452017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6646
6647 * solib-target.c (solib_target_relocate_section_addresses):
6648 Remove num_section_bases, num_bases, segment_bases variables.
6649
b560ebd6
SM
66502017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6651
6652 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6653
f2f46dfc
SM
66542017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6655
6656 * solib-target.c: Include <vector>
6657 (struct lm_info_target) <~lm_info_target>: Remove.
6658 <segment_bases, section_bases>: Change type to
6659 std::vector<CORE_ADDR>.
6660 (library_list_start_segment, library_list_start_section,
6661 library_list_end_library,
6662 solib_target_relocate_section_addresses): Adjust.
6663
a0ff9e1a
SM
66642017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6665
6666 * gdbarch.sh (software_single_step): Change return type to
6667 std::vector<CORE_ADDR>.
6668 * gdbarch.c, gdbarch.h: Re-generate.
6669 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6670 Adjust.
6671 (arm_deal_with_atomic_sequence_raw): Adjust.
6672 (thumb_get_next_pcs_raw): Adjust.
6673 (arm_get_next_pcs_raw): Adjust.
6674 (arm_get_next_pcs): Adjust.
6675 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6676 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6677 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6678 (alpha_software_single_step): Adjust.
6679 * alpha-tdep.h (alpha_software_single_step): Adjust.
6680 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6681 * arm-tdep.c (arm_software_single_step): Adjust.
6682 (arm_breakpoint_kind_from_current_state): Adjust.
6683 * arm-tdep.h (arm_software_single_step): Adjust.
6684 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6685 * cris-tdep.c (cris_software_single_step): Adjust.
6686 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6687 (micromips_deal_with_atomic_sequence): Adjust.
6688 (deal_with_atomic_sequence): Adjust.
6689 (mips_software_single_step): Adjust.
6690 * mips-tdep.h (mips_software_single_step): Adjust.
6691 * moxie-tdep.c (moxie_software_single_step): Adjust.
6692 * nios2-tdep.c (nios2_software_single_step): Adjust.
6693 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6694 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6695 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6696 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6697 * sparc-tdep.c (sparc_software_single_step): Adjust.
6698 * spu-tdep.c (spu_software_single_step): Adjust.
6699 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6700
ea480a30
SM
67012017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6702
6703 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6704 * gdbarch.h: Re-generate.
6705
d050f7d7
TW
67062017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6707
6708 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6709 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6710 * python/py-instruction.c, python/py-instruction.h: New file.
6711 * python/py-record.c: Add py-instruction.h include.
6712 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6713 gdb.RecordInstruction.
6714 * python/python-internal.h: Add gdbpy_initialize_instruction
6715 declaration.
6716 * python/python.c (do_start_initialization): Add
6717 gdbpy_initialize_instruction.
6718
14f819c8
TW
67192017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6720
6721 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6722 Remove.
6723 (btrace_func_from_recpy_func): New function.
6724 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6725 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6726 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6727 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6728 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6729 Also, use new helper functions.
6730 (btpy_list_item): Use new helper functions.
6731 (recpy_bt_function_call_history): Use new type name.
6732 (btpy_call_getset): Remove.
6733 (gdbpy_initialize_btrace): Remove code to initialize
6734 gdb.BtraceFunctionCall.
6735 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6736 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6737 recpy_bt_func_prev, recpy_bt_func_next): New export.
6738 * python/py-record.c (recpy_func_type): New static object.
6739 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6740 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6741 recpy_func_next): New function.
6742 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6743 (recpy_func_getset): New static object.
6744 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6745 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6746
0ed5da75
TW
67472017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6748
6749 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6750 (btpy_object, btpy_insn_type, btpy_new): Remove.
6751 (btpy_list_object): Use gdb.RecordInstruction type instead of
6752 gdb.BtraceInstruction type.
6753 (btrace_insn_from_recpy_insn): New function.
6754 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6755 btpy_new.
6756 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6757 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6758 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6759 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6760 instead of btpy_object.
6761 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6762 btpy_insn_data, btpy_insn_decode): Rename to ...
6763 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6764 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6765 recpy_bt_insn_decode): This. Also, use new helper functions.
6766 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6767 recpy_insn_type.
6768 (btpy_insn_getset): Remove.
6769 (gdbpy_initialize_btrace): Remove code to initialize
6770 gdb.BtraceInstruction. Use recpy_element_object.
6771 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6772 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6773 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6774 * python/py-record.c (recpy_insn_type): New static object.
6775 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6776 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6777 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6778 New function.
6779 (recpy_insn_getset): New static object.
6780 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6781 * python/py-record.h (recpy_element_object): New typedef.
6782 (recpy_insn_type, recpy_insn_new): New export.
6783
913aeadd
TW
67842017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6785
6786 * py-record-btrace.c (btpy_insn_new): Removed.
6787 (btpy_insn_or_gap_new): New function.
6788 (btpy_insn_error): Removed.
6789 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6790 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6791 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6792 btpy_insn_or_gap_new instead of btpy_insn_new.
6793 (btpy_insn_getset): Remove btpy_insn_error.
6794 * py-record.c (recpy_gap_type): New static object.
6795 (recpy_gap_object): New typedef.
6796 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6797 recpy_gap_reason_string): New function.
6798 (recpy_gap_getset): New static object.
6799 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6800 * py-record.h (recpy_gap_new): New export.
6801
a3be24ad
TW
68022017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6803
6804 * python/py-record.c (recpy_ptid): Remove.
6805 (recpy_record_getset): Remove recpy_ptid.
6806
ae20e79a
TW
68072017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6808
6809 * btrace.c (btrace_fetch): Set inferior_ptid.
6810 * python/py-record-btrace.c: Add "py-record.h" include.
6811 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6812 recpy_bt_end, recpy_bt_instruction_history,
6813 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6814 in gdb.Record object instead of current ptid.
6815 * python/py-record.c: Include new "py-record.h" file.
6816 (recpy_record_object): Moved to py-record.h.
6817 * python/py-record.h: New file.
6818
8d0050ea
TW
68192017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6820
6821 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6822 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6823 indentation.
6824
3f380b50
JB
68252017-05-01 Joel Brobecker <brobecker@adacore.com>
6826
6827 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6828 the past maintainers section.
6829
07495424
YQ
68302017-04-28 Yao Qi <yao.qi@linaro.org>
6831
6832 * infcmd.c (get_return_value): Use regcache ctor, and remove
6833 cleanup.
6834
deb1fa3e
YQ
68352017-04-28 Yao Qi <yao.qi@linaro.org>
6836 Pedro Alves <palves@redhat.com>
6837
6838 * regcache.c (regcache::regcache): New tag dispatch ctor.
6839 (do_cooked_read): Moved above.
6840 (regcache_dup): Use the tag dispatch ctor..
6841 * regcache.h (regcache): Declare ctor, delete copy ctor and
6842 assignment operator, remove friend regcache_dup.
6843
b421c83c
YQ
68442017-04-28 Yao Qi <yao.qi@linaro.org>
6845
6846 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6847 call method save instead of regcache_cpy.
6848 * regcache.h (struct regcache): Make regcache_dup a friend.
6849
ef79d9a3
YQ
68502017-04-28 Yao Qi <yao.qi@linaro.org>
6851
6852 * regcache.c (struct regcache): Move to regcache.h
6853 (regcache::arch): New method.
6854 (regcache_get_ptid): Update.
6855 (get_regcache_arch): Call arch method.
6856 (get_regcache_aspace): Call method aspace.
6857 (register_buffer): Change it to method.
6858 (regcache_save): Change it to regcache::save.
6859 (regcache_restore): Likewise.
6860 (regcache_cpy_no_passthrough): Remove the declaration.
6861 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6862 (regcache_cpy_no_passthrough): Change it to method
6863 cpy_no_passthrough.
6864 (regcache_register_status): Change it to method
6865 get_register_status.
6866 (regcache_invalidate): Change it to method invalidate.
6867 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6868 (regcache_raw_update): Change it to method raw_update.
6869 (regcache_raw_read): Likewise.
6870 (regcache_raw_read_signed): Likewise.
6871 (regcache_raw_read_unsigned): Likewise.
6872 (regcache_raw_write_signed): Likewise.
6873 (regcache_raw_write_unsigned): Likewise.
6874 (regcache_cooked_read): Likewise.
6875 (regcache_cooked_read_value): Likewise.
6876 (regcache_cooked_read_signed): Likewise.
6877 (regcache_cooked_read_unsigned): Likewise.
6878 (regcache_cooked_write_signed): Likewise.
6879 (regcache_cooked_write_unsigned): Likewise.
6880 (regcache_raw_set_cached_value): Likewise.
6881 (regcache_raw_write): Likewise.
6882 (regcache_cooked_write): Likewise.
6883 (regcache_xfer_part): Likewise.
6884 (regcache_raw_read_part): Likewise.
6885 (regcache_raw_write_part): Likewise.
6886 (regcache_cooked_read_part): Likewise.
6887 (regcache_cooked_write_part): Likewise.
6888 (regcache_raw_supply): Likewise.
6889 (regcache_raw_collect): Likewise.
6890 (regcache_transfer_regset): Likewise.
6891 (regcache_supply_regset): Likewise.
6892 (regcache_collect_regset): Likewise.
6893 (regcache_debug_print_register): Likewise.
6894 (enum regcache_dump_what): Move it to regcache.h.
6895 (regcache_dump): Change it to method dump.
6896 * regcache.h (enum regcache_dump_what): New.
6897 (class regcache): New.
6898 * target.c (target_fetch_registers): Call method
6899 debug_print_register.
6900 (target_store_registers): Likewise.
6901
f8fdb78e
SM
69022017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6903
6904 * windows-nat.c (struct lm_info_windows): Initialize field.
6905 (windows_make_so): Allocate lm_info_windows with new.
6906 (windows_free_so): Free lm_info_windows with delete.
6907
9ccbfd7b
SM
69082017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6909
6910 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6911 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6912 cleanup.
6913 (darwin_free_so): Free lm_info_darwin with delete.
6914
76e75227
SM
69152017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6916
6917 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6918 <l_addr_p>: Change type to bool.
6919 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6920 (svr4_free_so): Free lm_info_svr4 with delete.
6921 (svr4_copy_library_list): Replace memcpy with call to copy
6922 constructor.
6923 (library_list_start_library, svr4_default_sos): Allocate
6924 lm_info_svr4 with new.
6925
51046d9e
SM
69262017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6927
6928 * solib-target.c (struct lm_info_target): Add destructor,
6929 initialize fields.
6930 <name>: Change type to std::string.
6931 (library_list_start_library): Allocate lm_info_target with new.
6932 (solib_target_free_library_list): Free lm_info_target with
6933 delete.
6934 (solib_target_current_sos): Adapt to std::string.
6935 (solib_target_free_so): Free lm_info_target with delete.
6936
4023ae76
SM
69372017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6938
6939 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6940 fields.
6941 (frv_current_sos): Allocate lm_info_frv with new.
6942 (frv_relocate_main_executable): Free lm_info_frv with delete,
6943 allocate with new.
6944 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6945
af43057b
SM
69462017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6947
6948 * solib-frv.c (struct lm_info_frv): Fix indentation.
6949
b0911207
SM
69502017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6951
6952 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6953 map field.
6954 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6955 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6956 and allocate with new.
6957 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6958
6c401f72
SM
69592017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6960
6961 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6962 <filename, member_name>: Change type to std::string.
6963 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6964 (library_list_start_library): Allocate lm_info_aix with new.
6965 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6966 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6967 with copy constructor.
6968
d0e449a1
SM
69692017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6970
6971 * solist.h (struct lm_info): Remove.
6972 (struct lm_info_base): New class.
6973 (struct so_list) <lm_info>: Change type to lm_info_base *.
6974 * nto-tdep.c (struct lm_info): Remove.
6975 (lm_addr): Adjust.
6976 * solib-aix.c (struct lm_info): Rename to ...
6977 (struct lm_info_aix): ... this. Extend lm_info_base.
6978 (lm_info_p): Rename to ...
6979 (lm_info_aix_p): ... this, and adjust.
6980 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6981 solib_aix_parse_libraries, library_list_start_library,
6982 solib_aix_free_library_list, solib_aix_parse_libraries,
6983 solib_aix_get_library_list,
6984 solib_aix_relocate_section_addresses, solib_aix_free_so,
6985 solib_aix_get_section_offsets,
6986 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6987 Adjust.
6988 (struct solib_aix_inferior_data) <library_list>: Adjust.
6989 * solib-darwin.c (struct lm_info): Rename to ...
6990 (struct lm_info_darwin): ... this. Extend lm_info_base.
6991 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6992 * solib-dsbt.c (struct lm_info): Rename to ...
6993 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6994 (struct dsbt_info) <main_executable_lm_info): Adjust.
6995 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6996 dsbt_relocate_section_addresses): Adjust.
6997 * solib-frv.c (struct lm_info): Rename to ...
6998 (struct lm_info_frv): ... this. Extend lm_info_base.
6999 (main_executable_lm_info): Adjust.
7000 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7001 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7002 find_canonical_descriptor_in_load_object,
7003 frv_fdpic_find_canonical_descriptor): Adjust.
7004 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7005 to lm_info_svr4.
7006 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7007 svr4_clear_so, svr4_copy_library_list,
7008 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7009 svr4_current_sos, svr4_fetch_objfile_link_map,
7010 solist_update_incremental): Adjust.
7011 * solib-svr4.h (struct lm_info_svr4): Move here from
7012 solib-svr4.c.
7013 * solib-target.c (struct lm_info): Rename to ...
7014 (struct lm_info_target): ... this. Extend lm_info_base.
7015 (lm_info_p): Rename to ...
7016 (lm_info_target_p): ... this.
7017 (solib_target_parse_libraries, library_list_start_segment,
7018 library_list_start_section, library_list_start_library,
7019 library_list_end_library, solib_target_free_library_list,
7020 solib_target_current_sos, solib_target_free_so,
7021 solib_target_relocate_section_addresses): Adjust.
7022 * windows-nat.c (struct lm_info): Rename to ...
7023 (struct lm_info_windows): ... this. Extend lm_info_base.
7024 (windows_make_so, handle_load_dll, handle_unload_dll,
7025 windows_xfer_shared_libraries): Adjust.
7026
434a4023
SM
70272017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7028
7029 * solib-darwin.c (struct darwin_so_list): Remove.
7030 (darwin_current_sos): Allocate an so_list object instead of a
7031 darwin_so_list, separately allocate an lm_info object.
7032 (darwin_free_so): Free lm_info.
7033
428544e8
JB
70342017-04-28 John Baldwin <jhb@FreeBSD.org>
7035
7036 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7037 with fprintf_filtered.
7038
4621115f
YQ
70392017-04-28 Yao Qi <yao.qi@linaro.org>
7040
7041 * regcache.c (regcache::regcache): New function.
7042 (regcache::~regcache): New function.
7043 (regcache_xmalloc_1): Remove.
7044 (regcache_xmalloc): Call new regcache.
7045 (regcache_xfree): Call delete regcache.
7046 (get_thread_arch_aspace_regcache): Call new regcache.
7047
339053c2
YQ
70482017-04-28 Yao Qi <yao.qi@linaro.org>
7049
7050 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7051 lwp instead of ptid_get_lwp.
7052
7974a605
YQ
70532017-04-28 Yao Qi <yao.qi@linaro.org>
7054
7055 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7056 lwp_info instead of getting from inferior_ptid.
7057
e15c3eb4
KS
70582017-04-27 Keith Seitz <keiths@redhat.com>
7059
7060 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7061 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7062 (CV_CONVERSION_BADNESS): Define.
7063 (rank_one_type): Remove overly restrictive rvalue reference
7064 rank checks.
7065 Add cv-qualifier checks and subranks for type equality.
7066 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7067 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7068 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7069
72bc1d24
SM
70702017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7071
7072 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7073 count when creating the object.
7074
55bcecda
UW
70752017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7076 Ulrich Weigand <uweigand@de.ibm.com>
7077
7078 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7079 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7080 is used in AIX.
7081 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7082 (process_xcoff_symbol): Likewise.
7083 (scan_xcoff_symtab): Likewise.
7084
5c99fcf8
AH
70852017-04-26 Alan Hayward <alan.hayward@arm.com>
7086
7087 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7088 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7089 (ia64_access_reg): Use get_frame_register_unsigned.
7090 (ia64_access_rse_reg): Likewise.
7091 (ia64_libunwind_frame_prev_register): Likewise.
7092
b41c5a85
JW
70932017-04-26 Jiong Wang <jiong.wang@arm.com>
7094
7095 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7096 * gdbarch.c: Regenerated.
7097 * gdbarch.h: Regenerated.
7098 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7099 visibility external.
7100 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7101 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7102 (enum cfa_how_kind): Move to ...
7103 (struct dwarf2_frame_state_reg_info): Likewise.
7104 (struct dwarf2_frame_state): Likewise.
7105 * dwarf2-frame.h: ... here.
7106 (dwarf2_frame_state_alloc_regs): New declaration.
7107 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7108 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7109
c185f580
AH
71102017-04-26 Alan Hayward <alan.hayward@arm.com>
7111
7112 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7113 regcache_raw_read_unsigned.
7114 (xtensa_pseudo_register_write): Likewise.
7115
19c45594
AH
71162017-04-26 Alan Hayward <alan.hayward@arm.com>
7117
7118 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7119 (nds32_pseudo_register_write): Likewise.
7120
4658f12e
YQ
71212017-04-25 Yao Qi <yao.qi@linaro.org>
7122
7123 * regcache.c (struct regcache) <readonly_p>: Change its type
7124 to bool.
7125 (regcache_xmalloc_1): Update parameter type and callers update.
7126
d581dda8
YQ
71272017-04-25 Yao Qi <yao.qi@linaro.org>
7128
7129 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7130 set_gdbarch_wchar_bit.
7131 * arm-tdep.c (arm_gdbarch_init): Likewise.
7132
debed3db
PA
71332017-04-25 Pedro Alves <palves@redhat.com>
7134
7135 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7136 (BothAreRelocatable, memcopy, memmove): Don't define.
7137 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7138 macros.
7139
b0b92aeb
PA
71402017-04-25 Pedro Alves <palves@redhat.com>
7141
7142 * common/common-defs.h: Include "common/poison.h".
7143 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7144 and adjust.
7145 * common/poison.h: New file.
7146 * common/traits.h: Include <type_traits>.
7147 (Not, Or, Requires): New, moved from common/function-view.h.
7148
16c4d54a
PA
71492017-04-25 Pedro Alves <palves@redhat.com>
7150
7151 * breakpoint.h (struct breakpoint): In-class initialize all
7152 fields. Make boolean fields "bool".
7153 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7154 memset call and initializations no longer necessary.
7155
b5c36682
PA
71562017-04-25 Pedro Alves <palves@redhat.com>
7157
7158 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7159 reference.
7160 (pt_btrace_insn): New function.
7161 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7162
5625a286
PA
71632017-04-25 Pedro Alves <palves@redhat.com>
7164
7165 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7166 "base" field and inherit from "bp_location" instead. Add
7167 non-default ctor.
7168 (allocate_location_exception): Use new non-default ctor.
7169 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7170 (init_bp_location): Convert to ...
7171 (bp_location::bp_location): ... this new ctor, and remove memset
7172 call.
7173 (base_breakpoint_allocate_location): Use the new non-default ctor.
7174 * breakpoint.h (bp_location): Now a class. Declare default and
7175 non-default ctors. In-class initialize all members.
7176 (init_bp_location): Remove declaration.
7177
23bcc18f
PA
71782017-04-25 Pedro Alves <palves@redhat.com>
7179
7180 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7181 assignment operator.
7182
e1ba3053
YQ
71832017-04-24 Yao Qi <yao.qi@linaro.org>
7184
7185 * doublest.c (convert_doublest_to_floatformat): Call
7186 floatformat_totalsize_bytes.
7187
10f489e5
TT
71882017-04-22 Tom Tromey <tom@tromey.com>
7189
7190 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7191 ui_out_emit_list.
7192 * stack.c (print_frame): Use ui_out_emit_list.
7193 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7194 ui_out_emit_list.
7195 * mi/mi-main.c (print_one_inferior)
7196 (mi_cmd_data_list_register_names)
7197 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7198 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7199 ui_out_emit_list.
7200 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7201 (mi_output_solib_attribs): Use ui_out_emit_list,
7202 ui_out_emit_tuple.
7203 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7204 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7205 (mi_cmd_stack_list_args, list_args_or_locals): Use
7206 ui_out_emit_list.
7207 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7208 * breakpoint.c (print_solib_event, output_thread_groups): Use
7209 ui_out_emit_list.
7210
0092b74d
TT
72112017-04-22 Tom Tromey <tom@tromey.com>
7212
7213 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7214 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7215 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7216
a14a62dd
TT
72172017-04-22 Tom Tromey <tom@tromey.com>
7218
7219 * tracepoint.c (tvariables_info_1)
7220 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7221
46b9c129
TT
72222017-04-22 Tom Tromey <tom@tromey.com>
7223
7224 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7225 annotate_arg_emitter.
7226 * breakpoint.c (print_mention_watchpoint)
7227 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7228 * annotate.h (struct annotate_arg_emitter): New.
7229
2e783024
TT
72302017-04-22 Tom Tromey <tom@tromey.com>
7231
7232 * record-btrace.c (record_btrace_insn_history)
7233 (record_btrace_insn_history_range, record_btrace_call_history)
7234 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7235 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7236 ui_out_emit_tuple.
7237 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7238 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7239 * skip.c (skip_info): Use ui_out_emit_tuple.
7240 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7241 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7242 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7243 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7244 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7245 ui_out_emit_tuple.
7246 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7247 (output_register, mi_cmd_data_read_memory)
7248 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7249 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7250 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7251 Use ui_out_emit_tuple.
7252 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7253 ui_out_emit_tuple.
7254 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7255 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7256 * linux-thread-db.c (info_auto_load_libthread_db): Use
7257 ui_out_emit_tuple.
7258 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7259 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7260 * disasm.c (do_mixed_source_and_assembly_deprecated)
7261 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7262 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7263 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7264 * breakpoint.c (print_one_breakpoint_location)
7265 (print_one_breakpoint): Use ui_out_emit_tuple.
7266 * auto-load.c (print_script, info_auto_load_cmd): Use
7267 ui_out_emit_tuple.
7268 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7269
9be21bb4
SM
72702017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7271
7272 * thread.c (print_thread_info_1): Remove dead code.
7273
0d4c07af
JK
72742017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7275
7276 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7277 GDB_SELF_TEST.
7278 * arm-tdep.c (selftests::arm_record_test): Likewise.
7279
4daf993d
YQ
72802017-04-21 Yao Qi <yao.qi@linaro.org>
7281
7282 * regcache.c (regcache_restore): Remove argument 2. Replace
7283 argument 3 with regcache. Get register status from
7284 src->register_status and get register contents from
7285 register_buffer (src, regnum).
7286 (regcache_cpy): Update.
7287
a6c21d4a
PA
72882017-04-19 Pedro Alves <palves@redhat.com>
7289
7290 * gdbthread.h (thread): Add missing closing parenthesis in
7291 comment.
7292
3a3fd0fd
PA
72932017-04-19 Pedro Alves <palves@redhat.com>
7294
7295 * common/refcounted-object.h: New file.
7296 * gdbthread.h: Include "common/refcounted-object.h".
7297 (thread_info): Inherit from refcounted_object and add comments.
7298 (thread_info::incref, thread_info::decref)
7299 (thread_info::m_refcount): Delete.
7300 (thread_info::deletable): Use the refcounted_object::refcount()
7301 method.
7302 * inferior.c (current_inferior_): Add comment.
7303 (set_current_inferior): Increment/decrement refcounts.
7304 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7305 not-deletable instead of comparing with the current inferior.
7306 (initialize_inferiors): Increment the initial inferior's refcount.
7307 * inferior.h (struct inferior): Forward declare.
7308 Include "common/refcounted-object.h".
7309 (current_inferior, set_current_inferior): Move declaration to
7310 before struct inferior's definition, and fix comment.
7311 (inferior): Inherit from refcounted_object. Add comments.
7312 * thread.c (switch_to_thread_no_regs): Reference the thread's
7313 inferior pointer directly instead of doing a ptid lookup.
7314 (switch_to_no_thread): New function.
7315 (switch_to_thread(thread_info *)): New function, factored out
7316 from ...
7317 (switch_to_thread(ptid_t)): ... this.
7318 (restore_current_thread): Delete.
7319 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7320 fields, and add 'inf' field.
7321 (do_restore_current_thread_cleanup): Check whether old->inf is
7322 alive instead of looking up an inferior by ptid. Use
7323 switch_to_thread and switch_to_no_thread.
7324 (restore_current_thread_cleanup_dtor): Use old->inf directly
7325 instead of lookup up an inferior by id. Decref the inferior.
7326 Don't restore 'removable'.
7327 (make_cleanup_restore_current_thread): Same the inferior pointer
7328 in old, instead of the inferior number. Incref the inferior.
7329 Don't save/clear 'removable'.
7330
9bcb1f16
PA
73312017-04-19 Pedro Alves <palves@redhat.com>
7332
7333 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7334 unittests/scoped_restore-selftests.c.
7335 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7336 * common/scoped_restore.h (scoped_restore_base): Make "class".
7337 (scoped_restore_base::release): New public method.
7338 (scoped_restore_base::scoped_restore_base): New protected ctor.
7339 (scoped_restore_base::m_saved_var): New protected field.
7340 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7341 scoped_restore_base base class instead of m_saved_var directly.
7342 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7343 (scoped_restore_tmpl::scoped_restore_tmpl(const
7344 scoped_restore_tmpl<T>&)): Likewise.
7345 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7346 method.
7347 (scoped_restore_tmpl::saved_var): New method.
7348 (scoped_restore_tmpl::m_saved_var): Delete.
7349 * inferior.h (inferior::detaching): Now a bool.
7350 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7351 cleanup.
7352 * unittests/scoped_restore-selftests.c: New file.
7353
26fcd539
PA
73542017-04-19 Pedro Alves <palves@redhat.com>
7355
7356 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7357 Re-sort in alphabetic order.
7358
fdd243b0
PA
73592017-04-18 Pedro Alves <palves@redhat.com>
7360
7361 * xml-support.c (obstack_xml_printf): Delete.
7362 * xml-support.h (obstack_xml_printf): Delete.
7363
4895cde2
PA
73642017-04-18 Pedro Alves <palves@redhat.com>
7365
7366 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7367 vdebug, verror, body_text, start_element, end_element, name,
7368 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7369 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7370 is_xinclude>: Make private and add m_ prefix.
7371 (gdb_xml_parser::body_text): New method, based on ...
7372 (gdb_xml_body_text): ... this. Adjust.
7373 (gdb_xml_parser::vdebug): New method, based on ...
7374 (gdb_xml_debug): ... this. Adjust.
7375 (gdb_xml_parser::verror): New method, based on ...
7376 (gdb_xml_error): ... this. Adjust.
7377 (gdb_xml_parser::start_element): New method, based on ...
7378 (gdb_xml_start_element): ... this. Adjust.
7379 (gdb_xml_start_element_wrapper): Defer to
7380 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7381 (gdb_xml_parser::end_element): New method, based on ...
7382 (gdb_xml_end_element_wrapper): ... this. Adjust.
7383 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7384 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7385 (gdb_xml_parser::use_dtd): New method, based on ...
7386 (gdb_xml_use_dtd): ... this. Adjust.
7387 (gdb_xml_parser::parse): New method, based on ...
7388 (gdb_xml_parse): ... this. Adjust.
7389 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7390 (xinclude_start_include): Adjust to call the parser's name method.
7391 (xml_xinclude_default, xml_xinclude_start_doctype)
7392 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7393 method.
7394 (xml_process_xincludes): Adjust to call parser methods.
7395 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7396 declarations.
7397
bd8a901f
PA
73982017-04-18 Pedro Alves <palves@redhat.com>
7399
7400 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7401 gdb::optional<std::string>.
7402 * xml-support.c: Include <string>.
7403 (scope_level::scope_level(scope_level &&))
7404 (scope_level::~scope_level): Delete.
7405 (scope_level::body): Now a std::string.
7406 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7407 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7408 parameter.
7409 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7410 (xinclude_parsing_data::output): Now a std::string reference.
7411 (xinclude_start_include): Adjust.
7412 (xml_xinclude_default): Adjust.
7413 (xml_process_xincludes): Add 'output' parameter, and return bool.
7414 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7415 and return bool.
7416 * xml-tdesc.c: Include <unordered_map> and <string>.
7417 (tdesc_xml_cache): Delete.
7418 (tdesc_xml_cache_s): Delete.
7419 (xml_cache): Now an std::unordered_map.
7420 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7421 (target_fetch_description_xml): Change return type to
7422 gdb::optional<std::string>, and adjust.
7423 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7424 (target_fetch_description_xml): Change return type to
7425 gdb::optional<std::string>.
7426
d35d1958
PA
74272017-04-18 Pedro Alves <palves@redhat.com>
7428
7429 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7430 unittests/optional-selftests.c.
7431 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7432 * unittests/optional-selftests.c: New file.
7433 * unittests/optional/assignment/1.cc: New file.
7434 * unittests/optional/assignment/2.cc: New file.
7435 * unittests/optional/assignment/3.cc: New file.
7436 * unittests/optional/assignment/4.cc: New file.
7437 * unittests/optional/assignment/5.cc: New file.
7438 * unittests/optional/assignment/6.cc: New file.
7439 * unittests/optional/assignment/7.cc: New file.
7440 * unittests/optional/cons/copy.cc: New file.
7441 * unittests/optional/cons/default.cc: New file.
7442 * unittests/optional/cons/move.cc: New file.
7443 * unittests/optional/cons/value.cc: New file.
7444 * unittests/optional/in_place.cc: New file.
7445 * unittests/optional/observers/1.cc: New file.
7446 * unittests/optional/observers/2.cc: New file.
7447
22796e97
PA
74482017-04-18 Pedro Alves <palves@redhat.com>
7449
7450 * common/gdb_optional.h: Include common/traits.h.
7451 (in_place_t): New type.
7452 (in_place): New constexpr variable.
7453 (optional::optional): Remove member initialization of
7454 m_instantiated.
7455 (optional::optional(in_place_t...)): New constructor.
7456 (optional::~optional): Use reset.
7457 (optional::optional(const optional&)): New.
7458 (optional::optional(const optional&&)): New.
7459 (optional::optional(T &)): New.
7460 (optional::optional(T &&)): New.
7461 (operator::operator=(const optional &)): New.
7462 (operator::operator=(optional &&)): New.
7463 (operator::operator= (const T &))
7464 (operator::operator= (T &&))
7465 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7466 (operator::reset): New.
7467 (operator::m_instantiated):: Add in-class initializer.
7468 * common/traits.h: Include <type_traits>.
7469 (struct And): New types.
7470
a7fc9b61
PA
74712017-04-18 Pedro Alves <palves@redhat.com>
7472
7473 * xml-support.c: Include <vector>.
7474 (scope_level::scope_level(const gdb_xml_element *))
7475 (scope_level::scope_level(scope_level&&)): New.
7476 (scope_level::~scope_level): New.
7477 (scope_level_s): Delete.
7478 (gdb_xml_parser::scopes): Now a std::vector.
7479 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7480 Use std::vector.
7481 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7482 scope cleanup code.
7483 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7484 of the scopes member. Use std::vector::emplace_back.
7485
010151c9
PA
74862017-04-18 Pedro Alves <palves@redhat.com>
7487
7488 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7489 a bool.
7490 (gdb_xml_end_element): Change type of first parameter.
7491 (gdb_xml_cleanup): Rename to ...
7492 (gdb_xml_parser::~gdb_xml_parser): ... this.
7493 (gdb_xml_create_parser_and_cleanup): Delete with ...
7494 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7495 to this new ctor.
7496 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7497 using gdb_xml_create_parser_and_cleanup.
7498 (xinclude_parsing_data): Add ctor/dtor.
7499 (xml_xinclude_cleanup): Delete.
7500 (xml_process_xincludes): Create a local xinclude_parsing_data
7501 instead of heap-allocating one. Create a local gdb_xml_parser
7502 instead of heap-allocating one with
7503 gdb_xml_create_parser_and_cleanup.
7504
d56060f0
JB
75052017-04-18 John Baldwin <jhb@FreeBSD.org>
7506
7507 PR threads/20743
7508 * fbsd-nat.c (resume_one_thread_cb): Remove.
7509 (resume_all_threads_cb): Remove.
7510 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7511 iterate_over_threads.
7512
305d16a9
JB
75132017-04-17 Joel Brobecker <brobecker@adacore.com>
7514
7515 * NEWS: Create a new section for the next release branch.
7516 Rename the section of the current branch, now that it has
7517 been cut.
7518
8bb57231
JB
75192017-04-17 Joel Brobecker <brobecker@adacore.com>
7520
7521 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7522 * version.in: Bump version to 8.0.50.DATE-git.
7523
096c92dd
SDJ
75242017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7525
7526 PR gdb/21385
7527 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7528 independently of the host, and fix build breakage on Cygwin.
7529
0550c955
PA
75302017-04-13 Pedro Alves <palves@redhat.com>
7531
7532 * inferior.c (free_inferior): Convert to ...
7533 (inferior::~inferior): ... this dtor.
7534 (inferior::inferior): New ctor, factored out from ...
7535 (add_inferior_silent): ... here. Allocate the inferior with a new
7536 expression.
7537 (delete_inferior): Call delete instead of free_inferior.
7538 * inferior.h (gdb_environ, continuation): Forward declare.
7539 (inferior): Now a class. Add in-class initialization to all
7540 members. Make boolean fields bool, except 'detaching'.
7541 (inferior::inferior): New explicit ctor.
7542 (inferior::~inferior): New.
7543
e3d60dfc
PA
75442017-04-13 Pedro Alves <palves@redhat.com>
7545
7546 * inferior.c (init_inferior_list): Delete.
7547 * inferior.h (init_inferior_list): Delete.
7548
5fd69d0a
PA
75492017-04-13 Pedro Alves <palves@redhat.com>
7550
7551 PR threads/13217
7552 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7553 (top level): Call it twice, with different thread sets.
7554
c6609450
PA
75552017-04-13 Pedro Alves <palves@redhat.com>
7556
7557 * thread.c: Include <algorithm>.
7558 (thread_array_cleanup): Delete.
7559 (scoped_inc_dec_ref): New class.
7560 (live_threads_count): New function.
7561 (set_thread_refcount): Delete.
7562 (tp_array_compar_ascending): Now a bool.
7563 (tp_array_compar): Convert to a std::sort comparison function.
7564 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7565 and live_threads_count.
7566
2a00d7ce
PA
75672017-04-13 Pedro Alves <palves@redhat.com>
7568
7569 * infrun.c (follow_fork_inferior): Also switch the current
7570 inferior.
7571
441d7c93
PA
75722017-04-13 Pedro Alves <palves@redhat.com>
7573
7574 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7575 before calling create_internal_breakpoint.
7576
808480f6
PA
75772017-04-13 Pedro Alves <palves@redhat.com>
7578
7579 * fork-child.c (execv_argv): New class.
7580 (breakup_args): Refactored as ...
7581 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7582 Copy arguments to storage and replace separators with NULL
7583 terminators in place.
7584 (escape_bang_in_quoted_argument): Adjust to return bool.
7585 (execv_argv::execv_argv): New ctor.
7586 (execv_argv::init_for_shell): New method, factored out from
7587 fork_inferior. Don't strdup strings into the vector.
7588 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7589 Remove free_vector_argv call.
7590
ad3d022a
YQ
75912017-04-13 Yao Qi <yao.qi@linaro.org>
7592
7593 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7594 tdep->rx_psw_type.
7595
e6ddc3bf
YQ
75962017-04-13 Yao Qi <yao.qi@linaro.org>
7597
7598 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7599 * rx-tdep.c (rx_gdbarch_init): Likewise.
7600
bfb8cf90
PA
76012017-04-13 Pedro Alves <palves@redhat.com>
7602
7603 * breakpoint.h (struct breakpoint): Reindent.
7604
f5336ca5
PA
76052017-04-13 Pedro Alves <palves@redhat.com>
7606
7607 * breakpoint.c (bp_location): Rename to ...
7608 (bp_locations): ... this. All references updated.
7609 (bp_location_count): Rename to ...
7610 (bp_locations_count): ... this. All references updated.
7611 (bp_location_placed_address_before_address_max): Rename to ...
7612 (bp_locations_placed_address_before_address_max): ... this. All
7613 references updated.
7614 (bp_location_shadow_len_after_address_max): Rename to ...
7615 (bp_locations_shadow_len_after_address_max): ... this. All
7616 references updated.
7617 (bp_location_compare_addrs): Rename to ...
7618 (bp_locations_compare_addrs): ... this. All references updated.
7619 (bp_location_compare):Rename to ...
7620 (bp_locations_compare): ... this. All references updated.
7621 (bp_location_target_extensions_update): Rename to ...
7622 (bp_locations_target_extensions_update): ... this. All references
7623 updated.
7624
be628ab8
SDJ
76252017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7626
7627 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7628 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7629 'sgtty.h'.
7630 * common/gdb_termios.h: New file, with parts of "terminal.h".
7631 * inflow.c: Include "gdb_termios.h".
7632 * ser-unix.c: Include "gdb_termios.h".
7633 * terminal.h: Move terminal-related defines to
7634 "common/gdb_termios.h".
7635
8e9e35b1
TT
76362017-04-12 Tom Tromey <tom@tromey.com>
7637
7638 * probe.c (parse_probes): Update.
7639 * location.h (delete_event_location): Don't declare.
7640 (event_location_deleter::operator()): Update.
7641 * location.c (event_location_deleter::operator()): Rename from
7642 delete_event_location.
7643 * linespec.h (linespec_result) <location>: Change type to
7644 event_location_up.
7645 * linespec.c (canonicalize_linespec, event_location_to_sals)
7646 (decode_objc): Update.
7647 (linespec_result): Don't call delete_event_location.
7648 * breakpoint.c (create_breakpoints_sal)
7649 (bkpt_probe_create_sals_from_location)
7650 (strace_marker_create_sals_from_location): Update.
7651
16e802b9
TT
76522017-04-12 Tom Tromey <tom@tromey.com>
7653
7654 * linespec.h (struct linespec_result): Add constructor and
7655 destructor.
7656 (init_linespec_result, destroy_linespec_result)
7657 (make_cleanup_destroy_linespec_result): Don't declare.
7658 * linespec.c (init_linespec_result): Remove.
7659 (linespec_result::~linespec_result): Rename from
7660 destroy_linespec_result. Update.
7661 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7662 Remove.
7663 * breakpoint.c (create_breakpoint, break_range_command)
7664 (decode_location_default): Update.
7665 * ax-gdb.c (agent_command_1): Update.
7666
d28cd78a
TT
76672017-04-12 Tom Tromey <tom@tromey.com>
7668
7669 * remote.c (remote_download_tracepoint): Update.
7670 * python/py-breakpoint.c (bppy_get_location): Update.
7671 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7672 (gdbscm_breakpoint_location): Update.
7673 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7674 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7675 Change type to event_location_up.
7676 * breakpoint.c (create_overlay_event_breakpoint)
7677 (create_longjmp_master_breakpoint)
7678 (create_std_terminate_master_breakpoint)
7679 (create_exception_master_breakpoint)
7680 (breakpoint_event_location_empty_p, print_breakpoint_location)
7681 (print_one_breakpoint_location, create_thread_event_breakpoint)
7682 (init_breakpoint_sal, create_breakpoint)
7683 (print_recreate_ranged_breakpoint, break_range_command)
7684 (init_ada_exception_breakpoint, say_where): Update.
7685 (base_breakpoint_dtor): Don't call delete_event_location.
7686 (bkpt_print_recreate, tracepoint_print_recreate)
7687 (dprintf_print_recreate, update_static_tracepoint)
7688 (breakpoint_re_set_default): Update.
7689
711799d5
TT
76902017-04-12 Tom Tromey <tom@tromey.com>
7691
7692 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7693 type of "to_do". Update.
7694 (compute_stack_depth): Use std::vector.
7695
52d214d3
TT
76962017-04-12 Tom Tromey <tom@tromey.com>
7697
7698 * printcmd.c (find_instruction_backward): Use std::vector.
7699
4c404b8b
TT
77002017-04-12 Tom Tromey <tom@tromey.com>
7701
7702 * symfile.c (objfilep): Remove typedef.
7703 (reread_symbols): Use a std::vector.
7704
156d9eab
TT
77052017-04-12 Tom Tromey <tom@tromey.com>
7706
7707 * mi/mi-main.c (exec_direction_forward): Remove.
7708 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7709 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7710 scoped_restore.
7711 * guile/guile.c (guile_repl_command, guile_command)
7712 (gdbscm_execute_gdb_command): Use scoped_restore.
7713 * go-exp.y (go_parse): Use scoped_restore.
7714 * d-exp.y (d_parse): Use scoped_restore.
7715 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7716 * c-exp.y (c_parse): Use scoped_restore.
7717
4d89769a
TT
77182017-04-12 Tom Tromey <tom@tromey.com>
7719
7720 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7721 (mi_parse): Update return type.
7722 (mi_parse_free): Remove.
7723 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7724 (mi_parse::~mi_parse): Rename from mi_parse_free.
7725 (mi_parse_cleanup): Remove.
7726 (mi_parse): Return a unique_ptr. Use new.
7727 * mi/mi-main.c (mi_execute_command): Update.
7728
4b217cc7
TT
77292017-04-12 Tom Tromey <tom@tromey.com>
7730
7731 * location.c (explicit_location_lex_one): Return a
7732 unique_xmalloc_ptr.
7733 (string_to_explicit_location): Update. Remove cleanups.
7734
59d3651b
TT
77352017-04-12 Tom Tromey <tom@tromey.com>
7736
7737 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7738 (compare_value_and_voffset): Change type. Update.
7739 (compute_vtable_size): Change type of "offset_vec".
7740 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7741 (gnuv3_get_typeid): Remove extraneous declaration.
7742
b24b0d6c
TT
77432017-04-12 Tom Tromey <tom@tromey.com>
7744
7745 * charset.h (wchar_iterator): Fix comment.
7746
80a3b8c5
TT
77472017-04-12 Tom Tromey <tom@tromey.com>
7748
7749 * charset.c (iconv_wrapper): New class.
7750 (cleanup_iconv): Remove.
7751 (convert_between_encodings): Use it.
7752
c83dd867
TT
77532017-04-12 Tom Tromey <tom@tromey.com>
7754
7755 * symfile.h (increment_reading_symtab): Update type.
7756 * symfile.c (decrement_reading_symtab): Remove.
7757 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7758 * psymtab.c (psymtab_to_symtab): Update.
7759 * dwarf2read.c (dw2_instantiate_symtab): Update.
7760
0e8621a0
TT
77612017-04-12 Tom Tromey <tom@tromey.com>
7762
7763 * jit.c (struct jit_reader): Declare separately. Add constructor
7764 and destructor. Change type of "handle".
7765 (loaded_jit_reader): Define separately.
7766 (jit_reader_load): Update. New "new".
7767 (jit_reader_unload_command): Use "delete".
7768 * gdb-dlfcn.h (struct dlclose_deleter): New.
7769 (gdb_dlhandle_up): New typedef.
7770 (gdb_dlopen, gdb_dlsym): Update types.
7771 (gdb_dlclose): Remove.
7772 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7773 (gdb_dlsym): Change type of "handle".
7774 (make_cleanup_dlclose): Remove.
7775 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7776 * compile/compile-c-support.c (load_libcc): Update.
7777
67d89901
TT
77782017-04-12 Tom Tromey <tom@tromey.com>
7779
7780 * symtab.h (find_pcs_for_symtab_line): Change return type.
7781 * symtab.c (find_pcs_for_symtab_line): Change return type.
7782 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7783 type of "vec". Update.
7784 (ltpy_get_pcs_for_line): Update.
7785 * linespec.c (decode_digits_ordinary): Update.
7786
93921405
TT
77872017-04-12 Tom Tromey <tom@tromey.com>
7788
7789 * tracepoint.c (actions_command): Update.
7790 * python/python.c (python_command, python_interactive_command):
7791 Update.
7792 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7793 * guile/guile.c (guile_command): Update.
7794 * defs.h (read_command_lines, read_command_lines_1): Return
7795 command_line_up.
7796 (command_lines_deleter): New struct.
7797 (command_line_up): New typedef.
7798 * compile/compile.c (compile_code_command)
7799 (compile_print_command): Update.
7800 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7801 command_line_up.
7802 (make_cleanup_free_command_lines): Remove.
7803 * cli/cli-script.c (get_command_line, read_command_lines_1)
7804 (copy_command_lines): Return command_line_up.
7805 (while_command, if_command, read_command_lines, define_command)
7806 (document_command): Update.
7807 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7808 Remove.
7809 * breakpoint.h (breakpoint_set_commands): Change type of
7810 "commands".
7811 * breakpoint.c (breakpoint_set_commands): Change type of
7812 "commands". Update.
7813 (do_map_commands_command, update_dprintf_command_list)
7814 (create_tracepoint_from_upload): Update.
7815
ffc2605c
TT
78162017-04-12 Tom Tromey <tom@tromey.com>
7817
7818 * tracepoint.c (scope_info): Update.
7819 * spu-tdep.c (spu_catch_start): Update.
7820 * python/python.c (gdbpy_decode_line): Update.
7821 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7822 * python/py-breakpoint.c (bppy_init): Update.
7823 * probe.c (parse_probes): Update.
7824 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7825 * location.h (event_location_deleter): New struct.
7826 (event_location_up): New typedef.
7827 (new_linespec_location, new_address_location, new_probe_location)
7828 (new_explicit_location, copy_event_location)
7829 (string_to_event_location, string_to_event_location_basic)
7830 (string_to_explicit_location): Update return type.
7831 (make_cleanup_delete_event_location): Remove.
7832 * location.c (new_linespec_location, new_address_location)
7833 (new_probe_location, new_explicit_location, copy_event_location):
7834 Return event_location_up.
7835 (delete_event_location_cleanup)
7836 (make_cleanup_delete_event_location): Remove.
7837 (string_to_explicit_location, string_to_event_location_basic)
7838 (string_to_event_location): Return event_location_up.
7839 * linespec.c (canonicalize_linespec, event_location_to_sals)
7840 (decode_line_with_current_source)
7841 (decode_line_with_last_displayed, decode_objc): Update.
7842 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7843 * completer.c (location_completer): Update.
7844 * cli/cli-cmds.c (edit_command, list_command): Update.
7845 * breakpoint.c (create_overlay_event_breakpoint)
7846 (create_longjmp_master_breakpoint)
7847 (create_std_terminate_master_breakpoint)
7848 (create_exception_master_breakpoint)
7849 (create_thread_event_breakpoint): Update.
7850 (init_breakpoint_sal): Update. Remove some dead code.
7851 (create_breakpoint_sal): Change type of "location". Update.
7852 (create_breakpoints_sal, create_breakpoint, break_command_1)
7853 (dprintf_command, break_range_command, until_break_command)
7854 (init_ada_exception_breakpoint)
7855 (strace_marker_create_sals_from_location)
7856 (update_static_tracepoint, trace_command, ftrace_command)
7857 (strace_command, create_tracepoint_from_upload): Update.
7858 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7859 * ax-gdb.c (agent_command_1): Update.
7860
8f10c932
PA
78612017-04-12 Pedro Alves <palves@redhat.com>
7862
7863 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7864 * configure.tgt: Handle i[34567]86-*-go32* and
7865 i[34567]86-*-msdosdjgpp*.
7866 * i386-tdep.c (i386_svr4_reg_to_regnum):
7867 Make extern.
7868 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7869 i386-go32-tdep.c.
7870 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7871 * i386-go32-tdep.c: New file.
7872 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7873 declarations.
7874
0a31ccfb
SM
78752017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7876
7877 * aix-thread.c (pd_status2str): Change return type to const char *.
7878
e9bb3fbb
PA
78792017-04-12 Pedro Alves <palves@redhat.com>
7880
7881 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7882 calls to set_gdbarch_gnu_triplet_regexp.
7883
53375380
PA
78842017-04-12 Pedro Alves <palves@redhat.com>
7885
7886 PR gdb/21323
7887 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7888 New enum value.
7889 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7890 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7891 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7892 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7893 * gdbarch.h, gdbarch.c: Regenerate.
7894 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7895 gdbarch_wchar_bit and gdbarch_wchar_signed.
7896 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7897 * arm-tdep.c (arm_gdbarch_init): Likewise.
7898 * avr-tdep.c (avr_gdbarch_init): Likewise.
7899 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7900 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7901 * i386-tdep.c (i386_go32_init_abi): Likewise.
7902 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7903 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7904 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7905 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7906 * sh-tdep.c (sh_gdbarch_init): Likewise.
7907 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7908 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7909 * windows-tdep.c (windows_init_abi): Likewise.
7910 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7911
53e710ac
PA
79122017-04-12 Pedro Alves <palves@redhat.com>
7913
7914 PR c++/21323
7915 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7916 cplus_primitive_type_char32_t>: New enum values.
7917 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7918 and cplus_primitive_type_char32_t.
7919 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7920 32, use the archtecture's built-in type for char16_t and char32_t,
7921 respectively. Otherwise, fallback to init_integer_type as before,
7922 but make the type unsigned, and issue a complaint.
7923 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7924
ab0538b8
AH
79252017-04-12 Alan Hayward <alan.hayward@arm.com>
7926
5e0e0422 7927 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
7928 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7929
5430098f
SDJ
79302017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7931
7932 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7933 'const char *'.
7934
7c5ded6a
SDJ
79352017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7936
7937 * common/common-utils.c (free_vector_argv): New function.
7938 * common/common-utils.h: Include <vector>.
7939 (free_vector_argv): New prototype.
7940 * darwin-nat.c (darwin_create_inferior): Rewrite function
7941 prototype in order to constify "exec_file" and accept a
7942 "std::string" for "allargs".
7943 * fork-child.c: Include <vector>.
7944 (breakup_args): Rewrite function, using C++.
7945 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7946 and accept "std::string" for "allargs". Update the code to
7947 calculate "argv" based on "allargs". Update calls to "exec_fun"
7948 and "execvp".
7949 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7950 order to constify "exec_file" and accept a "std::string" for
7951 "allargs".
7952 * go32-nat.c (go32_create_inferior): Likewise.
7953 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7954 * infcmd.c (run_command_1): Constify "exec_file". Use
7955 "std::string" for inferior arguments.
7956 * inferior.h (fork_inferior): Update prototype.
7957 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7958 prototype in order to constify "exec_file" and accept a
7959 "std::string" for "allargs".
7960 * nto-procfs.c (procfs_create_inferior): Likewise.
7961 * procfs.c (procfs_create_inferior): Likewise.
7962 * remote-sim.c (gdbsim_create_inferior): Likewise.
7963 * remote.c (extended_remote_run): Update code to accept
7964 "std::string" as argument.
7965 (extended_remote_create_inferior): Rewrite function prototype in
7966 order to constify "exec_file" and accept a "std::string" for
7967 "allargs".
7968 * rs6000-nat.c (super_create_inferior): Likewise.
7969 (rs6000_create_inferior): Likewise.
7970 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7971 * windows-nat.c (windows_create_inferior): Likewise.
7972
ae0eee42
PA
79732017-04-11 Pedro Alves <palves@redhat.com>
7974
7975 * thread.c: Fix whitespace throughout.
7976
a6acac06
PR
79772017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7978
7979 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7980
64403bd1
AH
79812017-04-11 Alan Hayward <alan.hayward@arm.com>
7982
7983 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7984
a5bef50f
SDJ
79852017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7986
7987 PR gdb/21364
7988 * osdata.c (info_osdata): Check if 'type' is an empty string
7989 instead of NULL.
7990
9295a5a9
PA
79912017-04-10 Pedro Alves <palves@redhat.com>
7992
7993 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7994 (ptid_to_global_thread_id, in_thread_list)
7995 (do_captured_list_thread_ids, set_resumed, set_running)
7996 (set_executing, set_stop_requested, finish_thread_state)
7997 (validate_registers_access, can_access_registers_ptid)
7998 (print_thread_info_1, switch_to_thread)
7999 (do_restore_current_thread_cleanup)
8000 (make_cleanup_restore_current_thread, thread_command)
8001 (thread_name_command): Use operator== instead of ptid_equal.
8002
996812e3
PA
80032017-04-10 Pedro Alves <palves@redhat.com>
8004
8005 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8006 (current_thread_cleanup_chain): Delete.
8007 (restore_current_thread_cleanup_dtor)
8008 (make_cleanup_restore_current_thread): Remove references to
8009 current_thread_cleanup_chain.
8010
845b344f
AH
80112017-04-10 Alan Hayward <alan.hayward@arm.com>
8012
8013 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8014 REG_UNKNOWN.
8015
803bdfe4
YQ
80162017-04-10 Yao Qi <yao.qi@linaro.org>
8017
8018 PR gdb/19942
8019 * gdbthread.h (thread_info::deletable): New method.
8020 (thread_info::incref): New method.
8021 (thread_info::decref): New method.
8022 (thread_info::refcount): Move it to private.
8023 * infrun.c (save_stop_context): Call inc_refcount.
8024 (release_stop_context_cleanup): Likewise.
8025 * thread.c (set_thread_exited): New function.
8026 (init_thread_list): Delete "tp" only it is deletable, otherwise
8027 call set_thread_exited.
8028 (delete_thread_1): Call set_thread_exited.
8029 (current_thread_cleanup) <inferior_pid>: Remove.
8030 <thread>: New field.
8031 (restore_current_thread_ptid_changed): Removed.
8032 (do_restore_current_thread_cleanup): Adjust.
8033 (restore_current_thread_cleanup_dtor): Don't call
8034 find_thread_ptid.
8035 (set_thread_refcount): Use dec_refcount.
8036 (make_cleanup_restore_current_thread): Adjust.
8037 (thread_apply_all_command): Call inc_refcount.
8038 (_initialize_thread): Don't call
8039 observer_attach_thread_ptid_changed.
8040
8c25b497
YQ
80412017-04-10 Yao Qi <yao.qi@linaro.org>
8042
8043 * thread.c (delete_thread_1): Hoist code on marking thread as
8044 exited.
8045
8473b447
SM
80462017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8047
8048 * windows-nat.c (windows_detach): Initialize ptid with
8049 minus_one_ptid.
8050
6670ec13
SM
80512017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8052
8053 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8054
ba2f91bb
AH
80552017-04-07 Alan Hayward <alan.hayward@arm.com>
8056
8057 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8058 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8059 (bfin_pseudo_register_write): Likewise
8060
436252de
SM
80612017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8062
8063 * common/ptid.h (struct ptid): Change to...
8064 (class ptid_t): ... this.
8065 <ptid_t>: New constructors.
8066 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8067 matches>: New methods.
8068 <make_null, make_minus_one>: New static methods.
8069 <pid>: Rename to...
8070 <m_pid>: ...this.
8071 <lwp>: Rename to...
8072 <m_lwp>: ...this.
8073 <tid>: Rename to...
8074 <m_tid>: ...this.
8075 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8076 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8077 as references, move comment to class ptid_t.
8078 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8079 ptid_t static methods.
8080 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8081 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8082 Take ptid arguments as references, implement using ptid_t methods.
8083 * unittests/ptid-selftests.c: New file.
8084 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8085 unittests/ptid-selftests.c.
8086 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8087
0dedf377
TP
80882017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8089
8090 * python/python.c (python_run_simple_file): Cast mode literal to
8091 non-const char pointer as expected by PyFile_FromString.
8092
4e9868d4
SM
80932017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8094
8095 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8096 minus_one_ptid and null_ptid.
8097
9bf2a700
PA
80982017-04-05 Pedro Alves <palves@redhat.com>
8099
8100 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8101 * configure: Regenerate.
8102
a121b7c1
PA
81032017-04-05 Pedro Alves <palves@redhat.com>
8104
8105 * ada-exp.y (yyerror): Constify.
8106 * ada-lang.c (bound_name, get_selections)
8107 (ada_variant_discrim_type)
8108 (ada_variant_discrim_name, ada_value_struct_elt)
8109 (ada_lookup_struct_elt_type, is_unchecked_variant)
8110 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8111 (catch_ada_exception_command_split)
8112 (catch_ada_assert_command_split, catch_assert_command)
8113 (ada_op_name): Constify.
8114 * ada-lang.h (ada_yyerror, get_selections)
8115 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8116 * arc-tdep.c (arc_print_frame_cache): Constify.
8117 * arm-tdep.c (arm_skip_stub): Constify.
8118 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8119 (gen_aggregate_elt_ref): Constify.
8120 * bcache.c (print_bcache_statistics): Constify.
8121 * bcache.h (print_bcache_statistics): Constify.
8122 * break-catch-throw.c (catch_exception_command_1):
8123 * breakpoint.c (struct ep_type_description::description):
8124 Constify.
8125 (add_solib_catchpoint): Constify.
8126 (catch_fork_command_1): Add cast.
8127 (add_catch_command): Constify.
8128 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8129 Constify.
8130 * bsd-uthread.c (bsd_uthread_state): Constify.
8131 * buildsym.c (patch_subfile_names): Constify.
8132 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8133 Constify.
8134 * c-exp.y (yyerror): Constify.
8135 (token::oper): Constify.
8136 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8137 * c-varobj.c (cplus_describe_child): Constify.
8138 * charset.c (find_charset_names): Add cast.
8139 (find_charset_names): Constify array and add const_cast.
8140 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8141 (edit_command): Constify.
8142 * cli/cli-decode.c (lookup_cmd): Constify.
8143 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8144 Constify.
8145 (struct dump_context): Constify.
8146 (add_dump_command, restore_command): Constify.
8147 * cli/cli-script.c (get_command_line): Constify.
8148 * cli/cli-script.h (get_command_line): Constify.
8149 * cli/cli-utils.c (check_for_argument): Constify.
8150 * cli/cli-utils.h (check_for_argument): Constify.
8151 * coff-pe-read.c (struct read_pe_section_data): Constify.
8152 * command.h (lookup_cmd): Constify.
8153 * common/print-utils.c (decimal2str): Constify.
8154 * completer.c (gdb_print_filename): Constify.
8155 * corefile.c (set_gnutarget): Constify.
8156 * cp-name-parser.y (yyerror): Constify.
8157 * cp-valprint.c (cp_print_class_member): Constify.
8158 * cris-tdep.c (cris_register_name, crisv32_register_name):
8159 Constify.
8160 * d-exp.y (yyerror): Constify.
8161 (struct token::oper): Constify.
8162 * d-lang.h (d_yyerror): Constify.
8163 * dbxread.c (struct header_file_location::name): Constify.
8164 (add_old_header_file, add_new_header_file, last_function_name)
8165 (dbx_next_symbol_text, add_bincl_to_list)
8166 (find_corresponding_bincl_psymtab, set_namestring)
8167 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8168 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8169 * defs.h (command_line_input, print_address_symbolic)
8170 (deprecated_readline_begin_hook): Constify.
8171 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8172 Constify.
8173 * event-top.c (handle_line_of_input): Constify and add cast.
8174 * exceptions.c (catch_errors): Constify.
8175 * exceptions.h (catch_errors): Constify.
8176 * expprint.c (print_subexp_standard, op_string, op_name)
8177 (op_name_standard, dump_raw_expression, dump_raw_expression):
8178 * expression.h (op_name, op_string, dump_raw_expression):
8179 Constify.
8180 * f-exp.y (yyerror): Constify.
8181 (struct token::oper): Constify.
8182 (struct f77_boolean_val::name): Constify.
8183 * f-lang.c (f_word_break_characters): Constify.
8184 * f-lang.h (f_yyerror): Constify.
8185 * fork-child.c (fork_inferior): Add cast.
8186 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8187 (new_variant): Constify.
8188 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8189 * gdbarch.c: Regenerate.
8190 * gdbcore.h (set_gnutarget): Constify.
8191 * go-exp.y (yyerror): Constify.
8192 (token::oper): Constify.
8193 * go-lang.h (go_yyerror): Constify.
8194 * go32-nat.c (go32_sysinfo): Constify.
8195 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8196 * guile/scm-cmd.c (cmdscm_function): Constify.
8197 * guile/scm-param.c (pascm_param_value): Constify.
8198 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8199 (h8300sx_register_name): Constify.
8200 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8201 Constify.
8202 * ia64-tdep.c (ia64_register_names): Constify.
8203 * infcmd.c (construct_inferior_arguments): Constify.
8204 (path_command, attach_post_wait): Constify.
8205 * language.c (show_range_command, show_case_command)
8206 (unk_lang_error): Constify.
8207 * language.h (language_defn::la_error)
8208 (language_defn::la_name_of_this): Constify.
8209 * linespec.c (decode_line_2): Constify.
8210 * linux-thread-db.c (thread_db_err_str): Constify.
8211 * lm32-tdep.c (lm32_register_name): Constify.
8212 * m2-exp.y (yyerror): Constify.
8213 * m2-lang.h (m2_yyerror): Constify.
8214 * m32r-tdep.c (m32r_register_names): Constify and make static.
8215 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8216 * m88k-tdep.c (m88k_register_name): Constify.
8217 * macroexp.c (appendmem): Constify.
8218 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8219 (upgrade_type, parse_external, parse_partial_symbols)
8220 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8221 (new_symbol): Constify.
8222 * memattr.c (mem_info_command): Constify.
8223 * mep-tdep.c (register_name_from_keyword): Constify.
8224 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8225 Constify.
8226 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8227 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8228 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8229 cast.
8230 (mi_execute_async_cli_command): Constify.
8231 * mips-tdep.c (mips_register_name): Constify.
8232 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8233 (am33_register_name, am33_2_register_name)
8234 * moxie-tdep.c (moxie_register_names): Constify.
8235 * nat/linux-osdata.c (osdata_type): Constify fields.
8236 * nto-tdep.c (nto_parse_redirection): Constify.
8237 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8238 (lookup_child_selector): Constify.
8239 (objc_methcall::name): Constify.
8240 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8241 (lookup_struct_typedef): Constify.
8242 * objfiles.c (pc_in_section): Constify.
8243 * objfiles.h (pc_in_section): Constify.
8244 * p-exp.y (struct token::oper): Constify.
8245 (yyerror): Constify.
8246 * p-lang.h (pascal_yyerror): Constify.
8247 * parser-defs.h (op_name_standard): Constify.
8248 (op_print::string): Constify.
8249 (exp_descriptor::op_name): Constify.
8250 * printcmd.c (print_address_symbolic): Constify.
8251 * psymtab.c (print_partial_symbols): Constify.
8252 * python/py-breakpoint.c (stop_func): Constify.
8253 (bppy_get_expression): Constify.
8254 * python/py-cmd.c (cmdpy_completer::name): Constify.
8255 (cmdpy_function): Constify.
8256 * python/py-event.c (evpy_add_attribute)
8257 (gdbpy_initialize_event_generic): Constify.
8258 * python/py-event.h (evpy_add_attribute)
8259 (gdbpy_initialize_event_generic): Constify.
8260 * python/py-evts.c (add_new_registry): Constify.
8261 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8262 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8263 * python/py-inferior.c (get_buffer): Add cast.
8264 * python/py-param.c (parm_constant::name): Constify.
8265 * python/py-unwind.c (fprint_frame_id): Constify.
8266 * python/python.c (gdbpy_parameter_value): Constify.
8267 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8268 * remote.c (memory_packet_config::name): Constify.
8269 (show_packet_config_cmd, remote_write_bytes)
8270 (remote_buffer_add_string):
8271 * reverse.c (exec_reverse_once): Constify.
8272 * rs6000-tdep.c (variant::name, variant::description): Constify.
8273 * rust-exp.y (rustyyerror): Constify.
8274 * rust-lang.c (rust_op_name): Constify.
8275 * rust-lang.h (rustyyerror): Constify.
8276 * serial.h (serial_ops::name): Constify.
8277 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8278 (sh_sh3e_register_name, sh_sh2e_register_name)
8279 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8280 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8281 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8282 (sh_sh4al_dsp_register_name): Constify.
8283 * sh64-tdep.c (sh64_register_name): Constify.
8284 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8285 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8286 * stabsread.c (patch_block_stabs, read_type_number)
8287 (ref_map::stabs, ref_add, process_reference)
8288 (symbol_reference_defined, define_symbol, define_symbol)
8289 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8290 (read_one_struct_field, read_struct_fields, read_baseclasses)
8291 (read_tilde_fields, read_struct_type, read_array_type)
8292 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8293 (read_huge_number, read_range_type, read_args, common_block_start)
8294 (find_name_end): Constify.
8295 * stabsread.h (common_block_start, define_symbol)
8296 (process_one_symbol, symbol_reference_defined, ref_add):
8297 * symfile.c (get_section_index, add_symbol_file_command):
8298 * symfile.h (get_section_index): Constify.
8299 * target-descriptions.c (tdesc_type::name): Constify.
8300 (tdesc_free_type): Add cast.
8301 * target.c (find_default_run_target):
8302 (add_deprecated_target_alias, find_default_run_target)
8303 (target_announce_detach): Constify.
8304 (do_option): Constify.
8305 * target.h (add_deprecated_target_alias): Constify.
8306 * thread.c (print_thread_info_1): Constify.
8307 * top.c (deprecated_readline_begin_hook, command_line_input):
8308 Constify.
8309 (init_main): Add casts.
8310 * top.h (handle_line_of_input): Constify.
8311 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8312 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8313 (tfind_command): Rename to ...
8314 (tfind_command_1): ... this and constify.
8315 (tfind_command): New function.
8316 (tfind_end_command, tfind_start_command): Adjust.
8317 (encode_source_string): Constify.
8318 * tracepoint.h (encode_source_string): Constify.
8319 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8320 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8321 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8322 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8323 * tui/tui-win.c (parse_scrolling_args): Constify.
8324 * tui/tui-windata.c (tui_erase_data_content): Constify.
8325 * tui/tui-windata.h (tui_erase_data_content): Constify.
8326 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8327 * tui/tui.c (tui_enable): Add cast.
8328 * utils.c (defaulted_query): Constify.
8329 (init_page_info): Add cast.
8330 (puts_debug, subset_compare): Constify.
8331 * utils.h (subset_compare): Constify.
8332 * varobj.c (varobj_format_string): Constify.
8333 * varobj.h (varobj_format_string): Constify.
8334 * vax-tdep.c (vax_register_name): Constify.
8335 * windows-nat.c (windows_detach): Constify.
8336 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8337 * xml-support.c (gdb_xml_end_element): Constify.
8338 * xml-tdesc.c (tdesc_start_reg): Constify.
8339 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8340 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8341 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8342
995816ba
PA
83432017-04-05 Pedro Alves <palves@redhat.com>
8344
8345 * proc-api.c (struct trans): Constify.
8346 (procfs_note): Constify.
8347 * proc-events.c (struct trans, syscall_table):
8348 * proc-flags.c (struct trans): Constify.
8349 * proc-utils.h (procfs_note): Constify.
8350 * proc-why.c (struct trans): Constify.
8351 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8352 (procfs_detach): Constify.
8353 * sol-thread.c (struct string_map): Constify.
8354 (td_err_string, td_state_string): Constify.
8355
3e83a920
PA
83562017-04-05 Pedro Alves <palves@redhat.com>
8357
8358 * proc-api.c (procfs_filename): Don't initialize
8359 procfs_filename.
8360 (prepare_to_trace): Assume procfs_filename is non-NULL.
8361 (_initialize_proc_api): Give procfs_filename a default value here.
8362
63160a43
PA
83632017-04-05 Pedro Alves <palves@redhat.com>
8364
8365 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8366 'cond_string' parameter.
8367 (extract_exception_regexp): Constify 'string' parameter.
8368 (catch_exception_command_1): Constify.
8369 * breakpoint.c (init_catchpoint)
8370 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8371 parameter.
8372 (ep_parse_optional_if_clause, catch_fork_command_1)
8373 (catch_exec_command_1): Constify.
8374 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8375 parameter.
8376 (ep_parse_optional_if_clause): Constify.
8377 * cli/cli-utils.c (remove_trailing_whitespace)
8378 (check_for_argument): Constify.
8379 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8380 non-const overload.
8381 (check_for_argument): Likewise.
8382
9b2eba3d
PA
83832017-04-05 Pedro Alves <palves@redhat.com>
8384
8385 * event-top.c (command_line_handler): Add cast to execute_command
8386 call.
8387 * record-btrace.c (cmd_record_btrace_bts_start)
8388 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8389 (cmd_record_btrace_start): Add cast to execute_command call.
8390 * record-full.c (record_full_goto_insn):
8391 * record.c (record_start, record_stop): Add cast to
8392 execute_command_to_string calls.
8393 (cmd_record_start): Add cast to execute_command calls.
8394
2adadf51
PA
83952017-04-05 Pedro Alves <palves@redhat.com>
8396
8397 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8398 static inline function.
8399 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8400 array and use gdb_PyArg_ParseTupleAndKeywords.
8401 * python/py-cmd.c (cmdpy_init): Likewise.
8402 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8403 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8404 (infpy_search_memory): Likewise.
8405 * python/py-objfile.c (objfpy_add_separate_debug_file)
8406 (gdbpy_lookup_objfile): Likewise.
8407 * python/py-symbol.c (gdbpy_lookup_symbol)
8408 (gdbpy_lookup_global_symbol): Likewise.
8409 * python/py-type.c (gdbpy_lookup_type): Likewise.
8410 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8411 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8412 Likewise.
8413
0d1f4ceb
PA
84142017-04-05 Pedro Alves <palves@redhat.com>
8415
8416 * python/python-internal.h (gdb_PyGetSetDef): New type.
8417 * python/py-block.c (block_object_getset)
8418 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8419 * python/py-event.c (event_object_getset)
8420 (finish_breakpoint_object_getset): Likewise.
8421 * python/py-inferior.c (inferior_object_getset): Likewise.
8422 * python/py-infthread.c (thread_object_getset): Likewise.
8423 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8424 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8425 * python/py-objfile.c (objfile_getset): Likewise.
8426 * python/py-progspace.c (pspace_getset): Likewise.
8427 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8428 Likewise.
8429 * python/py-record.c (recpy_record_getset): Likewise.
8430 * python/py-symbol.c (symbol_object_getset): Likewise.
8431 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8432 Likewise.
8433 * python/py-type.c (type_object_getset, field_object_getset):
8434 Likewise.
8435 * python/py-value.c (value_object_getset): Likewise.
8436
4d759979
PA
84372017-04-05 Pedro Alves <palves@redhat.com>
8438
8439 * python/python-internal.h (gdb_PyObject_CallMethod)
8440 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8441 New functions.
8442 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8443 (PySys_GetObject, PySys_SetPath): New macros.
8444
fdf9e36f
PA
84452017-04-05 Pedro Alves <palves@redhat.com>
8446
8447 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8448 info_osdata_command.
8449 * osdata.c (info_osdata_command): Rename to ...
8450 (info_osdata): ... this. Constify 'type' parameter, and remove
8451 the 'from_tty' parameter. Accept NULL TYPE.
8452 (info_osdata_command): New function.
8453 * osdata.h (info_osdata_command): Remove declaration.
8454 (info_osdata): New declaration.
8455
9f33b8b7
PA
84562017-04-05 Pedro Alves <palves@redhat.com>
8457
8458 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8459 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8460 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8461 parameter.
8462 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8463 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8464 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8465 parameter.
8466 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8467 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8468 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8469 (mi_cmd_file_list_exec_source_files)
8470 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8471 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8472 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8473 parameter.
8474 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8475 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8476 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8477 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8478 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8479 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8480 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8481 'command' parameter.
8482 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8483 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8484 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8485 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8486 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8487 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8488 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8489 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8490 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8491 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8492 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8493 parameter.
8494 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8495 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8496 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8497 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8498 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8499 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8500 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8501 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8502 (mi_cmd_data_list_changed_registers)
8503 (mi_cmd_data_write_register_values)
8504 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8505 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8506 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8507 (mi_cmd_list_features, mi_cmd_list_target_features)
8508 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8509 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8510 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8511 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8512 (mi_cmd_trace_frame_collected): Constify 'command'
8513 parameter.
8514 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8515 'command' parameter.
8516
67cb5b2d
PA
85172017-04-05 Pedro Alves <palves@redhat.com>
8518
8519 * ada-lang.c (ada_completer_word_break_characters): Now a const
8520 array.
8521 (ada_get_gdb_completer_word_break_characters): Constify.
8522 * completer.c (gdb_completer_command_word_break_characters)
8523 (gdb_completer_file_name_break_characters)
8524 (gdb_completer_quote_characters): Now const arrays.
8525 (get_gdb_completer_quote_characters): Constify.
8526 (set_rl_completer_word_break_characters): New function.
8527 (set_gdb_completion_word_break_characters)
8528 (complete_line_internal): Use it.
8529 * completer.h (get_gdb_completer_quote_characters): Constify.
8530 (set_rl_completer_word_break_characters): Declare.
8531 * f-lang.c (f_word_break_characters): Constify.
8532 * language.c (default_word_break_characters): Constify.
8533 * language.h (language_defn::la_word_break_characters): Constify.
8534 (default_word_break_characters): Constify.
8535 * top.c (init_main): Use set_rl_completer_word_break_characters.
8536
7a114964
PA
85372017-04-05 Pedro Alves <palves@redhat.com>
8538
8539 * aix-thread.c (aix_thread_pid_to_str)
8540 (aix_thread_extra_thread_info): Constify.
8541 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8542 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8543 (bsd_uthread_pid_to_str): Constify.
8544 * corelow.c (core_pid_to_str): Constify.
8545 * darwin-nat.c (darwin_pid_to_str): Constify.
8546 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8547 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8548 Constify.
8549 * gnu-nat.c (gnu_pid_to_str): Constify.
8550 * go32-nat.c (go32_pid_to_str): Constify.
8551 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8552 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8553 * inferior.c (inferior_pid_to_str): Constify.
8554 * linux-nat.c (linux_nat_pid_to_str): Constify.
8555 * linux-tdep.c (linux_core_pid_to_str): Constify.
8556 * linux-thread-db.c (thread_db_pid_to_str)
8557 (thread_db_extra_thread_info): Constify.
8558 * nto-tdep.c (nto_extra_thread_info): Constify.
8559 * nto-tdep.h (nto_extra_thread_info): Constify.
8560 * obsd-nat.c (obsd_pid_to_str): Constify.
8561 * procfs.c (procfs_pid_to_str): Constify.
8562 * ravenscar-thread.c (ravenscar_extra_thread_info)
8563 (ravenscar_pid_to_str): Constify.
8564 * remote-sim.c (gdbsim_pid_to_str): Constify.
8565 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8566 Constify.
8567 * sol-thread.c (solaris_pid_to_str): Constify.
8568 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8569 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8570 * target.c (default_pid_to_str, target_pid_to_str)
8571 (normal_pid_to_str, default_pid_to_str): Constify.
8572 * target.h (target_ops::to_pid_to_str)
8573 (target_ops::to_extra_thread_info): Constify.
8574 (target_pid_to_str, normal_pid_to_str): Constify.
8575 * windows-nat.c (windows_pid_to_str): Constify.
8576 * gdbarch.sh (core_pid_to_str): Constify.
8577 * target-delegates.c: Regenerate.
8578 * gdbarch.h, gdbarch.c: Regenerate.
8579
69bbf465
PA
85802017-04-05 Pedro Alves <palves@redhat.com>
8581
8582 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8583 the memory of the temporary warning_pre_print override.
8584 * utils.c (warning_pre_print): Constify.
8585 * utils.h (warning_pre_print): Constify.
8586
be47f9e8
PA
85872017-04-05 Pedro Alves <palves@redhat.com>
8588
8589 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8590 (shell_command): New function.
8591 (make_command): Use std::string.
8592 (init_cli_cmds): Register shell_command instead of shell_escape.
8593
bde6261a
PA
85942017-04-05 Pedro Alves <palves@redhat.com>
8595
8596 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8597 * tracepoint.c (default_collect): Don't initialize.
8598
b38ef47f
PA
85992017-04-05 Pedro Alves <palves@redhat.com>
8600
8601 * macroexp.c (macro_buffer::shared): Now a bool.
8602 (init_buffer): Update.
8603 (init_shared_buffer): Constify 'addr' parameter.
8604 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8605 casts.
8606
f995bbe8
PA
86072017-04-05 Pedro Alves <palves@redhat.com>
8608
8609 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8610 * disasm.c (set_disassembler_options): Constify local.
8611 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8612
4a596fe2
SDJ
86132017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8614
8615 PR gdb/21352
8616 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8617 option.
8618
2cad08ea
YQ
86192017-04-05 Yao Qi <yao.qi@linaro.org>
8620
8621 * frame.c (frame_unwind_register_unsigned): Call
8622 frame_unwind_register_value.
8623
55a98976
YQ
86242017-04-05 Yao Qi <yao.qi@linaro.org>
8625
8626 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8627 Use gdb_test_multiple, and don't match anchor.
8628
4ac40124
PA
86292017-04-05 Pedro Alves <palves@redhat.com>
8630
8631 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8632 (Write After Approval): Remove Simon Marchi.
8633
c053b654
PA
86342017-04-05 Pedro Alves <palves@redhat.com>
8635
8636 * common/gdb_optional.h (optional::optional): Make constexpr and
8637 initialize m_dummy.
8638
4c7bf4f9
JB
86392017-04-04 John Baldwin <jhb@FreeBSD.org>
8640
8641 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8642 (amd64fbsd_jmp_buf_reg_offset): Remove.
8643 (amd64fbsd_supply_uthread): Remove function.
8644 (amd64fbsd_collect_uthread): Remove function.
8645 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8646 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8647 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8648 (fbsd-nat.c): Update comment.
8649 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8650 (i386fbsd_jmp_buf_reg_offset): Remove.
8651 (i386fbsd_supply_uthread): Remove function.
8652 (i386fbsd_collect_uthread): Remove function.
8653 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8654
1e1a8bef
JB
86552017-04-04 John Baldwin <jhb@FreeBSD.org>
8656
8657 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8658 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8659 * NEWS: Mention that support for FreeBSD/alpha was removed.
8660 * alpha-fbsd-tdep.c: Delete file.
8661 * config/alpha/fbsd.mh: Delete file.
8662 * configure.host: Delete alpha*-*-freebsd* and
8663 alpha*-*-kfreebsd*-gnu.
8664 * configure.tgt: Delete alpha*-*-freebsd* and
8665 alpha*-*-kfreebsd*-gnu.
8666
49907934
JB
86672017-04-04 John Baldwin <jhb@FreeBSD.org>
8668
8669 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8670 amd64bsd_store_inferior_registers): Use ptid from regcache.
8671
6f77053d
PA
86722017-04-04 Pedro Alves <palves@redhat.com>
8673
8674 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8675 data fields, make them private and add "m_" prefixes.
8676 (lnp_state_machine::lnp_state_machine): New ctor.
8677 (record_line, check_line_address, handle_set_discriminator)
8678 (handle_set_address, handle_advance_pc, handle_special_opcode)
8679 (handle_advance_line, handle_set_file, handle_negate_stmt)
8680 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8681 (end_sequence, advance_line): New methods.
8682 (m_gdbarch, m_record_lines_p): New fields.
8683 (lnp_reader_state): Delete.
8684 (dwarf_record_line): Rename to ...
8685 (lnp_state_machine::record_line): ... adjust.
8686 (init_lnp_state_machine): Delete.
8687 (lnp_state_machine::lnp_state_machine): New.
8688 (check_line_address): Rename to ...
8689 (lnp_state_machine::check_line_address): This.
8690 (dwarf_decode_lines_1): Remove reference to "reader_state".
8691 Adjust lnp_state_machine having a non-default ctor. Use bool.
8692 State machine internal state manipulation moved to
8693 lnp_state_machine methods.
8694
9c541725
PA
86952017-04-04 Pedro Alves <palves@redhat.com>
8696
8697 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8698 unittests/offset-type-selftests.c.
8699 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8700 * common/offset-type.h: New file.
8701 * common/preprocessor.h: New file.
8702 * common/traits.h: New file.
8703 * common/valid-expr.h: New file.
8704 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8705 sect_offset and cu_offset strong typedefs throughout.
8706 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8707 typedefs throughout.
8708 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8709 sect_offset and cu_offset strong typedefs throughout.
8710 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8711 typedefs throughout.
8712 * gdbtypes.h: Include "common/offset-type.h".
8713 (cu_offset): Now an offset type (strong typedef) instead of a
8714 struct.
8715 (sect_offset): Likewise.
8716 (union call_site_parameter_u): Rename "param_offset" field to
8717 "param_cu_off".
8718 * unittests/offset-type-selftests.c: New file.
8719
ecfb656c
PA
87202017-04-04 Pedro Alves <palves@redhat.com>
8721
8722 * common/underlying.h: New file.
8723 * dwarf2read.c: Include "common/gdb_optional.h" and
8724 "common/underlying.h".
8725 (dir_index, file_name_index): New types.
8726 (file_entry): Use them.
8727 (file_entry::include): Use to_underlying.
8728 (line_header::add_file_name): Use dir_index.
8729 (read_formatted_entries): Use gdb::optional. Read form before
8730 writting to file_entry.
8731 (dwarf_decode_line_header): Use dir_index.
8732 (lnp_state_machine::current_file): Use to_underlying.
8733 (lnp_state_machine::file): Change type to file_name_index.
8734 (dwarf_record_line): Use to_underlying.
8735 (init_lnp_state_machine): Use file_name_index.
8736 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8737
d194f1fe
PA
87382017-04-04 Pedro Alves <palves@redhat.com>
8739
8740 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8741 operator bool, has_value and get methods.
8742
fff8551c
PA
87432017-04-04 Pedro Alves <palves@redhat.com>
8744
8745 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8746 fields.
8747 (line_header): Initialize all data fields. Change type of
8748 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8749 Change type of include_dirs to std::vector<const char *>. Remove
8750 num_include_dirs, include_dirs_size. Change type of file_names to
8751 std::vector<file_entry>. Remove num_file_names, file_names_size.
8752 (line_header::line_header): New.
8753 (line_header::add_include_dir, line_header::add_file_name): New
8754 methods.
8755 (line_header::include_dir_at): Remove NULL check.
8756 (line_header::file_name_at): Add const overload.
8757 (line_header_up): New unique_ptr typedef.
8758 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8759 std::vector. Remove free_line_header call.
8760 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8761 free_line_header call.
8762 (free_cu_line_header): Delete.
8763 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8764 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8765 Adjust to use std::vector.
8766 (free_line_header): Delete.
8767 (free_line_header_voidp): Use delete.
8768 (add_include_dir): Replace with ...
8769 (line_header::add_include_dir): ... this method. Use std::vector.
8770 (add_file_name): Replace with ...
8771 (line_header::add_file_name): ... this method. Use std::vector.
8772 (add_include_dir_stub): Delete.
8773 (read_formatted_entries): Remove memset.
8774 (dwarf_decode_line_header): Return a line_header_up instead of a
8775 raw pointer. Remove cleanup handling. Pass lambdas to
8776 read_formatted_entries. Adjust to use line_header methods.
8777 (dwarf_decode_lines_1): Adjust to use line_header methods.
8778 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8779 use std::vector.
8780
d62a8ae2
SM
87812017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8782
8783 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8784 instead of struct ptid.
8785
db3a1dc7
AH
87862017-05-04 Alan Hayward <alan.hayward@arm.com>
8787
8788 * frame.c (get_frame_register_bytes): Unwind using value.
8789 (put_frame_register_bytes): Likewise.
8790
b1b45502
IB
87912017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8792
8793 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8794 aggregate-like.
8795
ec13808e
JK
87962017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8797
8798 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8799
12316564
YQ
88002017-03-29 Yao Qi <yao.qi@linaro.org>
8801
8802 * gdbthread.h (struct thread_info): Declare constructor and
8803 destructor. Add some in-class member initializers.
8804 * thread.c (free_thread): Remove.
8805 (init_thread_list): Call delete instead of free_thread.
8806 (new_thread): Call thread_info constructor.
8807 (thread_info::thread_info): New function.
8808 (thread_info::~thread_info): New function.
8809 (delete_thread_1): Call delete instead of free_thread.
8810 (make_cleanup_restore_current_thread): Move tp and frame to
8811 inner block.
8812
fe5f7374
AK
88132017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8814
8815 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8816 (arc_skip_prologue): Likewise.
8817 (arc_make_frame_cache): Likewise.
8818 (arc_pv_get_operand): New function.
8819 (arc_is_in_prologue): Likewise.
8820 (arc_analyze_prologue): Likewise.
8821 (arc_print_frame_cache): Likewise.
8822 (MAX_PROLOGUE_LENGTH): New constant.
8823
eea78757
AK
88242017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8825
8826 * configure.tgt: Add arc-insn.o.
8827 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8828 (dump_arc_instruction_command): New function.
8829 (arc_fprintf_disasm): Likewise.
8830 (arc_disassemble_info): Likewise.
8831 (arc_insn_get_operand_value): Likewise.
8832 (arc_insn_get_operand_value_signed): Likewise.
8833 (arc_insn_get_memory_base_reg): Likewise.
8834 (arc_insn_get_memory_offset): Likewise.
8835 (arc_insn_get_branch_target): Likewise.
8836 (arc_insn_dump): Likewise.
8837 (arc_insn_get_linear_next_pc): Likewise.
8838 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8839 (arc_disassemble_info): Likewise.
8840 (arc_insn_get_branch_target): Likewise.
8841 (arc_insn_get_linear_next_pc): Likewise.
8842 * NEWS: Mention new "maint print arc arc-instruction".
8843
3be78afd
AK
88442017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8845
8846 * arc-tdep (maintenance_print_arc_list): New variable.
8847 (maintenance_print_arc_command): New function.
8848
296ec4fa
AK
88492017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8850
8851 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8852 Add "limm" and "reserved".
8853 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8854 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8855 * arc-tdep.h (arc_regnum): Likewise.
8856
f74f865e
MF
88572017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8858
8859 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8860 for THREADPTR register.
8861 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8862 register.
8863 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8864 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8865 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8866
0d0bf81a
MF
88672017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8868
8869 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8870 registers above gdbarch_num_regs (gdbarch) as privileged in
8871 call0 ABI.
8872
0ce4291e
MF
88732017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8874
8875 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8876 for a single specified register or for all registers in
8877 a0_base..a0_base + C0_NREGS range.
8878 (supply_gregset_reg): Call regcache_raw_supply for a single
8879 specified register or for all registers in a0_base..a0_base +
8880 C0_NREGS range.
8881
c56054f9
MF
88822017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8883
8884 * arch/xtensa.h (C0_NREGS): Add definition.
8885 * xtensa-tdep.c (C0_NREGS): Remove definition.
8886
a4398628
MF
88872017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8888
8889 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8890 Drop xtensa_default_isa initialization.
8891 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8892
8c43009f
PA
88932017-03-27 Pedro Alves <palves@redhat.com>
8894
8895 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8896 (file_entry::include_dir): New method.
8897 (line_header::include_dir_at, line_header::file_name_at): New
8898 methods.
8899 (setup_type_unit_groups, setup_type_unit_groups)
8900 (psymtab_include_file_name): Simplify using the new methods.
8901 (lnp_state_machine) <the_line_header>: New field.
8902 <file>: Add comment.
8903 (lnp_state_machine::current_file): New method.
8904 (dwarf_record_line): Simplify using the new methods.
8905 (init_lnp_state_machine): Initialize the "the_line_header" field.
8906 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8907 Simplify using the new methods.
8908
a7e80b9e
PA
89092017-03-27 Pedro Alves <palves@redhat.com>
8910
8911 * cp-name-parser.y (make_empty): Delete.
8912 (demangler_special, nested_name, ptr_operator, array_indicator)
8913 (direct_declarator, declarator_1): Use fill_comp instead of
8914 make_empty.
8915
21047726
PA
89162017-03-27 Pedro Alves <palves@redhat.com>
8917
8918 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8919 to ATTRIBUTE_PRINTF.
8920 * solib-target.c (library_list_start_list): Print "string" not
8921 "version".
8922 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8923 gdb_xml_error call.
8924
d721ba37
PA
89252017-03-27 Pedro Alves <palves@redhat.com>
8926
8927 * dwarf2read.c (struct file_and_directory): New.
8928 (dwarf2_get_dwz_file): Adjust to use std::string.
8929 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8930 (find_file_and_directory): Adjust to return a file_and_directory
8931 object.
8932 (read_file_scope): Adjust to use file_and_directory. Remove
8933 make_cleanup/do_cleanups calls.
8934 (open_and_init_dwp_file): Adjust to use std::string. Remove
8935 make_cleanup/do_cleanups calls.
8936 * python/python.c (do_start_initialization): Adjust to ldirname
8937 returning a std::string.
8938 * utils.c (ldirname): Now returns a std::string.
8939 * utils.h (ldirname): Change return type to std::string.
8940 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8941 returning a std::string.
8942 * xml-tdesc.c (file_read_description_xml): Likewise.
8943
ed771251
AH
89442017-03-24 Alan Hayward <alan.hayward@arm.com>
8945
8946 * regcache.c (regcache_debug_print_register): New function.
8947 * regcache.h (regcache_debug_print_register): New declaration.
8948 * target.c (debug_print_register): Remove.
8949 (target_fetch_registers): Call regcache_debug_print_register.
8950 (target_store_registers): Likewise.
8951
568c1b9f
PB
89522017-03-24 Pádraig Brady <pbrady@fb.com>
8953
8954 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8955 reference beyond the 'lh->include_dirs' array before accessing to
8956 it.
8957 (psymtab_include_file_name): Likewise.
8958 (dwarf_decode_lines_1): Likewise.
8959 (dwarf_decode_lines): Likewise.
8960 (file_file_name): Likewise.
8961
3e00d44f
SM
89622017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8963
8964 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8965 inferior_ptid.
8966 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8967 ps_lsetfpregs): Likewise.
8968 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8969 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8970 ps_lsetfpregs): Likewise.
8971 * target.c (target_fetch_registers, target_store_registers):
8972 Remove asserts.
8973
077ae656
AH
89742017-03-23 Alan Hayward <alan.hayward@arm.com>
8975
8976 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8977
1e2b521d
YQ
89782017-03-23 Yao Qi <yao.qi@linaro.org>
8979
8980 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8981 (_initialize_aarch64_tdep): Register it.
8982 (aarch64_record_load_store): Handle PRFM instruction.
8983 (aarch64_process_record_test): New function.
8984
33877125
YQ
89852017-03-23 Yao Qi <yao.qi@linaro.org>
8986
8987 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8988 indentation.
8989
a0eef940
YQ
89902017-03-23 Yao Qi <yao.qi@linaro.org>
8991
8992 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8993
3f2a3564
PR
89942017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8995
8996 python/python.c (do_start_initialization): Fix memory leak.
8997
b67aeab0
SM
89982017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8999
9000 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9001 using get_ptrace_pid.
9002 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9003 inferior_ptid.
9004 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9005 inferior_ptid instead of pid.
9006
ffdbe864
YQ
90072017-03-22 Yao Qi <yao.qi@linaro.org>
9008
9009 * aarch64-tdep.c: Wrap locally used classes in anonymous
9010 namespace.
9011 * arm-tdep.c: Likewise.
9012 * linespec.c: Likewise.
9013 * ui-out.c: Likewise.
9014
9d736fbf
JG
90152017-03-22 Jonah Graham <jonah@kichwacoders.com>
9016
9017 PR gdb/19637
9018 * python/lib/gdb/printer/bound_registers.py: Import sys.
9019
3de88e9a
SM
90202017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9021
9022 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9023 windows_thread_info parameter and use it instead of
9024 current_thread.
9025 (windows_fetch_inferior_registers): Don't set current_thread,
9026 pass the thread to do_windows_fetch_inferior_registers. Use
9027 ptid from regcache instead of inferior_ptid.
9028 (do_windows_store_inferior_registers): Add windows_thread_info
9029 parameter and use it instead of current_thread.
9030 (windows_store_inferior_registers): Don't set current_thread,
9031 pass the thread to do_windows_store_inferior_registers. Use
9032 ptid from regcache instead of inferior_ptid.
9033
0e7b8f61
SM
90342017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9035
9036 * ser-mingw.c (ser_windows_raw): Remove reference to
9037 struct serial::current_timeout.
9038
5badf10a
IR
90392017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9040
9041 PR tdep/20928
9042 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9043 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9044 (sparc64_fsr_type): Fix %fsr decoding.
9045
cee59b3f
TW
90462017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9047
9048 * python/py-record-btrace.c (btpy_insn_data): Change return type
9049 for Python 2.
9050
639a9038
SM
90512017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9052
9053 * spu-linux-nat.c (spu_fetch_inferior_registers,
9054 spu_store_inferior_registers): Use ptid from regcache, set and
9055 restore inferior_ptid.
9056 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9057 Likewise.
9058
bcc0c096
SM
90592017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9060
9061 * i386-linux-nat.c (fetch_register, store_register,
9062 i386_linux_fetch_inferior_registers,
9063 i386_linux_store_inferior_registers): Use ptid from regcache.
9064 * ia64-linux-nat.c (ia64_linux_fetch_register,
9065 ia64_linux_store_register): Likewise.
9066 * inf-ptrace.c (inf_ptrace_fetch_register,
9067 inf_ptrace_store_register): Likewise.
9068 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9069 m32r_linux_store_inferior_registers): Likewise.
9070 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9071 m68kbsd_store_inferior_registers): Likewise.
9072 * m68k-linux-nat.c (fetch_register, store_register,
9073 m68k_linux_fetch_inferior_registers,
9074 m68k_linux_store_inferior_registers): Likewise.
9075 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9076 m88kbsd_store_inferior_registers): Likewise.
9077 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9078 mips_fbsd_store_inferior_registers): Likewise.
9079 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9080 mips64_linux_regsets_store_registers): Likewise.
9081 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9082 mipsnbsd_store_inferior_registers): Likewise.
9083 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9084 mips64obsd_store_inferior_registers): Likewise.
9085 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9086 Likewise.
9087 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9088 ppcfbsd_store_inferior_registers): Likewise.
9089 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9090 ppc_linux_store_inferior_registers): Likewise.
9091 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9092 ppcnbsd_store_inferior_registers): Likewise.
9093 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9094 ppcobsd_store_registers): Likewise.
9095 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9096 Likewise.
9097 * ravenscar-thread.c (ravenscar_fetch_registers,
9098 ravenscar_store_registers, ravenscar_prepare_to_store):
9099 Likewise.
9100 * record-btrace.c (record_btrace_fetch_registers,
9101 record_btrace_store_registers, record_btrace_prepare_to_store):
9102 Likewise.
9103 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9104 Lookup inferior using ptid from regcache, instead of
9105 current_inferior.
9106 * remote.c (remote_fetch_registers, remote_store_registers): Use
9107 ptid from regcache.
9108 * rs6000-nat.c (fetch_register, store_register): Likewise.
9109 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9110 s390_linux_store_inferior_registers): Likewise.
9111 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9112 shnbsd_store_inferior_registers): Likewise.
9113 * sol-thread.c (sol_thread_fetch_registers,
9114 sol_thread_store_registers): Likewise.
9115 * sparc-nat.c (sparc_fetch_inferior_registers,
9116 sparc_store_inferior_registers): Likewise.
9117 * tilegx-linux-nat.c (fetch_inferior_registers,
9118 store_inferior_registers): Likewise.
9119 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9120 vaxbsd_store_inferior_registers): Likewise.
9121 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9122 store_xtregs): Likewise.
9123
c0f55cc6
AV
91242017-03-20 Artemiy Volkov <artemiyv@acm.org>
9125
9126 PR gdb/14441
9127 * NEWS: Mention support for rvalue references in GDB and python.
9128 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9129 supports both lvalue and rvalue references.
9130
15c0a2a9
AV
91312017-03-20 Artemiy Volkov <artemiyv@acm.org>
9132
9133 PR gdb/14441
9134 * gdbtypes.c (rank_one_type): Implement overloading
9135 resolution rules regarding rvalue references.
9136
aa006118
AV
91372017-03-20 Artemiy Volkov <artemiyv@acm.org>
9138
9139 PR gdb/14441
9140 * aarch64-tdep.c (aarch64_type_align)
9141 (aarch64_extract_return_value, aarch64_store_return_value): Change
9142 lvalue reference type checks to general reference type checks.
9143 * amd64-tdep.c (amd64_classify): Likewise.
9144 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9145 Likewise.
9146 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9147 (arm_store_return_value): Likewise.
9148 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9149 * c-typeprint.c (c_print_type): Likewise.
9150 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9151 (cplus_number_of_children, cplus_describe_child): Likewise.
9152 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9153 * completer.c (expression_completer): Likewise.
9154 * cp-support.c (make_symbol_overload_list_adl_namespace):
9155 Likewise.
9156 * darwin-nat-info.c (info_mach_region_command): Likewise.
9157 * dwarf2loc.c (entry_data_value_coerce_ref)
9158 (value_of_dwarf_reg_entry): Likewise.
9159 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9160 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9161 Likewise.
9162 * findvar.c (extract_typed_address, store_typed_address):
9163 Likewise.
9164 * gdbtypes.c (rank_one_type): Likewise.
9165 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9166 * infcall.c (value_arg_coerce): Likewise.
9167 * language.c (pointer_type): Likewise.
9168 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9169 Likewise.
9170 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9171 * mn10300-tdep.c (mn10300_type_align): Likewise.
9172 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9173 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9174 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9175 Likewise.
9176 * printcmd.c (print_formatted, x_command): Likewise.
9177 * python/py-type.c (typy_get_composite, typy_template_argument):
9178 Likewise.
9179 * python/py-value.c (valpy_referenced_value)
9180 (valpy_get_dynamic_type, value_has_field): Likewise.
9181 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9182 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9183 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9184 * spu-tdep.c (spu_scalar_value_p): Likewise.
9185 * symtab.c (lookup_symbol_aux): Likewise.
9186 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9187 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9188 Likewise.
9189 * valops.c (value_cast_pointers, value_cast)
9190 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9191 (value_struct_elt, value_struct_elt_bitpos)
9192 (value_find_oload_method_list, find_overload_match)
9193 (value_rtti_indirect_type): Likewise.
9194 * valprint.c (val_print_scalar_type_p, generic_val_print):
9195 Likewise.
9196 * value.c (value_actual_type, value_as_address, unpack_long)
9197 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9198 (coerce_ref): Likewise.
9199 * varobj.c (varobj_get_value_type): Likewise.
9200
3fcf899d
AV
92012017-03-20 Artemiy Volkov <artemiyv@acm.org>
9202
9203 PR gdb/14441
9204 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9205 table of constants.
9206 * python/lib/gdb/command/explore.py: Support exploring values
9207 of rvalue reference types.
9208 * python/lib/gdb/types.py: Implement get_basic_type() for
9209 rvalue reference types.
9210 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9211 constant.
9212 * python/py-value.c (valpy_getitem): Add an rvalue reference
9213 check.
9214 (valpy_reference_value): Add new parameter "refcode".
9215 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9216 New wrappers for valpy_reference_value().
9217 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9218 (gdbpy_invoke_xmethod): Likewise.
9219
4297a3f0
AV
92202017-03-20 Artemiy Volkov <artemiyv@acm.org>
9221
9222 PR gdb/14441
9223 * dwarf2read.c (process_die, read_type_die_1): Handle the
9224 DW_TAG_rvalue_reference_type DIE.
9225 (read_tag_reference_type): Add new parameter "refcode".
9226
e1cb3213
AV
92272017-03-20 Artemiy Volkov <artemiyv@acm.org>
9228
9229 PR gdb/14441
9230 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9231 (c_type_print_modifier, c_type_print_varspec_suffix)
9232 (c_type_print_base): Support printing rvalue reference types.
9233 * c-valprint.c (c_val_print, c_value_print): Support printing
9234 rvalue reference values.
9235
e4347c89
AV
92362017-03-20 Artemiy Volkov <artemiyv@acm.org>
9237
9238 PR gdb/14441
9239 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9240 typename.
9241 * cp-support.c (replace_typedefs): Handle
9242 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9243 * python/py-type.c (typy_lookup_type): Likewise.
9244
53cc15f5
AV
92452017-03-20 Artemiy Volkov <artemiyv@acm.org>
9246
9247 PR gdb/14441
9248 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9249 * parse.c (insert_type): Change assert statement.
9250 (follow_types): Handle rvalue reference types.
9251 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9252 constant.
9253
a65cfae5
AV
92542017-03-20 Artemiy Volkov <artemiyv@acm.org>
9255
9256 PR gdb/14441
9257 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9258 value_ref() interface.
9259 * c-valprint.c (c_value_print): Likewise.
9260 * infcall.c (value_arg_coerce): Likewise.
9261 * python/py-value.c (valpy_reference_value): Likewise.
9262 * valops.c (value_cast, value_reinterpret_cast)
9263 (value_dynamic_cast, typecmp): Likewise.
9264 (value_ref): Parameterize by kind of return value reference type.
9265 * value.h (value_ref): Add new parameter "refcode".
9266
3b224330
AV
92672017-03-20 Artemiy Volkov <artemiyv@acm.org>
9268
9269 PR gdb/14441
9270 * dwarf2read.c (read_tag_reference_type): Use
9271 lookup_lvalue_reference_type() instead of lookup_reference_type().
9272 * eval.c (evaluate_subexp_standard): Likewise.
9273 * f-exp.y: Likewise.
9274 * gdbtypes.c (make_reference_type, lookup_reference_type):
9275 Generalize with rvalue reference types.
9276 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9277 convenience wrappers for lookup_reference_type().
9278 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9279 reference kind parameter.
9280 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9281 wrappers for lookup_reference_type().
9282 * guile/scm-type.c (gdbscm_type_reference): Use
9283 lookup_lvalue_reference_type() instead of lookup_reference_type().
9284 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9285 * parse.c (follow_types): Likewise.
9286 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9287 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9288 Likewise.
9289 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9290 (gdbpy_invoke_xmethod): Likewise.
9291 * stabsread.c: Provide extra argument to make_reference_type()
9292 call.
9293 * valops.c (value_ref, value_rtti_indirect_type): Use
9294 lookup_lvalue_reference_type() instead of lookup_reference_type().
9295
f9aeb8d4
AV
92962017-03-20 Artemiy Volkov <artemiyv@acm.org>
9297
9298 PR gdb/14441
9299 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9300 (TYPE_IS_REFERENCE): New macro.
9301 (struct type): Add rvalue_reference_type field.
9302 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9303
51457a05
MAL
93042017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9305
9306 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9307 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9308 New function definition.
9309 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9310 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9311 New function declaration.
9312 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9313 * mi/mi-interp.h: New file.
9314 * solib.c (info_sharedlibrary_command): Replace for loop with
9315 ALL_SO_LIBS macro
9316 * solib.h (update_solib_list): New function declaration.
9317 (so_list_head): Move macro.
9318 * solist.h (ALL_SO_LIBS): New macro.
9319
e696b3ad
MAL
93202017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9321
9322 * infcmd.c (post_create_inferior): Remove unused argument in
9323 call to solib_add.
9324 * remote.c (remote_start_remote): Likewise.
9325 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9326 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9327 (enable_break): Likewise.
9328 * solib.c (update_solib_list): Remove unused target argument
9329 and its documentation.
9330 (solib_add): Remove unused target argument. Remove unused
9331 argument in call to update_solib_list.
9332 (info_sharedlibrary_command): Remove unused argument in call
9333 to update_solib_list.
9334 (sharedlibrary_command): Remove unused argument in call to
9335 solib_add.
9336 (handle_solib_event): Likewise.
9337 (reload_shared_libraries): Likewise.
9338 * solib.h (solib_add): Remove unused target argument.
9339
dcb84eda
AA
93402017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9341
9342 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9343 (s390_displaced_step_fixup): Cover relative branches with the
9344 default fixup handling. This fixes lack of support for some
9345 relative branch instructions.
9346
d9cb6cdc
SM
93472017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9348
9349 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9350 ptid from regcache.
9351
1afaf9f4
SM
93522017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9353
9354 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9355 i386_darwin_store_inferior_registers): Use ptid from regcache.
9356
aac12e24
SM
93572017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9358
9359 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9360 i386bsd_store_inferior_registers): Use ptid from regcache.
9361
bbe1eef1
SM
93622017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9363
9364 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9365 hppaobsd_store_registers): Use ptid from regcache.
9366
10799020
SM
93672017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9368
9369 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9370 hppanbsd_store_registers): Use ptid from regcache.
9371
00204cf7
SM
93722017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9373
9374 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9375 from regcache. Use get_ptrace_pid.
9376
11a33714
SM
93772017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9378
9379 * corelow.c (get_core_register_section): Use ptid from regcache,
9380 update doc.
9381
317cd492
SM
93822017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9383
9384 * bsd-uthread.c (bsd_uthread_fetch_registers,
9385 bsd_uthread_store_registers): Use ptid from regcache, set and
9386 restore inferior_ptid.
9387
9ac8a7c2
SM
93882017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9389
9390 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9391 fetch_fp_regs, store_register, store_regs, store_fp_register,
9392 store_fp_regs): Use ptid from regcache.
9393
4ac4bb6a
SM
93942017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9395
9396 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9397 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9398 store_vfp_regs): Use ptid from regcache.
9399
9bcbdca8
PA
94002017-03-17 Pedro Alves <palves@redhat.com>
9401
9402 PR remote/21188
9403 * ser-base.c (ser_base_wait_for): Add comment.
9404 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9405 version.
9406 * ser-unix.c (hardwire_raw): Remove reference to
9407 scb->current_timeout.
9408 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9409 (hardwire_ops): Install ser_base_readchar instead of
9410 hardwire_readchar.
9411 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9412 Remove fields.
9413
7503099f
JG
94142017-03-17 Jonah Graham <jonah@kichwacoders.com>
9415
9416 PR gdb/19637
9417 * python/lib/gdb/printer/bound_registers.py: Add support for
9418 Python 3.
9419
7942e96e
AA
94202017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9421
9422 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9423 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9424 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9425 byte_offset to subobj_byte_offset. Fix the handling of
9426 DWARF_VALUE_STACK on big-endian targets when coming via an
9427 implicit pointer.
9428 (dwarf2_evaluate_loc_desc): Adjust call to
9429 dwarf2_evaluate_loc_desc_full.
9430 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9431 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9432
ba14f379
YQ
94332017-03-16 Yao Qi <yao.qi@linaro.org>
9434
9435 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9436 and REVSH instructions.
9437
b121eeb9
YQ
94382017-03-16 Yao Qi <yao.qi@linaro.org>
9439
9440 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9441 (arm_record_test): Declare.
9442 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9443 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9444 align with the manual.
9445 (thumb_record_misc): Adjust the code order to align with the
9446 manual.
9447 (thumb2_record_decode_insn_handler): Fix instruction matching.
9448 (instruction_reader_thumb): New class.
9449 (arm_record_test): New function.
9450
728a7913
YQ
94512017-03-16 Yao Qi <yao.qi@linaro.org>
9452
9453 * arm-tdep.c (abstract_memory_reader): New class.
9454 (instruction_reader): New class.
9455 (extract_arm_insn): Add argument 'reader'. Callers updated.
9456 (decode_insn): Likewise.
9457
34b43320
DE
94582017-03-16 Doug Evans <dje@google.com>
9459
a7c0469f
DE
9460 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9461 member. Change type of TYPE member to SCM. All uses updated.
9462 (lsscm_make_lazy_string_smob): Add assert.
9463 (lsscm_make_lazy_string): Flag bad length values.
9464 (lsscm_elt_type): New function.
9465 (gdbscm_lazy_string_to_value): Rewrite to use
9466 lsscm_safe_lazy_string_to_value.
9467 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9468 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9469 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9470 in incoming type.
9471 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9472 * guile/scm-type.c (tyscm_scm_to_type): New function.
9473
94742017-03-15 Doug Evans <dje@google.com>
9475
34b43320
DE
9476 PR python/17728, python/18439, python/18779
9477 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9478 member. Change type of TYPE member to PyObject *. All uses updated.
9479 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9480 (gdbpy_create_lazy_string_object): Flag bad length values.
9481 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9482 Handle typedefs in incoming type.
9483 (stpy_lazy_string_elt_type): New function.
9484 (gdbpy_extract_lazy_string): Call it.
9485 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9486 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9487 typedefs in incoming type.
9488
a3a5fecc
DE
94892017-03-16 Doug Evans <dje@google.com>
9490
9491 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9492 * guile/scm-type.c (tyscm_scm_to_type): New function.
9493
28f1c605
JW
94942017-03-16 Jiong Wang <jiong.wang@arm.com>
9495
9496 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9497 "ULONGEST" for "skip".
9498
87c336f6
AA
94992017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9500
9501 PR gdb/21220
9502 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9503 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9504 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9505 over ptrace peek/poke until end of buffer or error.
9506
cf81cf60
SM
95072017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9508
9509 * parse.c (length_of_subexp): Make static.
9510 * parser-defs.h (length_of_subexp): Remove.
9511
a379284a
AA
95122017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9513
9514 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9515 as well.
9516
8a6200ba
PA
95172017-03-14 Pedro Alves <palves@redhat.com>
9518
9519 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9520 (main): Use std::unique_ptr. Remove calls to
9521 cp_demangled_name_parse_free.
9522
f79ec206
SM
95232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9524
9525 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9526 alphabsd_store_inferior_registers): Use regcache->ptid instead
9527 of inferior_ptid.
9528
edb5fb00
SM
95292017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9530
9531 * aix-thread.c (aix_thread_fetch_registers,
9532 aix_thread_store_registers): Use regcache->ptid instead of
9533 inferior_ptid.
9534
55119686
SM
95352017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9536
9537 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9538 store_gregs_to_thread, fetch_fpregs_from_thread,
9539 store_fpregs_to_thread): Use regcache->ptid instead of
9540 inferior_ptid.
9541
6a06fbb7
SM
95422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9543
9544 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9545 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9546 instead of inferior_ptid.
9547
c6386875
SM
95482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9549
9550 * target.c (target_fetch_registers, target_store_registers): Add
9551 assert.
9552
ddaaf0fb
SM
95532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9554
9555 * regcache.h (regcache_get_ptid): New function.
9556 * regcache.c (regcache_get_ptid): New function.
9557
b9da89d1 95582017-03-13 Mark Wielaard <mark@klomp.org>
9559
9560 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9561
5f4d1085
KS
95622017-03-10 Keith Seitz <keiths@redhat.com>
9563
9564 PR c++/8218
9565 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9566
c65d6b55
PA
95672017-03-08 Pedro Alves <palves@redhat.com>
9568
9569 PR gdb/18360
9570 * infrun.c (start_step_over, do_target_resume, resume)
9571 (restart_threads): Assert we're not resuming a thread that is
9572 meant to be stopped.
9573 (infrun_thread_stop_requested_callback): Delete.
9574 (infrun_thread_stop_requested): If the thread is internally
9575 stopped, queue a pending stop event and clear the thread's
9576 inline-frame state.
9577 (handle_stop_requested): New function.
9578 (handle_syscall_event, handle_inferior_event_1): Use
9579 handle_stop_requested.
9580 (handle_stop_requested): New function.
9581 (handle_signal_stop): Set the thread's stop_signal here instead of
9582 at caller.
9583 (finish_step_over): Clear step over info unconditionally.
9584 (handle_signal_stop): If the user had interrupted the event
9585 thread, consider the stop a random signal.
9586 (handle_signal_stop) <signal arrived while stepping over
9587 breakpoint>: Don't restart threads here.
9588 (stop_waiting): Don't clear step-over info here.
9589
15c22686
PA
95902017-03-08 Pedro Alves <palves@redhat.com>
9591
9592 PR 21206
9593 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9594 goes to argument 2, not 1.
9595
6e5d74e7
PA
95962017-03-08 Pedro Alves <palves@redhat.com>
9597
9598 PR cli/21218
9599 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9600 display_gdb_prompt.
9601 (command_line_input): Add comment.
9602
9753a2f6
PA
96032017-03-08 Pedro Alves <palves@redhat.com>
9604
9605 PR tui/21216
9606 * tui/tui-file.c (tui_file::write): New.
9607 * tui/tui-file.h (tui_file): Override "write".
9608 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9609 factored out from ...
9610 (tui_puts): ... here.
9611 (tui_putc): Use them.
9612 (tui_write): New function.
9613 * tui/tui-io.h (tui_write): Declare.
9614
1672e0d9
SDJ
96152017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9616
9617 * Makefile.in (SFILES): Replace "environ.c" with
9618 "common/environ.c".
9619 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9620 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9621 to...
9622 * common/environ.c: ... here.
9623 * environ.h: Moved to...
9624 * common/environ.h: ... here.
9625
f7bb4e3a
PB
96262017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9627
9628 * gdbarch.sh (pstring_ptr): New static function.
9629 (gdbarch_disassembler_options): Use it.
9630 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9631 not valid_disassembler_option->name.
9632 * gdbarch.c: Regenerate.
9633
e45ced6c
PB
96342017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9635
9636 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9637
5f6fd321
PA
96382017-03-07 Pedro Alves <palves@redhat.com>
9639
9640 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9641
6dbb839a 96422017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
9643
9644 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9645 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9646 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 9647 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 9648
d274ecf4
SM
96492017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9650
9651 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9652
df97be55
SM
96532017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9654
9655 * remote.c (remote_add_target_side_commands): Use range-based
9656 for loop.
9657
7d45f3df
YQ
96582017-03-03 Yao Qi <yao.qi@linaro.org>
9659
9660 PR gdb/21165
9661 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9662 value is lazy.
9663 * valprint.c (common_val_print): Likewise.
9664
65b48a81
PB
96652017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9666
9667 * NEWS: Mention new set/show disassembler-options commands.
9668 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9669 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9670 (prospective_options): New static variable.
9671 (gdb_disassembler::gdb_disassembler): Initialize
9672 m_di.disassembler_options.
9673 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9674 (get_disassembler_options): New function.
9675 (set_disassembler_options): Likewise.
9676 (set_disassembler_options_sfunc): Likewise.
9677 (show_disassembler_options_sfunc): Likewise.
9678 (disassembler_options_completer): Likewise.
9679 (_initialize_disasm): Likewise.
9680 * disasm.h (get_disassembler_options): New prototype.
9681 (set_disassembler_options): Likewise.
9682 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9683 (gdbarch_verify_disassembler_options): Likewise.
9684 * gdbarch.c: Regenerate.
9685 * gdbarch.h: Likewise.
9686 * arm-tdep.c (num_disassembly_options): Delete.
9687 (set_disassembly_style): Likewise.
9688 (arm_disassembler_options): New static variable.
9689 (set_disassembly_style_sfunc): Convert short style name into long
9690 option name. Call set_disassembler_options.
9691 (show_disassembly_style_sfunc): New function.
9692 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9693 set_gdbarch_verify_disassembler_options.
9694 (_initialize_arm_tdep): Delete regnames variable and update callers.
9695 (arm_disassembler_options): Initialize.
9696 (disasm_options): New variable.
9697 (num_disassembly_options): Rename from this...
9698 (num_disassembly_styles): ...to this. Compute by scanning through
9699 disasm_options.
9700 (valid_disassembly_styles): Initialize using disasm_options.
9701 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9702 set_arm_regname_option.
9703 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9704 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9705 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9706 set_gdbarch_verify_disassembler_options.
9707 * s390-tdep.c (s390_disassembler_options): New static variable.
9708 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9709 set_gdbarch_verify_disassembler_options.
9710
d538e36d
SM
97112017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9712
9713 * remote.c (remote_add_target_side_condition): Remove "struct"
9714 keyword from range-based for loop.
9715
83621223
SM
97162017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9717
9718 * remote.c (remote_add_target_side_condition): Use range-based
9719 for loop. Update comment.
9720
2123df0e
YQ
97212017-02-27 Yao Qi <yao.qi@linaro.org>
9722
9723 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9724
8e368124
AH
97252017-02-26 Alan Hayward <alan.hayward@arm.com>
9726
9727 * regcache.c (regcache_raw_update): New function.
9728 (regcache_raw_read): Move code to regcache_raw_update.
9729 * regcache.h (regcache_raw_update): New declaration.
9730 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9731
a49dd8dd
JK
97322017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9733
9734 * dwarf2read.c (create_debug_type_hash_table): Initialize
9735 header.signature and header.type_offset_in_tu.
9736
34e4bae9
PA
97372017-02-24 Pedro Alves <palves@redhat.com>
9738
9739 * symtab.c (make_file_symbol_completion_list_1): Use
9740 add_symtab_completions.
9741
b0e4b369
AH
97422017-02-24 Alan Hayward <alan.hayward@arm.com>
9743
9744 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9745
975c21ab
AH
97462017-02-24 Alan Hayward <alan.hayward@arm.com>
9747
9748 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9749 I386_MAX_REGISTER_SIZE.
9750 (i386_pseudo_register_write): Likewise.
9751 (i386_process_record): Likewise.
9752 * i387-tdep.c (i387_supply_xsave): Likewise.
9753 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9754 (store_register): Likewise.
9755
14bc53a8
PA
97562017-02-23 Pedro Alves <palves@redhat.com>
9757
9758 * ada-lang.c: Include "common/function-view.h".
9759 (ada_iterate_over_symbols): Adjust to use function_view as
9760 callback type.
9761 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9762 (ada_make_symbol_completion_list): Use a lambda.
9763 (ada_exc_search_name_matches): Delete.
9764 (name_matches_regex): New.
9765 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9766 * compile/compile-c-support.c: Include "common/function-view.h".
9767 (print_one_macro): Change prototype to accept a ui_file pointer.
9768 (write_macro_definitions): Use a lambda.
9769 * dwarf2read.c: Include "common/function-view.h".
9770 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9771 (dw2_expand_symtabs_matching): Adjust to use function_view as
9772 callback type.
9773 * language.h: Include "common/function-view.h".
9774 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9775 function_view as callback type.
9776 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9777 * linespec.c: Include "common/function-view.h".
9778 (collect_info::add_symbol): New method.
9779 (struct symbol_and_data_callback, iterate_inline_only, struct
9780 symbol_matcher_data, iterate_name_matcher): Delete.
9781 (iterate_over_all_matching_symtabs): Adjust to use function_view
9782 as callback type and lambdas.
9783 (iterate_over_file_blocks): Adjust to use function_view as
9784 callback type.
9785 (decode_compound_collector): Now a class with private fields.
9786 (decode_compound_collector::release_symbols): New method.
9787 (collect_one_symbol): Rename to...
9788 (decode_compound_collector::operator()): ... this and adjust.
9789 (lookup_prefix_sym): decode_compound_collector construction bits
9790 move to decode_compound_collector ctor. Pass the
9791 decode_compound_collector object directly as callback. Remove
9792 cleanups and use decode_compound_collector::release_symbols
9793 instead.
9794 (symtab_collector): Now a class with private fields.
9795 (symtab_collector::release_symtabs): New method.
9796 (add_symtabs_to_list): Rename to...
9797 (symtab_collector::operator()): ... this and adjust.
9798 (collect_symtabs_from_filename): symtab_collector construction
9799 bits move to symtab_collector ctor. Pass the symtab_collector
9800 object directly as callback. Remove cleanups and use
9801 symtab_collector::release_symtabs instead.
9802 (collect_symbols): Delete.
9803 (add_matching_symbols_to_info): Use lambdas.
9804 * macrocmd.c (print_macro_callback): Delete.
9805 (info_macro_command): Use a lambda.
9806 (info_macros_command): Pass print_macro_definition as callable
9807 directly.
9808 (print_one_macro): Remove 'ignore' parameter.
9809 (macro_list_command): Adjust.
9810 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9811 (macro_for_each_data::user_data): Delete field.
9812 (foreach_macro): Adjust to call the function_view.
9813 (macro_for_each): Adjust to use function_view as callback type.
9814 (foreach_macro_in_scope): Adjust to call the function_view.
9815 (macro_for_each_in_scope): Adjust to use function_view as callback
9816 type.
9817 * macrotab.h: Include "common/function-view.h".
9818 (macro_callback_fn): Declare a prototype instead of a pointer.
9819 Remove "user_data" parameter.
9820 (macro_for_each, macro_for_each_in_scope): Adjust to use
9821 function_view as callback type.
9822 * psymtab.c (partial_map_expand_apply)
9823 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9824 Adjust to use function_view as callback type and to return bool.
9825 (psym_expand_symtabs_matching): Adjust to use function_view as
9826 callback types.
9827 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9828 to use function_view as callback type and to return bool.
9829 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9830 callback types.
9831 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9832 as callback types.
9833 * symfile.h: Include "common/function-view.h".
9834 (expand_symtabs_file_matcher_ftype)
9835 (expand_symtabs_symbol_matcher_ftype)
9836 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9837 return bool.
9838 (quick_symbol_functions::map_symtabs_matching_filename)
9839 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9840 function_view as callback type and return bool.
9841 (expand_symtabs_matching): Adjust to use function_view as callback
9842 type.
9843 (maintenance_expand_name_matcher)
9844 (maintenance_expand_file_matcher): Delete.
9845 (maintenance_expand_symtabs): Use lambdas.
9846 * symtab.c (iterate_over_some_symtabs): Adjust to use
9847 function_view as callback types and return bool.
9848 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9849 of a cleanup.
9850 (lookup_symtab_callback): Delete.
9851 (lookup_symtab): Use a lambda.
9852 (iterate_over_symbols): Adjust to use function_view as callback
9853 type.
9854 (struct search_symbols_data, search_symbols_file_matches)
9855 (search_symbols_name_matches): Delete.
9856 (search_symbols): Use a pair of lambdas.
9857 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9858 (symtab_expansion_callback): Delete.
9859 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9860 * symtab.h: Include "common/function-view.h".
9861 (iterate_over_some_symtabs): Adjust to use function_view as
9862 callback type and return bool.
9863 (iterate_over_symtabs): Adjust to use function_view as callback
9864 type.
9865 (symbol_found_callback_ftype): Remove 'data' parameter and return
9866 bool.
9867 (iterate_over_symbols): Adjust to use function_view as callback
9868 type.
9869
07e253aa
PA
98702017-02-23 Pedro Alves <palves@redhat.com>
9871
9872 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9873 (%.o) <unittests/%.c>: New pattern.
9874 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9875 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9876 * common/function-view.h: New file.
9877 * unittests/function-view-selftests.c: New file.
9878 * configure: Regenerate.
9879
8eaf5320
SM
98802017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9881
9882 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9883 inferior_ptid.
9884 * go32-nat.c (go32_thread_alive): Likewise.
9885
38768751
YQ
98862017-02-23 Yao Qi <yao.qi@linaro.org>
9887
9888 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9889 delete.
9890
0a8beaba
YQ
98912017-02-23 Yao Qi <yao.qi@linaro.org>
9892
9893 * varobj.c (varobj_clear_saved_item): Use delete instead of
9894 xfree.
9895 (update_dynamic_varobj_children): Likewise.
9896
58fdfd2c
JK
98972017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9898
9899 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9900
1b90b139
SM
99012017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9902
9903 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9904 m_enum_value to 0 in default constructor.
9905
2039d74e
EBM
99062017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9907
9908 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9909 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9910 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9911 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9912 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9913 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9914 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9915 IS_STORE_CONDITIONAL_INSN.
9916
7814882a
JK
99172017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9918
9919 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9920
0ae60b63
JK
99212017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9922
9923 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9924
0224619f
JK
99252017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9926
9927 * dwarf2read.c (skip_one_die, read_attribute_value)
9928 (dwarf2_const_value_attr, dump_die_shallow)
9929 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9930 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9931
0af92d60
JK
99322017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9933
9934 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9935 (dwarf_parse_macro_header): Accept DWARF version 5.
9936 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9937
216f72a1
JK
99382017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9939
9940 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9941 DW_AT_GNU_*.
9942 * common/common-exceptions.h (enum errors): Likewise.
9943 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9944 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9945 (dwarf_expr_context::execute_stack_op): Likewise.
9946 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9947 Likewise.
9948 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9949 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9950 (show_entry_values_debug, call_site_to_target_addr)
9951 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9952 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9953 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9954 (value_of_dwarf_block_entry, indirect_pieced_value)
9955 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9956 (disassemble_dwarf_expression): Likewise.
9957 * dwarf2read.c (process_die, inherit_abstract_dies)
9958 (read_call_site_scope): Likewise.
9959 * gdbtypes.h (struct func_type, struct call_site_parameter)
9960 (struct call_site): Likewise.
9961 * stack.c (read_frame_arg): Likewise.
9962 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9963
43988095
JK
99642017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9965
9966 * defs.h (read_unsigned_leb128): New declaration.
9967 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9968 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9969 (dwarf2_find_location_expression): Call also
9970 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9971 * dwarf2loc.h (dwarf2_version): New declaration.
9972 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9973 rnglists.
9974 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9975 .debug_rnglists.
9976 (struct dwop_section_names): Add loclists_dwo.
9977 (dwop_section_names): Add .debug_loclists.dwo.
9978 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9979 (struct dwarf2_per_cu_data): Add dwarf_version.
9980 (struct dwo_sections): Add loclists.
9981 (struct attr_abbrev): Add implicit_const.
9982 (read_indirect_line_string): New declaration.
9983 (read_unsigned_leb128): Delete declaration.
9984 (rcuh_kind): New definition.
9985 (read_and_check_comp_unit_head): Change parameter
9986 is_debug_types_section to section_kind.
9987 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9988 (read_comp_unit_head): Change parameter abfd to section, add parameter
9989 section_kind. Handle DWARF-5.
9990 (error_check_comp_unit_head): Accept also DWARF version 5.
9991 (read_and_check_comp_unit_head): Change parameter
9992 is_debug_types_section to section_kind.
9993 (read_and_check_type_unit_head): Delete function.
9994 (read_abbrev_offset): Handle DWARF-5.
9995 (create_debug_type_hash_table): Add parameter section_kind. Process
9996 only DW_UT_type. Use signature and type_offset_in_tu from struct
9997 comp_unit_head.
9998 (create_debug_types_hash_table): Update create_debug_type_hash_table
9999 caller.
10000 (create_all_type_units): Call create_debug_type_hash_table.
10001 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10002 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10003 caller.
10004 (skip_one_die): Handle DW_FORM_implicit_const.
10005 (dwarf2_rnglists_process): New function.
10006 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10007 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10008 (read_attribute_value): Handle DW_FORM_implicit_const,
10009 DW_FORM_line_strp.
10010 (read_attribute): Handle DW_FORM_implicit_const.
10011 (read_indirect_string_at_offset_from): New function from
10012 read_indirect_string_at_offset.
10013 (read_indirect_string_at_offset): Call
10014 read_indirect_string_at_offset_from.
10015 (read_indirect_line_string_at_offset): New function.
10016 (read_indirect_string): New function comment.
10017 (read_indirect_line_string): New function.
10018 (read_unsigned_leb128): Make it global.
10019 (dwarf2_string_attr): Handle DWARF-5.
10020 (add_include_dir_stub, read_formatted_entries): New functions.
10021 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10022 Handle DWARF-5.
10023 (per_cu_header_read_in): Update read_comp_unit_head caller.
10024 (dwarf2_version): New function.
10025 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10026 rnglists.
10027 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10028 fields.
10029
22d2f3ab
JK
100302017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10031
10032 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10033
5f46c5a5
JK
100342017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10035
10036 * dwarf2read.c (dwarf2_ranges_process): New function from
10037 dwarf2_ranges_read.
10038 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10039 dwarf2_ranges_process.
10040
78d4d2c5
JK
100412017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10042
10043 * dwarf2read.c (create_debug_type_hash_table): New function from
10044 create_debug_types_hash_table.
10045 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10046 (create_all_type_units, open_and_init_dwo_file): Update
10047 create_debug_types_hash_table callers.
10048
1b076f25
SDJ
100492017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10050
10051 PR gdb/16188
10052 * fork-child.c (trace_start_error): Fix thinko. va_end should
10053 refer to 'ap', not 'args'.
10054
0db8980c
SDJ
100552017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10056 Pedro Alves <palves@redhat.com>
10057
10058 PR gdb/16188
10059 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10060 calls succeeded.
10061 * fork-child.c (trace_start_error): New function.
10062 (trace_start_error_with_name): Likewise.
10063 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10064 * inf-ptrace.c (inf_ptrace_me): Likewise.
10065 * inferior.h (trace_start_error): New prototype.
10066 (trace_start_error_with_name): Likewise.
10067
99e8a4f9
SDJ
100682017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10069
10070 PR gdb/21164
10071 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10072 NULL before using it.
10073 * symmisc.c (maintenance_print_symbols): Likewise.
10074 (maintenance_print_msymbols): Likewise.
10075
4e746bb6
TW
100762017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10077
10078 * NEWS: Add record Python bindings entry.
10079
100802017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10081
10082 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10083 py-record-full.o.
10084 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10085 * python/py-record-btrace.c, python/py-record-btrace.h,
10086 python/py-record-full.c, python/py-record-full.h: New file.
10087 * python/py-record.c: Add include for py-record-btrace.h and
10088 py-record-full.h.
10089 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10090 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10091 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10092 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10093 New definition.
10094 (gdbpy_initialize_btrace): New export.
10095 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10096
100972017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10098
10099 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10100 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10101 * python/py-record.c: New file.
10102 * python/python-internal.h (gdbpy_start_recording,
10103 gdbpy_current_recording, gdpy_stop_recording,
10104 gdbpy_initialize_record): New export.
10105 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10106 (python_GdbMethods): Add gdbpy_start_recording,
10107 gdbpy_current_recording and gdbpy_stop_recording.
10108
101092017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10110
10111 * record-btrace.c (record_btrace_record_method): New function.
10112 (init_record_btrace_ops): Initialize to_record_method.
10113 * record-full.c (record_full_record_method): New function.
10114 (init_record_full_ops, init_record_full_core_ops): Add
10115 record_full_record_method.
10116 * record.h (enum record_method): New enum.
10117 * target-debug.h (target_debug_print_enum_record_method: New define.
10118 * target-delegates.c: Regenerate.
10119 * target.c (target_record_method): New function.
10120 * target.h: Include record.h.
10121 (struct target_ops) <to_record_method>: New field.
10122 (target_record_method): New export.
10123
101242017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10125
10126 * record.h (record_start, record_stop): New export.
10127 * record.c (record_start, record_stop): New function.
10128
101292017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10130
10131 * btrace.c (btrace_fetch): Copy function call segments pointer
10132 into a vector.
10133 (btrace_clear): Clear the vector.
10134 (btrace_find_insn_by_number): Use binary search to find the correct
10135 function call segment.
10136 * btrace.h (brace_fun_p): New typedef.
10137 (struct btrace_thread_info) <functions>: New field.
10138
101392017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10140
10141 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10142 * btrace.c (btrace_decode_error): ... here. New function.
10143 * btrace.h (btrace_decode_error): New export.
10144
101452017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10146
10147 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10148 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10149 btrace_find_insn_by_number): Remove special case for gaps.
10150 * btrace.h (btrace_insn_get_error): New export.
10151 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10152 * record-btrace.c (btrace_insn_history): Print number for gaps.
10153 (record_btrace_info, record_btrace_goto): Handle gaps.
10154
3f77c769
TT
101552017-02-14 Tom Tromey <tom@tromey.com>
10156
10157 PR python/13598:
10158 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10159 event.
10160 * python/py-evts.c (gdbpy_initialize_py_events): Add
10161 before_prompt registry.
10162 * python/py-events.h (events_object) <before_prompt>: New field.
10163
4c2c7ac6
MM
101642017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10165
10166 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10167
5cf30ebf
LM
101682017-02-13 Luis Machado <lgustavo@codesourcery.com>
10169
10170 * symfile (_initialize_symfile): Add usage text to the load command's
10171 help text.
10172
26a06916
SM
101732017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10174
10175 * utils.c (defaulted_query): Don't query on secondary UIs.
10176
0b145e37
TT
101772017-02-10 Tom Tromey <tom@tromey.com>
10178
10179 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10180
2d8365c4
TT
101812017-02-10 Tom Tromey <tom@tromey.com>
10182
10183 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10184 "cleanup" local.
10185 * python/py-type.c (typy_legacy_template_argument): Remove
10186 unnecessary "cleanup" local.
10187
2bb8f231
TT
101882017-02-10 Tom Tromey <tom@tromey.com>
10189
10190 * python/python.c (do_start_initialization): New function, from
10191 _initialize_python.
10192 (_initialize_python): Call do_start_initialization.
10193 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10194 goto.
10195
1bdfaf42
TT
101962017-02-10 Tom Tromey <tom@tromey.com>
10197
10198 * python/py-prettyprint.c (pretty_print_one_value): Use
10199 gdbpy_ref.
10200
88b6faea
TT
102012017-02-10 Tom Tromey <tom@tromey.com>
10202
10203 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10204 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10205 gdbpy_ref.
10206 * python/py-type.c (field_new): Use gdbpy_ref.
10207 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10208 gdbpy_ref.
10209 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10210 (py_free_pspace): Likewise.
10211 (pspace_to_pspace_object): Likewise.
10212 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10213 (py_free_objfile): Likewise.
10214 (objfile_to_objfile_object): Likewise.
10215 * python/py-inferior.c (delete_thread_object): Use
10216 gdbpy_ref.
10217 (infpy_read_memory): Likewise.
10218 (py_free_inferior): Likewise.
10219 * python/py-evtregistry.c (create_eventregistry_object): Use
10220 gdbpy_ref.
10221 * python/py-event.c (create_event_object): Use gdbpy_ref.
10222
7780f186
TT
102232017-02-10 Tom Tromey <tom@tromey.com>
10224
10225 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10226 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10227 used.
10228 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10229 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10230 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10231 python/py-framefilter.c, python/py-function.c,
10232 python/py-inferior.c, python/py-infevents.c,
10233 python/py-linetable.c, python/py-newobjfileevent.c,
10234 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10235 python/py-signalevent.c, python/py-stopevent.c,
10236 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10237 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10238 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10239 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10240
d4b0bb18
TT
102412017-02-10 Tom Tromey <tom@tromey.com>
10242
10243 * ui-out.h (ui_out_emit_type): New class.
10244 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10245 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10246 and ui_out_emit_tuple.
10247 (enumerate_locals): Likewise.
10248 (py_mi_print_variables, py_print_locals, py_print_args): Use
10249 ui_out_emit_list.
10250 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10251 ui_out_emit_list.
10252 * common/gdb_optional.h: New file.
10253
f67f945c
MG
102542017-02-10 Martin Galvan <martingalvan@sourceware.org>
10255
10256 * MAINTAINERS (Write After Approval): Update my e-mail address.
10257
18da0c51
MG
102582017-02-10 Martin Galvan <martingalvan@sourceware.org>
10259
10260 PR gdb/21122
10261 * breakpoint.c (_initialize_breakpoint): Update the help description
10262 of the 'commands' command to indicate that it takes a list argument.
10263
62c14536
SM
102642017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10265
10266 * interps.c (current_interp_set_logging): Remove "return".
10267
ff6fa247
GB
102682017-02-09 Gary Benson <gbenson@redhat.com>
10269
10270 * symtab.c (add_symtab_completions): Prevent NULL pointer
10271 dereference.
10272
a474bd8e
PA
102732017-02-08 Pedro Alves <palves@redhat.com>
10274
10275 * interps.c (interp::interp): Remove reference to quiet_p.
10276 (interp_set): Make static. Remove dead "Switching to" output
10277 code.
10278 (interp_quiet_p, interp_set_quiet): Delete.
10279 (interpreter_exec_cmd): Don't set the interpreter quiet.
10280 * interps.h (interp_quiet_p): Make static.
10281 (class interp) <quiet_p>: Remove field
10282
3d7b173c
JG
102832017-02-08 Jerome Guitton <guitton@adacore.com>
10284
604c4576
JG
10285 * cli/cli-decode.c (find_command_name_length): Make it extern.
10286 * cli/cli-decode.h (find_command_name_length): Declare.
10287 * cli/cli-script.c (command_name_equals, line_first_arg):
10288 New functions.
10289 (process_next_line): Use cli-decode to parse command names.
10290 (build_command_line): Make args a constant pointer.
10291
102922017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 10293
3d7b173c
JG
10294 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10295 Remove case-insensitive search.
10296
1291063d
JM
102972017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10298
10299 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10300 at the end of the line. Avoids an ARI warning.
10301
20b477a7
LM
103022017-02-06 Luis Machado <lgustavo@codesourcery.com>
10303
10304 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10305 rdseed instructions.
10306 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10307
3f7b46f2
IR
103082017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10309
10310 PR tdep/20936
10311 Provide and use sparc32 and sparc64 target description XML files.
10312 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10313 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10314 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10315 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10316 * features/sparc/sparc32-solaris.xml: New file.
10317 * features/sparc/sparc64-solaris.xml: New file.
10318 * features/sparc/sparc32-solaris.c: Generated.
10319 * features/sparc/sparc64-solaris.c: Generated.
10320 * sparc-tdep.h: Account for differences in target descriptions.
10321 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10322 (sparc32_register_type): Use target provided registers.
10323 (validate_tdesc_registers): New function.
10324 (sparc32_gdbarch_init): Use tdesc_has_registers.
10325 Set pseudoregister functions.
10326 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10327 (sparc64_register_type): Use target provided registers.
10328 (sparc64_init_abi): Set pseudoregister functions.
10329
f0fd41c1
TT
103302017-02-03 Tom Tromey <tom@tromey.com>
10331
10332 PR rust/21097:
10333 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10334 with a single member.
10335
d6f9b0fb
PA
103362017-02-03 Pedro Alves <palves@redhat.com>
10337
10338 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10339 (cli_interp_base::~cli_interp_base): New.
10340 (cli_interp): New struct.
10341 (as_cli_interp): Cast the interp itself to cli_interp.
10342 (cli_interpreter_pre_command_loop): Rename to ...
10343 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10344 parameter.
10345 (cli_interpreter_init): Rename to ...
10346 (cli_interp::init): ... this. Remove 'self' parameter. Use
10347 boolean. Make extern.
10348 (cli_interpreter_resume): Rename to ...
10349 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10350 extern.
10351 (cli_interpreter_suspend): Rename to ...
10352 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10353 extern.
10354 (cli_interpreter_exec): Rename to ...
10355 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10356 extern.
10357 (cli_interpreter_supports_command_editing): Rename to ...
10358 (cli_interp_base::supports_command_editing): ... this. Remove
10359 'interp' parameter. Make extern.
10360 (cli_ui_out): Rename to ...
10361 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10362 Make extern.
10363 (cli_set_logging): Rename to ...
10364 (cli_interp_base::set_logging): ... this. Remove 'interp'
10365 parameter. Make extern.
10366 (cli_interp_procs): Delete.
10367 (cli_interp_factory): Adjust to use "new".
10368 * cli/cli-interp.h: Include "interps.h".
10369 (struct cli_interp_base): New struct.
10370 * interps.c (struct interp): Delete. Fields moved to interps.h.
10371 (interp_new): Delete.
10372 (interp::interp, interp::~interp): New.
10373 (interp_set): Use bool, and return void. Assume the interpreter
10374 has suspend, init and resume methods, and that the all return
10375 void.
10376 (set_top_level_interpreter): interp_set returns void.
10377 (interp_ui_out): Adapt.
10378 (current_interp_set_logging): Adapt.
10379 (interp_data): Delete.
10380 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10381 (interp_exec): Adapt.
10382 (top_level_interpreter_data): Delete.
10383 * interps.h (interp_init_ftype, interp_resume_ftype)
10384 (interp_suspend_ftype, interp_exec_ftype)
10385 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10386 (class interp): New.
10387 (interp_new): Delete.
10388 (interp_set): Now returns void. Use bool.
10389 (interp_data, top_level_interpreter_data): Delete.
10390 * mi/mi-common.h: Include interps.h.
10391 (class mi_interp): Inherit from interp. Define a ctor. Declare
10392 init, resume, suspect, exec, interp_ui_out, set_logging and
10393 pre_command_loop methods.
10394 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10395 (mi_interpreter_init): Rename to ...
10396 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10397 bool, return void and make extern. Adjust.
10398 (mi_interpreter_resume): ... Rename to ...
10399 (mi_interp::resume): ... this. Remove the 'data' parameter,
10400 return void and make extern. Adjust.
10401 (mi_interpreter_suspend): ... Rename to ...
10402 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10403 return void and make extern. Adjust.
10404 (mi_interpreter_exec): ... Rename to ...
10405 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10406 extern. Adjust.
10407 (mi_interpreter_pre_command_loop): ... Rename to ...
10408 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10409 parameter and make extern.
10410 (mi_on_normal_stop_1): Adjust.
10411 (mi_ui_out): Rename to ...
10412 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10413 parameter and make extern. Adjust.
10414 (mi_set_logging): Rename to ...
10415 (mi_interp::set_logging): ... this. Remove the 'interp'
10416 parameter and make extern. Adjust.
10417 (mi_interp_procs): Delete.
10418 (mi_interp_factory): Adjust to use 'new'.
10419 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10420 (mi_print_exception, mi_execute_command, mi_load_progress):
10421 Adjust.
10422 * tui/tui-interp.c (tui_interp): New class.
10423 (as_tui_interp): Return a tui_interp pointer.
10424 (tui_on_normal_stop, tui_on_signal_received)
10425 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10426 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10427 to use interp::interp_ui_out.
10428 (tui_init): Rename to ...
10429 (tui_interp::init): ... this. Remove the 'self' parameter, use
10430 bool, return void and make extern. Adjust.
10431 (tui_resume): Rename to ...
10432 (tui_interp::resume): ... this. Remove the 'data' parameter,
10433 return void and make extern. Adjust.
10434 (tui_suspend): Rename to ...
10435 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10436 return void and make extern. Adjust.
10437 (tui_ui_out): Rename to ...
10438 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10439 parameter, and make extern. Adjust.
10440 (tui_exec): Rename to ...
10441 (tui_interp::exec): ... this. Remove the 'data' parameter and
10442 make extern.
10443 (tui_interp_procs): Delete.
10444 (tui_interp_factory): Use "new".
10445
65c40c95
TT
104462017-02-02 Tom Tromey <tom@tromey.com>
10447
10448 * rust-exp.y (ends_raw_string, space_then_number)
10449 (rust_identifier_start_p): Return bool.
10450 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10451 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10452 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10453 (rust_chartype_p): Return bool.
10454 (val_print_struct, rust_print_struct_def, rust_print_type):
10455 Update.
10456 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10457 Return bool.
10458
b50f188d
TT
104592017-02-02 Tom Tromey <tom@tromey.com>
10460
10461 * rust-lang.c: Reindent.
10462
03c85b11
TT
104632017-02-02 Tom Tromey <tom@tromey.com>
10464
10465 * rust-lang.h (rust_crate_for_block): Update.
10466 * rust-lang.c (rust_crate_for_block): Return std::string.
10467 (rust_get_disr_info): Use std:;string, not
10468 gdb::unique_xmalloc_ptr.
10469 * rust-exp.y (crate_name): Update.
10470
9b6da501
PA
104712017-02-02 Pedro Alves <palves@redhat.com>
10472
10473 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10474 field out of gdb_disassembler_test and make it static.
10475
ec4cb20b
PA
104762017-02-02 Pedro Alves <palves@redhat.com>
10477
10478 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10479 mi1_interp and mi_interp fields.
10480
5be5dbf0
PA
104812017-02-02 Pedro Alves <palves@redhat.com>
10482
616268b6
PA
10483 * cli/cli-interp.c (struct saved_output_files, saved_output):
10484 Moved from cli/cli-logging.c.
10485 (cli_set_logging): New function.
10486 (cli_interp_procs): Install cli_set_logging.
10487 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10488 Declare.
10489 * cli/cli-logging.c (struct saved_output_files, saved_output):
10490 Moved to cli/cli-interp.c.
10491 (pop_output_files): Don't save outputs here.
10492 (make_logging_output): New function.
10493 (handle_redirections): Don't build tee nor save previous outputs
10494 here.
10495 * interps.c (current_interp_set_logging): Change prototype.
10496 Assume there's always a set_logging_proc method installed.
10497 * interps.h (interp_set_logging_ftype): Change prototype.
10498 (current_interp_set_logging): Change prototype and adjust comment.
10499 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10500 use make_logging_output.
10501 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
105022017-02-02 Pedro Alves <palves@redhat.com>
10503
5be5dbf0
PA
10504 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10505 from ...
10506 (set_logging_overwrite): ... here.
10507 (logging_no_redirect_file): Delete.
10508 (set_logging_redirect): Don't handle redirection on the fly.
10509 Instead warn that "logging off" / "logging on" is necessary.
10510 (pop_output_files): Delete references to logging_no_redirect_file.
10511 (show_logging_command): Always speak in terms of what will happen
10512 once logging is reenabled.
10513
c99cc448
PA
105142017-02-02 Pedro Alves <palves@redhat.com>
10515
10516 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10517
8b172ce7
PA
105182017-02-02 Pedro Alves <palves@redhat.com>
10519
10520 * disasm.c (gdb_pretty_print_insn): Rename to ...
10521 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10522 Remove gdbarch parameter. Adapt to clear the object's buffers
10523 instead of allocating new buffers, and to print using the object's
10524 gdb_disassembler instead of calling gdb_print_insn.
10525 (dump_insns): Use gdb_pretty_print_disassembler.
10526 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10527 (gdb_pretty_print_disassembler): New class.
10528 * record-btrace.c (btrace_insn_history): Use
10529 gdb_pretty_print_disassembler.
10530
d7e74731
PA
105312017-02-02 Pedro Alves <palves@redhat.com>
10532
10533 * ada-lang.c (type_as_string): Use string_file.
10534 * ada-valprint.c (ada_print_floating): Use string_file.
10535 * ada-varobj.c (ada_varobj_scalar_image)
10536 (ada_varobj_get_value_image): Use string_file.
10537 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10538 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10539 * breakpoint.c (update_inserted_breakpoint_locations)
10540 (insert_breakpoint_locations, reattach_breakpoints)
10541 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10542 (print_it_watchpoint): Use string_file.
10543 (save_breakpoints): Use stdio_file.
10544 * c-exp.y (oper): Use string_file.
10545 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10546 tee_file.
10547 (pop_output_files): Use delete.
10548 (handle_redirections): Use stdio_file and tee_file.
10549 * cli/cli-setshow.c (do_show_command): Use string_file.
10550 * compile/compile-c-support.c (c_compute_program): Use
10551 string_file.
10552 * compile/compile-c-symbols.c (generate_vla_size): Take a
10553 'string_file &' instead of a 'ui_file *'.
10554 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10555 of a 'ui_file *'. Use string_file.
10556 (generate_c_for_variable_locations): Take a 'string_file &'
10557 instead of a 'ui_file *'.
10558 * compile/compile-internal.h (generate_c_for_for_one_variable):
10559 Take a 'string_file &' instead of a 'ui_file *'.
10560 * compile/compile-loc2c.c (push, pushf, unary, binary)
10561 (print_label, pushf_register_address, pushf_register)
10562 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10563 'ui_file *'. Adjust.
10564 * compile/compile.c (compile_to_object): Use string_file.
10565 * compile/compile.h (compile_dwarf_expr_to_c)
10566 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10567 'ui_file *'.
10568 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10569 (replace_typedefs_qualified_name): Use string_file and
10570 obstack_copy0.
10571 * disasm.c (gdb_pretty_print_insn): Use string_file.
10572 (gdb_disassembly): Adjust reference the null_stream global.
10573 (do_ui_file_delete): Delete.
10574 (gdb_insn_length): Use null_stream.
10575 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10576 * dwarf2loc.c (dwarf2_compile_property_to_c)
10577 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10578 'string_file &' instead of a 'ui_file *'.
10579 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10580 * dwarf2read.c (do_ui_file_peek_last): Delete.
10581 (dwarf2_compute_name): Use string_file.
10582 * event-top.c (gdb_setup_readline): Use stdio_file.
10583 * gdbarch.sh (verify_gdbarch): Use string_file.
10584 * gdbtypes.c (safe_parse_type): Use null_stream.
10585 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10586 string_file.
10587 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10588 'string_file *' instead of a 'ui_file *'.
10589 (gdbscm_arch_disassemble): Use string_file.
10590 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10591 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10592 inherits from ui_file.
10593 (ioscm_file_port_delete, ioscm_file_port_rewind)
10594 (ioscm_file_port_put): Delete.
10595 (ioscm_file_port_write): Rename to ...
10596 (ioscm_file_port::write): ... this. Remove file_port_magic
10597 checks.
10598 (ioscm_file_port_new): Delete.
10599 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10600 ui_file_up.
10601 * guile/scm-type.c (tyscm_type_name): Use string_file.
10602 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10603 Use string_file.
10604 * infcmd.c (print_return_value_1): Use string_file.
10605 * infrun.c (print_target_wait_results): Use string_file.
10606 * language.c (add_language): Use string_file.
10607 * location.c (explicit_to_string_internal): Use string_file.
10608 * main.c (captured_main_1): Use null_file.
10609 * maint.c (maintenance_print_architecture): Use stdio_file.
10610 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10611 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10612 event_channel>: Change type to mi_console_file pointer.
10613 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10614 (mi_console_file_delete): Delete.
10615 (struct mi_console_file): Delete.
10616 (mi_console_file_magic): Delete.
10617 (mi_console_file_new): Delete.
10618 (mi_console_file::mi_console_file): New.
10619 (mi_console_file_delete): Delete.
10620 (mi_console_file_fputs): Delete.
10621 (mi_console_file::write): New.
10622 (mi_console_raw_packet): Delete.
10623 (mi_console_file::flush): New.
10624 (mi_console_file_flush): Delete.
10625 (mi_console_set_raw): Rename to ...
10626 (mi_console_file::set_raw): ... this.
10627 * mi/mi-console.h (class mi_console_file): New class.
10628 (mi_console_file_new, mi_console_set_raw): Delete.
10629 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10630 (mi_set_logging): Use delete and tee_file. Adjust.
10631 * mi/mi-main.c (output_register): Use string_file.
10632 (mi_cmd_data_evaluate_expression): Use string_file.
10633 (mi_cmd_data_read_memory): Use string_file.
10634 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10635 * mi/mi-out.c (mi_ui_out::main_stream): New.
10636 (mi_ui_out::rewind): Use main_stream and
10637 string_file.
10638 (mi_ui_out::put): Use main_stream and string_file.
10639 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10640 Allocate a 'string_file' instead.
10641 (mi_out_new): Don't allocate a mem_fileopen stream here.
10642 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10643 (mi_ui_out::main_stream): Declare method.
10644 * printcmd.c (eval_command): Use string_file.
10645 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10646 * python/py-arch.c (archpy_disassemble): Use string_file.
10647 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10648 * python/py-frame.c (frapy_str): Use string_file.
10649 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10650 Use string_file.
10651 * python/py-type.c (typy_str): Use string_file.
10652 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10653 * python/py-value.c (valpy_str): Use string_file.
10654 * record-btrace.c (btrace_insn_history): Use string_file.
10655 * regcache.c (regcache_print): Use stdio_file.
10656 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10657 * remote.c (escape_buffer): Use string_file.
10658 * rust-lang.c (rust_get_disr_info): Use string_file.
10659 * serial.c (serial_open_ops_1): Use stdio_file.
10660 (do_serial_close): Use delete.
10661 * stack.c (print_frame_arg): Use string_file.
10662 (print_frame_args): Remove local mem_fileopen stream, not used.
10663 (print_frame): Use string_file.
10664 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10665 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10666 Take a 'string_file *' instead of a 'ui_file *'.
10667 * top.c (new_ui): Use stdio_file and stderr_file.
10668 (free_ui): Use delete.
10669 (execute_command_to_string): Use string_file.
10670 (quit_confirm): Use string_file.
10671 * tracepoint.c (collection_list::append_exp): Use string_file.
10672 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10673 * tui/tui-file.c: Don't include "ui-file.h".
10674 (enum streamtype, struct tui_stream): Delete.
10675 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10676 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10677 (tui_file::tui_file): New method.
10678 (tui_file_fputs): Delete.
10679 (tui_file_get_strbuf): Delete.
10680 (tui_file::puts): New method.
10681 (tui_file_adjust_strbuf): Delete.
10682 (tui_file_flush): Delete.
10683 (tui_file::flush): New method.
10684 * tui/tui-file.h: Tweak intro comment.
10685 Include ui-file.h.
10686 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10687 (tui_file_adjust_strbuf): Delete declarations.
10688 (class tui_file): New class.
10689 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10690 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10691 (tui_register_format): Use string_stream.
10692 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10693 (tui_get_function_from_frame): Use string_file.
10694 * typeprint.c (type_to_string): Use string_file.
10695 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10696 (null_stream): New global.
10697 (ui_file_delete): Delete.
10698 (ui_file::ui_file): New.
10699 (null_file_isatty): Delete.
10700 (ui_file::~ui_file): New.
10701 (null_file_rewind): Delete.
10702 (ui_file::printf): New.
10703 (null_file_put): Delete.
10704 (null_file_flush): Delete.
10705 (ui_file::putstr): New.
10706 (null_file_write): Delete.
10707 (ui_file::putstrn): New.
10708 (null_file_read): Delete.
10709 (ui_file::putc): New.
10710 (null_file_fputs): Delete.
10711 (null_file_write_async_safe): Delete.
10712 (ui_file::vprintf): New.
10713 (null_file_delete): Delete.
10714 (null_file::write): New.
10715 (null_file_fseek): Delete.
10716 (null_file::puts): New.
10717 (ui_file_data): Delete.
10718 (null_file::write_async_safe): New.
10719 (gdb_flush, ui_file_isatty): Adjust.
10720 (ui_file_put, ui_file_rewind): Delete.
10721 (ui_file_write): Adjust.
10722 (ui_file_write_for_put): Delete.
10723 (ui_file_write_async_safe, ui_file_read): Adjust.
10724 (ui_file_fseek): Delete.
10725 (fputs_unfiltered): Adjust.
10726 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10727 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10728 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10729 (set_ui_file_data): Delete.
10730 (string_file::~string_file, string_file::write)
10731 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10732 (do_ui_file_as_string, ui_file_as_string): Delete.
10733 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10734 (struct mem_file): Delete.
10735 (mem_file_new): Delete.
10736 (stdio_file::stdio_file): New.
10737 (mem_file_delete): Delete.
10738 (stdio_file::stdio_file): New.
10739 (mem_fileopen): Delete.
10740 (stdio_file::~stdio_file): New.
10741 (mem_file_rewind): Delete.
10742 (stdio_file::set_stream): New.
10743 (mem_file_put): Delete.
10744 (stdio_file::open): New.
10745 (mem_file_write): Delete.
10746 (stdio_file_magic, struct stdio_file): Delete.
10747 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10748 (stdio_file::flush): New.
10749 (stdio_file_read): Rename to ...
10750 (stdio_file::read): ... this. Adjust.
10751 (stdio_file_write): Rename to ...
10752 (stdio_file::write): ... this. Adjust.
10753 (stdio_file_write_async_safe): Rename to ...
10754 (stdio_file::write_async_safe) ... this. Adjust.
10755 (stdio_file_fputs): Rename to ...
10756 (stdio_file::puts) ... this. Adjust.
10757 (stdio_file_isatty): Delete.
10758 (stdio_file_fseek): Delete.
10759 (stdio_file::isatty): New.
10760 (stderr_file_write): Rename to ...
10761 (stderr_file::write) ... this. Adjust.
10762 (stderr_file_fputs): Rename to ...
10763 (stderr_file::puts) ... this. Adjust.
10764 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10765 (stderr_file::stderr_file): New.
10766 (tee_file_magic): Delete.
10767 (struct tee_file): Delete.
10768 (tee_file::tee_file): New.
10769 (tee_file_new): Delete.
10770 (tee_file::~tee_file): New.
10771 (tee_file_delete): Delete.
10772 (tee_file_flush): Rename to ...
10773 (tee_file::flush): ... this. Adjust.
10774 (tee_file_write): Rename to ...
10775 (tee_file::write): ... this. Adjust.
10776 (tee_file::write_async_safe): New.
10777 (tee_file_fputs): Rename to ...
10778 (tee_file::puts): ... this. Adjust.
10779 (tee_file_isatty): Rename to ...
10780 (tee_file::isatty): ... this. Adjust.
10781 * ui-file.h (struct obstack, struct ui_file): Don't
10782 forward-declare.
10783 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10784 (ui_file_write_ftype)
10785 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10786 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10787 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10788 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10789 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10790 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10791 (set_ui_file_fseek): Delete.
10792 (ui_file_data, ui_file_delete, ui_file_rewind)
10793 (struct ui_file): New.
10794 (ui_file_up): New.
10795 (class null_file): New.
10796 (null_stream): Declare.
10797 (ui_file_write_for_put, ui_file_put): Delete.
10798 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10799 Delete.
10800 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10801 (gdb_fopen, tee_file_new): Delete.
10802 (struct string_file): New.
10803 (struct stdio_file): New.
10804 (stdio_file_up): New.
10805 (struct stderr_file): New.
10806 (class tee_file): New.
10807 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10808 of a 'ui_file *'. Adjust.
10809 * ui-out.h (class ui_out) <field_stream>: Likewise.
10810 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10811 (null_stream): Delete.
10812 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10813 Adjust.
10814 * utils.h (struct ui_file): Delete forward declaration..
10815 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10816 (error_stream): Take a 'string_file &' instead of a
10817 'ui_file *'.
10818 * varobj.c (varobj_value_get_print_value): Use string_file.
10819 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10820 * gdbarch.c: Regenerate.
10821
187808b0
PA
108222017-02-02 Pedro Alves <palves@redhat.com>
10823
10824 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10825 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10826 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10827 Adjust to call gdb_print_insn instead of
10828 gdb_disassembler::print_insn.
10829 (dump_insns, do_mixed_source_and_assembly_deprecated)
10830 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10831 'gdbarch' parameter. Remove gdb_disassembler parameter.
10832 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10833 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10834 declaration.
10835 (gdb_pretty_print_insn): Re-add declaration.
10836 * record-btrace.c (btrace_insn_history): Don't allocate a
10837 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10838
7a8eb317
SM
108392017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10840
10841 * disasm.h (gdb_disassembly): Remove file_string parameter.
10842 * disasm.c (gdb_disassembly): Likewise.
10843 * cli/cli-cmds.c (print_disassembly): Adapt.
10844 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10845 * stack.c (do_gdb_disassembly): Likewise.
10846
7346ef59
AA
108472017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10848
10849 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10850 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10851 targets. And if the implicit value is longer than needed, extract
10852 the first bytes instead of the "least significant" ones.
10853
cd4007e4
MM
108542017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10855
10856 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10857 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10858 (btrace_fetch): Assert can_access_registers_ptid.
10859 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10860 validate_registers_access.
10861
cf77c34e
MM
108622017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10863
10864 * gdbthread.h (can_access_registers_ptid): New.
10865 * thread.c (can_access_registers_ptid): New.
10866
be85ce7d
PA
108672017-02-01 Pedro Alves <palves@redhat.com>
10868
10869 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10870
29b0b251
PA
108712017-01-31 Pedro Alves <palves@redhat.com>
10872
10873 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10874 Fix typos.
10875
289b5b24
PA
108762017-01-31 Pedro Alves <palves@redhat.com>
10877
10878 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10879 not used.
10880
b47413b4
PA
108812017-01-31 Pedro Alves <palves@redhat.com>
10882
10883 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10884
60adb36c
PA
108852017-01-31 Pedro Alves <palves@redhat.com>
10886
10887 * common/scoped_restore.h
10888 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10889 change the value's parameter type to T2.
10890 (make_scoped_restore): Likewise.
10891
2735833d
WT
108922017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10893 Richard Henderson <rth@redhat.com>
10894
10895 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10896 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10897 GS_BASE for older kernels.
10898 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10899 GS_BASE for older kernels.
10900 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10901 and GS_BASE to the offset table.
10902 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10903 system register group.
10904 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10905 for older kernels.
10906 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10907 amd64 ABI.
10908 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10909 AMD64_GSBASE_REGNUM.
10910 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10911 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10912 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10913 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10914 i386/64bit-segments.xml in those rules.
10915 * features/i386/64bit-segments.xml: New file.
10916 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10917 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10918 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10919 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10920 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10921 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10922 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10923 * features/i386/amd64-avx-linux.c: Regenerated.
10924 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10925 * features/i386/amd64-avx-mpx.c: Regenerated.
10926 * features/i386/amd64-avx512-linux.c: Regenerated.
10927 * features/i386/amd64-linux.c: Regenerated.
10928 * features/i386/amd64-mpx-linux.c: Regenerated.
10929 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10930 * features/i386/i386-avx-mpx.c: Regenerated.
10931 * features/i386/x32-avx-linux.c: Regenerated.
10932 * features/i386/x32-avx512-linux.c: Regenerated.
10933 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10934 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10935 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10936 * regformats/i386/amd64-linux.dat: Regenerated.
10937 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10938 * regformats/i386/x32-avx-linux.dat: Regenerated.
10939 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10940 * regformats/i386/x32-linux.dat: Regenerated.
10941
8884e97e
WT
109422017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10943
10944 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10945 Set to AMD64_NUM_REGS.
10946
7005d26a
WT
109472017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10948
10949 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10950 that checks validity of a register number.
10951
4bd2e1b2
KC
109522017-01-27 Kees Cook <keescook@google.com>
10953
10954 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10955 fetch_fpregs if target has fpa registers.
10956 (arm_linux_store_inferior_registers): Call store_fpregs if target
10957 has fpa registers.
10958
7cf1de6c
AA
109592017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10960
10961 * cris-tdep.c (cris_gdbarch_init): Remove check for
10962 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10963
874a1c8c
AT
109642017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10965
10966 * corelow.c (get_core_register_section): Check for regset
10967 existence before checking for REGSET_VARIABLE_SIZE.
10968
d8b49cf0
YQ
109692017-01-26 Yao Qi <yao.qi@linaro.org>
10970 Pedro Alves <palves@redhat.com>
10971
10972 PR gdb/20939
10973 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10974 call memory_error, save memaddr instead.
10975 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10976 negative, cal memory_error.
10977 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10978
658ca58c
YQ
109792017-01-26 Yao Qi <yao.qi@linaro.org>
10980
10981 * disasm-selftests.c (memory_error_test): New function.
10982 (_initialize_disasm_selftests): Register memory_error_test.
10983
79843d45
YQ
109842017-01-26 Yao Qi <yao.qi@linaro.org>
10985
10986 * Makefile.in (SFILES): Add disasm-selftests.c and
10987 selftest-arch.c.
10988 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10989 * disasm-selftests.c: New file.
10990 * selftest-arch.c: New file.
10991 * selftest-arch.h: New file.
10992
8cafda32
YQ
109932017-01-26 Yao Qi <yao.qi@linaro.org>
10994
10995 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10996 to bfd_arch_mep. Don't return 0 if section is not
10997 found. Call print_insn_mep.
10998
e47ad6c0
YQ
109992017-01-26 Pedro Alves <palves@redhat.com>
11000 Yao Qi <yao.qi@linaro.org>
11001
11002 * arm-tdep.c: Include "disasm.h".
11003 (gdb_print_insn_arm): Update code to get gdbarch.
11004 * disasm.c (dis_asm_read_memory): Change it to
11005 gdb_disassembler::dis_asm_read_memory.
11006 (dis_asm_memory_error): Likewise.
11007 (dis_asm_print_address): Likewise.
11008 (gdb_pretty_print_insn): Change it to
11009 gdb_disassembler::pretty_print_insn.
11010 (dump_insns): Add one argument gdb_disassemlber. All
11011 callers updated.
11012 (do_mixed_source_and_assembly_deprecated): Likewise.
11013 (do_mixed_source_and_assembly): Likewise.
11014 (do_assembly_only): Likewise.
11015 (gdb_disassembler::gdb_disassembler): New.
11016 (gdb_disassembler::print_insn): New.
11017 * disasm.h (class gdb_disassembler): New.
11018 (gdb_pretty_print_insn): Remove declaration.
11019 (gdb_disassemble_info): Likewise.
11020 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11021 (gdbscm_disasm_read_memory_worker): Update.
11022 (gdbscm_disasm_read_memory): Update.
11023 (gdbscm_disasm_memory_error): Remove.
11024 (gdbscm_disasm_print_address): Remove.
11025 (gdbscm_disassembler::gdbscm_disassembler): New.
11026 (gdbscm_print_insn_from_port): Update.
11027 * mips-tdep.c: Include disasm.h.
11028 (gdb_print_insn_mips): Update code to get gdbarch.
11029 * record-btrace.c (btrace_insn_history): Update.
11030 * spu-tdep.c: Include disasm.h.
11031 (struct spu_dis_asm_data): Remove.
11032 (struct spu_dis_asm_info): New.
11033 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11034 SPU id.
11035 (gdb_print_insn_spu): Cast disassemble_info to
11036 spu_dis_asm_info.
11037
80d75874
YQ
110382017-01-26 Yao Qi <yao.qi@linaro.org>
11039
11040 * disasm.c (do_ui_file_delete): Delete.
11041 (gdb_insn_length): Move code creating stream to ...
11042 * utils.c (null_stream): ... here. New function.
11043 * utils.h (null_stream): Declare.
11044
60685cd0
SM
110452017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11046
11047 * python/py-inferior.c (find_thread_object): Return directly
11048 from the loop. Remove "found" variable.
11049
eb1cdb62
JB
110502017-01-21 Joel Brobecker <brobecker@adacore.com>
11051
11052 GDB 7.12.1 released.
11053
b1ce6568
SM
110542017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11055
11056 * python/py-function.c (fnpy_call): Reorder declarations to have
11057 the gdbpy_enter object declared first.
11058 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11059
6f8b0407
SM
110602017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11061
fec93fb1 11062 PR python/21068
6f8b0407
SM
11063 * python/python-internal.h (PyMem_RawMalloc): Define for
11064 Python < 3.4.
11065 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11066 PyMem_RawMalloc instead of PyMem_Malloc.
11067
78cbbba8
LM
110682017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11069 Luis Machado <lgustavo@codesourcery.com>
11070
11071 * NEWS (New commands): Mention flash-erase.
11072 (New MI commands): Mention target-flash-erase.
11073 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11074 command.
11075 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11076 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11077 * target.c (flash_erase_command): New function.
11078 (initialize_targets): Add new flash-erase command.
11079 * target.h (flash_erase_command): New declaration.
11080
2132fe85
JB
110812017-01-20 Joel Brobecker <brobecker@adacore.com>
11082
11083 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11084 HAVE_SYS_PROCFS_H is defined.
11085
d1dff226
AH
110862017-01-18 Alan Hayward <alan.hayward@arm.com>
11087
11088 * remote.c (struct cached_reg): Change data into a pointer.
11089 * (stop_reply_dtr): Free data pointers before deleting vector.
11090 (process_stop_reply): Likewise.
11091 (remote_parse_stop_reply): Allocate space for data
11092
9890e433
AH
110932017-01-18 Alan Hayward <alan.hayward@arm.com>
11094
11095 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11096 MAX_REGISTER_SIZE.
11097 (amd64_pseudo_register_read_value): Likewise.
11098 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11099 (store_register_using_P): Likewise.
11100 * regcache.c (regcache_xfer_part): Likewise.
11101
7a36499a
IR
111022017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11103
11104 Split real and pseudo registers.
11105 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11106 (sparc32_pseudo_regnum): New enum.
11107 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11108 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11109 (SPARC32_CP0_REGISTERS): New macro.
11110 (sparc32_pseudo_register_name): New function.
11111 (sparc32_register_name): Use sparc32_pseudo_register_name.
11112 (sparc32_pseudo_register_type): New function.
11113 (sparc32_register_type): Use sparc32_pseudo_register_type.
11114 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11115 pseudo register numbers.
11116 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11117 (SPARC64_CP0_REGISTERS): New macro.
11118 (sparc64_pseudo_register_name): New function.
11119 (sparc64_register_name): Use sparc64_pseudo_register_name.
11120 (sparc64_pseudo_register_type): New function.
11121 (sparc64_register_type): Use sparc64_pseudo_register_type.
11122 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11123 pseudo register numbers.
11124 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11125 sparc64_store_arguments): Handle pseudo register numbers.
11126
6f8976bf
YQ
111272017-01-13 Yao Qi <yao.qi@linaro.org>
11128
11129 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11130 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11131 output.
11132 (getpkt_or_notif_sane_1): Likewise.
11133
e4241ace
YQ
111342017-01-13 Yao Qi <yao.qi@linaro.org>
11135
11136 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11137 of CC. Pass "-x c++-header" instead of "-x c".
11138
3015c064
SM
111392017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11140
11141 * remote.c (remote_can_async_p): Update comment.
11142
fde1b17d
SM
111432017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11144
11145 * linux-nat.c (linux_nat_can_async_p): Update comment.
11146
ca1ca08b
SM
111472017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11148
11149 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11150
4ad2da73
SM
111512017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11152
11153 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11154
c8b23b3f
TT
111552017-01-10 Tom Tromey <tom@tromey.com>
11156
11157 * python/py-type.c (typy_legacy_template_argument): Update.
11158 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11159 ~demangle_parse_info): Declare new members.
11160 (cp_demangled_name_to_comp): Return unique_ptr.
11161 (cp_demangled_name_parse_free)
11162 (make_cleanup_cp_demangled_name_parse_free)
11163 (cp_new_demangle_parse_info): Remove.
11164 * cp-support.c (do_demangled_name_parse_free_cleanup)
11165 (make_cleanup_cp_demangled_name_parse_free): Remove.
11166 (inspect_type, cp_canonicalize_string_full)
11167 (cp_canonicalize_string): Update.
11168 (mangled_name_to_comp): Change return type.
11169 (cp_class_name_from_physname, method_name_from_physname)
11170 (cp_func_name, cp_remove_params): Update.
11171 * cp-name-parser.y (demangle_parse_info): New constructor, from
11172 cp_new_demangle_parse_info.
11173 (~demangle_parse_info): New destructor, from
11174 cp_demangled_name_parse_free.
11175 (cp_merge_demangle_parse_infos): Update.
11176 (cp_demangled_name_to_comp): Change return type.
11177
1ac32117
TT
111782017-01-10 Tom Tromey <tom@tromey.com>
11179
11180 * top.c (prevent_dont_repeat): Change return type.
11181 * python/python.c (execute_gdb_command): Use std::string.
11182 Update.
11183 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11184 * command.h (prevent_dont_repeat): Change return type.
11185 * breakpoint.c (bpstat_do_actions_1): Update.
11186
0cf08227
TT
111872017-01-10 Tom Tromey <tom@tromey.com>
11188
11189 * value.h (scoped_value_mark::~scoped_value_mark): Call
11190 free_to_mark.
11191 (scoped_value_mark::free_to_mark): New method.
11192 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11193 scoped_value_mark.
11194
eb115069
TT
111952017-01-10 Tom Tromey <tom@tromey.com>
11196
11197 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11198 (valpy_reference_value, valpy_const_value, valpy_get_address)
11199 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11200 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11201 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11202 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11203 scoped_value_mark.
11204 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11205 * value.h (scoped_value_mark): New class.
11206
906768f9
TT
112072017-01-10 Tom Tromey <tom@tromey.com>
11208
11209 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11210 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11211 * psymtab.c (discard_psymtabs_upto): Remove.
11212 (make_cleanup_discard_psymtabs): Remove.
11213 (struct psymtab_state): Remove.
11214
bef155c3
TT
112152017-01-10 Tom Tromey <tom@tromey.com>
11216
11217 * record-full.c (record_full_save_cleanups): Remove.
11218 (record_full_save): Use gdb::unlinker.
11219 * gcore.c (do_bfd_delete_cleanup): Remove.
11220 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11221 cleanups.
11222 * dwarf2read.c (unlink_if_set): Remove.
11223 (write_psymtabs_to_index): Use gdb::unlinker.
11224 * common/gdb_unlinker.h: New file.
11225
192b62ce
TT
112262017-01-10 Tom Tromey <tom@tromey.com>
11227
11228 * windows-tdep.c (windows_xfer_shared_library): Update.
11229 * windows-nat.c (windows_make_so): Update.
11230 * utils.h (make_cleanup_bfd_unref): Remove.
11231 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11232 * symfile.h (symfile_bfd_open)
11233 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11234 * symfile.c (read_symbols, symbol_file_add)
11235 (separate_debug_file_exists): Update.
11236 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11237 (generic_load, reread_symbols): Update.
11238 * symfile-mem.c (symbol_file_add_from_memory): Update.
11239 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11240 (spu_symbol_file_add_from_memory): Update.
11241 * solist.h (struct target_so_ops) <bfd_open>: Return
11242 gdb_bfd_ref_ptr.
11243 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11244 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11245 gdb_bfd_ref_ptr.
11246 (solib_map_sections, reload_shared_libraries_1): Update.
11247 * solib-svr4.c (enable_break): Update.
11248 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11249 * solib-frv.c (enable_break2): Update.
11250 * solib-dsbt.c (enable_break): Update.
11251 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11252 gdb_bfd_ref_ptr.
11253 (darwin_solib_get_all_image_info_addr_at_init): Update.
11254 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11255 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11256 * record-full.c (record_full_save): Update.
11257 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11258 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11259 * minidebug.c (find_separate_debug_file_in_section): Return
11260 gdb_bfd_ref_ptr.
11261 * machoread.c (macho_add_oso_symfile): Change abfd to
11262 gdb_bfd_ref_ptr.
11263 (macho_symfile_read_all_oso): Update.
11264 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11265 (macho_symfile_read): Update.
11266 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11267 (jit_bfd_try_read_symtab): Update.
11268 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11269 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11270 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11271 gdb_bfd_ref_ptr.
11272 (gdb_bfd_ref_policy): New struct.
11273 (gdb_bfd_ref_ptr): New typedef.
11274 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11275 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11276 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11277 gdb_bfd_ref_ptr.
11278 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11279 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11280 (gcore_command): Update.
11281 * exec.c (exec_file_attach): Update.
11282 * elfread.c (elf_symfile_read): Update.
11283 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11284 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11285 (open_and_init_dwo_file): Update.
11286 (open_dwp_file): Return gdb_bfd_ref_ptr.
11287 (open_and_init_dwp_file): Update.
11288 * corelow.c (core_open): Update.
11289 * compile/compile-object-load.c (compile_object_load): Update.
11290 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11291 * coffread.c (coff_symfile_read): Update.
11292 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11293 gdb_bfd_ref_ptr. Rename.
11294 (dump_bfd_file, restore_command): Update.
11295 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11296 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11297 (find_separate_debug_file_by_buildid): Update.
11298
50315b21
TT
112992017-01-10 Tom Tromey <tom@tromey.com>
11300
11301 * common/gdb_ref_ptr.h: New file.
11302 * python/py-ref.h (struct gdbpy_ref_policy): New.
11303 (gdbpy_ref): Now a typedef.
11304
fc4007c9
TT
113052017-01-10 Tom Tromey <tom@tromey.com>
11306
11307 * utils.h (make_cleanup_htab_delete): Don't declare.
11308 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11309 Remove.
11310 * linespec.c (decode_compound_collector): Add constructor,
11311 destructor.
11312 (lookup_prefix_sym): Remove cleanup.
11313 (symtab_collector): Add constructor, destructor.
11314 (collect_symtabs_from_filename): Remove cleanup.
11315 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11316 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11317 Use htab_up.
11318 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11319 * dwarf2read.c (dw2_expand_symtabs_matching)
11320 (dw2_map_symbol_filenames, dwarf_decode_macros)
11321 (write_psymtabs_to_index): Use htab_up.
11322 * dwarf2loc.c (func_verify_no_selftailcall)
11323 (call_site_find_chain_1, func_verify_no_selftailcall)
11324 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11325 std::vector, gdb::unique_xmalloc_ptr.
11326 (call_sitep): Remove typedef.
11327 (dwarf2_locexpr_baton_eval): Remove unused variable.
11328
8dbcee67
TT
113292017-01-10 Tom Tromey <tom@tromey.com>
11330
11331 * python/python-internal.h (make_cleanup_py_decref)
11332 (make_cleanup_py_xdecref): Don't declare.
11333 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11334 (py_xdecref, make_cleanup_py_xdecref): Remove.
11335
13df46cc
TT
113362017-01-10 Tom Tromey <tom@tromey.com>
11337
11338 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11339 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11340
06fc9bf7
TT
113412017-01-10 Tom Tromey <tom@tromey.com>
11342
11343 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11344
830a4934
TT
113452017-01-10 Tom Tromey <tom@tromey.com>
11346
11347 * python/py-utils.c (unicode_to_encoded_string)
11348 (python_string_to_target_string)
11349 (python_string_to_target_python_string)
11350 (python_string_to_host_string, gdbpy_obj_to_string)
11351 (get_addr_from_python): Use gdbpy_ref.
11352
4586d543
TT
113532017-01-10 Tom Tromey <tom@tromey.com>
11354
11355 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11356 gdbpy_ref.
11357
59876f8f
TT
113582017-01-10 Tom Tromey <tom@tromey.com>
11359
11360 * python/python.c (eval_python_command, gdbpy_decode_line)
11361 (gdbpy_run_events, gdbpy_start_type_printers)
11362 (gdbpy_apply_type_printers): Use gdbpy_ref.
11363
97d83487
TT
113642017-01-10 Tom Tromey <tom@tromey.com>
11365
11366 * python/py-param.c (get_doc_string, compute_enum_values): Use
11367 gdbpy_ref.
11368
9205649a
TT
113692017-01-10 Tom Tromey <tom@tromey.com>
11370
11371 * python/py-inferior.c (find_thread_object, build_inferior_list):
11372 Use gdbpy_ref.
11373
74c49d45
TT
113742017-01-10 Tom Tromey <tom@tromey.com>
11375
11376 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11377
16361ffb
TT
113782017-01-10 Tom Tromey <tom@tromey.com>
11379
11380 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11381 gdbpy_ref.
11382
905f2cca
TT
113832017-01-10 Tom Tromey <tom@tromey.com>
11384
11385 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11386 extra incref.
11387 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11388 Use gdbpy_ref.
11389
64081434
TT
113902017-01-10 Tom Tromey <tom@tromey.com>
11391
11392 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11393 gdbpy_ref.
11394
59e9e831
TT
113952017-01-10 Tom Tromey <tom@tromey.com>
11396
11397 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11398 decref results of PyArg_ParseTupleAndKeywords.
11399
9de10f6d
TT
114002017-01-10 Tom Tromey <tom@tromey.com>
11401
11402 * python/python.c (python_run_simple_file): Use
11403 unique_xmalloc_ptr, gdbpy_ref.
11404
2bd5759d
TT
114052017-01-10 Tom Tromey <tom@tromey.com>
11406
11407 * python/py-prettyprint.c (print_stack_unless_memory_error)
11408 (print_string_repr, print_children): Use gdbpy_ref.
11409 (dummy_python_frame): New class.
11410 (dummy_python_frame::dummy_python_frame): Rename from
11411 push_dummy_python_frame.
11412 (py_restore_tstate): Remove.
11413
3b4e0e01
TT
114142017-01-10 Tom Tromey <tom@tromey.com>
11415
11416 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11417
17a22718
TT
114182017-01-10 Tom Tromey <tom@tromey.com>
11419
11420 * python/python.c (ensure_python_env, restore_python_env):
11421 Remove.
11422 * python/python-internal.h (ensure_python_env): Don't declare.
11423 * varobj.h (varobj_ensure_python_env): Don't declare.
11424 * varobj.c (varobj_ensure_python_env): Remove.
11425
68cdc557
TT
114262017-01-10 Tom Tromey <tom@tromey.com>
11427
11428 * varobj.c (varobj_value_get_print_value): Use
11429 gdbpy_enter_varobj.
11430
1eba6383
TT
114312017-01-10 Tom Tromey <tom@tromey.com>
11432
11433 * python/py-prettyprint.c (print_string_repr, print_children):
11434 Update.
11435 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11436 of "encoding".
11437 * varobj.c (varobj_value_get_print_value): Update.
11438 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11439
bde7b3e3
TT
114402017-01-10 Tom Tromey <tom@tromey.com>
11441
11442 * varobj.c (varobj_get_display_hint)
11443 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11444 (varobj_set_visualizer, free_variable): Use
11445 gdbpy_enter_varobj.
11446
a7785f8c
TT
114472017-01-10 Tom Tromey <tom@tromey.com>
11448
11449 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11450 (do_finish_initialization): New function. Use gdbpy_ref.
11451 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11452 do_finish_initialization.
11453
2865bfce
TT
114542017-01-10 Tom Tromey <tom@tromey.com>
11455
11456 * python/py-param.c (get_set_value, get_show_value): Use
11457 gdbpy_enter, gdbpy_ref.
11458
0e9dcc75
TT
114592017-01-10 Tom Tromey <tom@tromey.com>
11460
11461 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11462
12a5cedd
TT
114632017-01-10 Tom Tromey <tom@tromey.com>
11464
11465 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11466
788f2586
TT
114672017-01-10 Tom Tromey <tom@tromey.com>
11468
11469 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11470 Use gdbpy_enter_varobj.
11471
6cd67bea
TT
114722017-01-10 Tom Tromey <tom@tromey.com>
11473
11474 * varobj.c (gdbpy_enter_varobj): New constructor.
11475 * python/python-internal.h (gdbpy_enter_varobj): New class.
11476 * python/py-varobj.c (py_varobj_get_iterator): Use
11477 gdbpy_enter_varobj.
11478
14b122bf
TT
114792017-01-10 Tom Tromey <tom@tromey.com>
11480
11481 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11482 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11483 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11484 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11485 unique_xmalloc_ptr.
11486 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11487
bf1ca3b9
TT
114882017-01-10 Tom Tromey <tom@tromey.com>
11489
11490 * python/py-xmethods.c (invoke_match_method): Use
11491 gdbpy_ref.
11492
572a5524
TT
114932017-01-10 Tom Tromey <tom@tromey.com>
11494
11495 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11496 gdbpy_enter, gdbpy_ref.
11497
396a78b6
TT
114982017-01-10 Tom Tromey <tom@tromey.com>
11499
11500 * python/python.c (python_interactive_command): Use gdbpy_enter.
11501
a88b13c7
TT
115022017-01-10 Tom Tromey <tom@tromey.com>
11503
11504 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11505 gdbpy_ref.
11506
e9f0c363
TT
115072017-01-10 Tom Tromey <tom@tromey.com>
11508
11509 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11510 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11511
6349f452
TT
115122017-01-10 Tom Tromey <tom@tromey.com>
11513
11514 * utils.h (htab_deleter): New struct.
11515 (htab_up): New typedef.
11516 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11517 gdbpy_enter, gdbpy_ref, htab_up.
11518
c0171de6
TT
115192017-01-10 Tom Tromey <tom@tromey.com>
11520
11521 * python/py-unwind.c (pending_frame_invalidate): Remove.
11522 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11523
f18e226f
TT
115242017-01-10 Tom Tromey <tom@tromey.com>
11525
11526 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11527 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11528
c57af3f1
TT
115292017-01-10 Tom Tromey <tom@tromey.com>
11530
11531 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11532
60e600ec
TT
115332017-01-10 Tom Tromey <tom@tromey.com>
11534
11535 * python/python.c (gdbpy_eval_from_control_command)
11536 (gdbpy_source_script, gdbpy_run_events)
11537 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11538 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11539 gdbpy_enter.
11540
bf7da5b0
TT
115412017-01-10 Tom Tromey <tom@tromey.com>
11542
11543 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11544
2d38bced
TT
115452017-01-10 Tom Tromey <tom@tromey.com>
11546
11547 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11548
07bc7329
TT
115492017-01-10 Tom Tromey <tom@tromey.com>
11550
11551 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11552 (python_on_inferior_call_pre, python_on_inferior_call_post)
11553 (python_on_memory_change, python_on_register_change)
11554 (python_inferior_exit, python_new_objfile, add_thread_object)
11555 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11556
6e7c365e
TT
115572017-01-10 Tom Tromey <tom@tromey.com>
11558
11559 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11560 (bpfinishpy_handle_exit): Use gdbpy_enter.
11561
6ba0cd40
TT
115622017-01-10 Tom Tromey <tom@tromey.com>
11563
11564 * python/py-cmd.c (cmdpy_destroyer)
11565 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11566 gdbpy_enter.
11567
de2dc875
TT
115682017-01-10 Tom Tromey <tom@tromey.com>
11569
11570 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11571 gdbpy_enter.
11572 (gdbpy_breakpoint_has_cond): Likewise.
11573
4ecee2c4
TT
115742017-01-10 Tom Tromey <tom@tromey.com>
11575
11576 * python/python.c (gdbpy_enter): New constructor.
11577 (~gdbpy_enter): New destructor.
11578 (restore_python_env, ensure_python_env): Rewrite.
11579 * python/python-internal.h (gdbpy_enter): New class.
11580
37fce74f
TT
115812017-01-10 Tom Tromey <tom@tromey.com>
11582
11583 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11584
53a0cca3
TT
115852017-01-10 Tom Tromey <tom@tromey.com>
11586
11587 * python/py-value.c (value_has_field, get_field_flag)
11588 (get_field_type, valpy_getitem, convert_value_from_python): Use
11589 gdbpy_ref.
11590
ff3724f5
TT
115912017-01-10 Tom Tromey <tom@tromey.com>
11592
11593 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11594 gdbpy_ref.
11595
0700aea5
TT
115962017-01-10 Tom Tromey <tom@tromey.com>
11597
11598 * python/py-prettyprint.c (search_pp_list)
11599 (find_pretty_printer_from_objfiles)
11600 (find_pretty_printer_from_progspace)
11601 (find_pretty_printer_from_gdb, find_pretty_printer)
11602 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11603 gdbpy_ref.
11604
1bb44c9f
TT
116052017-01-10 Tom Tromey <tom@tromey.com>
11606
11607 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11608
87ce03fd
TT
116092017-01-10 Tom Tromey <tom@tromey.com>
11610
11611 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11612 (ltpy_get_all_source_lines): Use gdbpy_ref.
11613
ee0a3fb8
TT
116142017-01-10 Tom Tromey <tom@tromey.com>
11615
11616 * python/py-framefilter.c (extract_sym, extract_value)
11617 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11618 gdbpy_ref.
11619
bf2a52fa
TT
116202017-01-10 Tom Tromey <tom@tromey.com>
11621
11622 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11623
f59fe7f8
TT
116242017-01-10 Tom Tromey <tom@tromey.com>
11625
11626 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11627
80bd970a
TT
116282017-01-10 Tom Tromey <tom@tromey.com>
11629
11630 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11631 gdbpy_ref.
11632
d1b3de2e
TT
116332017-01-10 Tom Tromey <tom@tromey.com>
11634
11635 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11636
3bb43384
TT
116372017-01-10 Tom Tromey <tom@tromey.com>
11638
11639 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11640 (typy_range): Use gdbpy_ref.
11641
abf5651e
TT
116422017-01-10 Tom Tromey <tom@tromey.com>
11643
11644 * python/py-threadevent.c (create_thread_event_object): Use
11645 gdbpy_ref.
11646 * python/py-stopevent.c (create_stop_event_object): Simplify.
11647 (emit_stop_event): Use gdbpy_ref.
11648 * python/py-signalevent.c (create_signal_event_object): Use
11649 gdbpy_ref.
11650 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11651 (emit_new_objfile_event, create_clear_objfiles_event_object)
11652 (emit_clear_objfiles_event): Use gdbpy_ref.
11653 * python/py-infevents.c (create_inferior_call_event_object)
11654 (create_register_changed_event_object)
11655 (create_memory_changed_event_object, emit_inferior_call_event)
11656 (emit_memory_changed_event, emit_register_changed_event): Use
11657 gdbpy_ref.
11658 * python/py-exitedevent.c (create_exited_event_object)
11659 (emit_exited_event): Use gdbpy_ref.
11660 * python/py-event.h (evpy_emit_event): Remove
11661 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11662 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11663 * python/py-continueevent.c (emit_continue_event): Use
11664 gdbpy_ref.
11665 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11666 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11667 gdbpy_ref.
11668 * python/py-bpevent.c (create_breakpoint_event_object): Use
11669 gdbpy_ref.
11670
a68ff33e
TT
116712017-01-10 Tom Tromey <tom@tromey.com>
11672
11673 * python/py-ref.h: New file.
11674
7becfd03
SM
116752017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11676
11677 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11678 void.
11679 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11680 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11681 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11682 * ui-out.c (ui_out::redirect): Likewise.
11683 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11684 * cli/cli-logging.c (set_logging_redirect): Update call site of
11685 ui_out::redirect.
11686 (handle_redirections): Likewise.
11687 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11688 * top.c (execute_command_to_string): Likewise.
11689 * utils.c (do_ui_out_redirect_pop): Likewise.
11690
df294654
SM
116912017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11692
11693 * stack.c (_initialize_stack): Update "frame" command help message.
11694
f5e6296e
IB
116952017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11696
11697 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11698
0e2d6fa6
YQ
116992017-01-06 Yao Qi <yao.qi@linaro.org>
11700
11701 * x86-linux-nat.h: Include gdb_proc_service.h.
11702
44d6d3f9
YQ
117032017-01-06 Yao Qi <yao.qi@linaro.org>
11704
11705 * ser-base.h: Include serial.h.
11706
656731fe
YQ
117072017-01-06 Yao Qi <yao.qi@linaro.org>
11708
11709 * ppc-linux-tdep.h: Include ppc-tdep.h.
11710
1ca8f924
YQ
117112017-01-06 Yao Qi <yao.qi@linaro.org>
11712
11713 * nat/amd64-linux-siginfo.h: Include signal.h.
11714
bc3008c4
YQ
117152017-01-06 Yao Qi <yao.qi@linaro.org>
11716
11717 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11718
66c80d03
YQ
117192017-01-06 Yao Qi <yao.qi@linaro.org>
11720
11721 * mi/mi-parse.h: Include mi-cmds.h.
11722
051d2dda
YQ
117232017-01-06 Yao Qi <yao.qi@linaro.org>
11724
11725 * inf-loop.c: Don't include "target.h".
11726 * inf-loop.h: Include it here.
11727
8018d34f
YQ
117282017-01-06 Yao Qi <yao.qi@linaro.org>
11729
11730 * dfp.h: Include "dboulest.h" and "expression.h".
11731
c0b8369c
YQ
117322017-01-06 Yao Qi <yao.qi@linaro.org>
11733
11734 * ax-gdb.h: Include "ax.h".
11735
ad5cba2a
YQ
117362017-01-06 Yao Qi <yao.qi@linaro.org>
11737
11738 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11739 with nat/gdb_ptrace.h.
11740
1c33cd7f
YQ
117412017-01-05 Yao Qi <yao.qi@linaro.org>
11742
11743 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11744 new line.
11745 (mips64_fbsd_sigframe_init): Likewise.
11746
c988ac1d
JB
117472017-01-04 John Baldwin <jhb@FreeBSD.org>
11748
11749 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11750 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11751
b268007c
JB
117522017-01-04 John Baldwin <jhb@FreeBSD.org>
11753
11754 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11755 * NEWS: Mention new FreeBSD/mips native configuration.
11756 * config/mips/fbsd.mh: New file.
11757 * configure.host: Add mips*-*-freebsd*.
11758 * mips-fbsd-nat.c: New file.
11759
387360da
JB
117602017-01-04 John Baldwin <jhb@FreeBSD.org>
11761
11762 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11763 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11764 * NEWS: Mention new FreeBSD/mips target.
11765 * configure.tgt: Add mips*-*-freebsd*.
11766 * mips-fbsd-tdep.c: New file.
11767 * mips-fbsd-tdep.h: New file.
11768
2aaaf250
YQ
117692017-01-04 Yao Qi <yao.qi@linaro.org>
11770
11771 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11772 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11773
61baf725
JB
117742017-01-01 Joel Brobecker <brobecker@adacore.com>
11775
6dbb839a 11776 Update copyright year range in all GDB files.
61baf725 11777
c113e7ff 117782017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 11779
c113e7ff 11780 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 11781
c113e7ff 11782For older changes see ChangeLog-2016.
c906108c
SS
11783\f
11784Local Variables:
11785mode: change-log
11786left-margin: 8
11787fill-column: 74
11788version-control: never
57da7796 11789coding: utf-8
c906108c 11790End:
This page took 2.531401 seconds and 4 git commands to generate.