]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
Make dwarf_expr_context::stack_empty_p return a bool
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2
3 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4 return type to bool.
5 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6
7 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
8
9 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
10 Change type to bool.
11 (dwarf_stack_value) <in_stack_memory>: Likewise.
12 (dwarf_expr_context) <push_address>: Change parameter type to
13 bool.
14 <fetch_in_stack_memory>: Change return type to bool.
15 <push>: Change parameter type to bool.
16 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
17 to bool.
18 (dwarf_expr_context::push_address): Likewise.
19 (dwarf_expr_context::fetch_in_stack_memory): Change return type
20 to bool.
21 (dwarf_expr_context::execute_stack_op): Adjust.
22 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
23
24 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
25
26 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
27 (struct dwarf_expr_context) <n_pieces>: Remove.
28 <pieces>: Change type to std::vector.
29 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
30 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
31 pieces.
32 (dwarf_expr_context::add_piece): Adjust.
33 * dwarf2loc.c (struct piece_closure): Initialize fields.
34 <n_pieces>: Remove.
35 <pieces>: Change type to std::vector.
36 (allocate_piece_closure): Adjust, change parameter to
37 std::vector rvalue and std::move it to piece_closure.
38 (rw_pieced_value): Adjust.
39 (check_pieced_synthetic_pointer): Adjust.
40 (indirect_synthetic_pointer): Adjust.
41 (coerce_pieced_ref): Adjust.
42 (free_pieced_value_closure): Adjust. Use delete to free
43 piece_closure.
44 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
45 to allocate_piece_closure.
46 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
47
48 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
49
50 * probe.h (probe_ops_cp): Remove typedef.
51 (DEF_VEC_P (probe_ops_cp)): Remove.
52 (all_probe_ops): Change type to std::vector.
53 * probe.c (info_probes_for_ops): Adjust to vector change.
54 (probe_linespec_to_ops): Likewise.
55 (all_probe_ops): Change type to std::vector.
56 (_initialize_probe): Adjust to vector change.
57 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
58 * elfread.c (elf_get_probes): Likewise.
59 * stap-probe.c (_initialize_stap_probe): Likewise.
60
61 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
62
63 * probe.h (struct bound_probe): Define constructors.
64 * probe.c (bound_probe_s): Remove typedef.
65 (DEF_VEC_O (bound_probe_s)): Remove VEC.
66 (collect_probes): Change return type to std::vector, remove
67 cleanup.
68 (compare_probes): Return bool, change parameter type. Change
69 semantic to "less than".
70 (gen_ui_out_table_header_info): Change parameter to std::vector
71 and update.
72 (exists_probe_with_pops): Likewise.
73 (info_probes_for_ops): Update to std::vector change.
74 (enable_probes_command): Likewise.
75 (disable_probes_command): Likewise.
76
77 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
78
79 * probe.h (struct probe_ops) <get_probes>: Change parameter from
80 vec to std::vector.
81 * probe.c (parse_probes_in_pspace): Update.
82 (find_probes_in_objfile): Update.
83 (find_probe_by_pc): Update.
84 (collect_probes): Update.
85 (probe_any_get_probes): Update.
86 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
87 return type to reference to std::vector.
88 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
89 std::vector and update.
90 (dtrace_process_dof): Likewise.
91 (dtrace_get_probes): Likewise.
92 * elfread.c (elf_get_probes): Change return type to std::vector,
93 store an std::vector in bfd_data.
94 (probe_key_free): Update to std::vector.
95 * stap-probe.c (handle_stap_probe): Change parameter to
96 std::vector and update.
97 (stap_get_probes): Likewise.
98 * symfile-debug.c (debug_sym_get_probes): Change return type to
99 std::vector and update.
100
101 2017-09-11 Tom Tromey <tom@tromey.com>
102
103 * breakpoint.c (program_breakpoint_here_p): Update.
104 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
105 from make_show_memory_breakpoints_cleanup. Return a
106 scoped_restore_tmpl<int>.
107 (restore_show_memory_breakpoints): Remove.
108 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
109 * mem-break.c (memory_validate_breakpoint): Update.
110 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
111 (ia64_memory_remove_breakpoint): Update.
112 (ia64_breakpoint_from_pc): Update.
113 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
114 from make_show_memory_breakpoints_cleanup.
115
116 2017-09-11 Tom Tromey <tom@tromey.com>
117
118 * d-namespace.c (d_lookup_symbol): Use std::string.
119 (find_symbol_in_baseclass): Likewise.
120
121 2017-09-11 Tom Tromey <tom@tromey.com>
122
123 * ctf.c (ctf_start): Use std::string.
124
125 2017-09-11 Tom Tromey <tom@tromey.com>
126
127 * ada-lang.c (is_known_support_routine): Update.
128 (ada_unhandled_exception_name_addr_from_raise): Update.
129 * guile/scm-frame.c (gdbscm_frame_name): Update.
130 * python/py-frame.c (frapy_name): Update.
131 (frapy_function): Update.
132 * stack.h (find_frame_funname): Update.
133 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
134 (print_frame): Update.
135
136 2017-09-11 Tom Tromey <tom@tromey.com>
137
138 * findcmd.c (put_bits): Take a gdb::byte_vector.
139 (parse_find_args): Return gdb::byte_vector. "args" now const.
140 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
141 cleanups.
142 (find_command): Update.
143
144 2017-09-11 Tom Tromey <tom@tromey.com>
145
146 * cli/cli-script.c (class scoped_restore_hook_in): New.
147 (clear_hook_in_cleanup): Remove.
148 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
149 scoped_restore_hook_in.
150
151 2017-09-11 Tom Tromey <tom@tromey.com>
152
153 * cli/cli-script.c (restore_interp): Remove.
154 (read_command_lines): Use scoped_restore_interp.
155 * interps.c (scoped_restore_interp::set_temp): Rename from
156 interp_set_temp.
157 * interps.h (class scoped_restore_interp): New.
158 (interp_set_temp): Remove.
159
160 2017-09-11 Tom Tromey <tom@tromey.com>
161
162 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
163 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
164 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
165 scoped_restore.
166 (mi_cmd_break_insert_1): Update.
167 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
168 scoped_restore.
169
170 2017-09-11 Tom Tromey <tom@tromey.com>
171
172 * demangle.c (demangle_command): Update.
173 * breakpoint.c (disable_command): Update.
174 (enable_command): Update.
175 (find_location_by_number): Make "number" const. Use
176 get_number_trailer.
177 * cli/cli-utils.c (extract_arg): Return std::string.
178 * probe.c (parse_probe_linespec): Update. Change types.
179 (collect_probes): Take string arguments.
180 (parse_probe_linespec): Likewise.
181 (info_probes_for_ops): Update.
182 (enable_probes_command): Update.
183 (disable_probes_command): Update.
184 * break-catch-sig.c (catch_signal_split_args): Update.
185 * mi/mi-parse.c (mi_parse): Update.
186
187 2017-09-11 Tom Tromey <tom@tromey.com>
188
189 * language.h (language_enum): Make argument const.
190 * language.c (language_enum): Make argument const.
191
192 2017-09-11 Tom Tromey <tom@tromey.com>
193
194 * common/common-utils.h (skip_to_space): Remove macro, redeclare
195 as function.
196 (skip_to_space): Rename from skip_to_space_const.
197 * common/common-utils.c (skip_to_space): New function.
198 (skip_to_space): Rename from skip_to_space_const.
199 * cli/cli-utils.h (get_number): Rename from get_number_const.
200 (extract_arg): Rename from extract_arg_const.
201 * cli/cli-utils.c (get_number): Rename from get_number_const.
202 (extract_arg): Rename from extract_arg_const.
203 (number_or_range_parser::get_number): Use ::get_number.
204 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
205 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
206 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
207 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
208 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
209 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
210 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
211 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
212
213 2017-09-11 Tom Tromey <tom@tromey.com>
214
215 * python/python.c (do_start_initialization): Use
216 py-event-types.def to initialize types.
217 Define all object type structures.
218 * python/python-internal.h: Don't declare event initialization
219 functions.
220 * python/py-threadevent.c (thread_event_object_type): Don't
221 define.
222 * python/py-stopevent.c (stop_event_object_type): Don't define.
223 * python/py-signalevent.c (signal_event_object_type): Don't
224 declare or define.
225 * python/py-newobjfileevent.c (new_objfile_event_object_type)
226 (clear_objfiles_event_object_type): Don't declare or define.
227 * python/py-infevents.c (inferior_call_pre_event_object_type)
228 (inferior_call_post_event_object_type)
229 (register_changed_event_object_type)
230 (memory_changed_event_object_type): Don't declare or define.
231 * python/py-inferior.c (new_thread_event_object_type)
232 (new_inferior_event_object_type)
233 (inferior_deleted_event_object_type): Don't declare or define.
234 * python/py-exitedevent.c (exited_event_object_type): Don't
235 declare or define.
236 * python/py-evts.c (gdbpy_initialize_py_events): Use
237 py-all-events.def.
238 * python/py-events.h (thread_event_object_type): Don't declare.
239 (events_object): Use py-all-events.def.
240 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
241 py-event-types.def.
242 * python/py-event-types.def: New file.
243 * python/py-continueevent.c (create_continue_event_object): Don't
244 declare or define.
245 * python/py-bpevent.c (breakpoint_event_object_type): Don't
246 declare or define.
247 * python/py-all-events.def: New file.
248
249 2017-09-11 Tom Tromey <tom@tromey.com>
250
251 * python/py-threadevent.c (create_thread_event_object): Return
252 gdbpy_ref.
253 * python/py-stopevent.h (create_stop_event_object)
254 (create_breakpoint_event_object, create_signal_event_object):
255 Update.
256 * python/py-stopevent.c (create_stop_event_object): Return
257 gdbpy_ref.
258 (emit_stop_event): Update.
259 * python/py-signalevent.c (create_signal_event_object): Return
260 gdbpy_ref.
261 * python/py-infevents.c (create_inferior_call_event_object):
262 Update.
263 * python/py-event.h (create_event_object)
264 (create_thread_event_object): Update.
265 * python/py-event.c (create_event_object): Return gdbpy_ref.
266 * python/py-continueevent.c: Return gdbpy_ref.
267 * python/py-bpevent.c (create_breakpoint_event_object): Return
268 gdbpy_ref.
269
270 2017-09-11 Tom Tromey <tom@tromey.com>
271
272 PR python/15622:
273 * NEWS: Add entry.
274 * python/python.c (do_start_initialization): Initialize new event
275 types.
276 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
277 (gdbpy_initialize_inferior_deleted_event)
278 (gdbpy_initialize_new_thread_event): Declare.
279 * python/py-threadevent.c (create_thread_event_object): Add option
280 "thread" parameter.
281 * python/py-inferior.c (new_thread_event_object_type)
282 (new_inferior_event_object_type)
283 (inferior_deleted_event_object_type): Declare.
284 (python_new_inferior, python_inferior_deleted): New functions.
285 (add_thread_object): Emit new_thread event.
286 (gdbpy_initialize_inferior): Attach new functions to corresponding
287 observers.
288 (new_thread, new_inferior, inferior_deleted): Define new event
289 types.
290 * python/py-evts.c (gdbpy_initialize_py_events): Add new
291 registries.
292 * python/py-events.h (events_object) <new_inferior,
293 inferior_deleted, new_thread>: New fields.
294 * python/py-event.h (create_thread_event_breakpoint): Add optional
295 "thread" parameter.
296
297 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
298
299 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
300 check current_ui instead.
301 (internal_vproblem): Likewise.
302
303 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
304
305 * thread.c (print_thread_info_1): Remove unnecessary calls to
306 uiout->is_mi_like_p.
307
308 2017-09-09 Tom Tromey <tom@tromey.com>
309
310 * namespace.h (add_using_directive): Update.
311 * namespace.c (add_using_directive): Change type of excludes to
312 std::vector.
313 * dwarf2read.c (read_import_statement): Use std::vector.
314 (read_namespace): Update.
315 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
316
317 2017-09-09 Tom Tromey <tom@tromey.com>
318
319 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
320
321 2017-09-09 Tom Tromey <tom@tromey.com>
322
323 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
324
325 2017-09-09 Tom Tromey <tom@tromey.com>
326
327 * stack.c (func_command): Use gdb::def_vector.
328
329 2017-09-09 Tom Tromey <tom@tromey.com>
330
331 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
332 ui_out_emit_list, ui_out_emit_tuple.
333 (mi_cmd_var_update): Likewise.
334
335 2017-09-09 Tom Tromey <tom@tromey.com>
336
337 * mi/mi-interp.c (mi_user_selected_context_changed): Use
338 ui_out_redirect_pop.
339 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
340 ui_out_redirect_pop.
341 * utils.c (do_ui_out_redirect_pop)
342 (make_cleanup_ui_out_redirect_pop): Remove.
343 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
344 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
345 * ui-out.h (ui_out_redirect_pop): New class.
346
347 2017-09-09 Tom Tromey <tom@tromey.com>
348
349 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
350 (list_available_thread_groups, mi_cmd_list_thread_groups)
351 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
352 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
353 Likewise.
354
355 2017-09-09 Tom Tromey <tom@tromey.com>
356
357 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
358 ui_out_emit_tuple.
359
360 2017-09-09 Tom Tromey <tom@tromey.com>
361
362 * target.c (flash_erase_command): Use ui_out_emit_tuple.
363 * stack.c (print_frame): Use ui_out_emit_tuple.
364 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
365 (info_spu_mailbox_command, info_spu_dma_command)
366 (info_spu_proxydma_command): Likewise.
367 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
368 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
369 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
370 ui_out_emit_tuple.
371 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
372
373 2017-09-09 Tom Tromey <tom@tromey.com>
374
375 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
376 (class ui_out_emit_table): Update comment.
377 * ui-out.c (do_cleanup_table_end)
378 (make_cleanup_ui_out_table_begin_end): Remove.
379 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
380 (info_spu_dma_cmdlist): Likewise.
381 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
382 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
383 ui_out_emit_table.
384
385 2017-09-09 Tom Tromey <tom@tromey.com>
386
387 * thread.c (print_thread_info_1): Use ui_out_emit_table,
388 ui_out_emit_list, gdb::optional.
389
390 2017-09-09 John Baldwin <jhb@FreeBSD.org>
391
392 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
393 prototype.
394 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
395 prototype.
396 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
397 prototype.
398 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
399 * ada-exp.y: Remove _initialize_ada_exp prototype.
400 * ada-lang.c: Remove _initialize_ada_language prototype.
401 * ada-tasks.c: Remove _initialize_tasks prototype.
402 * addrmap.c: Remove _initialize_addrmap prototype.
403 * agent.c: Remove _initialize_agent prototype.
404 * aix-thread.c: Remove _initialize_aix_thread prototype.
405 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
406 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
407 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
408 prototype.
409 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
410 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
411 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
412 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
413 prototype.
414 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
415 prototype.
416 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
417 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
418 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
419 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
420 prototype.
421 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
422 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
423 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
424 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
425 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
426 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
427 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
428 prototype.
429 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
430 prototype.
431 * annotate.c: Remove _initialize_annotate prototype.
432 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
433 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
434 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
435 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
436 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
437 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
438 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
439 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
440 prototype.
441 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
442 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
443 * auto-load.c: Remove _initialize_auto_load prototype.
444 * auxv.c: Remove _initialize_auxv prototype.
445 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
446 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
447 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
448 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
449 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
450 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
451 prototype.
452 * break-catch-throw.c: Remove _initialize_break_catch_throw
453 prototype.
454 * breakpoint.c: Remove _initialize_breakpoint prototype.
455 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
456 * btrace.c: Remove _initialize_btrace prototype.
457 * charset.c: Remove _initialize_charset prototype.
458 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
459 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
460 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
461 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
462 * cli/cli-script.c: Remove _initialize_cli_script prototype.
463 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
464 * coffread.c: Remove _initialize_coffread prototype.
465 * compile/compile.c: Remove _initialize_compile prototype.
466 * complaints.c: Remove _initialize_complaints prototype.
467 * completer.c: Remove _initialize_completer prototype.
468 * copying.awk: Remove _initialize_copying prototype.
469 * copying.c: Regenerate.
470 * core-regset.c: Remove _initialize_core_regset prototype.
471 * corefile.c: Remove _initialize_core prototype.
472 * corelow.c: Remove _initialize_corelow prototype.
473 * cp-abi.c: Remove _initialize_cp_abi prototype.
474 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
475 * cp-support.c: Remove _initialize_cp_support prototype.
476 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
477 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
478 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
479 * ctf.c: Remove _initialize_ctf prototype.
480 * d-lang.c: Remove _initialize_d_language prototype.
481 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
482 prototype.
483 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
484 * dbxread.c: Remove _initialize_dbxread prototype.
485 * dcache.c: Remove _initialize_dcache prototype.
486 * demangle.c: Remove _initialize_demangler prototype.
487 * disasm-selftests.c: Remove _initialize_disasm_selftests
488 prototype.
489 * disasm.c: Remove _initialize_disasm prototype.
490 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
491 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
492 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
493 prototype.
494 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
495 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
496 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
497 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
498 * elfread.c: Remove _initialize_elfread prototype.
499 * exec.c: Remove _initialize_exec prototype.
500 * extension.c: Remove _initialize_extension prototype.
501 * f-lang.c: Remove _initialize_f_language prototype.
502 * f-valprint.c: Remove _initialize_f_valprint prototype.
503 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
504 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
505 * filesystem.c: Remove _initialize_filesystem prototype.
506 * findcmd.c: Remove _initialize_mem_search prototype.
507 * fork-child.c: Remove _initialize_fork_child prototype.
508 * frame-base.c: Remove _initialize_frame_base prototype.
509 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
510 * frame.c: Remove _initialize_frame prototype.
511 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
512 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
513 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
514 * gcore.c: Remove _initialize_gcore prototype.
515 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
516 * gdbarch.c: Regenerate.
517 * gdbarch.sh: Remove _initialize_gdbarch prototype.
518 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
519 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
520 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
521 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
522 * go-lang.c: Remove _initialize_go_language prototype.
523 * go32-nat.c: Remove _initialize_go32_nat prototype.
524 * guile/guile.c: Remove _initialize_guile prototype.
525 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
526 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
527 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
528 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
529 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
530 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
531 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
532 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
533 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
534 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
535 prototype.
536 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
537 prototype.
538 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
539 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
540 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
541 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
542 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
543 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
544 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
545 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
546 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
547 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
548 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
549 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
550 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
551 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
552 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
553 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
554 prototype.
555 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
556 prototype.
557 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
558 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
559 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
560 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
561 * infcall.c: Remove _initialize_infcall prototype.
562 * infcmd.c: Remove _initialize_infcmd prototype.
563 * inferior.c: Remove _initialize_inferiors prototype.
564 * inflow.c: Remove _initialize_inflow prototype.
565 * infrun.c: Remove _initialize_infrun prototype.
566 * interps.c: Remove _initialize_interpreter prototype.
567 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
568 * jit.c: Remove _initialize_jit prototype.
569 * language.c: Remove _initialize_language prototype.
570 * linux-fork.c: Remove _initialize_linux_fork prototype.
571 * linux-nat.c: Remove _initialize_linux_nat prototype.
572 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
573 * linux-thread-db.c: Remove _initialize_thread_db prototype.
574 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
575 * m2-lang.c: Remove _initialize_m2_language prototype.
576 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
577 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
578 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
579 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
580 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
581 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
582 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
583 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
584 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
585 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
586 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
587 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
588 * machoread.c: Remove _initialize_machoread prototype.
589 * macrocmd.c: Remove _initialize_macrocmd prototype.
590 * macroscope.c: Remove _initialize_macroscope prototype.
591 * maint.c: Remove _initialize_maint_cmds prototype.
592 * mdebugread.c: Remove _initialize_mdebugread prototype.
593 * memattr.c: Remove _initialize_mem prototype.
594 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
595 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
596 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
597 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
598 * mi/mi-main.c: Remove _initialize_mi_main prototype.
599 * microblaze-linux-tdep.c: Remove
600 _initialize_microblaze_linux_tdep prototype.
601 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
602 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
603 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
604 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
605 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
606 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
607 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
608 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
609 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
610 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
611 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
612 prototype.
613 * mipsread.c: Remove _initialize_mipsread prototype.
614 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
615 prototype.
616 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
617 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
618 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
619 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
620 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
621 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
622 prototype.
623 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
624 * nto-procfs.c: Remove _initialize_procfs prototype.
625 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
626 * objc-lang.c: Remove _initialize_objc_language prototype.
627 * objfiles.c: Remove _initialize_objfiles prototype.
628 * observer.c: Remove observer_test_first_notification_function,
629 observer_test_second_notification_function,
630 observer_test_third_notification_function, and
631 _initialize_observer prototypes.
632 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
633 * osabi.c: Remove _initialize_gdb_osabi prototype.
634 * osdata.c: Remove _initialize_osdata prototype.
635 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
636 * parse.c: Remove _initialize_parse prototype.
637 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
638 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
639 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
640 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
641 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
642 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
643 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
644 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
645 * printcmd.c: Remove _initialize_printcmd prototype.
646 * probe.c: Remove _initialize_probe prototype.
647 * proc-api.c: Remove _initialize_proc_api prototype.
648 * proc-events.c: Remove _initialize_proc_events prototype.
649 * proc-service.c: Remove _initialize_proc_service prototype.
650 * procfs.c: Remove _initialize_procfs prototype.
651 * psymtab.c: Remove _initialize_psymtab prototype.
652 * python/python.c: Remove _initialize_python prototype.
653 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
654 * record-btrace.c: Remove _initialize_record_btrace prototype.
655 * record-full.c: Remove _initialize_record_full prototype.
656 * record.c: Remove _initialize_record prototype.
657 * regcache.c: Remove _initialize_regcache prototype.
658 * reggroups.c: Remove _initialize_reggroup prototype.
659 * remote-notif.c: Remove _initialize_notif prototype.
660 * remote-sim.c: Remove _initialize_remote_sim prototype.
661 * remote.c: Remove _initialize_remote prototype.
662 * reverse.c: Remove _initialize_reverse prototype.
663 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
664 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
665 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
666 prototype.
667 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
668 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
669 * rust-exp.y: Remove _initialize_rust_exp prototype.
670 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
671 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
672 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
673 * score-tdep.c: Remove _initialize_score_tdep prototype.
674 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
675 prototype.
676 * ser-go32.c: Remove _initialize_ser_dos prototype.
677 * ser-mingw.c: Remove _initialize_ser_windows prototype.
678 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
679 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
680 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
681 * serial.c: Remove _initialize_serial prototype.
682 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
683 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
684 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
685 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
686 * skip.c: Remove _initialize_step_skip prototype.
687 * sol-thread.c: Remove _initialize_sol_thread prototype.
688 * solib-aix.c: Remove _initialize_solib_aix prototype.
689 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
690 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
691 * solib-frv.c: Remove _initialize_frv_solib prototype.
692 * solib-spu.c: Remove _initialize_spu_solib prototype.
693 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
694 * solib-target.c: Remove _initialize_solib_target prototype.
695 * solib.c: Remove _initialize_solib prototype.
696 * source.c: Remove _initialize_source prototype.
697 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
698 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
699 prototype.
700 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
701 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
702 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
703 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
704 prototype.
705 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
706 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
707 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
708 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
709 prototype.
710 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
711 prototype.
712 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
713 prototype.
714 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
715 prototype.
716 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
717 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
718 prototype.
719 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
720 prototype.
721 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
722 prototype.
723 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
724 prototype.
725 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
726 prototype.
727 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
728 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
729 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
730 * stabsread.c: Remove _initialize_stabsread prototype.
731 * stack.c: Remove _initialize_stack prototype.
732 * stap-probe.c: Remove _initialize_stap_probe prototype.
733 * std-regs.c: Remove _initialize_frame_reg prototype.
734 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
735 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
736 * symfile.c: Remove _initialize_symfile prototype.
737 * symmisc.c: Remove _initialize_symmisc prototype.
738 * symtab.c: Remove _initialize_symtab prototype.
739 * target-dcache.c: Remove _initialize_target_dcache prototype.
740 * target-descriptions.c: Remove _initialize_target_descriptions
741 prototype.
742 * thread.c: Remove _initialize_thread prototype.
743 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
744 prototype.
745 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
746 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
747 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
748 prototype.
749 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
750 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
751 * tracefile.c: Remove _initialize_tracefile prototype.
752 * tracepoint.c: Remove _initialize_tracepoint prototype.
753 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
754 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
755 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
756 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
757 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
758 * tui/tui-win.c: Remove _initialize_tui_win prototype.
759 * tui/tui.c: Remove _initialize_tui prototype.
760 * typeprint.c: Remove _initialize_typeprint prototype.
761 * user-regs.c: Remove _initialize_user_regs prototype.
762 * utils.c: Remove _initialize_utils prototype.
763 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
764 * valarith.c: Remove _initialize_valarith prototype.
765 * valops.c: Remove _initialize_valops prototype.
766 * valprint.c: Remove _initialize_valprint prototype.
767 * value.c: Remove _initialize_values prototype.
768 * varobj.c: Remove _initialize_varobj prototype.
769 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
770 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
771 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
772 * windows-nat.c: Remove _initialize_windows_nat,
773 _initialize_check_for_gdb_ini, and _initialize_loadable
774 prototypes.
775 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
776 * xcoffread.c: Remove _initialize_xcoffread prototype.
777 * xml-support.c: Remove _initialize_xml_support prototype.
778 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
779 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
780 prototype.
781 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
782 prototype.
783 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
784
785 2017-09-08 Keith Seitz <keiths@redhat.com>
786
787 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
788 field.
789
790 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
791
792 * f-valprint.c (f_val_print): Remove check for one byte
793 sized integers. Remove printing of character type.
794
795 2017-09-08 Frank Penczek <frank.penczek@intel.com>
796 Christoph Weinmann <christoph.t.weinmann@intel.com>
797 Bernhard Heckel <bernhard.heckel@intel.com>
798
799 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
800 to maintain proper indentation when printing pointers/refs.
801
802 2017-09-07 Joel Brobecker <brobecker@adacore.com>
803
804 GDB 8.0.1 released.
805
806 2017-09-07 Joel Brobecker <brobecker@adacore.com>
807
808 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
809
810 2017-09-05 Tom Tromey <tom@tromey.com>
811
812 * parse.c (funcall_chain): Now a std::vector.
813 (start_arglist, end_arglist): Simplify.
814 (free_funcalls): Remove.
815 (parse_exp_in_context_1): Remove cleanup.
816
817 2017-09-05 Tom Tromey <tom@tromey.com>
818
819 * go-exp.y (go_parse): Don't create a cleanup.
820
821 2017-09-05 Tom Tromey <tom@tromey.com>
822
823 * d-exp.y (PrimaryExpression): Use std::string.
824 (d_parse): Don't create a cleanup.
825
826 2017-09-05 Tom Tromey <tom@tromey.com>
827
828 * utils.c (do_clear_parser_state): Remove.
829 (make_cleanup_clear_parser_state): Remove.
830 * p-exp.y (pascal_parse): Use scoped_restore.
831 * m2-exp.y (m2_parse): Use scoped_restore.
832 * f-exp.y (f_parse): Use scoped_restore.
833 * d-exp.y (d_parse): Use scoped_restore.
834 * c-exp.y (c_parse): Use scoped_restore.
835 * ada-exp.y (ada_parse): Use scoped_restore.
836 * utils.h (make_cleanup_clear_parser_state): Remove.
837
838 2017-09-06 Keith Seitz <keiths@redhat.com>
839
840 * dwarf2read.c (dw2_linkage_name_attr): New function.
841 (dw2_linkage_name): New function.
842 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
843 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
844 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
845
846 2017-09-06 Kamil Rytarowski <n54@gmx.com>
847
848 * config/djgpp/djconfig.sh: Correct shell portability issue.
849
850 2017-09-06 Kamil Rytarowski <n54@gmx.com>
851
852 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
853
854 2017-09-06 John Baldwin <jhb@FreeBSD.org>
855
856 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
857 * NEWS: Mention new FreeBSD/mips native configuration.
858 * configure.host: Add aarch64*-*-freebsd*.
859 * configure.nat: Likewise.
860 * aarch64-fbsd-nat.c: New file.
861
862 2017-09-06 John Baldwin <jhb@FreeBSD.org>
863
864 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
865 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
866 * NEWS: Mention new FreeBSD/aarch64 target.
867 * configure.tgt: Add aarch64*-*-freebsd*.
868 * aarch64-fbsd-tdep.c: New file.
869 * aarch64-fbsd-tdep.h: New file.
870
871 2017-09-06 Kamil Rytarowski <n54@gmx.com>
872
873 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
874
875 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
876
877 * parse.c (find_minsym_type_and_address): Don't relocate addresses
878 of TLS symbols.
879
880 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
881
882 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
883 call.
884
885 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
886
887 * infrun.c (follow_exec): Call add_thread after
888 target_find_description.
889
890 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
891
892 * infrun.c (handle_inferior_event_1): When exec'ing, read
893 stop_pc after follow_exec.
894
895 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
896
897 * remote.c (process_g_packet): Update error message.
898
899 2017-09-05 Yao Qi <yao.qi@linaro.org>
900
901 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
902 targets.
903
904 2017-09-05 Pedro Alves <palves@redhat.com>
905
906 * eval.c (eval_call, evaluate_funcall): New functions, factored
907 out from ...
908 (evaluate_subexp_standard): ... this.
909
910 2017-09-05 Yao Qi <yao.qi@linaro.org>
911
912 * amd64-tdep.c (amd64_target_description): Create target
913 descriptions.
914 (_initialize_amd64_tdep): Don't call functions
915 initialize_tdesc_amd64_*. Add self tests.
916 * arch/amd64.c (amd64_create_target_description): Add parameter
917 is_linux. Call set_tdesc_osabi if is_linux is true.
918 * arch/amd64.h (amd64_create_target_description): Update the
919 declaration.
920 * arch/i386.c (i386_create_target_description): Add parameter
921 is_linux. Call set_tdesc_osabi if is_linux is true.
922 * arch/i386.h (i386_create_target_description): Update
923 declaration.
924 * configure.tgt: Add i386.o to gdb_target_obs.
925 * features/Makefile (XMLTOC): Remove i386/*.xml.
926 * features/i386/amd64-avx-avx512.c: Remove.
927 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
928 * features/i386/amd64-avx-mpx.c: Remove.
929 * features/i386/amd64-avx.c: Remove.
930 * features/i386/amd64-mpx.c: Remove.
931 * features/i386/amd64.c: Remove.
932 * features/i386/i386-avx-avx512.c: Remove.
933 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
934 * features/i386/i386-avx-mpx.c: Remove.
935 * features/i386/i386-avx.c: Remove.
936 * features/i386/i386-mmx.c: Remove.
937 * features/i386/i386-mpx.c: Remove.
938 * features/i386/i386.c: Remove.
939 * i386-tdep.c: Don't include features/i386/i386*.c., include
940 target-descriptions.h and arch/i386.h.
941 (i386_target_description): Create target descriptions.
942 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
943 functions. Do self tests.
944
945 2017-09-05 Yao Qi <yao.qi@linaro.org>
946
947 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
948 * features/i386/amd64-avx-avx512-linux.c: Removed.
949 * features/i386/amd64-avx-linux.c: Removed.
950 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
951 * features/i386/amd64-avx-mpx-linux.c: Removed.
952 * features/i386/amd64-linux.c: Removed.
953 * features/i386/amd64-mpx-linux.c: Removed.
954 * features/i386/x32-avx-avx512-linux.c: Removed.
955 * features/i386/x32-avx-linux.c: Removed.
956 * features/i386/x32-linux.c: Removed.
957
958 2017-09-05 Yao Qi <yao.qi@linaro.org>
959
960 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
961 features/i386/*.c.
962 (amd64_linux_read_description): Call
963 amd64_create_target_description.
964 * arch/amd64.c: New file.
965 * arch/amd64.h: New file.
966 * configure.tgt (x86_64-*-linux*): Append amd64.o.
967 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
968
969 2017-09-05 Yao Qi <yao.qi@linaro.org>
970
971 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
972 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
973 (amd64_linux_read_description): Create target descriptions.
974 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
975 functions. Add unit tests.
976 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
977 x32-core.xml.
978 * features/i386/64bit-avx.c: Generated.
979 * features/i386/64bit-avx512.c: Generated.
980 * features/i386/64bit-core.c: Generated.
981 * features/i386/64bit-linux.c: Generated.
982 * features/i386/64bit-mpx.c: Generated.
983 * features/i386/64bit-pkeys.c: Generated.
984 * features/i386/64bit-segments.c: Generated.
985 * features/i386/64bit-sse.c: Generated.
986 * features/i386/x32-core.c: Generated.
987 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
988 c files for amd64-linux and x32-linux.
989
990 2017-09-05 Yao Qi <yao.qi@linaro.org>
991
992 * amd64-linux-tdep.c (amd64_linux_read_description): New
993 function.
994 (amd64_linux_core_read_description): Call
995 amd64_linux_read_description.
996 (amd64_linux_init_abi): Likewise.
997 (amd64_x32_linux_init_abi): Likewise.
998 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
999 * x86-linux-nat.c (x86_linux_read_description): Call
1000 amd64_linux_read_description.
1001
1002 2017-09-05 Yao Qi <yao.qi@linaro.org>
1003
1004 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1005 comments.
1006
1007 2017-09-05 Yao Qi <yao.qi@linaro.org>
1008
1009 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1010 * features/i386/i386-avx-avx512-linux.c: Remove.
1011 * features/i386/i386-avx-linux.c: Remove.
1012 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1013 * features/i386/i386-avx-mpx-linux.c: Remove.
1014 * features/i386/i386-linux.c: Remove.
1015 * features/i386/i386-mmx-linux.c: Remove.
1016 * features/i386/i386-mpx-linux.c: Remove.
1017
1018 2017-09-05 Yao Qi <yao.qi@linaro.org>
1019
1020 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1021 (SFILES): Add arch/i386.c.
1022 (HFILES_NO_SRCDIR): Add arch/i386.h.
1023 * arch/i386.c: New file.
1024 * arch/i386.h: New file.
1025 * arch/tdesc.h (allocate_target_description): Declare.
1026 (set_tdesc_architecture): Declare.
1027 (set_tdesc_osabi): Declare.
1028 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1029 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1030 include arch/i386.h.
1031 (i386_linux_read_description): Remove code and call
1032 i386_create_target_description.
1033 (set_tdesc_architecture): New function.
1034 (set_tdesc_osabi): New function.
1035 * target-descriptions.h (allocate_target_description): Remove.
1036
1037 2017-09-05 Yao Qi <yao.qi@linaro.org>
1038
1039 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1040 * target-descriptions.c (tdesc_create_feature): Likewise, and
1041 adjust code.
1042 * features/i386/32bit-avx.c: Re-generated.
1043 * features/i386/32bit-avx512.c: Re-generated.
1044 * features/i386/32bit-core.c: Re-generated.
1045 * features/i386/32bit-linux.c: Re-generated.
1046 * features/i386/32bit-mpx.c: Re-generated.
1047 * features/i386/32bit-pkeys.c: Re-generated.
1048 * features/i386/32bit-sse.c: Re-generated.
1049
1050 2017-09-05 Yao Qi <yao.qi@linaro.org>
1051
1052 * regformats/regdef.h (struct reg): Override operator == and !=.
1053
1054 2017-09-05 Yao Qi <yao.qi@linaro.org>
1055
1056 * arch/tdesc.h: New file.
1057 * regformats/regdat.sh: Generate code using tdesc_create_reg.
1058 * target-descriptions.c: Update comments.
1059 * target-descriptions.h: Include "arch/tdesc.h". Remove the
1060 declarations.
1061 * features/i386/32bit-avx.c: Re-generated.
1062 * features/i386/32bit-avx512.c: Re-generated.
1063 * features/i386/32bit-core.c: Re-generated.
1064 * features/i386/32bit-linux.c: Re-generated.
1065 * features/i386/32bit-mpx.c: Re-generated.
1066 * features/i386/32bit-pkeys.c: Re-generated.
1067 * features/i386/32bit-sse.c: Re-generated.
1068
1069 2017-09-05 Yao Qi <yao.qi@linaro.org>
1070
1071 * regformats/regdat.sh: Update generated code.
1072
1073 2017-09-05 Yao Qi <yao.qi@linaro.org>
1074
1075 * regformats/regdat.sh: Adjust code order.
1076
1077 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1078
1079 * expprint.c (dump_subexp_body_standard): Use constant format
1080 string in fprintf_filtered call.
1081
1082 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1083
1084 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1085 NetBSD/i386.
1086 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1087
1088 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1089
1090 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1091
1092 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1093
1094 * bsd-kvm.o: Define _KMEMUSER.
1095 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1096 * configure: Regenerate.
1097
1098 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1099
1100 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1101 * i386-fbsd-nat.c: Likewise.
1102
1103 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1104
1105 * unittests/array-view-selftests.c: Add include of <array>.
1106
1107 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1108
1109 * spu-tdep.c (flush_ea_cache): Add missing argument to
1110 call_function_by_hand.
1111
1112 2017-09-04 Pedro Alves <palves@redhat.com>
1113
1114 * NEWS (Safer support for debugging with no debug info): New.
1115
1116 2017-09-04 Pedro Alves <palves@redhat.com>
1117
1118 * c-exp.y (function_method, function_method_void): Add current
1119 instance flags to TYPE_INSTANCE.
1120 * dwarf2read.c (check_modifier): New.
1121 (compute_delayed_physnames): Assert that only C++ adds delayed
1122 physnames. Mark fn_fields as const/volatile depending on
1123 physname.
1124 * eval.c (make_params): New type_instance_flags parameter. Use
1125 it as the new type's instance flags.
1126 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1127 flags element and pass it to make_params.
1128 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1129 instance flags element.
1130 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1131 * gdbtypes.h: Include "enum-flags.h".
1132 (type_instance_flags): New enum-flags type.
1133 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1134 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1135 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1136 (follow_type_instance_flags): New function.
1137 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1138 * parser-defs.h (follow_type_instance_flags): Declare.
1139 * valops.c (value_struct_elt_for_reference): const/volatile must
1140 match too.
1141
1142 2017-09-04 Pedro Alves <palves@redhat.com>
1143
1144 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1145 function/method scopes; lookup the nested name as a function local
1146 static variable.
1147
1148 2017-09-04 Pedro Alves <palves@redhat.com>
1149
1150 (%type <voidval>): Add function_method.
1151 * c-exp.y (exp): New production for calls with no arguments.
1152 (function_method, function_method_void_or_typelist): New
1153 productions.
1154 (exp): New production for "method()::static_var".
1155 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1156 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1157 Handle OP_FUNC_STATIC_VAR.
1158 * parse.c (operator_length_standard):
1159 Handle OP_FUNC_STATIC_VAR.
1160
1161 2017-09-04 Pedro Alves <palves@redhat.com>
1162
1163 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1164 handling.
1165 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1166 Ditto.
1167 * parse.c (operator_length_standard, operator_check_standard):
1168 Ditto.
1169 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1170
1171 2017-09-04 Pedro Alves <palves@redhat.com>
1172
1173 * ax-gdb.c: Include "typeprint.h".
1174 (gen_expr_for_cast): New function.
1175 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1176 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1177 type is unknown.
1178 * dwarf2read.c (new_symbol_full): Fallback to int instead of
1179 nodebug_data_symbol.
1180 * eval.c: Include "typeprint.h".
1181 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1182 Error out if symbol has unknown type.
1183 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1184 evaluate_subexp_for_cast.
1185 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1186 OP_VAR_MSYM_VALUE.
1187 (evaluate_subexp_for_cast): New function.
1188 * gdbtypes.c (init_nodebug_var_type): New function.
1189 (objfile_type): Use it to initialize types of variables with no
1190 debug info.
1191 * typeprint.c (error_unknown_type): New.
1192 * typeprint.h (error_unknown_type): New declaration.
1193 * compile/compile-c-types.c (convert_type_basic): Handle
1194 TYPE_CODE_ERROR; warn and fallback to int for variables with
1195 unknown type.
1196
1197 2017-09-04 Pedro Alves <palves@redhat.com>
1198
1199 * eval.c (evaluate_var_value): New function, factored out from ...
1200 (evaluate_subexp_standard): ... here.
1201
1202 2017-09-04 Pedro Alves <palves@redhat.com>
1203
1204 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1205 Remove useless assignments to 'op'.
1206
1207 2017-09-04 Pedro Alves <palves@redhat.com>
1208
1209 * eval.c (eval_skip_value): New function.
1210 (evaluate_subexp_standard): Use it.
1211
1212 2017-09-04 Pedro Alves <palves@redhat.com>
1213
1214 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
1215 function name from symbol/minsym and pass it to
1216 error_call_unknown_return_type.
1217
1218 2017-09-04 Pedro Alves <palves@redhat.com>
1219
1220 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
1221 * ax-gdb.c (gen_msym_var_ref): New function.
1222 (gen_expr): Handle OP_VAR_MSYM_VALUE.
1223 * eval.c (evaluate_var_msym_value): New function.
1224 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
1225 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
1226 to call_function_by_hand.
1227 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1228 Handle OP_VAR_MSYM_VALUE.
1229 (union exp_element) <msymbol>: New field.
1230 * minsyms.h (struct type): Forward declare.
1231 (find_minsym_type_and_address): Declare.
1232 * parse.c (write_exp_elt_msym): New function.
1233 (write_exp_msymbol): Delete, refactored as ...
1234 (find_minsym_type_and_address): ... this new function.
1235 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
1236 (operator_length_standard, operator_check_standard): Handle
1237 OP_VAR_MSYM_VALUE.
1238 * std-operator.def (OP_VAR_MSYM_VALUE): New.
1239
1240 2017-09-04 Pedro Alves <palves@redhat.com>
1241
1242 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
1243 TYPE_GNU_IFUNC specially here. Throw error if return type is
1244 unknown.
1245 * ada-typeprint.c (print_func_type): Handle functions with unknown
1246 return type.
1247 * c-typeprint.c (c_type_print_base): Handle functions and methods
1248 with unknown return type.
1249 * compile/compile-c-symbols.c (convert_symbol_bmsym)
1250 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
1251 * compile/compile-c-types.c: Include "objfiles.h".
1252 (convert_func): For functions with unknown return type, warn and
1253 default to int.
1254 * compile/compile-object-run.c (compile_object_run): Adjust call
1255 to call_function_by_hand_dummy.
1256 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
1257 call_function_by_hand.
1258 * eval.c (evaluate_subexp_standard): Adjust calls to
1259 call_function_by_hand. Handle functions and methods with unknown
1260 return type. Pass expect_type to call_function_by_hand.
1261 * f-typeprint.c (f_type_print_base): Handle functions with unknown
1262 return type.
1263 * gcore.c (call_target_sbrk): Adjust call to
1264 call_function_by_hand.
1265 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
1266 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
1267 an integer address type instead of nodebug.
1268 * guile/scm-value.c (gdbscm_value_call): Adjust call to
1269 call_function_by_hand.
1270 * infcall.c (error_call_unknown_return_type): New function.
1271 (call_function_by_hand): New "default_return_type" parameter.
1272 Pass it down.
1273 (call_function_by_hand_dummy): New "default_return_type"
1274 parameter. Use it instead of defaulting to int. If there's no
1275 default and the return type is unknown, throw an error. If
1276 there's a default return type, and the called function has no
1277 debug info, then assume the function is prototyped.
1278 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
1279 New "default_return_type" parameter.
1280 (error_call_unknown_return_type): New declaration.
1281 * linux-fork.c (call_lseek): Cast return type of lseek.
1282 (inferior_call_waitpid, checkpoint_command): Adjust calls to
1283 call_function_by_hand.
1284 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
1285 calls to call_function_by_hand.
1286 * m2-typeprint.c (m2_procedure): Handle functions with unknown
1287 return type.
1288 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1289 (value_nsstring, print_object_command): Adjust calls to
1290 call_function_by_hand.
1291 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
1292 functions with unknown return type.
1293 (pascal_type_print_func_varspec_suffix): New function.
1294 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
1295 TYPE_CODE_METHOD>: Use it.
1296 * python/py-value.c (valpy_call): Adjust call to
1297 call_function_by_hand.
1298 * rust-lang.c (rust_evaluate_funcall): Adjust call to
1299 call_function_by_hand.
1300 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
1301 call_function_by_hand.
1302 * valops.c (value_allocate_space_in_inferior): Adjust call to
1303 call_function_by_hand.
1304 * typeprint.c (type_print_unknown_return_type): New function.
1305 * typeprint.h (type_print_unknown_return_type): New declaration.
1306
1307 2017-09-04 Pedro Alves <palves@redhat.com>
1308
1309 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
1310 types with more than one parameter as prototyped.
1311
1312 2017-09-04 Pedro Alves <palves@redhat.com>
1313
1314 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
1315 (disassemble_command): Use gdb_disassembly_flags instead of bare
1316 int.
1317 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
1318 (dump_insns, do_mixed_source_and_assembly_deprecated)
1319 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
1320 Use gdb_disassembly_flags instead of bare int.
1321 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
1322 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
1323 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
1324 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
1325 (enum gdb_disassembly_flag): ... values of this new enumeration.
1326 (gdb_disassembly_flags): Define.
1327 (gdb_disassembly)
1328 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
1329 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
1330 gdb_disassembly_flags instead of bare int.
1331 * record-btrace.c (btrace_insn_history)
1332 (record_btrace_insn_history, record_btrace_insn_history_range)
1333 (record_btrace_insn_history_from): Use gdb_disassembly_flags
1334 instead of bare int.
1335 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
1336 Use gdb_disassembly_flags instead of bare int.
1337 * target-debug.h (target_debug_print_gdb_disassembly_flags):
1338 Define.
1339 * target-delegates.c: Regenerate.
1340 * target.c (target_insn_history, target_insn_history_from)
1341 (target_insn_history_range): Use gdb_disassembly_flags instead of
1342 bare int.
1343 * target.h: Include "disasm.h".
1344 (struct target_ops) <to_insn_history, to_insn_history_from,
1345 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
1346 int.
1347 (target_insn_history, target_insn_history_from)
1348 (target_insn_history_range): Use gdb_disassembly_flags instead of
1349 bare int.
1350
1351 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1352
1353 * cli/cli-script.c (build_command_line): For if/while commands,
1354 check whether args is empty.
1355
1356 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1357
1358 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
1359 (enum command_control_type): Likewise.
1360 (struct command_line): Likewise.
1361 (free_command_lines): Likewise.
1362 (struct command_lines_deleter): Likewise.
1363 (command_line_up): Likewise.
1364 (read_command_lines): Likewise.
1365 (read_command_lines_1): Likewise.
1366 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
1367 (enum command_control_type): Likewise.
1368 (struct command_line): Likewise.
1369 (free_command_lines): Likewise.
1370 (struct command_lines_deleter): Likewise.
1371 (command_line_up): Likewise.
1372 (read_command_lines): Likewise.
1373 (read_command_lines_1): Likewise.
1374 * breakpoint.h: Include cli/cli-script.h.
1375 * extension-priv.h: Likewise.
1376 * gdbcmd.h: Likewise.
1377
1378 2017-09-04 Pedro Alves <palves@redhat.com>
1379
1380 * ada-lang.c (is_known_support_routine): Move sal declaration to
1381 where it is initialized.
1382 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
1383 (parse_breakpoint_sals, decode_static_tracepoint_spec)
1384 (clear_command, update_static_tracepoint): Remove init_sal
1385 references. Move declarations closer to initializations.
1386 * cli/cli-cmds.c (list_command): Move sal declarations closer to
1387 initializations.
1388 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
1389 references. Move sal declarations closer to initializations.
1390 * frame.c (find_frame_sal): Return a symtab_and_line via function
1391 return instead of output parameter. Remove init_sal references.
1392 * frame.h (find_frame_sal): Return a symtab_and_line via function
1393 return instead of output parameter.
1394 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
1395 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
1396 instead of memset.
1397 (gdbscm_find_pc_line): Remove init_sal reference.
1398 * infcall.c (call_function_by_hand_dummy): Remove init_sal
1399 references. Move declarations closer to initializations.
1400 * infcmd.c (set_step_frame): Update. Move declarations closer to
1401 initializations.
1402 (finish_backward): Remove init_sal references. Move declarations
1403 closer to initializations.
1404 * infrun.c (process_event_stop_test, handle_step_into_function)
1405 (insert_hp_step_resume_breakpoint_at_frame)
1406 (insert_step_resume_breakpoint_at_caller): Likewise.
1407 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
1408 (symbol_to_sal): Likewise.
1409 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
1410 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
1411 to its initialization.
1412 * reverse.c (save_bookmark_command): Use new/delete. Remove
1413 init_sal references. Move declarations closer to initializations.
1414 * source.c (get_current_source_symtab_and_line): Remove brace
1415 initialization.
1416 (set_current_source_symtab_and_line): Now takes the sal by const
1417 reference. Remove brace initialization.
1418 (line_info): Remove init_sal reference.
1419 * source.h (set_current_source_symtab_and_line): Now takes a
1420 symtab_and_line via const reference.
1421 * stack.c (set_current_sal_from_frame): Adjust.
1422 (print_frame_info): Adjust.
1423 (get_last_displayed_sal): Return the sal via function return
1424 instead of via output parameter. Simplify.
1425 (frame_info): Adjust.
1426 * stack.h (get_last_displayed_sal): Return the sal via function
1427 return instead of via output parameter.
1428 * symtab.c (init_sal): Delete.
1429 (find_pc_sect_line): Remove init_sal references. Move
1430 declarations closer to initializations.
1431 (find_function_start_sal): Remove init_sal references. Move
1432 declarations closer to initializations.
1433 * symtab.h (struct symtab_and_line): In-class initialize all
1434 fields.
1435 * tracepoint.c (set_traceframe_context)
1436 (print_one_static_tracepoint_marker): Remove init_sal references.
1437 Move declarations closer to initializations.
1438 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
1439 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
1440 declarations closer to initializations.
1441 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
1442 init_sal references. Adjust.
1443
1444 2017-09-04 Pedro Alves <palves@redhat.com>
1445
1446 * ax-gdb.c (agent_command_1): Use range-for.
1447 * break-catch-throw.c (re_set_exception_catchpoint): Update.
1448 * breakpoint.c: Include "common/array-view.h".
1449 (init_breakpoint_sal, create_breakpoint_sal): Change sals
1450 parameter from struct symtabs_and_lines to
1451 array_view<symtab_and_line>. Adjust. Use range-for. Update.
1452 (breakpoint_sals_to_pc): Change sals parameter from struct
1453 symtabs_and_lines to std::vector reference.
1454 (check_fast_tracepoint_sals): Change sals parameter from struct
1455 symtabs_and_lines to std::array_view. Use range-for.
1456 (decode_static_tracepoint_spec): Return a std::vector instead of
1457 symtabs_and_lines. Update.
1458 (create_breakpoint): Update.
1459 (break_range_command, until_break_command, clear_command): Update.
1460 (base_breakpoint_decode_location, bkpt_decode_location)
1461 (bkpt_probe_create_sals_from_location)
1462 (bkpt_probe_decode_location, tracepoint_decode_location)
1463 (tracepoint_probe_decode_location)
1464 (strace_marker_create_sals_from_location): Return a std::vector
1465 instead of symtabs_and_lines.
1466 (strace_marker_create_breakpoints_sal): Update.
1467 (strace_marker_decode_location): Return a std::vector instead of
1468 symtabs_and_lines. Update.
1469 (update_breakpoint_locations): Change struct symtabs_and_lines
1470 parameters to gdb::array_view. Adjust.
1471 (location_to_sals): Return a std::vector instead of
1472 symtabs_and_lines. Update.
1473 (breakpoint_re_set_default): Use std::vector instead of struct
1474 symtabs_and_lines.
1475 (decode_location_default): Return a std::vector instead of
1476 symtabs_and_lines. Update.
1477 * breakpoint.h: Include "common/array-view.h".
1478 (struct breakpoint_ops) <decode_location>: Now returns a
1479 std::vector instead of returning a symtabs_and_lines via output
1480 parameter.
1481 (update_breakpoint_locations): Change sals parameters to use
1482 gdb::array_view.
1483 * cli/cli-cmds.c (edit_command, list_command): Update to use
1484 std::vector and gdb::array_view.
1485 (ambiguous_line_spec): Adjust to use gdb::array_view and
1486 range-for.
1487 (compare_symtabs): Rename to ...
1488 (cmp_symtabs): ... this. Change parameters to symtab_and_line
1489 const reference and adjust.
1490 (filter_sals): Rewrite using std::vector and standard algorithms.
1491 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
1492 (jump_command): Update to use std::vector.
1493 * linespec.c (struct linespec_state) <canonical_names>: Update
1494 comment.
1495 (add_sal_to_sals_basic): Delete.
1496 (add_sal_to_sals, filter_results, convert_results_to_lsals)
1497 (decode_line_2, create_sals_line_offset)
1498 (convert_address_location_to_sals, convert_linespec_to_sals)
1499 (convert_explicit_location_to_sals, parse_linespec)
1500 (event_location_to_sals, decode_line_full, decode_line_1)
1501 (decode_line_with_current_source)
1502 (decode_line_with_last_displayed, decode_objc)
1503 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
1504 (linespec_result::~linespec_result): Adjust to use std::vector
1505 instead of symtabs_and_lines.
1506 * linespec.h (linespec_sals::sals): Now a std::vector.
1507 (struct linespec_result): Use std::vector, bool, and in-class
1508 initialization.
1509 (decode_line_1, decode_line_with_current_source)
1510 (decode_line_with_last_displayed): Return std::vector.
1511 * macrocmd.c (info_macros_command): Use std::vector.
1512 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
1513 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
1514 std::vector.
1515 * probe.h (parse_probes): Return a std::vector.
1516 * python/python.c (gdbpy_decode_line): Use std::vector and
1517 gdb::array_view.
1518 * source.c (select_source_symtab, line_info): Use std::vector.
1519 * stack.c (func_command): Use std::vector.
1520 * symtab.h (struct symtabs_and_lines): Delete.
1521 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
1522
1523 2017-09-04 Pedro Alves <palves@redhat.com>
1524
1525 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1526 unittests/array-view-selftests.c.
1527 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
1528 * common/array-view.h: New file.
1529 * unittests/array-view-selftests.c: New file.
1530
1531 2017-09-04 Pedro Alves <palves@redhat.com>
1532
1533 * cli/cli-cmds.c (edit_command): Pass message to
1534 ambiguous_line_spec.
1535 (list_command): Pass message to ambiguous_line_spec. Say
1536 "first"/"last" instead of "start" and "end" to be consistent with
1537 the manual.
1538 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
1539 them to print formatted message.
1540
1541 2017-09-04 Pedro Alves <palves@redhat.com>
1542
1543 * btrace.c (ftrace_add_pt): Pass btrace_insn to
1544 ftrace_update_insns by reference instead of pointer.
1545
1546 2017-09-04 Yao Qi <yao.qi@linaro.org>
1547
1548 * i386-go32-tdep.c: Include x86-xstate.h.
1549 (i386_go32_init_abi): Call i386_target_description.
1550 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
1551 if xcr0 is X86_XSTATE_X87_MASK.
1552 * i386-tdep.h (tdesc_i386): Remove the declaration.
1553 (tdesc_i386_mmx): Likewise.
1554
1555 2017-09-04 Yao Qi <yao.qi@linaro.org>
1556
1557 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
1558 X86_XSTATE_SSE_MASK instead of 0.
1559
1560 2017-09-04 Yao Qi <yao.qi@linaro.org>
1561
1562 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
1563 i386_target_description.
1564 * i386-fbsd-nat.c (i386fbsd_read_description): Call
1565 i386_target_description.
1566 * i386-tdep.c (i386_gdbarch_init): Likewise.
1567
1568 2017-09-04 Yao Qi <yao.qi@linaro.org>
1569
1570 * amd64-darwin-tdep.c: Include "x86-xstate.h".
1571 (x86_darwin_init_abi_64): Call amd64_target_description.
1572 * amd64-dicos-tdep.c: Likewise.
1573 * amd64-fbsd-nat.c: Likewise.
1574 * amd64-fbsd-tdep.c: Likewise.
1575 * amd64-nbsd-tdep.c: Likewise.
1576 * amd64-obsd-tdep.c: Likewise.
1577 * amd64-sol2-tdep.c: Likewise.
1578 * amd64-windows-tdep.c: Likewise.
1579 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
1580
1581 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1582
1583 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
1584 (btrace_function) <insn>: Change type to use std::vector.
1585 * btrace.c (ftrace_debug, ftrace_call_num_insn,
1586 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
1587 ftrace_update_insns, ftrace_compute_global_level_offset,
1588 btrace_stitch_bts, btrace_clear, btrace_insn_get,
1589 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
1590 change to std::vector.
1591 (ftrace_update_insns): Adjust to change to std::vector, change
1592 type of INSN parameter.
1593 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
1594 * record-btrace.c (btrace_call_history_insn_range,
1595 btrace_compute_src_line_range,
1596 record_btrace_frame_prev_register): Adjust to change to
1597 std::vector.
1598 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
1599 to change to std::vector.
1600
1601 2017-09-03 Tom Tromey <tom@tromey.com>
1602
1603 * corefile.c (reopen_exec_file): Use std::string.
1604
1605 2017-09-03 Tom Tromey <tom@tromey.com>
1606
1607 * compile/compile.c (compile_register_name_mangled): Return
1608 std::string.
1609 * compile/compile-loc2c.c (pushf_register_address): Update.
1610 (pushf_register): Update.
1611 * compile/compile-c-types.c (convert_array): Update.
1612 * compile/compile-c-symbols.c (generate_vla_size): Update.
1613 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
1614 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
1615 (convert_one_symbol): Update.
1616 (generate_c_for_for_one_variable): Update.
1617 * compile/compile-c-support.c (c_get_range_decl_name): Return a
1618 std::string.
1619 (generate_register_struct): Update.
1620 * compile/compile-internal.h (c_get_range_decl_name): Return a
1621 std::string.
1622 (compile_register_name_mangled): Return std::string.
1623
1624 2017-09-03 Tom Tromey <tom@tromey.com>
1625
1626 * utils.c (perror_string): Return a std::string.
1627 (throw_perror_with_name, perror_warning_with_name): Update.
1628
1629 2017-09-03 Tom Tromey <tom@tromey.com>
1630
1631 * demangle.c (demangle_command): Use std::string,
1632 unique_xmalloc_ptr.
1633
1634 2017-09-03 Tom Tromey <tom@tromey.com>
1635
1636 * cli/cli-setshow.c (do_set_command): Use std::string.
1637
1638 2017-09-03 Tom Tromey <tom@tromey.com>
1639
1640 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
1641
1642 2017-09-03 Tom Tromey <tom@tromey.com>
1643
1644 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
1645
1646 2017-09-03 Tom Tromey <tom@tromey.com>
1647
1648 * mi/mi-cmd-env.c (env_execute_cli_command): Use
1649 gdb::unique_xmalloc_ptr.
1650
1651 2017-09-03 Tom Tromey <tom@tromey.com>
1652
1653 * thread.c (print_thread_info_1): Use string_printf.
1654 (thread_apply_command, thread_apply_all_command): Use
1655 std::string.
1656
1657 2017-09-03 Tom Tromey <tom@tromey.com>
1658
1659 * valprint.c (val_print_string): Update.
1660 * gdbcore.h (memory_error_message): Return std::string.
1661 * corefile.c (memory_error_message): Return std::string.
1662 (memory_error): Update.
1663 * breakpoint.c (insert_bp_location): Update.
1664
1665 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1666
1667 * target/waitstatus.h (target_waitstatus_to_string): Change
1668 return type to std::string.
1669 * target/waitstatus.c (target_waitstatus_to_string): Return
1670 std::string.
1671 * target.h (target_waitstatus_to_string): Remove declaration.
1672 * infrun.c (resume, clear_proceed_status_thread,
1673 print_target_wait_results, do_target_wait, save_waitstatus,
1674 stop_all_threads): Adjust.
1675 * record-btrace.c (record_btrace_wait): Adjust.
1676 * target-debug.h
1677 (target_debug_print_struct_target_waitstatus_p): Adjust.
1678
1679 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1680
1681 PR gdb/22046
1682 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
1683 detection.
1684
1685 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1686
1687 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
1688 for setting/unsetting environment variables on the remote target.
1689 (New remote packets): Add entries for QEnvironmentHexEncoded,
1690 QEnvironmentUnset and QEnvironmentReset.
1691 * common/environ.c (gdb_environ::operator=): Extend method to
1692 handle m_user_set_env_list and m_user_unset_env_list.
1693 (gdb_environ::clear): Likewise.
1694 (match_var_in_string): Change type of first parameter from 'char
1695 *' to 'const char *'.
1696 (gdb_environ::set): Extend method to handle
1697 m_user_set_env_list and m_user_unset_env_list.
1698 (gdb_environ::unset): Likewise.
1699 (gdb_environ::clear_user_set_env): New method.
1700 (gdb_environ::user_set_envp): Likewise.
1701 (gdb_environ::user_unset_envp): Likewise.
1702 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
1703 m_user_unset_env_list on move constructor/assignment.
1704 (unset): Add new default parameter 'update_unset_list = true'.
1705 (clear_user_set_env): New method.
1706 (user_set_envp): Likewise.
1707 (user_unset_envp): Likewise.
1708 (m_user_set_env_list): New std::set.
1709 (m_user_unset_env_list): Likewise.
1710 * common/rsp-low.c (hex2str): New function.
1711 (bin2hex): New overload for bin2hex function.
1712 * common/rsp-low.c (hex2str): New prototype.
1713 (str2hex): New overload prototype.
1714 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
1715 QEnvironmentUnset and QEnvironmentReset.
1716 (remote_protocol_features): Add QEnvironmentHexEncoded,
1717 QEnvironmentUnset and QEnvironmentReset packets.
1718 (send_environment_packet): New function.
1719 (extended_remote_environment_support): Likewise.
1720 (extended_remote_create_inferior): Call
1721 extended_remote_environment_support.
1722 (_initialize_remote): Add QEnvironmentHexEncoded,
1723 QEnvironmentUnset and QEnvironmentReset packet configs.
1724 * unittests/environ-selftests.c (gdb_selftest_env_var):
1725 New variable.
1726 (test_vector_initialization): New function.
1727 (test_init_from_host_environ): Likewise.
1728 (test_reinit_from_host_environ): Likewise.
1729 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
1730 Likewise.
1731 (test_unset_set_empty_vector): Likewise.
1732 (test_vector_clear): Likewise.
1733 (test_std_move): Likewise.
1734 (test_move_constructor):
1735 (test_self_move): Likewise.
1736 (test_set_unset_reset): Likewise.
1737 (run_tests): Rewrite in terms of the functions above.
1738
1739 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
1740
1741 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
1742 (adi_available): Use a temp variable of type CORE_ADDR as argument
1743 3 when calling target_auxv_search.
1744 (adi_normalize_address): Use masks and xor operators to calculate
1745 normalized address.
1746 (adi_read_versions, adi_write_versions, adi_print_versions)
1747 (do_examine, do_assign): Use paddress.
1748
1749 2017-08-29 John Baldwin <jhb@FreeBSD.org>
1750
1751 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
1752 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
1753 out of loop and add supply of FIR.
1754 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
1755 add collect of FIR.
1756
1757 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
1758
1759 PR gdb/21827
1760 * cli/cli-script.c (define_command): Don't convert command name
1761 to lower case.
1762
1763 2017-08-25 Joel Brobecker <brobecker@adacore.com>
1764
1765 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
1766 Update all callers accordingly. Remove all code blocks handling
1767 the case where DISPP is not NULL.
1768
1769 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1770
1771 PR symtab/22003
1772 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
1773 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1774 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
1775
1776 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1777
1778 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
1779 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
1780 (read_comp_units_from_section): New parameter abbrev_section, use
1781 read_and_check_comp_unit_head, allocate signatured_type if needed.
1782 (create_all_comp_units): Update read_comp_units_from_section caller.
1783
1784 2017-08-23 Pedro Alves <palves@redhat.com>
1785
1786 PR remote/21852
1787 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
1788 to null_ptid and switch to thread without reading the registers
1789 after adding the inferior.
1790
1791 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
1792
1793 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
1794 compile-gcc.
1795 * compile/compile.c (compile_gcc, show_compile_gcc): New.
1796 (compile_to_object): Implement compile_gcc.
1797 (_initialize_compile): Install "set compile-gcc". Initialize
1798 compile_gcc.
1799
1800 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
1801
1802 * compile/compile.c (compile_to_object): Conditionally call
1803 set_verbose. Conditionally call compile or compile_v0.
1804
1805 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
1806
1807 * sparc64-tdep.h: (adi_normalize_address): New export.
1808 * sparc-nat.h: (open_adi_tag_fd): New export.
1809 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
1810 * sparc64-linux-tdep.c:
1811 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
1812 (sparc64_linux_handle_segmentation_fault): New function.
1813 (sparc64_linux_init_abi): Register
1814 sparc64_linux_handle_segmentation_fault
1815 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
1816 (sparc64_addr_bits_remove): New function.
1817 (sparc64_init_abi): Register sparc64_addr_bits_remove.
1818 (MAX_PROC_NAME_SIZE): New macro.
1819 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
1820 (sparc64adilist): New variable.
1821 (adi_proc_list): New variable.
1822 (find_adi_info): New function.
1823 (add_adi_info): New function.
1824 (get_adi_info_proc): New function.
1825 (get_adi_info): New function.
1826 (info_adi_command): New function.
1827 (read_maps_entry): New function.
1828 (adi_available): New function.
1829 (adi_normalize_address): New function.
1830 (adi_align_address): New function.
1831 (adi_convert_byte_count): New function.
1832 (adi_tag_fd): New function.
1833 (adi_is_addr_mapped): New function.
1834 (adi_read_versions): New function.
1835 (adi_write_versions): New function.
1836 (adi_print_versions): New function.
1837 (do_examine): New function.
1838 (do_assign): New function.
1839 (adi_examine_command): New function.
1840 (adi_assign_command): New function.
1841 (_initialize_sparc64_adi_tdep): New function.
1842
1843 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
1844
1845 * breakpoint.c (breakpoints_info): Rename to ...
1846 (info_breakpoints_command): ... this.
1847 (watchpoints_info): Rename to ...
1848 (info_watchpoints_command): ... this.
1849 (tracepoints_info): Rename to ...
1850 (info_tracepoints_command): ... this.
1851 (_initialize_breakpoint): Adjust.
1852 * dcache.c (dcache_info): Rename to ...
1853 (info_display_command): ... this.
1854 (_initialize_dcache): Adjust.
1855 * frame.h (args_info): Rename to ...
1856 (info_args_command): ... this.
1857 (locals_info): Rename to ...
1858 (info_locals_command): ... this.
1859 * infcmd.c (nofp_registers_info): Rename to ...
1860 (info_registers_command): ... this.
1861 (float_info): Rename to ...
1862 (info_float_command): ... this.
1863 (program_info): Rename to ...
1864 (info_program_command): ... this.
1865 (all_registers_info): Rename to ...
1866 (info_all_registers_command): ... this.
1867 (vector_info): Rename to ...
1868 (info_vector_command): ... this.
1869 (float_info): Rename to ...
1870 (info_float_command): ... this.
1871 (_initialize_infcmd): Adjust.
1872 * inferior.h (term_info): Rename to ...
1873 (info_terminal_command): ... this.
1874 * inflow.c (term_info): Rename to ...
1875 (info_terminal_command): ... this.
1876 (_initialize_inflow): Adjust.
1877 * infrun.c (signals_info): Rename to ...
1878 (info_signals_command): ... this.
1879 (_initialize_infrun): Adjust.
1880 * objc-lang.c (classes_info): Rename to ...
1881 (info_classes_command): ... this.
1882 (selectors_info): Rename to ...
1883 (info_selectors_command): ... this.
1884 (_initialize_objc_language): Adjust.
1885 * printcmd.c (sym_info): Rename to ...
1886 (info_symbol_command): ... this.
1887 (address_info): Rename to ...
1888 (info_address_command): ... this.
1889 (display_info): Rename to ...
1890 (info_display_command): ... this.
1891 (_initialize_printcmd): Adjust.
1892 * reverse.c (bookmarks_info): Rename to ...
1893 (info_breakpoints_command): ... this.
1894 (_initialize_reverse): Adjust.
1895 * ser-go32.c (dos_info): Rename to ...
1896 (info_serial_command): ... this.
1897 (_initialize_ser_dos): Adjust.
1898 * skip.c (skip_info): Rename to ...
1899 (info_skip_command): ... this.
1900 (_initialize_step_skip): Adjust.
1901 * source.c (line_info): Rename to ...
1902 (info_line_command): ... this.
1903 (source_info): Rename to ...
1904 (info_source_command)
1905 * stack.c (frame_info): Rename to ...
1906 (info_frame_command): ... this.
1907 (locals_info): Rename to ...
1908 (info_locals_command): ... this.
1909 (args_info): Rename to ...
1910 (info_args_command): ... this.
1911 (_initialize_stack): Adjust.
1912 * symtab.c (sources_info): Rename to ...
1913 (info_sources_command): ... this.
1914 (variables_info): Rename to ...
1915 (info_variables_command): ... this.
1916 (functions_info): Rename to ...
1917 (info_functions_command): ... this.
1918 (types_info): Rename to ...
1919 (info_types_command): ... this.
1920 (_initialize_symtab): Adjust.
1921 * target.c (target_info): Rename to ...
1922 (info_target_command): ... this.
1923 (initialize_targets): Adjust.
1924 * tracepoint.c (tvariables_info): Rename to ...
1925 (info_tvariables_command): ... this.
1926 (scope_info): Rename to ...
1927 (info_scope_command): ... this.
1928 (trace_dump_actions): Adjust.
1929 (_initialize_tracepoint): Adjust.
1930
1931 2017-08-22 Tom Tromey <tom@tromey.com>
1932
1933 * breakpoint.h (install_breakpoint): Update.
1934 * breakpoint.c (add_solib_catchpoint): Update.
1935 (install_breakpoint): Change argument to a std::unique_ptr.
1936 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
1937 (create_breakpoint_sal, create_breakpoint): Update.
1938 (watch_command_1, catch_exec_command_1)
1939 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
1940 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
1941 Return the breakpoint.
1942 (set_raw_breakpoint_without_location, set_raw_breakpoint)
1943 (new_single_step_breakpoint): Update.
1944 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
1945 std::unique_ptr.
1946 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
1947 std::unique_ptr.
1948 * break-catch-sig.c (create_signal_catchpoint): Use
1949 std::unique_ptr.
1950 * ada-lang.c (create_ada_exception_catchpoint): Use
1951 std::unique_ptr.
1952
1953 2017-08-22 Tom Tromey <tom@tromey.com>
1954
1955 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
1956
1957 2017-08-22 Tom Tromey <tom@tromey.com>
1958
1959 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
1960 (lookup_partial_symbol): Update.
1961
1962 2017-08-22 Tom Tromey <tom@tromey.com>
1963
1964 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
1965 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
1966 (find_and_open_source, symtab_to_fullname): Update.
1967 * psymtab.c (psymtab_to_fullname): Update.
1968
1969 2017-08-22 Tom Tromey <tom@tromey.com>
1970
1971 * exec.c (exec_file_attach): Update.
1972 * linux-thread-db.c (try_thread_db_load): Update.
1973 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
1974 * utils.c (gdb_realpath): Change return type.
1975 (gdb_realpath_keepfile): Update.
1976 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
1977 (_initialize_utils): Register the new self test.
1978 * source.c (openp): Update.
1979 (find_and_open_source): Update.
1980 * nto-tdep.c (nto_find_and_open_solib): Update.
1981 * main.c (set_gdb_data_directory): Update.
1982 (captured_main_1): Update.
1983 * dwarf2read.c (dwarf2_get_dwz_file): Update
1984 (dw2_map_symbol_filenames): Update.
1985 * auto-load.c (auto_load_safe_path_vec_update): Update.
1986 (filename_is_in_auto_load_safe_path_vec): Change type of
1987 "filename_realp".
1988 (auto_load_objfile_script): Update.
1989 (file_is_auto_load_safe): Update. Use std::string.
1990 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
1991
1992 2017-08-22 Tom Tromey <tom@tromey.com>
1993
1994 * utils.c (gdb_realpath_keepfile): Return a
1995 gdb::unique_xmalloc_ptr.
1996 * exec.c (exec_file_attach): Update.
1997 * utils.h (gdb_realpath_keepfile): Return a
1998 gdb::unique_xmalloc_ptr.
1999
2000 2017-08-22 Tom Tromey <tom@tromey.com>
2001
2002 * compile/compile.c (compile_file_command): Use
2003 gdb::unique_xmalloc_ptr, std::string.
2004 * utils.c (gdb_abspath): Change return type.
2005 * source.c (openp): Update.
2006 * objfiles.c (allocate_objfile): Update.
2007 * main.c (set_gdb_data_directory): Update.
2008 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2009
2010 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2011
2012 * cli-cmds.c (list_commands): List actual code around more than
2013 one location.
2014
2015 2017-08-21 John Baldwin <jhb@FreeBSD.org>
2016
2017 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2018
2019 2017-08-21 Pedro Alves <palves@redhat.com>
2020
2021 PR gdb/19487
2022 * c-exp.y (variable production): Handle function aliases.
2023 * minsyms.c (msymbol_is_text): New function.
2024 * minsyms.h (msymbol_is_text): Declare.
2025 * symtab.c (find_function_alias_target): New function.
2026 * symtab.h (find_function_alias_target): Declare.
2027
2028 2017-08-21 Pedro Alves <palves@redhat.com>
2029
2030 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2031 typedefs.
2032 * typeprint.c (whatis_exp): If handling "whatis", and expression
2033 is OP_TYPE, strip one typedef level. Otherwise don't strip
2034 typedefs here.
2035 * valops.c (value_cast): Save "to" type before resolving
2036 stubs/typedefs. Use that type as resulting value's type.
2037
2038 2017-08-18 Tom Tromey <tom@tromey.com>
2039 Pedro Alves <palves@redhat.com>
2040
2041 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2042 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2043 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2044 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2045 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2046 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2047 (linux_get_siginfo_data): Add "thread" argument. Use
2048 scoped_restore.
2049 * linux-nat.c (linux_child_follow_fork)
2050 (check_stopped_by_watchpoint): Use scoped_restore.
2051 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2052 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2053 (restore_inferior_ptid, save_inferior_ptid): Remove.
2054 * btrace.c (btrace_fetch): Use scoped_restore.
2055 * bsd-uthread.c (bsd_uthread_fetch_registers)
2056 (bsd_uthread_store_registers): Use scoped_restore.
2057 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2058 scoped_restore.
2059 * aix-thread.c (aix_thread_resume, aix_thread_wait)
2060 (aix_thread_xfer_partial): Use scoped_restore.
2061 * inferior.h (save_inferior_ptid): Remove.
2062
2063 2017-08-18 Yao Qi <yao.qi@linaro.org>
2064
2065 PR tdep/21818
2066 * arm-tdep.c (gdb_print_insn_arm): Mark
2067 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2068
2069 2017-08-18 Yao Qi <yao.qi@linaro.org>
2070
2071 * NEWS: Mention GDBserver's new option "--selftest".
2072 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2073 * selftest.c: Move it to common/selftest.c.
2074 * selftest.h: Move it to common/selftest.h.
2075 * selftest-arch.c (reset): New function.
2076 (tests_with_arch): Call reset.
2077
2078 2017-08-18 Yao Qi <yao.qi@linaro.org>
2079
2080 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
2081 instead of exception_fprintf and printf_filtered.
2082
2083 2017-08-18 Yao Qi <yao.qi@linaro.org>
2084
2085 * selftest.c (register_self_test): Rename it to
2086 selftests::register_test.
2087 (run_self_tests): selftest::run_tests.
2088 * selftest.h: Update declarations.
2089 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2090 selftests::register_test_foreach_arch.
2091 * selftest-arch.h: Update declaration.
2092 * aarch64-tdep.c: Update.
2093 * arm-tdep.c: Likewise.
2094 * disasm-selftests.c: Likewise.
2095 * dwarf2loc.c: Likewise.
2096 * dwarf2-frame.c: Likewise.
2097 * findvar.c: Likewise.
2098 * gdbarch-selftests.c: Likewise.
2099 * maint.c (maintenance_selftest): Likewise.
2100 * regcache.c: Likewise.
2101 * rust-exp.y: Likewise.
2102 * selftest-arch.c: Likewise.
2103 * unittests/environ-selftests.c: Likewise.
2104 * unittests/function-view-selftests.c: Likewise.
2105 * unittests/offset-type-selftests.c: Likewise.
2106 * unittests/optional-selftests.c: Likewise.
2107 * unittests/scoped_restore-selftests.c: Likewise.
2108 * utils-selftests.c: Likewise.
2109
2110 2017-08-17 Pedro Alves <palves@redhat.com>
2111
2112 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2113 local.
2114
2115 2017-08-17 Pedro Alves <palves@redhat.com>
2116
2117 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2118 field.
2119 (reset_die_in_process): Delete, replaced by ...
2120 (process_die_scope): ... this new class. Make it responsible for
2121 freeing cu->line_header too.
2122 (process_die): Use process_die_scope.
2123 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2124 cu->line_header_die_owner. Don't release the line header if it's
2125 owned by the CU.
2126 (setup_type_unit_groups): Make the CU/DIE own the line header.
2127 Don't release the line header here.
2128
2129 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
2130
2131 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2132
2133 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
2134
2135 * NEWS: Mention new shortcuts for nexti and stepi in TUI
2136 Single-Key mode
2137
2138 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
2139
2140 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2141 mode command list.
2142
2143 2017-08-15 Stafford Horne <shorne@gmail.com>
2144
2145 * MAINTAINERS (Write After Approval): Add Stafford Horne.
2146
2147 2017-08-15 Stafford Horne <shorne@gmail.com>
2148
2149 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2150
2151 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
2152
2153 PR gdb/21954
2154 * infcmd.c (unset_environment_command): Use the 'clear' method on
2155 the environment instead of resetting it.
2156
2157 2017-08-15 John Baldwin <jhb@FreeBSD.org>
2158
2159 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2160 platforms.
2161
2162 2017-08-14 Tom Tromey <tom@tromey.com>
2163
2164 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2165 (print_binary_chars): Likewise.
2166 (BITS_IN_BYTES): Remove.
2167
2168 2017-08-14 Tom Tromey <tom@tromey.com>
2169
2170 PR gdb/21675
2171 * valprint.c (LOW_ZERO): Change value to 034.
2172 (print_octal_chars): Add static_asserts for octal constants.
2173 * printcmd.c (print_scalar_formatted): Add 'd' case.
2174
2175 2017-08-11 Tom Tromey <tom@tromey.com>
2176
2177 * symfile.c (add_symbol_file_command): Use std::vector.
2178
2179 2017-08-14 Tom Tromey <tom@tromey.com>
2180
2181 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2182 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2183 std::move.
2184 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2185
2186 2017-08-11 Pedro Alves <palves@redhat.com>
2187
2188 * infrun.c (process_event_stop_test): Adjust
2189 function_name_is_marked_for_skip call.
2190 * skip.c: Include <list>.
2191 (skiplist_entry): Make it a class with private fields, and
2192 getters/setters.
2193 (skiplist_entry_chain): Delete.
2194 (skiplist_entries): New.
2195 (skiplist_entry_count): Delete.
2196 (highest_skiplist_entry_num): New.
2197 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2198 (add_skiplist_entry): Delete.
2199 (skiplist_entry::skiplist_entry): New.
2200 (skiplist_entry::add_entry): New.
2201 (skip_file_command, skip_function): Adjust.
2202 (compile_skip_regexp): Delete.
2203 (skip_command): Don't compile regexp here. Adjust to use
2204 skiplist_entry::add_entry.
2205 (skip_info): Adjust to use range-for and getters.
2206 (skip_enable_command, skip_disable_command): Adjust to use
2207 range-for and setters.
2208 (skip_delete_command): Adjust to use std::list.
2209 (add_skiplist_entry): Delete.
2210 (skip_file_p): Delete, refactored as ...
2211 (skiplist_entry::do_skip_file_p): ... this new method.
2212 (skip_gfile_p): Delete, refactored as ...
2213 (skiplist_entry::do_gskip_file_p): ... this new method.
2214 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
2215 (skiplist_entry::skip_function_p): ... this new method.
2216 (function_name_is_marked_for_skip): Now returns bool, and takes
2217 the function sal by const reference. Adjust to use range-for and
2218 skiplist_entry methods.
2219 (_initialize_step_skip): Remove references to
2220 skiplist_entry_chain, skiplist_entry_count.
2221 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
2222 takes the function sal by const reference.
2223
2224 2017-08-11 Yao Qi <yao.qi@linaro.org>
2225
2226 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
2227 (dwarf2_frame_cache): Remove reset_cache_cleanup.
2228 (dwarf2_frame_cache):
2229 * frame-unwind.c (frame_unwind_try_unwinder): Catch
2230 RETURN_MASK_ALL and set *this_case to NULL.
2231 * frame-unwind.h: Update comments.
2232
2233 2017-08-11 Yao Qi <yao.qi@linaro.org>
2234
2235 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
2236 (dwarf2_frame_state_copy_regs): Remove.
2237 (dwarf2_frame_state_free_regs): Remove.
2238 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
2239 (dwarf2_restore_rule): Call method .alloc_regs instead of
2240 dwarf2_frame_state_alloc_regs.
2241 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
2242 constructor. Call std::move.
2243 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
2244 (dwarf2_frame_cache): Likewise.
2245
2246 [GDB_SELF_TEST]: Include selftest.h and
2247 selftest-arch.h.
2248 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
2249 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
2250 execute_cfa_program_test.
2251
2252 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
2253 copy ctor, assignment operator, move assignment.
2254 <alloc_regs>: New method.
2255 <swap>: New method.
2256 (struct dwarf2_frame_state): Delete dtor.
2257 (dwarf2_frame_state_alloc_regs): Remove declaration.
2258 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
2259 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
2260
2261 2017-08-11 Yao Qi <yao.qi@linaro.org>
2262
2263 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
2264 (dwarf2_frame_state::dwarf2_frame_state): New.
2265 (dwarf2_frame_state::~dwarf2_frame_state): New.
2266 (dwarf2_fetch_cfa_info): Update.
2267 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
2268 rather than a pointer. Update code.
2269 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
2270 dtor.
2271 <data_align, code_align, retaddr_column>: Change them to const.
2272 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
2273 to bool.
2274
2275 2017-08-11 Yao Qi <yao.qi@linaro.org>
2276
2277 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
2278 <loc.exp>: New field.
2279 * dwarf2-frame.c (execute_cfa_program): Update.
2280 (dwarf2_frame_prev_register): Update.
2281
2282 2017-08-10 Pedro Alves <palves@redhat.com>
2283
2284 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
2285
2286 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2287
2288 * fbsd-nat.c (struct fbsd_fork_info): Remove.
2289 (fbsd_pending_children): Use std::list.
2290 (fbsd_remember_child): Likewise.
2291 (fbsd_is_child_pending): Likewise.
2292 (fbsd_pending_vfork_done): Use std::forward_list.
2293 (fbsd_add_vfork_done): Likewise.
2294 (fbsd_is_vfork_done_pending): Likewise.
2295 (fbsd_next_vfork_done): Likewise.
2296
2297 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2298
2299 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
2300 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
2301 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
2302 for `mapfilename'.
2303 (fbsd_xfer_partial): Use gdb::byte_vector.
2304 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
2305
2306 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2307
2308 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
2309 "filestuff.h".
2310 (fbsd_find_memory_regions): Fix `mapfile' initialization.
2311
2312 2017-08-09 Tom Tromey <tom@tromey.com>
2313
2314 * skip.c (skiplist_entry): New constructor.
2315 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
2316 (skiplist_entry::file_is_glob): Now bool.
2317 (skiplist_entry::file, skiplist_entry::function): Now
2318 std::string.
2319 (make_skip_entry): Return a unique_ptr. Use new.
2320 (free_skiplist_entry, free_skiplist_entry_cleanup)
2321 (make_free_skiplist_entry_cleanup): Remove.
2322 (skip_command, skip_disable_command, add_skiplist_entry)
2323 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
2324 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
2325 (function_name_is_marked_for_skip): Update.
2326 (skip_delete_command): Update. Use delete.
2327
2328 2017-08-09 Jiong Wang <jiong.wang@arm.com>
2329
2330 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
2331 (aarch64_linux_core_read_description): New function.
2332 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
2333
2334 2017-08-09 Pedro Alves <palves@redhat.com>
2335
2336 * cp-name-parser.y (cp_comp_to_string): Return a
2337 gdb::unique_xmalloc_ptr<char>.
2338 * cp-support.c (replace_typedefs_qualified_name)
2339 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
2340 (cp_canonicalize_string_full): Use op= instead of explicit
2341 convertion.
2342 (cp_class_name_from_physname, method_name_from_physname)
2343 (cp_func_name, cp_remove_params): Adjust to use
2344 gdb::unique_xmalloc_ptr<char>.
2345 * cp-support.h (cp_comp_to_string): Return a
2346 gdb::unique_xmalloc_ptr<char>.
2347 * python/py-type.c (typy_lookup_type): Adjust to use
2348 gdb::unique_xmalloc_ptr<char>.
2349
2350 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
2351
2352 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
2353
2354 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
2355 Yao Qi <yao.qi@linaro.org>
2356
2357 * cp-support.c (cp_canonicalize_string_full): Use
2358 gdb::unique_xmalloc_ptr<char>.
2359 (cp_canonicalize_string): Likewise.
2360
2361 2017-08-09 Yao Qi <yao.qi@linaro.org>
2362
2363 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
2364 * regformats/i386/amd64-avx-avx512.dat: Remove.
2365 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
2366 * regformats/i386/amd64-avx-mpx.dat:Remove.
2367 * regformats/i386/amd64-avx.dat: Remove.
2368 * regformats/i386/amd64-mpx.dat: Remove.
2369 * regformats/i386/i386-avx-avx512.dat: Remove.
2370 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
2371 * regformats/i386/i386-avx-mpx.dat: Remove.
2372 * regformats/i386/i386-mmx.dat: Remove.
2373 * regformats/i386/i386-mpx.dat: Remove.
2374
2375 2017-08-09 Yao Qi <yao.qi@linaro.org>
2376
2377 * amd64-tdep.h (tdesc_x32): Remove the declaration.
2378 * amd64-tdep.c: Don't include features/i386/x32*.c.
2379 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
2380 functions.
2381 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
2382 and i386/x32-avx-avx512.
2383 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
2384 and i386/x32.xml.
2385 * features/i386/x32-avx-avx512.c: Removed.
2386 * features/i386/x32-avx-avx512.xml: Removed.
2387 * features/i386/x32-avx.c: Removed.
2388 * features/i386/x32-avx.xml: Removed.
2389 * features/i386/x32.c: Removed.
2390 * features/i386/x32.xml: Removed.
2391 * regformats/i386/x32-avx-avx512.dat: Removed.
2392 * regformats/i386/x32-avx.dat: Removed.
2393 * regformats/i386/x32.dat: Removed.
2394
2395 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2396
2397 PR breakpoints/21886
2398 * mem-break.c (default_memory_insert_breakpoint): Use
2399 `->placed_address' rather than `->reqstd_address' for the
2400 breakpoint location.
2401
2402 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2403
2404 * arch-utils.c (default_print_insn): Remove arch/mach/endian
2405 assertions.
2406
2407 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2408
2409 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
2410 a union of `tdep_info', `tdesc_data' and `id'.
2411 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
2412 rather than `info.tdep_info'.
2413 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
2414 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2415 * i386-tdep.c (i386_gdbarch_init): Likewise.
2416 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
2417 * mips-tdep.c (mips_gdbarch_init): Likewise.
2418 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2419 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2420 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
2421 `info.tdep_info'.
2422 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
2423 `info.tdep_info'.
2424 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2425 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
2426 `info.tdep_info'.
2427 * spu-tdep.c (spu_gdbarch_init): Likewise.
2428 * gdbarch.h: Regenerate.
2429
2430 2017-08-07 Leszek Swirski <leszeks@google.com>
2431
2432 PR symtab/20899
2433 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
2434
2435 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
2436
2437 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
2438 (gdbsim_open): Rename gdb_argv args object to argv.
2439
2440 2017-08-05 Tom Tromey <tom@tromey.com>
2441
2442 * compile/compile-object-load.c (compile_object_load): Use
2443 gdb::unique_xmalloc_ptr.
2444 * cli/cli-dump.c (scan_filename): Rename from
2445 scan_filename_with_cleanup. Change return type.
2446 (scan_expression): Rename from scan_expression_with_cleanup.
2447 Change return type.
2448 (dump_memory_to_file, dump_value_to_file, restore_command):
2449 Use gdb::unique_xmalloc_ptr. Update.
2450 * cli/cli-cmds.c (find_and_open_script): Use
2451 gdb::unique_xmalloc_ptr.
2452 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
2453 * symmisc.c (maintenance_print_symbols)
2454 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
2455 * symfile.c (symfile_bfd_open, generic_load)
2456 (add_symbol_file_command, remove_symbol_file_command): Use
2457 gdb::unique_xmalloc_ptr.
2458 * source.c (openp): Use gdb::unique_xmalloc_ptr.
2459 * psymtab.c (maintenance_print_psymbols): Use
2460 gdb::unique_xmalloc_ptr.
2461 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
2462 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
2463 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
2464 (reload_shared_libraries_1): Likewise.
2465
2466 2017-08-05 Tom Tromey <tom@tromey.com>
2467
2468 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
2469 (rust_op_vector, rust_set_vector): New typedefs.
2470 (current_parser): New global.
2471 (work_obstack): Change to pointer type. Update all users.
2472 (rust_ast, pstate): Remove globals.
2473 (struct rust_parser): New.
2474 (%union) <params, field_inits>: Change type.
2475 (start, tuple_expr, unit_expr, struct_expr_list, literal)
2476 (field_expr, expr_list, maybe_expr_list, type_list): Update.
2477 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
2478 (convert_params_to_types, convert_params_to_expression): Change
2479 type of "params".
2480 (ast_string): Change type of "fields".
2481 (rust_parse): Make a rust_parser. Remove cleanups.
2482 (rust_lex_tests): Make and install an auto_obstack.
2483
2484 2017-08-04 Yao Qi <yao.qi@linaro.org>
2485
2486 * configure.srv (ipa_x32_linux_regobj): New.
2487 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
2488 instead of X86_TDESC_AVX512.
2489 (initialize_low_tracepoint): Call
2490 init_registers_x32_avx_avx512_linux.
2491
2492 2017-08-04 Yao Qi <yao.qi@linaro.org>
2493
2494 * utils.h (gdb_argv): Add namespace std for nullptr_t.
2495
2496 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
2497
2498 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
2499
2500 2017-08-03 Tom Tromey <tom@tromey.com>
2501
2502 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
2503 Remove.
2504 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
2505
2506 2017-08-03 Tom Tromey <tom@tromey.com>
2507
2508 * python/py-param.c (compute_enum_values): Use gdb_argv.
2509
2510 2017-08-03 Tom Tromey <tom@tromey.com>
2511
2512 * utils.h (struct gdb_argv_deleter): New.
2513 (gdb_argv): New class.
2514 * utils.c (gdb_argv::reset): New method.
2515 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
2516 * tracefile.c (tsave_command): Use gdb_argv.
2517 * top.c (new_ui_command): Use gdb_argv.
2518 * symmisc.c (maintenance_print_symbols)
2519 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
2520 * symfile.c (symbol_file_command, generic_load)
2521 (remove_symbol_file_command): Use gdb_argv.
2522 * stack.c (backtrace_command): Use gdb_argv.
2523 * source.c (add_path, show_substitute_path_command)
2524 (unset_substitute_path_command, set_substitute_path_command):
2525 Use gdb_argv.
2526 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
2527 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
2528 * remote.c (extended_remote_run, remote_put_command)
2529 (remote_get_command, remote_delete_command): Use gdb_argv.
2530 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
2531 (gdbsim_open): Use gdb_argv.
2532 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
2533 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
2534 * procfs.c (procfs_info_proc): Use gdb_argv.
2535 * interps.c (interpreter_exec_cmd): Use gdb_argv.
2536 * infrun.c (handle_command): Use gdb_argv.
2537 * inferior.c (add_inferior_command, clone_inferior_command):
2538 Use gdb_argv.
2539 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
2540 * exec.c (exec_file_command): Use gdb_argv.
2541 * cli/cli-cmds.c (alias_command): Use gdb_argv.
2542 * compile/compile.c (build_argc_argv): Use gdb_argv.
2543
2544 2017-08-03 Tom Tromey <tom@tromey.com>
2545
2546 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
2547
2548 2017-08-03 Tom Tromey <tom@tromey.com>
2549
2550 * python/python.c (compute_python_string): Return std::string.
2551 (gdbpy_eval_from_control_command): Update.
2552 (do_start_initialization): Use std::string.
2553 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
2554 xstrprintf.
2555 * python/py-breakpoint.c (local_setattro): Use string_printf, not
2556 xstrprintf.
2557
2558 2017-08-03 Tom Tromey <tom@tromey.com>
2559
2560 * top.h (do_restore_instream_cleanup): Remove.
2561 * top.c (do_restore_instream_cleanup): Remove.
2562 (read_command_file): Use scoped_restore.
2563 * cli/cli-script.c (execute_user_command): Use scoped_restore.
2564
2565 2017-08-03 Tom Tromey <tom@tromey.com>
2566
2567 * cli/cli-script.c (execute_user_command)
2568 (execute_control_command): Use scoped_restore.
2569
2570 2017-08-03 Tom Tromey <tom@tromey.com>
2571
2572 * cli/cli-script.c (do_restore_user_call_depth): Remove.
2573 (execute_user_command): Remove user_call_depth; use
2574 user_args_stack's size instead.
2575
2576 2017-08-03 Tom Tromey <tom@tromey.com>
2577
2578 * top.h (in_user_command): Remove.
2579 * top.c (in_user_command): Remove.
2580 * cli/cli-script.c (do_restore_user_call_depth)
2581 (execute_user_command): Update.
2582
2583 2017-08-03 Tom Tromey <tom@tromey.com>
2584
2585 * valops.c (search_struct_method): Use gdb::byte_vector.
2586 * valarith.c (value_concat): Use std::vector.
2587 * target.c (memory_xfer_partial): Use gdb::byte_vector.
2588 (simple_search_memory): Likewise.
2589 * printcmd.c (find_string_backward): Use gdb::byte_vector.
2590 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
2591 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
2592 * elfread.c (elf_rel_plt_read): Use std::string.
2593 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
2594 * cli/cli-dump.c (restore_section_callback): Use
2595 gdb::byte_vector.
2596
2597 2017-08-03 Tom Tromey <tom@tromey.com>
2598
2599 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
2600
2601 2017-08-03 Tom Tromey <tom@tromey.com>
2602
2603 * tui/tui-regs.c (tui_restore_gdbout): Remove.
2604 (tui_register_format): Use scoped_restore.
2605
2606 2017-08-03 Tom Tromey <tom@tromey.com>
2607
2608 * reverse.c (exec_direction_default): Remove.
2609 (exec_reverse_once): Use scoped_restore.
2610 * remote.c (restore_remote_timeout): Remove.
2611 (remote_flash_erase, remote_flash_write, remote_flash_done)
2612 (readchar, remote_serial_write): Use scoped_restore.
2613 * cli/cli-script.c (struct source_cleanup_lines_args)
2614 (source_cleanup_lines): Remove.
2615 (script_from_file): Use scoped_restore.
2616 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
2617 (source_command): Use scoped_restore.
2618
2619 2017-08-03 Tom Tromey <tom@tromey.com>
2620
2621 * utils.h (make_cleanup_free_so): Remove.
2622 * utils.c (do_free_so, make_cleanup_free_so): Remove.
2623 * solist.h (struct so_deleter): New.
2624 (so_list_up): New typedef.
2625 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
2626
2627 2017-08-03 Tom Tromey <tom@tromey.com>
2628
2629 * utils.h (make_cleanup_restore_current_language): Remove.
2630 * utils.c (do_restore_current_language)
2631 (make_cleanup_restore_current_language): Remove.
2632 * parse.c (parse_exp_in_context_1)
2633 (parse_expression_with_language): Use
2634 scoped_restore_current_language.
2635 * mi/mi-main.c (mi_cmd_execute): Use
2636 scoped_restore_current_language.
2637 * language.h (scoped_restore_current_language): New class.
2638
2639 2017-08-03 Tom Tromey <tom@tromey.com>
2640
2641 * compile/compile.c (cleanup_unlink_file): Remove.
2642 (compile_to_object): Use gdb::unlinker.
2643 (eval_compile_command): Likewise.
2644
2645 2017-08-03 Tom Tromey <tom@tromey.com>
2646
2647 * utils.h (make_cleanup_fclose): Remove.
2648 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
2649
2650 2017-08-03 Tom Tromey <tom@tromey.com>
2651
2652 * top.c (open_terminal_stream): Return gdb_file_up.
2653 (new_ui_command): Update.
2654
2655 2017-08-03 Tom Tromey <tom@tromey.com>
2656
2657 * source.c (print_source_lines_base, forward_search_command)
2658 (reverse_search_command): Use gdb_file_up.
2659
2660 2017-08-03 Tom Tromey <tom@tromey.com>
2661
2662 * fbsd-nat.c (fbsd_find_memory_regions): Update.
2663
2664 2017-08-03 Tom Tromey <tom@tromey.com>
2665
2666 * cli/cli-cmds.c (find_and_open_script): Change return type.
2667 Remove "streamp" and "full_path" parameters.
2668 (source_script_with_search): Update.
2669 * auto-load.c (source_script_file): Update.
2670 * cli/cli-cmds.h (find_and_open_script): Change type.
2671 (open_script): New struct.
2672
2673 2017-08-03 Tom Tromey <tom@tromey.com>
2674
2675 * xml-support.c (xml_fetch_content_from_file): Update.
2676 * ui-file.c (stdio_file::open): Update.
2677 * tracefile-tfile.c (tfile_start): Update.
2678 * remote.c (remote_file_put, remote_file_get): Update.
2679 * nat/linux-procfs.c (linux_proc_get_int)
2680 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
2681 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
2682 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
2683 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
2684 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
2685 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
2686 * linux-nat.c (linux_proc_pending_signals): Update.
2687 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
2688 (file_closer): Remove.
2689 * compile/compile.c (compile_to_object): Update.
2690 * common/filestuff.h (struct gdb_file_deleter): New.
2691 (gdb_file_up): New typedef.
2692 (gdb_fopen_cloexec): Change return type.
2693 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
2694 * cli/cli-dump.c (fopen_with_cleanup): Remove.
2695 (dump_binary_file, restore_binary_file): Update.
2696 * auto-load.c (auto_load_objfile_script_1): Update.
2697
2698 2017-08-03 Tom Tromey <tom@tromey.com>
2699
2700 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
2701 (info_static_tracepoint_markers_command): Likewise.
2702 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
2703 * skip.c (skip_info): Use ui_out_emit_table.
2704 * progspace.c (print_program_space): Use ui_out_emit_table.
2705 * osdata.c (info_osdata): Use ui_out_emit_table.
2706 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
2707 ui_out_emit_table.
2708 * linux-thread-db.c (info_auto_load_libthread_db): Use
2709 ui_out_emit_table.
2710 * inferior.c (print_inferior): Use ui_out_emit_table.
2711 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
2712 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
2713 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
2714 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
2715 * ui-out.h (class ui_out_emit_table): New.
2716
2717 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
2718
2719 * mips-tdep.c (mips_fpu_type_str): New function.
2720 (mips_dump_tdep): Call it.
2721
2722 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
2723
2724 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
2725 `->mips_fpu_type'.
2726
2727 2017-07-31 Xavier Roirand <roirand@adacore.com>
2728
2729 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
2730
2731 2017-07-27 Xavier Roirand <roirand@adacore.com>
2732
2733 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
2734
2735 2017-07-26 Yao Qi <yao.qi@linaro.org>
2736
2737 * cli/cli-cmds.c (maintenancechecklist): New variable.
2738 * gdbcmd.h (maintenancechecklist): Declare it.
2739 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
2740 Call i386_linux_read_description with different masks.
2741 * maint.c (maintenance_check_command): New function.
2742 (_initialize_maint_cmds): Call add_prefix_cmd.
2743 * target-descriptions.c (tdesc_reg): override operator != and ==.
2744 (tdesc_type): Likewise.
2745 (tdesc_feature): Likewise.
2746 (target_desc): Likewise.
2747 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
2748 (maintenance_check_xml_descriptions): New function.
2749 (_initialize_target_descriptions) Add command "xml-descriptions".
2750 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
2751
2752 2017-07-26 Yao Qi <yao.qi@linaro.org>
2753
2754 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
2755 Include features/i386/32bit-*.c.
2756 (i386_linux_read_description): Generate target description if it
2757 doesn't exist.
2758 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
2759 functions.
2760 * features/i386/32bit-linux.c: Re-generated.
2761 * features/i386/32bit-sse.c: Likewise.
2762 * target-descriptions.c (print_c_feature::visit): Print code to
2763 set register number if needed.
2764 (print_c_feature) <m_next_regnum>: New field.
2765
2766 2017-07-26 Yao Qi <yao.qi@linaro.org>
2767
2768 * features/Makefile (CFILES): Rename with TDESC_CFILES.
2769 (FEATURE_XMLFILES): New.
2770 (FEATURE_CFILES): New.
2771 New rules.
2772 (clean-cfiles): Remove generated c files.
2773 * features/i386/32bit-avx.c: Generated.
2774 * features/i386/32bit-avx512.c: Generated.
2775 * features/i386/32bit-core.c: Generated.
2776 * features/i386/32bit-linux.c: Generated.
2777 * features/i386/32bit-mpx.c: Generated.
2778 * features/i386/32bit-pkeys.c: Generated.
2779 * features/i386/32bit-sse.c: Generated.
2780 * target-descriptions.c: Include algorithm.
2781 (tdesc_element_visitor): Add method visit_end.
2782 (print_c_tdesc): Implement visit_end.
2783 (print_c_tdesc:: m_filename_after_features): Move it to
2784 protected.
2785 (print_c_feature): New class.
2786 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
2787 name starts with "i386/32bit-".
2788
2789 2017-07-26 Yao Qi <yao.qi@linaro.org>
2790
2791 * target-descriptions.c (tdesc_element_visitor): New class.
2792 (tdesc_element): New class.
2793 (tdesc_reg): Inherit from tdesc_element.
2794 (tdesc_reg::accept): New function.
2795 (tdesc_type): Inherit from tdesc_element.
2796 (tdesc_type::accept): New function.
2797 (tdesc_feature): Inherit from tdesc_element.
2798 (tdesc_feature::accept): New function.
2799 (target_desc): Inherit from tdesc_element.
2800 (target_desc::target_desc): New.
2801 (target_desc::~target_desc): New.
2802 (target_desc::accept): New.
2803 (allocate_target_description): Use new.
2804 (free_target_description): Use delete.
2805 (print_c_tdesc): New class.
2806 (maint_print_c_tdesc_cmd): Adjust.
2807
2808 * features/aarch64.c: Re-generated.
2809 * features/arc-arcompact.c: Re-generated.
2810 * features/arc-v2.c: Re-generated.
2811 * features/arm/arm-with-iwmmxt.c: Re-generated.
2812 * features/arm/arm-with-m.c: Re-generated.
2813 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
2814 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
2815 * features/arm/arm-with-neon.c: Re-generated.
2816 * features/arm/arm-with-vfpv2.c: Re-generated.
2817 * features/arm/arm-with-vfpv3.c: Re-generated.
2818 * features/i386/amd64-avx-avx512.c: Re-generated.
2819 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
2820 * features/i386/amd64-avx.c: Re-generated.
2821 * features/i386/amd64-avx-linux.c: Re-generated.
2822 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
2823 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
2824 * features/i386/amd64-avx-mpx.c: Re-generated.
2825 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
2826 * features/i386/amd64.c: Re-generated.
2827 * features/i386/amd64-linux.c: Re-generated.
2828 * features/i386/amd64-mpx.c: Re-generated.
2829 * features/i386/amd64-mpx-linux.c: Re-generated.
2830 * features/i386/i386-avx-avx512.c: Re-generated.
2831 * features/i386/i386-avx-avx512-linux.c: Re-generated.
2832 * features/i386/i386-avx.c: Re-generated.
2833 * features/i386/i386-avx-linux.c: Re-generated.
2834 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
2835 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
2836 * features/i386/i386-avx-mpx.c: Re-generated.
2837 * features/i386/i386-avx-mpx-linux.c: Re-generated.
2838 * features/i386/i386.c: Re-generated.
2839 * features/i386/i386-linux.c: Re-generated.
2840 * features/i386/i386-mmx.c: Re-generated.
2841 * features/i386/i386-mmx-linux.c: Re-generated.
2842 * features/i386/i386-mpx.c: Re-generated.
2843 * features/i386/i386-mpx-linux.c: Re-generated.
2844 * features/i386/x32-avx-avx512.c: Re-generated.
2845 * features/i386/x32-avx-avx512-linux.c: Re-generated.
2846 * features/i386/x32-avx.c: Re-generated.
2847 * features/i386/x32-avx-linux.c: Re-generated.
2848 * features/i386/x32.c: Re-generated.
2849 * features/i386/x32-linux.c: Re-generated.
2850 * features/microblaze.c: Re-generated.
2851 * features/microblaze-with-stack-protect.c: Re-generated.
2852 * features/mips64-dsp-linux.c: Re-generated.
2853 * features/mips64-linux.c: Re-generated.
2854 * features/mips-dsp-linux.c: Re-generated.
2855 * features/mips-linux.c: Re-generated.
2856 * features/nds32.c: Re-generated.
2857 * features/nios2.c: Re-generated.
2858 * features/nios2-linux.c: Re-generated.
2859 * features/rs6000/powerpc-32.c: Re-generated.
2860 * features/rs6000/powerpc-32l.c: Re-generated.
2861 * features/rs6000/powerpc-403.c: Re-generated.
2862 * features/rs6000/powerpc-403gc.c : Re-generated.
2863 * features/rs6000/powerpc-405.c: Re-generated.
2864 * features/rs6000/powerpc-505.c: Re-generated.
2865 * features/rs6000/powerpc-601.c: Re-generated.
2866 * features/rs6000/powerpc-602.c: Re-generated.
2867 * features/rs6000/powerpc-603.c: Re-generated.
2868 * features/rs6000/powerpc-604.c: Re-generated.
2869 * features/rs6000/powerpc-64.c: Re-generated.
2870 * features/rs6000/powerpc-64l.c: Re-generated.
2871 * features/rs6000/powerpc-7400.c: Re-generated.
2872 * features/rs6000/powerpc-750.c: Re-generated.
2873 * features/rs6000/powerpc-860.c: Re-generated.
2874 * features/rs6000/powerpc-altivec32.c: Re-generated.
2875 * features/rs6000/powerpc-altivec32l.c: Re-generated.
2876 * features/rs6000/powerpc-altivec64.c: Re-generated.
2877 * features/rs6000/powerpc-altivec64l.c: Re-generated.
2878 * features/rs6000/powerpc-cell32l.c: Re-generated.
2879 * features/rs6000/powerpc-cell64l.c: Re-generated.
2880 * features/rs6000/powerpc-e500.c: Re-generated.
2881 * features/rs6000/powerpc-e500l.c: Re-generated.
2882 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
2883 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
2884 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
2885 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
2886 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
2887 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
2888 * features/rs6000/powerpc-vsx32.c: Re-generated.
2889 * features/rs6000/powerpc-vsx32l.c: Re-generated.
2890 * features/rs6000/powerpc-vsx64.c: Re-generated.
2891 * features/rs6000/powerpc-vsx64l.c: Re-generated.
2892 * features/rs6000/rs6000.c: Re-generated.
2893 * features/s390-linux32.c: Re-generated.
2894 * features/s390-linux32v1.c: Re-generated.
2895 * features/s390-linux32v2.c: Re-generated.
2896 * features/s390-linux64.c: Re-generated.
2897 * features/s390-linux64v1.c: Re-generated.
2898 * features/s390-linux64v2.c: Re-generated.
2899 * features/s390-te-linux64.c: Re-generated.
2900 * features/s390-tevx-linux64.c: Re-generated.
2901 * features/s390-vx-linux64.c: Re-generated.
2902 * features/s390x-linux64.c: Re-generated.
2903 * features/s390x-linux64v1.c: Re-generated.
2904 * features/s390x-linux64v2.c: Re-generated.
2905 * features/s390x-te-linux64.c: Re-generated.
2906 * features/s390x-tevx-linux64.c: Re-generated.
2907 * features/s390x-vx-linux64.c: Re-generated.
2908 * features/sparc/sparc32-solaris.c: Re-generated.
2909 * features/sparc/sparc64-solaris.c: Re-generated.
2910 * features/tic6x-c62x.c: Re-generated.
2911 * features/tic6x-c62x-linux.c: Re-generated.
2912 * features/tic6x-c64x.c: Re-generated.
2913 * features/tic6x-c64x-linux.c: Re-generated.
2914 * features/tic6x-c64xp.c: Re-generated.
2915 * features/tic6x-c64xp-linux.c: Re-generated.
2916
2917 2017-07-26 Yao Qi <yao.qi@linaro.org>
2918
2919 * i386-linux-tdep.c (i386_linux_read_description): New function.
2920 (i386_linux_core_read_description): Call
2921 i386_linux_read_description.
2922 * i386-linux-tdep.h (i386_linux_read_description): Declare.
2923 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
2924 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
2925 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
2926 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
2927 * x86-linux-nat.c (x86_linux_read_description): Call
2928 i386_linux_read_description.
2929
2930 2017-07-26 Yao Qi <yao.qi@linaro.org>
2931
2932 * NEWS: Mention it.
2933 * features/Makefile (%.c: %.xml): Pass the xml file name to
2934 command "maint print c-tdesc".
2935 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
2936 name from 'arg'.
2937
2938 2017-07-26 Yao Qi <yao.qi@linaro.org>
2939
2940 * target-descriptions.c (target_desc): Add ctor and dtor. Do
2941 in-class initialization.
2942 (tdesc_create_feature): Call new instead of XCNEW.
2943 (free_target_description): Ue delete.
2944
2945 2017-07-25 John Baldwin <jhb@FreeBSD.org>
2946
2947 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
2948
2949 2017-07-25 Yao Qi <yao.qi@linaro.org>
2950
2951 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
2952 constant.
2953 (amd64_x32_init_abi): Likewise.
2954 * amd64-tdep.h (amd64_init_abi): Update declaration.
2955 (amd64_x32_init_abi): Likewise.
2956
2957 2017-07-25 Yao Qi <yao.qi@linaro.org>
2958
2959 PR tdep/21717
2960 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
2961 condition for FPSCR.
2962 (arm_linux_store_inferior_registers): Likewise.
2963
2964 2017-07-22 Tom Tromey <tom@tromey.com>
2965
2966 * break-catch-syscall.c (struct catch_syscall_inferior_data)
2967 <syscalls_counts>: Now a std::vector.
2968 (get_catch_syscall_inferior_data): Use "new".
2969 (catch_syscall_inferior_data_cleanup): Use "delete".
2970 (insert_catch_syscall, remove_catch_syscall)
2971 (clear_syscall_counts): Update.
2972
2973 2017-07-22 Tom Tromey <tom@tromey.com>
2974
2975 * break-catch-syscall.c (syscall_catchpoint)
2976 <syscalls_to_be_caught>: Now a std::vector<int>
2977 (~syscall_catchpoint): Remove.
2978 (insert_catch_syscall, remove_catch_syscall)
2979 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
2980 (print_mention_catch_syscall, print_recreate_catch_syscall):
2981 Update.
2982 (create_syscall_event_catchpoint): Change type of "filter"
2983 parameter.
2984 (catch_syscall_split_args): Return a std::vector.
2985 (catch_syscall_command_1, catching_syscall_number_1): Update.
2986
2987 2017-07-22 Tom Tromey <tom@tromey.com>
2988
2989 * break-catch-throw.c (struct exception_catchpoint)
2990 <exception_rx>: Now a std::string.
2991 (~exception_catchpoint): Remove.
2992 (print_one_detail_exception_catchpoint): Update.
2993 (handle_gnu_v3_exceptions): Change type of except_rx.
2994 (extract_exception_regexp): Return a std::string.
2995 (catch_exception_command_1): Update.
2996
2997 2017-07-22 Tom Tromey <tom@tromey.com>
2998
2999 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3000 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3001 std::vector.
3002 <catch_all>: Now a bool.
3003 (~signal_catchpoint): Remove.
3004 (signal_catchpoint_insert_location)
3005 (signal_catchpoint_remove_location)
3006 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3007 (signal_catchpoint_print_mention)
3008 (signal_catchpoint_print_recreate)
3009 (signal_catchpoint_explains_signal): Update.
3010 (create_signal_catchpoint): Change type of "filter" and
3011 "catch_all".
3012 (catch_signal_split_args): Return a std::vector. Change type of
3013 "catch_all".
3014 (catch_signal_command): Update.
3015
3016 2017-07-20 Pedro Alves <palves@redhat.com>
3017
3018 * ada-lang.c (ada_language_defn): Make extern.
3019 (_initialize_ada_language): Remove add_language call.
3020 * c-lang.c (c_language_defn, cplus_language_defn)
3021 (asm_language_defn, minimal_language_defn): Make extern.
3022 (_initialize_c_language): Delete.
3023 * completer.c (compare_cstrings): Delete, moved to utils.h.
3024 * d-lang.c (d_language_defn): Make extern.
3025 (_initialize_d_language): Remove add_language calls.
3026 * defs.h (enum language): Add comment.
3027 * f-lang.c (f_language_defn): Make extern.
3028 (_initialize_f_language): Remove add_language call.
3029 * go-lang.c (go_language_defn): Make extern.
3030 (_initialize_go_language): Remove add_language call.
3031 * language.c: Include <algorithm>.
3032 (languages): Redefine as const array.
3033 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3034 (set_language_command): Handle "local". Use for-range loop.
3035 (set_language): Remove loop.
3036 (language_enum): Rewrite.
3037 (language_def, language_str): Remove loops.
3038 (add_language): Delete.
3039 (add_set_language_command): New, based on add_languages.
3040 (skip_language_trampoline): Adjust.
3041 (local_language_defn): Delete.
3042 (language_gdbarch_post_init): Adjust.
3043 (_initialize_language): Remove add_language calls. Call
3044 add_set_language_command.
3045 * language.h (add_language): Delete.
3046 (auto_language_defn)
3047 (unknown_language_defn, minimal_language_defn, ada_language_defn)
3048 (asm_language_defn, c_language_defn, cplus_language_defn)
3049 (d_language_defn, f_language_defn, go_language_defn)
3050 (m2_language_defn, objc_language_defn, opencl_language_defn)
3051 (pascal_language_defn, rust_language_defn): Declare.
3052 * m2-lang.c (m2_language_defn): Make extern.
3053 (_initialize_m2_language): Remove add_language call.
3054 * objc-lang.c (objc_language_defn): Make extern.
3055 (_initialize_objc_language): Remove add_language call.
3056 * opencl-lang.c (opencl_language_defn): Make extern.
3057 (_initialize_opencl_language): Remove add_language call.
3058 * p-lang.c (pascal_language_defn): Make extern.
3059 (_initialize_pascal_language): Delete.
3060 * rust-lang.c (rust_language_defn): Make extern.
3061 (_initialize_rust_language): Delete.
3062 * utils.h (compare_cstrings): New static inline function.
3063
3064 2017-07-20 Pedro Alves <palves@redhat.com>
3065
3066 * ada-lang.c (ada_to_fixed_type_1): Adjust.
3067 (get_var_value): Constify parameters.
3068 (get_int_var_value): Change prototype.
3069 (to_fixed_range_type): Adjust.
3070 * ada-lang.h (get_int_var_value): Change prototype.
3071
3072 2017-07-20 Pedro Alves <palves@redhat.com>
3073
3074 * dwarf2read.c (dw2_lookup_symbol): Use
3075 SYMBOL_MATCHES_SEARCH_NAME.
3076 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3077
3078 2017-07-20 Pedro Alves <palves@redhat.com>
3079
3080 * block.c (block_iter_name_step, block_iter_name_first)
3081 (block_iter_name_next): Delete.
3082 (block_lookup_symbol_primary): Adjust to use
3083 dict_iter_match_first/dict_iter_match_next.
3084 * block.h (block_iter_name_first, block_iter_name_next): Delete
3085 declarations.
3086 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3087 dict_iter_match_first/dict_iter_match_next.
3088
3089 2017-07-20 Pedro Alves <palves@redhat.com>
3090
3091 * cp-support.c (cp_find_first_component_aux): Add missing case for
3092 end of string.
3093
3094 2017-07-18 David Blaikie <dblaikie@gmail.com>
3095
3096 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3097 of dwo_cu's dwo_file.
3098
3099 2017-07-18 Yao Qi <yao.qi@linaro.org>
3100
3101 * remote.c (store_registers_using_G): Remove one line comment.
3102
3103 2017-07-18 Yao Qi <yao.qi@linaro.org>
3104
3105 * regcache.c (regcache_cpy): Simplify it.
3106 (regcache::cpy_no_passthrough): Remove it.
3107 * regcache.h (cpy_no_passthrough): Remove it.
3108 (regcache_dup, regcache_cpy): Update comments.
3109
3110 2017-07-18 Pedro Alves <palves@redhat.com>
3111
3112 * remote-sim.c (sim_command_completer): Adjust to work with a
3113 completion_tracker instead of a VEC.
3114
3115 2017-07-17 Pedro Alves <palves@redhat.com>
3116
3117 * completer.c (complete_source_filenames): New function.
3118 (complete_address_and_linespec_locations): New function.
3119 (location_completer): Use complete_address_and_linespec_locations.
3120 (completion_tracker::build_completion_result): Honor the tracker's
3121 request to suppress append.
3122 * completer.h (completion_tracker::suppress_append_ws)
3123 (completion_tracker::set_suppress_append_ws): New methods.
3124 (completion_tracker::m_suppress_append_ws): New field.
3125 (complete_source_filenames): New declaration.
3126 * linespec.c (linespec_complete_what): New.
3127 (struct ls_parser) <complete_what, completion_word,
3128 completion_quote_char, completion_quote_end, completion_tracker>:
3129 New fields.
3130 (string_find_incomplete_keyword_at_end): New.
3131 (linespec_lexer_lex_string): Record quote char. If in completion
3132 mode, don't throw.
3133 (linespec_lexer_consume_token): Advance the completion word point.
3134 (linespec_lexer_peek_token): Save/restore completion info.
3135 (save_stream_and_consume_token): New.
3136 (set_completion_after_number): New.
3137 (linespec_parse_basic): Set what to complete next depending on
3138 token. Handle function and label completions specially.
3139 (parse_linespec): Disable objc shortcut in completion mode. Set
3140 what to complete next depending on token type. Skip keyword if in
3141 completion mode.
3142 (complete_linespec_component, linespec_complete): New.
3143 * linespec.h (linespec_complete): Declare.
3144
3145 2017-07-17 Pedro Alves <palves@redhat.com>
3146
3147 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3148 Handle 'operator<' / 'operator<<'.
3149
3150 2017-07-17 Pedro Alves <palves@redhat.com>
3151
3152 * completer.c (collect_explicit_location_matches): Handle
3153 MATCH_LABEL.
3154 (convert_explicit_location_to_linespec): New, factored out from
3155 ...
3156 (convert_explicit_location_to_sals): ... this.
3157 (complete_label): New.
3158 (linespec_complete_label, find_label_symbols_in_block): New.
3159 (find_label_symbols): Add completion_mode parameter and adjust to
3160 call find_label_symbols_in_block.
3161 * linespec.h (linespec_complete_label): Declare.
3162
3163 2017-07-17 Pedro Alves <palves@redhat.com>
3164
3165 * ada-lang.c (ada_collect_symbol_completion_matches): Add
3166 complete_symbol_mode parameter.
3167 * cli/cli-cmds.c (complete_command): Get the completion result out
3168 of the handle_brkchars tracker if used a custom word point.
3169 * completer.c: Include "linespec.h".
3170 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3171 (advance_to_expression_complete_word_point): New.
3172 (completion_tracker::completes_to_completion_word): New.
3173 (complete_files_symbols): Pass down
3174 complete_symbol_mode::EXPRESSION.
3175 (explicit_options, probe_options): New.
3176 (collect_explicit_location_matches): Complete on the
3177 explictit_loc->foo instead of word. Use
3178 linespec_complete_function. Handle MATCH_LINE. Handle offering
3179 keyword and options completions.
3180 (backup_text_ptr): Delete.
3181 (skip_keyword): New.
3182 (complete_explicit_location): Remove 'word' parameter. Add
3183 language, quoted_arg_start and quoted_arg_end parameters.
3184 Rewrite, parsing left to right.
3185 (location_completer): Rewrite.
3186 (location_completer_handle_brkchars): New function.
3187 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3188 (enum complete_line_internal_reason): Adjust comments.
3189 (completion_tracker::discard_completions): New.
3190 (completer_handle_brkchars_func_for_completer): Handle
3191 location_completer.
3192 (gdb_custom_word_point_brkchars)
3193 (gdb_org_rl_basic_quote_characters): New.
3194 (gdb_completion_word_break_characters_throw)
3195 (completion_find_completion_word): Handle trackers that use a
3196 custom word point.
3197 (completion_tracker::advance_custom_word_point_by): New.
3198 (completion_tracker::build_completion_result): Don't rely on
3199 readline appending the quote char.
3200 (gdb_rl_attempted_completion_function_throw): Handle trackers that
3201 use a custom word point.
3202 (gdb_rl_attempted_completion_function): Restore
3203 rl_basic_quote_characters.
3204 * completer.h (class completion_tracker): Extend intro comment.
3205 (completion_tracker::set_quote_char)
3206 (completion_tracker::quote_char)
3207 (completion_tracker::set_use_custom_word_point)
3208 (completion_tracker::use_custom_word_point)
3209 (completion_tracker::custom_word_point)
3210 (completion_tracker::set_custom_word_point)
3211 (completion_tracker::advance_custom_word_point_by)
3212 (completion_tracker::completes_to_completion_word)
3213 (completion_tracker::discard_completions): New methods.
3214 (completion_tracker::m_quote_char)
3215 (completion_tracker::m_use_custom_word_point)
3216 (completion_tracker::m_custom_word_point): New fields.
3217 (advance_to_expression_complete_word_point): Declare.
3218 * f-lang.c (f_collect_symbol_completion_matches): Add
3219 complete_symbol_mode parameter.
3220 * language.h (struct language_defn)
3221 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
3222 parameter.
3223 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
3224 (linespec_complete_function): New function.
3225 (linespec_lexer_lex_keyword): Adjust.
3226 * linespec.h (linespec_keywords, linespec_complete_function): New
3227 declarations.
3228 * location.c (find_end_quote): New function.
3229 (explicit_location_lex_one): Add explicit_completion_info
3230 parameter. Save quoting info. Don't throw if being called for
3231 completion. Don't handle Ada operators here.
3232 (is_cp_operator, skip_op_false_positives, first_of)
3233 (explicit_location_lex_one_function): New function.
3234 (string_to_explicit_location): Replace 'dont_throw' parameter with
3235 an explicit_completion_info pointer parameter. Handle it. Don't
3236 use explicit_location_lex_one to lex function names. Use
3237 explicit_location_lex_one_function instead.
3238 * location.h (struct explicit_completion_info): New.
3239 (string_to_explicit_location): Replace 'dont_throw' parameter with
3240 an explicit_completion_info pointer parameter.
3241 * symtab.c (default_collect_symbol_completion_matches_break_on):
3242 Add complete_symbol_mode parameter. Handle LINESPEC mode.
3243 (default_collect_symbol_completion_matches)
3244 (collect_symbol_completion_matches): Add complete_symbol_mode
3245 parameter.
3246 (collect_symbol_completion_matches_type): Pass down
3247 complete_symbol_mode::EXPRESSION.
3248 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3249 parameter. Handle LINESPEC mode.
3250 * symtab.h (complete_symbol_mode): New.
3251 (default_collect_symbol_completion_matches_break_on)
3252 (default_collect_symbol_completion_matches)
3253 (collect_symbol_completion_matches)
3254 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3255 parameter.
3256
3257 2017-07-17 Pedro Alves <palves@redhat.com>
3258
3259 * utils.c (enum class strncmp_iw_mode): New.
3260 (strcmp_iw): Rename to ...
3261 (strncmp_iw_with_mode): ... this. Add string2_len and mode
3262 parameters. Handle them.
3263 (strncmp_iw): New.
3264 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
3265 * utils.h (strncmp_iw): Declare.
3266 (strcmp_iw): Move describing comments here.
3267
3268 2017-07-17 Pedro Alves <palves@redhat.com>
3269
3270 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
3271 CP_OPERATOR_STR.
3272 * c-typeprint.c (is_type_conversion_operator): Use
3273 CP_OPERATOR_STR.
3274 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
3275 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
3276 CP_OPERATOR_LEN.
3277 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
3278 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
3279 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
3280 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
3281 CP_OPERATOR_STR.
3282 * location.c: Include "cp-support.h".
3283 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
3284 CP_OPERATOR_STR.
3285 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
3286 CP_OPERATOR_LEN.
3287
3288 2017-07-17 Pedro Alves <palves@redhat.com>
3289
3290 * cli/cli-cmds.c (complete_command): Use a completion tracker
3291 along with completion_find_completion_word for handle_brkchars
3292 phase.
3293 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
3294 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
3295 (struct gdb_rl_completion_word_info): New.
3296 (gdb_rl_find_completion_word): New.
3297 (completion_find_completion_word): New.
3298 * completer.h (completion_find_completion_word): Declare.
3299
3300 2017-07-17 Pedro Alves <palves@redhat.com>
3301
3302 * ada-lang.c (symbol_completion_match): Adjust comments.
3303 (symbol_completion_add): Replace vector parameter with
3304 completion_tracker parameter. Use it.
3305 (ada_make_symbol_completion_list): Rename to...
3306 (ada_collect_symbol_completion_matches): ... this. Add
3307 completion_tracker parameter and use it.
3308 (ada_language_defn): Adjust.
3309 * break-catch-syscall.c (catch_syscall_completer): Adjust
3310 prototype and work with completion_tracker instead of VEC.
3311 * breakpoint.c (condition_completer): Adjust prototype and work
3312 with completion_tracker instead of VEC.
3313 * c-lang.c (c_language_defn, cplus_language_defn)
3314 (asm_language_defn, minimal_language_defn): Adjust to renames.
3315 * cli/cli-cmds.c (complete_command): Rework using
3316 completion_tracker. Catch exceptions when completing.
3317 * cli/cli-decode.c (integer_unlimited_completer)
3318 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
3319 with completion_tracker instead of VEC.
3320 * command.h (struct completion_tracker): Forward declare.
3321 (completer_ftype, completer_handle_brkchars_ftype): Change
3322 types.
3323 (complete_on_cmdlist, complete_on_enum): Adjust.
3324 * completer.c: Include <algorithm>.
3325 (struct gdb_completer_state): New.
3326 (current_completion): New global.
3327 (readline_line_completion_function): Delete.
3328 (noop_completer, filename_completer)
3329 (filename_completer_handle_brkchars, complete_files_symbols)
3330 (linespec_location_completer): Adjust to work with a
3331 completion_tracker instead of a VEC.
3332 (string_or_empty): New.
3333 (collect_explicit_location_matches): Adjust to work with a
3334 completion_tracker instead of a VEC.
3335 (explicit_location_completer): Rename to ...
3336 (complete_explicit_location): ... this and adjust to work with a
3337 completion_tracker instead of a VEC.
3338 (location_completer): Adjust to work with a completion_tracker
3339 instead of a VEC.
3340 (add_struct_fields): Adjust to work with a completion_list instead
3341 of VEC.
3342 (expression_completer): Rename to ...
3343 (complete_expression): ... this and adjust to work with a
3344 completion_tracker instead of a VEC. Use complete_files_symbols.
3345 (expression_completer): Reimplement on top of complete_expression.
3346 (symbol_completer): Adjust to work with a completion_tracker
3347 instead of a VEC.
3348 (enum complete_line_internal_reason): Add describing comments.
3349 (complete_line_internal_normal_command): Adjust to work with a
3350 completion_tracker instead of a VEC.
3351 (complete_line_internal): Rename to ...
3352 (complete_line_internal_1): ... this and adjust to work with a
3353 completion_tracker instead of a VEC. Assert TEXT is NULL in the
3354 handle_brkchars phase.
3355 (new_completion_tracker): Delete.
3356 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
3357 complete_line_internal_1.
3358 (free_completion_tracker): Delete.
3359 (INITIAL_COMPLETION_HTAB_SIZE): New.
3360 (completion_tracker::completion_tracker)
3361 (completion_tracker::~completion_tracker): New.
3362 (maybe_add_completion): Delete.
3363 (completion_tracker::maybe_add_completion)
3364 (completion_tracker::add_completion)
3365 (completion_tracker::add_completions): New.
3366 (throw_max_completions_reached_error): Delete.
3367 (complete_line): Adjust to work with a completion_tracker instead
3368 of a VEC. Don't create a completion_tracker_t or check for max
3369 completions here.
3370 (command_completer, command_completer_handle_brkchars)
3371 (signal_completer, reg_or_group_completer_1)
3372 (reg_or_group_completer, default_completer_handle_brkchars):
3373 Adjust to work with a completion_tracker.
3374 (gdb_completion_word_break_characters_throw): New.
3375 (gdb_completion_word_break_characters): Reimplement.
3376 (line_completion_function): Delete.
3377 (completion_tracker::recompute_lowest_common_denominator)
3378 (expand_preserving_ws)
3379 (completion_tracker::build_completion_result)
3380 (completion_result::completion_result)
3381 (completion_result::completion_result)
3382 (completion_result::~completion_result)
3383 (completion_result::completion_result)
3384 (completion_result::release_match_list, compare_cstrings)
3385 (completion_result::sort_match_list)
3386 (completion_result::reset_match_list)
3387 (gdb_rl_attempted_completion_function_throw)
3388 (gdb_rl_attempted_completion_function): New.
3389 * completer.h (completion_list, struct completion_result)
3390 (class completion_tracker): New.
3391 (complete_line): Add completion_tracker parameter.
3392 (readline_line_completion_function): Delete.
3393 (gdb_rl_attempted_completion_function): New.
3394 (noop_completer, filename_completer, expression_completer)
3395 (location_completer, symbol_completer, command_completer)
3396 (signal_completer, reg_or_group_completer): Update prototypes.
3397 (completion_tracker_t, new_completion_tracker)
3398 (make_cleanup_free_completion_tracker): Delete.
3399 (enum maybe_add_completion_enum): Delete.
3400 (maybe_add_completion): Delete.
3401 (throw_max_completions_reached_error): Delete.
3402 * corefile.c (complete_set_gnutarget): Adjust to work with a
3403 completion_tracker instead of a VEC.
3404 * cp-abi.c (cp_abi_completer): Adjust to work with a
3405 completion_tracker instead of a VEC.
3406 * d-lang.c (d_language_defn): Adjust.
3407 * disasm.c (disassembler_options_completer): Adjust to work with a
3408 completion_tracker instead of a VEC.
3409 * f-lang.c (f_make_symbol_completion_list): Rename to ...
3410 (f_collect_symbol_completion_matches): ... this. Adjust to work
3411 with a completion_tracker instead of a VEC.
3412 (f_language_defn): Adjust.
3413 * go-lang.c (go_language_defn): Adjust.
3414 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
3415 Adjust to work with a completion_tracker instead of a VEC.
3416 * infrun.c (handle_completer): Likewise.
3417 * interps.c (interpreter_completer): Likewise.
3418 * interps.h (interpreter_completer): Likewise.
3419 * language.c (unknown_language_defn, auto_language_defn)
3420 (local_language_defn): Adjust.
3421 * language.h (language_defn::la_make_symbol_completion_list):
3422 Rename to ...
3423 (language_defn::la_collect_symbol_completion_matches): ... this
3424 and adjust to work with a completion_tracker instead of a VEC.
3425 * m2-lang.c (m2_language_defn): Adjust.
3426 * objc-lang.c (objc_language_defn): Adjust.
3427 * opencl-lang.c (opencl_language_defn): Adjust.
3428 * p-lang.c (pascal_language_defn): Adjust.
3429 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
3430 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
3431 with a completion_tracker.
3432 * rust-lang.c (rust_language_defn): Adjust.
3433 * symtab.c (free_completion_list, do_free_completion_list)
3434 (return_val, completion_tracker): Delete.
3435 (completion_list_add_name, completion_list_add_symbol)
3436 (completion_list_add_msymbol, completion_list_objc_symbol)
3437 (completion_list_add_fields, add_symtab_completions): Add
3438 completion_tracker parameter and use it.
3439 (default_make_symbol_completion_list_break_on_1): Rename to...
3440 (default_collect_symbol_completion_matches_break_on): ... this.
3441 Add completion_tracker parameter and use it instead of allocating
3442 a completion tracker here.
3443 (default_make_symbol_completion_list_break_on): Delete old
3444 implementation.
3445 (default_make_symbol_completion_list): Delete.
3446 (default_collect_symbol_completion_matches): New.
3447 (make_symbol_completion_list): Delete.
3448 (collect_symbol_completion_matches): New.
3449 (make_symbol_completion_type): Rename to ...
3450 (collect_symbol_completion_matches_type): ... this. Add
3451 completion_tracker parameter and use it instead of VEC.
3452 (make_file_symbol_completion_list_1): Rename to...
3453 (collect_file_symbol_completion_matches): ... this. Add
3454 completion_tracker parameter and use it instead of VEC.
3455 (make_file_symbol_completion_list): Delete.
3456 (add_filename_to_list): Use completion_list instead of a VEC.
3457 (add_partial_filename_data::list): Now a completion_list.
3458 (make_source_files_completion_list): Work with a completion_list
3459 instead of a VEC.
3460 * symtab.h: Include "completer.h".
3461 (default_make_symbol_completion_list_break_on)
3462 (default_make_symbol_completion_list, make_symbol_completion_list)
3463 (make_symbol_completion_type, make_file_symbol_completion_list)
3464 (make_source_files_completion_list): Delete.
3465 (default_collect_symbol_completion_matches_break_on)
3466 (default_collect_symbol_completion_matches)
3467 (collect_symbol_completion_matches)
3468 (collect_symbol_completion_matches_type)
3469 (collect_file_symbol_completion_matches)
3470 (make_source_files_completion_list): New.
3471 * top.c (init_main): Don't install a rl_completion_entry_function
3472 hook. Install a rl_attempted_completion_function hook instead.
3473 * tui/tui-layout.c (layout_completer): Adjust to work with a
3474 completion_tracker.
3475 * tui/tui-regs.c (tui_reggroup_completer):
3476 * tui/tui-win.c (window_name_completer, focus_completer)
3477 (winheight_completer): Adjust to work with a completion_tracker.
3478 * value.c: Include "completer.h".
3479 (complete_internalvar): Adjust to work with a completion_tracker.
3480 * value.h (complete_internalvar): Likewise.
3481
3482 2017-07-17 Pedro Alves <palves@redhat.com>
3483
3484 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
3485 renames.
3486 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
3487 comments to completer_ftype's declaration.
3488 <completer_handle_brkchars>: Change type to
3489 completer_handle_brkchars_ftype.
3490 * command.h (completer_ftype): Add describing comment and give
3491 names to parameters.
3492 (completer_ftype_void): Rename to ...
3493 (completer_handle_brkchars_ftype) ... this. Add describing comment.
3494 (set_cmd_completer_handle_brkchars): Adjust.
3495 * completer.c (filename_completer_handle_brkchars): New function.
3496 (complete_line_internal_normal_command): New function, factored
3497 out from ...
3498 (complete_line_internal): ... here.
3499 (command_completer_handle_brkchars)
3500 (default_completer_handle_brkchars)
3501 (completer_handle_brkchars_func_for_completer): New functions.
3502 * completer.h (set_gdb_completion_word_break_characters): Delete
3503 declaration.
3504 (completer_handle_brkchars_func_for_completer): New declaration.
3505 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
3506 completer_handle_brkchars_func_for_completer.
3507
3508 2017-07-17 Pedro Alves <palves@redhat.com>
3509
3510 * completer.c (symbol_completer): New function, based on
3511 make_symbol_completion_list_fn.
3512 * completer.h (symbol_completer): New declaration.
3513 * guile/scm-cmd.c (cmdscm_completers): Adjust.
3514 * python/py-cmd.c (completers): Adjust.
3515 * symtab.c (make_symbol_completion_list_fn): Delete.
3516 * symtab.h (make_symbol_completion_list_fn): Delete.
3517 * cli/cli-decode.c (add_cmd): Adjust.
3518
3519 2017-07-17 Pedro Alves <palves@redhat.com>
3520
3521 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
3522 * dwarf2read.c: Include "filename-seen-cache.h".
3523 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
3524 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
3525 * filename-seen-cache.c: New file.
3526 * filename-seen-cache.h: New file.
3527 * symtab.c: Include "filename-seen-cache.h".
3528 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
3529 (create_filename_seen_cache, clear_filename_seen_cache)
3530 (delete_filename_seen_cache, filename_seen): Delete, parts moved
3531 to filename-seen-cache.h/filename-seen-cache.c.
3532 (output_source_filename, sources_info)
3533 (maybe_add_partial_symtab_filename)
3534 (make_source_files_completion_list): Adjust to use
3535 filename_seen_cache.
3536
3537 2017-07-17 Pedro Alves <palves@redhat.com>
3538
3539 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
3540 fields.
3541 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
3542 dwarf2_debug_sections*)): New.
3543 (dwarf2_per_objfile::dwarf2_per_objfile(const
3544 dwarf2_per_objfile&)): Declare as deleted.
3545 (dwarf2_per_objfile::operator=): Declare as deleted.
3546 (dwarf2_per_objfile::dwarf2_per_objfile)
3547 (dwarf2_per_objfile::~dwarf2_per_objfile)
3548 (dwarf2_per_objfile::free_cached_comp_units): New.
3549 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
3550 ctor. Call dwarf2_per_objfile's ctor manually.
3551 (dwarf2_locate_sections): Deleted/refactored as ...
3552 (dwarf2_per_objfile::locate_sections): ... this new method.
3553 (free_cached_comp_units): Defer to
3554 dwarf2_per_objfile::free_cached_comp_units.
3555 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
3556
3557 2017-07-14 Tom Tromey <tom@tromey.com>
3558
3559 PR rust/21764:
3560 * rust-exp.y (convert_ast_to_expression): Add "want_type"
3561 parameter.
3562 <UNOP_SIZEOF>: Split into separate case.
3563 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
3564
3565 2017-07-14 Tom Tromey <tom@tromey.com>
3566
3567 PR rust/21763:
3568 * symtab.c (symbol_matches_domain): Add language_rust to special
3569 case.
3570 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
3571 treat LOC_TYPEDEF symbols as variables.
3572
3573 2017-07-14 Pedro Alves <palves@redhat.com>
3574
3575 * symtab.c (make_file_symbol_completion_list_1): Iterate over
3576 symtabs matching all symtabs with SRCFILE as file name instead of
3577 only considering the first hit, with lookup_symtab.
3578
3579 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
3580
3581 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
3582 operator_name parameters.
3583 (gen_expr): Update function call.
3584
3585 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
3586
3587 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
3588 parameter.
3589 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
3590 Likewise.
3591 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
3592 parameter, use agent_expr::gdbarch instead, update function
3593 calls.
3594 (locexpr_tracepoint_var_ref): Likewise.
3595 (loclist_tracepoint_var_ref): Likewise.
3596 * ax-gdb.c (gen_trace_static_fields): Likewise.
3597 (gen_traced_pop): Likewise.
3598 (gen_frame_args_address): Likewise.
3599 (gen_frame_locals_address): Likewise.
3600 (gen_var_ref): Likewise.
3601 (gen_struct_ref_recursive): Likewise.
3602 (gen_static_field): Likewise.
3603 (gen_maybe_namespace_elt): Likewise.
3604 (gen_expr): Likewise.
3605 (gen_trace_for_var): Likewise.
3606 (gen_trace_for_expr): Likewise.
3607 (gen_trace_for_return_address): Likewise.
3608
3609 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
3610
3611 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
3612 parameter.
3613 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
3614
3615 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
3616
3617 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
3618 from ax, update calls.
3619 (gen_usual_arithmetic): Likewise.
3620 (gen_integral_promotions): Likewise.
3621 (gen_bitfield_ref): Likewise.
3622 (gen_primitive_field): Likewise.
3623 (gen_struct_ref_recursive): Likewise.
3624 (gen_struct_ref): Likewise.
3625 (gen_maybe_namespace_elt): Likewise.
3626 (gen_struct_elt_for_reference): Likewise.
3627 (gen_namespace_elt): Likewise.
3628 (gen_aggregate_elt_ref): Likewise.
3629 (gen_expr): Get gdbarch from ax, update calls.
3630 (gen_expr_binop_rest): Likewise.
3631
3632 2017-07-13 Pedro Alves <palves@redhat.com>
3633
3634 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
3635 as default tdesc.
3636 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
3637 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
3638 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
3639 tdesc_amd64_linux as default tdesc. Get final tdesc from the
3640 tdep.
3641 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
3642 Get final tdesc from the tdep.
3643 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
3644 default tdesc.
3645 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3646 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3647 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
3648 Use it as default tdesc.
3649 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
3650 down to amd_init_abi. No longer handle fallback tdesc here.
3651 * amd64-tdep.h (tdesc_x32): Declare.
3652 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
3653 parameter.
3654 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
3655 as default tdesc.
3656
3657 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3658
3659 * s390-linux-tdep.c (s390_process_record): Add support for
3660 instructions new in arch12.
3661
3662 2017-07-11 John Baldwin <jhb@FreeBSD.org>
3663
3664 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
3665 PT_GETFSBASE and PT_GETGSBASE.
3666 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
3667 PT_SETGSBASE.
3668
3669 2017-07-11 John Baldwin <jhb@FreeBSD.org>
3670
3671 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
3672 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
3673 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
3674 those rules.
3675 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
3676 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
3677 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
3678 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
3679 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
3680 * features/i386/amd64.xml: Add 64bit-segments.xml.
3681 * features/i386/amd64-avx-avx512.c: Regenerated.
3682 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
3683 * features/i386/amd64-avx-mpx.c: Regenerated.
3684 * features/i386/amd64-avx.c: Regenerated.
3685 * features/i386/amd64-mpx.c: Regenerated.
3686 * features/i386/amd64.c: Regenerated.
3687 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
3688 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
3689 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
3690 * regformats/i386/amd64-avx.dat: Regenerated.
3691 * regformats/i386/amd64-mpx.dat: Regenerated.
3692 * regformats/i386/amd64.dat: Regenerated.
3693
3694 2017-07-10 Yao Qi <yao.qi@linaro.org>
3695
3696 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3697 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3698
3699 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
3700
3701 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
3702 unsetenv.
3703 * gnulib/aclocal.m4: Regenerate.
3704 * gnulib/config.in: Regenerate.
3705 * gnulib/configure: Regenerate.
3706 * gnulib/import/Makefile.am: Regenerate.
3707 * gnulib/import/Makefile.in: Regenerate.
3708 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3709 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3710 * gnulib/import/m4/environ.m4: New file.
3711 * gnulib/import/m4/setenv.m4: New file.
3712 * gnulib/import/setenv.c: New file.
3713 * gnulib/import/unsetenv.c: New file.
3714
3715 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
3716
3717 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
3718 address when op is DW_OP_addr.
3719
3720 2017-07-09 Tom Tromey <tom@tromey.com>
3721
3722 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
3723 check and apply to outer type.
3724
3725 2017-07-07 John Baldwin <jhb@FreeBSD.org>
3726
3727 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
3728 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
3729 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
3730 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
3731
3732 2017-07-07 John Baldwin <jhb@FreeBSD.org>
3733
3734 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
3735
3736 2017-07-07 John Baldwin <jhb@FreeBSD.org>
3737
3738 * corelow.c (get_core_siginfo): Remove.
3739 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
3740 instead of get_core_siginfo.
3741 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
3742 * gdbarch.h: Re-generate.
3743 * gdbarch.c: Re-generate.
3744 * linux-tdep.c (linux_core_xfer_siginfo): New.
3745 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
3746
3747 2017-07-07 John Baldwin <jhb@FreeBSD.org>
3748
3749 * corelow.c (thread_section_name): Move to ...
3750 * gdbcore.h (thread_section_name): ... here.
3751
3752 2017-07-07 John Baldwin <jhb@FreeBSD.org>
3753
3754 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
3755 (struct siginfo32): New.
3756 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
3757 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
3758 via ptrace(PT_LWPINFO).
3759
3760 2017-07-07 John Baldwin <jhb@FreeBSD.org>
3761
3762 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
3763 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
3764 (fbsd_get_siginfo_type): New.
3765 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
3766 (_initialize_fbsd_tdep): New.
3767
3768 2017-07-06 David Blaikie <dblaikie@gmail.com>
3769
3770 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
3771 a singular dwo_unit*) to support multiple CUs in the same way that
3772 multiple TUs are supported.
3773 (create_cus_hash_table): Replace create_dwo_cu with a function for
3774 parsing multiple CUs from a DWO file.
3775 (open_and_init_dwo_file): Use create_cus_hash_table rather than
3776 create_dwo_cu.
3777 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
3778 htab_find, rather than comparing the signature to a singleton CU in
3779 the dwo_file.
3780
3781 2017-07-06 Pedro Alves <palves@redhat.com>
3782
3783 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
3784
3785 2017-07-04 Pedro Alves <palves@redhat.com>
3786
3787 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
3788 * gdbtypes.h (TYPE_STATIC): Delete.
3789 (struct fn_field) <is_public, is_abstract, is_static, is_final,
3790 is_synchronized, is_native>: Delete.
3791 <dummy>: Bump.
3792 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
3793 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
3794 (TYPE_FN_FIELD_ABSTRACT): Delete.
3795
3796 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
3797
3798 * buffer.h (buffer_finish): Fix spelling mistakes.
3799
3800 2017-07-01 Eli Zaretskii <eliz@gnu.org>
3801
3802 * .dir-locals.el: Automatically switch to C-style comments in
3803 versions of Emacs that support the feature.
3804
3805 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
3806 Pedro Alves <palves@redhat.com>
3807
3808 PR cli/21688
3809 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
3810 (process_next_line): New variable 'inline_cmd'.
3811 Adjust 'if' clauses for "python", "compile" and "guile" to use
3812 'command_name_equals' and check for '!inline_cmd'.
3813
3814 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
3815
3816 PR cli/21688
3817 * cli/cli-script.c (command_name_equals_not_inline): New function.
3818 (process_next_line): Adjust 'if' clauses for "python", "compile"
3819 and "guile" to use command_name_equals_not_inline.
3820
3821 2017-06-29 Pedro Alves <palves@redhat.com>
3822
3823 * completer.c (expression_completer): Call
3824 linespec_location_completer instead of location_completer.
3825
3826 2017-06-29 Pedro Alves <palves@redhat.com>
3827
3828 * completer.c (expression_completer): Remove code that recomputes
3829 'text' from 'word'.
3830
3831 2017-06-29 Yao Qi <yao.qi@linaro.org>
3832
3833 * regformats/regdat.sh: Generate code with
3834 "ifndef IN_PROCESS_AGENT".
3835
3836 2017-06-28 Pedro Alves <palves@redhat.com>
3837
3838 * command.h: Include "common/scoped_restore.h".
3839
3840 2017-06-28 Yao Qi <yao.qi@linaro.org>
3841
3842 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
3843 instead of obstack_grow.
3844
3845 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
3846
3847 PR gdb/21337
3848 * symfile.c (reread_symbols): Call objfiles_changed just before
3849 read_symbols.
3850
3851 2017-06-27 Pedro Alves <palves@redhat.com>
3852
3853 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
3854 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
3855 (completion_list_add_symbol, completion_list_add_msymbol):
3856 ... these new functions.
3857 (add_symtab_completions)
3858 (default_make_symbol_completion_list_break_on_1): Adjust.
3859
3860 2017-06-27 Pedro Alves <palves@redhat.com>
3861
3862 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
3863 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
3864 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
3865 dtor.
3866 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
3867 'storage_obstack' field an auto_obstack. In-class initialize all
3868 non-bitfield fields. Make minsyms_read bool.
3869 * symfile.c (read_symbols): Adjust.
3870
3871 2017-06-27 Alan Hayward <alan.hayward@arm.com>
3872
3873 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
3874 (gdbsim_store_register): Likewise.
3875
3876 2017-06-27 Pedro Alves <palves@redhat.com>
3877
3878 * c-exp.y (name_obstack): Now an auto_obstack.
3879 (yylex): Use auto_obstack::clear.
3880 (c_parse): Use auto_obstack::clear instead of reinitializing and
3881 freeing the obstack.
3882 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
3883 * d-exp.y (name_obstack): Now an auto_obstack.
3884 (yylex): Use auto_obstack::clear.
3885 (d_parse): Use auto_obstack::clear instead of reinitializing and
3886 freeing the obstack.
3887 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
3888 auto_obstack.
3889 * dwarf2read.c (create_addrmap_from_index)
3890 (dwarf2_build_psymtabs_hard)
3891 (update_enumeration_type_from_children): Likewise.
3892 * gdb_obstack.h (auto_obstack): New type.
3893 * go-exp.y (name_obstack): Now an auto_obstack.
3894 (build_packaged_name): Use auto_obstack::clear.
3895 (go_parse): Use auto_obstack::clear instead of reinitializing and
3896 freeing the obstack.
3897 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
3898 auto_obstack.
3899 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
3900 * rust-exp.y (work_obstack): Now an auto_obstack.
3901 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
3902 reinitializing and freeing the obstack.
3903 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
3904 (host_char_to_target): Use auto_obstack.
3905 * utils.h (make_cleanup_obstack_free): Delete declaration.
3906 * valprint.c (generic_emit_char, generic_printstr): Use
3907 auto_obstack.
3908
3909 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
3910
3911 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
3912 thread.
3913 (darwin_init_thread_list): Don't update dummy thread.
3914 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
3915
3916 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
3917
3918 * record-full.c (netorder16): Remove.
3919
3920 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
3921
3922 * common/diagnostics.h: Define macros for GCC.
3923 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
3924 * common/vec.h: Include diagnostics.h.
3925 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
3926 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
3927 warning.
3928
3929 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
3930
3931 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
3932 New macro.
3933 * ada-lex.l: Ignore deprecated register warnings.
3934
3935 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
3936
3937 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
3938 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
3939
3940 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
3941
3942 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
3943 its own line.
3944
3945 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
3946
3947 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
3948
3949 2017-06-23 Alan Hayward <alan.hayward@arm.com>
3950
3951 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
3952 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
3953 (xtensa_register_read_masked): Likewise.
3954
3955 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
3956
3957 * common/environ.c (gdb_environ::unset): Update comment.
3958
3959 2017-06-22 Alan Hayward <alan.hayward@arm.com>
3960
3961 * python/py-unwind.c (pyuw_sniffer): Allocate space for
3962 registers.
3963
3964 2017-06-22 Alan Hayward <alan.hayward@arm.com>
3965
3966 * record-full.c (record_full_exec_insn): Use byte_vector.
3967
3968 2017-06-22 Yao Qi <yao.qi@linaro.org>
3969
3970 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
3971 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
3972
3973 2017-06-22 Alan Hayward <alan.hayward@arm.com>
3974
3975 * remote.c (cached_reg): Move from here...
3976 * regcache.h (cached_reg): ...to here.
3977 * python/py-unwind.c (struct reg_info): Remove.
3978 (cached_frame_info): Use cached_reg_t.
3979 (pyuw_prev_register): Likewise.
3980 (pyuw_sniffer): Use cached_reg_t and allocate registers.
3981 (pyuw_dealloc_cache): Free all registers.
3982
3983 2017-06-22 Pedro Alves <palves@redhat.com>
3984 Simon Marchi <simon.marchi@ericsson.com>
3985
3986 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
3987 warning.
3988 * common/diagnostics.h: New file.
3989
3990 2017-06-22 Pedro Alves <palves@redhat.com>
3991
3992 * common/agent.h: Add include guards.
3993
3994 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
3995
3996 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
3997 talk about addressable units instead of bytes.
3998
3999 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4000
4001 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4002 of '::const_iterator'.
4003
4004 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4005
4006 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4007 'unittests/environ-selftests.c'.
4008 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4009 * charset.c (find_charset_names): Declare object 'iconv_env'.
4010 Update code to use 'iconv_env' object. Remove call to
4011 'free_environ'.
4012 * common/environ.c: Include <utility>.
4013 (make_environ): Delete function.
4014 (free_environ): Delete function.
4015 (gdb_environ::clear): New function.
4016 (gdb_environ::operator=): New function.
4017 (gdb_environ::get): Likewise.
4018 (environ_vector): Delete function.
4019 (set_in_environ): Delete function.
4020 (gdb_environ::set): New function.
4021 (unset_in_environ): Delete function.
4022 (gdb_environ::unset): New function.
4023 (gdb_environ::envp): Likewise.
4024 * common/environ.h: Include <vector>.
4025 (struct gdb_environ): Delete; transform into...
4026 (class gdb_environ): ... this class.
4027 (free_environ): Delete prototype.
4028 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4029 environ_vector): Likewise.
4030 * infcmd.c (run_command_1): Update code to call
4031 'envp' from 'gdb_environ' class.
4032 (environment_info): Update code to call methods from 'gdb_environ'
4033 class.
4034 (unset_environment_command): Likewise.
4035 (path_info): Likewise.
4036 (path_command): Likewise.
4037 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4038 (inferior::inferior): Initialize 'environment' using the host's
4039 information.
4040 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4041 Include "environ.h".
4042 (class inferior) <environment>: Change type from 'struct
4043 gdb_environ' to 'gdb_environ'.
4044 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4045 methods from 'gdb_environ' class.
4046 * solib.c (solib_find_1): Likewise
4047 * unittests/environ-selftests.c: New file.
4048
4049 2017-06-20 Yao Qi <yao.qi@linaro.org>
4050
4051 * features/i386/i386-linux.xml: Exchange the order of including
4052 32bit-linux.xml and 32bit-sse.xml.
4053 * features/i386/i386-linux.c: Regenerated.
4054
4055 2017-06-20 Yao Qi <yao.qi@linaro.org>
4056
4057 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4058 Delete copy ctor and assignment operator.
4059 (tdesc_type): Likewise.
4060 (tdesc_feature): Likewise.
4061 (tdesc_free_reg): Remove.
4062 (tdesc_create_reg): Use new.
4063 (tdesc_free_type): Remove.
4064 (tdesc_create_vector): Use new.
4065 (tdesc_create_union): Likewise.
4066 (tdesc_create_flags): Likewise.
4067 (tdesc_create_enum): Likewise.
4068 (tdesc_free_feature): Delete.
4069 (free_target_description): Use delete.
4070
4071 2017-06-19 John Baldwin <jhb@FreeBSD.org>
4072
4073 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4074 registers.
4075
4076 2017-06-19 Pedro Alves <palves@redhat.com>
4077
4078 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4079 after gdb::unlinker.
4080
4081 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
4082
4083 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4084 gdb_environ to access an environment variable.
4085
4086 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4087
4088 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4089 gdb_byte*.
4090
4091 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4092
4093 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4094
4095 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4096
4097 * configure: Re-generate.
4098 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4099
4100 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4101
4102 * configure: Re-generate.
4103 * warning.m4: Pass -Werror to compiler when checking for
4104 supported warning flags.
4105
4106 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4107
4108 * Makefile.in (COMPILE.pre): Add "-x c++".
4109
4110 2017-06-16 Alan Hayward <alan.hayward@arm.com>
4111 Pedro Alves <palves@redhat.com>
4112 Yao Qi <yao.qi@linaro.org>
4113
4114 * defs.h (RequireLongest): New.
4115 (extract_integer): Declare function template.
4116 (extract_signed_integer): Remove the declaration, but define it
4117 static inline.
4118 (extract_unsigned_integer): Likewise.
4119 (store_integer): Declare function template.
4120 (store_signed_integer): Remove the declaration, but define it
4121 static inline.
4122 (store_unsigned_integer): Likewise.
4123 * findvar.c (extract_integer): New function template.
4124 (extract_signed_integer): Remove.
4125 (extract_unsigned_integer): Remove.
4126 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4127 instantiations.
4128 (store_integer): New function template.
4129 (store_signed_integer): Remove.
4130 (store_unsigned_integer): Remove.
4131 (store_integer): Explicit instantiations.
4132 * regcache.c (regcache_raw_read_signed): Update.
4133 (regcache::raw_read): New function.
4134 (regcache::raw_read_signed): Remove.
4135 (regcache::raw_read_unsigned): Remove.
4136 (regcache_raw_read_unsigned): Update.
4137 (regcache_raw_write_unsigned): Update.
4138 (regcache::raw_write_signed): Remove.
4139 (regcache::raw_write): New function.
4140 (regcache_cooked_read_signed): Update.
4141 (regcache::raw_write_unsigned): Remove.
4142 (regcache::cooked_read_signed): Remove.
4143 (regcache_cooked_read_unsigned): Update.
4144 (regcache::cooked_read_unsigned): Remove.
4145 (regcache_cooked_write_signed): Update.
4146 (regcache_cooked_write_unsigned): Update.
4147 * regcache.h (regcache) <raw_read_signed>: Remove.
4148 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4149 <raw_read, raw_write>: New.
4150 <cooked_read_signed, cooked_write_signed>: Remove.
4151 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4152 <cooked_read, cooked_write>: New.
4153 * sh64-tdep.c (sh64_pseudo_register_read): Update.
4154 (sh64_pseudo_register_write): Update.
4155
4156 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
4157
4158 * arc-tdep.c (arc_disassembler_options): New variable.
4159 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4160 of default_print_insn.
4161 (arc_delayed_print_insn): Set info->section when needed,
4162 use default_print_insn to retrieve a disassembler.
4163
4164 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
4165
4166 PR gdb/21574
4167 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4168 to mention $SHELL and startup-with-shell.
4169
4170 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
4171
4172 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4173
4174 2017-06-14 Yao Qi <yao.qi@linaro.org>
4175
4176 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4177 default_print_insn instead of print_insn_aarch64.
4178 * arm-tdep.c (gdb_print_insn_arm): Call
4179 default_print_insn instead of print_insn_big_arm
4180 and print_insn_little_arm.
4181 * i386-tdep.c (i386_print_insn): Call default_print_insn
4182 instead of print_insn_i386.
4183 * ia64-tdep.c (ia64_print_insn): Call
4184 default_print_insn instead of print_insn_ia64.
4185 * mips-tdep.c (gdb_print_insn_mips): Call
4186 default_print_insn instead of print_insn_big_mips
4187 and print_insn_little_mips.
4188 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4189 instead of print_insn_spu.
4190
4191 2017-06-14 Pedro Alves <palves@redhat.com>
4192
4193 * ada-lang.c: Include "common/byte-vector.h".
4194 (ada_value_primitive_packed_val): Use gdb::byte_vector.
4195 * charset.c (wchar_iterator::iterate): Resize the vector instead
4196 of reserving it.
4197 * common/byte-vector.h: Include "common/def-vector.h".
4198 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4199 * cli/cli-dump.c: Include "common/byte-vector.h".
4200 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4201 * common/byte-vector.h: New file.
4202 * common/def-vector.h: New file.
4203 * common/default-init-alloc.h: New file.
4204 * dwarf2loc.c: Include "common/byte-vector.h".
4205 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4206 instead of reserving it.
4207 * dwarf2read.c: Include "common/byte-vector.h".
4208 (data_buf::m_vec): Now a gdb::byte_vector.
4209 * gdb_regex.c: Include "common/def-vector.h".
4210 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
4211 * mi/mi-main.c: Include "common/byte-vector.h".
4212 (mi_cmd_data_read_memory): Use gdb::byte_vector.
4213 * printcmd.c: Include "common/byte-vector.h".
4214 (print_scalar_formatted): Use gdb::byte_vector.
4215 * valprint.c: Include "common/byte-vector.h".
4216 (maybe_negate_by_bytes, print_decimal_chars): Use
4217 gdb::byte_vector.
4218
4219 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4220
4221 * darwin-nat.c: Include "nat/fork-inferior.h".
4222
4223 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4224
4225 * configure.nat: Factor out Darwin bits that are not
4226 architecture-specific. Add fork-inferior.o.
4227
4228 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4229
4230 * configure.nat: Factor out AIX bits that are not
4231 architecture-specific. Add fork-inferior.o.
4232
4233 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4234
4235 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
4236 (read_pieced_value, write_pieced_value): ...here. Reduce to
4237 wrappers that just call rw_pieced_value.
4238
4239 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4240
4241 * dwarf2loc.c (write_pieced_value): When writing the data for a
4242 memory piece, use write_memory_with_notification instead of
4243 write_memory.
4244
4245 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4246
4247 * valops.c (read_value_memory): Change embedded_offset to
4248 represent a bit offset instead of a byte offset.
4249 * value.h (read_value_memory): Adjust comment.
4250
4251 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4252
4253 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
4254 dest_offset_bits and source_offset_bits.
4255 (write_pieced_value): Likewise.
4256
4257 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4258
4259 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
4260 given by DW_OP_bit_piece.
4261 (write_pieced_value): Likewise.
4262
4263 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4264
4265 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
4266 some other preparations to the places where sufficient information
4267 is available.
4268 (write_pieced_value): Likewise.
4269
4270 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4271
4272 * dwarf2loc.c (bits_to_bytes): New function.
4273 (read_pieced_value): Fix offset calculations for register pieces
4274 on big-endian targets.
4275 (write_pieced_value): Likewise.
4276
4277 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4278
4279 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
4280 (write_pieced_value): Likewise.
4281
4282 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4283
4284 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
4285 transfer the source value's least significant bits, instead of its
4286 lowest-addressed ones. Rename type_len to max_offset.
4287 (read_pieced_value): Mirror above changes to write_pieced_value as
4288 applicable.
4289
4290 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4291
4292 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
4293 truncate full bytes from dest_offset_bits before using it as an
4294 offset into the buffer.
4295
4296 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4297
4298 * dwarf2loc.c (write_pieced_value): Include transfer size in
4299 byte-wise check.
4300
4301 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4302
4303 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
4304 calculation of this_size.
4305
4306 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4307
4308 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
4309 when targeting a bit-field.
4310 (write_pieced_value): Likewise.
4311
4312 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4313
4314 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
4315 (allocate_piece_closure): Drop addr_size parameter.
4316 (dwarf2_evaluate_loc_desc_full): Adjust call to
4317 allocate_piece_closure.
4318
4319 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4320
4321 PR gdb/21226
4322 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
4323 the LSB end, independent of endianness.
4324
4325 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4326
4327 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
4328 size capping.
4329
4330 2017-06-13 Yao Qi <yao.qi@linaro.org>
4331
4332 * mips-linux-nat.c: Move include features/mips*-linux.c to
4333 mips-linux-tdep.c.
4334 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
4335 to mips-linux-tdep.c.
4336 * mips-linux-tdep.c: Include features/mips*-linux.c
4337 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
4338 functions.
4339 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
4340 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
4341 (tdesc_mips64_dsp_linux): Declare.
4342
4343 2017-06-12 Tom Tromey <tom@tromey.com>
4344
4345 * valprint.h (val_print_type_code_int): Remove.
4346 * valprint.c (generic_val_print_int): Always call
4347 val_print_scalar_formatted.
4348 (val_print_type_code_int): Remove.
4349 * printcmd.c (print_scalar_formatted): Handle options->format==0.
4350 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
4351 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
4352 * ada-valprint.c (ada_val_print_num): Use
4353 val_print_scalar_formatted.
4354
4355 2017-06-12 Tom Tromey <tom@tromey.com>
4356
4357 * printcmd.c (print_scalar_formatted): Unify the two switches.
4358 Don't convert scalars to LONGEST.
4359
4360 2017-06-12 Tom Tromey <tom@tromey.com>
4361
4362 PR exp/16225:
4363 * valprint.h (print_decimal_chars): Update.
4364 * valprint.c (maybe_negate_by_bytes): New function.
4365 (print_decimal_chars): Add "is_signed" argument.
4366 * printcmd.c (print_scalar_formatted): Update.
4367
4368 2017-06-12 Tom Tromey <tom@tromey.com>
4369
4370 PR exp/16225:
4371 * valprint.h (print_binary_chars, print_hex_chars): Update.
4372 * valprint.c (val_print_type_code_int): Update.
4373 (print_binary_chars): Add "zero_pad" argument.
4374 (emit_octal_digit): New function.
4375 (print_octal_chars): Don't zero-pad.
4376 (print_decimal_chars): Likewise.
4377 (print_hex_chars): Add "zero_pad" argument.
4378 * sh64-tdep.c (sh64_do_fp_register): Update.
4379 * regcache.c (regcache::dump): Update.
4380 * printcmd.c (print_scalar_formatted): Update.
4381 * infcmd.c (default_print_one_register_info): Update.
4382
4383 2017-06-12 Pedro Alves <palves@redhat.com>
4384 Alan Hayward <alan.hayward@arm.com>
4385
4386 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
4387 (mips_eabi_push_dummy_call): Rename local 'regsize' to
4388 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
4389 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
4390 Assert that abi_regsize bytes fit in 'ref_valbuf'.
4391
4392 2017-06-12 Pedro Alves <palves@redhat.com>
4393
4394 * dwarf2read.c (mapped_symtab::data): Now a vector of
4395 symtab_index_entry instead of vector of
4396 std::unique_ptr<symtab_index_entry>. All users adjusted to check
4397 whether an element's name is NULL instead of checking whether the
4398 element itself is NULL.
4399 (find_slot): Change return type. Adjust.
4400 (hash_expand, , add_index_entry, uniquify_cu_indices)
4401 (write_hash_table): Adjust.
4402
4403 2017-06-12 Pedro Alves <palves@redhat.com>
4404
4405 * dwarf2read.c (recursively_count_psymbols): New function.
4406 (write_psymtabs_to_index): Call it to compute number of psyms and
4407 pass estimate size of psyms_seen to unordered_set's ctor.
4408
4409 2017-06-12 Pedro Alves <palves@redhat.com>
4410
4411 * dwarf2read.c (write_hash_table): Check if key already exists
4412 before emplacing.
4413
4414 2017-06-12 Pedro Alves <palves@redhat.com>
4415
4416 * dwarf2read.c (data_buf::append_space): Rename to...
4417 (data_buf::grow): ... this, and make private. Adjust all callers.
4418 (data_buf::append_uint): New method.
4419 (add_address_entry, write_one_signatured_type)
4420 (write_psymtabs_to_index): Use it.
4421
4422 2017-06-12 Pedro Alves <palves@redhat.com>
4423
4424 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
4425 (file_write (FILE *, const std::vector<Elem>&)): Delete.
4426 (data_buf::file_write): Call ::fwrite directly.
4427
4428 2017-06-12 Pedro Alves <palves@redhat.com>
4429
4430 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
4431 std::vector::erase.
4432
4433 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
4434
4435 Code cleanup: C++ify .gdb_index producer.
4436 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
4437 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
4438 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
4439 (create_strtab, add_string): Remove.
4440 (file_write, data_buf): New.
4441 (struct symtab_index_entry): Use std::vector for cu_indices.
4442 (struct mapped_symtab): Use std::vector for data.
4443 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
4444 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
4445 Remove.
4446 (find_slot): Change return type. Update it to the new data structures.
4447 (hash_expand, add_index_entry): Update it to the new data structures.
4448 (offset_type_compare): Remove.
4449 (uniquify_cu_indices): Update it to the new data structures.
4450 (c_str_view, c_str_view_hasher, vector_hasher): New.
4451 (add_indices_to_cpool): Remove.
4452 (write_hash_table): Update it to the new data structures.
4453 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
4454 (eq_psymtab_cu_index): Remove.
4455 (psym_index_map): New typedef.
4456 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
4457 reference and std::unordered_map for cu_index_htab.
4458 (add_address_entry, add_address_entry_worker, write_address_map)
4459 (write_psymbols): Update it to the new data structures.
4460 (write_obstack): Remove.
4461 (struct signatured_type_index_data): Change types_list to a data_buf
4462 reference and psyms_seen to a std::unordered_set reference.
4463 (write_one_signatured_type, recursively_write_psymbols)
4464 (write_psymtabs_to_index): Update it to the new data structures.
4465
4466 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
4467
4468 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
4469 separate-debug-file commands.
4470 * symfile.h (separate_debug_file_debug): New global.
4471 * symfile.c (separate_debug_file_debug): New global.
4472 (separate_debug_file_exists, find_separate_debug_file): Add
4473 debug output.
4474 (_initialize_symfile): Add "set debug separate-debug-file"
4475 command.
4476 * build-id.c (build_id_to_debug_bfd,
4477 find_separate_debug_file_by_buildid): Add debug output.
4478
4479 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4480
4481 * gdbarch.sh (displaced_step_free_closure): Remove.
4482 * gdbarch.h, gdbarch.c: Re-generate.
4483 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
4484 displaced_step_free_closure.
4485 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
4486 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
4487 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4488 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
4489 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4490 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
4491 * arch-utils.h (simple_displaced_step_free_closure): Remove.
4492 * arch-utils.c (simple_displaced_step_free_closure): Remove.
4493 * infrun.c (displaced_step_clear): Call xfree instead of
4494 gdbarch_displaced_step_free_closure.
4495
4496 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
4497
4498 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
4499 NULL".
4500
4501 2017-06-08 Alan Hayward <alan.hayward@arm.com>
4502
4503 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
4504 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
4505 (mn10300_push_dummy_call): Likewise.
4506
4507 2017-06-08 Alan Hayward <alan.hayward@arm.com>
4508
4509 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
4510
4511 2017-06-08 Alan Hayward <alan.hayward@arm.com>
4512
4513 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
4514
4515 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4516
4517 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
4518 able to start inferiors using a shell.
4519 (New remote packets): Announce new packet "QStartupWithShell".
4520 * remote.c: Add PACKET_QStartupWithShell.
4521 (extended_remote_create_inferior): Handle new
4522 PACKET_QStartupWithShell.
4523 (remote_protocol_features) <QStartupWithShell>: New entry for
4524 PACKET_QStartupWithShell.
4525 (_initialize_remote): Call "add_packet_config_cmd" for
4526 QStartupShell.
4527
4528 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4529 Pedro Alves <palves@redhat.com>
4530
4531 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
4532 and "nat/fork-inferior.h".
4533 * common/common-inferior.h: New file, with contents from
4534 "gdb/inferior.h".
4535 * commom/common-utils.c: Include "common-utils.h".
4536 (stringify_argv): New function.
4537 * common/common-utils.h (stringify_argv): New prototype.
4538 * configure.nat: Add "fork-inferior.o" as a dependency for
4539 "*linux*", "fbsd*" and "nbsd*" hosts.
4540 * corefile.c (get_exec_file): Update comment.
4541 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
4542 instead of "startup_inferior".
4543 (darwin_create_inferior): Call "add_thread_silent" after
4544 "fork_inferior".
4545 * fork-child.c: Cleanup unnecessary includes.
4546 (SHELL_FILE): Move to "common/common-fork-child.c".
4547 (environ): Likewise.
4548 (exec_wrapper): Initialize.
4549 (get_exec_wrapper): New function.
4550 (breakup_args): Move to "common/common-fork-child.c"; rename to
4551 "breakup_args_for_exec".
4552 (escape_bang_in_quoted_argument): Move to
4553 "common/common-fork-child.c".
4554 (saved_ui): New variable.
4555 (prefork_hook): New function.
4556 (postfork_hook): Likewise.
4557 (postfork_child_hook): Likewise.
4558 (gdb_startup_inferior): Likewise.
4559 (fork_inferior): Move to "common/common-fork-child.c". Update
4560 function to support gdbserver.
4561 (startup_inferior): Likewise.
4562 * gdbcore.h (get_exec_file): Remove declaration.
4563 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
4564 instead of "startup_inferior". Call "add_thread_silent" after
4565 "fork_inferior".
4566 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
4567 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
4568 instead of "startup_inferior". Call "add_thread_silent" after
4569 "fork_inferior".
4570 * inferior.h: Include "common-inferior.h".
4571 (trace_start_error): Move to "common/common-utils.h".
4572 (trace_start_error_with_name): Likewise.
4573 (fork_inferior): Move prototype to "nat/fork-inferior.h".
4574 (startup_inferior): Likewise.
4575 (gdb_startup_inferior): New prototype.
4576 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
4577 * nat/fork-inferior.h: New file.
4578 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
4579 instead of "startup_inferior". Call "add_thread_silent" after
4580 "fork_inferior".
4581 * target.h (target_terminal_init): Move prototype to
4582 "target/target.h".
4583 (target_terminal_inferior): Likewise.
4584 (target_terminal_ours): Likewise.
4585 * target/target.h (target_terminal_init): New prototype, moved
4586 from "target.h".
4587 (target_terminal_inferior): Likewise.
4588 (target_terminal_ours): Likewise.
4589 * utils.c (gdb_flush_out_err): New function.
4590
4591 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4592
4593 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
4594 * common/common-gdbthread.h: New file, with parts from
4595 "gdb/gdbthread.h".
4596 * gdbthread.h: Include "common-gdbthread.h".
4597 (switch_to_thread): Moved to "common/common-gdbthread.h".
4598
4599 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4600
4601 * Makefile.in (SFILES): Add "common/job-control.c".
4602 (HFILES_NO_SRCDIR): Add "common/job-control.h".
4603 (COMMON_OBS): Add "job-control.o".
4604 * common/job-control.c: New file, with contents from
4605 "gdb/inflow.c".
4606 * common/job-control.h: New file, with contents from "terminal.h".
4607 * fork-child.c: Include "job-control.h".
4608 * inflow.c: Include "job-control.h".
4609 (gdb_setpgid): Move to "common/common-inflow.c".
4610 (_initialize_inflow): Move setting of "job_control" to
4611 "handle_job_control".
4612 * terminal.h (job_control): Moved to "common/common-terminal.h".
4613 (gdb_setpgid): Likewise.
4614 * top.c: Include "job_control.h".
4615 * utils.c: Likewise.
4616 (job_control): Moved to "job-control.c".
4617
4618 2017-06-07 Pedro Alves <palves@redhat.com>
4619
4620 * Makefile.in (SFILES): Add gdb_regex.c.
4621 (COMMON_OBS): Add gdb_regex.o.
4622 * ada-lang.c (ada_add_standard_exceptions)
4623 (ada_add_exceptions_from_frame, name_matches_regex)
4624 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
4625 parameter type to compiled_regex. Adjust.
4626 (ada_exceptions_list): Use compiled_regex.
4627 * break-catch-throw.c (exception_catchpoint::pattern): Now a
4628 std::unique_ptr<compiled_regex>.
4629 (exception_catchpoint::~exception_catchpoint): Remove regfree
4630 call.
4631 (check_status_exception_catchpoint): Adjust to use compiled_regex.
4632 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
4633 * breakpoint.c (solib_catchpoint::compiled): Now a
4634 std::unique_ptr<compiled_regex>.
4635 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
4636 (check_status_catch_solib): Adjust to use compiled_regex.
4637 (add_solib_catchpoint): Adjust to use compiled_regex.
4638 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
4639 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
4640 compiled_regex reference. Adjust to use it.
4641 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
4642 declaration. Include "gdb_regex.h".
4643 (apropos_cmd): Change regex parameter to compiled_regex reference.
4644 * gdb_regex.c: New file.
4645 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
4646 declarations.
4647 (class compiled_regex): New.
4648 * linux-tdep.c: Include "common/gdb_optional.h".
4649 (struct mapping_regexes): New, factored out from
4650 mapping_is_anonymous_p, and adjusted to use compiled_regex.
4651 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
4652 gdb::optional and remove cleanups. Adjust to compiled_regex.
4653 * probe.c: Include "common/gdb_optional.h".
4654 (collect_probes): Use compiled_regex and gdb::optional and remove
4655 cleanups.
4656 * skip.c: Include "common/gdb_optional.h".
4657 (skiplist_entry::compiled_function_regexp): Now a
4658 gdb::optional<compiled_regex>.
4659 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
4660 (free_skiplist_entry): Remove regfree call.
4661 (compile_skip_regexp, skip_rfunction_p): Adjust to use
4662 compiled_regex and gdb::optional.
4663 * symtab.c: Include "common/gdb_optional.h".
4664 (search_symbols): Use compiled_regex and gdb::optional.
4665 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
4666 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
4667 to gdb_regex.c.
4668
4669 2017-06-07 Alan Hayward <alan.hayward@arm.com>
4670
4671 * regcache.c (regcache::save): Avoid buffer use.
4672 (regcache::dump): Likewise.
4673
4674 2017-06-07 Alan Hayward <alan.hayward@arm.com>
4675
4676 * sh-tdep.c (sh_pseudo_register_read): Remove
4677 MAX_REGISTER_SIZE.
4678 (sh_pseudo_register_write): Likewise.
4679 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
4680 (sh64_pseudo_register_write): Likewise
4681
4682 2017-06-07 Alan Hayward <alan.hayward@arm.com>
4683
4684 * aarch64-tdep.c (aarch64_store_return_value): Use
4685 V_REGISTER_SIZE.
4686 (aarch64_pseudo_read_value): Likewise.
4687 (aarch64_pseudo_write): Likewise.
4688
4689 2017-06-06 Yao Qi <yao.qi@linaro.org>
4690
4691 * regformats/regdef.h (set_register_cache): Remove the
4692 declaration.
4693
4694 2017-06-06 Alan Hayward <alan.hayward@arm.com>
4695
4696 * frame.c (frame_unwind_register_signed): Use
4697 frame_unwind_register_value.
4698
4699 2017-06-06 Pedro Alves <palves@redhat.com>
4700
4701 PR breakpoints/21553
4702 * breakpoint.c (create_breakpoints_sal_default)
4703 (init_breakpoint_sal, create_breakpoint_sal): Use
4704 gdb::unique_xmalloc_ptr for string parameters.
4705 (create_breakpoint): Constify 'extra_string' and 'cond_string'
4706 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
4707 (base_breakpoint_create_breakpoints_sal)
4708 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
4709 (strace_marker_create_breakpoints_sal)
4710 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
4711 string parameters.
4712 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
4713 gdb::unique_xmalloc_ptr for string parameters.
4714 (create_breakpoint): Constify 'extra_string' and 'cond_string'
4715 parameters.
4716
4717 2017-06-06 Alan Hayward <alan.hayward@arm.com>
4718
4719 * alpha-tdep.c (alpha_register_to_value): Use
4720 get_frame_register_value.
4721 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
4722
4723 2017-06-06 Alan Hayward <alan.hayward@arm.com>
4724
4725 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
4726 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
4727 (ia64_value_to_register): Likewise.
4728 (ia64_extract_return_value): Likewise.
4729 (ia64_store_return_value): Likewise.
4730 (ia64_push_dummy_call): Likewise.
4731
4732 2017-06-04 Joel Brobecker <brobecker@adacore.com>
4733
4734 GDB 8.0 released.
4735
4736 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
4737
4738 * x86-linux-nat.c (struct arch_lwp_info): Remove.
4739
4740 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
4741
4742 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
4743 parameter.
4744 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
4745
4746 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
4747
4748 * event-loop.c (poll_timers): Unallocate timer using delete
4749 instead of xfree.
4750
4751 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
4752
4753 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
4754 (struct breakpoint) <~breakpoint>: New.
4755 (struct watchpoint): Inherit from breakpoint.
4756 <~watchpoint>: New.
4757 <base>: Remove.
4758 (struct tracepoint): Inherit from breakpoint.
4759 <base>: Remove.
4760 * breakpoint.c (longjmp_breakpoint_ops): Remove.
4761 (struct longjmp_breakpoint): Inherit from breakpoint.
4762 <~longjmp_breakpoint>: New.
4763 <base>: Remove.
4764 (new_breakpoint_from_type): Remove casts.
4765 (watchpoint_in_thread_scope): Remove reference to base field.
4766 (watchpoint_del_at_next_stop): Likewise.
4767 (update_watchpoint): Likewise.
4768 (watchpoint_check): Likewise.
4769 (bpstat_check_watchpoint): Likewise.
4770 (set_longjmp_breakpoint): Likewise.
4771 (struct fork_catchpoint): Inherit from breakpoint.
4772 <base>: Remove.
4773 (struct solib_catchpoint): Inherit from breakpoint.
4774 <~solib_catchpoint>: New.
4775 <base>: Remove.
4776 (dtor_catch_solib): Change to ...
4777 (solib_catchpoint::~solib_catchpoint): ... this.
4778 (breakpoint_hit_catch_solib): Remove reference to base field.
4779 (add_solib_catchpoint): Likewise.
4780 (create_fork_vfork_event_catchpoint): Likewise.
4781 (struct exec_catchpoint): Inherit from breakpoint.
4782 <~exec_catchpoint>: New.
4783 <base>: Remove.
4784 (dtor_catch_exec): Change to ...
4785 (exec_catchpoint::~exec_catchpoint): ... this.
4786 (dtor_watchpoint): Change to ...
4787 (watchpoint::~watchpoint): ... this.
4788 (watch_command_1): Remove reference to base field.
4789 (catch_exec_command_1): Likewise.
4790 (base_breakpoint_dtor): Change to ...
4791 (breakpoint::~breakpoint): ... this.
4792 (base_breakpoint_ops): Remove dtor field value.
4793 (longjmp_bkpt_dtor): Change to ...
4794 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
4795 (strace_marker_create_breakpoints_sal): Remove reference to base
4796 field.
4797 (delete_breakpoint): Don't manually call breakpoint destructor.
4798 (create_tracepoint_from_upload): Remove reference to base field.
4799 (trace_pass_set_count): Likewise.
4800 (initialize_breakpoint_ops): Don't initialize
4801 momentary_breakpoint_ops, don't set dtors.
4802 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
4803 <~ada_catchpoint>: New.
4804 <base>: Remove.
4805 (create_excep_cond_exprs): Remove reference to base field.
4806 (dtor_exception): Change to ...
4807 (ada_catchpoint::~ada_catchpoint): ... this.
4808 (dtor_catch_exception): Remove.
4809 (dtor_catch_exception_unhandled): Remove.
4810 (dtor_catch_assert): Remove.
4811 (create_ada_exception_catchpoint): Remove reference to base
4812 field.
4813 (initialize_ada_catchpoint_ops): Don't set dtors.
4814 * break-catch-sig.c (struct signal_catchpoint): Inherit from
4815 breakpoint.
4816 <~signal_catchpoint>: New.
4817 <base>: Remove.
4818 (signal_catchpoint_dtor): Change to ...
4819 (signal_catchpoint::~signal_catchpoint): ... this.
4820 (create_signal_catchpoint): Remove reference to base field.
4821 (initialize_signal_catchpoint_ops): Don't set dtor.
4822 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
4823 from breakpoint.
4824 <~syscall_catchpoint>: New.
4825 <base>: Remove.
4826 (dtor_catch_syscall): Change to ...
4827 (syscall_catchpoint::~syscall_catchpoint): ... this.
4828 (create_syscall_event_catchpoint): Remove reference to base
4829 field.
4830 (initialize_syscall_catchpoint_ops): Don't set dtor.
4831 * break-catch-throw.c (struct exception_catchpoint): Inherit
4832 from breakpoint.
4833 <~exception_catchpoint>: New.
4834 <base>: Remove.
4835 (dtor_exception_catchpoint): Change to ...
4836 (exception_catchpoint::~exception_catchpoint): ... this.
4837 (handle_gnu_v3_exceptions): Remove reference to base field.
4838 (initialize_throw_catchpoint_ops): Don't set dtor.
4839 * ctf.c (ctf_get_traceframe_address): Remove reference to base
4840 field.
4841 * remote.c (remote_get_tracepoint_status): Likewise.
4842 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
4843 * tracefile.c (tracefile_fetch_registers): Likewise.
4844 * tracepoint.c (actions_command): Likewise.
4845 (validate_actionline): Likewise.
4846 (tfind_1): Likewise.
4847 (get_traceframe_location): Likewise.
4848 (find_matching_tracepoint_location): Likewise.
4849 (parse_tracepoint_status): Likewise.
4850 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
4851
4852 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
4853
4854 * breakpoint.c (struct longjmp_breakpoint): New struct.
4855 (is_tracepoint_type): Change return type to bool.
4856 (is_longjmp_type): New function.
4857 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
4858 (set_raw_breakpoint_without_location): Use
4859 new_breakpoint_from_type.
4860 (set_raw_breakpoint): Likewise.
4861
4862 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
4863
4864 * breakpoint.c (new_breakpoint_from_type): New function.
4865 (create_breakpoint_sal): Use new_breakpoint_from_type and
4866 unique_ptr.
4867 (create_breakpoint): Likewise.
4868
4869 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
4870
4871 * memattr.c (mem_info_command): Rename to ...
4872 (info_mem_command): ... this.
4873 (mem_enable_command): Rename to ...
4874 (enable_mem_command): ... this.
4875 (mem_disable_command): Rename to ...
4876 (disable_mem_command): ... this.
4877 (mem_delete_command): Rename to ...
4878 (delete_mem_command): ... this.
4879 (_initialize_mem): Adjust function names.
4880
4881 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
4882
4883 * btrace.c (handle_pt_insn_events): New.
4884 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
4885 STATUS. Split into this and ...
4886 (handle_pt_insn_event_flags): ... this.
4887
4888 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
4889
4890 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
4891 and struct pt_insn.resynced.
4892 * configure: Regenerated.
4893 * config.in: Regenerated.
4894
4895 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4896
4897 * btrace.c (ftrace_find_call_by_number): New function.
4898 (ftrace_new_function): Store objects, not pointers.
4899 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
4900 ftrace_new_gap, ftrace_update_function,
4901 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
4902 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
4903 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
4904 btrace_ends_with_single_insn, btrace_call_get): Account for
4905 btrace_thread_info::functions now storing objects.
4906 * btrace.h (struct btrace_thread_info): Add constructor.
4907 (struct btrace_thread_info) <functions>: Make std::vector.
4908 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
4909 Initialize with default values.
4910 * record-btrace.c (record_btrace_frame_sniffer): Account for
4911 btrace_thread_info::functions now storing objects.
4912
4913 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4914
4915 * btrace.c: Remove typedef bfun_s.
4916 (ftrace_new_gap): Directly add gaps to the list of gaps.
4917 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
4918 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
4919 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
4920 instead of gdb VEC.
4921
4922 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4923
4924 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
4925 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
4926 with btrace_thread_info::next_segment and
4927 btrace_thread_info::prev_segment.
4928 * btrace.h: Remove struct btrace_func_link.
4929 (struct btrace_function): Replace pair of function segment pointers
4930 with pair of indices.
4931 * python/py-record-btrace.c (btpy_call_prev_sibling,
4932 btpy_call_next_sibling): Replace references to
4933 btrace_thread_info::segment with btrace_thread_info::next_segment and
4934 btrace_thread_info::prev_segment.
4935 * record-btrace.c (record_btrace_frame_this_id): Use
4936 btrace_find_call_by_number.
4937
4938 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4939
4940 * btrace.c (ftrace_new_function, ftrace_fixup_level,
4941 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
4942 btrace_insn_next, btrace_insn_prev): Remove references to
4943 btrace_thread_info::flow.
4944 * btrace.h (struct btrace_function): Remove FLOW.
4945
4946 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4947
4948 * btrace.c (ftrace_find_call_by_number): New function.
4949 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
4950 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
4951 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
4952 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
4953 index.
4954 * btrace.h (struct btrace_function): Turn UP into an index.
4955 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
4956 as an index.
4957 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
4958 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
4959 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
4960
4961 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4962
4963 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
4964 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
4965 ftrace_update_function, ftrace_compute_global_level_offset,
4966 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
4967 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
4968 btrace_insn_end, btrace_is_empty): Remove references to
4969 btrace_thread_info::begin and btrace_thread_info::end.
4970 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
4971 (struct btrace_thread_info) <functions>: Adjust comment.
4972 * record-btrace.c (record_btrace_start_replaying): Remove reference to
4973 btrace_thread_info::begin.
4974
4975 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4976
4977 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
4978 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
4979 ftrace_update_function): Remove arguments that implicitly were always
4980 BTINFO->END.
4981 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
4982 Don't pass BTINFO->END.
4983
4984 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4985
4986 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
4987 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
4988 btrace_find_insn_by_number): Replace function segment pointer with
4989 index.
4990 (btrace_insn_cmp): Simplify.
4991 * btrace.h: (struct btrace_insn_iterator) Rename index to
4992 insn_index. Replace function segment pointer with index into function
4993 segment vector.
4994 * record-btrace.c (record_btrace_call_history): Replace function
4995 segment pointer use with index.
4996 (record_btrace_frame_sniffer): Retrieve function call segment through
4997 vector.
4998 (record_btrace_set_replay): Remove defunc't safety check.
4999
5000 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5001
5002 * btrace.c (btrace_ends_with_single_insn): New function.
5003 (btrace_call_get, btrace_call_number, btrace_call_begin,
5004 btrace_call_end, btrace_call_next, btrace_call_prev,
5005 btrace_find_call_by_number): Use index into call segment vector
5006 instead of pointer.
5007 (btrace_call_cmp): Simplify.
5008 * btrace.h (struct btrace_call_iterator): Replace function call segment
5009 pointer with index into vector.
5010 * record-btrace.c (record_btrace_call_history): Use index instead of
5011 pointer.
5012
5013 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5014
5015 * btrace.c (btrace_insn_begin, btrace_insn_end,
5016 btrace_find_insn_by_number): Add btinfo to iterator.
5017 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5018
5019 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5020
5021 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5022 and save pointers directly.
5023 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5024 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5025 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5026 changed signature of functions.
5027 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5028 (btrace_fetch): Remove code that adds btrace_function pointers to
5029 vector of btrace_functions.
5030 (btrace_clear): Simplify freeing vector of btrace_functions.
5031
5032 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5033
5034 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5035 Replace VEC_* with std::vector functions.
5036 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5037 (struct btrace_thread_info)<functions>: Change type to std::vector.
5038
5039 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5040
5041 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5042 "Removed targets and native configurations" up. Merge duplicate
5043 "New commands" sub-sections. Add "New options" sub-sections.
5044
5045 2017-05-26 Alan Hayward <alan.hayward@arm.com>
5046
5047 * defs.h (copy_integer_to_size): New declaration.
5048 * findvar.c (copy_integer_to_size): New function.
5049 (do_cint_test): New selftest function.
5050 (copy_integer_to_size_test): Likewise.
5051 (_initialize_findvar): Likewise.
5052 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5053 (mips_fbsd_collect_reg): Use raw_collect_integer.
5054 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5055 (mips64_fill_gregset): Use raw_collect_integer
5056 (mips64_fill_fpregset): Use raw_supply_integer.
5057 * regcache.c (regcache::raw_supply_integer): New function.
5058 (regcache::raw_collect_integer): Likewise.
5059 * regcache.h: (regcache::raw_supply_integer): New declaration.
5060 (regcache::raw_collect_integer): Likewise.
5061
5062 2017-05-24 Yao Qi <yao.qi@linaro.org>
5063
5064 * Makefile.in (SFILES): Add gdbarch-selftests.c.
5065 (COMMON_OBS): Add gdbarch-selftests.o.
5066 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5067 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5068 * gdbarch-selftests.c: New file.
5069 * regcache.h (regcache) <~regcache>: Mark it virtual if
5070 GDB_SELF_TEST.
5071 <raw_write>: Likewise.
5072
5073 2017-05-24 Yao Qi <yao.qi@linaro.org>
5074
5075 * regcache.c (current_regcache): Change it to
5076 regcache::current_regcache.
5077 (regcache_observer_target_changed): Update.
5078 (regcache_thread_ptid_changed): Make it a regcache static
5079 method.
5080 (regcache_thread_ptid_changed): Update.
5081 (class regcache_access): New.
5082 (current_regcache_test): Update.
5083 (_initialize_regcache): Update.
5084 * regcache.h: Include forward_list.
5085 (regcache): Declare regcache_thread_ptid_changed and declare
5086 registers_changed_ptid as friend.
5087
5088 2017-05-24 Yao Qi <yao.qi@linaro.org>
5089
5090 * i387-tdep.c (i387_register_to_value): Use register_size
5091 instead of TYPE_LENGTH.
5092 * m68k-tdep.c (m68k_register_to_value): Likewise.
5093
5094 2017-05-24 Yao Qi <yao.qi@linaro.org>
5095
5096 * i387-tdep.c (i387_convert_register_p): Return false if type
5097 code isn't TYPE_CODE_FLT.
5098
5099 2017-05-24 Yao Qi <yao.qi@linaro.org>
5100
5101 * alpha-tdep.c (alpha_convert_register_p): Return true if type
5102 length is 4.
5103 (alpha_register_to_value): Remove type length check.
5104 (alpha_value_to_register): Likewise.
5105
5106 2017-05-24 Yao Qi <yao.qi@linaro.org>
5107
5108 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5109 TYPE_CODE_FLT.
5110
5111 2017-05-24 Yao Qi <yao.qi@linaro.org>
5112
5113 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5114 TYPE_CODE_FLT or not.
5115
5116 2017-05-24 Yao Qi <yao.qi@linaro.org>
5117
5118 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5119 * avr-tdep.c (avr_gdbarch_init): Likewise.
5120 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5121 * cris-tdep.c (cris_gdbarch_init): Likewise.
5122 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5123 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5124 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5125 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5126 * mep-tdep.c (mep_gdbarch_init): Likewise.
5127 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5128 * mips-tdep.c (mips_gdbarch_init): Likewise.
5129 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5130 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5131 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5132 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5133 * v850-tdep.c (v850_gdbarch_init): Likewise.
5134
5135 2017-05-24 Yao Qi <yao.qi@linaro.org>
5136
5137 * selftest-arch.c (tests_with_arch): Call registers_changed
5138 and reinit_frame_cache.
5139 * selftest.c (run_self_tests): Likewise.
5140
5141 2017-05-24 Yao Qi <yao.qi@linaro.org>
5142
5143 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5144 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5145
5146 2017-05-24 Yao Qi <yao.qi@linaro.org>
5147
5148 * rl78-tdep.c (rl78_gdbarch_init): Don't call
5149 set_gdbarch_print_insn.
5150
5151 2017-05-24 Yao Qi <yao.qi@linaro.org>
5152
5153 * h8300-tdep.c (h8300_gdbarch_init): Don't call
5154 set_gdbarch_print_insn.
5155
5156 2017-05-24 Yao Qi <yao.qi@linaro.org>
5157
5158 * alpha-tdep.c (alpha_gdbarch_init): Don't call
5159 set_gdbarch_print_insn.
5160 * arc-tdep.c (arc_gdbarch_init): Likewise.
5161 * arch-utils.c: include dis-asm.h.
5162 (default_print_insn): New function.
5163 * arch-utils.h (default_print_insn): Declare.
5164 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5165 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5166 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5167 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5168 * frv-tdep.c (frv_gdbarch_init): Likewise.
5169 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5170 * gdbarch.sh (print_insn): Use default_print_insn.
5171 * gdbarch.c: Regenerated.
5172 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5173 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5174 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5175 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5176 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5177 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5178 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5179 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5180 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5181 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5182 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5183 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5184 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5185 * mt-tdep.c (mt_gdbarch_init): Likewise.
5186 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5187 * nios2-tdep.c (nios2_print_insn): Remove.
5188 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5189 * rx-tdep.c (rx_gdbarch_init): Likewise.
5190 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5191 * score-tdep.c (score_print_insn): Remove.
5192 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5193 * sh-tdep.c (sh_gdbarch_init): Likewise.
5194 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5195 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5196 * tic6x-tdep.c (tic6x_print_insn): Remove.
5197 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5198 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5199 * v850-tdep.c (v850_gdbarch_init): Likewise.
5200 * vax-tdep.c (vax_gdbarch_init): Likewise.
5201 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5202 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5203
5204 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5205
5206 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
5207 (MIPS_FP0_REGNUM): Remove.
5208 (MIPS_FSR_REGNUM): Remove.
5209 (mips_fbsd_supply_fpregs): Use mips_regnum.
5210 (mips_fbsd_supply_gregs): Likewise.
5211 (mips_fbsd_collect_fpregs): Likewise.
5212 (mips_fbsd_collect_gregs): Likewise.
5213
5214 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5215
5216 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
5217 (getpfpregs_supplies): New function.
5218 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
5219 getfpregs_supplies.
5220 (mips_fbsd_store_inferior_registers): Likewise.
5221
5222 2017-05-22 Pedro Alves <palves@redhat.com>
5223
5224 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
5225 maintainer.
5226
5227 2017-05-22 Alan Hayward <alan.hayward@arm.com>
5228
5229 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
5230 (store_register): Likewise.
5231 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
5232 (get_decimal_float_return_value): Likewise.
5233 (do_ppc_sysv_return_value): Likewise.
5234 (ppc64_sysv_abi_push_integer): Likewise.
5235 (ppc64_sysv_abi_push_freg): Likewise.
5236 (ppc64_sysv_abi_return_value_base): Likewise.
5237 (ppc64_sysv_abi_return_value): Likewise.
5238 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
5239 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
5240 * rs6000-nat.c: Likewise.
5241 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
5242 (rs6000_value_to_register): Likewise.
5243 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
5244
5245 2017-05-21 Tom Tromey <tom@tromey.com>
5246
5247 PR rust/21466:
5248 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
5249 arrays as "[T]", not "[T; ]".
5250
5251 2017-05-19 Tom Tromey <tom@tromey.com>
5252
5253 PR rust/21484:
5254 * rust-lang.c (exp_descriptor_rust): New function.
5255 (rust_language_defn): Use it.
5256 * p-lang.c (pascal_language_defn): Update.
5257 * opencl-lang.c (opencl_language_defn): Update.
5258 * objc-lang.c (objc_language_defn): Update.
5259 * m2-lang.c (m2_language_defn): Update.
5260 * language.h (struct language_defn)
5261 <la_watch_location_expression>: New member.
5262 * language.c (unknown_language_defn, auto_language_defn)
5263 (local_language_defn): Update.
5264 * go-lang.c (go_language_defn): Update.
5265 * f-lang.c (f_language_defn): Update.
5266 * d-lang.c (d_language_defn): Update.
5267 * c-lang.h (c_watch_location_expression): Declare.
5268 * c-lang.c (c_watch_location_expression): New function.
5269 (c_language_defn, cplus_language_defn, asm_language_defn)
5270 (minimal_language_defn): Use it.
5271 * breakpoint.c (watch_command_1): Call
5272 la_watch_location_expression.
5273 * ada-lang.c (ada_language_defn): Update.
5274
5275 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5276
5277 PR tui/21482
5278 * gdb_curses.h (NOMACROS): Define.
5279 (NCURSES_NOMACROS): Define.
5280
5281 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5282
5283 PR tui/21482
5284 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
5285 arg to char *.
5286 * tui/tui-wingeneral.c (box_win): Likewise.
5287 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
5288 (tui_show_source_line): Likewise.
5289 (tui_show_exec_info_content): Likewise.
5290
5291 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
5292
5293 * sparc-tdep.c (sparc_structure_return_p)
5294 (sparc_arg_on_registers_p): New functions.
5295 (sparc32_store_arguments): Use them.
5296 * sparc64-tdep.c (sparc64_16_byte_align_p)
5297 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
5298 Handle TYPE_CODE_ARRAY.
5299
5300 2017-05-17 Yao Qi <yao.qi@linaro.org>
5301
5302 * cli/cli-decode.c (add_alias_cmd): New function.
5303 * command.h (add_alias_cmd): Declare.
5304 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
5305 instead call add_alias_cmd.
5306
5307 2017-05-17 Pedro Alves <palves@redhat.com>
5308
5309 * Makefile.in (nat_extra_makefile_frag): Rename to ...
5310 (nat_makefile_frag): ... this. All references updated.
5311 * configure.ac: Likewise.
5312 * configure.nat: Likewise. Enhance comments.
5313 * configure: Regenerate.
5314
5315 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5316
5317 * procfs.c (procfs_create_inferior): Change prototype to match
5318 definition.
5319
5320 2017-05-13 Eli Zaretskii <eliz@gnu.org>
5321
5322 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
5323 C++ compiler warning.
5324
5325 2017-05-12 Tom Tromey <tom@tromey.com>
5326
5327 PR rust/21483:
5328 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
5329 recurse, just call value_struct_elt directly.
5330
5331 2017-05-12 Tom Tromey <tom@tromey.com>
5332
5333 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
5334 OP_RUST_ARRAY>: Fix.
5335
5336 2017-05-12 Tom Tromey <tom@tromey.com>
5337
5338 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
5339
5340 2017-05-09 Yao Qi <yao.qi@linaro.org>
5341
5342 * regcache.c: Include <forward_list>.
5343 (struct regcache_list): Remove.
5344 (current_regcache): Update.
5345 (get_thread_arch_aspace_regcache): Update for std::forward_list.
5346 (regcache_thread_ptid_changed): Likewise.
5347 (registers_changed_ptid): Likewise.
5348 (current_regcache_size): Likewise.
5349
5350 2017-05-09 Yao Qi <yao.qi@linaro.org>
5351
5352 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
5353 (current_regcache_size): New function.
5354 (current_regcache_test): New function.
5355 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
5356
5357 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5358
5359 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
5360 (print_gp_register_row): Use get_frame_register_value.
5361
5362 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5363
5364 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
5365 (mips_supply_fpregset): Likewise.
5366 (mips64_supply_gregset): Likewise.
5367
5368 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5369
5370 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
5371 regcache->raw_supply_zeroed.
5372
5373 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5374
5375 * configure.nat: Rearrange 'case' statements to match
5376 host before cpu.
5377
5378 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5379
5380 * Makefile.in: Remove "@host_makefile_frag@". Add variables
5381 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
5382 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
5383 "@nat_extra_makefile_frag@".
5384 (Makefile): Remove dependency on "@frags@".
5385 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
5386 (data-directory/Makefile): Likewise.
5387 * config/aarch64/linux.mh: Deleted; moved contents to
5388 "gdb/configure.nat".
5389 * config/alpha/alpha-linux.mh: Likewise.
5390 * config/alpha/nbsd.mh: Likewise.
5391 * config/arm/linux.mh: Likewise.
5392 * config/arm/nbsdelf.mh: Likewise.
5393 * config/i386/cygwin.mh: Likewise.
5394 * config/i386/cygwin64.mh: Likewise.
5395 * config/i386/darwin.mh: Likewise.
5396 * config/i386/fbsd.mh: Likewise.
5397 * config/i386/fbsd64.mh: Likewise.
5398 * config/i386/go32.mh: Likewise.
5399 * config/i386/i386gnu.mh: Likewise.
5400 * config/i386/i386sol2.mh: Likewise.
5401 * config/i386/linux.mh: Likewise.
5402 * config/i386/linux64.mh: Likewise.
5403 * config/i386/mingw.mh: Likewise.
5404 * config/i386/mingw64.mh: Likewise.
5405 * config/i386/nbsd64.mh: Likewise.
5406 * config/i386/nbsdelf.mh: Likewise.
5407 * config/i386/nto.mh: Likewise.
5408 * config/i386/obsd.mh: Likewise.
5409 * config/i386/obsd64.mh: Likewise.
5410 * config/i386/sol2-64.mh: Likewise.
5411 * config/ia64/linux.mh: Likewise.
5412 * config/m32r/linux.mh: Likewise.
5413 * config/m68k/linux.mh: Likewise.
5414 * config/m68k/nbsdelf.mh: Likewise.
5415 * config/m68k/obsd.mh: Likewise.
5416 * config/m88k/obsd.mh: Likewise.
5417 * config/mips/fbsd.mh: Likewise.
5418 * config/mips/linux.mh: Likewise.
5419 * config/mips/nbsd.mh: Likewise.
5420 * config/mips/obsd64.mh: Likewise.
5421 * config/pa/linux.mh: Likewise.
5422 * config/pa/nbsd.mh: Likewise.
5423 * config/pa/obsd.mh: Likewise.
5424 * config/powerpc/aix.mh: Likewise.
5425 * config/powerpc/fbsd.mh: Likewise.
5426 * config/powerpc/linux.mh: Likewise.
5427 * config/powerpc/nbsd.mh: Likewise.
5428 * config/powerpc/obsd.mh: Likewise.
5429 * config/powerpc/ppc64-linux.mh: Likewise.
5430 * config/powerpc/spu-linux.mh: Likewise.
5431 * config/s390/linux.mh: Likewise.
5432 * config/sh/nbsd.mh: Likewise.
5433 * config/sparc/fbsd.mh: Likewise.
5434 * config/sparc/linux.mh: Likewise.
5435 * config/sparc/linux64.mh: Likewise.
5436 * config/sparc/nbsd64.mh: Likewise.
5437 * config/sparc/nbsdelf.mh: Likewise.
5438 * config/sparc/obsd64.mh: Likewise.
5439 * config/sparc/sol2.mh: Likewise.
5440 * config/tilegx/linux.mh: Likewise.
5441 * config/vax/nbsdelf.mh: Likewise.
5442 * config/vax/obsd.mh: Likewise.
5443 * config/xtensa/linux.mh: Likewise.
5444 * config/i386/i386gnu.mn: New file, with excerpts from
5445 "config/i386/i386gnu.mh".
5446 * configure: Regenerate.
5447 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
5448 *.mh files under "gdb/config".
5449 * configure.nat: New file, with contents from the
5450 "gdb/config/*/*.mh" files.
5451
5452 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
5453
5454 * btrace.c (btrace_clear): Free insn vector.
5455
5456 2017-05-05 Pedro Alves <palves@redhat.com>
5457
5458 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
5459 * configure: Regenerate.
5460
5461 2017-05-04 Pedro Alves <palves@redhat.com>
5462
5463 * Makefile.in (SFILES): Add progspace-and-thread.c.
5464 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
5465 (COMMON_OBS): Add progspace-and-thread.o.
5466 * breakpoint.c: Include "progspace-and-thread.h".
5467 (update_inserted_breakpoint_locations)
5468 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
5469 Use scoped_restore_current_pspace_and_thread.
5470 (create_std_terminate_master_breakpoint): Use
5471 scoped_restore_current_program_space.
5472 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
5473 (print_breakpoint_location): Use
5474 scoped_restore_current_program_space.
5475 (bp_loc_is_permanent): Use
5476 scoped_restore_current_pspace_and_thread.
5477 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
5478 (download_tracepoint_locations): Use
5479 scoped_restore_current_pspace_and_thread.
5480 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
5481 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
5482 (enum step_over_calls_kind): Moved from inferior.h.
5483 (class scoped_restore_current_thread): New class.
5484 * gdbthread.h (make_cleanup_restore_current_thread): Delete
5485 declaration.
5486 (scoped_restore_current_thread): New class.
5487 * infcmd.c: Include "common/gdb_optional.h".
5488 (continue_1, proceed_after_attach): Use
5489 scoped_restore_current_thread.
5490 (notice_new_inferior): Use scoped_restore_current_thread.
5491 * inferior.c: Include "progspace-and-thread.h".
5492 (restore_inferior, save_current_inferior): Delete.
5493 (add_inferior_command, clone_inferior_command): Use
5494 scoped_restore_current_pspace_and_thread.
5495 * inferior.h (scoped_restore_current_inferior): New class.
5496 * infrun.c: Include "progspace-and-thread.h" and
5497 "common/gdb_optional.h".
5498 (follow_fork_inferior): Use
5499 scoped_restore_current_pspace_and_thread.
5500 (scoped_restore_exited_inferior): New class.
5501 (handle_vfork_child_exec_or_exit): Use
5502 scoped_restore_exited_inferior,
5503 scoped_restore_current_pspace_and_thread,
5504 scoped_restore_current_thread and scoped_restore.
5505 (fetch_inferior_event): Use scoped_restore_current_thread.
5506 * linespec.c (decode_line_full, decode_line_1): Use
5507 scoped_restore_current_program_space.
5508 * mi/mi-main.c: Include "progspace-and-thread.h".
5509 (exec_continue): Use scoped_restore_current_thread.
5510 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
5511 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
5512 * proc-service.c (ps_pglobal_lookup): Use
5513 scoped_restore_current_program_space.
5514 * progspace-and-thread.c: New file.
5515 * progspace-and-thread.h: New file.
5516 * progspace.c (release_program_space, clone_program_space): Use
5517 scoped_restore_current_program_space.
5518 (restore_program_space, save_current_program_space)
5519 (save_current_space_and_thread): Delete.
5520 (switch_to_program_space_and_thread): Moved to
5521 progspace-and-thread.c.
5522 * progspace.h (save_current_program_space)
5523 (save_current_space_and_thread): Delete declarations.
5524 (scoped_restore_current_program_space): New class.
5525 * remote.c (remote_btrace_maybe_reopen): Use
5526 scoped_restore_current_thread.
5527 * symtab.c: Include "progspace-and-thread.h".
5528 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
5529 * thread.c (print_thread_info_1): Use
5530 scoped_restore_current_thread.
5531 (struct current_thread_cleanup): Delete.
5532 (do_restore_current_thread_cleanup)
5533 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
5534 (scoped_restore_current_thread::~scoped_restore_current_thread):
5535 ... this new dtor.
5536 (make_cleanup_restore_current_thread): Rename/convert to ...
5537 (scoped_restore_current_thread::scoped_restore_current_thread):
5538 ... this new ctor.
5539 (thread_apply_all_command): Use scoped_restore_current_thread.
5540 (thread_apply_command): Use scoped_restore_current_thread.
5541 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
5542 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
5543
5544 2017-05-04 Pedro Alves <palves@redhat.com>
5545
5546 * thread.c (make_cleanup_restore_current_thread): Move
5547 find_thread_ptid call before the is_stopped call. Assert that the
5548 thread is found. Replace is_stopped call by checking the thread's
5549 state directly. Remove unnecessary NULL-thread check.
5550
5551 2017-05-04 Pedro Alves <palves@redhat.com>
5552
5553 * corelow.c (thread_section_name): New class.
5554 (get_core_register_section, get_core_siginfo): Use it.
5555
5556 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
5557
5558 * corelow.c (sniff_core_bfd): Remove extra semicolon.
5559 (get_core_register_section): Remove xfree of NULL pointer.
5560
5561 2017-05-03 Alan Hayward <alan.hayward@arm.com>
5562
5563 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
5564 * regcache.c (regcache::raw_supply_zeroed): New function.
5565 * regcache.h (regcache::raw_supply_zeroed): New declaration.
5566
5567 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
5568
5569 * gdbarch.sh: Remove commented out definition of
5570 TARGET_CHAR_BIT.
5571 * gdbarch.h: Re-generate.
5572
5573 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
5574
5575 * configure: Regenerate.
5576
5577 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
5578
5579 * solib-target.c (solib_target_relocate_section_addresses):
5580 Remove num_section_bases, num_bases, segment_bases variables.
5581
5582 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
5583
5584 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
5585
5586 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
5587
5588 * solib-target.c: Include <vector>
5589 (struct lm_info_target) <~lm_info_target>: Remove.
5590 <segment_bases, section_bases>: Change type to
5591 std::vector<CORE_ADDR>.
5592 (library_list_start_segment, library_list_start_section,
5593 library_list_end_library,
5594 solib_target_relocate_section_addresses): Adjust.
5595
5596 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
5597
5598 * gdbarch.sh (software_single_step): Change return type to
5599 std::vector<CORE_ADDR>.
5600 * gdbarch.c, gdbarch.h: Re-generate.
5601 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
5602 Adjust.
5603 (arm_deal_with_atomic_sequence_raw): Adjust.
5604 (thumb_get_next_pcs_raw): Adjust.
5605 (arm_get_next_pcs_raw): Adjust.
5606 (arm_get_next_pcs): Adjust.
5607 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
5608 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
5609 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
5610 (alpha_software_single_step): Adjust.
5611 * alpha-tdep.h (alpha_software_single_step): Adjust.
5612 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
5613 * arm-tdep.c (arm_software_single_step): Adjust.
5614 (arm_breakpoint_kind_from_current_state): Adjust.
5615 * arm-tdep.h (arm_software_single_step): Adjust.
5616 * breakpoint.c (insert_single_step_breakpoint): Adjust.
5617 * cris-tdep.c (cris_software_single_step): Adjust.
5618 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
5619 (micromips_deal_with_atomic_sequence): Adjust.
5620 (deal_with_atomic_sequence): Adjust.
5621 (mips_software_single_step): Adjust.
5622 * mips-tdep.h (mips_software_single_step): Adjust.
5623 * moxie-tdep.c (moxie_software_single_step): Adjust.
5624 * nios2-tdep.c (nios2_software_single_step): Adjust.
5625 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
5626 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
5627 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
5628 * s390-linux-tdep.c (s390_software_single_step): Adjust.
5629 * sparc-tdep.c (sparc_software_single_step): Adjust.
5630 * spu-tdep.c (spu_software_single_step): Adjust.
5631 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
5632
5633 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
5634
5635 * gdbarch.sh: Use semi-colon as field separator instead of colon.
5636 * gdbarch.h: Re-generate.
5637
5638 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
5639
5640 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
5641 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
5642 * python/py-instruction.c, python/py-instruction.h: New file.
5643 * python/py-record.c: Add py-instruction.h include.
5644 (gdbpy_initialize_record): Make gdb.Instruction a super class of
5645 gdb.RecordInstruction.
5646 * python/python-internal.h: Add gdbpy_initialize_instruction
5647 declaration.
5648 * python/python.c (do_start_initialization): Add
5649 gdbpy_initialize_instruction.
5650
5651 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
5652
5653 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
5654 Remove.
5655 (btrace_func_from_recpy_func): New function.
5656 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
5657 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
5658 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
5659 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
5660 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
5661 Also, use new helper functions.
5662 (btpy_list_item): Use new helper functions.
5663 (recpy_bt_function_call_history): Use new type name.
5664 (btpy_call_getset): Remove.
5665 (gdbpy_initialize_btrace): Remove code to initialize
5666 gdb.BtraceFunctionCall.
5667 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
5668 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
5669 recpy_bt_func_prev, recpy_bt_func_next): New export.
5670 * python/py-record.c (recpy_func_type): New static object.
5671 (recpy_func_new, recpy_func_level, recpy_func_symbol,
5672 recpy_func_instructions, recpy_func_up, recpy_func_prev,
5673 recpy_func_next): New function.
5674 (recpy_element_hash, recpy_element_richcompare): Updated comment.
5675 (recpy_func_getset): New static object.
5676 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
5677 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
5678
5679 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
5680
5681 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
5682 (btpy_object, btpy_insn_type, btpy_new): Remove.
5683 (btpy_list_object): Use gdb.RecordInstruction type instead of
5684 gdb.BtraceInstruction type.
5685 (btrace_insn_from_recpy_insn): New function.
5686 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
5687 btpy_new.
5688 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
5689 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
5690 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
5691 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
5692 instead of btpy_object.
5693 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
5694 btpy_insn_data, btpy_insn_decode): Rename to ...
5695 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
5696 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
5697 recpy_bt_insn_decode): This. Also, use new helper functions.
5698 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
5699 recpy_insn_type.
5700 (btpy_insn_getset): Remove.
5701 (gdbpy_initialize_btrace): Remove code to initialize
5702 gdb.BtraceInstruction. Use recpy_element_object.
5703 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
5704 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
5705 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
5706 * python/py-record.c (recpy_insn_type): New static object.
5707 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
5708 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
5709 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
5710 New function.
5711 (recpy_insn_getset): New static object.
5712 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
5713 * python/py-record.h (recpy_element_object): New typedef.
5714 (recpy_insn_type, recpy_insn_new): New export.
5715
5716 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
5717
5718 * py-record-btrace.c (btpy_insn_new): Removed.
5719 (btpy_insn_or_gap_new): New function.
5720 (btpy_insn_error): Removed.
5721 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
5722 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
5723 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
5724 btpy_insn_or_gap_new instead of btpy_insn_new.
5725 (btpy_insn_getset): Remove btpy_insn_error.
5726 * py-record.c (recpy_gap_type): New static object.
5727 (recpy_gap_object): New typedef.
5728 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
5729 recpy_gap_reason_string): New function.
5730 (recpy_gap_getset): New static object.
5731 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
5732 * py-record.h (recpy_gap_new): New export.
5733
5734 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
5735
5736 * python/py-record.c (recpy_ptid): Remove.
5737 (recpy_record_getset): Remove recpy_ptid.
5738
5739 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
5740
5741 * btrace.c (btrace_fetch): Set inferior_ptid.
5742 * python/py-record-btrace.c: Add "py-record.h" include.
5743 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
5744 recpy_bt_end, recpy_bt_instruction_history,
5745 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
5746 in gdb.Record object instead of current ptid.
5747 * python/py-record.c: Include new "py-record.h" file.
5748 (recpy_record_object): Moved to py-record.h.
5749 * python/py-record.h: New file.
5750
5751 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
5752
5753 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
5754 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
5755 indentation.
5756
5757 2017-05-01 Joel Brobecker <brobecker@adacore.com>
5758
5759 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
5760 the past maintainers section.
5761
5762 2017-04-28 Yao Qi <yao.qi@linaro.org>
5763
5764 * infcmd.c (get_return_value): Use regcache ctor, and remove
5765 cleanup.
5766
5767 2017-04-28 Yao Qi <yao.qi@linaro.org>
5768 Pedro Alves <palves@redhat.com>
5769
5770 * regcache.c (regcache::regcache): New tag dispatch ctor.
5771 (do_cooked_read): Moved above.
5772 (regcache_dup): Use the tag dispatch ctor..
5773 * regcache.h (regcache): Declare ctor, delete copy ctor and
5774 assignment operator, remove friend regcache_dup.
5775
5776 2017-04-28 Yao Qi <yao.qi@linaro.org>
5777
5778 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
5779 call method save instead of regcache_cpy.
5780 * regcache.h (struct regcache): Make regcache_dup a friend.
5781
5782 2017-04-28 Yao Qi <yao.qi@linaro.org>
5783
5784 * regcache.c (struct regcache): Move to regcache.h
5785 (regcache::arch): New method.
5786 (regcache_get_ptid): Update.
5787 (get_regcache_arch): Call arch method.
5788 (get_regcache_aspace): Call method aspace.
5789 (register_buffer): Change it to method.
5790 (regcache_save): Change it to regcache::save.
5791 (regcache_restore): Likewise.
5792 (regcache_cpy_no_passthrough): Remove the declaration.
5793 (regcache_cpy): Call methods restore and cpy_no_passthrough.
5794 (regcache_cpy_no_passthrough): Change it to method
5795 cpy_no_passthrough.
5796 (regcache_register_status): Change it to method
5797 get_register_status.
5798 (regcache_invalidate): Change it to method invalidate.
5799 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
5800 (regcache_raw_update): Change it to method raw_update.
5801 (regcache_raw_read): Likewise.
5802 (regcache_raw_read_signed): Likewise.
5803 (regcache_raw_read_unsigned): Likewise.
5804 (regcache_raw_write_signed): Likewise.
5805 (regcache_raw_write_unsigned): Likewise.
5806 (regcache_cooked_read): Likewise.
5807 (regcache_cooked_read_value): Likewise.
5808 (regcache_cooked_read_signed): Likewise.
5809 (regcache_cooked_read_unsigned): Likewise.
5810 (regcache_cooked_write_signed): Likewise.
5811 (regcache_cooked_write_unsigned): Likewise.
5812 (regcache_raw_set_cached_value): Likewise.
5813 (regcache_raw_write): Likewise.
5814 (regcache_cooked_write): Likewise.
5815 (regcache_xfer_part): Likewise.
5816 (regcache_raw_read_part): Likewise.
5817 (regcache_raw_write_part): Likewise.
5818 (regcache_cooked_read_part): Likewise.
5819 (regcache_cooked_write_part): Likewise.
5820 (regcache_raw_supply): Likewise.
5821 (regcache_raw_collect): Likewise.
5822 (regcache_transfer_regset): Likewise.
5823 (regcache_supply_regset): Likewise.
5824 (regcache_collect_regset): Likewise.
5825 (regcache_debug_print_register): Likewise.
5826 (enum regcache_dump_what): Move it to regcache.h.
5827 (regcache_dump): Change it to method dump.
5828 * regcache.h (enum regcache_dump_what): New.
5829 (class regcache): New.
5830 * target.c (target_fetch_registers): Call method
5831 debug_print_register.
5832 (target_store_registers): Likewise.
5833
5834 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5835
5836 * windows-nat.c (struct lm_info_windows): Initialize field.
5837 (windows_make_so): Allocate lm_info_windows with new.
5838 (windows_free_so): Free lm_info_windows with delete.
5839
5840 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5841
5842 * solib-darwin.c (struct lm_info_darwin): Initialize field.
5843 (darwin_current_sos): Allocate lm_info_darwin with new, remove
5844 cleanup.
5845 (darwin_free_so): Free lm_info_darwin with delete.
5846
5847 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5848
5849 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
5850 <l_addr_p>: Change type to bool.
5851 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
5852 (svr4_free_so): Free lm_info_svr4 with delete.
5853 (svr4_copy_library_list): Replace memcpy with call to copy
5854 constructor.
5855 (library_list_start_library, svr4_default_sos): Allocate
5856 lm_info_svr4 with new.
5857
5858 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5859
5860 * solib-target.c (struct lm_info_target): Add destructor,
5861 initialize fields.
5862 <name>: Change type to std::string.
5863 (library_list_start_library): Allocate lm_info_target with new.
5864 (solib_target_free_library_list): Free lm_info_target with
5865 delete.
5866 (solib_target_current_sos): Adapt to std::string.
5867 (solib_target_free_so): Free lm_info_target with delete.
5868
5869 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5870
5871 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
5872 fields.
5873 (frv_current_sos): Allocate lm_info_frv with new.
5874 (frv_relocate_main_executable): Free lm_info_frv with delete,
5875 allocate with new.
5876 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
5877
5878 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5879
5880 * solib-frv.c (struct lm_info_frv): Fix indentation.
5881
5882 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5883
5884 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
5885 map field.
5886 (dsbt_current_sos): Allocate lm_info_dsbt with new.
5887 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
5888 and allocate with new.
5889 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
5890
5891 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5892
5893 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
5894 <filename, member_name>: Change type to std::string.
5895 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
5896 (library_list_start_library): Allocate lm_info_aix with new.
5897 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
5898 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
5899 with copy constructor.
5900
5901 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5902
5903 * solist.h (struct lm_info): Remove.
5904 (struct lm_info_base): New class.
5905 (struct so_list) <lm_info>: Change type to lm_info_base *.
5906 * nto-tdep.c (struct lm_info): Remove.
5907 (lm_addr): Adjust.
5908 * solib-aix.c (struct lm_info): Rename to ...
5909 (struct lm_info_aix): ... this. Extend lm_info_base.
5910 (lm_info_p): Rename to ...
5911 (lm_info_aix_p): ... this, and adjust.
5912 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
5913 solib_aix_parse_libraries, library_list_start_library,
5914 solib_aix_free_library_list, solib_aix_parse_libraries,
5915 solib_aix_get_library_list,
5916 solib_aix_relocate_section_addresses, solib_aix_free_so,
5917 solib_aix_get_section_offsets,
5918 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
5919 Adjust.
5920 (struct solib_aix_inferior_data) <library_list>: Adjust.
5921 * solib-darwin.c (struct lm_info): Rename to ...
5922 (struct lm_info_darwin): ... this. Extend lm_info_base.
5923 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
5924 * solib-dsbt.c (struct lm_info): Rename to ...
5925 (struct lm_info_dsbt): ... this. Extend lm_info_base.
5926 (struct dsbt_info) <main_executable_lm_info): Adjust.
5927 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
5928 dsbt_relocate_section_addresses): Adjust.
5929 * solib-frv.c (struct lm_info): Rename to ...
5930 (struct lm_info_frv): ... this. Extend lm_info_base.
5931 (main_executable_lm_info): Adjust.
5932 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
5933 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
5934 find_canonical_descriptor_in_load_object,
5935 frv_fdpic_find_canonical_descriptor): Adjust.
5936 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
5937 to lm_info_svr4.
5938 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
5939 svr4_clear_so, svr4_copy_library_list,
5940 library_list_start_library, svr4_default_sos, svr4_read_so_list,
5941 svr4_current_sos, svr4_fetch_objfile_link_map,
5942 solist_update_incremental): Adjust.
5943 * solib-svr4.h (struct lm_info_svr4): Move here from
5944 solib-svr4.c.
5945 * solib-target.c (struct lm_info): Rename to ...
5946 (struct lm_info_target): ... this. Extend lm_info_base.
5947 (lm_info_p): Rename to ...
5948 (lm_info_target_p): ... this.
5949 (solib_target_parse_libraries, library_list_start_segment,
5950 library_list_start_section, library_list_start_library,
5951 library_list_end_library, solib_target_free_library_list,
5952 solib_target_current_sos, solib_target_free_so,
5953 solib_target_relocate_section_addresses): Adjust.
5954 * windows-nat.c (struct lm_info): Rename to ...
5955 (struct lm_info_windows): ... this. Extend lm_info_base.
5956 (windows_make_so, handle_load_dll, handle_unload_dll,
5957 windows_xfer_shared_libraries): Adjust.
5958
5959 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5960
5961 * solib-darwin.c (struct darwin_so_list): Remove.
5962 (darwin_current_sos): Allocate an so_list object instead of a
5963 darwin_so_list, separately allocate an lm_info object.
5964 (darwin_free_so): Free lm_info.
5965
5966 2017-04-28 John Baldwin <jhb@FreeBSD.org>
5967
5968 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
5969 with fprintf_filtered.
5970
5971 2017-04-28 Yao Qi <yao.qi@linaro.org>
5972
5973 * regcache.c (regcache::regcache): New function.
5974 (regcache::~regcache): New function.
5975 (regcache_xmalloc_1): Remove.
5976 (regcache_xmalloc): Call new regcache.
5977 (regcache_xfree): Call delete regcache.
5978 (get_thread_arch_aspace_regcache): Call new regcache.
5979
5980 2017-04-28 Yao Qi <yao.qi@linaro.org>
5981
5982 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
5983 lwp instead of ptid_get_lwp.
5984
5985 2017-04-28 Yao Qi <yao.qi@linaro.org>
5986
5987 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
5988 lwp_info instead of getting from inferior_ptid.
5989
5990 2017-04-27 Keith Seitz <keiths@redhat.com>
5991
5992 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
5993 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
5994 (CV_CONVERSION_BADNESS): Define.
5995 (rank_one_type): Remove overly restrictive rvalue reference
5996 rank checks.
5997 Add cv-qualifier checks and subranks for type equality.
5998 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
5999 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6000 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6001
6002 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6003
6004 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6005 count when creating the object.
6006
6007 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6008 Ulrich Weigand <uweigand@de.ibm.com>
6009
6010 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6011 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6012 is used in AIX.
6013 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6014 (process_xcoff_symbol): Likewise.
6015 (scan_xcoff_symtab): Likewise.
6016
6017 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6018
6019 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6020 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6021 (ia64_access_reg): Use get_frame_register_unsigned.
6022 (ia64_access_rse_reg): Likewise.
6023 (ia64_libunwind_frame_prev_register): Likewise.
6024
6025 2017-04-26 Jiong Wang <jiong.wang@arm.com>
6026
6027 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6028 * gdbarch.c: Regenerated.
6029 * gdbarch.h: Regenerated.
6030 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6031 visibility external.
6032 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6033 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6034 (enum cfa_how_kind): Move to ...
6035 (struct dwarf2_frame_state_reg_info): Likewise.
6036 (struct dwarf2_frame_state): Likewise.
6037 * dwarf2-frame.h: ... here.
6038 (dwarf2_frame_state_alloc_regs): New declaration.
6039 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6040 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6041
6042 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6043
6044 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6045 regcache_raw_read_unsigned.
6046 (xtensa_pseudo_register_write): Likewise.
6047
6048 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6049
6050 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6051 (nds32_pseudo_register_write): Likewise.
6052
6053 2017-04-25 Yao Qi <yao.qi@linaro.org>
6054
6055 * regcache.c (struct regcache) <readonly_p>: Change its type
6056 to bool.
6057 (regcache_xmalloc_1): Update parameter type and callers update.
6058
6059 2017-04-25 Yao Qi <yao.qi@linaro.org>
6060
6061 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6062 set_gdbarch_wchar_bit.
6063 * arm-tdep.c (arm_gdbarch_init): Likewise.
6064
6065 2017-04-25 Pedro Alves <palves@redhat.com>
6066
6067 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6068 (BothAreRelocatable, memcopy, memmove): Don't define.
6069 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6070 macros.
6071
6072 2017-04-25 Pedro Alves <palves@redhat.com>
6073
6074 * common/common-defs.h: Include "common/poison.h".
6075 * common/function-view.h: (Not, Or, Requires): Move to traits.h
6076 and adjust.
6077 * common/poison.h: New file.
6078 * common/traits.h: Include <type_traits>.
6079 (Not, Or, Requires): New, moved from common/function-view.h.
6080
6081 2017-04-25 Pedro Alves <palves@redhat.com>
6082
6083 * breakpoint.h (struct breakpoint): In-class initialize all
6084 fields. Make boolean fields "bool".
6085 * breakpoint.c (init_raw_breakpoint_without_location): Remove
6086 memset call and initializations no longer necessary.
6087
6088 2017-04-25 Pedro Alves <palves@redhat.com>
6089
6090 * btrace.c (pt_btrace_insn_flags): Change parameter type to
6091 reference.
6092 (pt_btrace_insn): New function.
6093 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6094
6095 2017-04-25 Pedro Alves <palves@redhat.com>
6096
6097 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
6098 "base" field and inherit from "bp_location" instead. Add
6099 non-default ctor.
6100 (allocate_location_exception): Use new non-default ctor.
6101 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6102 (init_bp_location): Convert to ...
6103 (bp_location::bp_location): ... this new ctor, and remove memset
6104 call.
6105 (base_breakpoint_allocate_location): Use the new non-default ctor.
6106 * breakpoint.h (bp_location): Now a class. Declare default and
6107 non-default ctors. In-class initialize all members.
6108 (init_bp_location): Remove declaration.
6109
6110 2017-04-25 Pedro Alves <palves@redhat.com>
6111
6112 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6113 assignment operator.
6114
6115 2017-04-24 Yao Qi <yao.qi@linaro.org>
6116
6117 * doublest.c (convert_doublest_to_floatformat): Call
6118 floatformat_totalsize_bytes.
6119
6120 2017-04-22 Tom Tromey <tom@tromey.com>
6121
6122 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6123 ui_out_emit_list.
6124 * stack.c (print_frame): Use ui_out_emit_list.
6125 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6126 ui_out_emit_list.
6127 * mi/mi-main.c (print_one_inferior)
6128 (mi_cmd_data_list_register_names)
6129 (mi_cmd_data_list_register_values, mi_cmd_list_features)
6130 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6131 ui_out_emit_list.
6132 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6133 (mi_output_solib_attribs): Use ui_out_emit_list,
6134 ui_out_emit_tuple.
6135 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6136 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6137 (mi_cmd_stack_list_args, list_args_or_locals): Use
6138 ui_out_emit_list.
6139 * disasm.c (do_assembly_only): Use ui_out_emit_list.
6140 * breakpoint.c (print_solib_event, output_thread_groups): Use
6141 ui_out_emit_list.
6142
6143 2017-04-22 Tom Tromey <tom@tromey.com>
6144
6145 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6146 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6147 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6148
6149 2017-04-22 Tom Tromey <tom@tromey.com>
6150
6151 * tracepoint.c (tvariables_info_1)
6152 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6153
6154 2017-04-22 Tom Tromey <tom@tromey.com>
6155
6156 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6157 annotate_arg_emitter.
6158 * breakpoint.c (print_mention_watchpoint)
6159 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6160 * annotate.h (struct annotate_arg_emitter): New.
6161
6162 2017-04-22 Tom Tromey <tom@tromey.com>
6163
6164 * record-btrace.c (record_btrace_insn_history)
6165 (record_btrace_insn_history_range, record_btrace_call_history)
6166 (record_btrace_call_history_range): Use ui_out_emit_tuple.
6167 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6168 ui_out_emit_tuple.
6169 * stack.c (print_frame_info): Use ui_out_emit_tuple.
6170 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6171 * skip.c (skip_info): Use ui_out_emit_tuple.
6172 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6173 * progspace.c (print_program_space): Use ui_out_emit_tuple.
6174 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6175 * osdata.c (info_osdata): Use ui_out_emit_tuple.
6176 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6177 ui_out_emit_tuple.
6178 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6179 (output_register, mi_cmd_data_read_memory)
6180 (mi_cmd_data_read_memory_bytes, mi_load_progress)
6181 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6182 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6183 Use ui_out_emit_tuple.
6184 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6185 ui_out_emit_tuple.
6186 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6187 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6188 * linux-thread-db.c (info_auto_load_libthread_db): Use
6189 ui_out_emit_tuple.
6190 * inferior.c (print_inferior): Use ui_out_emit_tuple.
6191 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6192 * disasm.c (do_mixed_source_and_assembly_deprecated)
6193 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6194 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6195 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6196 * breakpoint.c (print_one_breakpoint_location)
6197 (print_one_breakpoint): Use ui_out_emit_tuple.
6198 * auto-load.c (print_script, info_auto_load_cmd): Use
6199 ui_out_emit_tuple.
6200 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6201
6202 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
6203
6204 * thread.c (print_thread_info_1): Remove dead code.
6205
6206 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6207
6208 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
6209 GDB_SELF_TEST.
6210 * arm-tdep.c (selftests::arm_record_test): Likewise.
6211
6212 2017-04-21 Yao Qi <yao.qi@linaro.org>
6213
6214 * regcache.c (regcache_restore): Remove argument 2. Replace
6215 argument 3 with regcache. Get register status from
6216 src->register_status and get register contents from
6217 register_buffer (src, regnum).
6218 (regcache_cpy): Update.
6219
6220 2017-04-19 Pedro Alves <palves@redhat.com>
6221
6222 * gdbthread.h (thread): Add missing closing parenthesis in
6223 comment.
6224
6225 2017-04-19 Pedro Alves <palves@redhat.com>
6226
6227 * common/refcounted-object.h: New file.
6228 * gdbthread.h: Include "common/refcounted-object.h".
6229 (thread_info): Inherit from refcounted_object and add comments.
6230 (thread_info::incref, thread_info::decref)
6231 (thread_info::m_refcount): Delete.
6232 (thread_info::deletable): Use the refcounted_object::refcount()
6233 method.
6234 * inferior.c (current_inferior_): Add comment.
6235 (set_current_inferior): Increment/decrement refcounts.
6236 (prune_inferiors, remove_inferior_command): Skip inferiors marked
6237 not-deletable instead of comparing with the current inferior.
6238 (initialize_inferiors): Increment the initial inferior's refcount.
6239 * inferior.h (struct inferior): Forward declare.
6240 Include "common/refcounted-object.h".
6241 (current_inferior, set_current_inferior): Move declaration to
6242 before struct inferior's definition, and fix comment.
6243 (inferior): Inherit from refcounted_object. Add comments.
6244 * thread.c (switch_to_thread_no_regs): Reference the thread's
6245 inferior pointer directly instead of doing a ptid lookup.
6246 (switch_to_no_thread): New function.
6247 (switch_to_thread(thread_info *)): New function, factored out
6248 from ...
6249 (switch_to_thread(ptid_t)): ... this.
6250 (restore_current_thread): Delete.
6251 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
6252 fields, and add 'inf' field.
6253 (do_restore_current_thread_cleanup): Check whether old->inf is
6254 alive instead of looking up an inferior by ptid. Use
6255 switch_to_thread and switch_to_no_thread.
6256 (restore_current_thread_cleanup_dtor): Use old->inf directly
6257 instead of lookup up an inferior by id. Decref the inferior.
6258 Don't restore 'removable'.
6259 (make_cleanup_restore_current_thread): Same the inferior pointer
6260 in old, instead of the inferior number. Incref the inferior.
6261 Don't save/clear 'removable'.
6262
6263 2017-04-19 Pedro Alves <palves@redhat.com>
6264
6265 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6266 unittests/scoped_restore-selftests.c.
6267 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
6268 * common/scoped_restore.h (scoped_restore_base): Make "class".
6269 (scoped_restore_base::release): New public method.
6270 (scoped_restore_base::scoped_restore_base): New protected ctor.
6271 (scoped_restore_base::m_saved_var): New protected field.
6272 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
6273 scoped_restore_base base class instead of m_saved_var directly.
6274 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
6275 (scoped_restore_tmpl::scoped_restore_tmpl(const
6276 scoped_restore_tmpl<T>&)): Likewise.
6277 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
6278 method.
6279 (scoped_restore_tmpl::saved_var): New method.
6280 (scoped_restore_tmpl::m_saved_var): Delete.
6281 * inferior.h (inferior::detaching): Now a bool.
6282 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
6283 cleanup.
6284 * unittests/scoped_restore-selftests.c: New file.
6285
6286 2017-04-19 Pedro Alves <palves@redhat.com>
6287
6288 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
6289 Re-sort in alphabetic order.
6290
6291 2017-04-18 Pedro Alves <palves@redhat.com>
6292
6293 * xml-support.c (obstack_xml_printf): Delete.
6294 * xml-support.h (obstack_xml_printf): Delete.
6295
6296 2017-04-18 Pedro Alves <palves@redhat.com>
6297
6298 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
6299 vdebug, verror, body_text, start_element, end_element, name,
6300 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
6301 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
6302 is_xinclude>: Make private and add m_ prefix.
6303 (gdb_xml_parser::body_text): New method, based on ...
6304 (gdb_xml_body_text): ... this. Adjust.
6305 (gdb_xml_parser::vdebug): New method, based on ...
6306 (gdb_xml_debug): ... this. Adjust.
6307 (gdb_xml_parser::verror): New method, based on ...
6308 (gdb_xml_error): ... this. Adjust.
6309 (gdb_xml_parser::start_element): New method, based on ...
6310 (gdb_xml_start_element): ... this. Adjust.
6311 (gdb_xml_start_element_wrapper): Defer to
6312 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
6313 (gdb_xml_parser::end_element): New method, based on ...
6314 (gdb_xml_end_element_wrapper): ... this. Adjust.
6315 (gdb_xml_parser::~gdb_xml_parser): Adjust.
6316 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
6317 (gdb_xml_parser::use_dtd): New method, based on ...
6318 (gdb_xml_use_dtd): ... this. Adjust.
6319 (gdb_xml_parser::parse): New method, based on ...
6320 (gdb_xml_parse): ... this. Adjust.
6321 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
6322 (xinclude_start_include): Adjust to call the parser's name method.
6323 (xml_xinclude_default, xml_xinclude_start_doctype)
6324 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
6325 method.
6326 (xml_process_xincludes): Adjust to call parser methods.
6327 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
6328 declarations.
6329
6330 2017-04-18 Pedro Alves <palves@redhat.com>
6331
6332 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
6333 gdb::optional<std::string>.
6334 * xml-support.c: Include <string>.
6335 (scope_level::scope_level(scope_level &&))
6336 (scope_level::~scope_level): Delete.
6337 (scope_level::body): Now a std::string.
6338 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
6339 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
6340 parameter.
6341 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
6342 (xinclude_parsing_data::output): Now a std::string reference.
6343 (xinclude_start_include): Adjust.
6344 (xml_xinclude_default): Adjust.
6345 (xml_process_xincludes): Add 'output' parameter, and return bool.
6346 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
6347 and return bool.
6348 * xml-tdesc.c: Include <unordered_map> and <string>.
6349 (tdesc_xml_cache): Delete.
6350 (tdesc_xml_cache_s): Delete.
6351 (xml_cache): Now an std::unordered_map.
6352 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
6353 (target_fetch_description_xml): Change return type to
6354 gdb::optional<std::string>, and adjust.
6355 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
6356 (target_fetch_description_xml): Change return type to
6357 gdb::optional<std::string>.
6358
6359 2017-04-18 Pedro Alves <palves@redhat.com>
6360
6361 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6362 unittests/optional-selftests.c.
6363 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
6364 * unittests/optional-selftests.c: New file.
6365 * unittests/optional/assignment/1.cc: New file.
6366 * unittests/optional/assignment/2.cc: New file.
6367 * unittests/optional/assignment/3.cc: New file.
6368 * unittests/optional/assignment/4.cc: New file.
6369 * unittests/optional/assignment/5.cc: New file.
6370 * unittests/optional/assignment/6.cc: New file.
6371 * unittests/optional/assignment/7.cc: New file.
6372 * unittests/optional/cons/copy.cc: New file.
6373 * unittests/optional/cons/default.cc: New file.
6374 * unittests/optional/cons/move.cc: New file.
6375 * unittests/optional/cons/value.cc: New file.
6376 * unittests/optional/in_place.cc: New file.
6377 * unittests/optional/observers/1.cc: New file.
6378 * unittests/optional/observers/2.cc: New file.
6379
6380 2017-04-18 Pedro Alves <palves@redhat.com>
6381
6382 * common/gdb_optional.h: Include common/traits.h.
6383 (in_place_t): New type.
6384 (in_place): New constexpr variable.
6385 (optional::optional): Remove member initialization of
6386 m_instantiated.
6387 (optional::optional(in_place_t...)): New constructor.
6388 (optional::~optional): Use reset.
6389 (optional::optional(const optional&)): New.
6390 (optional::optional(const optional&&)): New.
6391 (optional::optional(T &)): New.
6392 (optional::optional(T &&)): New.
6393 (operator::operator=(const optional &)): New.
6394 (operator::operator=(optional &&)): New.
6395 (operator::operator= (const T &))
6396 (operator::operator= (T &&))
6397 (operator::emplace (Args &&... args)): Return a T&. Use reset.
6398 (operator::reset): New.
6399 (operator::m_instantiated):: Add in-class initializer.
6400 * common/traits.h: Include <type_traits>.
6401 (struct And): New types.
6402
6403 2017-04-18 Pedro Alves <palves@redhat.com>
6404
6405 * xml-support.c: Include <vector>.
6406 (scope_level::scope_level(const gdb_xml_element *))
6407 (scope_level::scope_level(scope_level&&)): New.
6408 (scope_level::~scope_level): New.
6409 (scope_level_s): Delete.
6410 (gdb_xml_parser::scopes): Now a std::vector.
6411 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
6412 Use std::vector.
6413 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
6414 scope cleanup code.
6415 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
6416 of the scopes member. Use std::vector::emplace_back.
6417
6418 2017-04-18 Pedro Alves <palves@redhat.com>
6419
6420 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
6421 a bool.
6422 (gdb_xml_end_element): Change type of first parameter.
6423 (gdb_xml_cleanup): Rename to ...
6424 (gdb_xml_parser::~gdb_xml_parser): ... this.
6425 (gdb_xml_create_parser_and_cleanup): Delete with ...
6426 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
6427 to this new ctor.
6428 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
6429 using gdb_xml_create_parser_and_cleanup.
6430 (xinclude_parsing_data): Add ctor/dtor.
6431 (xml_xinclude_cleanup): Delete.
6432 (xml_process_xincludes): Create a local xinclude_parsing_data
6433 instead of heap-allocating one. Create a local gdb_xml_parser
6434 instead of heap-allocating one with
6435 gdb_xml_create_parser_and_cleanup.
6436
6437 2017-04-18 John Baldwin <jhb@FreeBSD.org>
6438
6439 PR threads/20743
6440 * fbsd-nat.c (resume_one_thread_cb): Remove.
6441 (resume_all_threads_cb): Remove.
6442 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
6443 iterate_over_threads.
6444
6445 2017-04-17 Joel Brobecker <brobecker@adacore.com>
6446
6447 * NEWS: Create a new section for the next release branch.
6448 Rename the section of the current branch, now that it has
6449 been cut.
6450
6451 2017-04-17 Joel Brobecker <brobecker@adacore.com>
6452
6453 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
6454 * version.in: Bump version to 8.0.50.DATE-git.
6455
6456 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
6457
6458 PR gdb/21385
6459 * windows-nat.c (windows_create_inferior): Declare 'allargs'
6460 independently of the host, and fix build breakage on Cygwin.
6461
6462 2017-04-13 Pedro Alves <palves@redhat.com>
6463
6464 * inferior.c (free_inferior): Convert to ...
6465 (inferior::~inferior): ... this dtor.
6466 (inferior::inferior): New ctor, factored out from ...
6467 (add_inferior_silent): ... here. Allocate the inferior with a new
6468 expression.
6469 (delete_inferior): Call delete instead of free_inferior.
6470 * inferior.h (gdb_environ, continuation): Forward declare.
6471 (inferior): Now a class. Add in-class initialization to all
6472 members. Make boolean fields bool, except 'detaching'.
6473 (inferior::inferior): New explicit ctor.
6474 (inferior::~inferior): New.
6475
6476 2017-04-13 Pedro Alves <palves@redhat.com>
6477
6478 * inferior.c (init_inferior_list): Delete.
6479 * inferior.h (init_inferior_list): Delete.
6480
6481 2017-04-13 Pedro Alves <palves@redhat.com>
6482
6483 PR threads/13217
6484 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
6485 (top level): Call it twice, with different thread sets.
6486
6487 2017-04-13 Pedro Alves <palves@redhat.com>
6488
6489 * thread.c: Include <algorithm>.
6490 (thread_array_cleanup): Delete.
6491 (scoped_inc_dec_ref): New class.
6492 (live_threads_count): New function.
6493 (set_thread_refcount): Delete.
6494 (tp_array_compar_ascending): Now a bool.
6495 (tp_array_compar): Convert to a std::sort comparison function.
6496 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
6497 and live_threads_count.
6498
6499 2017-04-13 Pedro Alves <palves@redhat.com>
6500
6501 * infrun.c (follow_fork_inferior): Also switch the current
6502 inferior.
6503
6504 2017-04-13 Pedro Alves <palves@redhat.com>
6505
6506 * breakpoint.c (watch_command_1): Save watchpoint-frame info
6507 before calling create_internal_breakpoint.
6508
6509 2017-04-13 Pedro Alves <palves@redhat.com>
6510
6511 * fork-child.c (execv_argv): New class.
6512 (breakup_args): Refactored as ...
6513 (execv_argv::init_for_no_shell): .. this method of execv_argv.
6514 Copy arguments to storage and replace separators with NULL
6515 terminators in place.
6516 (escape_bang_in_quoted_argument): Adjust to return bool.
6517 (execv_argv::execv_argv): New ctor.
6518 (execv_argv::init_for_shell): New method, factored out from
6519 fork_inferior. Don't strdup strings into the vector.
6520 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
6521 Remove free_vector_argv call.
6522
6523 2017-04-13 Yao Qi <yao.qi@linaro.org>
6524
6525 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
6526 tdep->rx_psw_type.
6527
6528 2017-04-13 Yao Qi <yao.qi@linaro.org>
6529
6530 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
6531 * rx-tdep.c (rx_gdbarch_init): Likewise.
6532
6533 2017-04-13 Pedro Alves <palves@redhat.com>
6534
6535 * breakpoint.h (struct breakpoint): Reindent.
6536
6537 2017-04-13 Pedro Alves <palves@redhat.com>
6538
6539 * breakpoint.c (bp_location): Rename to ...
6540 (bp_locations): ... this. All references updated.
6541 (bp_location_count): Rename to ...
6542 (bp_locations_count): ... this. All references updated.
6543 (bp_location_placed_address_before_address_max): Rename to ...
6544 (bp_locations_placed_address_before_address_max): ... this. All
6545 references updated.
6546 (bp_location_shadow_len_after_address_max): Rename to ...
6547 (bp_locations_shadow_len_after_address_max): ... this. All
6548 references updated.
6549 (bp_location_compare_addrs): Rename to ...
6550 (bp_locations_compare_addrs): ... this. All references updated.
6551 (bp_location_compare):Rename to ...
6552 (bp_locations_compare): ... this. All references updated.
6553 (bp_location_target_extensions_update): Rename to ...
6554 (bp_locations_target_extensions_update): ... this. All references
6555 updated.
6556
6557 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6558
6559 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
6560 * common/common.m4: Check headers 'termios.h', 'termio.h' and
6561 'sgtty.h'.
6562 * common/gdb_termios.h: New file, with parts of "terminal.h".
6563 * inflow.c: Include "gdb_termios.h".
6564 * ser-unix.c: Include "gdb_termios.h".
6565 * terminal.h: Move terminal-related defines to
6566 "common/gdb_termios.h".
6567
6568 2017-04-12 Tom Tromey <tom@tromey.com>
6569
6570 * probe.c (parse_probes): Update.
6571 * location.h (delete_event_location): Don't declare.
6572 (event_location_deleter::operator()): Update.
6573 * location.c (event_location_deleter::operator()): Rename from
6574 delete_event_location.
6575 * linespec.h (linespec_result) <location>: Change type to
6576 event_location_up.
6577 * linespec.c (canonicalize_linespec, event_location_to_sals)
6578 (decode_objc): Update.
6579 (linespec_result): Don't call delete_event_location.
6580 * breakpoint.c (create_breakpoints_sal)
6581 (bkpt_probe_create_sals_from_location)
6582 (strace_marker_create_sals_from_location): Update.
6583
6584 2017-04-12 Tom Tromey <tom@tromey.com>
6585
6586 * linespec.h (struct linespec_result): Add constructor and
6587 destructor.
6588 (init_linespec_result, destroy_linespec_result)
6589 (make_cleanup_destroy_linespec_result): Don't declare.
6590 * linespec.c (init_linespec_result): Remove.
6591 (linespec_result::~linespec_result): Rename from
6592 destroy_linespec_result. Update.
6593 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
6594 Remove.
6595 * breakpoint.c (create_breakpoint, break_range_command)
6596 (decode_location_default): Update.
6597 * ax-gdb.c (agent_command_1): Update.
6598
6599 2017-04-12 Tom Tromey <tom@tromey.com>
6600
6601 * remote.c (remote_download_tracepoint): Update.
6602 * python/py-breakpoint.c (bppy_get_location): Update.
6603 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
6604 (gdbscm_breakpoint_location): Update.
6605 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
6606 * breakpoint.h (struct breakpoint) <location, location_range_end>:
6607 Change type to event_location_up.
6608 * breakpoint.c (create_overlay_event_breakpoint)
6609 (create_longjmp_master_breakpoint)
6610 (create_std_terminate_master_breakpoint)
6611 (create_exception_master_breakpoint)
6612 (breakpoint_event_location_empty_p, print_breakpoint_location)
6613 (print_one_breakpoint_location, create_thread_event_breakpoint)
6614 (init_breakpoint_sal, create_breakpoint)
6615 (print_recreate_ranged_breakpoint, break_range_command)
6616 (init_ada_exception_breakpoint, say_where): Update.
6617 (base_breakpoint_dtor): Don't call delete_event_location.
6618 (bkpt_print_recreate, tracepoint_print_recreate)
6619 (dprintf_print_recreate, update_static_tracepoint)
6620 (breakpoint_re_set_default): Update.
6621
6622 2017-04-12 Tom Tromey <tom@tromey.com>
6623
6624 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
6625 type of "to_do". Update.
6626 (compute_stack_depth): Use std::vector.
6627
6628 2017-04-12 Tom Tromey <tom@tromey.com>
6629
6630 * printcmd.c (find_instruction_backward): Use std::vector.
6631
6632 2017-04-12 Tom Tromey <tom@tromey.com>
6633
6634 * symfile.c (objfilep): Remove typedef.
6635 (reread_symbols): Use a std::vector.
6636
6637 2017-04-12 Tom Tromey <tom@tromey.com>
6638
6639 * mi/mi-main.c (exec_direction_forward): Remove.
6640 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
6641 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6642 scoped_restore.
6643 * guile/guile.c (guile_repl_command, guile_command)
6644 (gdbscm_execute_gdb_command): Use scoped_restore.
6645 * go-exp.y (go_parse): Use scoped_restore.
6646 * d-exp.y (d_parse): Use scoped_restore.
6647 * cli/cli-decode.c (cmd_func): Use scoped_restore.
6648 * c-exp.y (c_parse): Use scoped_restore.
6649
6650 2017-04-12 Tom Tromey <tom@tromey.com>
6651
6652 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
6653 (mi_parse): Update return type.
6654 (mi_parse_free): Remove.
6655 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
6656 (mi_parse::~mi_parse): Rename from mi_parse_free.
6657 (mi_parse_cleanup): Remove.
6658 (mi_parse): Return a unique_ptr. Use new.
6659 * mi/mi-main.c (mi_execute_command): Update.
6660
6661 2017-04-12 Tom Tromey <tom@tromey.com>
6662
6663 * location.c (explicit_location_lex_one): Return a
6664 unique_xmalloc_ptr.
6665 (string_to_explicit_location): Update. Remove cleanups.
6666
6667 2017-04-12 Tom Tromey <tom@tromey.com>
6668
6669 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
6670 (compare_value_and_voffset): Change type. Update.
6671 (compute_vtable_size): Change type of "offset_vec".
6672 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
6673 (gnuv3_get_typeid): Remove extraneous declaration.
6674
6675 2017-04-12 Tom Tromey <tom@tromey.com>
6676
6677 * charset.h (wchar_iterator): Fix comment.
6678
6679 2017-04-12 Tom Tromey <tom@tromey.com>
6680
6681 * charset.c (iconv_wrapper): New class.
6682 (cleanup_iconv): Remove.
6683 (convert_between_encodings): Use it.
6684
6685 2017-04-12 Tom Tromey <tom@tromey.com>
6686
6687 * symfile.h (increment_reading_symtab): Update type.
6688 * symfile.c (decrement_reading_symtab): Remove.
6689 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
6690 * psymtab.c (psymtab_to_symtab): Update.
6691 * dwarf2read.c (dw2_instantiate_symtab): Update.
6692
6693 2017-04-12 Tom Tromey <tom@tromey.com>
6694
6695 * jit.c (struct jit_reader): Declare separately. Add constructor
6696 and destructor. Change type of "handle".
6697 (loaded_jit_reader): Define separately.
6698 (jit_reader_load): Update. New "new".
6699 (jit_reader_unload_command): Use "delete".
6700 * gdb-dlfcn.h (struct dlclose_deleter): New.
6701 (gdb_dlhandle_up): New typedef.
6702 (gdb_dlopen, gdb_dlsym): Update types.
6703 (gdb_dlclose): Remove.
6704 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
6705 (gdb_dlsym): Change type of "handle".
6706 (make_cleanup_dlclose): Remove.
6707 (dlclose_deleter::operator()): Rename from gdb_dlclose.
6708 * compile/compile-c-support.c (load_libcc): Update.
6709
6710 2017-04-12 Tom Tromey <tom@tromey.com>
6711
6712 * symtab.h (find_pcs_for_symtab_line): Change return type.
6713 * symtab.c (find_pcs_for_symtab_line): Change return type.
6714 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
6715 type of "vec". Update.
6716 (ltpy_get_pcs_for_line): Update.
6717 * linespec.c (decode_digits_ordinary): Update.
6718
6719 2017-04-12 Tom Tromey <tom@tromey.com>
6720
6721 * tracepoint.c (actions_command): Update.
6722 * python/python.c (python_command, python_interactive_command):
6723 Update.
6724 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6725 * guile/guile.c (guile_command): Update.
6726 * defs.h (read_command_lines, read_command_lines_1): Return
6727 command_line_up.
6728 (command_lines_deleter): New struct.
6729 (command_line_up): New typedef.
6730 * compile/compile.c (compile_code_command)
6731 (compile_print_command): Update.
6732 * cli/cli-script.h (get_command_line, copy_command_lines): Return
6733 command_line_up.
6734 (make_cleanup_free_command_lines): Remove.
6735 * cli/cli-script.c (get_command_line, read_command_lines_1)
6736 (copy_command_lines): Return command_line_up.
6737 (while_command, if_command, read_command_lines, define_command)
6738 (document_command): Update.
6739 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
6740 Remove.
6741 * breakpoint.h (breakpoint_set_commands): Change type of
6742 "commands".
6743 * breakpoint.c (breakpoint_set_commands): Change type of
6744 "commands". Update.
6745 (do_map_commands_command, update_dprintf_command_list)
6746 (create_tracepoint_from_upload): Update.
6747
6748 2017-04-12 Tom Tromey <tom@tromey.com>
6749
6750 * tracepoint.c (scope_info): Update.
6751 * spu-tdep.c (spu_catch_start): Update.
6752 * python/python.c (gdbpy_decode_line): Update.
6753 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
6754 * python/py-breakpoint.c (bppy_init): Update.
6755 * probe.c (parse_probes): Update.
6756 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
6757 * location.h (event_location_deleter): New struct.
6758 (event_location_up): New typedef.
6759 (new_linespec_location, new_address_location, new_probe_location)
6760 (new_explicit_location, copy_event_location)
6761 (string_to_event_location, string_to_event_location_basic)
6762 (string_to_explicit_location): Update return type.
6763 (make_cleanup_delete_event_location): Remove.
6764 * location.c (new_linespec_location, new_address_location)
6765 (new_probe_location, new_explicit_location, copy_event_location):
6766 Return event_location_up.
6767 (delete_event_location_cleanup)
6768 (make_cleanup_delete_event_location): Remove.
6769 (string_to_explicit_location, string_to_event_location_basic)
6770 (string_to_event_location): Return event_location_up.
6771 * linespec.c (canonicalize_linespec, event_location_to_sals)
6772 (decode_line_with_current_source)
6773 (decode_line_with_last_displayed, decode_objc): Update.
6774 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
6775 * completer.c (location_completer): Update.
6776 * cli/cli-cmds.c (edit_command, list_command): Update.
6777 * breakpoint.c (create_overlay_event_breakpoint)
6778 (create_longjmp_master_breakpoint)
6779 (create_std_terminate_master_breakpoint)
6780 (create_exception_master_breakpoint)
6781 (create_thread_event_breakpoint): Update.
6782 (init_breakpoint_sal): Update. Remove some dead code.
6783 (create_breakpoint_sal): Change type of "location". Update.
6784 (create_breakpoints_sal, create_breakpoint, break_command_1)
6785 (dprintf_command, break_range_command, until_break_command)
6786 (init_ada_exception_breakpoint)
6787 (strace_marker_create_sals_from_location)
6788 (update_static_tracepoint, trace_command, ftrace_command)
6789 (strace_command, create_tracepoint_from_upload): Update.
6790 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6791 * ax-gdb.c (agent_command_1): Update.
6792
6793 2017-04-12 Pedro Alves <palves@redhat.com>
6794
6795 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
6796 * configure.tgt: Handle i[34567]86-*-go32* and
6797 i[34567]86-*-msdosdjgpp*.
6798 * i386-tdep.c (i386_svr4_reg_to_regnum):
6799 Make extern.
6800 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
6801 i386-go32-tdep.c.
6802 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
6803 * i386-go32-tdep.c: New file.
6804 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
6805 declarations.
6806
6807 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
6808
6809 * aix-thread.c (pd_status2str): Change return type to const char *.
6810
6811 2017-04-12 Pedro Alves <palves@redhat.com>
6812
6813 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
6814 calls to set_gdbarch_gnu_triplet_regexp.
6815
6816 2017-04-12 Pedro Alves <palves@redhat.com>
6817
6818 PR gdb/21323
6819 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
6820 New enum value.
6821 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
6822 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
6823 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
6824 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
6825 * gdbarch.h, gdbarch.c: Regenerate.
6826 * aarch64-tdep.c (aarch64_gdbarch_init): Override
6827 gdbarch_wchar_bit and gdbarch_wchar_signed.
6828 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
6829 * arm-tdep.c (arm_gdbarch_init): Likewise.
6830 * avr-tdep.c (avr_gdbarch_init): Likewise.
6831 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
6832 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
6833 * i386-tdep.c (i386_go32_init_abi): Likewise.
6834 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6835 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6836 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6837 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6838 * sh-tdep.c (sh_gdbarch_init): Likewise.
6839 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6840 * sparc64-tdep.c (sparc64_init_abi): Likewise.
6841 * windows-tdep.c (windows_init_abi): Likewise.
6842 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6843
6844 2017-04-12 Pedro Alves <palves@redhat.com>
6845
6846 PR c++/21323
6847 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
6848 cplus_primitive_type_char32_t>: New enum values.
6849 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
6850 and cplus_primitive_type_char32_t.
6851 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
6852 32, use the archtecture's built-in type for char16_t and char32_t,
6853 respectively. Otherwise, fallback to init_integer_type as before,
6854 but make the type unsigned, and issue a complaint.
6855 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
6856
6857 2017-04-12 Alan Hayward <alan.hayward@arm.com>
6858
6859 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
6860 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
6861
6862 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6863
6864 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
6865 'const char *'.
6866
6867 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6868
6869 * common/common-utils.c (free_vector_argv): New function.
6870 * common/common-utils.h: Include <vector>.
6871 (free_vector_argv): New prototype.
6872 * darwin-nat.c (darwin_create_inferior): Rewrite function
6873 prototype in order to constify "exec_file" and accept a
6874 "std::string" for "allargs".
6875 * fork-child.c: Include <vector>.
6876 (breakup_args): Rewrite function, using C++.
6877 (fork_inferior): Rewrite function header, constify "exec_file_arg"
6878 and accept "std::string" for "allargs". Update the code to
6879 calculate "argv" based on "allargs". Update calls to "exec_fun"
6880 and "execvp".
6881 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
6882 order to constify "exec_file" and accept a "std::string" for
6883 "allargs".
6884 * go32-nat.c (go32_create_inferior): Likewise.
6885 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
6886 * infcmd.c (run_command_1): Constify "exec_file". Use
6887 "std::string" for inferior arguments.
6888 * inferior.h (fork_inferior): Update prototype.
6889 * linux-nat.c (linux_nat_create_inferior): Rewrite function
6890 prototype in order to constify "exec_file" and accept a
6891 "std::string" for "allargs".
6892 * nto-procfs.c (procfs_create_inferior): Likewise.
6893 * procfs.c (procfs_create_inferior): Likewise.
6894 * remote-sim.c (gdbsim_create_inferior): Likewise.
6895 * remote.c (extended_remote_run): Update code to accept
6896 "std::string" as argument.
6897 (extended_remote_create_inferior): Rewrite function prototype in
6898 order to constify "exec_file" and accept a "std::string" for
6899 "allargs".
6900 * rs6000-nat.c (super_create_inferior): Likewise.
6901 (rs6000_create_inferior): Likewise.
6902 * target.h (struct target_ops) <to_create_inferior>: Likewise.
6903 * windows-nat.c (windows_create_inferior): Likewise.
6904
6905 2017-04-11 Pedro Alves <palves@redhat.com>
6906
6907 * thread.c: Fix whitespace throughout.
6908
6909 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
6910
6911 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
6912
6913 2017-04-11 Alan Hayward <alan.hayward@arm.com>
6914
6915 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
6916
6917 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
6918
6919 PR gdb/21364
6920 * osdata.c (info_osdata): Check if 'type' is an empty string
6921 instead of NULL.
6922
6923 2017-04-10 Pedro Alves <palves@redhat.com>
6924
6925 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
6926 (ptid_to_global_thread_id, in_thread_list)
6927 (do_captured_list_thread_ids, set_resumed, set_running)
6928 (set_executing, set_stop_requested, finish_thread_state)
6929 (validate_registers_access, can_access_registers_ptid)
6930 (print_thread_info_1, switch_to_thread)
6931 (do_restore_current_thread_cleanup)
6932 (make_cleanup_restore_current_thread, thread_command)
6933 (thread_name_command): Use operator== instead of ptid_equal.
6934
6935 2017-04-10 Pedro Alves <palves@redhat.com>
6936
6937 * thread.c (struct current_thread_cleanup) <next>: Delete field.
6938 (current_thread_cleanup_chain): Delete.
6939 (restore_current_thread_cleanup_dtor)
6940 (make_cleanup_restore_current_thread): Remove references to
6941 current_thread_cleanup_chain.
6942
6943 2017-04-10 Alan Hayward <alan.hayward@arm.com>
6944
6945 * msp430-tdep.c (msp430_pseudo_register_read): Never return
6946 REG_UNKNOWN.
6947
6948 2017-04-10 Yao Qi <yao.qi@linaro.org>
6949
6950 PR gdb/19942
6951 * gdbthread.h (thread_info::deletable): New method.
6952 (thread_info::incref): New method.
6953 (thread_info::decref): New method.
6954 (thread_info::refcount): Move it to private.
6955 * infrun.c (save_stop_context): Call inc_refcount.
6956 (release_stop_context_cleanup): Likewise.
6957 * thread.c (set_thread_exited): New function.
6958 (init_thread_list): Delete "tp" only it is deletable, otherwise
6959 call set_thread_exited.
6960 (delete_thread_1): Call set_thread_exited.
6961 (current_thread_cleanup) <inferior_pid>: Remove.
6962 <thread>: New field.
6963 (restore_current_thread_ptid_changed): Removed.
6964 (do_restore_current_thread_cleanup): Adjust.
6965 (restore_current_thread_cleanup_dtor): Don't call
6966 find_thread_ptid.
6967 (set_thread_refcount): Use dec_refcount.
6968 (make_cleanup_restore_current_thread): Adjust.
6969 (thread_apply_all_command): Call inc_refcount.
6970 (_initialize_thread): Don't call
6971 observer_attach_thread_ptid_changed.
6972
6973 2017-04-10 Yao Qi <yao.qi@linaro.org>
6974
6975 * thread.c (delete_thread_1): Hoist code on marking thread as
6976 exited.
6977
6978 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6979
6980 * windows-nat.c (windows_detach): Initialize ptid with
6981 minus_one_ptid.
6982
6983 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
6984
6985 * unittests/ptid-selftests.c: Fix erroneous assert messages.
6986
6987 2017-04-07 Alan Hayward <alan.hayward@arm.com>
6988
6989 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
6990 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
6991 (bfin_pseudo_register_write): Likewise
6992
6993 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
6994
6995 * common/ptid.h (struct ptid): Change to...
6996 (class ptid_t): ... this.
6997 <ptid_t>: New constructors.
6998 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
6999 matches>: New methods.
7000 <make_null, make_minus_one>: New static methods.
7001 <pid>: Rename to...
7002 <m_pid>: ...this.
7003 <lwp>: Rename to...
7004 <m_lwp>: ...this.
7005 <tid>: Rename to...
7006 <m_tid>: ...this.
7007 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7008 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7009 as references, move comment to class ptid_t.
7010 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7011 ptid_t static methods.
7012 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7013 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7014 Take ptid arguments as references, implement using ptid_t methods.
7015 * unittests/ptid-selftests.c: New file.
7016 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7017 unittests/ptid-selftests.c.
7018 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7019
7020 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7021
7022 * python/python.c (python_run_simple_file): Cast mode literal to
7023 non-const char pointer as expected by PyFile_FromString.
7024
7025 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7026
7027 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7028 minus_one_ptid and null_ptid.
7029
7030 2017-04-05 Pedro Alves <palves@redhat.com>
7031
7032 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7033 * configure: Regenerate.
7034
7035 2017-04-05 Pedro Alves <palves@redhat.com>
7036
7037 * ada-exp.y (yyerror): Constify.
7038 * ada-lang.c (bound_name, get_selections)
7039 (ada_variant_discrim_type)
7040 (ada_variant_discrim_name, ada_value_struct_elt)
7041 (ada_lookup_struct_elt_type, is_unchecked_variant)
7042 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7043 (catch_ada_exception_command_split)
7044 (catch_ada_assert_command_split, catch_assert_command)
7045 (ada_op_name): Constify.
7046 * ada-lang.h (ada_yyerror, get_selections)
7047 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7048 * arc-tdep.c (arc_print_frame_cache): Constify.
7049 * arm-tdep.c (arm_skip_stub): Constify.
7050 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7051 (gen_aggregate_elt_ref): Constify.
7052 * bcache.c (print_bcache_statistics): Constify.
7053 * bcache.h (print_bcache_statistics): Constify.
7054 * break-catch-throw.c (catch_exception_command_1):
7055 * breakpoint.c (struct ep_type_description::description):
7056 Constify.
7057 (add_solib_catchpoint): Constify.
7058 (catch_fork_command_1): Add cast.
7059 (add_catch_command): Constify.
7060 * breakpoint.h (add_catch_command, add_solib_catchpoint):
7061 Constify.
7062 * bsd-uthread.c (bsd_uthread_state): Constify.
7063 * buildsym.c (patch_subfile_names): Constify.
7064 * buildsym.h (next_symbol_text_func, patch_subfile_names):
7065 Constify.
7066 * c-exp.y (yyerror): Constify.
7067 (token::oper): Constify.
7068 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7069 * c-varobj.c (cplus_describe_child): Constify.
7070 * charset.c (find_charset_names): Add cast.
7071 (find_charset_names): Constify array and add const_cast.
7072 * cli/cli-cmds.c (complete_command, cd_command): Constify.
7073 (edit_command): Constify.
7074 * cli/cli-decode.c (lookup_cmd): Constify.
7075 * cli/cli-dump.c (dump_memory_command, dump_value_command):
7076 Constify.
7077 (struct dump_context): Constify.
7078 (add_dump_command, restore_command): Constify.
7079 * cli/cli-script.c (get_command_line): Constify.
7080 * cli/cli-script.h (get_command_line): Constify.
7081 * cli/cli-utils.c (check_for_argument): Constify.
7082 * cli/cli-utils.h (check_for_argument): Constify.
7083 * coff-pe-read.c (struct read_pe_section_data): Constify.
7084 * command.h (lookup_cmd): Constify.
7085 * common/print-utils.c (decimal2str): Constify.
7086 * completer.c (gdb_print_filename): Constify.
7087 * corefile.c (set_gnutarget): Constify.
7088 * cp-name-parser.y (yyerror): Constify.
7089 * cp-valprint.c (cp_print_class_member): Constify.
7090 * cris-tdep.c (cris_register_name, crisv32_register_name):
7091 Constify.
7092 * d-exp.y (yyerror): Constify.
7093 (struct token::oper): Constify.
7094 * d-lang.h (d_yyerror): Constify.
7095 * dbxread.c (struct header_file_location::name): Constify.
7096 (add_old_header_file, add_new_header_file, last_function_name)
7097 (dbx_next_symbol_text, add_bincl_to_list)
7098 (find_corresponding_bincl_psymtab, set_namestring)
7099 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7100 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7101 * defs.h (command_line_input, print_address_symbolic)
7102 (deprecated_readline_begin_hook): Constify.
7103 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7104 Constify.
7105 * event-top.c (handle_line_of_input): Constify and add cast.
7106 * exceptions.c (catch_errors): Constify.
7107 * exceptions.h (catch_errors): Constify.
7108 * expprint.c (print_subexp_standard, op_string, op_name)
7109 (op_name_standard, dump_raw_expression, dump_raw_expression):
7110 * expression.h (op_name, op_string, dump_raw_expression):
7111 Constify.
7112 * f-exp.y (yyerror): Constify.
7113 (struct token::oper): Constify.
7114 (struct f77_boolean_val::name): Constify.
7115 * f-lang.c (f_word_break_characters): Constify.
7116 * f-lang.h (f_yyerror): Constify.
7117 * fork-child.c (fork_inferior): Add cast.
7118 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7119 (new_variant): Constify.
7120 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7121 * gdbarch.c: Regenerate.
7122 * gdbcore.h (set_gnutarget): Constify.
7123 * go-exp.y (yyerror): Constify.
7124 (token::oper): Constify.
7125 * go-lang.h (go_yyerror): Constify.
7126 * go32-nat.c (go32_sysinfo): Constify.
7127 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7128 * guile/scm-cmd.c (cmdscm_function): Constify.
7129 * guile/scm-param.c (pascm_param_value): Constify.
7130 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7131 (h8300sx_register_name): Constify.
7132 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7133 Constify.
7134 * ia64-tdep.c (ia64_register_names): Constify.
7135 * infcmd.c (construct_inferior_arguments): Constify.
7136 (path_command, attach_post_wait): Constify.
7137 * language.c (show_range_command, show_case_command)
7138 (unk_lang_error): Constify.
7139 * language.h (language_defn::la_error)
7140 (language_defn::la_name_of_this): Constify.
7141 * linespec.c (decode_line_2): Constify.
7142 * linux-thread-db.c (thread_db_err_str): Constify.
7143 * lm32-tdep.c (lm32_register_name): Constify.
7144 * m2-exp.y (yyerror): Constify.
7145 * m2-lang.h (m2_yyerror): Constify.
7146 * m32r-tdep.c (m32r_register_names): Constify and make static.
7147 * m68hc11-tdep.c (m68hc11_register_names): Constify.
7148 * m88k-tdep.c (m88k_register_name): Constify.
7149 * macroexp.c (appendmem): Constify.
7150 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7151 (upgrade_type, parse_external, parse_partial_symbols)
7152 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7153 (new_symbol): Constify.
7154 * memattr.c (mem_info_command): Constify.
7155 * mep-tdep.c (register_name_from_keyword): Constify.
7156 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7157 Constify.
7158 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7159 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7160 * mi/mi-main.c (captured_mi_execute_command): Constify and add
7161 cast.
7162 (mi_execute_async_cli_command): Constify.
7163 * mips-tdep.c (mips_register_name): Constify.
7164 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7165 (am33_register_name, am33_2_register_name)
7166 * moxie-tdep.c (moxie_register_names): Constify.
7167 * nat/linux-osdata.c (osdata_type): Constify fields.
7168 * nto-tdep.c (nto_parse_redirection): Constify.
7169 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7170 (lookup_child_selector): Constify.
7171 (objc_methcall::name): Constify.
7172 * objc-lang.h (lookup_objc_class, lookup_child_selector)
7173 (lookup_struct_typedef): Constify.
7174 * objfiles.c (pc_in_section): Constify.
7175 * objfiles.h (pc_in_section): Constify.
7176 * p-exp.y (struct token::oper): Constify.
7177 (yyerror): Constify.
7178 * p-lang.h (pascal_yyerror): Constify.
7179 * parser-defs.h (op_name_standard): Constify.
7180 (op_print::string): Constify.
7181 (exp_descriptor::op_name): Constify.
7182 * printcmd.c (print_address_symbolic): Constify.
7183 * psymtab.c (print_partial_symbols): Constify.
7184 * python/py-breakpoint.c (stop_func): Constify.
7185 (bppy_get_expression): Constify.
7186 * python/py-cmd.c (cmdpy_completer::name): Constify.
7187 (cmdpy_function): Constify.
7188 * python/py-event.c (evpy_add_attribute)
7189 (gdbpy_initialize_event_generic): Constify.
7190 * python/py-event.h (evpy_add_attribute)
7191 (gdbpy_initialize_event_generic): Constify.
7192 * python/py-evts.c (add_new_registry): Constify.
7193 * python/py-finishbreakpoint.c (outofscope_func): Constify.
7194 * python/py-framefilter.c (get_py_iter_from_func): Constify.
7195 * python/py-inferior.c (get_buffer): Add cast.
7196 * python/py-param.c (parm_constant::name): Constify.
7197 * python/py-unwind.c (fprint_frame_id): Constify.
7198 * python/python.c (gdbpy_parameter_value): Constify.
7199 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7200 * remote.c (memory_packet_config::name): Constify.
7201 (show_packet_config_cmd, remote_write_bytes)
7202 (remote_buffer_add_string):
7203 * reverse.c (exec_reverse_once): Constify.
7204 * rs6000-tdep.c (variant::name, variant::description): Constify.
7205 * rust-exp.y (rustyyerror): Constify.
7206 * rust-lang.c (rust_op_name): Constify.
7207 * rust-lang.h (rustyyerror): Constify.
7208 * serial.h (serial_ops::name): Constify.
7209 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
7210 (sh_sh3e_register_name, sh_sh2e_register_name)
7211 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
7212 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
7213 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
7214 (sh_sh4al_dsp_register_name): Constify.
7215 * sh64-tdep.c (sh64_register_name): Constify.
7216 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
7217 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
7218 * stabsread.c (patch_block_stabs, read_type_number)
7219 (ref_map::stabs, ref_add, process_reference)
7220 (symbol_reference_defined, define_symbol, define_symbol)
7221 (error_type, read_type, read_member_functions, read_cpp_abbrev)
7222 (read_one_struct_field, read_struct_fields, read_baseclasses)
7223 (read_tilde_fields, read_struct_type, read_array_type)
7224 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
7225 (read_huge_number, read_range_type, read_args, common_block_start)
7226 (find_name_end): Constify.
7227 * stabsread.h (common_block_start, define_symbol)
7228 (process_one_symbol, symbol_reference_defined, ref_add):
7229 * symfile.c (get_section_index, add_symbol_file_command):
7230 * symfile.h (get_section_index): Constify.
7231 * target-descriptions.c (tdesc_type::name): Constify.
7232 (tdesc_free_type): Add cast.
7233 * target.c (find_default_run_target):
7234 (add_deprecated_target_alias, find_default_run_target)
7235 (target_announce_detach): Constify.
7236 (do_option): Constify.
7237 * target.h (add_deprecated_target_alias): Constify.
7238 * thread.c (print_thread_info_1): Constify.
7239 * top.c (deprecated_readline_begin_hook, command_line_input):
7240 Constify.
7241 (init_main): Add casts.
7242 * top.h (handle_line_of_input): Constify.
7243 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
7244 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
7245 (tfind_command): Rename to ...
7246 (tfind_command_1): ... this and constify.
7247 (tfind_command): New function.
7248 (tfind_end_command, tfind_start_command): Adjust.
7249 (encode_source_string): Constify.
7250 * tracepoint.h (encode_source_string): Constify.
7251 * tui/tui-data.c (tui_partial_win_by_name): Constify.
7252 * tui/tui-data.h (tui_partial_win_by_name): Constify.
7253 * tui/tui-source.c (tui_set_source_content_nil): Constify.
7254 * tui/tui-source.h (tui_set_source_content_nil): Constify.
7255 * tui/tui-win.c (parse_scrolling_args): Constify.
7256 * tui/tui-windata.c (tui_erase_data_content): Constify.
7257 * tui/tui-windata.h (tui_erase_data_content): Constify.
7258 * tui/tui-winsource.c (tui_erase_source_content): Constify.
7259 * tui/tui.c (tui_enable): Add cast.
7260 * utils.c (defaulted_query): Constify.
7261 (init_page_info): Add cast.
7262 (puts_debug, subset_compare): Constify.
7263 * utils.h (subset_compare): Constify.
7264 * varobj.c (varobj_format_string): Constify.
7265 * varobj.h (varobj_format_string): Constify.
7266 * vax-tdep.c (vax_register_name): Constify.
7267 * windows-nat.c (windows_detach): Constify.
7268 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
7269 * xml-support.c (gdb_xml_end_element): Constify.
7270 * xml-tdesc.c (tdesc_start_reg): Constify.
7271 * xstormy16-tdep.c (xstormy16_register_name): Constify.
7272 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
7273 * xtensa-tdep.h (xtensa_register_t::name): Constify.
7274
7275 2017-04-05 Pedro Alves <palves@redhat.com>
7276
7277 * proc-api.c (struct trans): Constify.
7278 (procfs_note): Constify.
7279 * proc-events.c (struct trans, syscall_table):
7280 * proc-flags.c (struct trans): Constify.
7281 * proc-utils.h (procfs_note): Constify.
7282 * proc-why.c (struct trans): Constify.
7283 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
7284 (procfs_detach): Constify.
7285 * sol-thread.c (struct string_map): Constify.
7286 (td_err_string, td_state_string): Constify.
7287
7288 2017-04-05 Pedro Alves <palves@redhat.com>
7289
7290 * proc-api.c (procfs_filename): Don't initialize
7291 procfs_filename.
7292 (prepare_to_trace): Assume procfs_filename is non-NULL.
7293 (_initialize_proc_api): Give procfs_filename a default value here.
7294
7295 2017-04-05 Pedro Alves <palves@redhat.com>
7296
7297 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
7298 'cond_string' parameter.
7299 (extract_exception_regexp): Constify 'string' parameter.
7300 (catch_exception_command_1): Constify.
7301 * breakpoint.c (init_catchpoint)
7302 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
7303 parameter.
7304 (ep_parse_optional_if_clause, catch_fork_command_1)
7305 (catch_exec_command_1): Constify.
7306 * breakpoint.h (init_catchpoint): Constify 'cond_string'
7307 parameter.
7308 (ep_parse_optional_if_clause): Constify.
7309 * cli/cli-utils.c (remove_trailing_whitespace)
7310 (check_for_argument): Constify.
7311 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
7312 non-const overload.
7313 (check_for_argument): Likewise.
7314
7315 2017-04-05 Pedro Alves <palves@redhat.com>
7316
7317 * event-top.c (command_line_handler): Add cast to execute_command
7318 call.
7319 * record-btrace.c (cmd_record_btrace_bts_start)
7320 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
7321 (cmd_record_btrace_start): Add cast to execute_command call.
7322 * record-full.c (record_full_goto_insn):
7323 * record.c (record_start, record_stop): Add cast to
7324 execute_command_to_string calls.
7325 (cmd_record_start): Add cast to execute_command calls.
7326
7327 2017-04-05 Pedro Alves <palves@redhat.com>
7328
7329 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
7330 static inline function.
7331 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
7332 array and use gdb_PyArg_ParseTupleAndKeywords.
7333 * python/py-cmd.c (cmdpy_init): Likewise.
7334 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
7335 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
7336 (infpy_search_memory): Likewise.
7337 * python/py-objfile.c (objfpy_add_separate_debug_file)
7338 (gdbpy_lookup_objfile): Likewise.
7339 * python/py-symbol.c (gdbpy_lookup_symbol)
7340 (gdbpy_lookup_global_symbol): Likewise.
7341 * python/py-type.c (gdbpy_lookup_type): Likewise.
7342 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
7343 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
7344 Likewise.
7345
7346 2017-04-05 Pedro Alves <palves@redhat.com>
7347
7348 * python/python-internal.h (gdb_PyGetSetDef): New type.
7349 * python/py-block.c (block_object_getset)
7350 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
7351 * python/py-event.c (event_object_getset)
7352 (finish_breakpoint_object_getset): Likewise.
7353 * python/py-inferior.c (inferior_object_getset): Likewise.
7354 * python/py-infthread.c (thread_object_getset): Likewise.
7355 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
7356 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
7357 * python/py-objfile.c (objfile_getset): Likewise.
7358 * python/py-progspace.c (pspace_getset): Likewise.
7359 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
7360 Likewise.
7361 * python/py-record.c (recpy_record_getset): Likewise.
7362 * python/py-symbol.c (symbol_object_getset): Likewise.
7363 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
7364 Likewise.
7365 * python/py-type.c (type_object_getset, field_object_getset):
7366 Likewise.
7367 * python/py-value.c (value_object_getset): Likewise.
7368
7369 2017-04-05 Pedro Alves <palves@redhat.com>
7370
7371 * python/python-internal.h (gdb_PyObject_CallMethod)
7372 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
7373 New functions.
7374 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
7375 (PySys_GetObject, PySys_SetPath): New macros.
7376
7377 2017-04-05 Pedro Alves <palves@redhat.com>
7378
7379 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
7380 info_osdata_command.
7381 * osdata.c (info_osdata_command): Rename to ...
7382 (info_osdata): ... this. Constify 'type' parameter, and remove
7383 the 'from_tty' parameter. Accept NULL TYPE.
7384 (info_osdata_command): New function.
7385 * osdata.h (info_osdata_command): Remove declaration.
7386 (info_osdata): New declaration.
7387
7388 2017-04-05 Pedro Alves <palves@redhat.com>
7389
7390 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
7391 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
7392 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
7393 parameter.
7394 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
7395 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
7396 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
7397 parameter.
7398 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
7399 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
7400 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
7401 (mi_cmd_file_list_exec_source_files)
7402 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
7403 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7404 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
7405 parameter.
7406 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
7407 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
7408 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
7409 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
7410 (mi_cmd_stack_info_frame): Constify 'command' parameter.
7411 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
7412 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
7413 'command' parameter.
7414 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
7415 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
7416 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
7417 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
7418 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
7419 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
7420 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
7421 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
7422 (mi_cmd_var_set_update_range): Constify 'command' parameter.
7423 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
7424 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
7425 parameter.
7426 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
7427 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
7428 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
7429 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
7430 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
7431 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
7432 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
7433 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
7434 (mi_cmd_data_list_changed_registers)
7435 (mi_cmd_data_write_register_values)
7436 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
7437 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
7438 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
7439 (mi_cmd_list_features, mi_cmd_list_target_features)
7440 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
7441 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
7442 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
7443 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
7444 (mi_cmd_trace_frame_collected): Constify 'command'
7445 parameter.
7446 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
7447 'command' parameter.
7448
7449 2017-04-05 Pedro Alves <palves@redhat.com>
7450
7451 * ada-lang.c (ada_completer_word_break_characters): Now a const
7452 array.
7453 (ada_get_gdb_completer_word_break_characters): Constify.
7454 * completer.c (gdb_completer_command_word_break_characters)
7455 (gdb_completer_file_name_break_characters)
7456 (gdb_completer_quote_characters): Now const arrays.
7457 (get_gdb_completer_quote_characters): Constify.
7458 (set_rl_completer_word_break_characters): New function.
7459 (set_gdb_completion_word_break_characters)
7460 (complete_line_internal): Use it.
7461 * completer.h (get_gdb_completer_quote_characters): Constify.
7462 (set_rl_completer_word_break_characters): Declare.
7463 * f-lang.c (f_word_break_characters): Constify.
7464 * language.c (default_word_break_characters): Constify.
7465 * language.h (language_defn::la_word_break_characters): Constify.
7466 (default_word_break_characters): Constify.
7467 * top.c (init_main): Use set_rl_completer_word_break_characters.
7468
7469 2017-04-05 Pedro Alves <palves@redhat.com>
7470
7471 * aix-thread.c (aix_thread_pid_to_str)
7472 (aix_thread_extra_thread_info): Constify.
7473 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
7474 * bsd-uthread.c (bsd_uthread_extra_thread_info)
7475 (bsd_uthread_pid_to_str): Constify.
7476 * corelow.c (core_pid_to_str): Constify.
7477 * darwin-nat.c (darwin_pid_to_str): Constify.
7478 * fbsd-nat.c (fbsd_pid_to_str): Constify.
7479 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
7480 Constify.
7481 * gnu-nat.c (gnu_pid_to_str): Constify.
7482 * go32-nat.c (go32_pid_to_str): Constify.
7483 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
7484 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
7485 * inferior.c (inferior_pid_to_str): Constify.
7486 * linux-nat.c (linux_nat_pid_to_str): Constify.
7487 * linux-tdep.c (linux_core_pid_to_str): Constify.
7488 * linux-thread-db.c (thread_db_pid_to_str)
7489 (thread_db_extra_thread_info): Constify.
7490 * nto-tdep.c (nto_extra_thread_info): Constify.
7491 * nto-tdep.h (nto_extra_thread_info): Constify.
7492 * obsd-nat.c (obsd_pid_to_str): Constify.
7493 * procfs.c (procfs_pid_to_str): Constify.
7494 * ravenscar-thread.c (ravenscar_extra_thread_info)
7495 (ravenscar_pid_to_str): Constify.
7496 * remote-sim.c (gdbsim_pid_to_str): Constify.
7497 * remote.c (remote_threads_extra_info, remote_pid_to_str):
7498 Constify.
7499 * sol-thread.c (solaris_pid_to_str): Constify.
7500 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
7501 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
7502 * target.c (default_pid_to_str, target_pid_to_str)
7503 (normal_pid_to_str, default_pid_to_str): Constify.
7504 * target.h (target_ops::to_pid_to_str)
7505 (target_ops::to_extra_thread_info): Constify.
7506 (target_pid_to_str, normal_pid_to_str): Constify.
7507 * windows-nat.c (windows_pid_to_str): Constify.
7508 * gdbarch.sh (core_pid_to_str): Constify.
7509 * target-delegates.c: Regenerate.
7510 * gdbarch.h, gdbarch.c: Regenerate.
7511
7512 2017-04-05 Pedro Alves <palves@redhat.com>
7513
7514 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
7515 the memory of the temporary warning_pre_print override.
7516 * utils.c (warning_pre_print): Constify.
7517 * utils.h (warning_pre_print): Constify.
7518
7519 2017-04-05 Pedro Alves <palves@redhat.com>
7520
7521 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
7522 (shell_command): New function.
7523 (make_command): Use std::string.
7524 (init_cli_cmds): Register shell_command instead of shell_escape.
7525
7526 2017-04-05 Pedro Alves <palves@redhat.com>
7527
7528 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
7529 * tracepoint.c (default_collect): Don't initialize.
7530
7531 2017-04-05 Pedro Alves <palves@redhat.com>
7532
7533 * macroexp.c (macro_buffer::shared): Now a bool.
7534 (init_buffer): Update.
7535 (init_shared_buffer): Constify 'addr' parameter.
7536 (substitute_args, expand, macro_expand, macro_expand_next): Remove
7537 casts.
7538
7539 2017-04-05 Pedro Alves <palves@redhat.com>
7540
7541 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
7542 * disasm.c (set_disassembler_options): Constify local.
7543 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
7544
7545 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
7546
7547 PR gdb/21352
7548 * tracefile.c (tsave_command): Fix argument parsing for '-r'
7549 option.
7550
7551 2017-04-05 Yao Qi <yao.qi@linaro.org>
7552
7553 * frame.c (frame_unwind_register_unsigned): Call
7554 frame_unwind_register_value.
7555
7556 2017-04-05 Yao Qi <yao.qi@linaro.org>
7557
7558 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
7559 Use gdb_test_multiple, and don't match anchor.
7560
7561 2017-04-05 Pedro Alves <palves@redhat.com>
7562
7563 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
7564 (Write After Approval): Remove Simon Marchi.
7565
7566 2017-04-05 Pedro Alves <palves@redhat.com>
7567
7568 * common/gdb_optional.h (optional::optional): Make constexpr and
7569 initialize m_dummy.
7570
7571 2017-04-04 John Baldwin <jhb@FreeBSD.org>
7572
7573 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
7574 (amd64fbsd_jmp_buf_reg_offset): Remove.
7575 (amd64fbsd_supply_uthread): Remove function.
7576 (amd64fbsd_collect_uthread): Remove function.
7577 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
7578 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
7579 (x86_64-*-freebsd*): Remove bsd-uthread.o.
7580 (fbsd-nat.c): Update comment.
7581 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
7582 (i386fbsd_jmp_buf_reg_offset): Remove.
7583 (i386fbsd_supply_uthread): Remove function.
7584 (i386fbsd_collect_uthread): Remove function.
7585 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
7586
7587 2017-04-04 John Baldwin <jhb@FreeBSD.org>
7588
7589 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
7590 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
7591 * NEWS: Mention that support for FreeBSD/alpha was removed.
7592 * alpha-fbsd-tdep.c: Delete file.
7593 * config/alpha/fbsd.mh: Delete file.
7594 * configure.host: Delete alpha*-*-freebsd* and
7595 alpha*-*-kfreebsd*-gnu.
7596 * configure.tgt: Delete alpha*-*-freebsd* and
7597 alpha*-*-kfreebsd*-gnu.
7598
7599 2017-04-04 John Baldwin <jhb@FreeBSD.org>
7600
7601 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
7602 amd64bsd_store_inferior_registers): Use ptid from regcache.
7603
7604 2017-04-04 Pedro Alves <palves@redhat.com>
7605
7606 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
7607 data fields, make them private and add "m_" prefixes.
7608 (lnp_state_machine::lnp_state_machine): New ctor.
7609 (record_line, check_line_address, handle_set_discriminator)
7610 (handle_set_address, handle_advance_pc, handle_special_opcode)
7611 (handle_advance_line, handle_set_file, handle_negate_stmt)
7612 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
7613 (end_sequence, advance_line): New methods.
7614 (m_gdbarch, m_record_lines_p): New fields.
7615 (lnp_reader_state): Delete.
7616 (dwarf_record_line): Rename to ...
7617 (lnp_state_machine::record_line): ... adjust.
7618 (init_lnp_state_machine): Delete.
7619 (lnp_state_machine::lnp_state_machine): New.
7620 (check_line_address): Rename to ...
7621 (lnp_state_machine::check_line_address): This.
7622 (dwarf_decode_lines_1): Remove reference to "reader_state".
7623 Adjust lnp_state_machine having a non-default ctor. Use bool.
7624 State machine internal state manipulation moved to
7625 lnp_state_machine methods.
7626
7627 2017-04-04 Pedro Alves <palves@redhat.com>
7628
7629 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7630 unittests/offset-type-selftests.c.
7631 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
7632 * common/offset-type.h: New file.
7633 * common/preprocessor.h: New file.
7634 * common/traits.h: New file.
7635 * common/valid-expr.h: New file.
7636 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
7637 sect_offset and cu_offset strong typedefs throughout.
7638 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
7639 typedefs throughout.
7640 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
7641 sect_offset and cu_offset strong typedefs throughout.
7642 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
7643 typedefs throughout.
7644 * gdbtypes.h: Include "common/offset-type.h".
7645 (cu_offset): Now an offset type (strong typedef) instead of a
7646 struct.
7647 (sect_offset): Likewise.
7648 (union call_site_parameter_u): Rename "param_offset" field to
7649 "param_cu_off".
7650 * unittests/offset-type-selftests.c: New file.
7651
7652 2017-04-04 Pedro Alves <palves@redhat.com>
7653
7654 * common/underlying.h: New file.
7655 * dwarf2read.c: Include "common/gdb_optional.h" and
7656 "common/underlying.h".
7657 (dir_index, file_name_index): New types.
7658 (file_entry): Use them.
7659 (file_entry::include): Use to_underlying.
7660 (line_header::add_file_name): Use dir_index.
7661 (read_formatted_entries): Use gdb::optional. Read form before
7662 writting to file_entry.
7663 (dwarf_decode_line_header): Use dir_index.
7664 (lnp_state_machine::current_file): Use to_underlying.
7665 (lnp_state_machine::file): Change type to file_name_index.
7666 (dwarf_record_line): Use to_underlying.
7667 (init_lnp_state_machine): Use file_name_index.
7668 (dwarf_decode_lines_1): Use dir_index and file_name_index.
7669
7670 2017-04-04 Pedro Alves <palves@redhat.com>
7671
7672 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
7673 operator bool, has_value and get methods.
7674
7675 2017-04-04 Pedro Alves <palves@redhat.com>
7676
7677 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
7678 fields.
7679 (line_header): Initialize all data fields. Change type of
7680 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
7681 Change type of include_dirs to std::vector<const char *>. Remove
7682 num_include_dirs, include_dirs_size. Change type of file_names to
7683 std::vector<file_entry>. Remove num_file_names, file_names_size.
7684 (line_header::line_header): New.
7685 (line_header::add_include_dir, line_header::add_file_name): New
7686 methods.
7687 (line_header::include_dir_at): Remove NULL check.
7688 (line_header::file_name_at): Add const overload.
7689 (line_header_up): New unique_ptr typedef.
7690 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
7691 std::vector. Remove free_line_header call.
7692 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
7693 free_line_header call.
7694 (free_cu_line_header): Delete.
7695 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
7696 (setup_type_unit_groups): Use line_header_up instead of cleanups.
7697 Adjust to use std::vector.
7698 (free_line_header): Delete.
7699 (free_line_header_voidp): Use delete.
7700 (add_include_dir): Replace with ...
7701 (line_header::add_include_dir): ... this method. Use std::vector.
7702 (add_file_name): Replace with ...
7703 (line_header::add_file_name): ... this method. Use std::vector.
7704 (add_include_dir_stub): Delete.
7705 (read_formatted_entries): Remove memset.
7706 (dwarf_decode_line_header): Return a line_header_up instead of a
7707 raw pointer. Remove cleanup handling. Pass lambdas to
7708 read_formatted_entries. Adjust to use line_header methods.
7709 (dwarf_decode_lines_1): Adjust to use line_header methods.
7710 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
7711 use std::vector.
7712
7713 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
7714
7715 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
7716 instead of struct ptid.
7717
7718 2017-05-04 Alan Hayward <alan.hayward@arm.com>
7719
7720 * frame.c (get_frame_register_bytes): Unwind using value.
7721 (put_frame_register_bytes): Likewise.
7722
7723 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
7724
7725 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
7726 aggregate-like.
7727
7728 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
7729
7730 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
7731
7732 2017-03-29 Yao Qi <yao.qi@linaro.org>
7733
7734 * gdbthread.h (struct thread_info): Declare constructor and
7735 destructor. Add some in-class member initializers.
7736 * thread.c (free_thread): Remove.
7737 (init_thread_list): Call delete instead of free_thread.
7738 (new_thread): Call thread_info constructor.
7739 (thread_info::thread_info): New function.
7740 (thread_info::~thread_info): New function.
7741 (delete_thread_1): Call delete instead of free_thread.
7742 (make_cleanup_restore_current_thread): Move tp and frame to
7743 inner block.
7744
7745 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
7746
7747 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
7748 (arc_skip_prologue): Likewise.
7749 (arc_make_frame_cache): Likewise.
7750 (arc_pv_get_operand): New function.
7751 (arc_is_in_prologue): Likewise.
7752 (arc_analyze_prologue): Likewise.
7753 (arc_print_frame_cache): Likewise.
7754 (MAX_PROLOGUE_LENGTH): New constant.
7755
7756 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
7757
7758 * configure.tgt: Add arc-insn.o.
7759 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
7760 (dump_arc_instruction_command): New function.
7761 (arc_fprintf_disasm): Likewise.
7762 (arc_disassemble_info): Likewise.
7763 (arc_insn_get_operand_value): Likewise.
7764 (arc_insn_get_operand_value_signed): Likewise.
7765 (arc_insn_get_memory_base_reg): Likewise.
7766 (arc_insn_get_memory_offset): Likewise.
7767 (arc_insn_get_branch_target): Likewise.
7768 (arc_insn_dump): Likewise.
7769 (arc_insn_get_linear_next_pc): Likewise.
7770 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
7771 (arc_disassemble_info): Likewise.
7772 (arc_insn_get_branch_target): Likewise.
7773 (arc_insn_get_linear_next_pc): Likewise.
7774 * NEWS: Mention new "maint print arc arc-instruction".
7775
7776 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
7777
7778 * arc-tdep (maintenance_print_arc_list): New variable.
7779 (maintenance_print_arc_command): New function.
7780
7781 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
7782
7783 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
7784 Add "limm" and "reserved".
7785 (arc_cannot_fetch_register, arc_cannot_store_register): Add
7786 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
7787 * arc-tdep.h (arc_regnum): Likewise.
7788
7789 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7790
7791 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
7792 for THREADPTR register.
7793 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
7794 register.
7795 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
7796 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
7797 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
7798
7799 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7800
7801 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
7802 registers above gdbarch_num_regs (gdbarch) as privileged in
7803 call0 ABI.
7804
7805 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7806
7807 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
7808 for a single specified register or for all registers in
7809 a0_base..a0_base + C0_NREGS range.
7810 (supply_gregset_reg): Call regcache_raw_supply for a single
7811 specified register or for all registers in a0_base..a0_base +
7812 C0_NREGS range.
7813
7814 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7815
7816 * arch/xtensa.h (C0_NREGS): Add definition.
7817 * xtensa-tdep.c (C0_NREGS): Remove definition.
7818
7819 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7820
7821 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
7822 Drop xtensa_default_isa initialization.
7823 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
7824
7825 2017-03-27 Pedro Alves <palves@redhat.com>
7826
7827 * dwarf2read.c (file_entry) <dir_index>: Add comment.
7828 (file_entry::include_dir): New method.
7829 (line_header::include_dir_at, line_header::file_name_at): New
7830 methods.
7831 (setup_type_unit_groups, setup_type_unit_groups)
7832 (psymtab_include_file_name): Simplify using the new methods.
7833 (lnp_state_machine) <the_line_header>: New field.
7834 <file>: Add comment.
7835 (lnp_state_machine::current_file): New method.
7836 (dwarf_record_line): Simplify using the new methods.
7837 (init_lnp_state_machine): Initialize the "the_line_header" field.
7838 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
7839 Simplify using the new methods.
7840
7841 2017-03-27 Pedro Alves <palves@redhat.com>
7842
7843 * cp-name-parser.y (make_empty): Delete.
7844 (demangler_special, nested_name, ptr_operator, array_indicator)
7845 (direct_declarator, declarator_1): Use fill_comp instead of
7846 make_empty.
7847
7848 2017-03-27 Pedro Alves <palves@redhat.com>
7849
7850 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
7851 to ATTRIBUTE_PRINTF.
7852 * solib-target.c (library_list_start_list): Print "string" not
7853 "version".
7854 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
7855 gdb_xml_error call.
7856
7857 2017-03-27 Pedro Alves <palves@redhat.com>
7858
7859 * dwarf2read.c (struct file_and_directory): New.
7860 (dwarf2_get_dwz_file): Adjust to use std::string.
7861 (dw2_get_file_names_reader): Adjust to use file_and_directory.
7862 (find_file_and_directory): Adjust to return a file_and_directory
7863 object.
7864 (read_file_scope): Adjust to use file_and_directory. Remove
7865 make_cleanup/do_cleanups calls.
7866 (open_and_init_dwp_file): Adjust to use std::string. Remove
7867 make_cleanup/do_cleanups calls.
7868 * python/python.c (do_start_initialization): Adjust to ldirname
7869 returning a std::string.
7870 * utils.c (ldirname): Now returns a std::string.
7871 * utils.h (ldirname): Change return type to std::string.
7872 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
7873 returning a std::string.
7874 * xml-tdesc.c (file_read_description_xml): Likewise.
7875
7876 2017-03-24 Alan Hayward <alan.hayward@arm.com>
7877
7878 * regcache.c (regcache_debug_print_register): New function.
7879 * regcache.h (regcache_debug_print_register): New declaration.
7880 * target.c (debug_print_register): Remove.
7881 (target_fetch_registers): Call regcache_debug_print_register.
7882 (target_store_registers): Likewise.
7883
7884 2017-03-24 Pádraig Brady <pbrady@fb.com>
7885
7886 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
7887 reference beyond the 'lh->include_dirs' array before accessing to
7888 it.
7889 (psymtab_include_file_name): Likewise.
7890 (dwarf_decode_lines_1): Likewise.
7891 (dwarf_decode_lines): Likewise.
7892 (file_file_name): Likewise.
7893
7894 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
7895
7896 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
7897 inferior_ptid.
7898 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
7899 ps_lsetfpregs): Likewise.
7900 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
7901 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
7902 ps_lsetfpregs): Likewise.
7903 * target.c (target_fetch_registers, target_store_registers):
7904 Remove asserts.
7905
7906 2017-03-23 Alan Hayward <alan.hayward@arm.com>
7907
7908 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
7909
7910 2017-03-23 Yao Qi <yao.qi@linaro.org>
7911
7912 * aarch64-tdep.c (aarch64_process_record_test): Declare.
7913 (_initialize_aarch64_tdep): Register it.
7914 (aarch64_record_load_store): Handle PRFM instruction.
7915 (aarch64_process_record_test): New function.
7916
7917 2017-03-23 Yao Qi <yao.qi@linaro.org>
7918
7919 * aarch64-tdep.c (aarch64_record_load_store): Fix code
7920 indentation.
7921
7922 2017-03-23 Yao Qi <yao.qi@linaro.org>
7923
7924 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
7925
7926 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7927
7928 python/python.c (do_start_initialization): Fix memory leak.
7929
7930 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7931
7932 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
7933 using get_ptrace_pid.
7934 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
7935 inferior_ptid.
7936 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
7937 inferior_ptid instead of pid.
7938
7939 2017-03-22 Yao Qi <yao.qi@linaro.org>
7940
7941 * aarch64-tdep.c: Wrap locally used classes in anonymous
7942 namespace.
7943 * arm-tdep.c: Likewise.
7944 * linespec.c: Likewise.
7945 * ui-out.c: Likewise.
7946
7947 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
7948
7949 PR gdb/19637
7950 * python/lib/gdb/printer/bound_registers.py: Import sys.
7951
7952 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
7953
7954 * windows-nat.c (do_windows_fetch_inferior_registers): Add
7955 windows_thread_info parameter and use it instead of
7956 current_thread.
7957 (windows_fetch_inferior_registers): Don't set current_thread,
7958 pass the thread to do_windows_fetch_inferior_registers. Use
7959 ptid from regcache instead of inferior_ptid.
7960 (do_windows_store_inferior_registers): Add windows_thread_info
7961 parameter and use it instead of current_thread.
7962 (windows_store_inferior_registers): Don't set current_thread,
7963 pass the thread to do_windows_store_inferior_registers. Use
7964 ptid from regcache instead of inferior_ptid.
7965
7966 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
7967
7968 * ser-mingw.c (ser_windows_raw): Remove reference to
7969 struct serial::current_timeout.
7970
7971 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
7972
7973 PR tdep/20928
7974 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
7975 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
7976 (sparc64_fsr_type): Fix %fsr decoding.
7977
7978 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
7979
7980 * python/py-record-btrace.c (btpy_insn_data): Change return type
7981 for Python 2.
7982
7983 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
7984
7985 * spu-linux-nat.c (spu_fetch_inferior_registers,
7986 spu_store_inferior_registers): Use ptid from regcache, set and
7987 restore inferior_ptid.
7988 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
7989 Likewise.
7990
7991 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
7992
7993 * i386-linux-nat.c (fetch_register, store_register,
7994 i386_linux_fetch_inferior_registers,
7995 i386_linux_store_inferior_registers): Use ptid from regcache.
7996 * ia64-linux-nat.c (ia64_linux_fetch_register,
7997 ia64_linux_store_register): Likewise.
7998 * inf-ptrace.c (inf_ptrace_fetch_register,
7999 inf_ptrace_store_register): Likewise.
8000 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8001 m32r_linux_store_inferior_registers): Likewise.
8002 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8003 m68kbsd_store_inferior_registers): Likewise.
8004 * m68k-linux-nat.c (fetch_register, store_register,
8005 m68k_linux_fetch_inferior_registers,
8006 m68k_linux_store_inferior_registers): Likewise.
8007 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8008 m88kbsd_store_inferior_registers): Likewise.
8009 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8010 mips_fbsd_store_inferior_registers): Likewise.
8011 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8012 mips64_linux_regsets_store_registers): Likewise.
8013 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8014 mipsnbsd_store_inferior_registers): Likewise.
8015 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8016 mips64obsd_store_inferior_registers): Likewise.
8017 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8018 Likewise.
8019 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8020 ppcfbsd_store_inferior_registers): Likewise.
8021 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8022 ppc_linux_store_inferior_registers): Likewise.
8023 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8024 ppcnbsd_store_inferior_registers): Likewise.
8025 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8026 ppcobsd_store_registers): Likewise.
8027 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8028 Likewise.
8029 * ravenscar-thread.c (ravenscar_fetch_registers,
8030 ravenscar_store_registers, ravenscar_prepare_to_store):
8031 Likewise.
8032 * record-btrace.c (record_btrace_fetch_registers,
8033 record_btrace_store_registers, record_btrace_prepare_to_store):
8034 Likewise.
8035 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8036 Lookup inferior using ptid from regcache, instead of
8037 current_inferior.
8038 * remote.c (remote_fetch_registers, remote_store_registers): Use
8039 ptid from regcache.
8040 * rs6000-nat.c (fetch_register, store_register): Likewise.
8041 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8042 s390_linux_store_inferior_registers): Likewise.
8043 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8044 shnbsd_store_inferior_registers): Likewise.
8045 * sol-thread.c (sol_thread_fetch_registers,
8046 sol_thread_store_registers): Likewise.
8047 * sparc-nat.c (sparc_fetch_inferior_registers,
8048 sparc_store_inferior_registers): Likewise.
8049 * tilegx-linux-nat.c (fetch_inferior_registers,
8050 store_inferior_registers): Likewise.
8051 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8052 vaxbsd_store_inferior_registers): Likewise.
8053 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8054 store_xtregs): Likewise.
8055
8056 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8057
8058 PR gdb/14441
8059 * NEWS: Mention support for rvalue references in GDB and python.
8060 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8061 supports both lvalue and rvalue references.
8062
8063 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8064
8065 PR gdb/14441
8066 * gdbtypes.c (rank_one_type): Implement overloading
8067 resolution rules regarding rvalue references.
8068
8069 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8070
8071 PR gdb/14441
8072 * aarch64-tdep.c (aarch64_type_align)
8073 (aarch64_extract_return_value, aarch64_store_return_value): Change
8074 lvalue reference type checks to general reference type checks.
8075 * amd64-tdep.c (amd64_classify): Likewise.
8076 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8077 Likewise.
8078 * arm-tdep.c (arm_type_align, arm_extract_return_value)
8079 (arm_store_return_value): Likewise.
8080 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8081 * c-typeprint.c (c_print_type): Likewise.
8082 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8083 (cplus_number_of_children, cplus_describe_child): Likewise.
8084 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8085 * completer.c (expression_completer): Likewise.
8086 * cp-support.c (make_symbol_overload_list_adl_namespace):
8087 Likewise.
8088 * darwin-nat-info.c (info_mach_region_command): Likewise.
8089 * dwarf2loc.c (entry_data_value_coerce_ref)
8090 (value_of_dwarf_reg_entry): Likewise.
8091 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8092 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8093 Likewise.
8094 * findvar.c (extract_typed_address, store_typed_address):
8095 Likewise.
8096 * gdbtypes.c (rank_one_type): Likewise.
8097 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8098 * infcall.c (value_arg_coerce): Likewise.
8099 * language.c (pointer_type): Likewise.
8100 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8101 Likewise.
8102 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8103 * mn10300-tdep.c (mn10300_type_align): Likewise.
8104 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8105 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8106 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8107 Likewise.
8108 * printcmd.c (print_formatted, x_command): Likewise.
8109 * python/py-type.c (typy_get_composite, typy_template_argument):
8110 Likewise.
8111 * python/py-value.c (valpy_referenced_value)
8112 (valpy_get_dynamic_type, value_has_field): Likewise.
8113 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8114 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8115 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8116 * spu-tdep.c (spu_scalar_value_p): Likewise.
8117 * symtab.c (lookup_symbol_aux): Likewise.
8118 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8119 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8120 Likewise.
8121 * valops.c (value_cast_pointers, value_cast)
8122 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8123 (value_struct_elt, value_struct_elt_bitpos)
8124 (value_find_oload_method_list, find_overload_match)
8125 (value_rtti_indirect_type): Likewise.
8126 * valprint.c (val_print_scalar_type_p, generic_val_print):
8127 Likewise.
8128 * value.c (value_actual_type, value_as_address, unpack_long)
8129 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8130 (coerce_ref): Likewise.
8131 * varobj.c (varobj_get_value_type): Likewise.
8132
8133 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8134
8135 PR gdb/14441
8136 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8137 table of constants.
8138 * python/lib/gdb/command/explore.py: Support exploring values
8139 of rvalue reference types.
8140 * python/lib/gdb/types.py: Implement get_basic_type() for
8141 rvalue reference types.
8142 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8143 constant.
8144 * python/py-value.c (valpy_getitem): Add an rvalue reference
8145 check.
8146 (valpy_reference_value): Add new parameter "refcode".
8147 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8148 New wrappers for valpy_reference_value().
8149 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8150 (gdbpy_invoke_xmethod): Likewise.
8151
8152 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8153
8154 PR gdb/14441
8155 * dwarf2read.c (process_die, read_type_die_1): Handle the
8156 DW_TAG_rvalue_reference_type DIE.
8157 (read_tag_reference_type): Add new parameter "refcode".
8158
8159 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8160
8161 PR gdb/14441
8162 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8163 (c_type_print_modifier, c_type_print_varspec_suffix)
8164 (c_type_print_base): Support printing rvalue reference types.
8165 * c-valprint.c (c_val_print, c_value_print): Support printing
8166 rvalue reference values.
8167
8168 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8169
8170 PR gdb/14441
8171 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8172 typename.
8173 * cp-support.c (replace_typedefs): Handle
8174 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8175 * python/py-type.c (typy_lookup_type): Likewise.
8176
8177 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8178
8179 PR gdb/14441
8180 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8181 * parse.c (insert_type): Change assert statement.
8182 (follow_types): Handle rvalue reference types.
8183 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8184 constant.
8185
8186 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8187
8188 PR gdb/14441
8189 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8190 value_ref() interface.
8191 * c-valprint.c (c_value_print): Likewise.
8192 * infcall.c (value_arg_coerce): Likewise.
8193 * python/py-value.c (valpy_reference_value): Likewise.
8194 * valops.c (value_cast, value_reinterpret_cast)
8195 (value_dynamic_cast, typecmp): Likewise.
8196 (value_ref): Parameterize by kind of return value reference type.
8197 * value.h (value_ref): Add new parameter "refcode".
8198
8199 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8200
8201 PR gdb/14441
8202 * dwarf2read.c (read_tag_reference_type): Use
8203 lookup_lvalue_reference_type() instead of lookup_reference_type().
8204 * eval.c (evaluate_subexp_standard): Likewise.
8205 * f-exp.y: Likewise.
8206 * gdbtypes.c (make_reference_type, lookup_reference_type):
8207 Generalize with rvalue reference types.
8208 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
8209 convenience wrappers for lookup_reference_type().
8210 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
8211 reference kind parameter.
8212 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
8213 wrappers for lookup_reference_type().
8214 * guile/scm-type.c (gdbscm_type_reference): Use
8215 lookup_lvalue_reference_type() instead of lookup_reference_type().
8216 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
8217 * parse.c (follow_types): Likewise.
8218 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
8219 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
8220 Likewise.
8221 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8222 (gdbpy_invoke_xmethod): Likewise.
8223 * stabsread.c: Provide extra argument to make_reference_type()
8224 call.
8225 * valops.c (value_ref, value_rtti_indirect_type): Use
8226 lookup_lvalue_reference_type() instead of lookup_reference_type().
8227
8228 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8229
8230 PR gdb/14441
8231 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
8232 (TYPE_IS_REFERENCE): New macro.
8233 (struct type): Add rvalue_reference_type field.
8234 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
8235
8236 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8237
8238 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
8239 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
8240 New function definition.
8241 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
8242 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
8243 New function declaration.
8244 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
8245 * mi/mi-interp.h: New file.
8246 * solib.c (info_sharedlibrary_command): Replace for loop with
8247 ALL_SO_LIBS macro
8248 * solib.h (update_solib_list): New function declaration.
8249 (so_list_head): Move macro.
8250 * solist.h (ALL_SO_LIBS): New macro.
8251
8252 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8253
8254 * infcmd.c (post_create_inferior): Remove unused argument in
8255 call to solib_add.
8256 * remote.c (remote_start_remote): Likewise.
8257 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
8258 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
8259 (enable_break): Likewise.
8260 * solib.c (update_solib_list): Remove unused target argument
8261 and its documentation.
8262 (solib_add): Remove unused target argument. Remove unused
8263 argument in call to update_solib_list.
8264 (info_sharedlibrary_command): Remove unused argument in call
8265 to update_solib_list.
8266 (sharedlibrary_command): Remove unused argument in call to
8267 solib_add.
8268 (handle_solib_event): Likewise.
8269 (reload_shared_libraries): Likewise.
8270 * solib.h (solib_add): Remove unused target argument.
8271
8272 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
8273
8274 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
8275 (s390_displaced_step_fixup): Cover relative branches with the
8276 default fixup handling. This fixes lack of support for some
8277 relative branch instructions.
8278
8279 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8280
8281 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
8282 ptid from regcache.
8283
8284 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8285
8286 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
8287 i386_darwin_store_inferior_registers): Use ptid from regcache.
8288
8289 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8290
8291 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
8292 i386bsd_store_inferior_registers): Use ptid from regcache.
8293
8294 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8295
8296 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
8297 hppaobsd_store_registers): Use ptid from regcache.
8298
8299 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8300
8301 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
8302 hppanbsd_store_registers): Use ptid from regcache.
8303
8304 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8305
8306 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
8307 from regcache. Use get_ptrace_pid.
8308
8309 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8310
8311 * corelow.c (get_core_register_section): Use ptid from regcache,
8312 update doc.
8313
8314 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8315
8316 * bsd-uthread.c (bsd_uthread_fetch_registers,
8317 bsd_uthread_store_registers): Use ptid from regcache, set and
8318 restore inferior_ptid.
8319
8320 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8321
8322 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
8323 fetch_fp_regs, store_register, store_regs, store_fp_register,
8324 store_fp_regs): Use ptid from regcache.
8325
8326 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8327
8328 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
8329 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
8330 store_vfp_regs): Use ptid from regcache.
8331
8332 2017-03-17 Pedro Alves <palves@redhat.com>
8333
8334 PR remote/21188
8335 * ser-base.c (ser_base_wait_for): Add comment.
8336 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
8337 version.
8338 * ser-unix.c (hardwire_raw): Remove reference to
8339 scb->current_timeout.
8340 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
8341 (hardwire_ops): Install ser_base_readchar instead of
8342 hardwire_readchar.
8343 * serial.h (struct serial) <current_timeout, timeout_remaining>:
8344 Remove fields.
8345
8346 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
8347
8348 PR gdb/19637
8349 * python/lib/gdb/printer/bound_registers.py: Add support for
8350 Python 3.
8351
8352 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8353
8354 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
8355 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
8356 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
8357 byte_offset to subobj_byte_offset. Fix the handling of
8358 DWARF_VALUE_STACK on big-endian targets when coming via an
8359 implicit pointer.
8360 (dwarf2_evaluate_loc_desc): Adjust call to
8361 dwarf2_evaluate_loc_desc_full.
8362 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
8363 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
8364
8365 2017-03-16 Yao Qi <yao.qi@linaro.org>
8366
8367 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
8368 and REVSH instructions.
8369
8370 2017-03-16 Yao Qi <yao.qi@linaro.org>
8371
8372 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
8373 (arm_record_test): Declare.
8374 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
8375 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
8376 align with the manual.
8377 (thumb_record_misc): Adjust the code order to align with the
8378 manual.
8379 (thumb2_record_decode_insn_handler): Fix instruction matching.
8380 (instruction_reader_thumb): New class.
8381 (arm_record_test): New function.
8382
8383 2017-03-16 Yao Qi <yao.qi@linaro.org>
8384
8385 * arm-tdep.c (abstract_memory_reader): New class.
8386 (instruction_reader): New class.
8387 (extract_arm_insn): Add argument 'reader'. Callers updated.
8388 (decode_insn): Likewise.
8389
8390 2017-03-16 Doug Evans <dje@google.com>
8391
8392 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
8393 member. Change type of TYPE member to SCM. All uses updated.
8394 (lsscm_make_lazy_string_smob): Add assert.
8395 (lsscm_make_lazy_string): Flag bad length values.
8396 (lsscm_elt_type): New function.
8397 (gdbscm_lazy_string_to_value): Rewrite to use
8398 lsscm_safe_lazy_string_to_value.
8399 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
8400 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
8401 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
8402 in incoming type.
8403 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8404 * guile/scm-type.c (tyscm_scm_to_type): New function.
8405
8406 2017-03-15 Doug Evans <dje@google.com>
8407
8408 PR python/17728, python/18439, python/18779
8409 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
8410 member. Change type of TYPE member to PyObject *. All uses updated.
8411 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
8412 (gdbpy_create_lazy_string_object): Flag bad length values.
8413 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
8414 Handle typedefs in incoming type.
8415 (stpy_lazy_string_elt_type): New function.
8416 (gdbpy_extract_lazy_string): Call it.
8417 * python/py-value.c (valpy_lazy_string): Flag bad length values.
8418 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
8419 typedefs in incoming type.
8420
8421 2017-03-16 Doug Evans <dje@google.com>
8422
8423 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8424 * guile/scm-type.c (tyscm_scm_to_type): New function.
8425
8426 2017-03-16 Jiong Wang <jiong.wang@arm.com>
8427
8428 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
8429 "ULONGEST" for "skip".
8430
8431 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
8432
8433 PR gdb/21220
8434 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
8435 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
8436 (inf_ptrace_peek_poke): ...here. New function. Now also loop
8437 over ptrace peek/poke until end of buffer or error.
8438
8439 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
8440
8441 * parse.c (length_of_subexp): Make static.
8442 * parser-defs.h (length_of_subexp): Remove.
8443
8444 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
8445
8446 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
8447 as well.
8448
8449 2017-03-14 Pedro Alves <palves@redhat.com>
8450
8451 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
8452 (main): Use std::unique_ptr. Remove calls to
8453 cp_demangled_name_parse_free.
8454
8455 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8456
8457 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
8458 alphabsd_store_inferior_registers): Use regcache->ptid instead
8459 of inferior_ptid.
8460
8461 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8462
8463 * aix-thread.c (aix_thread_fetch_registers,
8464 aix_thread_store_registers): Use regcache->ptid instead of
8465 inferior_ptid.
8466
8467 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8468
8469 * aarch64-linux-nat.c (fetch_gregs_from_thread,
8470 store_gregs_to_thread, fetch_fpregs_from_thread,
8471 store_fpregs_to_thread): Use regcache->ptid instead of
8472 inferior_ptid.
8473
8474 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8475
8476 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
8477 amd64_linux_fetch_inferior_registers): Use regcache->ptid
8478 instead of inferior_ptid.
8479
8480 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8481
8482 * target.c (target_fetch_registers, target_store_registers): Add
8483 assert.
8484
8485 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8486
8487 * regcache.h (regcache_get_ptid): New function.
8488 * regcache.c (regcache_get_ptid): New function.
8489
8490 2017-03-13 Mark Wielaard <mark@klomp.org>
8491
8492 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
8493
8494 2017-03-10 Keith Seitz <keiths@redhat.com>
8495
8496 PR c++/8218
8497 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
8498
8499 2017-03-08 Pedro Alves <palves@redhat.com>
8500
8501 PR gdb/18360
8502 * infrun.c (start_step_over, do_target_resume, resume)
8503 (restart_threads): Assert we're not resuming a thread that is
8504 meant to be stopped.
8505 (infrun_thread_stop_requested_callback): Delete.
8506 (infrun_thread_stop_requested): If the thread is internally
8507 stopped, queue a pending stop event and clear the thread's
8508 inline-frame state.
8509 (handle_stop_requested): New function.
8510 (handle_syscall_event, handle_inferior_event_1): Use
8511 handle_stop_requested.
8512 (handle_stop_requested): New function.
8513 (handle_signal_stop): Set the thread's stop_signal here instead of
8514 at caller.
8515 (finish_step_over): Clear step over info unconditionally.
8516 (handle_signal_stop): If the user had interrupted the event
8517 thread, consider the stop a random signal.
8518 (handle_signal_stop) <signal arrived while stepping over
8519 breakpoint>: Don't restart threads here.
8520 (stop_waiting): Don't clear step-over info here.
8521
8522 2017-03-08 Pedro Alves <palves@redhat.com>
8523
8524 PR 21206
8525 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
8526 goes to argument 2, not 1.
8527
8528 2017-03-08 Pedro Alves <palves@redhat.com>
8529
8530 PR cli/21218
8531 * top.c (gdb_readline_wrapper): Avoid passing NULL to
8532 display_gdb_prompt.
8533 (command_line_input): Add comment.
8534
8535 2017-03-08 Pedro Alves <palves@redhat.com>
8536
8537 PR tui/21216
8538 * tui/tui-file.c (tui_file::write): New.
8539 * tui/tui-file.h (tui_file): Override "write".
8540 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
8541 factored out from ...
8542 (tui_puts): ... here.
8543 (tui_putc): Use them.
8544 (tui_write): New function.
8545 * tui/tui-io.h (tui_write): Declare.
8546
8547 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
8548
8549 * Makefile.in (SFILES): Replace "environ.c" with
8550 "common/environ.c".
8551 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
8552 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
8553 to...
8554 * common/environ.c: ... here.
8555 * environ.h: Moved to...
8556 * common/environ.h: ... here.
8557
8558 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
8559
8560 * gdbarch.sh (pstring_ptr): New static function.
8561 (gdbarch_disassembler_options): Use it.
8562 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
8563 not valid_disassembler_option->name.
8564 * gdbarch.c: Regenerate.
8565
8566 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
8567
8568 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
8569
8570 2017-03-07 Pedro Alves <palves@redhat.com>
8571
8572 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
8573
8574 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
8575
8576 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
8577 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
8578 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
8579 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
8580
8581 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
8582
8583 * xtensa-linux-nat.c (fetch_gregs): Remove const.
8584
8585 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
8586
8587 * remote.c (remote_add_target_side_commands): Use range-based
8588 for loop.
8589
8590 2017-03-03 Yao Qi <yao.qi@linaro.org>
8591
8592 PR gdb/21165
8593 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
8594 value is lazy.
8595 * valprint.c (common_val_print): Likewise.
8596
8597 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
8598
8599 * NEWS: Mention new set/show disassembler-options commands.
8600 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
8601 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
8602 (prospective_options): New static variable.
8603 (gdb_disassembler::gdb_disassembler): Initialize
8604 m_di.disassembler_options.
8605 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
8606 (get_disassembler_options): New function.
8607 (set_disassembler_options): Likewise.
8608 (set_disassembler_options_sfunc): Likewise.
8609 (show_disassembler_options_sfunc): Likewise.
8610 (disassembler_options_completer): Likewise.
8611 (_initialize_disasm): Likewise.
8612 * disasm.h (get_disassembler_options): New prototype.
8613 (set_disassembler_options): Likewise.
8614 * gdbarch.sh (gdbarch_disassembler_options): New variable.
8615 (gdbarch_verify_disassembler_options): Likewise.
8616 * gdbarch.c: Regenerate.
8617 * gdbarch.h: Likewise.
8618 * arm-tdep.c (num_disassembly_options): Delete.
8619 (set_disassembly_style): Likewise.
8620 (arm_disassembler_options): New static variable.
8621 (set_disassembly_style_sfunc): Convert short style name into long
8622 option name. Call set_disassembler_options.
8623 (show_disassembly_style_sfunc): New function.
8624 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
8625 set_gdbarch_verify_disassembler_options.
8626 (_initialize_arm_tdep): Delete regnames variable and update callers.
8627 (arm_disassembler_options): Initialize.
8628 (disasm_options): New variable.
8629 (num_disassembly_options): Rename from this...
8630 (num_disassembly_styles): ...to this. Compute by scanning through
8631 disasm_options.
8632 (valid_disassembly_styles): Initialize using disasm_options.
8633 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
8634 set_arm_regname_option.
8635 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
8636 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
8637 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
8638 set_gdbarch_verify_disassembler_options.
8639 * s390-tdep.c (s390_disassembler_options): New static variable.
8640 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
8641 set_gdbarch_verify_disassembler_options.
8642
8643 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
8644
8645 * remote.c (remote_add_target_side_condition): Remove "struct"
8646 keyword from range-based for loop.
8647
8648 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
8649
8650 * remote.c (remote_add_target_side_condition): Use range-based
8651 for loop. Update comment.
8652
8653 2017-02-27 Yao Qi <yao.qi@linaro.org>
8654
8655 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
8656
8657 2017-02-26 Alan Hayward <alan.hayward@arm.com>
8658
8659 * regcache.c (regcache_raw_update): New function.
8660 (regcache_raw_read): Move code to regcache_raw_update.
8661 * regcache.h (regcache_raw_update): New declaration.
8662 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
8663
8664 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
8665
8666 * dwarf2read.c (create_debug_type_hash_table): Initialize
8667 header.signature and header.type_offset_in_tu.
8668
8669 2017-02-24 Pedro Alves <palves@redhat.com>
8670
8671 * symtab.c (make_file_symbol_completion_list_1): Use
8672 add_symtab_completions.
8673
8674 2017-02-24 Alan Hayward <alan.hayward@arm.com>
8675
8676 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
8677
8678 2017-02-24 Alan Hayward <alan.hayward@arm.com>
8679
8680 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
8681 I386_MAX_REGISTER_SIZE.
8682 (i386_pseudo_register_write): Likewise.
8683 (i386_process_record): Likewise.
8684 * i387-tdep.c (i387_supply_xsave): Likewise.
8685 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
8686 (store_register): Likewise.
8687
8688 2017-02-23 Pedro Alves <palves@redhat.com>
8689
8690 * ada-lang.c: Include "common/function-view.h".
8691 (ada_iterate_over_symbols): Adjust to use function_view as
8692 callback type.
8693 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
8694 (ada_make_symbol_completion_list): Use a lambda.
8695 (ada_exc_search_name_matches): Delete.
8696 (name_matches_regex): New.
8697 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
8698 * compile/compile-c-support.c: Include "common/function-view.h".
8699 (print_one_macro): Change prototype to accept a ui_file pointer.
8700 (write_macro_definitions): Use a lambda.
8701 * dwarf2read.c: Include "common/function-view.h".
8702 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
8703 (dw2_expand_symtabs_matching): Adjust to use function_view as
8704 callback type.
8705 * language.h: Include "common/function-view.h".
8706 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
8707 function_view as callback type.
8708 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
8709 * linespec.c: Include "common/function-view.h".
8710 (collect_info::add_symbol): New method.
8711 (struct symbol_and_data_callback, iterate_inline_only, struct
8712 symbol_matcher_data, iterate_name_matcher): Delete.
8713 (iterate_over_all_matching_symtabs): Adjust to use function_view
8714 as callback type and lambdas.
8715 (iterate_over_file_blocks): Adjust to use function_view as
8716 callback type.
8717 (decode_compound_collector): Now a class with private fields.
8718 (decode_compound_collector::release_symbols): New method.
8719 (collect_one_symbol): Rename to...
8720 (decode_compound_collector::operator()): ... this and adjust.
8721 (lookup_prefix_sym): decode_compound_collector construction bits
8722 move to decode_compound_collector ctor. Pass the
8723 decode_compound_collector object directly as callback. Remove
8724 cleanups and use decode_compound_collector::release_symbols
8725 instead.
8726 (symtab_collector): Now a class with private fields.
8727 (symtab_collector::release_symtabs): New method.
8728 (add_symtabs_to_list): Rename to...
8729 (symtab_collector::operator()): ... this and adjust.
8730 (collect_symtabs_from_filename): symtab_collector construction
8731 bits move to symtab_collector ctor. Pass the symtab_collector
8732 object directly as callback. Remove cleanups and use
8733 symtab_collector::release_symtabs instead.
8734 (collect_symbols): Delete.
8735 (add_matching_symbols_to_info): Use lambdas.
8736 * macrocmd.c (print_macro_callback): Delete.
8737 (info_macro_command): Use a lambda.
8738 (info_macros_command): Pass print_macro_definition as callable
8739 directly.
8740 (print_one_macro): Remove 'ignore' parameter.
8741 (macro_list_command): Adjust.
8742 * macrotab.c (macro_for_each_data::fn): Now a function_view.
8743 (macro_for_each_data::user_data): Delete field.
8744 (foreach_macro): Adjust to call the function_view.
8745 (macro_for_each): Adjust to use function_view as callback type.
8746 (foreach_macro_in_scope): Adjust to call the function_view.
8747 (macro_for_each_in_scope): Adjust to use function_view as callback
8748 type.
8749 * macrotab.h: Include "common/function-view.h".
8750 (macro_callback_fn): Declare a prototype instead of a pointer.
8751 Remove "user_data" parameter.
8752 (macro_for_each, macro_for_each_in_scope): Adjust to use
8753 function_view as callback type.
8754 * psymtab.c (partial_map_expand_apply)
8755 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
8756 Adjust to use function_view as callback type and to return bool.
8757 (psym_expand_symtabs_matching): Adjust to use function_view as
8758 callback types.
8759 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
8760 to use function_view as callback type and to return bool.
8761 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
8762 callback types.
8763 * symfile.c (expand_symtabs_matching): Adjust to use function_view
8764 as callback types.
8765 * symfile.h: Include "common/function-view.h".
8766 (expand_symtabs_file_matcher_ftype)
8767 (expand_symtabs_symbol_matcher_ftype)
8768 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
8769 return bool.
8770 (quick_symbol_functions::map_symtabs_matching_filename)
8771 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
8772 function_view as callback type and return bool.
8773 (expand_symtabs_matching): Adjust to use function_view as callback
8774 type.
8775 (maintenance_expand_name_matcher)
8776 (maintenance_expand_file_matcher): Delete.
8777 (maintenance_expand_symtabs): Use lambdas.
8778 * symtab.c (iterate_over_some_symtabs): Adjust to use
8779 function_view as callback types and return bool.
8780 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
8781 of a cleanup.
8782 (lookup_symtab_callback): Delete.
8783 (lookup_symtab): Use a lambda.
8784 (iterate_over_symbols): Adjust to use function_view as callback
8785 type.
8786 (struct search_symbols_data, search_symbols_file_matches)
8787 (search_symbols_name_matches): Delete.
8788 (search_symbols): Use a pair of lambdas.
8789 (struct add_name_data, add_macro_name, symbol_completion_matcher)
8790 (symtab_expansion_callback): Delete.
8791 (default_make_symbol_completion_list_break_on_1): Use lambdas.
8792 * symtab.h: Include "common/function-view.h".
8793 (iterate_over_some_symtabs): Adjust to use function_view as
8794 callback type and return bool.
8795 (iterate_over_symtabs): Adjust to use function_view as callback
8796 type.
8797 (symbol_found_callback_ftype): Remove 'data' parameter and return
8798 bool.
8799 (iterate_over_symbols): Adjust to use function_view as callback
8800 type.
8801
8802 2017-02-23 Pedro Alves <palves@redhat.com>
8803
8804 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
8805 (%.o) <unittests/%.c>: New pattern.
8806 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
8807 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
8808 * common/function-view.h: New file.
8809 * unittests/function-view-selftests.c: New file.
8810 * configure: Regenerate.
8811
8812 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
8813
8814 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
8815 inferior_ptid.
8816 * go32-nat.c (go32_thread_alive): Likewise.
8817
8818 2017-02-23 Yao Qi <yao.qi@linaro.org>
8819
8820 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
8821 delete.
8822
8823 2017-02-23 Yao Qi <yao.qi@linaro.org>
8824
8825 * varobj.c (varobj_clear_saved_item): Use delete instead of
8826 xfree.
8827 (update_dynamic_varobj_children): Likewise.
8828
8829 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8830
8831 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
8832
8833 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
8834
8835 * common/enum-flags.h (enum_flags::enum_flags): Initialize
8836 m_enum_value to 0 in default constructor.
8837
8838 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8839
8840 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
8841 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
8842 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
8843 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
8844 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
8845 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
8846 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
8847 IS_STORE_CONDITIONAL_INSN.
8848
8849 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8850
8851 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
8852
8853 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8854
8855 * NEWS (Changes since GDB 7.12): Add DWARF-5.
8856
8857 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8858
8859 * dwarf2read.c (skip_one_die, read_attribute_value)
8860 (dwarf2_const_value_attr, dump_die_shallow)
8861 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8862 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
8863
8864 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8865
8866 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
8867 (dwarf_parse_macro_header): Accept DWARF version 5.
8868 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
8869
8870 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8871
8872 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
8873 DW_AT_GNU_*.
8874 * common/common-exceptions.h (enum errors): Likewise.
8875 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
8876 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
8877 (dwarf_expr_context::execute_stack_op): Likewise.
8878 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
8879 Likewise.
8880 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
8881 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
8882 (show_entry_values_debug, call_site_to_target_addr)
8883 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
8884 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
8885 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
8886 (value_of_dwarf_block_entry, indirect_pieced_value)
8887 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
8888 (disassemble_dwarf_expression): Likewise.
8889 * dwarf2read.c (process_die, inherit_abstract_dies)
8890 (read_call_site_scope): Likewise.
8891 * gdbtypes.h (struct func_type, struct call_site_parameter)
8892 (struct call_site): Likewise.
8893 * stack.c (read_frame_arg): Likewise.
8894 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
8895
8896 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8897
8898 * defs.h (read_unsigned_leb128): New declaration.
8899 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
8900 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
8901 (dwarf2_find_location_expression): Call also
8902 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
8903 * dwarf2loc.h (dwarf2_version): New declaration.
8904 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
8905 rnglists.
8906 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
8907 .debug_rnglists.
8908 (struct dwop_section_names): Add loclists_dwo.
8909 (dwop_section_names): Add .debug_loclists.dwo.
8910 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
8911 (struct dwarf2_per_cu_data): Add dwarf_version.
8912 (struct dwo_sections): Add loclists.
8913 (struct attr_abbrev): Add implicit_const.
8914 (read_indirect_line_string): New declaration.
8915 (read_unsigned_leb128): Delete declaration.
8916 (rcuh_kind): New definition.
8917 (read_and_check_comp_unit_head): Change parameter
8918 is_debug_types_section to section_kind.
8919 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
8920 (read_comp_unit_head): Change parameter abfd to section, add parameter
8921 section_kind. Handle DWARF-5.
8922 (error_check_comp_unit_head): Accept also DWARF version 5.
8923 (read_and_check_comp_unit_head): Change parameter
8924 is_debug_types_section to section_kind.
8925 (read_and_check_type_unit_head): Delete function.
8926 (read_abbrev_offset): Handle DWARF-5.
8927 (create_debug_type_hash_table): Add parameter section_kind. Process
8928 only DW_UT_type. Use signature and type_offset_in_tu from struct
8929 comp_unit_head.
8930 (create_debug_types_hash_table): Update create_debug_type_hash_table
8931 caller.
8932 (create_all_type_units): Call create_debug_type_hash_table.
8933 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
8934 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
8935 caller.
8936 (skip_one_die): Handle DW_FORM_implicit_const.
8937 (dwarf2_rnglists_process): New function.
8938 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
8939 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
8940 (read_attribute_value): Handle DW_FORM_implicit_const,
8941 DW_FORM_line_strp.
8942 (read_attribute): Handle DW_FORM_implicit_const.
8943 (read_indirect_string_at_offset_from): New function from
8944 read_indirect_string_at_offset.
8945 (read_indirect_string_at_offset): Call
8946 read_indirect_string_at_offset_from.
8947 (read_indirect_line_string_at_offset): New function.
8948 (read_indirect_string): New function comment.
8949 (read_indirect_line_string): New function.
8950 (read_unsigned_leb128): Make it global.
8951 (dwarf2_string_attr): Handle DWARF-5.
8952 (add_include_dir_stub, read_formatted_entries): New functions.
8953 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
8954 Handle DWARF-5.
8955 (per_cu_header_read_in): Update read_comp_unit_head caller.
8956 (dwarf2_version): New function.
8957 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
8958 rnglists.
8959 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
8960 fields.
8961
8962 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8963
8964 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
8965
8966 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8967
8968 * dwarf2read.c (dwarf2_ranges_process): New function from
8969 dwarf2_ranges_read.
8970 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
8971 dwarf2_ranges_process.
8972
8973 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8974
8975 * dwarf2read.c (create_debug_type_hash_table): New function from
8976 create_debug_types_hash_table.
8977 (create_debug_types_hash_table): Call create_debug_type_hash_table.
8978 (create_all_type_units, open_and_init_dwo_file): Update
8979 create_debug_types_hash_table callers.
8980
8981 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
8982
8983 PR gdb/16188
8984 * fork-child.c (trace_start_error): Fix thinko. va_end should
8985 refer to 'ap', not 'args'.
8986
8987 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
8988 Pedro Alves <palves@redhat.com>
8989
8990 PR gdb/16188
8991 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
8992 calls succeeded.
8993 * fork-child.c (trace_start_error): New function.
8994 (trace_start_error_with_name): Likewise.
8995 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
8996 * inf-ptrace.c (inf_ptrace_me): Likewise.
8997 * inferior.h (trace_start_error): New prototype.
8998 (trace_start_error_with_name): Likewise.
8999
9000 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9001
9002 PR gdb/21164
9003 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9004 NULL before using it.
9005 * symmisc.c (maintenance_print_symbols): Likewise.
9006 (maintenance_print_msymbols): Likewise.
9007
9008 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9009
9010 * NEWS: Add record Python bindings entry.
9011
9012 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9013
9014 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9015 py-record-full.o.
9016 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9017 * python/py-record-btrace.c, python/py-record-btrace.h,
9018 python/py-record-full.c, python/py-record-full.h: New file.
9019 * python/py-record.c: Add include for py-record-btrace.h and
9020 py-record-full.h.
9021 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9022 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9023 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9024 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9025 New definition.
9026 (gdbpy_initialize_btrace): New export.
9027 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9028
9029 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9030
9031 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9032 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9033 * python/py-record.c: New file.
9034 * python/python-internal.h (gdbpy_start_recording,
9035 gdbpy_current_recording, gdpy_stop_recording,
9036 gdbpy_initialize_record): New export.
9037 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9038 (python_GdbMethods): Add gdbpy_start_recording,
9039 gdbpy_current_recording and gdbpy_stop_recording.
9040
9041 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9042
9043 * record-btrace.c (record_btrace_record_method): New function.
9044 (init_record_btrace_ops): Initialize to_record_method.
9045 * record-full.c (record_full_record_method): New function.
9046 (init_record_full_ops, init_record_full_core_ops): Add
9047 record_full_record_method.
9048 * record.h (enum record_method): New enum.
9049 * target-debug.h (target_debug_print_enum_record_method: New define.
9050 * target-delegates.c: Regenerate.
9051 * target.c (target_record_method): New function.
9052 * target.h: Include record.h.
9053 (struct target_ops) <to_record_method>: New field.
9054 (target_record_method): New export.
9055
9056 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9057
9058 * record.h (record_start, record_stop): New export.
9059 * record.c (record_start, record_stop): New function.
9060
9061 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9062
9063 * btrace.c (btrace_fetch): Copy function call segments pointer
9064 into a vector.
9065 (btrace_clear): Clear the vector.
9066 (btrace_find_insn_by_number): Use binary search to find the correct
9067 function call segment.
9068 * btrace.h (brace_fun_p): New typedef.
9069 (struct btrace_thread_info) <functions>: New field.
9070
9071 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9072
9073 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9074 * btrace.c (btrace_decode_error): ... here. New function.
9075 * btrace.h (btrace_decode_error): New export.
9076
9077 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9078
9079 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9080 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9081 btrace_find_insn_by_number): Remove special case for gaps.
9082 * btrace.h (btrace_insn_get_error): New export.
9083 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9084 * record-btrace.c (btrace_insn_history): Print number for gaps.
9085 (record_btrace_info, record_btrace_goto): Handle gaps.
9086
9087 2017-02-14 Tom Tromey <tom@tromey.com>
9088
9089 PR python/13598:
9090 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9091 event.
9092 * python/py-evts.c (gdbpy_initialize_py_events): Add
9093 before_prompt registry.
9094 * python/py-events.h (events_object) <before_prompt>: New field.
9095
9096 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
9097
9098 * btrace.c (ftrace_new_switch): Preserve up link and flags.
9099
9100 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
9101
9102 * symfile (_initialize_symfile): Add usage text to the load command's
9103 help text.
9104
9105 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
9106
9107 * utils.c (defaulted_query): Don't query on secondary UIs.
9108
9109 2017-02-10 Tom Tromey <tom@tromey.com>
9110
9111 * rust-lang.c (rust_get_disr_info): Remove unused variable.
9112
9113 2017-02-10 Tom Tromey <tom@tromey.com>
9114
9115 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9116 "cleanup" local.
9117 * python/py-type.c (typy_legacy_template_argument): Remove
9118 unnecessary "cleanup" local.
9119
9120 2017-02-10 Tom Tromey <tom@tromey.com>
9121
9122 * python/python.c (do_start_initialization): New function, from
9123 _initialize_python.
9124 (_initialize_python): Call do_start_initialization.
9125 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9126 goto.
9127
9128 2017-02-10 Tom Tromey <tom@tromey.com>
9129
9130 * python/py-prettyprint.c (pretty_print_one_value): Use
9131 gdbpy_ref.
9132
9133 2017-02-10 Tom Tromey <tom@tromey.com>
9134
9135 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9136 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9137 gdbpy_ref.
9138 * python/py-type.c (field_new): Use gdbpy_ref.
9139 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9140 gdbpy_ref.
9141 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9142 (py_free_pspace): Likewise.
9143 (pspace_to_pspace_object): Likewise.
9144 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9145 (py_free_objfile): Likewise.
9146 (objfile_to_objfile_object): Likewise.
9147 * python/py-inferior.c (delete_thread_object): Use
9148 gdbpy_ref.
9149 (infpy_read_memory): Likewise.
9150 (py_free_inferior): Likewise.
9151 * python/py-evtregistry.c (create_eventregistry_object): Use
9152 gdbpy_ref.
9153 * python/py-event.c (create_event_object): Use gdbpy_ref.
9154
9155 2017-02-10 Tom Tromey <tom@tromey.com>
9156
9157 * python/py-ref.h (gdbpy_ref_policy): Now a template.
9158 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9159 used.
9160 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9161 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9162 python/py-exitedevent.c, python/py-finishbreakpoint.c,
9163 python/py-framefilter.c, python/py-function.c,
9164 python/py-inferior.c, python/py-infevents.c,
9165 python/py-linetable.c, python/py-newobjfileevent.c,
9166 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9167 python/py-signalevent.c, python/py-stopevent.c,
9168 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9169 python/py-unwind.c, python/py-utils.c, python/py-value.c,
9170 python/py-varobj.c, python/py-xmethods.c, python/python.c,
9171 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9172
9173 2017-02-10 Tom Tromey <tom@tromey.com>
9174
9175 * ui-out.h (ui_out_emit_type): New class.
9176 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9177 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9178 and ui_out_emit_tuple.
9179 (enumerate_locals): Likewise.
9180 (py_mi_print_variables, py_print_locals, py_print_args): Use
9181 ui_out_emit_list.
9182 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9183 ui_out_emit_list.
9184 * common/gdb_optional.h: New file.
9185
9186 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9187
9188 * MAINTAINERS (Write After Approval): Update my e-mail address.
9189
9190 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9191
9192 PR gdb/21122
9193 * breakpoint.c (_initialize_breakpoint): Update the help description
9194 of the 'commands' command to indicate that it takes a list argument.
9195
9196 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
9197
9198 * interps.c (current_interp_set_logging): Remove "return".
9199
9200 2017-02-09 Gary Benson <gbenson@redhat.com>
9201
9202 * symtab.c (add_symtab_completions): Prevent NULL pointer
9203 dereference.
9204
9205 2017-02-08 Pedro Alves <palves@redhat.com>
9206
9207 * interps.c (interp::interp): Remove reference to quiet_p.
9208 (interp_set): Make static. Remove dead "Switching to" output
9209 code.
9210 (interp_quiet_p, interp_set_quiet): Delete.
9211 (interpreter_exec_cmd): Don't set the interpreter quiet.
9212 * interps.h (interp_quiet_p): Make static.
9213 (class interp) <quiet_p>: Remove field
9214
9215 2017-02-08 Jerome Guitton <guitton@adacore.com>
9216
9217 * cli/cli-decode.c (find_command_name_length): Make it extern.
9218 * cli/cli-decode.h (find_command_name_length): Declare.
9219 * cli/cli-script.c (command_name_equals, line_first_arg):
9220 New functions.
9221 (process_next_line): Use cli-decode to parse command names.
9222 (build_command_line): Make args a constant pointer.
9223
9224 2017-02-08 Jerome Guitton <guitton@adacore.com>
9225
9226 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
9227 Remove case-insensitive search.
9228
9229 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
9230
9231 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
9232 at the end of the line. Avoids an ARI warning.
9233
9234 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
9235
9236 * NEWS: Mention support for record/replay of Intel 64 rdrand and
9237 rdseed instructions.
9238 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
9239
9240 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
9241
9242 PR tdep/20936
9243 Provide and use sparc32 and sparc64 target description XML files.
9244 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
9245 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
9246 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
9247 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
9248 * features/sparc/sparc32-solaris.xml: New file.
9249 * features/sparc/sparc64-solaris.xml: New file.
9250 * features/sparc/sparc32-solaris.c: Generated.
9251 * features/sparc/sparc64-solaris.c: Generated.
9252 * sparc-tdep.h: Account for differences in target descriptions.
9253 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
9254 (sparc32_register_type): Use target provided registers.
9255 (validate_tdesc_registers): New function.
9256 (sparc32_gdbarch_init): Use tdesc_has_registers.
9257 Set pseudoregister functions.
9258 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
9259 (sparc64_register_type): Use target provided registers.
9260 (sparc64_init_abi): Set pseudoregister functions.
9261
9262 2017-02-03 Tom Tromey <tom@tromey.com>
9263
9264 PR rust/21097:
9265 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
9266 with a single member.
9267
9268 2017-02-03 Pedro Alves <palves@redhat.com>
9269
9270 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
9271 (cli_interp_base::~cli_interp_base): New.
9272 (cli_interp): New struct.
9273 (as_cli_interp): Cast the interp itself to cli_interp.
9274 (cli_interpreter_pre_command_loop): Rename to ...
9275 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
9276 parameter.
9277 (cli_interpreter_init): Rename to ...
9278 (cli_interp::init): ... this. Remove 'self' parameter. Use
9279 boolean. Make extern.
9280 (cli_interpreter_resume): Rename to ...
9281 (cli_interp::resume): ... this. Remove 'data' parameter. Make
9282 extern.
9283 (cli_interpreter_suspend): Rename to ...
9284 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
9285 extern.
9286 (cli_interpreter_exec): Rename to ...
9287 (cli_interp::exec): ... this. Remove 'data' parameter. Make
9288 extern.
9289 (cli_interpreter_supports_command_editing): Rename to ...
9290 (cli_interp_base::supports_command_editing): ... this. Remove
9291 'interp' parameter. Make extern.
9292 (cli_ui_out): Rename to ...
9293 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
9294 Make extern.
9295 (cli_set_logging): Rename to ...
9296 (cli_interp_base::set_logging): ... this. Remove 'interp'
9297 parameter. Make extern.
9298 (cli_interp_procs): Delete.
9299 (cli_interp_factory): Adjust to use "new".
9300 * cli/cli-interp.h: Include "interps.h".
9301 (struct cli_interp_base): New struct.
9302 * interps.c (struct interp): Delete. Fields moved to interps.h.
9303 (interp_new): Delete.
9304 (interp::interp, interp::~interp): New.
9305 (interp_set): Use bool, and return void. Assume the interpreter
9306 has suspend, init and resume methods, and that the all return
9307 void.
9308 (set_top_level_interpreter): interp_set returns void.
9309 (interp_ui_out): Adapt.
9310 (current_interp_set_logging): Adapt.
9311 (interp_data): Delete.
9312 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
9313 (interp_exec): Adapt.
9314 (top_level_interpreter_data): Delete.
9315 * interps.h (interp_init_ftype, interp_resume_ftype)
9316 (interp_suspend_ftype, interp_exec_ftype)
9317 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
9318 (class interp): New.
9319 (interp_new): Delete.
9320 (interp_set): Now returns void. Use bool.
9321 (interp_data, top_level_interpreter_data): Delete.
9322 * mi/mi-common.h: Include interps.h.
9323 (class mi_interp): Inherit from interp. Define a ctor. Declare
9324 init, resume, suspect, exec, interp_ui_out, set_logging and
9325 pre_command_loop methods.
9326 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
9327 (mi_interpreter_init): Rename to ...
9328 (mi_interp::init): ... this. Remove the 'interp' parameter, use
9329 bool, return void and make extern. Adjust.
9330 (mi_interpreter_resume): ... Rename to ...
9331 (mi_interp::resume): ... this. Remove the 'data' parameter,
9332 return void and make extern. Adjust.
9333 (mi_interpreter_suspend): ... Rename to ...
9334 (mi_interp::suspend): ... this. Remove the 'data' parameter,
9335 return void and make extern. Adjust.
9336 (mi_interpreter_exec): ... Rename to ...
9337 (mi_interp::exec): ... this. Remove the 'data' parameter and make
9338 extern. Adjust.
9339 (mi_interpreter_pre_command_loop): ... Rename to ...
9340 (mi_interp::pre_command_loop): ... this. Remove the 'self'
9341 parameter and make extern.
9342 (mi_on_normal_stop_1): Adjust.
9343 (mi_ui_out): Rename to ...
9344 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
9345 parameter and make extern. Adjust.
9346 (mi_set_logging): Rename to ...
9347 (mi_interp::set_logging): ... this. Remove the 'interp'
9348 parameter and make extern. Adjust.
9349 (mi_interp_procs): Delete.
9350 (mi_interp_factory): Adjust to use 'new'.
9351 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
9352 (mi_print_exception, mi_execute_command, mi_load_progress):
9353 Adjust.
9354 * tui/tui-interp.c (tui_interp): New class.
9355 (as_tui_interp): Return a tui_interp pointer.
9356 (tui_on_normal_stop, tui_on_signal_received)
9357 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
9358 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
9359 to use interp::interp_ui_out.
9360 (tui_init): Rename to ...
9361 (tui_interp::init): ... this. Remove the 'self' parameter, use
9362 bool, return void and make extern. Adjust.
9363 (tui_resume): Rename to ...
9364 (tui_interp::resume): ... this. Remove the 'data' parameter,
9365 return void and make extern. Adjust.
9366 (tui_suspend): Rename to ...
9367 (tui_interp::suspend): ... this. Remove the 'data' parameter,
9368 return void and make extern. Adjust.
9369 (tui_ui_out): Rename to ...
9370 (tui_interp::interp_ui_out): ... this. Remove the 'self'
9371 parameter, and make extern. Adjust.
9372 (tui_exec): Rename to ...
9373 (tui_interp::exec): ... this. Remove the 'data' parameter and
9374 make extern.
9375 (tui_interp_procs): Delete.
9376 (tui_interp_factory): Use "new".
9377
9378 2017-02-02 Tom Tromey <tom@tromey.com>
9379
9380 * rust-exp.y (ends_raw_string, space_then_number)
9381 (rust_identifier_start_p): Return bool.
9382 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
9383 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
9384 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
9385 (rust_chartype_p): Return bool.
9386 (val_print_struct, rust_print_struct_def, rust_print_type):
9387 Update.
9388 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
9389 Return bool.
9390
9391 2017-02-02 Tom Tromey <tom@tromey.com>
9392
9393 * rust-lang.c: Reindent.
9394
9395 2017-02-02 Tom Tromey <tom@tromey.com>
9396
9397 * rust-lang.h (rust_crate_for_block): Update.
9398 * rust-lang.c (rust_crate_for_block): Return std::string.
9399 (rust_get_disr_info): Use std:;string, not
9400 gdb::unique_xmalloc_ptr.
9401 * rust-exp.y (crate_name): Update.
9402
9403 2017-02-02 Pedro Alves <palves@redhat.com>
9404
9405 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
9406 field out of gdb_disassembler_test and make it static.
9407
9408 2017-02-02 Pedro Alves <palves@redhat.com>
9409
9410 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
9411 mi1_interp and mi_interp fields.
9412
9413 2017-02-02 Pedro Alves <palves@redhat.com>
9414
9415 * cli/cli-interp.c (struct saved_output_files, saved_output):
9416 Moved from cli/cli-logging.c.
9417 (cli_set_logging): New function.
9418 (cli_interp_procs): Install cli_set_logging.
9419 * cli/cli-interp.h (make_logging_output, cli_set_logging):
9420 Declare.
9421 * cli/cli-logging.c (struct saved_output_files, saved_output):
9422 Moved to cli/cli-interp.c.
9423 (pop_output_files): Don't save outputs here.
9424 (make_logging_output): New function.
9425 (handle_redirections): Don't build tee nor save previous outputs
9426 here.
9427 * interps.c (current_interp_set_logging): Change prototype.
9428 Assume there's always a set_logging_proc method installed.
9429 * interps.h (interp_set_logging_ftype): Change prototype.
9430 (current_interp_set_logging): Change prototype and adjust comment.
9431 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
9432 use make_logging_output.
9433 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
9434 2017-02-02 Pedro Alves <palves@redhat.com>
9435
9436 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
9437 from ...
9438 (set_logging_overwrite): ... here.
9439 (logging_no_redirect_file): Delete.
9440 (set_logging_redirect): Don't handle redirection on the fly.
9441 Instead warn that "logging off" / "logging on" is necessary.
9442 (pop_output_files): Delete references to logging_no_redirect_file.
9443 (show_logging_command): Always speak in terms of what will happen
9444 once logging is reenabled.
9445
9446 2017-02-02 Pedro Alves <palves@redhat.com>
9447
9448 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
9449
9450 2017-02-02 Pedro Alves <palves@redhat.com>
9451
9452 * disasm.c (gdb_pretty_print_insn): Rename to ...
9453 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
9454 Remove gdbarch parameter. Adapt to clear the object's buffers
9455 instead of allocating new buffers, and to print using the object's
9456 gdb_disassembler instead of calling gdb_print_insn.
9457 (dump_insns): Use gdb_pretty_print_disassembler.
9458 * disasm.h (gdb_pretty_print_insn): Delete declaration.
9459 (gdb_pretty_print_disassembler): New class.
9460 * record-btrace.c (btrace_insn_history): Use
9461 gdb_pretty_print_disassembler.
9462
9463 2017-02-02 Pedro Alves <palves@redhat.com>
9464
9465 * ada-lang.c (type_as_string): Use string_file.
9466 * ada-valprint.c (ada_print_floating): Use string_file.
9467 * ada-varobj.c (ada_varobj_scalar_image)
9468 (ada_varobj_get_value_image): Use string_file.
9469 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
9470 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
9471 * breakpoint.c (update_inserted_breakpoint_locations)
9472 (insert_breakpoint_locations, reattach_breakpoints)
9473 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
9474 (print_it_watchpoint): Use string_file.
9475 (save_breakpoints): Use stdio_file.
9476 * c-exp.y (oper): Use string_file.
9477 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
9478 tee_file.
9479 (pop_output_files): Use delete.
9480 (handle_redirections): Use stdio_file and tee_file.
9481 * cli/cli-setshow.c (do_show_command): Use string_file.
9482 * compile/compile-c-support.c (c_compute_program): Use
9483 string_file.
9484 * compile/compile-c-symbols.c (generate_vla_size): Take a
9485 'string_file &' instead of a 'ui_file *'.
9486 (generate_c_for_for_one_variable): Take a 'string_file &' instead
9487 of a 'ui_file *'. Use string_file.
9488 (generate_c_for_variable_locations): Take a 'string_file &'
9489 instead of a 'ui_file *'.
9490 * compile/compile-internal.h (generate_c_for_for_one_variable):
9491 Take a 'string_file &' instead of a 'ui_file *'.
9492 * compile/compile-loc2c.c (push, pushf, unary, binary)
9493 (print_label, pushf_register_address, pushf_register)
9494 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
9495 'ui_file *'. Adjust.
9496 * compile/compile.c (compile_to_object): Use string_file.
9497 * compile/compile.h (compile_dwarf_expr_to_c)
9498 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
9499 'ui_file *'.
9500 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
9501 (replace_typedefs_qualified_name): Use string_file and
9502 obstack_copy0.
9503 * disasm.c (gdb_pretty_print_insn): Use string_file.
9504 (gdb_disassembly): Adjust reference the null_stream global.
9505 (do_ui_file_delete): Delete.
9506 (gdb_insn_length): Use null_stream.
9507 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
9508 * dwarf2loc.c (dwarf2_compile_property_to_c)
9509 (locexpr_generate_c_location, loclist_generate_c_location): Take a
9510 'string_file &' instead of a 'ui_file *'.
9511 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
9512 * dwarf2read.c (do_ui_file_peek_last): Delete.
9513 (dwarf2_compute_name): Use string_file.
9514 * event-top.c (gdb_setup_readline): Use stdio_file.
9515 * gdbarch.sh (verify_gdbarch): Use string_file.
9516 * gdbtypes.c (safe_parse_type): Use null_stream.
9517 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
9518 string_file.
9519 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
9520 'string_file *' instead of a 'ui_file *'.
9521 (gdbscm_arch_disassemble): Use string_file.
9522 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
9523 * guile/scm-ports.c (class ioscm_file_port): Now a class that
9524 inherits from ui_file.
9525 (ioscm_file_port_delete, ioscm_file_port_rewind)
9526 (ioscm_file_port_put): Delete.
9527 (ioscm_file_port_write): Rename to ...
9528 (ioscm_file_port::write): ... this. Remove file_port_magic
9529 checks.
9530 (ioscm_file_port_new): Delete.
9531 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
9532 ui_file_up.
9533 * guile/scm-type.c (tyscm_type_name): Use string_file.
9534 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
9535 Use string_file.
9536 * infcmd.c (print_return_value_1): Use string_file.
9537 * infrun.c (print_target_wait_results): Use string_file.
9538 * language.c (add_language): Use string_file.
9539 * location.c (explicit_to_string_internal): Use string_file.
9540 * main.c (captured_main_1): Use null_file.
9541 * maint.c (maintenance_print_architecture): Use stdio_file.
9542 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
9543 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
9544 event_channel>: Change type to mi_console_file pointer.
9545 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
9546 (mi_console_file_delete): Delete.
9547 (struct mi_console_file): Delete.
9548 (mi_console_file_magic): Delete.
9549 (mi_console_file_new): Delete.
9550 (mi_console_file::mi_console_file): New.
9551 (mi_console_file_delete): Delete.
9552 (mi_console_file_fputs): Delete.
9553 (mi_console_file::write): New.
9554 (mi_console_raw_packet): Delete.
9555 (mi_console_file::flush): New.
9556 (mi_console_file_flush): Delete.
9557 (mi_console_set_raw): Rename to ...
9558 (mi_console_file::set_raw): ... this.
9559 * mi/mi-console.h (class mi_console_file): New class.
9560 (mi_console_file_new, mi_console_set_raw): Delete.
9561 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
9562 (mi_set_logging): Use delete and tee_file. Adjust.
9563 * mi/mi-main.c (output_register): Use string_file.
9564 (mi_cmd_data_evaluate_expression): Use string_file.
9565 (mi_cmd_data_read_memory): Use string_file.
9566 (mi_cmd_execute, print_variable_or_computed): Use string_file.
9567 * mi/mi-out.c (mi_ui_out::main_stream): New.
9568 (mi_ui_out::rewind): Use main_stream and
9569 string_file.
9570 (mi_ui_out::put): Use main_stream and string_file.
9571 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
9572 Allocate a 'string_file' instead.
9573 (mi_out_new): Don't allocate a mem_fileopen stream here.
9574 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
9575 (mi_ui_out::main_stream): Declare method.
9576 * printcmd.c (eval_command): Use string_file.
9577 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
9578 * python/py-arch.c (archpy_disassemble): Use string_file.
9579 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
9580 * python/py-frame.c (frapy_str): Use string_file.
9581 * python/py-framefilter.c (py_print_type, py_print_single_arg):
9582 Use string_file.
9583 * python/py-type.c (typy_str): Use string_file.
9584 * python/py-unwind.c (unwind_infopy_str): Use string_file.
9585 * python/py-value.c (valpy_str): Use string_file.
9586 * record-btrace.c (btrace_insn_history): Use string_file.
9587 * regcache.c (regcache_print): Use stdio_file.
9588 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
9589 * remote.c (escape_buffer): Use string_file.
9590 * rust-lang.c (rust_get_disr_info): Use string_file.
9591 * serial.c (serial_open_ops_1): Use stdio_file.
9592 (do_serial_close): Use delete.
9593 * stack.c (print_frame_arg): Use string_file.
9594 (print_frame_args): Remove local mem_fileopen stream, not used.
9595 (print_frame): Use string_file.
9596 * symmisc.c (maintenance_print_symbols): Use stdio_file.
9597 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
9598 Take a 'string_file *' instead of a 'ui_file *'.
9599 * top.c (new_ui): Use stdio_file and stderr_file.
9600 (free_ui): Use delete.
9601 (execute_command_to_string): Use string_file.
9602 (quit_confirm): Use string_file.
9603 * tracepoint.c (collection_list::append_exp): Use string_file.
9604 * tui/tui-disasm.c (tui_disassemble): Use string_file.
9605 * tui/tui-file.c: Don't include "ui-file.h".
9606 (enum streamtype, struct tui_stream): Delete.
9607 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
9608 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
9609 (tui_file::tui_file): New method.
9610 (tui_file_fputs): Delete.
9611 (tui_file_get_strbuf): Delete.
9612 (tui_file::puts): New method.
9613 (tui_file_adjust_strbuf): Delete.
9614 (tui_file_flush): Delete.
9615 (tui_file::flush): New method.
9616 * tui/tui-file.h: Tweak intro comment.
9617 Include ui-file.h.
9618 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
9619 (tui_file_adjust_strbuf): Delete declarations.
9620 (class tui_file): New class.
9621 * tui/tui-io.c (tui_initialize_io): Use tui_file.
9622 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
9623 (tui_register_format): Use string_stream.
9624 * tui/tui-stack.c (tui_make_status_line): Use string_file.
9625 (tui_get_function_from_frame): Use string_file.
9626 * typeprint.c (type_to_string): Use string_file.
9627 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
9628 (null_stream): New global.
9629 (ui_file_delete): Delete.
9630 (ui_file::ui_file): New.
9631 (null_file_isatty): Delete.
9632 (ui_file::~ui_file): New.
9633 (null_file_rewind): Delete.
9634 (ui_file::printf): New.
9635 (null_file_put): Delete.
9636 (null_file_flush): Delete.
9637 (ui_file::putstr): New.
9638 (null_file_write): Delete.
9639 (ui_file::putstrn): New.
9640 (null_file_read): Delete.
9641 (ui_file::putc): New.
9642 (null_file_fputs): Delete.
9643 (null_file_write_async_safe): Delete.
9644 (ui_file::vprintf): New.
9645 (null_file_delete): Delete.
9646 (null_file::write): New.
9647 (null_file_fseek): Delete.
9648 (null_file::puts): New.
9649 (ui_file_data): Delete.
9650 (null_file::write_async_safe): New.
9651 (gdb_flush, ui_file_isatty): Adjust.
9652 (ui_file_put, ui_file_rewind): Delete.
9653 (ui_file_write): Adjust.
9654 (ui_file_write_for_put): Delete.
9655 (ui_file_write_async_safe, ui_file_read): Adjust.
9656 (ui_file_fseek): Delete.
9657 (fputs_unfiltered): Adjust.
9658 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
9659 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
9660 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
9661 (set_ui_file_data): Delete.
9662 (string_file::~string_file, string_file::write)
9663 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
9664 (do_ui_file_as_string, ui_file_as_string): Delete.
9665 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
9666 (struct mem_file): Delete.
9667 (mem_file_new): Delete.
9668 (stdio_file::stdio_file): New.
9669 (mem_file_delete): Delete.
9670 (stdio_file::stdio_file): New.
9671 (mem_fileopen): Delete.
9672 (stdio_file::~stdio_file): New.
9673 (mem_file_rewind): Delete.
9674 (stdio_file::set_stream): New.
9675 (mem_file_put): Delete.
9676 (stdio_file::open): New.
9677 (mem_file_write): Delete.
9678 (stdio_file_magic, struct stdio_file): Delete.
9679 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
9680 (stdio_file::flush): New.
9681 (stdio_file_read): Rename to ...
9682 (stdio_file::read): ... this. Adjust.
9683 (stdio_file_write): Rename to ...
9684 (stdio_file::write): ... this. Adjust.
9685 (stdio_file_write_async_safe): Rename to ...
9686 (stdio_file::write_async_safe) ... this. Adjust.
9687 (stdio_file_fputs): Rename to ...
9688 (stdio_file::puts) ... this. Adjust.
9689 (stdio_file_isatty): Delete.
9690 (stdio_file_fseek): Delete.
9691 (stdio_file::isatty): New.
9692 (stderr_file_write): Rename to ...
9693 (stderr_file::write) ... this. Adjust.
9694 (stderr_file_fputs): Rename to ...
9695 (stderr_file::puts) ... this. Adjust.
9696 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
9697 (stderr_file::stderr_file): New.
9698 (tee_file_magic): Delete.
9699 (struct tee_file): Delete.
9700 (tee_file::tee_file): New.
9701 (tee_file_new): Delete.
9702 (tee_file::~tee_file): New.
9703 (tee_file_delete): Delete.
9704 (tee_file_flush): Rename to ...
9705 (tee_file::flush): ... this. Adjust.
9706 (tee_file_write): Rename to ...
9707 (tee_file::write): ... this. Adjust.
9708 (tee_file::write_async_safe): New.
9709 (tee_file_fputs): Rename to ...
9710 (tee_file::puts): ... this. Adjust.
9711 (tee_file_isatty): Rename to ...
9712 (tee_file::isatty): ... this. Adjust.
9713 * ui-file.h (struct obstack, struct ui_file): Don't
9714 forward-declare.
9715 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
9716 (ui_file_write_ftype)
9717 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
9718 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
9719 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
9720 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
9721 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
9722 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
9723 (set_ui_file_fseek): Delete.
9724 (ui_file_data, ui_file_delete, ui_file_rewind)
9725 (struct ui_file): New.
9726 (ui_file_up): New.
9727 (class null_file): New.
9728 (null_stream): Declare.
9729 (ui_file_write_for_put, ui_file_put): Delete.
9730 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
9731 Delete.
9732 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
9733 (gdb_fopen, tee_file_new): Delete.
9734 (struct string_file): New.
9735 (struct stdio_file): New.
9736 (stdio_file_up): New.
9737 (struct stderr_file): New.
9738 (class tee_file): New.
9739 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
9740 of a 'ui_file *'. Adjust.
9741 * ui-out.h (class ui_out) <field_stream>: Likewise.
9742 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
9743 (null_stream): Delete.
9744 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
9745 Adjust.
9746 * utils.h (struct ui_file): Delete forward declaration..
9747 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
9748 (error_stream): Take a 'string_file &' instead of a
9749 'ui_file *'.
9750 * varobj.c (varobj_value_get_print_value): Use string_file.
9751 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
9752 * gdbarch.c: Regenerate.
9753
9754 2017-02-02 Pedro Alves <palves@redhat.com>
9755
9756 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
9757 (gdb_pretty_print_insn): ... this. Now a free function. Add back
9758 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
9759 Adjust to call gdb_print_insn instead of
9760 gdb_disassembler::print_insn.
9761 (dump_insns, do_mixed_source_and_assembly_deprecated)
9762 (do_mixed_source_and_assembly, do_assembly_only): Add back a
9763 'gdbarch' parameter. Remove gdb_disassembler parameter.
9764 (gdb_disassembly): Don't allocate a gdb_disassembler here.
9765 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
9766 declaration.
9767 (gdb_pretty_print_insn): Re-add declaration.
9768 * record-btrace.c (btrace_insn_history): Don't allocate a
9769 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
9770
9771 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
9772
9773 * disasm.h (gdb_disassembly): Remove file_string parameter.
9774 * disasm.c (gdb_disassembly): Likewise.
9775 * cli/cli-cmds.c (print_disassembly): Adapt.
9776 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
9777 * stack.c (do_gdb_disassembly): Likewise.
9778
9779 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
9780
9781 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
9782 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
9783 targets. And if the implicit value is longer than needed, extract
9784 the first bytes instead of the "least significant" ones.
9785
9786 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
9787
9788 * btrace.c (btrace_enable): Do not call btrace_add_pc for
9789 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
9790 (btrace_fetch): Assert can_access_registers_ptid.
9791 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
9792 validate_registers_access.
9793
9794 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
9795
9796 * gdbthread.h (can_access_registers_ptid): New.
9797 * thread.c (can_access_registers_ptid): New.
9798
9799 2017-02-01 Pedro Alves <palves@redhat.com>
9800
9801 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
9802
9803 2017-01-31 Pedro Alves <palves@redhat.com>
9804
9805 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
9806 Fix typos.
9807
9808 2017-01-31 Pedro Alves <palves@redhat.com>
9809
9810 * stack.c (print_frame_args): Remove local mem_fileopen stream,
9811 not used.
9812
9813 2017-01-31 Pedro Alves <palves@redhat.com>
9814
9815 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
9816
9817 2017-01-31 Pedro Alves <palves@redhat.com>
9818
9819 * common/scoped_restore.h
9820 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
9821 change the value's parameter type to T2.
9822 (make_scoped_restore): Likewise.
9823
9824 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
9825 Richard Henderson <rth@redhat.com>
9826
9827 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
9828 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
9829 GS_BASE for older kernels.
9830 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
9831 GS_BASE for older kernels.
9832 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
9833 and GS_BASE to the offset table.
9834 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
9835 system register group.
9836 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
9837 for older kernels.
9838 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
9839 amd64 ABI.
9840 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
9841 AMD64_GSBASE_REGNUM.
9842 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
9843 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
9844 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
9845 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
9846 i386/64bit-segments.xml in those rules.
9847 * features/i386/64bit-segments.xml: New file.
9848 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
9849 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
9850 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
9851 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
9852 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
9853 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
9854 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
9855 * features/i386/amd64-avx-linux.c: Regenerated.
9856 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
9857 * features/i386/amd64-avx-mpx.c: Regenerated.
9858 * features/i386/amd64-avx512-linux.c: Regenerated.
9859 * features/i386/amd64-linux.c: Regenerated.
9860 * features/i386/amd64-mpx-linux.c: Regenerated.
9861 * features/i386/i386-avx-mpx-linux.c: Regenerated.
9862 * features/i386/i386-avx-mpx.c: Regenerated.
9863 * features/i386/x32-avx-linux.c: Regenerated.
9864 * features/i386/x32-avx512-linux.c: Regenerated.
9865 * regformats/i386/amd64-avx-linux.dat: Regenerated.
9866 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
9867 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
9868 * regformats/i386/amd64-linux.dat: Regenerated.
9869 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
9870 * regformats/i386/x32-avx-linux.dat: Regenerated.
9871 * regformats/i386/x32-avx512-linux.dat: Regenerated.
9872 * regformats/i386/x32-linux.dat: Regenerated.
9873
9874 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
9875
9876 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
9877 Set to AMD64_NUM_REGS.
9878
9879 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
9880
9881 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
9882 that checks validity of a register number.
9883
9884 2017-01-27 Kees Cook <keescook@google.com>
9885
9886 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
9887 fetch_fpregs if target has fpa registers.
9888 (arm_linux_store_inferior_registers): Call store_fpregs if target
9889 has fpa registers.
9890
9891 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
9892
9893 * cris-tdep.c (cris_gdbarch_init): Remove check for
9894 info.byte_order and force it to BFD_ENDIAN_LITTLE.
9895
9896 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
9897
9898 * corelow.c (get_core_register_section): Check for regset
9899 existence before checking for REGSET_VARIABLE_SIZE.
9900
9901 2017-01-26 Yao Qi <yao.qi@linaro.org>
9902 Pedro Alves <palves@redhat.com>
9903
9904 PR gdb/20939
9905 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
9906 call memory_error, save memaddr instead.
9907 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
9908 negative, cal memory_error.
9909 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
9910
9911 2017-01-26 Yao Qi <yao.qi@linaro.org>
9912
9913 * disasm-selftests.c (memory_error_test): New function.
9914 (_initialize_disasm_selftests): Register memory_error_test.
9915
9916 2017-01-26 Yao Qi <yao.qi@linaro.org>
9917
9918 * Makefile.in (SFILES): Add disasm-selftests.c and
9919 selftest-arch.c.
9920 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
9921 * disasm-selftests.c: New file.
9922 * selftest-arch.c: New file.
9923 * selftest-arch.h: New file.
9924
9925 2017-01-26 Yao Qi <yao.qi@linaro.org>
9926
9927 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
9928 to bfd_arch_mep. Don't return 0 if section is not
9929 found. Call print_insn_mep.
9930
9931 2017-01-26 Pedro Alves <palves@redhat.com>
9932 Yao Qi <yao.qi@linaro.org>
9933
9934 * arm-tdep.c: Include "disasm.h".
9935 (gdb_print_insn_arm): Update code to get gdbarch.
9936 * disasm.c (dis_asm_read_memory): Change it to
9937 gdb_disassembler::dis_asm_read_memory.
9938 (dis_asm_memory_error): Likewise.
9939 (dis_asm_print_address): Likewise.
9940 (gdb_pretty_print_insn): Change it to
9941 gdb_disassembler::pretty_print_insn.
9942 (dump_insns): Add one argument gdb_disassemlber. All
9943 callers updated.
9944 (do_mixed_source_and_assembly_deprecated): Likewise.
9945 (do_mixed_source_and_assembly): Likewise.
9946 (do_assembly_only): Likewise.
9947 (gdb_disassembler::gdb_disassembler): New.
9948 (gdb_disassembler::print_insn): New.
9949 * disasm.h (class gdb_disassembler): New.
9950 (gdb_pretty_print_insn): Remove declaration.
9951 (gdb_disassemble_info): Likewise.
9952 * guile/scm-disasm.c (class gdbscm_disassembler): New.
9953 (gdbscm_disasm_read_memory_worker): Update.
9954 (gdbscm_disasm_read_memory): Update.
9955 (gdbscm_disasm_memory_error): Remove.
9956 (gdbscm_disasm_print_address): Remove.
9957 (gdbscm_disassembler::gdbscm_disassembler): New.
9958 (gdbscm_print_insn_from_port): Update.
9959 * mips-tdep.c: Include disasm.h.
9960 (gdb_print_insn_mips): Update code to get gdbarch.
9961 * record-btrace.c (btrace_insn_history): Update.
9962 * spu-tdep.c: Include disasm.h.
9963 (struct spu_dis_asm_data): Remove.
9964 (struct spu_dis_asm_info): New.
9965 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
9966 SPU id.
9967 (gdb_print_insn_spu): Cast disassemble_info to
9968 spu_dis_asm_info.
9969
9970 2017-01-26 Yao Qi <yao.qi@linaro.org>
9971
9972 * disasm.c (do_ui_file_delete): Delete.
9973 (gdb_insn_length): Move code creating stream to ...
9974 * utils.c (null_stream): ... here. New function.
9975 * utils.h (null_stream): Declare.
9976
9977 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
9978
9979 * python/py-inferior.c (find_thread_object): Return directly
9980 from the loop. Remove "found" variable.
9981
9982 2017-01-21 Joel Brobecker <brobecker@adacore.com>
9983
9984 GDB 7.12.1 released.
9985
9986 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
9987
9988 * python/py-function.c (fnpy_call): Reorder declarations to have
9989 the gdbpy_enter object declared first.
9990 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
9991
9992 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
9993
9994 PR python/21068
9995 * python/python-internal.h (PyMem_RawMalloc): Define for
9996 Python < 3.4.
9997 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
9998 PyMem_RawMalloc instead of PyMem_Malloc.
9999
10000 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10001 Luis Machado <lgustavo@codesourcery.com>
10002
10003 * NEWS (New commands): Mention flash-erase.
10004 (New MI commands): Mention target-flash-erase.
10005 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10006 command.
10007 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10008 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10009 * target.c (flash_erase_command): New function.
10010 (initialize_targets): Add new flash-erase command.
10011 * target.h (flash_erase_command): New declaration.
10012
10013 2017-01-20 Joel Brobecker <brobecker@adacore.com>
10014
10015 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10016 HAVE_SYS_PROCFS_H is defined.
10017
10018 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10019
10020 * remote.c (struct cached_reg): Change data into a pointer.
10021 * (stop_reply_dtr): Free data pointers before deleting vector.
10022 (process_stop_reply): Likewise.
10023 (remote_parse_stop_reply): Allocate space for data
10024
10025 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10026
10027 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10028 MAX_REGISTER_SIZE.
10029 (amd64_pseudo_register_read_value): Likewise.
10030 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10031 (store_register_using_P): Likewise.
10032 * regcache.c (regcache_xfer_part): Likewise.
10033
10034 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10035
10036 Split real and pseudo registers.
10037 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10038 (sparc32_pseudo_regnum): New enum.
10039 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10040 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10041 (SPARC32_CP0_REGISTERS): New macro.
10042 (sparc32_pseudo_register_name): New function.
10043 (sparc32_register_name): Use sparc32_pseudo_register_name.
10044 (sparc32_pseudo_register_type): New function.
10045 (sparc32_register_type): Use sparc32_pseudo_register_type.
10046 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10047 pseudo register numbers.
10048 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10049 (SPARC64_CP0_REGISTERS): New macro.
10050 (sparc64_pseudo_register_name): New function.
10051 (sparc64_register_name): Use sparc64_pseudo_register_name.
10052 (sparc64_pseudo_register_type): New function.
10053 (sparc64_register_type): Use sparc64_pseudo_register_type.
10054 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10055 pseudo register numbers.
10056 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10057 sparc64_store_arguments): Handle pseudo register numbers.
10058
10059 2017-01-13 Yao Qi <yao.qi@linaro.org>
10060
10061 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10062 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10063 output.
10064 (getpkt_or_notif_sane_1): Likewise.
10065
10066 2017-01-13 Yao Qi <yao.qi@linaro.org>
10067
10068 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10069 of CC. Pass "-x c++-header" instead of "-x c".
10070
10071 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10072
10073 * remote.c (remote_can_async_p): Update comment.
10074
10075 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10076
10077 * linux-nat.c (linux_nat_can_async_p): Update comment.
10078
10079 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10080
10081 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10082
10083 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
10084
10085 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10086
10087 2017-01-10 Tom Tromey <tom@tromey.com>
10088
10089 * python/py-type.c (typy_legacy_template_argument): Update.
10090 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10091 ~demangle_parse_info): Declare new members.
10092 (cp_demangled_name_to_comp): Return unique_ptr.
10093 (cp_demangled_name_parse_free)
10094 (make_cleanup_cp_demangled_name_parse_free)
10095 (cp_new_demangle_parse_info): Remove.
10096 * cp-support.c (do_demangled_name_parse_free_cleanup)
10097 (make_cleanup_cp_demangled_name_parse_free): Remove.
10098 (inspect_type, cp_canonicalize_string_full)
10099 (cp_canonicalize_string): Update.
10100 (mangled_name_to_comp): Change return type.
10101 (cp_class_name_from_physname, method_name_from_physname)
10102 (cp_func_name, cp_remove_params): Update.
10103 * cp-name-parser.y (demangle_parse_info): New constructor, from
10104 cp_new_demangle_parse_info.
10105 (~demangle_parse_info): New destructor, from
10106 cp_demangled_name_parse_free.
10107 (cp_merge_demangle_parse_infos): Update.
10108 (cp_demangled_name_to_comp): Change return type.
10109
10110 2017-01-10 Tom Tromey <tom@tromey.com>
10111
10112 * top.c (prevent_dont_repeat): Change return type.
10113 * python/python.c (execute_gdb_command): Use std::string.
10114 Update.
10115 * guile/guile.c (gdbscm_execute_gdb_command): Update.
10116 * command.h (prevent_dont_repeat): Change return type.
10117 * breakpoint.c (bpstat_do_actions_1): Update.
10118
10119 2017-01-10 Tom Tromey <tom@tromey.com>
10120
10121 * value.h (scoped_value_mark::~scoped_value_mark): Call
10122 free_to_mark.
10123 (scoped_value_mark::free_to_mark): New method.
10124 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10125 scoped_value_mark.
10126
10127 2017-01-10 Tom Tromey <tom@tromey.com>
10128
10129 * python/py-value.c (valpy_dereference, valpy_referenced_value)
10130 (valpy_reference_value, valpy_const_value, valpy_get_address)
10131 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10132 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10133 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10134 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10135 scoped_value_mark.
10136 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10137 * value.h (scoped_value_mark): New class.
10138
10139 2017-01-10 Tom Tromey <tom@tromey.com>
10140
10141 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10142 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10143 * psymtab.c (discard_psymtabs_upto): Remove.
10144 (make_cleanup_discard_psymtabs): Remove.
10145 (struct psymtab_state): Remove.
10146
10147 2017-01-10 Tom Tromey <tom@tromey.com>
10148
10149 * record-full.c (record_full_save_cleanups): Remove.
10150 (record_full_save): Use gdb::unlinker.
10151 * gcore.c (do_bfd_delete_cleanup): Remove.
10152 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
10153 cleanups.
10154 * dwarf2read.c (unlink_if_set): Remove.
10155 (write_psymtabs_to_index): Use gdb::unlinker.
10156 * common/gdb_unlinker.h: New file.
10157
10158 2017-01-10 Tom Tromey <tom@tromey.com>
10159
10160 * windows-tdep.c (windows_xfer_shared_library): Update.
10161 * windows-nat.c (windows_make_so): Update.
10162 * utils.h (make_cleanup_bfd_unref): Remove.
10163 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10164 * symfile.h (symfile_bfd_open)
10165 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10166 * symfile.c (read_symbols, symbol_file_add)
10167 (separate_debug_file_exists): Update.
10168 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10169 (generic_load, reread_symbols): Update.
10170 * symfile-mem.c (symbol_file_add_from_memory): Update.
10171 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10172 (spu_symbol_file_add_from_memory): Update.
10173 * solist.h (struct target_so_ops) <bfd_open>: Return
10174 gdb_bfd_ref_ptr.
10175 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10176 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10177 gdb_bfd_ref_ptr.
10178 (solib_map_sections, reload_shared_libraries_1): Update.
10179 * solib-svr4.c (enable_break): Update.
10180 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10181 * solib-frv.c (enable_break2): Update.
10182 * solib-dsbt.c (enable_break): Update.
10183 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10184 gdb_bfd_ref_ptr.
10185 (darwin_solib_get_all_image_info_addr_at_init): Update.
10186 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10187 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10188 * record-full.c (record_full_save): Update.
10189 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10190 * procfs.c (insert_dbx_link_bpt_in_file): Update.
10191 * minidebug.c (find_separate_debug_file_in_section): Return
10192 gdb_bfd_ref_ptr.
10193 * machoread.c (macho_add_oso_symfile): Change abfd to
10194 gdb_bfd_ref_ptr.
10195 (macho_symfile_read_all_oso): Update.
10196 (macho_check_dsym): Return gdb_bfd_ref_ptr.
10197 (macho_symfile_read): Update.
10198 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10199 (jit_bfd_try_read_symtab): Update.
10200 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10201 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10202 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10203 gdb_bfd_ref_ptr.
10204 (gdb_bfd_ref_policy): New struct.
10205 (gdb_bfd_ref_ptr): New typedef.
10206 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10207 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10208 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10209 gdb_bfd_ref_ptr.
10210 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10211 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10212 (gcore_command): Update.
10213 * exec.c (exec_file_attach): Update.
10214 * elfread.c (elf_symfile_read): Update.
10215 * dwarf2read.c (dwarf2_get_dwz_file): Update.
10216 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
10217 (open_and_init_dwo_file): Update.
10218 (open_dwp_file): Return gdb_bfd_ref_ptr.
10219 (open_and_init_dwp_file): Update.
10220 * corelow.c (core_open): Update.
10221 * compile/compile-object-load.c (compile_object_load): Update.
10222 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
10223 * coffread.c (coff_symfile_read): Update.
10224 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
10225 gdb_bfd_ref_ptr. Rename.
10226 (dump_bfd_file, restore_command): Update.
10227 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10228 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10229 (find_separate_debug_file_by_buildid): Update.
10230
10231 2017-01-10 Tom Tromey <tom@tromey.com>
10232
10233 * common/gdb_ref_ptr.h: New file.
10234 * python/py-ref.h (struct gdbpy_ref_policy): New.
10235 (gdbpy_ref): Now a typedef.
10236
10237 2017-01-10 Tom Tromey <tom@tromey.com>
10238
10239 * utils.h (make_cleanup_htab_delete): Don't declare.
10240 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
10241 Remove.
10242 * linespec.c (decode_compound_collector): Add constructor,
10243 destructor.
10244 (lookup_prefix_sym): Remove cleanup.
10245 (symtab_collector): Add constructor, destructor.
10246 (collect_symtabs_from_filename): Remove cleanup.
10247 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
10248 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
10249 Use htab_up.
10250 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
10251 * dwarf2read.c (dw2_expand_symtabs_matching)
10252 (dw2_map_symbol_filenames, dwarf_decode_macros)
10253 (write_psymtabs_to_index): Use htab_up.
10254 * dwarf2loc.c (func_verify_no_selftailcall)
10255 (call_site_find_chain_1, func_verify_no_selftailcall)
10256 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
10257 std::vector, gdb::unique_xmalloc_ptr.
10258 (call_sitep): Remove typedef.
10259 (dwarf2_locexpr_baton_eval): Remove unused variable.
10260
10261 2017-01-10 Tom Tromey <tom@tromey.com>
10262
10263 * python/python-internal.h (make_cleanup_py_decref)
10264 (make_cleanup_py_xdecref): Don't declare.
10265 * python/py-utils.c (py_decref, make_cleanup_py_decref)
10266 (py_xdecref, make_cleanup_py_xdecref): Remove.
10267
10268 2017-01-10 Tom Tromey <tom@tromey.com>
10269
10270 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
10271 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
10272
10273 2017-01-10 Tom Tromey <tom@tromey.com>
10274
10275 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
10276
10277 2017-01-10 Tom Tromey <tom@tromey.com>
10278
10279 * python/py-utils.c (unicode_to_encoded_string)
10280 (python_string_to_target_string)
10281 (python_string_to_target_python_string)
10282 (python_string_to_host_string, gdbpy_obj_to_string)
10283 (get_addr_from_python): Use gdbpy_ref.
10284
10285 2017-01-10 Tom Tromey <tom@tromey.com>
10286
10287 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
10288 gdbpy_ref.
10289
10290 2017-01-10 Tom Tromey <tom@tromey.com>
10291
10292 * python/python.c (eval_python_command, gdbpy_decode_line)
10293 (gdbpy_run_events, gdbpy_start_type_printers)
10294 (gdbpy_apply_type_printers): Use gdbpy_ref.
10295
10296 2017-01-10 Tom Tromey <tom@tromey.com>
10297
10298 * python/py-param.c (get_doc_string, compute_enum_values): Use
10299 gdbpy_ref.
10300
10301 2017-01-10 Tom Tromey <tom@tromey.com>
10302
10303 * python/py-inferior.c (find_thread_object, build_inferior_list):
10304 Use gdbpy_ref.
10305
10306 2017-01-10 Tom Tromey <tom@tromey.com>
10307
10308 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10309
10310 2017-01-10 Tom Tromey <tom@tromey.com>
10311
10312 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
10313 gdbpy_ref.
10314
10315 2017-01-10 Tom Tromey <tom@tromey.com>
10316
10317 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
10318 extra incref.
10319 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
10320 Use gdbpy_ref.
10321
10322 2017-01-10 Tom Tromey <tom@tromey.com>
10323
10324 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10325 gdbpy_ref.
10326
10327 2017-01-10 Tom Tromey <tom@tromey.com>
10328
10329 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
10330 decref results of PyArg_ParseTupleAndKeywords.
10331
10332 2017-01-10 Tom Tromey <tom@tromey.com>
10333
10334 * python/python.c (python_run_simple_file): Use
10335 unique_xmalloc_ptr, gdbpy_ref.
10336
10337 2017-01-10 Tom Tromey <tom@tromey.com>
10338
10339 * python/py-prettyprint.c (print_stack_unless_memory_error)
10340 (print_string_repr, print_children): Use gdbpy_ref.
10341 (dummy_python_frame): New class.
10342 (dummy_python_frame::dummy_python_frame): Rename from
10343 push_dummy_python_frame.
10344 (py_restore_tstate): Remove.
10345
10346 2017-01-10 Tom Tromey <tom@tromey.com>
10347
10348 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10349
10350 2017-01-10 Tom Tromey <tom@tromey.com>
10351
10352 * python/python.c (ensure_python_env, restore_python_env):
10353 Remove.
10354 * python/python-internal.h (ensure_python_env): Don't declare.
10355 * varobj.h (varobj_ensure_python_env): Don't declare.
10356 * varobj.c (varobj_ensure_python_env): Remove.
10357
10358 2017-01-10 Tom Tromey <tom@tromey.com>
10359
10360 * varobj.c (varobj_value_get_print_value): Use
10361 gdbpy_enter_varobj.
10362
10363 2017-01-10 Tom Tromey <tom@tromey.com>
10364
10365 * python/py-prettyprint.c (print_string_repr, print_children):
10366 Update.
10367 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
10368 of "encoding".
10369 * varobj.c (varobj_value_get_print_value): Update.
10370 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
10371
10372 2017-01-10 Tom Tromey <tom@tromey.com>
10373
10374 * varobj.c (varobj_get_display_hint)
10375 (dynamic_varobj_has_child_method, install_new_value_visualizer)
10376 (varobj_set_visualizer, free_variable): Use
10377 gdbpy_enter_varobj.
10378
10379 2017-01-10 Tom Tromey <tom@tromey.com>
10380
10381 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
10382 (do_finish_initialization): New function. Use gdbpy_ref.
10383 (gdbpy_finish_initialization): Use gdbpy_enter. Call
10384 do_finish_initialization.
10385
10386 2017-01-10 Tom Tromey <tom@tromey.com>
10387
10388 * python/py-param.c (get_set_value, get_show_value): Use
10389 gdbpy_enter, gdbpy_ref.
10390
10391 2017-01-10 Tom Tromey <tom@tromey.com>
10392
10393 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
10394
10395 2017-01-10 Tom Tromey <tom@tromey.com>
10396
10397 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
10398
10399 2017-01-10 Tom Tromey <tom@tromey.com>
10400
10401 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
10402 Use gdbpy_enter_varobj.
10403
10404 2017-01-10 Tom Tromey <tom@tromey.com>
10405
10406 * varobj.c (gdbpy_enter_varobj): New constructor.
10407 * python/python-internal.h (gdbpy_enter_varobj): New class.
10408 * python/py-varobj.c (py_varobj_get_iterator): Use
10409 gdbpy_enter_varobj.
10410
10411 2017-01-10 Tom Tromey <tom@tromey.com>
10412
10413 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
10414 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10415 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
10416 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
10417 unique_xmalloc_ptr.
10418 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
10419
10420 2017-01-10 Tom Tromey <tom@tromey.com>
10421
10422 * python/py-xmethods.c (invoke_match_method): Use
10423 gdbpy_ref.
10424
10425 2017-01-10 Tom Tromey <tom@tromey.com>
10426
10427 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
10428 gdbpy_enter, gdbpy_ref.
10429
10430 2017-01-10 Tom Tromey <tom@tromey.com>
10431
10432 * python/python.c (python_interactive_command): Use gdbpy_enter.
10433
10434 2017-01-10 Tom Tromey <tom@tromey.com>
10435
10436 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
10437 gdbpy_ref.
10438
10439 2017-01-10 Tom Tromey <tom@tromey.com>
10440
10441 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
10442 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10443
10444 2017-01-10 Tom Tromey <tom@tromey.com>
10445
10446 * utils.h (htab_deleter): New struct.
10447 (htab_up): New typedef.
10448 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
10449 gdbpy_enter, gdbpy_ref, htab_up.
10450
10451 2017-01-10 Tom Tromey <tom@tromey.com>
10452
10453 * python/py-unwind.c (pending_frame_invalidate): Remove.
10454 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
10455
10456 2017-01-10 Tom Tromey <tom@tromey.com>
10457
10458 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
10459 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
10460
10461 2017-01-10 Tom Tromey <tom@tromey.com>
10462
10463 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
10464
10465 2017-01-10 Tom Tromey <tom@tromey.com>
10466
10467 * python/python.c (gdbpy_eval_from_control_command)
10468 (gdbpy_source_script, gdbpy_run_events)
10469 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
10470 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
10471 gdbpy_enter.
10472
10473 2017-01-10 Tom Tromey <tom@tromey.com>
10474
10475 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
10476
10477 2017-01-10 Tom Tromey <tom@tromey.com>
10478
10479 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
10480
10481 2017-01-10 Tom Tromey <tom@tromey.com>
10482
10483 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
10484 (python_on_inferior_call_pre, python_on_inferior_call_post)
10485 (python_on_memory_change, python_on_register_change)
10486 (python_inferior_exit, python_new_objfile, add_thread_object)
10487 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
10488
10489 2017-01-10 Tom Tromey <tom@tromey.com>
10490
10491 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
10492 (bpfinishpy_handle_exit): Use gdbpy_enter.
10493
10494 2017-01-10 Tom Tromey <tom@tromey.com>
10495
10496 * python/py-cmd.c (cmdpy_destroyer)
10497 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
10498 gdbpy_enter.
10499
10500 2017-01-10 Tom Tromey <tom@tromey.com>
10501
10502 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10503 gdbpy_enter.
10504 (gdbpy_breakpoint_has_cond): Likewise.
10505
10506 2017-01-10 Tom Tromey <tom@tromey.com>
10507
10508 * python/python.c (gdbpy_enter): New constructor.
10509 (~gdbpy_enter): New destructor.
10510 (restore_python_env, ensure_python_env): Rewrite.
10511 * python/python-internal.h (gdbpy_enter): New class.
10512
10513 2017-01-10 Tom Tromey <tom@tromey.com>
10514
10515 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
10516
10517 2017-01-10 Tom Tromey <tom@tromey.com>
10518
10519 * python/py-value.c (value_has_field, get_field_flag)
10520 (get_field_type, valpy_getitem, convert_value_from_python): Use
10521 gdbpy_ref.
10522
10523 2017-01-10 Tom Tromey <tom@tromey.com>
10524
10525 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
10526 gdbpy_ref.
10527
10528 2017-01-10 Tom Tromey <tom@tromey.com>
10529
10530 * python/py-prettyprint.c (search_pp_list)
10531 (find_pretty_printer_from_objfiles)
10532 (find_pretty_printer_from_progspace)
10533 (find_pretty_printer_from_gdb, find_pretty_printer)
10534 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
10535 gdbpy_ref.
10536
10537 2017-01-10 Tom Tromey <tom@tromey.com>
10538
10539 * python/py-param.c (call_doc_function): Use gdbpy_ref.
10540
10541 2017-01-10 Tom Tromey <tom@tromey.com>
10542
10543 * python/py-linetable.c (build_line_table_tuple_from_pcs)
10544 (ltpy_get_all_source_lines): Use gdbpy_ref.
10545
10546 2017-01-10 Tom Tromey <tom@tromey.com>
10547
10548 * python/py-framefilter.c (extract_sym, extract_value)
10549 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
10550 gdbpy_ref.
10551
10552 2017-01-10 Tom Tromey <tom@tromey.com>
10553
10554 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
10555
10556 2017-01-10 Tom Tromey <tom@tromey.com>
10557
10558 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
10559
10560 2017-01-10 Tom Tromey <tom@tromey.com>
10561
10562 * python/py-function.c (convert_values_to_python, fnpy_init): Use
10563 gdbpy_ref.
10564
10565 2017-01-10 Tom Tromey <tom@tromey.com>
10566
10567 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
10568
10569 2017-01-10 Tom Tromey <tom@tromey.com>
10570
10571 * python/py-type.c (convert_field, make_fielditem, typy_fields)
10572 (typy_range): Use gdbpy_ref.
10573
10574 2017-01-10 Tom Tromey <tom@tromey.com>
10575
10576 * python/py-threadevent.c (create_thread_event_object): Use
10577 gdbpy_ref.
10578 * python/py-stopevent.c (create_stop_event_object): Simplify.
10579 (emit_stop_event): Use gdbpy_ref.
10580 * python/py-signalevent.c (create_signal_event_object): Use
10581 gdbpy_ref.
10582 * python/py-newobjfileevent.c (create_new_objfile_event_object)
10583 (emit_new_objfile_event, create_clear_objfiles_event_object)
10584 (emit_clear_objfiles_event): Use gdbpy_ref.
10585 * python/py-infevents.c (create_inferior_call_event_object)
10586 (create_register_changed_event_object)
10587 (create_memory_changed_event_object, emit_inferior_call_event)
10588 (emit_memory_changed_event, emit_register_changed_event): Use
10589 gdbpy_ref.
10590 * python/py-exitedevent.c (create_exited_event_object)
10591 (emit_exited_event): Use gdbpy_ref.
10592 * python/py-event.h (evpy_emit_event): Remove
10593 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
10594 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
10595 * python/py-continueevent.c (emit_continue_event): Use
10596 gdbpy_ref.
10597 * python/py-breakpoint.c (gdbpy_breakpoint_created)
10598 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
10599 gdbpy_ref.
10600 * python/py-bpevent.c (create_breakpoint_event_object): Use
10601 gdbpy_ref.
10602
10603 2017-01-10 Tom Tromey <tom@tromey.com>
10604
10605 * python/py-ref.h: New file.
10606
10607 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
10608
10609 * cli-out.c (cli_ui_out::do_redirect): Change return type to
10610 void.
10611 * cli-out.h (cli_ui_out::do_redirect): Likewise.
10612 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
10613 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
10614 * ui-out.c (ui_out::redirect): Likewise.
10615 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
10616 * cli/cli-logging.c (set_logging_redirect): Update call site of
10617 ui_out::redirect.
10618 (handle_redirections): Likewise.
10619 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
10620 * top.c (execute_command_to_string): Likewise.
10621 * utils.c (do_ui_out_redirect_pop): Likewise.
10622
10623 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
10624
10625 * stack.c (_initialize_stack): Update "frame" command help message.
10626
10627 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
10628
10629 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
10630
10631 2017-01-06 Yao Qi <yao.qi@linaro.org>
10632
10633 * x86-linux-nat.h: Include gdb_proc_service.h.
10634
10635 2017-01-06 Yao Qi <yao.qi@linaro.org>
10636
10637 * ser-base.h: Include serial.h.
10638
10639 2017-01-06 Yao Qi <yao.qi@linaro.org>
10640
10641 * ppc-linux-tdep.h: Include ppc-tdep.h.
10642
10643 2017-01-06 Yao Qi <yao.qi@linaro.org>
10644
10645 * nat/amd64-linux-siginfo.h: Include signal.h.
10646
10647 2017-01-06 Yao Qi <yao.qi@linaro.org>
10648
10649 * nat/aarch64-linux-hw-point.h: Include break-common.h.
10650
10651 2017-01-06 Yao Qi <yao.qi@linaro.org>
10652
10653 * mi/mi-parse.h: Include mi-cmds.h.
10654
10655 2017-01-06 Yao Qi <yao.qi@linaro.org>
10656
10657 * inf-loop.c: Don't include "target.h".
10658 * inf-loop.h: Include it here.
10659
10660 2017-01-06 Yao Qi <yao.qi@linaro.org>
10661
10662 * dfp.h: Include "dboulest.h" and "expression.h".
10663
10664 2017-01-06 Yao Qi <yao.qi@linaro.org>
10665
10666 * ax-gdb.h: Include "ax.h".
10667
10668 2017-01-06 Yao Qi <yao.qi@linaro.org>
10669
10670 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
10671 with nat/gdb_ptrace.h.
10672
10673 2017-01-05 Yao Qi <yao.qi@linaro.org>
10674
10675 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
10676 new line.
10677 (mips64_fbsd_sigframe_init): Likewise.
10678
10679 2017-01-04 John Baldwin <jhb@FreeBSD.org>
10680
10681 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
10682 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
10683
10684 2017-01-04 John Baldwin <jhb@FreeBSD.org>
10685
10686 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
10687 * NEWS: Mention new FreeBSD/mips native configuration.
10688 * config/mips/fbsd.mh: New file.
10689 * configure.host: Add mips*-*-freebsd*.
10690 * mips-fbsd-nat.c: New file.
10691
10692 2017-01-04 John Baldwin <jhb@FreeBSD.org>
10693
10694 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
10695 (ALLDEPFILES): Add mips-fbsd-tdep.c.
10696 * NEWS: Mention new FreeBSD/mips target.
10697 * configure.tgt: Add mips*-*-freebsd*.
10698 * mips-fbsd-tdep.c: New file.
10699 * mips-fbsd-tdep.h: New file.
10700
10701 2017-01-04 Yao Qi <yao.qi@linaro.org>
10702
10703 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
10704 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
10705
10706 2017-01-01 Joel Brobecker <brobecker@adacore.com>
10707
10708 Update copyright year range in all GDB files.
10709
10710 2017-01-01 Joel Brobecker <brobecker@adacore.com>
10711
10712 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
10713
10714 For older changes see ChangeLog-2016.
10715 \f
10716 Local Variables:
10717 mode: change-log
10718 left-margin: 8
10719 fill-column: 74
10720 version-control: never
10721 coding: utf-8
10722 End: