Use std::vector in linux_xfer_osdata_processgroups
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2
3 * nat/linux-osdata.c: Include algorithm.
4 (compare_processes): Remove.
5 (struct pid_pgid_entry): New struct.
6 (linux_xfer_osdata_processgroups): Use std::vector instead of
7 XNEWVEC.
8
9 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
10
11 * objfiles.h: Don't include symfile.h.
12 (struct partial_symbol): Remove forward-declaration.
13 (struct objfile) <global_psymbols, static_psymbols>: Change type
14 to std::vector<partial_symbol *>.
15 * objfiles.c (objfile::objfile): Don't memset those fields.
16 (objfile::~objfile): Don't free those fields.
17 * psympriv.h (struct psymbol_allocation_list): Remove
18 forward-declaration.
19 (add_psymbol_to_list): Change psymbol_allocation_list parameter
20 to std::vector.
21 (start_psymtab_common): Change parameters to std::vector.
22 * psymtab.c: Include algorithm.
23 (require_partial_symbols): Call shrink_to_fit.
24 (find_pc_sect_psymbol): Adjust to vector change.
25 (match_partial_symbol): Likewise.
26 (lookup_partial_symbol): Likewise.
27 (psym_relocate): Likewise.
28 (dump_psymtab): Likewise.
29 (recursively_search_psymtabs): Likewise.
30 (compare_psymbols): Remove.
31 (sort_pst_symbols): Adjust to vector change.
32 (start_psymtab_common): Likewise.
33 (end_psymtab_common): Likewise.
34 (psymbol_bcache_full): De-constify return value.
35 (add_psymbol_to_bcache): Likewise.
36 (extend_psymbol_list): Remove.
37 (append_psymbol_to_list): Adjust to vector change.
38 (add_psymbol_to_list): Likewise.
39 (init_psymbol_list): Likewise.
40 (maintenance_info_psymtabs): Likewise.
41 (maintenance_check_psymtabs): Likewise.
42 * symfile.h (struct psymbol_allocation_list): Remove.
43 * symfile.c (reread_symbols): Adjust to vector change.
44 * dbxread.c (start_psymtab): Change type of parameters.
45 (dbx_symfile_read): Adjust to vector change.
46 (read_dbx_symtab): Likewise.
47 (start_psymtab): Change type of parameters.
48 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
49 (create_partial_symtab): Likewise.
50 (add_partial_symbol): Likewise.
51 (write_one_signatured_type): Likewise.
52 (recursively_write_psymbols): Likewise.
53 * mdebugread.c (parse_partial_symbols): Likewise.
54 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
55 (scan_xcoff_symtab): Adjust to vector change.
56 (xcoff_initial_scan): Likewise.
57
58 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
59
60 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
61
62 2017-10-13 Yao Qi <yao.qi@linaro.org>
63
64 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
65 Remove s390x-*-expedite, add s390x-expedite.
66
67 2017-10-13 Yao Qi <yao.qi@linaro.org>
68
69 * features/s390-gs-linux64.c: Regenerated.
70 * features/s390x-gs-linux64.c: Regenerated.
71
72 2017-10-13 Tom Tromey <tom@tromey.com>
73
74 * compile/compile-object-run.c (do_module_cleanup): Use delete.
75 * solib.c (update_solib_list, reload_shared_libraries_1): Use
76 delete.
77 * symfile.c (symbol_file_add_with_addrs): Use new.
78 (symbol_file_add_separate): Update comment.
79 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
80 * jit.c (jit_object_close_impl): Use new.
81 (jit_unregister_code): Use delete.
82 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
83 (~objfile): Rename from free_objfile.
84 (free_objfile_separate_debug, do_free_objfile_cleanup)
85 (free_all_objfiles, objfile_purge_solibs): Use delete.
86 * objfiles.h (struct objfile): Add constructor and destructor.
87 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
88 (allocate_objfile, free_objfile): Don't declare.
89 (struct objstats): Add initializers.
90
91 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
92
93 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
94 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
95 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
96 * gdbarch.h: Regenerate.
97 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
98 Adjust comment.
99 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
100 (i386_displaced_step_fixup): Adjust comment.
101 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
102
103 2017-10-12 Tom Tromey <tom@tromey.com>
104
105 * prologue-value.h (pv_area::store_would_trash): Return bool.
106 (pv_area::find_reg): Likewise.
107 * prologue-value.c (pv_area::store_would_trash): Return bool.
108 (pv_area::find_reg): Likewise.
109
110 2017-10-12 Tom Tromey <tom@tromey.com>
111
112 * s390-linux-tdep.c (s390_store, s390_load)
113 (s390_check_for_saved, s390_analyze_prologue): Update.
114 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
115 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
116 * prologue-value.h (class pv_area): Move from prologue-value.c.
117 Change names of members. Add constructor, destructor, member
118 functions.
119 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
120 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
121 (pv_area_fetch, pv_area_scan): Don't declare.
122 * prologue-value.c (struct pv_area::area_entry): Now member of
123 pv_area.
124 (struct pv_area): Move to prologue-value.h.
125 (pv_area::pv_area): Rename from make_pv_area.
126 (pv_area::~pv_area): Rename from free_pv_area.
127 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
128 (clear_entries, find_entry, overlaps, store_would_trash, store)
129 (fetch, find_reg, scan): Now member of pv_area.
130 Remove "area" argument. Update.
131 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
132 Update.
133 * mn10300-tdep.c (push_reg, check_for_saved)
134 (mn10300_analyze_prologue): Update.
135 * mep-tdep.c (is_arg_spill, check_for_saved)
136 (mep_analyze_prologue): Update.
137 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
138 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
139 (m32c_is_struct_return, m32c_analyze_prologue): Update.
140 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
141 Update.
142 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
143 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
144
145 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
146
147 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
148 * linux-nat.c (linux_nat_delete_thread): New variable.
149 (lwp_free): Invoke linux_nat_delete_thread if set.
150 (linux_nat_set_delete_thread): New function.
151 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
152 thread delete callback.
153 * arm-linux-nat.c (arm_linux_delete_thread): New function.
154 (_initialize_arm_linux_nat): Assign thread delete callback.
155 * s390-linux-nat.c (s390_delete_thread): New function.
156 (_initialize_s390_nat): Assign thread delete callback.
157 * x86-linux-nat.c (x86_linux_add_target): Likewise.
158 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
159 function.
160 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
161 declaration.
162 * nat/x86-linux.c (x86_linux_delete_thread): New function.
163 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
164
165 2017-10-09 Tom Tromey <tom@tromey.com>
166
167 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
168 std::string.
169 * tui/tui-layout.c (enum tui_status): Use std::string.
170
171 2017-10-11 Tom Tromey <tom@tromey.com>
172
173 * gdbthread.h (thread_command): Constify.
174 * inferior.h (detach_command): Constify.
175 * top.h (set_history, show_history): Constify.
176 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
177 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
178 * bsd-kvm.c (bsd_kvm_cmd): Constify.
179 * printcmd.c (set_command): Constify.
180 (non_const_set_command): New function.
181 * dcache.c (set_dcache_command, show_dcache_command): Constify.
182 * breakpoint.c (enable_command, disable_command, delete_command)
183 (catch_command, tcatch_command, set_breakpoint_cmd)
184 (show_breakpoint_cmd): Constify.
185 * macrocmd.c (macro_command): Constify.
186 * infcmd.c (unset_command, kill_command, detach_command)
187 (info_proc_cmd): Constify.
188 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
189 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
190 (info_auto_load_cmd): Constify.
191 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
192 (unset_tdesc_cmd): Constify.
193 * ada-lang.c (set_ada_command, show_ada_command)
194 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
195 * guile/guile.c (set_guile_command, show_guile_command)
196 (info_guile_command): Constify.
197 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
198 Constify.
199 * skip.c (skip_command): Constify.
200 * compile/compile.c (_initialize_compile): Constify.
201 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
202 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
203 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
204 (maint_btrace_pt_show_cmd): Constify.
205 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
206 Constify.
207 * python/python.c (user_show_python, user_set_python): Constify.
208 * mips-tdep.c (set_mips_command, show_mips_command)
209 (set_mipsfpu_command): Constify.
210 * record-btrace.c (cmd_record_btrace_start)
211 (cmd_set_record_btrace, cmd_show_record_btrace)
212 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
213 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
214 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
215 Constify.
216 * symfile.c (overlay_command): Constify.
217 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
218 * cli/cli-logging.c (set_logging_command, show_logging_command):
219 Constify.
220 * cli/cli-dump.c (dump_command, append_command)
221 (srec_dump_command, ihex_dump_command, verilog_dump_command)
222 (tekhex_dump_command, binary_dump_command)
223 (binary_append_command): Constify.
224 * cli/cli-decode.c (struct cmd_list_element): Change type of
225 "fun".
226 * cli/cli-cmds.c (info_command, show_command, set_debug)
227 (show_debug): Constify.
228 (show_command): Add non-const overload.
229 * top.c (set_history, show_history): Constify.
230 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
231 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
232 * target.c (target_command): Constify.
233 * sparc64-tdep.c (info_adi_command): Constify.
234 * record-full.c (cmd_record_full_start): Constify.
235 (set_record_full_command): Constify. Fix typo.
236 (show_record_full_command): Constify.
237 * thread.c (thread_command, thread_apply_command): Constify.
238 * memattr.c (dummy_cmd): Constify.
239 * value.c (function_command): Constify.
240 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
241 * probe.c (info_probes_command): Constify.
242 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
243 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
244 (show_thread_cmd, set_thread_default_cmd)
245 (show_thread_default_cmd): Constify.
246 (check_empty): Constify.
247 * tracepoint.c (tfind_command): Constify.
248 * cp-support.c (maint_cplus_command): Constify.
249 * windows-tdep.c (info_w32_command): Constify.
250 * record.c (cmd_record_start, set_record_command)
251 (show_record_command, info_record_command, cmd_record_goto):
252 Constify.
253 * ravenscar-thread.c (set_ravenscar_command)
254 (show_ravenscar_command): Constify.
255 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
256 Constify.
257 (add_internal_problem_command): Remove casts.
258 * arc-tdep.c (maintenance_print_arc_command): Constify.
259 * valprint.c (set_print, show_print, set_print_raw)
260 (show_print_raw): Constify.
261 * maint.c (maintenance_command, maintenance_info_command)
262 (maintenance_print_command, maintenance_set_cmd)
263 (maintenance_show_cmd, set_per_command_cmd)
264 (show_per_command_cmd, maintenance_check_command): Constify.
265 * language.c (set_check, show_check): Constify.
266 * typeprint.c (show_print_type, set_print_type): Constify.
267 * go32-nat.c (go32_info_dos_command): Constify.
268
269 2017-10-11 Tom Tromey <tom@tromey.com>
270
271 * breakpoint.c (prepare_re_set_context): Remove.
272 (breakpoint_re_set_one): Update. Don't use cleanups.
273 (breakpoint_re_set): Use scoped_restore, std::string, and
274 scoped_restore_current_language.
275
276 2017-10-11 Tom Tromey <tom@tromey.com>
277
278 * breakpoint.c (commands_command_1): Use std::string.
279 (cleanup_executing_breakpoints): Remove.
280 (bpstat_do_actions_1): Use scoped_restore.
281 (bpstat_check_watchpoint): Use std::string.
282 (decode_static_tracepoint_spec): Likewise.
283 (break_range_command): Likewise.
284 (watch_command_1): Likewise.
285 (compare_breakpoints): Change argument types.
286 (clear_command): Use std::vector.
287 (cleanup_executing_breakpoints): Remove.
288 (update_global_location_list): Use unique_xmalloc_ptr.
289 (strace_command): Remove unused declaration.
290
291 2017-10-11 John Baldwin <jhb@FreeBSD.org>
292
293 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
294 * NEWS: Mention new FreeBSD/arm native configuration.
295 * configure.host: Add arm*-*-freebsd*.
296 * configure.nat: Likewise.
297 * arm-fbsd-nat.c: New file.
298
299 2017-10-11 John Baldwin <jhb@FreeBSD.org>
300
301 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
302 (ALLDEPFILES): Add arm-fbsd-tdep.c.
303 * NEWS: Mention new FreeBSD/arm target.
304 * configure.tgt: Add arm*-*-freebsd*.
305 * arm-fbsd-tdep.c: New file.
306 * arm-fbsd-tdep.h: New file.
307
308 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
309
310 * linux-tdep.c (linux_make_corefile_notes): Remove call to
311 `gdbarch_elfcore_write_linux_prpsinfo'.
312 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
313 method.
314 (elf_internal_linux_prpsinfo): Remove declaration.
315 * gdbarch.h: Regenerate.
316 * gdbarch.c: Regenerate.
317
318 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
319
320 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
321 `set_gdbarch_elfcore_write_linux_prpsinfo'.
322
323 2017-10-11 Pedro Alves <palves@redhat.com>
324
325 * breakpoint.c (reattach_breakpoints): Delete.
326 * breakpoint.h (reattach_breakpoints): Delete.
327
328 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
329
330 * symfile.c (registered_sym_fns): Make struct, not typedef.
331 (DEF_VEC_O (registered_sym_fns)): Remove.
332 (symtab_fns): Change type to std::vector.
333 (add_symtab_fns): Adjust.
334 (find_sym_fns): Adjust.
335
336 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
337
338 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
339 * arc-tdep.h (arc_arch_is_em): New function.
340 (arc_arch_is_hs): Likewise.
341
342 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
343
344 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
345 parentheses in the declaration.
346 (macro_lookup_inclusion): Likewise.
347 (macro_lookup_definition): Likewise.
348 * p-lang.h (pascal_builtin_types): Likewise.
349 * tui/tui-data.c (tui_win_list): Likewise.
350 * tui/tui-data.h (tui_win_list): Likewise.
351 * utils.h (make_cleanup_free_section_addr_info): Likewise.
352
353 2017-10-11 Mark Rages <markrages@gmail.com>
354
355 * target-memory.c (block_boundaries): Fix for block address not
356 aligned on block size.
357
358 2017-10-10 Pedro Alves <palves@redhat.com>
359 Tom Tromey <tom@tromey.com>
360
361 * breakpoint.c (struct captured_breakpoint_query_args)
362 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
363 (print_breakpoint): New.
364 * breakpoint.h (print_breakpoint): Declare.
365 * common/common-exceptions.h (enum return_reason): Remove
366 references to catch_exceptions.
367 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
368 Delete.
369 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
370 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
371 * gdb.h: Delete.
372 * gdbthread.h (thread_select): Declare.
373 * mi/mi-cmd-break.c: Don't include gdb.h.
374 (breakpoint_notify): Use print_breakpoint.
375 * mi/mi-cmd-catch.c: Don't include gdb.h.
376 * mi/mi-interp.c: Don't include gdb.h.
377 (mi_print_breakpoint_for_event): New.
378 (mi_breakpoint_created, mi_breakpoint_modified): Use
379 mi_print_breakpoint_for_event.
380 * mi/mi-main.c: Don't include gdb.h.
381 (mi_cmd_thread_select): Parse the global thread ID here. Use
382 thread_select instead of gdb_thread_select.
383 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
384 of using gdb_list_thread_ids.
385 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
386 FILEIO_ENOSYS here.
387 (remote_fileio_request): Use TRY/CATCH instead of
388 catch_exceptions.
389 * symfile-mem.c (struct symbol_file_add_from_memory_args)
390 (symbol_file_add_from_memory_wrapper): Delete.
391 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
392 * thread.c: Don't include gdb.h.
393 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
394 (thread_alive): Use thread_select.
395 (do_captured_thread_select): Delete, parts salvaged as ...
396 (thread_select): ... this new function.
397 (gdb_thread_select): Delete.
398
399 2017-10-10 Pedro Alves <palves@redhat.com>
400 Tom Tromey <tom@tromey.com>
401
402 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
403 and reverse logic.
404 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
405 No longer macros. Instead ...
406 (enum wp_check_result): They're now values of this new
407 enumeration.
408 (watchpoint_check): Change return type to wp_check_result and
409 parameter type to bpstat.
410 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
411 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
412 catch_errors. Reverse logic of watchpoint_check call.
413 (breakpoint_re_set_one): Now returns void and takes a breakpoint
414 pointer as parameter.
415 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
416 * common/common-exceptions.c (throw_exception_sjlj): Update
417 comments to avoid mentioning catch_errors.
418 * exceptions.c (catch_errors): Delete.
419 * exceptions.h: Update comments to avoid mentioning catch_errors.
420 (catch_errors_ftype, catch_errors): Delete.
421 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
422 (hook_stop_stub): Delete.
423 (restore_selected_frame): Change return type to void, and
424 parameter type to const frame_id &.
425 (restore_infcall_control_state): Use TRY/CATCH instead of
426 catch_errors.
427 * main.c (captured_command_loop): Return void and remove
428 parameter. Remove references to catch_errors.
429 (captured_main): Use TRY/CATCH instead of catch_errors.
430 * objc-lang.c (objc_submethod_helper_data)
431 (find_objc_msgcall_submethod_helper): Delete.
432 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
433 catch_errors.
434 * record-full.c (record_full_message): Return void.
435 (record_full_message_args, record_full_message_wrapper): Delete.
436 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
437 instead of catch_errors.
438 * solib-aix.c (solib_aix_open_symbol_file_object): Change
439 parameter type to int.
440 * solib-darwin.c (open_symbol_file_object): Ditto.
441 * solib-dsbt.c (open_symbol_file_object): Ditto.
442 * solib-frv.c (open_symbol_file_object): Ditto.
443 * solib-svr4.c (open_symbol_file_object): Ditto.
444 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
445 * solib.c (update_solib_list): Use TRY/CATCH instead of
446 catch_errors.
447 * solist.h (struct target_so_ops) <open_symbol_file_object>:
448 Change type.
449 * symmisc.c (struct print_symbol_args): Remove.
450 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
451 (print_symbol): Change type.
452 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
453 and remove parameters.
454 (catch_errors): New.
455 (get_windows_debug_event): Adjust.
456
457 2017-10-09 Tom Tromey <tom@tromey.com>
458
459 * mi/mi-main.c (free_splay_tree): Remove.
460 (list_available_thread_groups): Use splay_tree_up.
461 * common/gdb_splay_tree.h: New file.
462
463 2017-10-09 Tom Tromey <tom@tromey.com>
464
465 * mi/mi-main.c (do_nothing): Remove.
466 (list_available_thread_groups): Update.
467
468 2017-10-09 Pedro Alves <palves@redhat.com>
469
470 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
471 reading registers when switching context.
472
473 2017-10-09 John Baldwin <jhb@FreeBSD.org>
474
475 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
476 (fbsd_convert_siginfo): Likewise.
477 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
478
479 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
480
481 * configure.ac (try_guile_versions): Remove guile-2.2.
482 * configure: Regenerate.
483
484 2017-10-09 Tom Tromey <tom@tromey.com>
485
486 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
487 (COMPILE.pre): Use $(CXX).
488
489 2017-10-09 Pedro Alves <palves@redhat.com>
490
491 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
492 Use bool.
493 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
494 * cp-support.h (cp_remove_params): Now returns a
495 gdb::unique_xmalloc_ptr.
496 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
497 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
498 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
499 returning a gdb::unique_xmalloc_ptr.
500 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
501 * stack.c (find_frame_funname): Adjust to cp_remove_params
502 returning a gdb::unique_xmalloc_ptr.
503
504 2017-10-08 Tom Tromey <tom@tromey.com>
505
506 * dwarf2read.c (dwarf2_get_dwz_file): Use
507 gdb::unique_xmalloc_ptr.
508 (find_slot_in_mapped_hash): Likewise.
509 (dwarf2_physname): Likewise.
510 (create_dwo_unit_in_dwp_v1): Use std::string.
511 (create_dwo_unit_in_dwp_v2): Likewise.
512 (lookup_dwo_cutu): Likewise.
513 (inherit_abstract_dies): Use std::vector.
514 (read_array_type): Likewise.
515 (dwarf_decode_macros): Remove unused declaration.
516 (unsigned_int_compar): Remove.
517 (dwarf2_build_psymtabs_hard): Use scoped_restore.
518 (psymtabs_addrmap_cleanup): Remove.
519
520 2017-10-08 Tom Tromey <tom@tromey.com>
521
522 * frame-unwind.c (frame_unwind_try_unwinder): Update.
523 * frame.h (frame_cleanup_after_sniffer): Declare.
524 (frame_prepare_for_sniffer): Return void.
525 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
526 type of argument.
527 (frame_prepare_for_sniffer): Return void.
528
529 2017-10-08 Tom Tromey <tom@tromey.com>
530
531 * utils.h (make_cleanup_value_free): Remove.
532 * utils.c (do_value_free, struct cleanup): Remove.
533 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
534 Use gdb_value_up.
535 * value.h (struct value_deleter): New.
536 (gdb_value_up): New typedef.
537
538 2017-10-08 Tom Tromey <tom@tromey.com>
539
540 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
541 (make_cleanup_free_search_symbols): Remove.
542 (search_symbols): Return std::vector.
543 (symbol_search::compare_search_syms): Now member of
544 symbol_search. Change arguments.
545 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
546 (symtab_symbol_info, rbreak_command): Update.
547 * symtab.h (struct symbol_search) <next>: Remove.
548 Add constructors.
549 (symbol_search::operator<): New function.
550 (symbol_search::operator==): New function.
551 (search_symbols): Remove std::vector.
552 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
553 (symbol_search::compare_search_syms): Declare.
554
555 2017-10-06 Yao Qi <yao.qi@linaro.org>
556
557 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
558 arch/aarch64-insn.o.
559 Remove one rule.
560 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
561
562 2017-10-06 Yao Qi <yao.qi@linaro.org>
563
564 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
565 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
566 arch/arm-linux.o respectively.
567 * configure.tgt: Likewise.
568
569 2017-10-06 Yao Qi <yao.qi@linaro.org>
570
571 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
572 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
573
574 2017-10-06 Pedro Alves <palves@redhat.com>
575
576 * windows-nat.c: Include <algorithm>.
577
578 2017-10-06 Yao Qi <yao.qi@linaro.org>
579
580 * configure.tgt (i386_tobjs): New variable.
581 (amd64_tobjs): New variable.
582 Set $cpu_obs and $os_obs.
583
584 2017-10-06 Yao Qi <yao.qi@linaro.org>
585
586 * Makefile.in (CONFIG_SRC_SUBDIR): New.
587 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
588 (clean): Remove object files and dependency files.
589 (distclean): Remove the directory.
590 * configure.ac: Invoke AC_CONFIG_COMMANDS.
591 * configure: Re-generated.
592 * configure.tgt: Replace amd64.o with arch/amd64.o.
593
594 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
595
596 PR build/22188
597 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
598 and SETEND.
599
600 2017-10-05 Pedro Alves <palves@redhat.com>
601
602 * linux-nat.c (linux_child_follow_fork): When following the parent
603 and detaching the child, consult the parent thread's architecture
604 instead of the child's.
605
606 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
607
608 * ax.h: Do not include "doublest.h".
609 (union agent_val): Remove.
610
611 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
612
613 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
614 (decimal_to_string): Return std::string object.
615 (decimal_from_string): Accept std::string object. Return bool.
616 (decimal_from_integral, decimal_from_doublest): Remove.
617 (decimal_from_longest): Add prototype.
618 (decimal_from_ulongest): Likewise.
619 (decimal_to_longest): Likewise.
620 (decimal_from_doublest): Likewise.
621 * dfp.c: Do not include "gdbtypes.h" or "value.h".
622 (MAX_DECIMAL_STRING): Move here.
623 (decimal_to_string): Return std::string object.
624 (decimal_from_string): Accept std::string object. Return bool.
625 (decimal_from_integral): Remove, replace by ...
626 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
627 (decimal_to_longest): New function.
628 (decimal_from_floating): Remove, replace by ...
629 (decimal_from_doublest): ... this new function.
630 (decimal_to_doublest): Update to new decimal_to_string interface.
631
632 * value.c (unpack_long): Use decimal_to_longest.
633 * valops.c (value_cast): Use decimal_from_doublest instead of
634 decimal_from_floating. Use decimal_from_[u]longest isntead of
635 decimal_from_integral.
636 * valarith.c (value_args_as_decimal): Likewise.
637 * valprint.c (print_decimal_floating): Update to new
638 decimal_to_string interface.
639 * printcmd.c (printf_decfloat): Likewise.
640 * c-exp.y (parse_number): Update to new decimal_from_string interface.
641
642 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
643
644 * doublest.h: Do not include "floatformat.h". Remove stale comments.
645 * gdbtypes.c: Include "floatformat.h".
646 * value.c: Likewise.
647 * m68k-tdep.c: Likewise.
648
649 * findvar.c: Do not include "floatformat.h".
650 * amd64-darwin-tdep.c: Likewise.
651 * arm-linux-tdep.c: Likewise.
652 * i386-darwin-tdep.c: Likewise.
653 * i387-tdep.c: Likewise.
654 * m68k-linux-tdep.c: Likewise.
655 * mep-tdep.c: Likewise.
656 * mips-tdep.c: Likewise.
657 * nios2-tdep.c: Likewise.
658 * s390-linux-tdep.c: Likewise.
659 * sparc-obsd-tdep.c: Likewise.
660 * sparc-tdep.c: Likewise.
661 * sparc64-tdep.c: Likewise.
662 * spu-tdep.c: Likewise.
663 * tic6x-tdep.c: Likewise.
664 * tilegx-tdep.c: Likewise.
665 * vax-tdep.c: Likewise.
666 * xstormy16-tdep.c: Likewise.
667 * xtensa-tdep.c: Likewise.
668
669 * top.c: Do not include "doublest.h".
670 * aarch64-tdep.c: Likewise.
671 * alpha-tdep.c: Likewise.
672 * arm-linux-tdep.c: Likewise.
673 * m68k-linux-tdep.c: Likewise.
674 * tilegx-tdep.c: Likewise.
675 * xstormy16-tdep.c: Likewise.
676
677 2017-10-05 John Baldwin <jhb@FreeBSD.org>
678
679 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
680 (mipsn32_fbsd_sigframe): Define.
681 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
682 for FreeBSD/mipsn32.
683
684 2017-10-05 John Baldwin <jhb@FreeBSD.org>
685
686 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
687 AT_HWCAP.
688
689 2017-10-05 Tristan Gingold <tgingold@free.fr>
690
691 * MAINTAINERS (Misc): Update my email address.
692
693 2017-10-04 Pedro Alves <palves@redhat.com>
694
695 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
696 it instead of target_gdbarch.
697 (get_remote_state, get_remote_packet_size): Adjust
698 get_remote_arch_state calls, passing down target_gdbarch
699 explicitly.
700 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
701 'gdbarch' and use it instead of target_gdbarch.
702 (get_memory_packet_size): Adjust get_remote_arch_state calls,
703 passing down target_gdbarch explicitly.
704 (struct stop_reply) <arch>: New field.
705 (remote_parse_stop_reply): Use the stopped thread's architecture,
706 not the current inferior's. Save the architecture in the
707 stop_reply.
708 (process_stop_reply): Use the stop reply's architecture.
709 (process_g_packet, remote_fetch_registers)
710 (remote_prepare_to_store, store_registers_using_G)
711 (remote_store_registers): Adjust get_remote_arch_state calls,
712 using the regcache's architecture.
713 (remote_get_trace_status): Adjust get_remote_arch_state calls,
714 passing down target_gdbarch explicitly.
715 * spu-multiarch.c (spu_thread_architecture): Defer to the target
716 beneath instead of calling target_gdbarch.
717 * target.c (default_thread_architecture): Use the specified
718 inferior's architecture, instead of the current inferior's
719 architecture (via target_gdbarch).
720
721 2017-10-04 Pedro Alves <palves@redhat.com>
722
723 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
724 case.
725 (regcache_print): Handle !target_has_registers here instead.
726
727 2017-10-04 Pedro Alves <palves@redhat.com>
728
729 * frame.c (create_test_frame): Delete.
730 * frame.h (create_test_frame): Delete.
731 * gdbarch-selftests.c: Include gdbthread.h and target.h.
732 (class regcache_test): Delete.
733 (test_target_has_registers, test_target_has_stack)
734 (test_target_has_memory, test_target_prepare_to_store)
735 (test_target_store_registers): New functions.
736 (test_target_ops): New class.
737 (register_to_value_test): Error out if there's already a
738 process_stratum (or higher) target pushed. Create a fuller mock
739 environment, with mock target_ops, inferior, address space, thread
740 and inferior_ptid.
741 * progspace.c (struct address_space): Move to ...
742 * progspace.h (struct address_space): ... here.
743 * regcache.h (regcache::~regcache, regcache::raw_write)
744 [GDB_SELF_TEST]: No longer virtual.
745
746 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
747
748 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
749
750 2017-10-04 Pedro Alves <palves@redhat.com>
751
752 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
753 out of 'between TRY and CATCH'.
754
755 2017-10-04 Pedro Alves <palves@redhat.com>
756
757 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
758 * common/common-exceptions.h (TRY): Open an outermost scope.
759 Expand intro comment.
760 (CATCH): Reindent.
761 (END_CATCH): Close the outermost scope.
762 * completer.c (complete_line_internal): Add missing END_CATCH.
763
764 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
765
766 * NEWS (Changes since GDB 8.0): Add entry about new
767 'set-cwd-on-gdbserver' feature.
768 (New remote packets): Add entry for QSetWorkingDir.
769 * common/common-inferior.h (set_inferior_cwd): New prototype.
770 * infcmd.c (set_inferior_cwd): Remove "static".
771 (show_cwd_command): Expand text to include remote debugging.
772 * remote.c: Add PACKET_QSetWorkingDir.
773 (remote_protocol_features) <QSetWorkingDir>: New entry for
774 PACKET_QSetWorkingDir.
775 (extended_remote_set_inferior_cwd): New function.
776 (extended_remote_create_inferior): Call
777 "extended_remote_set_inferior_cwd".
778 (_initialize_remote): Call "add_packet_config_cmd" for
779 QSetWorkingDir.
780
781 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
782
783 * NEWS (New commands): Mention "set/show cwd".
784 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
785 "cd" command's help text.
786 * common/common-inferior.h (get_inferior_cwd): New prototype.
787 * infcmd.c (inferior_cwd_scratch): New global variable.
788 (set_inferior_cwd): New function.
789 (get_inferior_cwd): Likewise.
790 (set_cwd_command): Likewise.
791 (show_cwd_command): Likewise.
792 (_initialize_infcmd): Add "set/show cwd" commands.
793 * inferior.h (class inferior) <cwd>: New field.
794 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
795 (fork_inferior): Change inferior's cwd before its execution.
796 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
797 to CreateProcess.
798
799 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
800
801 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
802 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
803 (COMMON_OBS): Add gdb_tilde_expand.o.
804 * common/gdb_tilde_expand.c: New file.
805 * common/gdb_tilde_expand.h: Likewise.
806
807 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
808
809 * gdbarch.sh (objfile): Remove duplicate declaration.
810 * gdbarch.h: Regenerate.
811
812 2017-10-03 Tom Tromey <tom@tromey.com>
813
814 * utils.c (internal_vproblem): Use string_vprintf.
815
816 2017-10-03 Tom Tromey <tom@tromey.com>
817
818 * printcmd.c (info_symbol_command): Use std::string.
819
820 2017-10-03 Tom Tromey <tom@tromey.com>
821
822 * top.c (gdb_safe_append_history): Use std::string.
823
824 2017-10-03 Tom Tromey <tom@tromey.com>
825
826 * event-top.c (stdin_event_handler): Update.
827 * main.c (captured_main_1): Update.
828 * top.h (make_delete_ui_cleanup): Remove.
829 (struct ui): Add constructor and destructor.
830 (new_ui, delete_ui): Remove.
831 * top.c (make_delete_ui_cleanup): Remove.
832 (new_ui_command): Use std::unique_ptr.
833 (delete_ui_cleanup): Remove.
834 (ui::ui): Rename from new_ui. Update.
835 (free_ui): Remove.
836 (ui::~ui): Rename from delete_ui. Update.
837
838 2017-10-03 Tom Tromey <tom@tromey.com>
839
840 * symfile.c (load_progress): Use gdb::byte_vector.
841
842 2017-10-03 Tom Tromey <tom@tromey.com>
843
844 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
845 declaration.
846 * printcmd.c (x_command): Remove unused declaration.
847 * symfile.c (symbol_file_command): Remove unused declaration.
848
849 2017-10-03 Tom Tromey <tom@tromey.com>
850
851 * utils.c (internal_vproblem): Use std::string.
852 (defaulted_query): Likewise.
853
854 2017-10-03 Tom Tromey <tom@tromey.com>
855
856 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
857 * top.c (execute_command_to_string): Update.
858 * utils.c (make_cleanup_restore_page_info): Remove.
859 (do_restore_page_info_cleanup): Remove.
860 (set_batch_flag_and_restore_page_info):
861 New.
862 (make_cleanup_restore_page_info): Remove.
863 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
864 (~set_batch_flag_and_restore_page_info): New
865 (make_cleanup_restore_uinteger): Remove.
866 (make_cleanup_restore_integer): Remove.
867 (struct restore_integer_closure): Remove.
868 (restore_integer): Remove.
869 * utils.h (struct set_batch_flag_and_restore_page_info): New
870 class.
871 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
872 (make_cleanup_restore_page_info): Remove.
873 (make_cleanup_restore_uinteger) Remove.
874 (make_cleanup_restore_integer) Remove.
875
876 2017-10-03 Tom Tromey <tom@tromey.com>
877
878 * record-full.h (record_full_gdb_operation_disable_set): Return
879 scoped_restore_tmpl<int>.
880 * infrun.c (adjust_pc_after_break): Update.
881 (handle_signal_stop): Update.
882 * record-full.c (record_full_gdb_operation_disable_set): Return
883 scoped_restore_tmpl<int>.
884 (record_full_wait_1, record_full_insert_breakpoint)
885 (record_full_remove_breakpoint, record_full_save)
886 (record_full_goto_insn): Update.
887
888 2017-10-02 Tom Tromey <tom@tromey.com>
889
890 PR rust/22236:
891 * rust-lang.c (rust_val_print_str): New function.
892 (val_print_struct): Call it.
893 (rust_subscript): Preserve name of slice type.
894
895 2017-10-02 Tom Tromey <tom@tromey.com>
896
897 * rust-lang.c (rust_subscript): Handle slices in
898 EVAL_AVOID_SIDE_EFFECTS case.
899
900 2017-10-02 Tom Tromey <tom@tromey.com>
901
902 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
903
904 2017-10-02 Tom Tromey <tom@tromey.com>
905
906 * rust-lang.h (rust_slice_type): Add "extern".
907
908 2017-10-02 Tom Tromey <tom@tromey.com>
909 Pedro Alves <palves@redhat.com>
910
911 * ada-lang.h (ada_exc_info::operator<): Make const.
912 (ada_exc_info::operator==): Make const.
913 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
914 Make const.
915
916 2017-09-29 Tom Tromey <tom@tromey.com>
917
918 * target.c (read_whatever_is_readable): Change type of "result".
919 Update.
920 (free_memory_read_result_vector): Remove.
921 (read_memory_robust): Change return type. Update.
922 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
923 bin2hex, std::string.
924 * target.h (memory_read_result_s): Remove typedef.
925 (free_memory_read_result_vector): Remove.
926 (read_memory_robust): Return std::vector.
927
928 2017-09-29 Tom Tromey <tom@tromey.com>
929
930 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
931
932 2017-09-29 Tom Tromey <tom@tromey.com>
933
934 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
935 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
936 operator< and operator==.
937 (ada_exceptions_list): Return a std::vector.
938 * ada-lang.c (ada_exc_info::operator<): Rename from
939 compare_ada_exception_info.
940 (ada_exc_info::operator==): New.
941 (sort_remove_dups_ada_exceptions_list): Change type of
942 "exceptions".
943 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
944 (ada_add_global_exceptions): Likewise.
945 (ada_exceptions_list_1): Return a std::vector.
946 (ada_exceptions_list): Likewise.
947
948 2017-09-29 Tom Tromey <tom@tromey.com>
949
950 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
951 'std::set *'.
952 (print_one_inferior): Update.
953 (free_vector_of_ints): Remove.
954 (list_available_thread_groups): Change "ids" to std::set.
955 (mi_cmd_list_thread_groups): Update.
956 (struct collect_cores_data) <core>: Now a std::set.
957 (collect_cores): Update.
958 (unique): Remove.
959 (print_one_inferior): Update.
960
961 2017-09-29 Tom Tromey <tom@tromey.com>
962
963 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
964 (mi_execute_async_cli_command): Likewise.
965 (mi_cmd_trace_frame_collected): Use field_fmt.
966
967 2017-09-29 Tom Tromey <tom@tromey.com>
968
969 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
970 gdb::byte_vector.
971
972 2017-09-29 Tom Tromey <tom@tromey.com>
973
974 * mi/mi-parse.c (mi_parse): Remove unused declaration.
975
976 2017-09-29 Tom Tromey <tom@tromey.com>
977
978 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
979
980 2017-09-29 Tom Tromey <tom@tromey.com>
981
982 * varobj.h (varobj_gen_name): Return std::string.
983 * varobj.c (varobj_gen_name): Return std::string.
984 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
985 (mi_cmd_var_delete): Don't copy "name".
986
987 2017-09-29 Tom Tromey <tom@tromey.com>
988
989 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
990 (mi_cmd_break_insert_1): Update.
991
992 2017-09-29 Tom Tromey <tom@tromey.com>
993
994 * target.h (make_scoped_defer_target_commit_resume): Update.
995 * target.c (make_scoped_defer_target_commit_resume): Rename from
996 make_cleanup_defer_target_commit_resume. Return a
997 scoped_restore.
998 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
999
1000 2017-09-29 Tom Tromey <tom@tromey.com>
1001
1002 * main.c (captured_main_1): Remove unused declaration.
1003 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
1004
1005 2017-09-29 Tom Tromey <tom@tromey.com>
1006
1007 * symtab.c (search_symbols): Remove unused outer cleanup.
1008 (make_source_files_completion_list): Remove unused declaration.
1009
1010 2017-09-29 Tom Tromey <tom@tromey.com>
1011
1012 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
1013
1014 2017-09-29 Tom Tromey <tom@tromey.com>
1015
1016 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
1017 gdb::byte_vector.
1018
1019 2017-09-29 Tom Tromey <tom@tromey.com>
1020
1021 * complaints.c (vcomplaint): Use std::string.
1022
1023 2017-09-29 Tom Tromey <tom@tromey.com>
1024
1025 * tracepoint.c (trace_variable_command): Use std::string.
1026 (encode_actions_1): Remove unused declarations.
1027 (create_tsv_from_upload): Use std::string.
1028
1029 2017-09-29 Tom Tromey <tom@tromey.com>
1030
1031 * cp-support.c (gdb_demangle): Use std::string.
1032
1033 2017-09-29 Tom Tromey <tom@tromey.com>
1034
1035 * stack.c (parse_frame_specification): Use std::string
1036 (info_frame_command): Use gdb::unique_xmalloc_ptr.
1037
1038 2017-09-29 Tom Tromey <tom@tromey.com>
1039
1040 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
1041
1042 2017-09-29 Tom Tromey <tom@tromey.com>
1043
1044 * utils.c (vfprintf_maybe_filtered): Use std::string.
1045 (vfprintf_unfiltered): Likewise.
1046
1047 2017-09-29 Tom Tromey <tom@tromey.com>
1048
1049 * event-top.c (top_level_prompt): Return std::string.
1050 (display_gdb_prompt): Update.
1051
1052 2017-09-29 Tom Tromey <tom@tromey.com>
1053
1054 * unittests/common-utils-selftests.c (format): New function.
1055 (string_vprintf_tests): New function.
1056 (_initialize_common_utils_selftests): Register new tests.
1057 * common/common-utils.c (string_vprintf): New function.
1058 * common/common-utils.h (string_vprintf): Declare.
1059
1060 2017-09-29 Pedro Alves <palves@redhat.com>
1061
1062 * common/rsp-low.c (unpack_varlen_hex): Constify.
1063 * common/rsp-low.h (unpack_varlen_hex): Constify.
1064 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1065 Constify.
1066 * remote.c (remote_set_permissions, read_ptid)
1067 (remote_current_thread, remote_get_threads_with_qthreadinfo)
1068 (remote_static_tracepoint_marker_at)
1069 (remote_static_tracepoint_markers_by_strid)
1070 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
1071 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
1072 (parse_tracepoint_definition, parse_tsv_definition)
1073 (parse_static_tracepoint_marker_definition): Constify.
1074 * tracepoint.h (parse_static_tracepoint_marker_definition)
1075 (parse_trace_status, parse_tracepoint_status)
1076 (parse_tracepoint_definition, parse_tsv_definition): Constify.
1077
1078 2017-09-29 Pedro Alves <palves@redhat.com>
1079
1080 * remote.c (target_buf, target_buf_size): Delete.
1081 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
1082 Use the connection's packet buffer instead.
1083 All callers adjusted.
1084 (_initialize_remote): Remove references to target_buf and
1085 target_buf_size.
1086
1087 2017-09-28 Pedro Alves <palves@redhat.com>
1088
1089 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1090 unittests/common-utils-selftests.c.
1091 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
1092 (COMMON_OBS): Remove utils-selftests.o.
1093 * utils-selftests.c: Move to ...
1094 * unittests/common-utils-selftests.c: ... here and rename self
1095 test to "string_printf".
1096
1097 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
1098
1099 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
1100 having NULL cus or tus.
1101
1102 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1103
1104 * arm-tdep.c: (convert_from_extended): Remove.
1105 (convert_to_extended): Likewise.
1106 (arm_extract_return_value): Use convert_typed_floating.
1107 (arm_store_return_value): Likewise.
1108
1109 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1110 * sh-tdep.c: Do not include "floatformat.h".
1111 (sh_littlebyte_bigword_type): New function.
1112 (sh_register_convert_to_virtual): Use convert_typed_floating.
1113 (sh_register_convert_to_raw): Likewise.
1114 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1115 (sh64_littlebyte_bigword_type): New function.
1116 (sh64_extract_return_value): Use convert_typed_floating.
1117 (sh64_register_convert_to_virtual): Likewise.
1118 (sh64_register_convert_to_raw): Likewise.
1119
1120 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1121
1122 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
1123 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
1124
1125 * gdbtypes.h (union type_specific): Make field floatformat hold
1126 just a single struct floatformat, not an array.
1127 (floatformat_from_type): Move here.
1128 * gdbtypes.c (floatformat_from_type): Move here. Update to
1129 changed TYPE_FLOATFORMAT definition.
1130 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
1131 (recursive_dump_type): Likewise.
1132 (init_float_type): Install correct floatformat for byte order.
1133 (arch_float_type): Likewise.
1134
1135 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1136
1137 * gdbtypes.c (init_type): Change incoming argument from
1138 length-in-bytes to length-in-bits. Assert length is a
1139 multiple of TARGET_CHAR_BITS.
1140 (arch_type, arch_flags_type): Likewise.
1141 (init_integer_type): Update call to init_type.
1142 (init_character_type): Likewise.
1143 (init_boolean_type): Likewise.
1144 (init_float_type): Likewise.
1145 (init_decfloat_type): Likewise.
1146 (init_complex_type): Likewise.
1147 (init_pointer_type): Likewise.
1148 (objfile_type): Likewise.
1149 (arch_integer_type): Update call to arch_type.
1150 (arch_character_type): Likewise.
1151 (arch_boolean_type): Likewise.
1152 (arch_float_type): Likewise.
1153 (arch_decfloat_type): Likewise.
1154 (arch_complex_type): Likewise.
1155 (arch_pointer_type): Likewise.
1156 (gdbtypes_post_init): Likewise.
1157
1158 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
1159 (read_base_type): Likewise.
1160 * mdebugread.c (basic_type): Likewise.
1161 * stabsread.c (dbx_init_float_type): Likewise.
1162 (rs6000_builtin_type): Likewise.
1163 (read_range_type): Likewise. Also, fix call to init_integer_type
1164 with erroneous length argument.
1165
1166 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
1167 * d-lang.c (build_d_types): Likewise.
1168 * f-lang.c (build_fortran_types): Likewise.
1169 * go-lang.c (build_go_types): Likewise.
1170 * opencl-lang.c (build_opencl_types): Likewise.
1171 * jit.c (finalize_symtab): Likewise.
1172 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1173 (build_std_type_info_type): Likewise.
1174 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
1175 update call to arch_flags_type.
1176
1177 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1178 arch_type.
1179 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1180 * windows-tdep.c (windows_get_tlb_type): Likewise.
1181
1182 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1183 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1184 * m32c-tdep.c (make_types): Likewise.
1185 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1186 (rl78_psw_type): Update call to arch_flags_type.
1187 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1188 * rx-tdep.c (rx_psw_type): Likewise.
1189 (rx_fpsw_type): Likewise.
1190 * sparc-tdep.c (sparc_psr_type): Likewise.
1191 (sparc_fsr_type): Likewise.
1192 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1193 (sparc64_ccr_type): Likewise.
1194 (sparc64_fsr_type): Likewise.
1195 (sparc64_fprs_type): Likewise.
1196
1197 2017-09-27 Tom Tromey <tom@tromey.com>
1198
1199 * findcmd.c (find_command): Constify.
1200
1201 2017-09-27 Tom Tromey <tom@tromey.com>
1202
1203 * ada-tasks.c (task_command_1, task_command): Constify.
1204
1205 2017-09-27 Tom Tromey <tom@tromey.com>
1206
1207 * symtab.c (maintenance_print_symbol_cache)
1208 (maintenance_flush_symbol_cache)
1209 (maintenance_print_symbol_cache_statistics): Constify.
1210
1211 2017-09-27 Tom Tromey <tom@tromey.com>
1212
1213 * inferior.c (detach_inferior_command, kill_inferior_command)
1214 (inferior_command): Constify.
1215
1216 2017-09-27 Tom Tromey <tom@tromey.com>
1217
1218 * regcache.c (regcache_print, maintenance_print_registers)
1219 (maintenance_print_raw_registers)
1220 (maintenance_print_cooked_registers)
1221 (maintenance_print_register_groups)
1222 (maintenance_print_remote_registers): Constify.
1223
1224 2017-09-27 Tom Tromey <tom@tromey.com>
1225
1226 * printcmd.c (map_display_numbers, undisplay_command)
1227 (enable_disable_display_command, enable_display_command)
1228 (disable_display_command): Constify.
1229
1230 2017-09-27 Tom Tromey <tom@tromey.com>
1231
1232 * breakpoint.h (delete_command): Don't declare.
1233 * breakpoint.c (delete_command, enable_once_command)
1234 (enable_count_command, enable_delete_command, breakpoint_1)
1235 (maintenance_info_breakpoints, stopin_command, stopat_command)
1236 (delete_command, delete_trace_command, save_breakpoints)
1237 (save_breakpoints_command, save_tracepoints_command): Constify.
1238
1239 2017-09-27 Tom Tromey <tom@tromey.com>
1240
1241 * macrocmd.c (macro_expand_command, macro_expand_once_command)
1242 (skip_ws, extract_identifier, macro_define_command)
1243 (macro_undef_command, macro_list_command): Constify.
1244
1245 2017-09-27 Tom Tromey <tom@tromey.com>
1246
1247 * infcmd.c (environment_info, set_environment_command)
1248 (unset_environment_command, path_info, info_proc_cmd_1)
1249 (info_proc_cmd_mappings, info_proc_cmd_stat)
1250 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1251 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1252
1253 2017-09-27 Tom Tromey <tom@tromey.com>
1254
1255 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1256 Constify.
1257
1258 2017-09-27 Tom Tromey <tom@tromey.com>
1259
1260 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1261
1262 2017-09-27 Tom Tromey <tom@tromey.com>
1263
1264 * demangle.c (demangle_command): Constify.
1265
1266 2017-09-27 Tom Tromey <tom@tromey.com>
1267
1268 * progspace.c (maintenance_info_program_spaces_command):
1269 Constify.
1270
1271 2017-09-27 Tom Tromey <tom@tromey.com>
1272
1273 * compile/compile.c (check_raw_argument, compile_file_command)
1274 (compile_code_command, compile_print_command): Constify.
1275
1276 2017-09-27 Tom Tromey <tom@tromey.com>
1277
1278 * reggroups.c (maintenance_print_reggroups): Constify.
1279
1280 2017-09-27 Tom Tromey <tom@tromey.com>
1281
1282 * dwarf2read.c (save_gdb_index_command): Constify.
1283
1284 2017-09-27 Tom Tromey <tom@tromey.com>
1285
1286 * stap-probe.c (info_probes_stap_command): Constify.
1287
1288 2017-09-27 Tom Tromey <tom@tromey.com>
1289
1290 * fork-child.c (unset_exec_wrapper_command): Constify.
1291
1292 2017-09-27 Tom Tromey <tom@tromey.com>
1293
1294 * btrace.c (get_uint, get_context_size, no_chunk)
1295 (maint_btrace_packet_history_cmd)
1296 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1297 (maint_info_btrace_cmd): Constify.
1298
1299 2017-09-27 Tom Tromey <tom@tromey.com>
1300
1301 * reverse.c (delete_bookmark_command): Constify.
1302
1303 2017-09-27 Tom Tromey <tom@tromey.com>
1304
1305 * remote.c (set_memory_packet_size)
1306 (set_memory_write_packet_size, show_memory_write_packet_size)
1307 (set_memory_read_packet_size, show_memory_read_packet_size)
1308 (compare_sections_command, packet_command, remote_put_command)
1309 (remote_get_command, remote_delete_command): Constify.
1310
1311 2017-09-27 Tom Tromey <tom@tromey.com>
1312
1313 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1314 (set_mipsfpu_double_command, set_mipsfpu_none_command)
1315 (set_mipsfpu_auto_command): Constify.
1316
1317 2017-09-27 Tom Tromey <tom@tromey.com>
1318
1319 * cli/cli-cmds.h (cd_command): Constify.
1320 * cli/cli-cmds.c (cd_command): Constify.
1321
1322 2017-09-27 Tom Tromey <tom@tromey.com>
1323
1324 * thread.c (thread_name_command, thread_find_command): Constify.
1325
1326 2017-09-27 Tom Tromey <tom@tromey.com>
1327
1328 * probe.c (enable_probes_command, disable_probes_command):
1329 Constify.
1330
1331 2017-09-27 Tom Tromey <tom@tromey.com>
1332
1333 * symfile.c (symbol_file_command): Constify.
1334 * gdbcore.h (deprecated_file_changed_hook): Constify.
1335 * exec.c (deprecated_file_changed_hook, exec_file_command)
1336 (file_command): Constify.
1337 * defs.h (symbol_file_command): Constify.
1338
1339 2017-09-27 Tom Tromey <tom@tromey.com>
1340
1341 * remote-fileio.c (set_system_call_allowed)
1342 (show_system_call_allowed): Constify.
1343
1344 2017-09-27 Tom Tromey <tom@tromey.com>
1345
1346 * tracepoint.c (delete_trace_variable_command)
1347 (tfind_end_command, tfind_start_command, tfind_pc_command)
1348 (tfind_tracepoint_command, tfind_line_command)
1349 (tfind_range_command, tfind_outside_command): Constify.
1350
1351 2017-09-27 Tom Tromey <tom@tromey.com>
1352
1353 * ax-gdb.c (maint_agent_printf_command, agent_command)
1354 (agent_eval_command): Constify.
1355
1356 2017-09-27 Tom Tromey <tom@tromey.com>
1357
1358 * tracepoint.c (info_scope_command): Constify.
1359 * python/python.c (gdbpy_decode_line): Constify.
1360 * python/py-breakpoint.c (bppy_init): Constify.
1361 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1362 * location.h: (new_linespec_location)
1363 (string_to_event_location_basic, string_to_event_location):
1364 Constify.
1365 * location.c (new_linespec_location)
1366 (string_to_event_location_basic, string_to_event_location):
1367 Constify.
1368 * linespec.h (decode_line_with_current_source)
1369 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1370 * linespec.c (linespec_lex_to_end)
1371 (decode_line_with_current_source)
1372 (decode_line_with_last_displayed): Constify.
1373 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1374 Constify.
1375 * cli/cli-cmds.c (edit_command, list_command): Constify.
1376 * breakpoint.h (until_break_command, watch_command_wrapper)
1377 (awatch_command_wrapper, rwatch_command_wrapper)
1378 (init_ada_exception_breakpoint): Constify.
1379 * breakpoint.c (break_command_1, dprintf_command)
1380 (break_range_command, watch_command_wrapper)
1381 (rwatch_command_wrapper, awatch_command_wrapper)
1382 (until_break_command, init_ada_exception_breakpoint)
1383 (strace_marker_create_sals_from_location, trace_command)
1384 (ftrace_command, strace_command, struct tracepoint): Constify.
1385 * ax-gdb.c (agent_command_1): Constify.
1386 * ada-lang.c (ada_exception_sal): Constify.
1387
1388 2017-09-27 Tom Tromey <tom@tromey.com>
1389
1390 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1391 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1392 (get_context_size, no_chunk, get_insn_history_modifiers)
1393 (cmd_record_insn_history, get_call_history_modifiers)
1394 (cmd_record_call_history): Constify.
1395
1396 2017-09-27 Tom Tromey <tom@tromey.com>
1397
1398 * source.c (show_substitute_path_command)
1399 (unset_substitute_path_command, set_substitute_path_command):
1400 Constify.
1401
1402 2017-09-27 Tom Tromey <tom@tromey.com>
1403
1404 * typeprint.c (maintenance_print_type): Constify.
1405 * maint.c (maintenance_dump_me, maintenance_demangle)
1406 (maintenance_time_display, maintenance_info_sections)
1407 (maintenance_print_statistics, maintenance_deprecate)
1408 (maintenance_undeprecate): Constify.
1409 (maintenance_do_deprecate): Constify. Use std::string.
1410 (maintenance_selftest): Constify.
1411 * gdbtypes.h (maintenance_print_type): Constify.
1412
1413 2017-09-27 Tom Tromey <tom@tromey.com>
1414
1415 * hppa-tdep.c (unwind_command): Constify.
1416
1417 2017-09-27 Tom Tromey <tom@tromey.com>
1418
1419 * target-descriptions.c (unset_tdesc_filename_cmd)
1420 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1421 Constify.
1422
1423 2017-09-27 Tom Tromey <tom@tromey.com>
1424
1425 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1426
1427 2017-09-27 Tom Tromey <tom@tromey.com>
1428
1429 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1430
1431 2017-09-27 Tom Tromey <tom@tromey.com>
1432
1433 * tui/tui-regs.c (tui_reg_command): Constify.
1434
1435 2017-09-27 Tom Tromey <tom@tromey.com>
1436
1437 * skip.c (skip_file_command, skip_function_command)
1438 (skip_enable_command, skip_disable_command, skip_delete_command):
1439 Constify.
1440
1441 2017-09-27 Tom Tromey <tom@tromey.com>
1442
1443 * record-btrace.c (cmd_record_btrace_bts_start)
1444 (cmd_record_btrace_pt_start): Constify.
1445
1446 2017-09-27 Tom Tromey <tom@tromey.com>
1447
1448 * symmisc.c (maintenance_print_symbols)
1449 (maintenance_print_msymbols, maintenance_print_objfiles)
1450 (maintenance_info_symtabs, maintenance_check_symtabs)
1451 (maintenance_expand_symtabs, maintenance_info_line_tables):
1452 Constify.
1453
1454 2017-09-27 Tom Tromey <tom@tromey.com>
1455
1456 * top.c (new_ui_command): Constify.
1457
1458 2017-09-27 Tom Tromey <tom@tromey.com>
1459
1460 * symfile.c (add_symbol_file_command)
1461 (remove_symbol_file_command, list_overlays_command)
1462 (map_overlay_command, unmap_overlay_command)
1463 (overlay_auto_command, overlay_manual_command)
1464 (overlay_off_command, overlay_load_command): Constify.
1465
1466 2017-09-27 Tom Tromey <tom@tromey.com>
1467
1468 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1469 (info_spu_mailbox_command, info_spu_dma_command)
1470 (info_spu_proxydma_command): Constify.
1471
1472 2017-09-27 Tom Tromey <tom@tromey.com>
1473
1474 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1475
1476 2017-09-27 Tom Tromey <tom@tromey.com>
1477
1478 * cli/cli-script.c (user_defined_command): Constify.
1479
1480 2017-09-27 Tom Tromey <tom@tromey.com>
1481
1482 * cli/cli-dump.c (dump_memory_command, dump_value_command)
1483 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1484 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1485 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1486 (dump_binary_value, append_binary_memory, append_binary_value):
1487 Constify.
1488 (struct dump_context) <func>: Constify.
1489 (add_dump_command): Update.
1490
1491 2017-09-27 Tom Tromey <tom@tromey.com>
1492
1493 * cli/cli-cmds.c (show_version, show_configuration)
1494 (source_command, show_user): Constify.
1495
1496 2017-09-27 Tom Tromey <tom@tromey.com>
1497
1498 * target.c (maintenance_print_target_stack): Constify.
1499
1500 2017-09-27 Tom Tromey <tom@tromey.com>
1501
1502 * interps.c (interpreter_exec_cmd): Constify.
1503
1504 2017-09-27 Tom Tromey <tom@tromey.com>
1505
1506 * record-full.c (cmd_record_full_restore): Constify.
1507
1508 2017-09-27 Tom Tromey <tom@tromey.com>
1509
1510 * memattr.c (enable_mem_command, disable_mem_command)
1511 (delete_mem_command): Constify.
1512
1513 2017-09-27 Tom Tromey <tom@tromey.com>
1514
1515 * value.c (show_convenience): Constify.
1516
1517 2017-09-27 Tom Tromey <tom@tromey.com>
1518
1519 * gdbcore.h (core_file_command): Update.
1520 * corefile.c (core_file_command): Constify.
1521
1522 2017-09-27 Tom Tromey <tom@tromey.com>
1523
1524 * user-regs.c (maintenance_print_user_registers): Constify.
1525
1526 2017-09-27 Tom Tromey <tom@tromey.com>
1527
1528 * cp-namespace.c (maintenance_cplus_namespace): Constify.
1529
1530 2017-09-27 Tom Tromey <tom@tromey.com>
1531
1532 * cp-support.c (first_component_command): Constify.
1533
1534 2017-09-27 Tom Tromey <tom@tromey.com>
1535
1536 * psymtab.c (maintenance_print_psymbols)
1537 (maintenance_info_psymtabs, maintenance_check_psymtabs):
1538 Constify.
1539
1540 2017-09-27 Tom Tromey <tom@tromey.com>
1541
1542 * windows-tdep.c (display_tib): Constify.
1543
1544 2017-09-27 Tom Tromey <tom@tromey.com>
1545
1546 * linux-fork.c (delete_checkpoint_command)
1547 (detach_checkpoint_command): Constify.
1548
1549 2017-09-27 Tom Tromey <tom@tromey.com>
1550
1551 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1552
1553 2017-09-27 Tom Tromey <tom@tromey.com>
1554
1555 * arc-tdep.c (dump_arc_instruction_command): Constify.
1556
1557 2017-09-27 Tom Tromey <tom@tromey.com>
1558
1559 * valprint.c (set_radix, show_radix): Constify.
1560
1561 2017-09-27 Tom Tromey <tom@tromey.com>
1562
1563 * dtrace-probe.c (info_probes_dtrace_command): Constify.
1564
1565 2017-09-27 Tom Tromey <tom@tromey.com>
1566
1567 * command.h (not_just_help_class_command): Update.
1568 * cli/cli-decode.h (not_just_help_class_command): Update.
1569 * cli/cli-decode.c (not_just_help_class_command): Constify.
1570
1571 2017-09-27 Tom Tromey <tom@tromey.com>
1572
1573 * gdb_bfd.c (maintenance_info_bfds): Constify.
1574
1575 2017-09-27 Tom Tromey <tom@tromey.com>
1576
1577 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1578 overloads.
1579 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
1580 (do_const_cfunc): New function.
1581 (cmd_cfunc_eq): New overload.
1582 (cli_user_command_p): Check do_const_cfunc.
1583 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1584 const_cfunc.
1585 * command.h (add_cmd): Add const overload and no-function
1586 overload.
1587 (set_cmd_cfunc): Add const overload.
1588 (cmd_const_cfunc_ftype): Declare.
1589 (cmd_cfunc_eq): Add const overload.
1590 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1591 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1592 overload.
1593
1594 2017-09-27 Tom Tromey <tom@tromey.com>
1595
1596 * macroexp.c (get_next_token_for_substitution): New function.
1597 (substitute_args): Call it. Check for __VA_OPT__.
1598
1599 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
1600 Pedro Alves <palves@redhat.com>
1601
1602 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1603 producer_is_icc_lt_14.
1604 (producer_is_icc_lt_14): New function.
1605 (check_producer): Add code for checking version of ICC.
1606 (producer_is_icc): Move to producer.c.
1607 (read_structure_type): Restrict ICC workaround to ICC<14.
1608 * producer.c: Include selftest.h.
1609 (producer_is_icc, producer_parsing_tests, _initialize_producer):
1610 New functions.
1611 * producer.h (producer_is_icc): New declaration.
1612
1613 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
1614
1615 * Makefile.in (SFILES): Add producer.c.
1616 (COMMON_OBS): Add producer.o
1617 * amd64-tdep.c (producer.h): Add new include.
1618 * dwarf2read.c (producer.h): Add new include.
1619 * producer.c: New file.
1620 * producer.h: New file.
1621 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1622 producer.c.
1623 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1624 producer.h.
1625
1626 2017-09-26 Matthias Klose <doko@ubuntu.com>
1627
1628 * configure.ac: Search ncursesw before ncurses.
1629 Check ncursesw/ncurses.h before ncurses/ncurses.h.
1630 * gdb_curses.h: Include <ncursesw/ncurses.h>
1631 * config.in, configure: Regenerate.
1632
1633 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1634
1635 PR gdb/22185
1636 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1637 obsolete.
1638 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1639 Remove i386sol2 support.
1640 * configure.nat <i386sol2>: Remove.
1641 <sol2-64>: Fold into ...
1642 <sol2>: ... this.
1643 Move common settings to default section.
1644 Add sol-thread.o.
1645 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1646 x86_64-*-solaris2.1[0-9]*>: Rename to ...
1647 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1648 <i[34567]86-*-solaris*>: Remove.
1649 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1650
1651 * configure.ac: Remove wctype in libw check.
1652 (_MSE_INT_H): Don't define on Solaris 7-9.
1653 <solaris*>: Remove libthread_db.so.1 check.
1654 * configure: Regenerate.
1655 * config.in: Regenerate.
1656
1657 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1658 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1659 (gdb_ps_size_t): Remove.
1660 Use base types in users.
1661 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1662
1663 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1664
1665 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1666
1667 PR build/22206
1668 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1669 (adi_is_addr_mapped): Likewise.
1670 (PSR_ICC): Don't redefine.
1671 (PSR_IMPL): Likewise.
1672
1673 2017-09-25 Tom Tromey <tom@tromey.com>
1674
1675 * regcache.c (regcache::dump): Use string_printf.
1676
1677 2017-09-25 Tom Tromey <tom@tromey.com>
1678
1679 * regcache.c (class regcache_invalidator): New.
1680 (struct register_to_invalidate): Remove.
1681 (make_cleanup_regcache_invalidate): Remove.
1682 (regcache::raw_write): Use regcache_invalidator.
1683
1684 2017-09-25 Tom Tromey <tom@tromey.com>
1685
1686 * spu-tdep.c (spu2ppu_sniffer): Update.
1687 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1688 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1689 Remove.
1690 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1691 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1692 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1693 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1694 (frame_pop): Update.
1695
1696 2017-09-25 Tom Tromey <tom@tromey.com>
1697
1698 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1699 * regcache.h (regcache_xfree): Don't declare.
1700 * regcache.c (regcache_xfree): Remove.
1701 (do_regcache_xfree): Use delete.
1702 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1703 * linux-fork.c (free_fork): Use delete.
1704 (fork_save_infrun_state): Likewise.
1705 * jit.c (jit_dealloc_cache): Use delete.
1706 * infrun.c (discard_infcall_suspend_state): Use delete.
1707
1708 2017-09-25 Tom Tromey <tom@tromey.com>
1709
1710 * regcache.h (regcache_xmalloc): Don't declare.
1711 (regcache_raw_set_cached_value): Update comment.
1712 * regcache.c (regcache_xmalloc): Remove.
1713 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1714 * jit.c (jit_frame_sniffer): Use new.
1715 * frame.c (frame_save_as_regcache): Use new.
1716
1717 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1718
1719 * NEWS: Advertise support for guarded-storage registers on IBM z.
1720
1721 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1722
1723 * s390-linux-nat.c (have_regset_gs): New static variable.
1724 (s390_linux_fetch_inferior_registers): Handle guarded-storage
1725 control block and guarded-storage broadcast control regsets.
1726 (s390_read_description): Detect whether the target has
1727 guarded-storage support, return appropriate tdesc.
1728 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1729 (features/s390x-gs-linux64.c): Likewise.
1730 (struct gdbarch_tdep) <have_gs>: New field.
1731 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1732 (s390_gsbc_regset): New variables.
1733 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1734 and s390_gsbc_regset, if applicable.
1735 (s390_core_read_description): Check whether core file was from a
1736 target with guarded-storage support; include appropriate regsets.
1737 (s390_gdbarch_init): Add registers for guarded-storage support.
1738 (_initialize_s390_tdep): Initialize new target descriptions that
1739 include registers for guarded-storage support.
1740 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1741 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1742 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1743 (S390_NUM_REGS): Adjust macro definition.
1744 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1745 (tdesc_s390x_gs_linux64): New declarations.
1746
1747 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1748
1749 * features/s390-gs-linux64.xml: New file.
1750 * features/s390-gs.xml: New file.
1751 * features/s390-gsbc.xml: New file.
1752 * features/s390x-gs-linux64.xml: New file.
1753 * features/Makefile (WHICH): Add s390-gs-linux64 and
1754 s390x-gs-linux64.
1755 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1756 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1757 * features/s390-gs-linux64.c: New generated file.
1758 * features/s390x-gs-linux64.c: New file.
1759 * regformats/s390-gs-linux64.dat: New file.
1760 * regformats/s390x-gs-linux64.dat: New file.
1761
1762 2017-09-23 Tom Tromey <tom@tromey.com>
1763
1764 * defs.h (make_cleanup_override_quit_handler): Don't declare.
1765
1766 2017-09-22 Tom Tromey <tom@tromey.com>
1767
1768 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1769 type to scoped_restore_tmpl.
1770 <scoped_input_handler>: Initialize m_quit_handler directly.
1771
1772 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
1773
1774 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1775 (cd_command): Likewise. Free "current_directory" before
1776 assigning to it.
1777 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1778 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1779 * top.c (gdb_dirbuf): Remove global declaration.
1780 * top.h (gdb_dirbuf): Likewise.
1781
1782 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
1783
1784 * gnulib/aclocal.m4: Regenerate.
1785 * gnulib/config.in: Regenerate.
1786 * gnulib/configure: Regenerate.
1787 * gnulib/import/Makefile.am: Regenerate.
1788 * gnulib/import/Makefile.in: Regenerate.
1789 * gnulib/import/assure.h: New file.
1790 * gnulib/import/at-func.c: Likewise
1791 * gnulib/import/chdir-long.c: New file.
1792 * gnulib/import/chdir-long.h: New file.
1793 * gnulib/import/cloexec.c: New file.
1794 * gnulib/import/cloexec.h: New file.
1795 * gnulib/import/close.c: New file.
1796 * gnulib/import/closedir.c: New file.
1797 * gnulib/import/dirent-private.h: New file.
1798 * gnulib/import/dup-safer.c: New file.
1799 * gnulib/import/dup.c: New file.
1800 * gnulib/import/dup2.c: New file.
1801 * gnulib/import/error.c: New file.
1802 * gnulib/import/error.h: New file.
1803 * gnulib/import/exitfail.c: New file.
1804 * gnulib/import/exitfail.h: New file.
1805 * gnulib/import/fchdir.c: New file.
1806 * gnulib/import/fcntl.c: New file.
1807 * gnulib/import/fcntl.in.h: New file.
1808 * gnulib/import/fd-hook.c: New file.
1809 * gnulib/import/fd-hook.h: New file.
1810 * gnulib/import/fd-safer.c: New file.
1811 * gnulib/import/fdopendir.c: New file.
1812 * gnulib/import/filename.h: New file.
1813 * gnulib/import/filenamecat-lgpl.c: New file.
1814 * gnulib/import/filenamecat.h: New file.
1815 * gnulib/import/fstat.c: New file.
1816 * gnulib/import/fstatat.c: New file.
1817 * gnulib/import/getcwd-lgpl.c: New file.
1818 * gnulib/import/getcwd.c: New file.
1819 * gnulib/import/getdtablesize.c: New file.
1820 * gnulib/import/getlogin_r.c: New file.
1821 * gnulib/import/getprogname.c: New file.
1822 * gnulib/import/getprogname.h: New file.
1823 * gnulib/import/gettext.h: New file.
1824 * gnulib/import/glob-libc.h: New file.
1825 * gnulib/import/glob.c: New file.
1826 * gnulib/import/glob.in.h: New file.
1827 * gnulib/import/intprops.h: New file.
1828 * gnulib/import/m4/chdir-long.m4: New file.
1829 * gnulib/import/m4/close.m4: New file.
1830 * gnulib/import/m4/closedir.m4: New file.
1831 * gnulib/import/m4/d-ino.m4: New file.
1832 * gnulib/import/m4/d-type.m4: New file.
1833 * gnulib/import/m4/dup.m4: New file.
1834 * gnulib/import/m4/dup2.m4: New file.
1835 * gnulib/import/m4/error.m4: New file.
1836 * gnulib/import/m4/fchdir.m4: New file.
1837 * gnulib/import/m4/fcntl.m4: New file.
1838 * gnulib/import/m4/fcntl_h.m4: New file.
1839 * gnulib/import/m4/fdopendir.m4: New file.
1840 * gnulib/import/m4/filenamecat.m4: New file.
1841 * gnulib/import/m4/fstat.m4: New file.
1842 * gnulib/import/m4/fstatat.m4: New file.
1843 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1844 * gnulib/import/m4/getcwd-path-max.m4: New file.
1845 * gnulib/import/m4/getcwd.m4: New file.
1846 * gnulib/import/m4/getdtablesize.m4: New file.
1847 * gnulib/import/m4/getlogin_r.m4: New file.
1848 * gnulib/import/m4/getprogname.m4: New file.
1849 * gnulib/import/m4/glob.m4: New file.
1850 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1851 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1852 * gnulib/import/m4/mempcpy.m4: New file.
1853 * gnulib/import/m4/memrchr.m4: New file.
1854 * gnulib/import/m4/mode_t.m4: New file.
1855 * gnulib/import/m4/msvc-inval.m4: New file.
1856 * gnulib/import/m4/msvc-nothrow.m4: New file.
1857 * gnulib/import/m4/open.m4: New file.
1858 * gnulib/import/m4/openat.m4: New file.
1859 * gnulib/import/m4/opendir.m4: New file.
1860 * gnulib/import/m4/readdir.m4: New file.
1861 * gnulib/import/m4/realloc.m4: New file.
1862 * gnulib/import/m4/rewinddir.m4: New file.
1863 * gnulib/import/m4/save-cwd.m4: New file.
1864 * gnulib/import/m4/strdup.m4: New file.
1865 * gnulib/import/m4/strerror.m4: New file.
1866 * gnulib/import/m4/unistd-safer.m4: New file.
1867 * gnulib/import/mempcpy.c: New file.
1868 * gnulib/import/memrchr.c: New file.
1869 * gnulib/import/msvc-inval.c: New file.
1870 * gnulib/import/msvc-inval.h: New file.
1871 * gnulib/import/msvc-nothrow.c: New file.
1872 * gnulib/import/msvc-nothrow.h: New file.
1873 * gnulib/import/open.c: New file.
1874 * gnulib/import/openat-die.c: New file.
1875 * gnulib/import/openat-priv.h: New file.
1876 * gnulib/import/openat-proc.c: New file.
1877 * gnulib/import/openat.c: New file.
1878 * gnulib/import/openat.h: New file.
1879 * gnulib/import/opendir.c: New file.
1880 * gnulib/import/pipe-safer.c: New file.
1881 * gnulib/import/readdir.c: New file.
1882 * gnulib/import/realloc.c: New file.
1883 * gnulib/import/rewinddir.c: New file.
1884 * gnulib/import/save-cwd.c: New file.
1885 * gnulib/import/save-cwd.h: New file.
1886 * gnulib/import/strdup.c: New file.
1887 * gnulib/import/strerror-override.c: New file.
1888 * gnulib/import/strerror-override.h: New file.
1889 * gnulib/import/strerror.c: New file.
1890 * gnulib/import/unistd--.h: New file.
1891 * gnulib/import/unistd-safer.h: New file.
1892 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1893 "getcwd" and "glob".
1894 * ser-tcp.c: Undefine "close" before redefining it.
1895
1896 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1897
1898 * guile/scm-value.c (gdbscm_value_address): Initialize address,
1899 get rid of res_val.
1900
1901 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1902
1903 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1904 <sol2,sparc>: Likewise.
1905 <sol2-64,i386>: Likewise.
1906
1907 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1908 -Wdeprecated-declarations on *-*-solaris*.
1909 * configure: Regenerate.
1910
1911 * procfs.c: Include "nat/inferior.h".
1912 (procfs_info_proc): Fix typo.
1913
1914 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1915
1916 * remote.c (vector): Include.
1917 (struct private_thread_info): Add field, thread_handle.
1918 (free_private_thread_info): Deallocate storage associated with
1919 thread handle.
1920 (get_private_info_thread): Initialize `thread_handle' field.
1921 (struct thread_item): Add field, thread_handle.
1922 (clear_threads_listing_context): Deallocate storage associated
1923 with thread handle.
1924 (start_thread): Add support for "handle" attribute.
1925 (thread_attributes): Add "handle".
1926 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1927 field.
1928 (remote_update_thread_list): Update thread_handle.
1929 (remote_thread_handle_to_thread_info): New function.
1930 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1931
1932 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1933
1934 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1935 function.
1936 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1937 * python/python-internal.h (thread_object_type): Declare.
1938
1939 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1940
1941 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1942 (target_thread_handle_to_thread_info): Declare.
1943 * target.c (target_thread_handle_to_thread_info): New function.
1944 * target-delegates.c: Regenerate.
1945 * gdbthread.h (find_thread_by_handle): Declare.
1946 * thread.c (find_thread_by_handle): New function.
1947 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1948 function.
1949 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1950
1951 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1952
1953 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1954
1955 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1956
1957 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1958
1959 2017-09-21 Yao Qi <yao.qi@linaro.org>
1960
1961 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1962 to gdb_target_obs.
1963
1964 2017-09-20 Tom Tromey <tom@tromey.com>
1965
1966 * breakpoint.c (struct counted_command_line): Remove.
1967 (breakpoint_commands): Update.
1968 (alloc_counted_command_line, incref_counted_command_line)
1969 (decref_counted_command_line, do_cleanup_counted_command_line)
1970 (make_cleanup_decref_counted_command_line): Remove.
1971 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1972 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1973 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1974 (save_breakpoints): Update.
1975 * breakpoint.h (counted_command_line): Now a typedef to
1976 shared_ptr.
1977 (struct breakpoint) <commands>: Now a counted_command_line.
1978 (struct bpstats) <command>: Likewise.
1979
1980 2017-09-20 Tom Tromey <tom@tromey.com>
1981
1982 * breakpoint.c (struct commands_info, do_map_commands_command):
1983 Remove.
1984 (commands_command_1): Update.
1985 (iterate_over_related_breakpoints): Take a function_view.
1986 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1987 (delete_command): Update.
1988 (map_breakpoint_numbers): Take a function_view.
1989 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1990 (disable_command): Update.
1991 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1992 (enable_command): Update.
1993 (struct disp_data, do_enable_breakpoint_disp)
1994 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1995 (do_map_enable_delete_breakpoint): Remove.
1996 (enable_once_command, enable_count_command, enable_delete_command)
1997 (delete_trace_variable_command): Update.
1998
1999 2017-09-20 Tom Tromey <tom@tromey.com>
2000
2001 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
2002 (bpstat_clear): Use delete.
2003 (bpstats): New constructors.
2004 (bpstat_copy, bpstat_stop_status): Use new.
2005 (dprintf_after_condition_true): Update.
2006 * breakpoint.h (bpstats::bpstats): Add constructors.
2007 (bpstats::~bpstats): Add destructor.
2008
2009 2017-09-20 Pedro Alves <palves@redhat.com>
2010
2011 * eval.c (make_params): Delete, refactored as ...
2012 (class fake_method): ... this new type's ctor.
2013 (fake_method::~fake_method): New.
2014 (evaluate_subexp_standard): Use 'fake_method'.
2015
2016 2017-09-20 Tom Tromey <tom@tromey.com>
2017
2018 * windows-nat.c (get_windows_debug_event, windows_wait)
2019 (do_initial_windows_stuff, windows_attach): Update.
2020 * utils.c (vwarning, internal_vproblem): Update.
2021 (ui_unregister_input_event_handler_cleanup)
2022 (prepare_to_handle_input): Remove.
2023 (class scoped_input_handler): New.
2024 (defaulted_query, prompt_for_continue): Update.
2025 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
2026 Update.
2027 * top.c (undo_terminal_modifications_before_exit): Update.
2028 * target/target.h (target_terminal_init, target_terminal_inferior)
2029 (target_terminal_ours): Don't declare.
2030 (class target_terminal): New.
2031 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
2032 (target_terminal_ours_for_output)
2033 (make_cleanup_restore_target_terminal): Don't declare.
2034 (target_terminal_info): Remove.
2035 * target.c (enum terminal_state, terminal_state): Remove.
2036 (target_terminal::terminal_state): Define.
2037 (target_terminal::init): Rename from target_terminal_init.
2038 (target_terminal::inferior): Rename from
2039 target_terminal_inferior.
2040 (target_terminal::ours): Rename from target_terminal_ours.
2041 (target_terminal::ours_for_output): Rename from
2042 target_terminal_ours_for_output.
2043 (target_terminal::info): New method.
2044 (cleanup_restore_target_terminal)
2045 (make_cleanup_restore_target_terminal): Remove.
2046 * solib.c (handle_solib_event): Update.
2047 * remote.c (remote_serial_quit_handler): Update.
2048 (remote_terminal_inferior, remote_wait_as): Update.
2049 * record-full.c (record_full_wait_1): Update.
2050 * nto-procfs.c (procfs_create_inferior): Update.
2051 * nat/fork-inferior.c (startup_inferior): Update.
2052 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
2053 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
2054 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
2055 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
2056 (mi_breakpoint_created, mi_breakpoint_deleted)
2057 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
2058 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2059 (mi_user_selected_context_changed, report_initial_inferior):
2060 Update.
2061 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
2062 (linux_nat_terminal_inferior): Update.
2063 * infrun.c (follow_fork_inferior)
2064 (handle_vfork_child_exec_or_exit, do_target_resume)
2065 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
2066 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
2067 Update.
2068 * inflow.c (child_terminal_init, info_terminal_command): Update.
2069 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
2070 (attach_command): Update.
2071 * infcall.c (call_thread_fsm_should_stop): Update.
2072 * gnu-nat.c (gnu_attach): Update.
2073 * extension.c (struct active_ext_lang_state)
2074 (restore_active_ext_lang): Update.
2075 * exceptions.c (print_flush): Update.
2076 * event-top.c (async_enable_stdin, default_quit_handler): Update.
2077 (struct quit_handler_cleanup_data, restore_quit_handler)
2078 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
2079 Remove.
2080 * cp-support.c (gdb_demangle): Update.
2081 * breakpoint.c (update_inserted_breakpoint_locations)
2082 (insert_breakpoint_locations, handle_jit_event)
2083 (disable_breakpoints_in_unloaded_shlib): Update.
2084 * annotate.c (annotate_breakpoints_invalid)
2085 (annotate_frames_invalid): Update.
2086
2087 2017-09-20 Tom Tromey <tom@tromey.com>
2088
2089 * main.c (catch_command_errors): Rename from
2090 catch_command_errors_const.
2091 (captured_main_1): Update.
2092
2093 2017-09-20 Pedro Alves <palves@redhat.com>
2094
2095 * cli/cli-cmds.c (list_command): Use print_sal_location.
2096 (print_sal_location): New function.
2097 (ambiguous_line_spec): Use print_sal_location.
2098 * linespec.c (symbol_to_sal): Record the symbol in the sal.
2099 * symtab.c (find_function_start_sal): Likewise.
2100 * symtab.h (symtab_and_line::symbol): New field.
2101
2102 2017-09-20 Pedro Alves <palves@redhat.com>
2103
2104 * linespec.c (minsym_found): Handle non-text minsyms.
2105 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
2106
2107 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2108
2109 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
2110 backslash.
2111
2112 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2113
2114 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
2115 vmovups instead vmovaps.
2116 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
2117
2118 2017-09-19 John Baldwin <jhb@FreeBSD.org>
2119
2120 * NEWS (Changes since GDB 8.0): Add starti.
2121 * infcmd.c (enum run_break): New.
2122 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
2123 case.
2124 (run_command): Use enum run_how.
2125 (start_command): Likewise.
2126 (starti_command): New function.
2127 (RUN_ARGS_HELP): New macro.
2128 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
2129 commands. Add starti command.
2130
2131 2017-09-19 Yao Qi <yao.qi@linaro.org>
2132
2133 * Makefile.in (monitor.o): Remove the rule.
2134
2135 2017-09-19 Yao Qi <yao.qi@linaro.org>
2136
2137 * annotate.h (struct annotate_arg_emitter): Use
2138 DISABLE_COPY_AND_ASSIGN.
2139 * common/refcounted-object.h (refcounted_object): Likewise.
2140 * completer.h (struct completion_result): Likewise.
2141 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
2142 * filename-seen-cache.h (filename_seen_cache): Likewise.
2143 * gdbcore.h (thread_section_name): Likewise.
2144 * gdb_regex.h (compiled_regex): Likewise.
2145 * gdbthread.h (scoped_restore_current_thread): Likewise.
2146 * inferior.h (scoped_restore_current_inferior): Likewise.
2147 * jit.c (jit_reader): Likewise.
2148 * linespec.h (struct linespec_result): Likewise.
2149 * mi/mi-parse.h (struct mi_parse): Likewise.
2150 * nat/fork-inferior.c (execv_argv): Likewise.
2151 * progspace.h (scoped_restore_current_program_space): Likewise.
2152 * python/python-internal.h (class gdbpy_enter): Likewise.
2153 * regcache.h (regcache): Likewise.
2154 * target-descriptions.c (struct tdesc_reg): Likewise.
2155 (struct tdesc_type): Likewise.
2156 (struct tdesc_feature): Likewise.
2157 * ui-out.h (ui_out_emit_type): Likewise.
2158
2159 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
2160
2161 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
2162 label abort_expression.
2163
2164 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2165
2166 * common/buffer.c (buffer_xml_printf): Adjust.
2167 * common/xml-utils.c (xml_escape_text): Change return type to
2168 std::string, update code accordingly.
2169 * common/xml-utils.h (xml_escape_text): Change return type to
2170 std::string.
2171 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2172 * windows-tdep.c (windows_xfer_shared_library): Adjust.
2173 * unittests/xml-utils-selftests.c (test_xml_escape_text):
2174 Adjust.
2175
2176 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2177
2178 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2179 (SUBDIR_UNITTESTS_OBS): Add new object file.
2180 * unittests/xml-utils-selftests.c: New file.
2181
2182 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2183
2184 * common/selftest.h (selftest): New struct/interface.
2185 (register_test): Add name parameter, add new overload.
2186 (run_tests): Add filter parameter.
2187 (for_each_selftest_ftype): New typedef.
2188 (for_each_selftest): New declaration.
2189 * common/selftest.c (tests): Change type to
2190 map<string, unique_ptr<selftest>>.
2191 (simple_selftest): New struct.
2192 (register_test): New function.
2193 (register_test): Add name parameter and use it.
2194 (run_tests): Add filter parameter and use it. Add prints.
2195 Adjust to vector -> map change.
2196 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2197 registering selftests.
2198 * arm-tdep.c (_initialize_arm_tdep): Likewise.
2199 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2200 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2201 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2202 * findvar.c (_initialize_findvar): Likewise.
2203 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2204 * maint.c (maintenance_selftest): Update call to run_tests.
2205 (maintenance_info_selftests): New function.
2206 (_initialize_maint_cmds): Register "maintenance info selftests"
2207 command. Update "maintenance selftest" doc.
2208 * regcache.c (_initialize_regcache): Add names when registering
2209 selftests.
2210 * rust-exp.y (_initialize_rust_exp): Likewise.
2211 * selftest-arch.c (gdbarch_selftest): New struct.
2212 (gdbarch_tests): Remove.
2213 (register_test_foreach_arch): Add name parameter. Call
2214 register_test.
2215 (tests_with_arch): Remove, move most content to
2216 gdbarch_selftest::operator().
2217 (_initialize_selftests_foreach_arch): Remove.
2218 * selftest-arch.h (register_test_foreach_arch): Add name
2219 parameter.
2220 (run_tests_with_arch): New declaration.
2221 * utils-selftests.c (_initialize_utils_selftests): Add names
2222 when registering selftests.
2223 * utils.c (_initialize_utils): Likewise.
2224 * unittests/array-view-selftests.c
2225 (_initialize_array_view_selftests): Likewise.
2226 * unittests/environ-selftests.c (_initialize_environ_selftests):
2227 Likewise.
2228 * unittests/function-view-selftests.c
2229 (_initialize_function_view_selftests): Likewise.
2230 * unittests/offset-type-selftests.c
2231 (_initialize_offset_type_selftests): Likewise.
2232 * unittests/optional-selftests.c
2233 (_initialize_optional_selftests): Likewise.
2234 * unittests/scoped_restore-selftests.c
2235 (_initialize_scoped_restore_selftests): Likewise.
2236 * NEWS: Document "maintenance selftest" and "maint info
2237 selftests".
2238
2239 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2240
2241 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2242 scoped_restore.
2243
2244 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2245
2246 * mi/mi-main.c (mi_load_progress): Make uiout variable
2247 a unique_ptr.
2248
2249 2017-09-15 Pedro Alves <palves@redhat.com>
2250
2251 * compile/compile-c-types.c (convert_enum, convert_int)
2252 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2253
2254 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2255
2256 * dwarf2read.c (copy_string): Remove.
2257 (parse_macro_definition): Replace copy_string with savestring.
2258
2259 2017-09-15 Yao Qi <yao.qi@linaro.org>
2260
2261 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2262 gdb_target_obs.
2263 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2264 Likewise.
2265 (i[34567]86-*-linux*): Likewise.
2266
2267 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2268
2269 * dwarf2expr.h (dwarf_stack_value): Add constructor.
2270 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2271 <stack>: Change type to std::vector.
2272 <stack_len, stack_allocated>: Remove.
2273 <grow_stack>: Remove.
2274 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2275 (dwarf_expr_context::~dwarf_expr_context): Remove.
2276 (dwarf_expr_context::grow_stack): Remove.
2277 (dwarf_expr_context::push): Adjust.
2278 (dwarf_expr_context::pop): Adjust.
2279 (dwarf_expr_context::fetch): Adjust.
2280 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2281 (dwarf_expr_context::stack_empty_p): Adjust.
2282 (dwarf_expr_context::execute_stack_op): Adjust.
2283
2284 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2285
2286 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2287 return type to bool.
2288 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2289
2290 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2291
2292 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2293 Change type to bool.
2294 (dwarf_stack_value) <in_stack_memory>: Likewise.
2295 (dwarf_expr_context) <push_address>: Change parameter type to
2296 bool.
2297 <fetch_in_stack_memory>: Change return type to bool.
2298 <push>: Change parameter type to bool.
2299 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2300 to bool.
2301 (dwarf_expr_context::push_address): Likewise.
2302 (dwarf_expr_context::fetch_in_stack_memory): Change return type
2303 to bool.
2304 (dwarf_expr_context::execute_stack_op): Adjust.
2305 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2306
2307 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2308
2309 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2310 (struct dwarf_expr_context) <n_pieces>: Remove.
2311 <pieces>: Change type to std::vector.
2312 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2313 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2314 pieces.
2315 (dwarf_expr_context::add_piece): Adjust.
2316 * dwarf2loc.c (struct piece_closure): Initialize fields.
2317 <n_pieces>: Remove.
2318 <pieces>: Change type to std::vector.
2319 (allocate_piece_closure): Adjust, change parameter to
2320 std::vector rvalue and std::move it to piece_closure.
2321 (rw_pieced_value): Adjust.
2322 (check_pieced_synthetic_pointer): Adjust.
2323 (indirect_synthetic_pointer): Adjust.
2324 (coerce_pieced_ref): Adjust.
2325 (free_pieced_value_closure): Adjust. Use delete to free
2326 piece_closure.
2327 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
2328 to allocate_piece_closure.
2329 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2330
2331 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2332
2333 * probe.h (probe_ops_cp): Remove typedef.
2334 (DEF_VEC_P (probe_ops_cp)): Remove.
2335 (all_probe_ops): Change type to std::vector.
2336 * probe.c (info_probes_for_ops): Adjust to vector change.
2337 (probe_linespec_to_ops): Likewise.
2338 (all_probe_ops): Change type to std::vector.
2339 (_initialize_probe): Adjust to vector change.
2340 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2341 * elfread.c (elf_get_probes): Likewise.
2342 * stap-probe.c (_initialize_stap_probe): Likewise.
2343
2344 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2345
2346 * probe.h (struct bound_probe): Define constructors.
2347 * probe.c (bound_probe_s): Remove typedef.
2348 (DEF_VEC_O (bound_probe_s)): Remove VEC.
2349 (collect_probes): Change return type to std::vector, remove
2350 cleanup.
2351 (compare_probes): Return bool, change parameter type. Change
2352 semantic to "less than".
2353 (gen_ui_out_table_header_info): Change parameter to std::vector
2354 and update.
2355 (exists_probe_with_pops): Likewise.
2356 (info_probes_for_ops): Update to std::vector change.
2357 (enable_probes_command): Likewise.
2358 (disable_probes_command): Likewise.
2359
2360 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2361
2362 * probe.h (struct probe_ops) <get_probes>: Change parameter from
2363 vec to std::vector.
2364 * probe.c (parse_probes_in_pspace): Update.
2365 (find_probes_in_objfile): Update.
2366 (find_probe_by_pc): Update.
2367 (collect_probes): Update.
2368 (probe_any_get_probes): Update.
2369 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2370 return type to reference to std::vector.
2371 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2372 std::vector and update.
2373 (dtrace_process_dof): Likewise.
2374 (dtrace_get_probes): Likewise.
2375 * elfread.c (elf_get_probes): Change return type to std::vector,
2376 store an std::vector in bfd_data.
2377 (probe_key_free): Update to std::vector.
2378 * stap-probe.c (handle_stap_probe): Change parameter to
2379 std::vector and update.
2380 (stap_get_probes): Likewise.
2381 * symfile-debug.c (debug_sym_get_probes): Change return type to
2382 std::vector and update.
2383
2384 2017-09-11 Tom Tromey <tom@tromey.com>
2385
2386 * breakpoint.c (program_breakpoint_here_p): Update.
2387 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2388 from make_show_memory_breakpoints_cleanup. Return a
2389 scoped_restore_tmpl<int>.
2390 (restore_show_memory_breakpoints): Remove.
2391 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2392 * mem-break.c (memory_validate_breakpoint): Update.
2393 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2394 (ia64_memory_remove_breakpoint): Update.
2395 (ia64_breakpoint_from_pc): Update.
2396 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2397 from make_show_memory_breakpoints_cleanup.
2398
2399 2017-09-11 Tom Tromey <tom@tromey.com>
2400
2401 * d-namespace.c (d_lookup_symbol): Use std::string.
2402 (find_symbol_in_baseclass): Likewise.
2403
2404 2017-09-11 Tom Tromey <tom@tromey.com>
2405
2406 * ctf.c (ctf_start): Use std::string.
2407
2408 2017-09-11 Tom Tromey <tom@tromey.com>
2409
2410 * ada-lang.c (is_known_support_routine): Update.
2411 (ada_unhandled_exception_name_addr_from_raise): Update.
2412 * guile/scm-frame.c (gdbscm_frame_name): Update.
2413 * python/py-frame.c (frapy_name): Update.
2414 (frapy_function): Update.
2415 * stack.h (find_frame_funname): Update.
2416 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2417 (print_frame): Update.
2418
2419 2017-09-11 Tom Tromey <tom@tromey.com>
2420
2421 * findcmd.c (put_bits): Take a gdb::byte_vector.
2422 (parse_find_args): Return gdb::byte_vector. "args" now const.
2423 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
2424 cleanups.
2425 (find_command): Update.
2426
2427 2017-09-11 Tom Tromey <tom@tromey.com>
2428
2429 * cli/cli-script.c (class scoped_restore_hook_in): New.
2430 (clear_hook_in_cleanup): Remove.
2431 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2432 scoped_restore_hook_in.
2433
2434 2017-09-11 Tom Tromey <tom@tromey.com>
2435
2436 * cli/cli-script.c (restore_interp): Remove.
2437 (read_command_lines): Use scoped_restore_interp.
2438 * interps.c (scoped_restore_interp::set_temp): Rename from
2439 interp_set_temp.
2440 * interps.h (class scoped_restore_interp): New.
2441 (interp_set_temp): Remove.
2442
2443 2017-09-11 Tom Tromey <tom@tromey.com>
2444
2445 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2446 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2447 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2448 scoped_restore.
2449 (mi_cmd_break_insert_1): Update.
2450 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2451 scoped_restore.
2452
2453 2017-09-11 Tom Tromey <tom@tromey.com>
2454
2455 * demangle.c (demangle_command): Update.
2456 * breakpoint.c (disable_command): Update.
2457 (enable_command): Update.
2458 (find_location_by_number): Make "number" const. Use
2459 get_number_trailer.
2460 * cli/cli-utils.c (extract_arg): Return std::string.
2461 * probe.c (parse_probe_linespec): Update. Change types.
2462 (collect_probes): Take string arguments.
2463 (parse_probe_linespec): Likewise.
2464 (info_probes_for_ops): Update.
2465 (enable_probes_command): Update.
2466 (disable_probes_command): Update.
2467 * break-catch-sig.c (catch_signal_split_args): Update.
2468 * mi/mi-parse.c (mi_parse): Update.
2469
2470 2017-09-11 Tom Tromey <tom@tromey.com>
2471
2472 * language.h (language_enum): Make argument const.
2473 * language.c (language_enum): Make argument const.
2474
2475 2017-09-11 Tom Tromey <tom@tromey.com>
2476
2477 * common/common-utils.h (skip_to_space): Remove macro, redeclare
2478 as function.
2479 (skip_to_space): Rename from skip_to_space_const.
2480 * common/common-utils.c (skip_to_space): New function.
2481 (skip_to_space): Rename from skip_to_space_const.
2482 * cli/cli-utils.h (get_number): Rename from get_number_const.
2483 (extract_arg): Rename from extract_arg_const.
2484 * cli/cli-utils.c (get_number): Rename from get_number_const.
2485 (extract_arg): Rename from extract_arg_const.
2486 (number_or_range_parser::get_number): Use ::get_number.
2487 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2488 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2489 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2490 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2491 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2492 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2493 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2494 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2495
2496 2017-09-11 Tom Tromey <tom@tromey.com>
2497
2498 * python/python.c (do_start_initialization): Use
2499 py-event-types.def to initialize types.
2500 Define all object type structures.
2501 * python/python-internal.h: Don't declare event initialization
2502 functions.
2503 * python/py-threadevent.c (thread_event_object_type): Don't
2504 define.
2505 * python/py-stopevent.c (stop_event_object_type): Don't define.
2506 * python/py-signalevent.c (signal_event_object_type): Don't
2507 declare or define.
2508 * python/py-newobjfileevent.c (new_objfile_event_object_type)
2509 (clear_objfiles_event_object_type): Don't declare or define.
2510 * python/py-infevents.c (inferior_call_pre_event_object_type)
2511 (inferior_call_post_event_object_type)
2512 (register_changed_event_object_type)
2513 (memory_changed_event_object_type): Don't declare or define.
2514 * python/py-inferior.c (new_thread_event_object_type)
2515 (new_inferior_event_object_type)
2516 (inferior_deleted_event_object_type): Don't declare or define.
2517 * python/py-exitedevent.c (exited_event_object_type): Don't
2518 declare or define.
2519 * python/py-evts.c (gdbpy_initialize_py_events): Use
2520 py-all-events.def.
2521 * python/py-events.h (thread_event_object_type): Don't declare.
2522 (events_object): Use py-all-events.def.
2523 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
2524 py-event-types.def.
2525 * python/py-event-types.def: New file.
2526 * python/py-continueevent.c (create_continue_event_object): Don't
2527 declare or define.
2528 * python/py-bpevent.c (breakpoint_event_object_type): Don't
2529 declare or define.
2530 * python/py-all-events.def: New file.
2531
2532 2017-09-11 Tom Tromey <tom@tromey.com>
2533
2534 * python/py-threadevent.c (create_thread_event_object): Return
2535 gdbpy_ref.
2536 * python/py-stopevent.h (create_stop_event_object)
2537 (create_breakpoint_event_object, create_signal_event_object):
2538 Update.
2539 * python/py-stopevent.c (create_stop_event_object): Return
2540 gdbpy_ref.
2541 (emit_stop_event): Update.
2542 * python/py-signalevent.c (create_signal_event_object): Return
2543 gdbpy_ref.
2544 * python/py-infevents.c (create_inferior_call_event_object):
2545 Update.
2546 * python/py-event.h (create_event_object)
2547 (create_thread_event_object): Update.
2548 * python/py-event.c (create_event_object): Return gdbpy_ref.
2549 * python/py-continueevent.c: Return gdbpy_ref.
2550 * python/py-bpevent.c (create_breakpoint_event_object): Return
2551 gdbpy_ref.
2552
2553 2017-09-11 Tom Tromey <tom@tromey.com>
2554
2555 PR python/15622:
2556 * NEWS: Add entry.
2557 * python/python.c (do_start_initialization): Initialize new event
2558 types.
2559 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2560 (gdbpy_initialize_inferior_deleted_event)
2561 (gdbpy_initialize_new_thread_event): Declare.
2562 * python/py-threadevent.c (create_thread_event_object): Add option
2563 "thread" parameter.
2564 * python/py-inferior.c (new_thread_event_object_type)
2565 (new_inferior_event_object_type)
2566 (inferior_deleted_event_object_type): Declare.
2567 (python_new_inferior, python_inferior_deleted): New functions.
2568 (add_thread_object): Emit new_thread event.
2569 (gdbpy_initialize_inferior): Attach new functions to corresponding
2570 observers.
2571 (new_thread, new_inferior, inferior_deleted): Define new event
2572 types.
2573 * python/py-evts.c (gdbpy_initialize_py_events): Add new
2574 registries.
2575 * python/py-events.h (events_object) <new_inferior,
2576 inferior_deleted, new_thread>: New fields.
2577 * python/py-event.h (create_thread_event_breakpoint): Add optional
2578 "thread" parameter.
2579
2580 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
2581
2582 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2583 check current_ui instead.
2584 (internal_vproblem): Likewise.
2585
2586 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
2587
2588 * thread.c (print_thread_info_1): Remove unnecessary calls to
2589 uiout->is_mi_like_p.
2590
2591 2017-09-09 Tom Tromey <tom@tromey.com>
2592
2593 * namespace.h (add_using_directive): Update.
2594 * namespace.c (add_using_directive): Change type of excludes to
2595 std::vector.
2596 * dwarf2read.c (read_import_statement): Use std::vector.
2597 (read_namespace): Update.
2598 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2599
2600 2017-09-09 Tom Tromey <tom@tromey.com>
2601
2602 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2603
2604 2017-09-09 Tom Tromey <tom@tromey.com>
2605
2606 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2607
2608 2017-09-09 Tom Tromey <tom@tromey.com>
2609
2610 * stack.c (func_command): Use gdb::def_vector.
2611
2612 2017-09-09 Tom Tromey <tom@tromey.com>
2613
2614 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2615 ui_out_emit_list, ui_out_emit_tuple.
2616 (mi_cmd_var_update): Likewise.
2617
2618 2017-09-09 Tom Tromey <tom@tromey.com>
2619
2620 * mi/mi-interp.c (mi_user_selected_context_changed): Use
2621 ui_out_redirect_pop.
2622 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2623 ui_out_redirect_pop.
2624 * utils.c (do_ui_out_redirect_pop)
2625 (make_cleanup_ui_out_redirect_pop): Remove.
2626 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2627 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2628 * ui-out.h (ui_out_redirect_pop): New class.
2629
2630 2017-09-09 Tom Tromey <tom@tromey.com>
2631
2632 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2633 (list_available_thread_groups, mi_cmd_list_thread_groups)
2634 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2635 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2636 Likewise.
2637
2638 2017-09-09 Tom Tromey <tom@tromey.com>
2639
2640 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2641 ui_out_emit_tuple.
2642
2643 2017-09-09 Tom Tromey <tom@tromey.com>
2644
2645 * target.c (flash_erase_command): Use ui_out_emit_tuple.
2646 * stack.c (print_frame): Use ui_out_emit_tuple.
2647 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2648 (info_spu_mailbox_command, info_spu_dma_command)
2649 (info_spu_proxydma_command): Likewise.
2650 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2651 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2652 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2653 ui_out_emit_tuple.
2654 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2655
2656 2017-09-09 Tom Tromey <tom@tromey.com>
2657
2658 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2659 (class ui_out_emit_table): Update comment.
2660 * ui-out.c (do_cleanup_table_end)
2661 (make_cleanup_ui_out_table_begin_end): Remove.
2662 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2663 (info_spu_dma_cmdlist): Likewise.
2664 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2665 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2666 ui_out_emit_table.
2667
2668 2017-09-09 Tom Tromey <tom@tromey.com>
2669
2670 * thread.c (print_thread_info_1): Use ui_out_emit_table,
2671 ui_out_emit_list, gdb::optional.
2672
2673 2017-09-09 John Baldwin <jhb@FreeBSD.org>
2674
2675 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2676 prototype.
2677 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2678 prototype.
2679 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2680 prototype.
2681 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2682 * ada-exp.y: Remove _initialize_ada_exp prototype.
2683 * ada-lang.c: Remove _initialize_ada_language prototype.
2684 * ada-tasks.c: Remove _initialize_tasks prototype.
2685 * addrmap.c: Remove _initialize_addrmap prototype.
2686 * agent.c: Remove _initialize_agent prototype.
2687 * aix-thread.c: Remove _initialize_aix_thread prototype.
2688 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2689 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2690 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2691 prototype.
2692 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2693 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2694 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2695 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2696 prototype.
2697 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2698 prototype.
2699 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2700 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2701 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2702 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2703 prototype.
2704 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2705 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2706 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2707 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2708 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2709 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2710 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2711 prototype.
2712 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2713 prototype.
2714 * annotate.c: Remove _initialize_annotate prototype.
2715 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2716 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2717 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2718 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2719 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2720 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2721 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2722 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2723 prototype.
2724 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2725 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2726 * auto-load.c: Remove _initialize_auto_load prototype.
2727 * auxv.c: Remove _initialize_auxv prototype.
2728 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2729 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2730 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2731 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2732 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2733 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2734 prototype.
2735 * break-catch-throw.c: Remove _initialize_break_catch_throw
2736 prototype.
2737 * breakpoint.c: Remove _initialize_breakpoint prototype.
2738 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2739 * btrace.c: Remove _initialize_btrace prototype.
2740 * charset.c: Remove _initialize_charset prototype.
2741 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2742 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2743 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2744 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2745 * cli/cli-script.c: Remove _initialize_cli_script prototype.
2746 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2747 * coffread.c: Remove _initialize_coffread prototype.
2748 * compile/compile.c: Remove _initialize_compile prototype.
2749 * complaints.c: Remove _initialize_complaints prototype.
2750 * completer.c: Remove _initialize_completer prototype.
2751 * copying.awk: Remove _initialize_copying prototype.
2752 * copying.c: Regenerate.
2753 * core-regset.c: Remove _initialize_core_regset prototype.
2754 * corefile.c: Remove _initialize_core prototype.
2755 * corelow.c: Remove _initialize_corelow prototype.
2756 * cp-abi.c: Remove _initialize_cp_abi prototype.
2757 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2758 * cp-support.c: Remove _initialize_cp_support prototype.
2759 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2760 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2761 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2762 * ctf.c: Remove _initialize_ctf prototype.
2763 * d-lang.c: Remove _initialize_d_language prototype.
2764 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2765 prototype.
2766 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2767 * dbxread.c: Remove _initialize_dbxread prototype.
2768 * dcache.c: Remove _initialize_dcache prototype.
2769 * demangle.c: Remove _initialize_demangler prototype.
2770 * disasm-selftests.c: Remove _initialize_disasm_selftests
2771 prototype.
2772 * disasm.c: Remove _initialize_disasm prototype.
2773 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2774 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2775 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2776 prototype.
2777 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2778 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2779 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2780 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2781 * elfread.c: Remove _initialize_elfread prototype.
2782 * exec.c: Remove _initialize_exec prototype.
2783 * extension.c: Remove _initialize_extension prototype.
2784 * f-lang.c: Remove _initialize_f_language prototype.
2785 * f-valprint.c: Remove _initialize_f_valprint prototype.
2786 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2787 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2788 * filesystem.c: Remove _initialize_filesystem prototype.
2789 * findcmd.c: Remove _initialize_mem_search prototype.
2790 * fork-child.c: Remove _initialize_fork_child prototype.
2791 * frame-base.c: Remove _initialize_frame_base prototype.
2792 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2793 * frame.c: Remove _initialize_frame prototype.
2794 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2795 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2796 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2797 * gcore.c: Remove _initialize_gcore prototype.
2798 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2799 * gdbarch.c: Regenerate.
2800 * gdbarch.sh: Remove _initialize_gdbarch prototype.
2801 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2802 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2803 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2804 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2805 * go-lang.c: Remove _initialize_go_language prototype.
2806 * go32-nat.c: Remove _initialize_go32_nat prototype.
2807 * guile/guile.c: Remove _initialize_guile prototype.
2808 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2809 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2810 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2811 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2812 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2813 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2814 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2815 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2816 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2817 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2818 prototype.
2819 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2820 prototype.
2821 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2822 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2823 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2824 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2825 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2826 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2827 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2828 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2829 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2830 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2831 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2832 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2833 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2834 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2835 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2836 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2837 prototype.
2838 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2839 prototype.
2840 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2841 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2842 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2843 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2844 * infcall.c: Remove _initialize_infcall prototype.
2845 * infcmd.c: Remove _initialize_infcmd prototype.
2846 * inferior.c: Remove _initialize_inferiors prototype.
2847 * inflow.c: Remove _initialize_inflow prototype.
2848 * infrun.c: Remove _initialize_infrun prototype.
2849 * interps.c: Remove _initialize_interpreter prototype.
2850 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2851 * jit.c: Remove _initialize_jit prototype.
2852 * language.c: Remove _initialize_language prototype.
2853 * linux-fork.c: Remove _initialize_linux_fork prototype.
2854 * linux-nat.c: Remove _initialize_linux_nat prototype.
2855 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2856 * linux-thread-db.c: Remove _initialize_thread_db prototype.
2857 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2858 * m2-lang.c: Remove _initialize_m2_language prototype.
2859 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2860 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2861 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2862 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2863 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2864 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2865 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2866 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2867 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2868 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2869 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2870 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2871 * machoread.c: Remove _initialize_machoread prototype.
2872 * macrocmd.c: Remove _initialize_macrocmd prototype.
2873 * macroscope.c: Remove _initialize_macroscope prototype.
2874 * maint.c: Remove _initialize_maint_cmds prototype.
2875 * mdebugread.c: Remove _initialize_mdebugread prototype.
2876 * memattr.c: Remove _initialize_mem prototype.
2877 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2878 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2879 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2880 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2881 * mi/mi-main.c: Remove _initialize_mi_main prototype.
2882 * microblaze-linux-tdep.c: Remove
2883 _initialize_microblaze_linux_tdep prototype.
2884 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2885 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2886 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2887 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2888 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2889 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2890 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2891 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2892 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2893 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2894 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2895 prototype.
2896 * mipsread.c: Remove _initialize_mipsread prototype.
2897 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2898 prototype.
2899 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2900 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2901 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2902 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2903 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2904 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2905 prototype.
2906 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2907 * nto-procfs.c: Remove _initialize_procfs prototype.
2908 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2909 * objc-lang.c: Remove _initialize_objc_language prototype.
2910 * objfiles.c: Remove _initialize_objfiles prototype.
2911 * observer.c: Remove observer_test_first_notification_function,
2912 observer_test_second_notification_function,
2913 observer_test_third_notification_function, and
2914 _initialize_observer prototypes.
2915 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2916 * osabi.c: Remove _initialize_gdb_osabi prototype.
2917 * osdata.c: Remove _initialize_osdata prototype.
2918 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2919 * parse.c: Remove _initialize_parse prototype.
2920 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2921 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2922 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2923 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2924 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2925 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2926 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2927 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2928 * printcmd.c: Remove _initialize_printcmd prototype.
2929 * probe.c: Remove _initialize_probe prototype.
2930 * proc-api.c: Remove _initialize_proc_api prototype.
2931 * proc-events.c: Remove _initialize_proc_events prototype.
2932 * proc-service.c: Remove _initialize_proc_service prototype.
2933 * procfs.c: Remove _initialize_procfs prototype.
2934 * psymtab.c: Remove _initialize_psymtab prototype.
2935 * python/python.c: Remove _initialize_python prototype.
2936 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2937 * record-btrace.c: Remove _initialize_record_btrace prototype.
2938 * record-full.c: Remove _initialize_record_full prototype.
2939 * record.c: Remove _initialize_record prototype.
2940 * regcache.c: Remove _initialize_regcache prototype.
2941 * reggroups.c: Remove _initialize_reggroup prototype.
2942 * remote-notif.c: Remove _initialize_notif prototype.
2943 * remote-sim.c: Remove _initialize_remote_sim prototype.
2944 * remote.c: Remove _initialize_remote prototype.
2945 * reverse.c: Remove _initialize_reverse prototype.
2946 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2947 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2948 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2949 prototype.
2950 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2951 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2952 * rust-exp.y: Remove _initialize_rust_exp prototype.
2953 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2954 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2955 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2956 * score-tdep.c: Remove _initialize_score_tdep prototype.
2957 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2958 prototype.
2959 * ser-go32.c: Remove _initialize_ser_dos prototype.
2960 * ser-mingw.c: Remove _initialize_ser_windows prototype.
2961 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2962 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2963 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2964 * serial.c: Remove _initialize_serial prototype.
2965 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2966 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2967 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2968 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2969 * skip.c: Remove _initialize_step_skip prototype.
2970 * sol-thread.c: Remove _initialize_sol_thread prototype.
2971 * solib-aix.c: Remove _initialize_solib_aix prototype.
2972 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2973 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2974 * solib-frv.c: Remove _initialize_frv_solib prototype.
2975 * solib-spu.c: Remove _initialize_spu_solib prototype.
2976 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2977 * solib-target.c: Remove _initialize_solib_target prototype.
2978 * solib.c: Remove _initialize_solib prototype.
2979 * source.c: Remove _initialize_source prototype.
2980 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2981 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2982 prototype.
2983 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2984 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2985 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2986 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2987 prototype.
2988 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2989 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2990 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2991 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2992 prototype.
2993 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2994 prototype.
2995 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2996 prototype.
2997 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2998 prototype.
2999 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
3000 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
3001 prototype.
3002 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
3003 prototype.
3004 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
3005 prototype.
3006 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
3007 prototype.
3008 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
3009 prototype.
3010 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
3011 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
3012 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
3013 * stabsread.c: Remove _initialize_stabsread prototype.
3014 * stack.c: Remove _initialize_stack prototype.
3015 * stap-probe.c: Remove _initialize_stap_probe prototype.
3016 * std-regs.c: Remove _initialize_frame_reg prototype.
3017 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
3018 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
3019 * symfile.c: Remove _initialize_symfile prototype.
3020 * symmisc.c: Remove _initialize_symmisc prototype.
3021 * symtab.c: Remove _initialize_symtab prototype.
3022 * target-dcache.c: Remove _initialize_target_dcache prototype.
3023 * target-descriptions.c: Remove _initialize_target_descriptions
3024 prototype.
3025 * thread.c: Remove _initialize_thread prototype.
3026 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
3027 prototype.
3028 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
3029 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
3030 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
3031 prototype.
3032 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
3033 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
3034 * tracefile.c: Remove _initialize_tracefile prototype.
3035 * tracepoint.c: Remove _initialize_tracepoint prototype.
3036 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
3037 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
3038 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
3039 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
3040 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
3041 * tui/tui-win.c: Remove _initialize_tui_win prototype.
3042 * tui/tui.c: Remove _initialize_tui prototype.
3043 * typeprint.c: Remove _initialize_typeprint prototype.
3044 * user-regs.c: Remove _initialize_user_regs prototype.
3045 * utils.c: Remove _initialize_utils prototype.
3046 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
3047 * valarith.c: Remove _initialize_valarith prototype.
3048 * valops.c: Remove _initialize_valops prototype.
3049 * valprint.c: Remove _initialize_valprint prototype.
3050 * value.c: Remove _initialize_values prototype.
3051 * varobj.c: Remove _initialize_varobj prototype.
3052 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
3053 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
3054 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
3055 * windows-nat.c: Remove _initialize_windows_nat,
3056 _initialize_check_for_gdb_ini, and _initialize_loadable
3057 prototypes.
3058 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
3059 * xcoffread.c: Remove _initialize_xcoffread prototype.
3060 * xml-support.c: Remove _initialize_xml_support prototype.
3061 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
3062 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
3063 prototype.
3064 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
3065 prototype.
3066 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
3067
3068 2017-09-08 Keith Seitz <keiths@redhat.com>
3069
3070 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
3071 field.
3072
3073 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
3074
3075 * f-valprint.c (f_val_print): Remove check for one byte
3076 sized integers. Remove printing of character type.
3077
3078 2017-09-08 Frank Penczek <frank.penczek@intel.com>
3079 Christoph Weinmann <christoph.t.weinmann@intel.com>
3080 Bernhard Heckel <bernhard.heckel@intel.com>
3081
3082 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
3083 to maintain proper indentation when printing pointers/refs.
3084
3085 2017-09-07 Joel Brobecker <brobecker@adacore.com>
3086
3087 GDB 8.0.1 released.
3088
3089 2017-09-07 Joel Brobecker <brobecker@adacore.com>
3090
3091 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
3092
3093 2017-09-05 Tom Tromey <tom@tromey.com>
3094
3095 * parse.c (funcall_chain): Now a std::vector.
3096 (start_arglist, end_arglist): Simplify.
3097 (free_funcalls): Remove.
3098 (parse_exp_in_context_1): Remove cleanup.
3099
3100 2017-09-05 Tom Tromey <tom@tromey.com>
3101
3102 * go-exp.y (go_parse): Don't create a cleanup.
3103
3104 2017-09-05 Tom Tromey <tom@tromey.com>
3105
3106 * d-exp.y (PrimaryExpression): Use std::string.
3107 (d_parse): Don't create a cleanup.
3108
3109 2017-09-05 Tom Tromey <tom@tromey.com>
3110
3111 * utils.c (do_clear_parser_state): Remove.
3112 (make_cleanup_clear_parser_state): Remove.
3113 * p-exp.y (pascal_parse): Use scoped_restore.
3114 * m2-exp.y (m2_parse): Use scoped_restore.
3115 * f-exp.y (f_parse): Use scoped_restore.
3116 * d-exp.y (d_parse): Use scoped_restore.
3117 * c-exp.y (c_parse): Use scoped_restore.
3118 * ada-exp.y (ada_parse): Use scoped_restore.
3119 * utils.h (make_cleanup_clear_parser_state): Remove.
3120
3121 2017-09-06 Keith Seitz <keiths@redhat.com>
3122
3123 * dwarf2read.c (dw2_linkage_name_attr): New function.
3124 (dw2_linkage_name): New function.
3125 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
3126 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
3127 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
3128
3129 2017-09-06 Kamil Rytarowski <n54@gmx.com>
3130
3131 * config/djgpp/djconfig.sh: Correct shell portability issue.
3132
3133 2017-09-06 Kamil Rytarowski <n54@gmx.com>
3134
3135 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
3136
3137 2017-09-06 John Baldwin <jhb@FreeBSD.org>
3138
3139 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
3140 * NEWS: Mention new FreeBSD/mips native configuration.
3141 * configure.host: Add aarch64*-*-freebsd*.
3142 * configure.nat: Likewise.
3143 * aarch64-fbsd-nat.c: New file.
3144
3145 2017-09-06 John Baldwin <jhb@FreeBSD.org>
3146
3147 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
3148 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
3149 * NEWS: Mention new FreeBSD/aarch64 target.
3150 * configure.tgt: Add aarch64*-*-freebsd*.
3151 * aarch64-fbsd-tdep.c: New file.
3152 * aarch64-fbsd-tdep.h: New file.
3153
3154 2017-09-06 Kamil Rytarowski <n54@gmx.com>
3155
3156 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
3157
3158 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3159
3160 * parse.c (find_minsym_type_and_address): Don't relocate addresses
3161 of TLS symbols.
3162
3163 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3164
3165 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
3166 call.
3167
3168 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3169
3170 * infrun.c (follow_exec): Call add_thread after
3171 target_find_description.
3172
3173 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3174
3175 * infrun.c (handle_inferior_event_1): When exec'ing, read
3176 stop_pc after follow_exec.
3177
3178 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3179
3180 * remote.c (process_g_packet): Update error message.
3181
3182 2017-09-05 Yao Qi <yao.qi@linaro.org>
3183
3184 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3185 targets.
3186
3187 2017-09-05 Pedro Alves <palves@redhat.com>
3188
3189 * eval.c (eval_call, evaluate_funcall): New functions, factored
3190 out from ...
3191 (evaluate_subexp_standard): ... this.
3192
3193 2017-09-05 Yao Qi <yao.qi@linaro.org>
3194
3195 * amd64-tdep.c (amd64_target_description): Create target
3196 descriptions.
3197 (_initialize_amd64_tdep): Don't call functions
3198 initialize_tdesc_amd64_*. Add self tests.
3199 * arch/amd64.c (amd64_create_target_description): Add parameter
3200 is_linux. Call set_tdesc_osabi if is_linux is true.
3201 * arch/amd64.h (amd64_create_target_description): Update the
3202 declaration.
3203 * arch/i386.c (i386_create_target_description): Add parameter
3204 is_linux. Call set_tdesc_osabi if is_linux is true.
3205 * arch/i386.h (i386_create_target_description): Update
3206 declaration.
3207 * configure.tgt: Add i386.o to gdb_target_obs.
3208 * features/Makefile (XMLTOC): Remove i386/*.xml.
3209 * features/i386/amd64-avx-avx512.c: Remove.
3210 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3211 * features/i386/amd64-avx-mpx.c: Remove.
3212 * features/i386/amd64-avx.c: Remove.
3213 * features/i386/amd64-mpx.c: Remove.
3214 * features/i386/amd64.c: Remove.
3215 * features/i386/i386-avx-avx512.c: Remove.
3216 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3217 * features/i386/i386-avx-mpx.c: Remove.
3218 * features/i386/i386-avx.c: Remove.
3219 * features/i386/i386-mmx.c: Remove.
3220 * features/i386/i386-mpx.c: Remove.
3221 * features/i386/i386.c: Remove.
3222 * i386-tdep.c: Don't include features/i386/i386*.c., include
3223 target-descriptions.h and arch/i386.h.
3224 (i386_target_description): Create target descriptions.
3225 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3226 functions. Do self tests.
3227
3228 2017-09-05 Yao Qi <yao.qi@linaro.org>
3229
3230 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3231 * features/i386/amd64-avx-avx512-linux.c: Removed.
3232 * features/i386/amd64-avx-linux.c: Removed.
3233 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3234 * features/i386/amd64-avx-mpx-linux.c: Removed.
3235 * features/i386/amd64-linux.c: Removed.
3236 * features/i386/amd64-mpx-linux.c: Removed.
3237 * features/i386/x32-avx-avx512-linux.c: Removed.
3238 * features/i386/x32-avx-linux.c: Removed.
3239 * features/i386/x32-linux.c: Removed.
3240
3241 2017-09-05 Yao Qi <yao.qi@linaro.org>
3242
3243 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
3244 features/i386/*.c.
3245 (amd64_linux_read_description): Call
3246 amd64_create_target_description.
3247 * arch/amd64.c: New file.
3248 * arch/amd64.h: New file.
3249 * configure.tgt (x86_64-*-linux*): Append amd64.o.
3250 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3251
3252 2017-09-05 Yao Qi <yao.qi@linaro.org>
3253
3254 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3255 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
3256 (amd64_linux_read_description): Create target descriptions.
3257 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3258 functions. Add unit tests.
3259 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3260 x32-core.xml.
3261 * features/i386/64bit-avx.c: Generated.
3262 * features/i386/64bit-avx512.c: Generated.
3263 * features/i386/64bit-core.c: Generated.
3264 * features/i386/64bit-linux.c: Generated.
3265 * features/i386/64bit-mpx.c: Generated.
3266 * features/i386/64bit-pkeys.c: Generated.
3267 * features/i386/64bit-segments.c: Generated.
3268 * features/i386/64bit-sse.c: Generated.
3269 * features/i386/x32-core.c: Generated.
3270 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3271 c files for amd64-linux and x32-linux.
3272
3273 2017-09-05 Yao Qi <yao.qi@linaro.org>
3274
3275 * amd64-linux-tdep.c (amd64_linux_read_description): New
3276 function.
3277 (amd64_linux_core_read_description): Call
3278 amd64_linux_read_description.
3279 (amd64_linux_init_abi): Likewise.
3280 (amd64_x32_linux_init_abi): Likewise.
3281 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3282 * x86-linux-nat.c (x86_linux_read_description): Call
3283 amd64_linux_read_description.
3284
3285 2017-09-05 Yao Qi <yao.qi@linaro.org>
3286
3287 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3288 comments.
3289
3290 2017-09-05 Yao Qi <yao.qi@linaro.org>
3291
3292 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3293 * features/i386/i386-avx-avx512-linux.c: Remove.
3294 * features/i386/i386-avx-linux.c: Remove.
3295 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3296 * features/i386/i386-avx-mpx-linux.c: Remove.
3297 * features/i386/i386-linux.c: Remove.
3298 * features/i386/i386-mmx-linux.c: Remove.
3299 * features/i386/i386-mpx-linux.c: Remove.
3300
3301 2017-09-05 Yao Qi <yao.qi@linaro.org>
3302
3303 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3304 (SFILES): Add arch/i386.c.
3305 (HFILES_NO_SRCDIR): Add arch/i386.h.
3306 * arch/i386.c: New file.
3307 * arch/i386.h: New file.
3308 * arch/tdesc.h (allocate_target_description): Declare.
3309 (set_tdesc_architecture): Declare.
3310 (set_tdesc_osabi): Declare.
3311 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3312 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3313 include arch/i386.h.
3314 (i386_linux_read_description): Remove code and call
3315 i386_create_target_description.
3316 (set_tdesc_architecture): New function.
3317 (set_tdesc_osabi): New function.
3318 * target-descriptions.h (allocate_target_description): Remove.
3319
3320 2017-09-05 Yao Qi <yao.qi@linaro.org>
3321
3322 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3323 * target-descriptions.c (tdesc_create_feature): Likewise, and
3324 adjust code.
3325 * features/i386/32bit-avx.c: Re-generated.
3326 * features/i386/32bit-avx512.c: Re-generated.
3327 * features/i386/32bit-core.c: Re-generated.
3328 * features/i386/32bit-linux.c: Re-generated.
3329 * features/i386/32bit-mpx.c: Re-generated.
3330 * features/i386/32bit-pkeys.c: Re-generated.
3331 * features/i386/32bit-sse.c: Re-generated.
3332
3333 2017-09-05 Yao Qi <yao.qi@linaro.org>
3334
3335 * regformats/regdef.h (struct reg): Override operator == and !=.
3336
3337 2017-09-05 Yao Qi <yao.qi@linaro.org>
3338
3339 * arch/tdesc.h: New file.
3340 * regformats/regdat.sh: Generate code using tdesc_create_reg.
3341 * target-descriptions.c: Update comments.
3342 * target-descriptions.h: Include "arch/tdesc.h". Remove the
3343 declarations.
3344 * features/i386/32bit-avx.c: Re-generated.
3345 * features/i386/32bit-avx512.c: Re-generated.
3346 * features/i386/32bit-core.c: Re-generated.
3347 * features/i386/32bit-linux.c: Re-generated.
3348 * features/i386/32bit-mpx.c: Re-generated.
3349 * features/i386/32bit-pkeys.c: Re-generated.
3350 * features/i386/32bit-sse.c: Re-generated.
3351
3352 2017-09-05 Yao Qi <yao.qi@linaro.org>
3353
3354 * regformats/regdat.sh: Update generated code.
3355
3356 2017-09-05 Yao Qi <yao.qi@linaro.org>
3357
3358 * regformats/regdat.sh: Adjust code order.
3359
3360 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3361
3362 * expprint.c (dump_subexp_body_standard): Use constant format
3363 string in fprintf_filtered call.
3364
3365 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3366
3367 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3368 NetBSD/i386.
3369 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3370
3371 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3372
3373 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3374
3375 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3376
3377 * bsd-kvm.o: Define _KMEMUSER.
3378 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3379 * configure: Regenerate.
3380
3381 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3382
3383 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3384 * i386-fbsd-nat.c: Likewise.
3385
3386 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3387
3388 * unittests/array-view-selftests.c: Add include of <array>.
3389
3390 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3391
3392 * spu-tdep.c (flush_ea_cache): Add missing argument to
3393 call_function_by_hand.
3394
3395 2017-09-04 Pedro Alves <palves@redhat.com>
3396
3397 * NEWS (Safer support for debugging with no debug info): New.
3398
3399 2017-09-04 Pedro Alves <palves@redhat.com>
3400
3401 * c-exp.y (function_method, function_method_void): Add current
3402 instance flags to TYPE_INSTANCE.
3403 * dwarf2read.c (check_modifier): New.
3404 (compute_delayed_physnames): Assert that only C++ adds delayed
3405 physnames. Mark fn_fields as const/volatile depending on
3406 physname.
3407 * eval.c (make_params): New type_instance_flags parameter. Use
3408 it as the new type's instance flags.
3409 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3410 flags element and pass it to make_params.
3411 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3412 instance flags element.
3413 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3414 * gdbtypes.h: Include "enum-flags.h".
3415 (type_instance_flags): New enum-flags type.
3416 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3417 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3418 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3419 (follow_type_instance_flags): New function.
3420 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3421 * parser-defs.h (follow_type_instance_flags): Declare.
3422 * valops.c (value_struct_elt_for_reference): const/volatile must
3423 match too.
3424
3425 2017-09-04 Pedro Alves <palves@redhat.com>
3426
3427 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3428 function/method scopes; lookup the nested name as a function local
3429 static variable.
3430
3431 2017-09-04 Pedro Alves <palves@redhat.com>
3432
3433 (%type <voidval>): Add function_method.
3434 * c-exp.y (exp): New production for calls with no arguments.
3435 (function_method, function_method_void_or_typelist): New
3436 productions.
3437 (exp): New production for "method()::static_var".
3438 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3439 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3440 Handle OP_FUNC_STATIC_VAR.
3441 * parse.c (operator_length_standard):
3442 Handle OP_FUNC_STATIC_VAR.
3443
3444 2017-09-04 Pedro Alves <palves@redhat.com>
3445
3446 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3447 handling.
3448 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3449 Ditto.
3450 * parse.c (operator_length_standard, operator_check_standard):
3451 Ditto.
3452 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3453
3454 2017-09-04 Pedro Alves <palves@redhat.com>
3455
3456 * ax-gdb.c: Include "typeprint.h".
3457 (gen_expr_for_cast): New function.
3458 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3459 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3460 type is unknown.
3461 * dwarf2read.c (new_symbol_full): Fallback to int instead of
3462 nodebug_data_symbol.
3463 * eval.c: Include "typeprint.h".
3464 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3465 Error out if symbol has unknown type.
3466 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3467 evaluate_subexp_for_cast.
3468 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3469 OP_VAR_MSYM_VALUE.
3470 (evaluate_subexp_for_cast): New function.
3471 * gdbtypes.c (init_nodebug_var_type): New function.
3472 (objfile_type): Use it to initialize types of variables with no
3473 debug info.
3474 * typeprint.c (error_unknown_type): New.
3475 * typeprint.h (error_unknown_type): New declaration.
3476 * compile/compile-c-types.c (convert_type_basic): Handle
3477 TYPE_CODE_ERROR; warn and fallback to int for variables with
3478 unknown type.
3479
3480 2017-09-04 Pedro Alves <palves@redhat.com>
3481
3482 * eval.c (evaluate_var_value): New function, factored out from ...
3483 (evaluate_subexp_standard): ... here.
3484
3485 2017-09-04 Pedro Alves <palves@redhat.com>
3486
3487 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3488 Remove useless assignments to 'op'.
3489
3490 2017-09-04 Pedro Alves <palves@redhat.com>
3491
3492 * eval.c (eval_skip_value): New function.
3493 (evaluate_subexp_standard): Use it.
3494
3495 2017-09-04 Pedro Alves <palves@redhat.com>
3496
3497 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3498 function name from symbol/minsym and pass it to
3499 error_call_unknown_return_type.
3500
3501 2017-09-04 Pedro Alves <palves@redhat.com>
3502
3503 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3504 * ax-gdb.c (gen_msym_var_ref): New function.
3505 (gen_expr): Handle OP_VAR_MSYM_VALUE.
3506 * eval.c (evaluate_var_msym_value): New function.
3507 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3508 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3509 to call_function_by_hand.
3510 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3511 Handle OP_VAR_MSYM_VALUE.
3512 (union exp_element) <msymbol>: New field.
3513 * minsyms.h (struct type): Forward declare.
3514 (find_minsym_type_and_address): Declare.
3515 * parse.c (write_exp_elt_msym): New function.
3516 (write_exp_msymbol): Delete, refactored as ...
3517 (find_minsym_type_and_address): ... this new function.
3518 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3519 (operator_length_standard, operator_check_standard): Handle
3520 OP_VAR_MSYM_VALUE.
3521 * std-operator.def (OP_VAR_MSYM_VALUE): New.
3522
3523 2017-09-04 Pedro Alves <palves@redhat.com>
3524
3525 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3526 TYPE_GNU_IFUNC specially here. Throw error if return type is
3527 unknown.
3528 * ada-typeprint.c (print_func_type): Handle functions with unknown
3529 return type.
3530 * c-typeprint.c (c_type_print_base): Handle functions and methods
3531 with unknown return type.
3532 * compile/compile-c-symbols.c (convert_symbol_bmsym)
3533 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3534 * compile/compile-c-types.c: Include "objfiles.h".
3535 (convert_func): For functions with unknown return type, warn and
3536 default to int.
3537 * compile/compile-object-run.c (compile_object_run): Adjust call
3538 to call_function_by_hand_dummy.
3539 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3540 call_function_by_hand.
3541 * eval.c (evaluate_subexp_standard): Adjust calls to
3542 call_function_by_hand. Handle functions and methods with unknown
3543 return type. Pass expect_type to call_function_by_hand.
3544 * f-typeprint.c (f_type_print_base): Handle functions with unknown
3545 return type.
3546 * gcore.c (call_target_sbrk): Adjust call to
3547 call_function_by_hand.
3548 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3549 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
3550 an integer address type instead of nodebug.
3551 * guile/scm-value.c (gdbscm_value_call): Adjust call to
3552 call_function_by_hand.
3553 * infcall.c (error_call_unknown_return_type): New function.
3554 (call_function_by_hand): New "default_return_type" parameter.
3555 Pass it down.
3556 (call_function_by_hand_dummy): New "default_return_type"
3557 parameter. Use it instead of defaulting to int. If there's no
3558 default and the return type is unknown, throw an error. If
3559 there's a default return type, and the called function has no
3560 debug info, then assume the function is prototyped.
3561 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3562 New "default_return_type" parameter.
3563 (error_call_unknown_return_type): New declaration.
3564 * linux-fork.c (call_lseek): Cast return type of lseek.
3565 (inferior_call_waitpid, checkpoint_command): Adjust calls to
3566 call_function_by_hand.
3567 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3568 calls to call_function_by_hand.
3569 * m2-typeprint.c (m2_procedure): Handle functions with unknown
3570 return type.
3571 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3572 (value_nsstring, print_object_command): Adjust calls to
3573 call_function_by_hand.
3574 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3575 functions with unknown return type.
3576 (pascal_type_print_func_varspec_suffix): New function.
3577 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3578 TYPE_CODE_METHOD>: Use it.
3579 * python/py-value.c (valpy_call): Adjust call to
3580 call_function_by_hand.
3581 * rust-lang.c (rust_evaluate_funcall): Adjust call to
3582 call_function_by_hand.
3583 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3584 call_function_by_hand.
3585 * valops.c (value_allocate_space_in_inferior): Adjust call to
3586 call_function_by_hand.
3587 * typeprint.c (type_print_unknown_return_type): New function.
3588 * typeprint.h (type_print_unknown_return_type): New declaration.
3589
3590 2017-09-04 Pedro Alves <palves@redhat.com>
3591
3592 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3593 types with more than one parameter as prototyped.
3594
3595 2017-09-04 Pedro Alves <palves@redhat.com>
3596
3597 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3598 (disassemble_command): Use gdb_disassembly_flags instead of bare
3599 int.
3600 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3601 (dump_insns, do_mixed_source_and_assembly_deprecated)
3602 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3603 Use gdb_disassembly_flags instead of bare int.
3604 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3605 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3606 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3607 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
3608 (enum gdb_disassembly_flag): ... values of this new enumeration.
3609 (gdb_disassembly_flags): Define.
3610 (gdb_disassembly)
3611 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3612 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3613 gdb_disassembly_flags instead of bare int.
3614 * record-btrace.c (btrace_insn_history)
3615 (record_btrace_insn_history, record_btrace_insn_history_range)
3616 (record_btrace_insn_history_from): Use gdb_disassembly_flags
3617 instead of bare int.
3618 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3619 Use gdb_disassembly_flags instead of bare int.
3620 * target-debug.h (target_debug_print_gdb_disassembly_flags):
3621 Define.
3622 * target-delegates.c: Regenerate.
3623 * target.c (target_insn_history, target_insn_history_from)
3624 (target_insn_history_range): Use gdb_disassembly_flags instead of
3625 bare int.
3626 * target.h: Include "disasm.h".
3627 (struct target_ops) <to_insn_history, to_insn_history_from,
3628 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3629 int.
3630 (target_insn_history, target_insn_history_from)
3631 (target_insn_history_range): Use gdb_disassembly_flags instead of
3632 bare int.
3633
3634 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3635
3636 * cli/cli-script.c (build_command_line): For if/while commands,
3637 check whether args is empty.
3638
3639 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3640
3641 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3642 (enum command_control_type): Likewise.
3643 (struct command_line): Likewise.
3644 (free_command_lines): Likewise.
3645 (struct command_lines_deleter): Likewise.
3646 (command_line_up): Likewise.
3647 (read_command_lines): Likewise.
3648 (read_command_lines_1): Likewise.
3649 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3650 (enum command_control_type): Likewise.
3651 (struct command_line): Likewise.
3652 (free_command_lines): Likewise.
3653 (struct command_lines_deleter): Likewise.
3654 (command_line_up): Likewise.
3655 (read_command_lines): Likewise.
3656 (read_command_lines_1): Likewise.
3657 * breakpoint.h: Include cli/cli-script.h.
3658 * extension-priv.h: Likewise.
3659 * gdbcmd.h: Likewise.
3660
3661 2017-09-04 Pedro Alves <palves@redhat.com>
3662
3663 * ada-lang.c (is_known_support_routine): Move sal declaration to
3664 where it is initialized.
3665 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3666 (parse_breakpoint_sals, decode_static_tracepoint_spec)
3667 (clear_command, update_static_tracepoint): Remove init_sal
3668 references. Move declarations closer to initializations.
3669 * cli/cli-cmds.c (list_command): Move sal declarations closer to
3670 initializations.
3671 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3672 references. Move sal declarations closer to initializations.
3673 * frame.c (find_frame_sal): Return a symtab_and_line via function
3674 return instead of output parameter. Remove init_sal references.
3675 * frame.h (find_frame_sal): Return a symtab_and_line via function
3676 return instead of output parameter.
3677 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3678 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3679 instead of memset.
3680 (gdbscm_find_pc_line): Remove init_sal reference.
3681 * infcall.c (call_function_by_hand_dummy): Remove init_sal
3682 references. Move declarations closer to initializations.
3683 * infcmd.c (set_step_frame): Update. Move declarations closer to
3684 initializations.
3685 (finish_backward): Remove init_sal references. Move declarations
3686 closer to initializations.
3687 * infrun.c (process_event_stop_test, handle_step_into_function)
3688 (insert_hp_step_resume_breakpoint_at_frame)
3689 (insert_step_resume_breakpoint_at_caller): Likewise.
3690 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3691 (symbol_to_sal): Likewise.
3692 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3693 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3694 to its initialization.
3695 * reverse.c (save_bookmark_command): Use new/delete. Remove
3696 init_sal references. Move declarations closer to initializations.
3697 * source.c (get_current_source_symtab_and_line): Remove brace
3698 initialization.
3699 (set_current_source_symtab_and_line): Now takes the sal by const
3700 reference. Remove brace initialization.
3701 (line_info): Remove init_sal reference.
3702 * source.h (set_current_source_symtab_and_line): Now takes a
3703 symtab_and_line via const reference.
3704 * stack.c (set_current_sal_from_frame): Adjust.
3705 (print_frame_info): Adjust.
3706 (get_last_displayed_sal): Return the sal via function return
3707 instead of via output parameter. Simplify.
3708 (frame_info): Adjust.
3709 * stack.h (get_last_displayed_sal): Return the sal via function
3710 return instead of via output parameter.
3711 * symtab.c (init_sal): Delete.
3712 (find_pc_sect_line): Remove init_sal references. Move
3713 declarations closer to initializations.
3714 (find_function_start_sal): Remove init_sal references. Move
3715 declarations closer to initializations.
3716 * symtab.h (struct symtab_and_line): In-class initialize all
3717 fields.
3718 * tracepoint.c (set_traceframe_context)
3719 (print_one_static_tracepoint_marker): Remove init_sal references.
3720 Move declarations closer to initializations.
3721 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3722 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
3723 declarations closer to initializations.
3724 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3725 init_sal references. Adjust.
3726
3727 2017-09-04 Pedro Alves <palves@redhat.com>
3728
3729 * ax-gdb.c (agent_command_1): Use range-for.
3730 * break-catch-throw.c (re_set_exception_catchpoint): Update.
3731 * breakpoint.c: Include "common/array-view.h".
3732 (init_breakpoint_sal, create_breakpoint_sal): Change sals
3733 parameter from struct symtabs_and_lines to
3734 array_view<symtab_and_line>. Adjust. Use range-for. Update.
3735 (breakpoint_sals_to_pc): Change sals parameter from struct
3736 symtabs_and_lines to std::vector reference.
3737 (check_fast_tracepoint_sals): Change sals parameter from struct
3738 symtabs_and_lines to std::array_view. Use range-for.
3739 (decode_static_tracepoint_spec): Return a std::vector instead of
3740 symtabs_and_lines. Update.
3741 (create_breakpoint): Update.
3742 (break_range_command, until_break_command, clear_command): Update.
3743 (base_breakpoint_decode_location, bkpt_decode_location)
3744 (bkpt_probe_create_sals_from_location)
3745 (bkpt_probe_decode_location, tracepoint_decode_location)
3746 (tracepoint_probe_decode_location)
3747 (strace_marker_create_sals_from_location): Return a std::vector
3748 instead of symtabs_and_lines.
3749 (strace_marker_create_breakpoints_sal): Update.
3750 (strace_marker_decode_location): Return a std::vector instead of
3751 symtabs_and_lines. Update.
3752 (update_breakpoint_locations): Change struct symtabs_and_lines
3753 parameters to gdb::array_view. Adjust.
3754 (location_to_sals): Return a std::vector instead of
3755 symtabs_and_lines. Update.
3756 (breakpoint_re_set_default): Use std::vector instead of struct
3757 symtabs_and_lines.
3758 (decode_location_default): Return a std::vector instead of
3759 symtabs_and_lines. Update.
3760 * breakpoint.h: Include "common/array-view.h".
3761 (struct breakpoint_ops) <decode_location>: Now returns a
3762 std::vector instead of returning a symtabs_and_lines via output
3763 parameter.
3764 (update_breakpoint_locations): Change sals parameters to use
3765 gdb::array_view.
3766 * cli/cli-cmds.c (edit_command, list_command): Update to use
3767 std::vector and gdb::array_view.
3768 (ambiguous_line_spec): Adjust to use gdb::array_view and
3769 range-for.
3770 (compare_symtabs): Rename to ...
3771 (cmp_symtabs): ... this. Change parameters to symtab_and_line
3772 const reference and adjust.
3773 (filter_sals): Rewrite using std::vector and standard algorithms.
3774 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3775 (jump_command): Update to use std::vector.
3776 * linespec.c (struct linespec_state) <canonical_names>: Update
3777 comment.
3778 (add_sal_to_sals_basic): Delete.
3779 (add_sal_to_sals, filter_results, convert_results_to_lsals)
3780 (decode_line_2, create_sals_line_offset)
3781 (convert_address_location_to_sals, convert_linespec_to_sals)
3782 (convert_explicit_location_to_sals, parse_linespec)
3783 (event_location_to_sals, decode_line_full, decode_line_1)
3784 (decode_line_with_current_source)
3785 (decode_line_with_last_displayed, decode_objc)
3786 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3787 (linespec_result::~linespec_result): Adjust to use std::vector
3788 instead of symtabs_and_lines.
3789 * linespec.h (linespec_sals::sals): Now a std::vector.
3790 (struct linespec_result): Use std::vector, bool, and in-class
3791 initialization.
3792 (decode_line_1, decode_line_with_current_source)
3793 (decode_line_with_last_displayed): Return std::vector.
3794 * macrocmd.c (info_macros_command): Use std::vector.
3795 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3796 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3797 std::vector.
3798 * probe.h (parse_probes): Return a std::vector.
3799 * python/python.c (gdbpy_decode_line): Use std::vector and
3800 gdb::array_view.
3801 * source.c (select_source_symtab, line_info): Use std::vector.
3802 * stack.c (func_command): Use std::vector.
3803 * symtab.h (struct symtabs_and_lines): Delete.
3804 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3805
3806 2017-09-04 Pedro Alves <palves@redhat.com>
3807
3808 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3809 unittests/array-view-selftests.c.
3810 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3811 * common/array-view.h: New file.
3812 * unittests/array-view-selftests.c: New file.
3813
3814 2017-09-04 Pedro Alves <palves@redhat.com>
3815
3816 * cli/cli-cmds.c (edit_command): Pass message to
3817 ambiguous_line_spec.
3818 (list_command): Pass message to ambiguous_line_spec. Say
3819 "first"/"last" instead of "start" and "end" to be consistent with
3820 the manual.
3821 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
3822 them to print formatted message.
3823
3824 2017-09-04 Pedro Alves <palves@redhat.com>
3825
3826 * btrace.c (ftrace_add_pt): Pass btrace_insn to
3827 ftrace_update_insns by reference instead of pointer.
3828
3829 2017-09-04 Yao Qi <yao.qi@linaro.org>
3830
3831 * i386-go32-tdep.c: Include x86-xstate.h.
3832 (i386_go32_init_abi): Call i386_target_description.
3833 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3834 if xcr0 is X86_XSTATE_X87_MASK.
3835 * i386-tdep.h (tdesc_i386): Remove the declaration.
3836 (tdesc_i386_mmx): Likewise.
3837
3838 2017-09-04 Yao Qi <yao.qi@linaro.org>
3839
3840 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3841 X86_XSTATE_SSE_MASK instead of 0.
3842
3843 2017-09-04 Yao Qi <yao.qi@linaro.org>
3844
3845 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3846 i386_target_description.
3847 * i386-fbsd-nat.c (i386fbsd_read_description): Call
3848 i386_target_description.
3849 * i386-tdep.c (i386_gdbarch_init): Likewise.
3850
3851 2017-09-04 Yao Qi <yao.qi@linaro.org>
3852
3853 * amd64-darwin-tdep.c: Include "x86-xstate.h".
3854 (x86_darwin_init_abi_64): Call amd64_target_description.
3855 * amd64-dicos-tdep.c: Likewise.
3856 * amd64-fbsd-nat.c: Likewise.
3857 * amd64-fbsd-tdep.c: Likewise.
3858 * amd64-nbsd-tdep.c: Likewise.
3859 * amd64-obsd-tdep.c: Likewise.
3860 * amd64-sol2-tdep.c: Likewise.
3861 * amd64-windows-tdep.c: Likewise.
3862 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3863
3864 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3865
3866 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3867 (btrace_function) <insn>: Change type to use std::vector.
3868 * btrace.c (ftrace_debug, ftrace_call_num_insn,
3869 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3870 ftrace_update_insns, ftrace_compute_global_level_offset,
3871 btrace_stitch_bts, btrace_clear, btrace_insn_get,
3872 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3873 change to std::vector.
3874 (ftrace_update_insns): Adjust to change to std::vector, change
3875 type of INSN parameter.
3876 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3877 * record-btrace.c (btrace_call_history_insn_range,
3878 btrace_compute_src_line_range,
3879 record_btrace_frame_prev_register): Adjust to change to
3880 std::vector.
3881 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3882 to change to std::vector.
3883
3884 2017-09-03 Tom Tromey <tom@tromey.com>
3885
3886 * corefile.c (reopen_exec_file): Use std::string.
3887
3888 2017-09-03 Tom Tromey <tom@tromey.com>
3889
3890 * compile/compile.c (compile_register_name_mangled): Return
3891 std::string.
3892 * compile/compile-loc2c.c (pushf_register_address): Update.
3893 (pushf_register): Update.
3894 * compile/compile-c-types.c (convert_array): Update.
3895 * compile/compile-c-symbols.c (generate_vla_size): Update.
3896 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3897 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3898 (convert_one_symbol): Update.
3899 (generate_c_for_for_one_variable): Update.
3900 * compile/compile-c-support.c (c_get_range_decl_name): Return a
3901 std::string.
3902 (generate_register_struct): Update.
3903 * compile/compile-internal.h (c_get_range_decl_name): Return a
3904 std::string.
3905 (compile_register_name_mangled): Return std::string.
3906
3907 2017-09-03 Tom Tromey <tom@tromey.com>
3908
3909 * utils.c (perror_string): Return a std::string.
3910 (throw_perror_with_name, perror_warning_with_name): Update.
3911
3912 2017-09-03 Tom Tromey <tom@tromey.com>
3913
3914 * demangle.c (demangle_command): Use std::string,
3915 unique_xmalloc_ptr.
3916
3917 2017-09-03 Tom Tromey <tom@tromey.com>
3918
3919 * cli/cli-setshow.c (do_set_command): Use std::string.
3920
3921 2017-09-03 Tom Tromey <tom@tromey.com>
3922
3923 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3924
3925 2017-09-03 Tom Tromey <tom@tromey.com>
3926
3927 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3928
3929 2017-09-03 Tom Tromey <tom@tromey.com>
3930
3931 * mi/mi-cmd-env.c (env_execute_cli_command): Use
3932 gdb::unique_xmalloc_ptr.
3933
3934 2017-09-03 Tom Tromey <tom@tromey.com>
3935
3936 * thread.c (print_thread_info_1): Use string_printf.
3937 (thread_apply_command, thread_apply_all_command): Use
3938 std::string.
3939
3940 2017-09-03 Tom Tromey <tom@tromey.com>
3941
3942 * valprint.c (val_print_string): Update.
3943 * gdbcore.h (memory_error_message): Return std::string.
3944 * corefile.c (memory_error_message): Return std::string.
3945 (memory_error): Update.
3946 * breakpoint.c (insert_bp_location): Update.
3947
3948 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3949
3950 * target/waitstatus.h (target_waitstatus_to_string): Change
3951 return type to std::string.
3952 * target/waitstatus.c (target_waitstatus_to_string): Return
3953 std::string.
3954 * target.h (target_waitstatus_to_string): Remove declaration.
3955 * infrun.c (resume, clear_proceed_status_thread,
3956 print_target_wait_results, do_target_wait, save_waitstatus,
3957 stop_all_threads): Adjust.
3958 * record-btrace.c (record_btrace_wait): Adjust.
3959 * target-debug.h
3960 (target_debug_print_struct_target_waitstatus_p): Adjust.
3961
3962 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3963
3964 PR gdb/22046
3965 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3966 detection.
3967
3968 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3969
3970 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3971 for setting/unsetting environment variables on the remote target.
3972 (New remote packets): Add entries for QEnvironmentHexEncoded,
3973 QEnvironmentUnset and QEnvironmentReset.
3974 * common/environ.c (gdb_environ::operator=): Extend method to
3975 handle m_user_set_env_list and m_user_unset_env_list.
3976 (gdb_environ::clear): Likewise.
3977 (match_var_in_string): Change type of first parameter from 'char
3978 *' to 'const char *'.
3979 (gdb_environ::set): Extend method to handle
3980 m_user_set_env_list and m_user_unset_env_list.
3981 (gdb_environ::unset): Likewise.
3982 (gdb_environ::clear_user_set_env): New method.
3983 (gdb_environ::user_set_envp): Likewise.
3984 (gdb_environ::user_unset_envp): Likewise.
3985 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3986 m_user_unset_env_list on move constructor/assignment.
3987 (unset): Add new default parameter 'update_unset_list = true'.
3988 (clear_user_set_env): New method.
3989 (user_set_envp): Likewise.
3990 (user_unset_envp): Likewise.
3991 (m_user_set_env_list): New std::set.
3992 (m_user_unset_env_list): Likewise.
3993 * common/rsp-low.c (hex2str): New function.
3994 (bin2hex): New overload for bin2hex function.
3995 * common/rsp-low.c (hex2str): New prototype.
3996 (str2hex): New overload prototype.
3997 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3998 QEnvironmentUnset and QEnvironmentReset.
3999 (remote_protocol_features): Add QEnvironmentHexEncoded,
4000 QEnvironmentUnset and QEnvironmentReset packets.
4001 (send_environment_packet): New function.
4002 (extended_remote_environment_support): Likewise.
4003 (extended_remote_create_inferior): Call
4004 extended_remote_environment_support.
4005 (_initialize_remote): Add QEnvironmentHexEncoded,
4006 QEnvironmentUnset and QEnvironmentReset packet configs.
4007 * unittests/environ-selftests.c (gdb_selftest_env_var):
4008 New variable.
4009 (test_vector_initialization): New function.
4010 (test_init_from_host_environ): Likewise.
4011 (test_reinit_from_host_environ): Likewise.
4012 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
4013 Likewise.
4014 (test_unset_set_empty_vector): Likewise.
4015 (test_vector_clear): Likewise.
4016 (test_std_move): Likewise.
4017 (test_move_constructor):
4018 (test_self_move): Likewise.
4019 (test_set_unset_reset): Likewise.
4020 (run_tests): Rewrite in terms of the functions above.
4021
4022 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
4023
4024 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
4025 (adi_available): Use a temp variable of type CORE_ADDR as argument
4026 3 when calling target_auxv_search.
4027 (adi_normalize_address): Use masks and xor operators to calculate
4028 normalized address.
4029 (adi_read_versions, adi_write_versions, adi_print_versions)
4030 (do_examine, do_assign): Use paddress.
4031
4032 2017-08-29 John Baldwin <jhb@FreeBSD.org>
4033
4034 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
4035 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
4036 out of loop and add supply of FIR.
4037 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
4038 add collect of FIR.
4039
4040 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
4041
4042 PR gdb/21827
4043 * cli/cli-script.c (define_command): Don't convert command name
4044 to lower case.
4045
4046 2017-08-25 Joel Brobecker <brobecker@adacore.com>
4047
4048 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
4049 Update all callers accordingly. Remove all code blocks handling
4050 the case where DISPP is not NULL.
4051
4052 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4053
4054 PR symtab/22003
4055 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
4056 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4057 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
4058
4059 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4060
4061 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
4062 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
4063 (read_comp_units_from_section): New parameter abbrev_section, use
4064 read_and_check_comp_unit_head, allocate signatured_type if needed.
4065 (create_all_comp_units): Update read_comp_units_from_section caller.
4066
4067 2017-08-23 Pedro Alves <palves@redhat.com>
4068
4069 PR remote/21852
4070 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
4071 to null_ptid and switch to thread without reading the registers
4072 after adding the inferior.
4073
4074 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4075
4076 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
4077 compile-gcc.
4078 * compile/compile.c (compile_gcc, show_compile_gcc): New.
4079 (compile_to_object): Implement compile_gcc.
4080 (_initialize_compile): Install "set compile-gcc". Initialize
4081 compile_gcc.
4082
4083 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4084
4085 * compile/compile.c (compile_to_object): Conditionally call
4086 set_verbose. Conditionally call compile or compile_v0.
4087
4088 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
4089
4090 * sparc64-tdep.h: (adi_normalize_address): New export.
4091 * sparc-nat.h: (open_adi_tag_fd): New export.
4092 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
4093 * sparc64-linux-tdep.c:
4094 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
4095 (sparc64_linux_handle_segmentation_fault): New function.
4096 (sparc64_linux_init_abi): Register
4097 sparc64_linux_handle_segmentation_fault
4098 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
4099 (sparc64_addr_bits_remove): New function.
4100 (sparc64_init_abi): Register sparc64_addr_bits_remove.
4101 (MAX_PROC_NAME_SIZE): New macro.
4102 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
4103 (sparc64adilist): New variable.
4104 (adi_proc_list): New variable.
4105 (find_adi_info): New function.
4106 (add_adi_info): New function.
4107 (get_adi_info_proc): New function.
4108 (get_adi_info): New function.
4109 (info_adi_command): New function.
4110 (read_maps_entry): New function.
4111 (adi_available): New function.
4112 (adi_normalize_address): New function.
4113 (adi_align_address): New function.
4114 (adi_convert_byte_count): New function.
4115 (adi_tag_fd): New function.
4116 (adi_is_addr_mapped): New function.
4117 (adi_read_versions): New function.
4118 (adi_write_versions): New function.
4119 (adi_print_versions): New function.
4120 (do_examine): New function.
4121 (do_assign): New function.
4122 (adi_examine_command): New function.
4123 (adi_assign_command): New function.
4124 (_initialize_sparc64_adi_tdep): New function.
4125
4126 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
4127
4128 * breakpoint.c (breakpoints_info): Rename to ...
4129 (info_breakpoints_command): ... this.
4130 (watchpoints_info): Rename to ...
4131 (info_watchpoints_command): ... this.
4132 (tracepoints_info): Rename to ...
4133 (info_tracepoints_command): ... this.
4134 (_initialize_breakpoint): Adjust.
4135 * dcache.c (dcache_info): Rename to ...
4136 (info_display_command): ... this.
4137 (_initialize_dcache): Adjust.
4138 * frame.h (args_info): Rename to ...
4139 (info_args_command): ... this.
4140 (locals_info): Rename to ...
4141 (info_locals_command): ... this.
4142 * infcmd.c (nofp_registers_info): Rename to ...
4143 (info_registers_command): ... this.
4144 (float_info): Rename to ...
4145 (info_float_command): ... this.
4146 (program_info): Rename to ...
4147 (info_program_command): ... this.
4148 (all_registers_info): Rename to ...
4149 (info_all_registers_command): ... this.
4150 (vector_info): Rename to ...
4151 (info_vector_command): ... this.
4152 (float_info): Rename to ...
4153 (info_float_command): ... this.
4154 (_initialize_infcmd): Adjust.
4155 * inferior.h (term_info): Rename to ...
4156 (info_terminal_command): ... this.
4157 * inflow.c (term_info): Rename to ...
4158 (info_terminal_command): ... this.
4159 (_initialize_inflow): Adjust.
4160 * infrun.c (signals_info): Rename to ...
4161 (info_signals_command): ... this.
4162 (_initialize_infrun): Adjust.
4163 * objc-lang.c (classes_info): Rename to ...
4164 (info_classes_command): ... this.
4165 (selectors_info): Rename to ...
4166 (info_selectors_command): ... this.
4167 (_initialize_objc_language): Adjust.
4168 * printcmd.c (sym_info): Rename to ...
4169 (info_symbol_command): ... this.
4170 (address_info): Rename to ...
4171 (info_address_command): ... this.
4172 (display_info): Rename to ...
4173 (info_display_command): ... this.
4174 (_initialize_printcmd): Adjust.
4175 * reverse.c (bookmarks_info): Rename to ...
4176 (info_breakpoints_command): ... this.
4177 (_initialize_reverse): Adjust.
4178 * ser-go32.c (dos_info): Rename to ...
4179 (info_serial_command): ... this.
4180 (_initialize_ser_dos): Adjust.
4181 * skip.c (skip_info): Rename to ...
4182 (info_skip_command): ... this.
4183 (_initialize_step_skip): Adjust.
4184 * source.c (line_info): Rename to ...
4185 (info_line_command): ... this.
4186 (source_info): Rename to ...
4187 (info_source_command)
4188 * stack.c (frame_info): Rename to ...
4189 (info_frame_command): ... this.
4190 (locals_info): Rename to ...
4191 (info_locals_command): ... this.
4192 (args_info): Rename to ...
4193 (info_args_command): ... this.
4194 (_initialize_stack): Adjust.
4195 * symtab.c (sources_info): Rename to ...
4196 (info_sources_command): ... this.
4197 (variables_info): Rename to ...
4198 (info_variables_command): ... this.
4199 (functions_info): Rename to ...
4200 (info_functions_command): ... this.
4201 (types_info): Rename to ...
4202 (info_types_command): ... this.
4203 (_initialize_symtab): Adjust.
4204 * target.c (target_info): Rename to ...
4205 (info_target_command): ... this.
4206 (initialize_targets): Adjust.
4207 * tracepoint.c (tvariables_info): Rename to ...
4208 (info_tvariables_command): ... this.
4209 (scope_info): Rename to ...
4210 (info_scope_command): ... this.
4211 (trace_dump_actions): Adjust.
4212 (_initialize_tracepoint): Adjust.
4213
4214 2017-08-22 Tom Tromey <tom@tromey.com>
4215
4216 * breakpoint.h (install_breakpoint): Update.
4217 * breakpoint.c (add_solib_catchpoint): Update.
4218 (install_breakpoint): Change argument to a std::unique_ptr.
4219 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4220 (create_breakpoint_sal, create_breakpoint): Update.
4221 (watch_command_1, catch_exec_command_1)
4222 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4223 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4224 Return the breakpoint.
4225 (set_raw_breakpoint_without_location, set_raw_breakpoint)
4226 (new_single_step_breakpoint): Update.
4227 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4228 std::unique_ptr.
4229 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4230 std::unique_ptr.
4231 * break-catch-sig.c (create_signal_catchpoint): Use
4232 std::unique_ptr.
4233 * ada-lang.c (create_ada_exception_catchpoint): Use
4234 std::unique_ptr.
4235
4236 2017-08-22 Tom Tromey <tom@tromey.com>
4237
4238 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4239
4240 2017-08-22 Tom Tromey <tom@tromey.com>
4241
4242 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4243 (lookup_partial_symbol): Update.
4244
4245 2017-08-22 Tom Tromey <tom@tromey.com>
4246
4247 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4248 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4249 (find_and_open_source, symtab_to_fullname): Update.
4250 * psymtab.c (psymtab_to_fullname): Update.
4251
4252 2017-08-22 Tom Tromey <tom@tromey.com>
4253
4254 * exec.c (exec_file_attach): Update.
4255 * linux-thread-db.c (try_thread_db_load): Update.
4256 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4257 * utils.c (gdb_realpath): Change return type.
4258 (gdb_realpath_keepfile): Update.
4259 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4260 (_initialize_utils): Register the new self test.
4261 * source.c (openp): Update.
4262 (find_and_open_source): Update.
4263 * nto-tdep.c (nto_find_and_open_solib): Update.
4264 * main.c (set_gdb_data_directory): Update.
4265 (captured_main_1): Update.
4266 * dwarf2read.c (dwarf2_get_dwz_file): Update
4267 (dw2_map_symbol_filenames): Update.
4268 * auto-load.c (auto_load_safe_path_vec_update): Update.
4269 (filename_is_in_auto_load_safe_path_vec): Change type of
4270 "filename_realp".
4271 (auto_load_objfile_script): Update.
4272 (file_is_auto_load_safe): Update. Use std::string.
4273 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4274
4275 2017-08-22 Tom Tromey <tom@tromey.com>
4276
4277 * utils.c (gdb_realpath_keepfile): Return a
4278 gdb::unique_xmalloc_ptr.
4279 * exec.c (exec_file_attach): Update.
4280 * utils.h (gdb_realpath_keepfile): Return a
4281 gdb::unique_xmalloc_ptr.
4282
4283 2017-08-22 Tom Tromey <tom@tromey.com>
4284
4285 * compile/compile.c (compile_file_command): Use
4286 gdb::unique_xmalloc_ptr, std::string.
4287 * utils.c (gdb_abspath): Change return type.
4288 * source.c (openp): Update.
4289 * objfiles.c (allocate_objfile): Update.
4290 * main.c (set_gdb_data_directory): Update.
4291 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4292
4293 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
4294
4295 * cli-cmds.c (list_commands): List actual code around more than
4296 one location.
4297
4298 2017-08-21 John Baldwin <jhb@FreeBSD.org>
4299
4300 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4301
4302 2017-08-21 Pedro Alves <palves@redhat.com>
4303
4304 PR gdb/19487
4305 * c-exp.y (variable production): Handle function aliases.
4306 * minsyms.c (msymbol_is_text): New function.
4307 * minsyms.h (msymbol_is_text): Declare.
4308 * symtab.c (find_function_alias_target): New function.
4309 * symtab.h (find_function_alias_target): Declare.
4310
4311 2017-08-21 Pedro Alves <palves@redhat.com>
4312
4313 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4314 typedefs.
4315 * typeprint.c (whatis_exp): If handling "whatis", and expression
4316 is OP_TYPE, strip one typedef level. Otherwise don't strip
4317 typedefs here.
4318 * valops.c (value_cast): Save "to" type before resolving
4319 stubs/typedefs. Use that type as resulting value's type.
4320
4321 2017-08-18 Tom Tromey <tom@tromey.com>
4322 Pedro Alves <palves@redhat.com>
4323
4324 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4325 * sol-thread.c (sol_thread_resume, sol_thread_wait)
4326 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4327 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4328 * proc-service.c (ps_xfer_memory): Use scoped_restore.
4329 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4330 (linux_get_siginfo_data): Add "thread" argument. Use
4331 scoped_restore.
4332 * linux-nat.c (linux_child_follow_fork)
4333 (check_stopped_by_watchpoint): Use scoped_restore.
4334 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4335 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4336 (restore_inferior_ptid, save_inferior_ptid): Remove.
4337 * btrace.c (btrace_fetch): Use scoped_restore.
4338 * bsd-uthread.c (bsd_uthread_fetch_registers)
4339 (bsd_uthread_store_registers): Use scoped_restore.
4340 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4341 scoped_restore.
4342 * aix-thread.c (aix_thread_resume, aix_thread_wait)
4343 (aix_thread_xfer_partial): Use scoped_restore.
4344 * inferior.h (save_inferior_ptid): Remove.
4345
4346 2017-08-18 Yao Qi <yao.qi@linaro.org>
4347
4348 PR tdep/21818
4349 * arm-tdep.c (gdb_print_insn_arm): Mark
4350 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4351
4352 2017-08-18 Yao Qi <yao.qi@linaro.org>
4353
4354 * NEWS: Mention GDBserver's new option "--selftest".
4355 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4356 * selftest.c: Move it to common/selftest.c.
4357 * selftest.h: Move it to common/selftest.h.
4358 * selftest-arch.c (reset): New function.
4359 (tests_with_arch): Call reset.
4360
4361 2017-08-18 Yao Qi <yao.qi@linaro.org>
4362
4363 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
4364 instead of exception_fprintf and printf_filtered.
4365
4366 2017-08-18 Yao Qi <yao.qi@linaro.org>
4367
4368 * selftest.c (register_self_test): Rename it to
4369 selftests::register_test.
4370 (run_self_tests): selftest::run_tests.
4371 * selftest.h: Update declarations.
4372 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4373 selftests::register_test_foreach_arch.
4374 * selftest-arch.h: Update declaration.
4375 * aarch64-tdep.c: Update.
4376 * arm-tdep.c: Likewise.
4377 * disasm-selftests.c: Likewise.
4378 * dwarf2loc.c: Likewise.
4379 * dwarf2-frame.c: Likewise.
4380 * findvar.c: Likewise.
4381 * gdbarch-selftests.c: Likewise.
4382 * maint.c (maintenance_selftest): Likewise.
4383 * regcache.c: Likewise.
4384 * rust-exp.y: Likewise.
4385 * selftest-arch.c: Likewise.
4386 * unittests/environ-selftests.c: Likewise.
4387 * unittests/function-view-selftests.c: Likewise.
4388 * unittests/offset-type-selftests.c: Likewise.
4389 * unittests/optional-selftests.c: Likewise.
4390 * unittests/scoped_restore-selftests.c: Likewise.
4391 * utils-selftests.c: Likewise.
4392
4393 2017-08-17 Pedro Alves <palves@redhat.com>
4394
4395 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4396 local.
4397
4398 2017-08-17 Pedro Alves <palves@redhat.com>
4399
4400 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4401 field.
4402 (reset_die_in_process): Delete, replaced by ...
4403 (process_die_scope): ... this new class. Make it responsible for
4404 freeing cu->line_header too.
4405 (process_die): Use process_die_scope.
4406 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4407 cu->line_header_die_owner. Don't release the line header if it's
4408 owned by the CU.
4409 (setup_type_unit_groups): Make the CU/DIE own the line header.
4410 Don't release the line header here.
4411
4412 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
4413
4414 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4415
4416 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
4417
4418 * NEWS: Mention new shortcuts for nexti and stepi in TUI
4419 Single-Key mode
4420
4421 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
4422
4423 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4424 mode command list.
4425
4426 2017-08-15 Stafford Horne <shorne@gmail.com>
4427
4428 * MAINTAINERS (Write After Approval): Add Stafford Horne.
4429
4430 2017-08-15 Stafford Horne <shorne@gmail.com>
4431
4432 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4433
4434 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
4435
4436 PR gdb/21954
4437 * infcmd.c (unset_environment_command): Use the 'clear' method on
4438 the environment instead of resetting it.
4439
4440 2017-08-15 John Baldwin <jhb@FreeBSD.org>
4441
4442 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4443 platforms.
4444
4445 2017-08-14 Tom Tromey <tom@tromey.com>
4446
4447 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4448 (print_binary_chars): Likewise.
4449 (BITS_IN_BYTES): Remove.
4450
4451 2017-08-14 Tom Tromey <tom@tromey.com>
4452
4453 PR gdb/21675
4454 * valprint.c (LOW_ZERO): Change value to 034.
4455 (print_octal_chars): Add static_asserts for octal constants.
4456 * printcmd.c (print_scalar_formatted): Add 'd' case.
4457
4458 2017-08-11 Tom Tromey <tom@tromey.com>
4459
4460 * symfile.c (add_symbol_file_command): Use std::vector.
4461
4462 2017-08-14 Tom Tromey <tom@tromey.com>
4463
4464 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4465 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4466 std::move.
4467 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4468
4469 2017-08-11 Pedro Alves <palves@redhat.com>
4470
4471 * infrun.c (process_event_stop_test): Adjust
4472 function_name_is_marked_for_skip call.
4473 * skip.c: Include <list>.
4474 (skiplist_entry): Make it a class with private fields, and
4475 getters/setters.
4476 (skiplist_entry_chain): Delete.
4477 (skiplist_entries): New.
4478 (skiplist_entry_count): Delete.
4479 (highest_skiplist_entry_num): New.
4480 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4481 (add_skiplist_entry): Delete.
4482 (skiplist_entry::skiplist_entry): New.
4483 (skiplist_entry::add_entry): New.
4484 (skip_file_command, skip_function): Adjust.
4485 (compile_skip_regexp): Delete.
4486 (skip_command): Don't compile regexp here. Adjust to use
4487 skiplist_entry::add_entry.
4488 (skip_info): Adjust to use range-for and getters.
4489 (skip_enable_command, skip_disable_command): Adjust to use
4490 range-for and setters.
4491 (skip_delete_command): Adjust to use std::list.
4492 (add_skiplist_entry): Delete.
4493 (skip_file_p): Delete, refactored as ...
4494 (skiplist_entry::do_skip_file_p): ... this new method.
4495 (skip_gfile_p): Delete, refactored as ...
4496 (skiplist_entry::do_gskip_file_p): ... this new method.
4497 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4498 (skiplist_entry::skip_function_p): ... this new method.
4499 (function_name_is_marked_for_skip): Now returns bool, and takes
4500 the function sal by const reference. Adjust to use range-for and
4501 skiplist_entry methods.
4502 (_initialize_step_skip): Remove references to
4503 skiplist_entry_chain, skiplist_entry_count.
4504 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4505 takes the function sal by const reference.
4506
4507 2017-08-11 Yao Qi <yao.qi@linaro.org>
4508
4509 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4510 (dwarf2_frame_cache): Remove reset_cache_cleanup.
4511 (dwarf2_frame_cache):
4512 * frame-unwind.c (frame_unwind_try_unwinder): Catch
4513 RETURN_MASK_ALL and set *this_case to NULL.
4514 * frame-unwind.h: Update comments.
4515
4516 2017-08-11 Yao Qi <yao.qi@linaro.org>
4517
4518 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4519 (dwarf2_frame_state_copy_regs): Remove.
4520 (dwarf2_frame_state_free_regs): Remove.
4521 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4522 (dwarf2_restore_rule): Call method .alloc_regs instead of
4523 dwarf2_frame_state_alloc_regs.
4524 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
4525 constructor. Call std::move.
4526 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4527 (dwarf2_frame_cache): Likewise.
4528
4529 [GDB_SELF_TEST]: Include selftest.h and
4530 selftest-arch.h.
4531 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4532 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4533 execute_cfa_program_test.
4534
4535 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4536 copy ctor, assignment operator, move assignment.
4537 <alloc_regs>: New method.
4538 <swap>: New method.
4539 (struct dwarf2_frame_state): Delete dtor.
4540 (dwarf2_frame_state_alloc_regs): Remove declaration.
4541 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4542 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4543
4544 2017-08-11 Yao Qi <yao.qi@linaro.org>
4545
4546 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4547 (dwarf2_frame_state::dwarf2_frame_state): New.
4548 (dwarf2_frame_state::~dwarf2_frame_state): New.
4549 (dwarf2_fetch_cfa_info): Update.
4550 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
4551 rather than a pointer. Update code.
4552 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4553 dtor.
4554 <data_align, code_align, retaddr_column>: Change them to const.
4555 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4556 to bool.
4557
4558 2017-08-11 Yao Qi <yao.qi@linaro.org>
4559
4560 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4561 <loc.exp>: New field.
4562 * dwarf2-frame.c (execute_cfa_program): Update.
4563 (dwarf2_frame_prev_register): Update.
4564
4565 2017-08-10 Pedro Alves <palves@redhat.com>
4566
4567 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4568
4569 2017-08-09 John Baldwin <jhb@FreeBSD.org>
4570
4571 * fbsd-nat.c (struct fbsd_fork_info): Remove.
4572 (fbsd_pending_children): Use std::list.
4573 (fbsd_remember_child): Likewise.
4574 (fbsd_is_child_pending): Likewise.
4575 (fbsd_pending_vfork_done): Use std::forward_list.
4576 (fbsd_add_vfork_done): Likewise.
4577 (fbsd_is_vfork_done_pending): Likewise.
4578 (fbsd_next_vfork_done): Likewise.
4579
4580 2017-08-09 John Baldwin <jhb@FreeBSD.org>
4581
4582 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4583 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4584 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4585 for `mapfilename'.
4586 (fbsd_xfer_partial): Use gdb::byte_vector.
4587 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4588
4589 2017-08-09 John Baldwin <jhb@FreeBSD.org>
4590
4591 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4592 "filestuff.h".
4593 (fbsd_find_memory_regions): Fix `mapfile' initialization.
4594
4595 2017-08-09 Tom Tromey <tom@tromey.com>
4596
4597 * skip.c (skiplist_entry): New constructor.
4598 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4599 (skiplist_entry::file_is_glob): Now bool.
4600 (skiplist_entry::file, skiplist_entry::function): Now
4601 std::string.
4602 (make_skip_entry): Return a unique_ptr. Use new.
4603 (free_skiplist_entry, free_skiplist_entry_cleanup)
4604 (make_free_skiplist_entry_cleanup): Remove.
4605 (skip_command, skip_disable_command, add_skiplist_entry)
4606 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4607 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4608 (function_name_is_marked_for_skip): Update.
4609 (skip_delete_command): Update. Use delete.
4610
4611 2017-08-09 Jiong Wang <jiong.wang@arm.com>
4612
4613 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4614 (aarch64_linux_core_read_description): New function.
4615 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4616
4617 2017-08-09 Pedro Alves <palves@redhat.com>
4618
4619 * cp-name-parser.y (cp_comp_to_string): Return a
4620 gdb::unique_xmalloc_ptr<char>.
4621 * cp-support.c (replace_typedefs_qualified_name)
4622 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4623 (cp_canonicalize_string_full): Use op= instead of explicit
4624 convertion.
4625 (cp_class_name_from_physname, method_name_from_physname)
4626 (cp_func_name, cp_remove_params): Adjust to use
4627 gdb::unique_xmalloc_ptr<char>.
4628 * cp-support.h (cp_comp_to_string): Return a
4629 gdb::unique_xmalloc_ptr<char>.
4630 * python/py-type.c (typy_lookup_type): Adjust to use
4631 gdb::unique_xmalloc_ptr<char>.
4632
4633 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
4634
4635 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4636
4637 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
4638 Yao Qi <yao.qi@linaro.org>
4639
4640 * cp-support.c (cp_canonicalize_string_full): Use
4641 gdb::unique_xmalloc_ptr<char>.
4642 (cp_canonicalize_string): Likewise.
4643
4644 2017-08-09 Yao Qi <yao.qi@linaro.org>
4645
4646 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4647 * regformats/i386/amd64-avx-avx512.dat: Remove.
4648 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4649 * regformats/i386/amd64-avx-mpx.dat:Remove.
4650 * regformats/i386/amd64-avx.dat: Remove.
4651 * regformats/i386/amd64-mpx.dat: Remove.
4652 * regformats/i386/i386-avx-avx512.dat: Remove.
4653 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4654 * regformats/i386/i386-avx-mpx.dat: Remove.
4655 * regformats/i386/i386-mmx.dat: Remove.
4656 * regformats/i386/i386-mpx.dat: Remove.
4657
4658 2017-08-09 Yao Qi <yao.qi@linaro.org>
4659
4660 * amd64-tdep.h (tdesc_x32): Remove the declaration.
4661 * amd64-tdep.c: Don't include features/i386/x32*.c.
4662 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4663 functions.
4664 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4665 and i386/x32-avx-avx512.
4666 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4667 and i386/x32.xml.
4668 * features/i386/x32-avx-avx512.c: Removed.
4669 * features/i386/x32-avx-avx512.xml: Removed.
4670 * features/i386/x32-avx.c: Removed.
4671 * features/i386/x32-avx.xml: Removed.
4672 * features/i386/x32.c: Removed.
4673 * features/i386/x32.xml: Removed.
4674 * regformats/i386/x32-avx-avx512.dat: Removed.
4675 * regformats/i386/x32-avx.dat: Removed.
4676 * regformats/i386/x32.dat: Removed.
4677
4678 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4679
4680 PR breakpoints/21886
4681 * mem-break.c (default_memory_insert_breakpoint): Use
4682 `->placed_address' rather than `->reqstd_address' for the
4683 breakpoint location.
4684
4685 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4686
4687 * arch-utils.c (default_print_insn): Remove arch/mach/endian
4688 assertions.
4689
4690 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4691
4692 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4693 a union of `tdep_info', `tdesc_data' and `id'.
4694 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4695 rather than `info.tdep_info'.
4696 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4697 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4698 * i386-tdep.c (i386_gdbarch_init): Likewise.
4699 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4700 * mips-tdep.c (mips_gdbarch_init): Likewise.
4701 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4702 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4703 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4704 `info.tdep_info'.
4705 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4706 `info.tdep_info'.
4707 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4708 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4709 `info.tdep_info'.
4710 * spu-tdep.c (spu_gdbarch_init): Likewise.
4711 * gdbarch.h: Regenerate.
4712
4713 2017-08-07 Leszek Swirski <leszeks@google.com>
4714
4715 PR symtab/20899
4716 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4717
4718 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
4719
4720 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4721 (gdbsim_open): Rename gdb_argv args object to argv.
4722
4723 2017-08-05 Tom Tromey <tom@tromey.com>
4724
4725 * compile/compile-object-load.c (compile_object_load): Use
4726 gdb::unique_xmalloc_ptr.
4727 * cli/cli-dump.c (scan_filename): Rename from
4728 scan_filename_with_cleanup. Change return type.
4729 (scan_expression): Rename from scan_expression_with_cleanup.
4730 Change return type.
4731 (dump_memory_to_file, dump_value_to_file, restore_command):
4732 Use gdb::unique_xmalloc_ptr. Update.
4733 * cli/cli-cmds.c (find_and_open_script): Use
4734 gdb::unique_xmalloc_ptr.
4735 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4736 * symmisc.c (maintenance_print_symbols)
4737 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4738 * symfile.c (symfile_bfd_open, generic_load)
4739 (add_symbol_file_command, remove_symbol_file_command): Use
4740 gdb::unique_xmalloc_ptr.
4741 * source.c (openp): Use gdb::unique_xmalloc_ptr.
4742 * psymtab.c (maintenance_print_psymbols): Use
4743 gdb::unique_xmalloc_ptr.
4744 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4745 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4746 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4747 (reload_shared_libraries_1): Likewise.
4748
4749 2017-08-05 Tom Tromey <tom@tromey.com>
4750
4751 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4752 (rust_op_vector, rust_set_vector): New typedefs.
4753 (current_parser): New global.
4754 (work_obstack): Change to pointer type. Update all users.
4755 (rust_ast, pstate): Remove globals.
4756 (struct rust_parser): New.
4757 (%union) <params, field_inits>: Change type.
4758 (start, tuple_expr, unit_expr, struct_expr_list, literal)
4759 (field_expr, expr_list, maybe_expr_list, type_list): Update.
4760 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4761 (convert_params_to_types, convert_params_to_expression): Change
4762 type of "params".
4763 (ast_string): Change type of "fields".
4764 (rust_parse): Make a rust_parser. Remove cleanups.
4765 (rust_lex_tests): Make and install an auto_obstack.
4766
4767 2017-08-04 Yao Qi <yao.qi@linaro.org>
4768
4769 * configure.srv (ipa_x32_linux_regobj): New.
4770 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4771 instead of X86_TDESC_AVX512.
4772 (initialize_low_tracepoint): Call
4773 init_registers_x32_avx_avx512_linux.
4774
4775 2017-08-04 Yao Qi <yao.qi@linaro.org>
4776
4777 * utils.h (gdb_argv): Add namespace std for nullptr_t.
4778
4779 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
4780
4781 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4782
4783 2017-08-03 Tom Tromey <tom@tromey.com>
4784
4785 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4786 Remove.
4787 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4788
4789 2017-08-03 Tom Tromey <tom@tromey.com>
4790
4791 * python/py-param.c (compute_enum_values): Use gdb_argv.
4792
4793 2017-08-03 Tom Tromey <tom@tromey.com>
4794
4795 * utils.h (struct gdb_argv_deleter): New.
4796 (gdb_argv): New class.
4797 * utils.c (gdb_argv::reset): New method.
4798 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4799 * tracefile.c (tsave_command): Use gdb_argv.
4800 * top.c (new_ui_command): Use gdb_argv.
4801 * symmisc.c (maintenance_print_symbols)
4802 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4803 * symfile.c (symbol_file_command, generic_load)
4804 (remove_symbol_file_command): Use gdb_argv.
4805 * stack.c (backtrace_command): Use gdb_argv.
4806 * source.c (add_path, show_substitute_path_command)
4807 (unset_substitute_path_command, set_substitute_path_command):
4808 Use gdb_argv.
4809 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
4810 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4811 * remote.c (extended_remote_run, remote_put_command)
4812 (remote_get_command, remote_delete_command): Use gdb_argv.
4813 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4814 (gdbsim_open): Use gdb_argv.
4815 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4816 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4817 * procfs.c (procfs_info_proc): Use gdb_argv.
4818 * interps.c (interpreter_exec_cmd): Use gdb_argv.
4819 * infrun.c (handle_command): Use gdb_argv.
4820 * inferior.c (add_inferior_command, clone_inferior_command):
4821 Use gdb_argv.
4822 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4823 * exec.c (exec_file_command): Use gdb_argv.
4824 * cli/cli-cmds.c (alias_command): Use gdb_argv.
4825 * compile/compile.c (build_argc_argv): Use gdb_argv.
4826
4827 2017-08-03 Tom Tromey <tom@tromey.com>
4828
4829 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4830
4831 2017-08-03 Tom Tromey <tom@tromey.com>
4832
4833 * python/python.c (compute_python_string): Return std::string.
4834 (gdbpy_eval_from_control_command): Update.
4835 (do_start_initialization): Use std::string.
4836 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4837 xstrprintf.
4838 * python/py-breakpoint.c (local_setattro): Use string_printf, not
4839 xstrprintf.
4840
4841 2017-08-03 Tom Tromey <tom@tromey.com>
4842
4843 * top.h (do_restore_instream_cleanup): Remove.
4844 * top.c (do_restore_instream_cleanup): Remove.
4845 (read_command_file): Use scoped_restore.
4846 * cli/cli-script.c (execute_user_command): Use scoped_restore.
4847
4848 2017-08-03 Tom Tromey <tom@tromey.com>
4849
4850 * cli/cli-script.c (execute_user_command)
4851 (execute_control_command): Use scoped_restore.
4852
4853 2017-08-03 Tom Tromey <tom@tromey.com>
4854
4855 * cli/cli-script.c (do_restore_user_call_depth): Remove.
4856 (execute_user_command): Remove user_call_depth; use
4857 user_args_stack's size instead.
4858
4859 2017-08-03 Tom Tromey <tom@tromey.com>
4860
4861 * top.h (in_user_command): Remove.
4862 * top.c (in_user_command): Remove.
4863 * cli/cli-script.c (do_restore_user_call_depth)
4864 (execute_user_command): Update.
4865
4866 2017-08-03 Tom Tromey <tom@tromey.com>
4867
4868 * valops.c (search_struct_method): Use gdb::byte_vector.
4869 * valarith.c (value_concat): Use std::vector.
4870 * target.c (memory_xfer_partial): Use gdb::byte_vector.
4871 (simple_search_memory): Likewise.
4872 * printcmd.c (find_string_backward): Use gdb::byte_vector.
4873 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4874 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4875 * elfread.c (elf_rel_plt_read): Use std::string.
4876 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4877 * cli/cli-dump.c (restore_section_callback): Use
4878 gdb::byte_vector.
4879
4880 2017-08-03 Tom Tromey <tom@tromey.com>
4881
4882 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4883
4884 2017-08-03 Tom Tromey <tom@tromey.com>
4885
4886 * tui/tui-regs.c (tui_restore_gdbout): Remove.
4887 (tui_register_format): Use scoped_restore.
4888
4889 2017-08-03 Tom Tromey <tom@tromey.com>
4890
4891 * reverse.c (exec_direction_default): Remove.
4892 (exec_reverse_once): Use scoped_restore.
4893 * remote.c (restore_remote_timeout): Remove.
4894 (remote_flash_erase, remote_flash_write, remote_flash_done)
4895 (readchar, remote_serial_write): Use scoped_restore.
4896 * cli/cli-script.c (struct source_cleanup_lines_args)
4897 (source_cleanup_lines): Remove.
4898 (script_from_file): Use scoped_restore.
4899 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4900 (source_command): Use scoped_restore.
4901
4902 2017-08-03 Tom Tromey <tom@tromey.com>
4903
4904 * utils.h (make_cleanup_free_so): Remove.
4905 * utils.c (do_free_so, make_cleanup_free_so): Remove.
4906 * solist.h (struct so_deleter): New.
4907 (so_list_up): New typedef.
4908 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4909
4910 2017-08-03 Tom Tromey <tom@tromey.com>
4911
4912 * utils.h (make_cleanup_restore_current_language): Remove.
4913 * utils.c (do_restore_current_language)
4914 (make_cleanup_restore_current_language): Remove.
4915 * parse.c (parse_exp_in_context_1)
4916 (parse_expression_with_language): Use
4917 scoped_restore_current_language.
4918 * mi/mi-main.c (mi_cmd_execute): Use
4919 scoped_restore_current_language.
4920 * language.h (scoped_restore_current_language): New class.
4921
4922 2017-08-03 Tom Tromey <tom@tromey.com>
4923
4924 * compile/compile.c (cleanup_unlink_file): Remove.
4925 (compile_to_object): Use gdb::unlinker.
4926 (eval_compile_command): Likewise.
4927
4928 2017-08-03 Tom Tromey <tom@tromey.com>
4929
4930 * utils.h (make_cleanup_fclose): Remove.
4931 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4932
4933 2017-08-03 Tom Tromey <tom@tromey.com>
4934
4935 * top.c (open_terminal_stream): Return gdb_file_up.
4936 (new_ui_command): Update.
4937
4938 2017-08-03 Tom Tromey <tom@tromey.com>
4939
4940 * source.c (print_source_lines_base, forward_search_command)
4941 (reverse_search_command): Use gdb_file_up.
4942
4943 2017-08-03 Tom Tromey <tom@tromey.com>
4944
4945 * fbsd-nat.c (fbsd_find_memory_regions): Update.
4946
4947 2017-08-03 Tom Tromey <tom@tromey.com>
4948
4949 * cli/cli-cmds.c (find_and_open_script): Change return type.
4950 Remove "streamp" and "full_path" parameters.
4951 (source_script_with_search): Update.
4952 * auto-load.c (source_script_file): Update.
4953 * cli/cli-cmds.h (find_and_open_script): Change type.
4954 (open_script): New struct.
4955
4956 2017-08-03 Tom Tromey <tom@tromey.com>
4957
4958 * xml-support.c (xml_fetch_content_from_file): Update.
4959 * ui-file.c (stdio_file::open): Update.
4960 * tracefile-tfile.c (tfile_start): Update.
4961 * remote.c (remote_file_put, remote_file_get): Update.
4962 * nat/linux-procfs.c (linux_proc_get_int)
4963 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4964 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4965 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4966 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4967 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4968 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4969 * linux-nat.c (linux_proc_pending_signals): Update.
4970 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4971 (file_closer): Remove.
4972 * compile/compile.c (compile_to_object): Update.
4973 * common/filestuff.h (struct gdb_file_deleter): New.
4974 (gdb_file_up): New typedef.
4975 (gdb_fopen_cloexec): Change return type.
4976 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4977 * cli/cli-dump.c (fopen_with_cleanup): Remove.
4978 (dump_binary_file, restore_binary_file): Update.
4979 * auto-load.c (auto_load_objfile_script_1): Update.
4980
4981 2017-08-03 Tom Tromey <tom@tromey.com>
4982
4983 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4984 (info_static_tracepoint_markers_command): Likewise.
4985 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4986 * skip.c (skip_info): Use ui_out_emit_table.
4987 * progspace.c (print_program_space): Use ui_out_emit_table.
4988 * osdata.c (info_osdata): Use ui_out_emit_table.
4989 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4990 ui_out_emit_table.
4991 * linux-thread-db.c (info_auto_load_libthread_db): Use
4992 ui_out_emit_table.
4993 * inferior.c (print_inferior): Use ui_out_emit_table.
4994 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4995 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4996 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4997 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4998 * ui-out.h (class ui_out_emit_table): New.
4999
5000 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
5001
5002 * mips-tdep.c (mips_fpu_type_str): New function.
5003 (mips_dump_tdep): Call it.
5004
5005 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
5006
5007 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
5008 `->mips_fpu_type'.
5009
5010 2017-07-31 Xavier Roirand <roirand@adacore.com>
5011
5012 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
5013
5014 2017-07-27 Xavier Roirand <roirand@adacore.com>
5015
5016 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
5017
5018 2017-07-26 Yao Qi <yao.qi@linaro.org>
5019
5020 * cli/cli-cmds.c (maintenancechecklist): New variable.
5021 * gdbcmd.h (maintenancechecklist): Declare it.
5022 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
5023 Call i386_linux_read_description with different masks.
5024 * maint.c (maintenance_check_command): New function.
5025 (_initialize_maint_cmds): Call add_prefix_cmd.
5026 * target-descriptions.c (tdesc_reg): override operator != and ==.
5027 (tdesc_type): Likewise.
5028 (tdesc_feature): Likewise.
5029 (target_desc): Likewise.
5030 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
5031 (maintenance_check_xml_descriptions): New function.
5032 (_initialize_target_descriptions) Add command "xml-descriptions".
5033 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
5034
5035 2017-07-26 Yao Qi <yao.qi@linaro.org>
5036
5037 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
5038 Include features/i386/32bit-*.c.
5039 (i386_linux_read_description): Generate target description if it
5040 doesn't exist.
5041 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
5042 functions.
5043 * features/i386/32bit-linux.c: Re-generated.
5044 * features/i386/32bit-sse.c: Likewise.
5045 * target-descriptions.c (print_c_feature::visit): Print code to
5046 set register number if needed.
5047 (print_c_feature) <m_next_regnum>: New field.
5048
5049 2017-07-26 Yao Qi <yao.qi@linaro.org>
5050
5051 * features/Makefile (CFILES): Rename with TDESC_CFILES.
5052 (FEATURE_XMLFILES): New.
5053 (FEATURE_CFILES): New.
5054 New rules.
5055 (clean-cfiles): Remove generated c files.
5056 * features/i386/32bit-avx.c: Generated.
5057 * features/i386/32bit-avx512.c: Generated.
5058 * features/i386/32bit-core.c: Generated.
5059 * features/i386/32bit-linux.c: Generated.
5060 * features/i386/32bit-mpx.c: Generated.
5061 * features/i386/32bit-pkeys.c: Generated.
5062 * features/i386/32bit-sse.c: Generated.
5063 * target-descriptions.c: Include algorithm.
5064 (tdesc_element_visitor): Add method visit_end.
5065 (print_c_tdesc): Implement visit_end.
5066 (print_c_tdesc:: m_filename_after_features): Move it to
5067 protected.
5068 (print_c_feature): New class.
5069 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
5070 name starts with "i386/32bit-".
5071
5072 2017-07-26 Yao Qi <yao.qi@linaro.org>
5073
5074 * target-descriptions.c (tdesc_element_visitor): New class.
5075 (tdesc_element): New class.
5076 (tdesc_reg): Inherit from tdesc_element.
5077 (tdesc_reg::accept): New function.
5078 (tdesc_type): Inherit from tdesc_element.
5079 (tdesc_type::accept): New function.
5080 (tdesc_feature): Inherit from tdesc_element.
5081 (tdesc_feature::accept): New function.
5082 (target_desc): Inherit from tdesc_element.
5083 (target_desc::target_desc): New.
5084 (target_desc::~target_desc): New.
5085 (target_desc::accept): New.
5086 (allocate_target_description): Use new.
5087 (free_target_description): Use delete.
5088 (print_c_tdesc): New class.
5089 (maint_print_c_tdesc_cmd): Adjust.
5090
5091 * features/aarch64.c: Re-generated.
5092 * features/arc-arcompact.c: Re-generated.
5093 * features/arc-v2.c: Re-generated.
5094 * features/arm/arm-with-iwmmxt.c: Re-generated.
5095 * features/arm/arm-with-m.c: Re-generated.
5096 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
5097 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
5098 * features/arm/arm-with-neon.c: Re-generated.
5099 * features/arm/arm-with-vfpv2.c: Re-generated.
5100 * features/arm/arm-with-vfpv3.c: Re-generated.
5101 * features/i386/amd64-avx-avx512.c: Re-generated.
5102 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5103 * features/i386/amd64-avx.c: Re-generated.
5104 * features/i386/amd64-avx-linux.c: Re-generated.
5105 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
5106 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5107 * features/i386/amd64-avx-mpx.c: Re-generated.
5108 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
5109 * features/i386/amd64.c: Re-generated.
5110 * features/i386/amd64-linux.c: Re-generated.
5111 * features/i386/amd64-mpx.c: Re-generated.
5112 * features/i386/amd64-mpx-linux.c: Re-generated.
5113 * features/i386/i386-avx-avx512.c: Re-generated.
5114 * features/i386/i386-avx-avx512-linux.c: Re-generated.
5115 * features/i386/i386-avx.c: Re-generated.
5116 * features/i386/i386-avx-linux.c: Re-generated.
5117 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
5118 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
5119 * features/i386/i386-avx-mpx.c: Re-generated.
5120 * features/i386/i386-avx-mpx-linux.c: Re-generated.
5121 * features/i386/i386.c: Re-generated.
5122 * features/i386/i386-linux.c: Re-generated.
5123 * features/i386/i386-mmx.c: Re-generated.
5124 * features/i386/i386-mmx-linux.c: Re-generated.
5125 * features/i386/i386-mpx.c: Re-generated.
5126 * features/i386/i386-mpx-linux.c: Re-generated.
5127 * features/i386/x32-avx-avx512.c: Re-generated.
5128 * features/i386/x32-avx-avx512-linux.c: Re-generated.
5129 * features/i386/x32-avx.c: Re-generated.
5130 * features/i386/x32-avx-linux.c: Re-generated.
5131 * features/i386/x32.c: Re-generated.
5132 * features/i386/x32-linux.c: Re-generated.
5133 * features/microblaze.c: Re-generated.
5134 * features/microblaze-with-stack-protect.c: Re-generated.
5135 * features/mips64-dsp-linux.c: Re-generated.
5136 * features/mips64-linux.c: Re-generated.
5137 * features/mips-dsp-linux.c: Re-generated.
5138 * features/mips-linux.c: Re-generated.
5139 * features/nds32.c: Re-generated.
5140 * features/nios2.c: Re-generated.
5141 * features/nios2-linux.c: Re-generated.
5142 * features/rs6000/powerpc-32.c: Re-generated.
5143 * features/rs6000/powerpc-32l.c: Re-generated.
5144 * features/rs6000/powerpc-403.c: Re-generated.
5145 * features/rs6000/powerpc-403gc.c : Re-generated.
5146 * features/rs6000/powerpc-405.c: Re-generated.
5147 * features/rs6000/powerpc-505.c: Re-generated.
5148 * features/rs6000/powerpc-601.c: Re-generated.
5149 * features/rs6000/powerpc-602.c: Re-generated.
5150 * features/rs6000/powerpc-603.c: Re-generated.
5151 * features/rs6000/powerpc-604.c: Re-generated.
5152 * features/rs6000/powerpc-64.c: Re-generated.
5153 * features/rs6000/powerpc-64l.c: Re-generated.
5154 * features/rs6000/powerpc-7400.c: Re-generated.
5155 * features/rs6000/powerpc-750.c: Re-generated.
5156 * features/rs6000/powerpc-860.c: Re-generated.
5157 * features/rs6000/powerpc-altivec32.c: Re-generated.
5158 * features/rs6000/powerpc-altivec32l.c: Re-generated.
5159 * features/rs6000/powerpc-altivec64.c: Re-generated.
5160 * features/rs6000/powerpc-altivec64l.c: Re-generated.
5161 * features/rs6000/powerpc-cell32l.c: Re-generated.
5162 * features/rs6000/powerpc-cell64l.c: Re-generated.
5163 * features/rs6000/powerpc-e500.c: Re-generated.
5164 * features/rs6000/powerpc-e500l.c: Re-generated.
5165 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
5166 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
5167 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
5168 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
5169 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5170 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5171 * features/rs6000/powerpc-vsx32.c: Re-generated.
5172 * features/rs6000/powerpc-vsx32l.c: Re-generated.
5173 * features/rs6000/powerpc-vsx64.c: Re-generated.
5174 * features/rs6000/powerpc-vsx64l.c: Re-generated.
5175 * features/rs6000/rs6000.c: Re-generated.
5176 * features/s390-linux32.c: Re-generated.
5177 * features/s390-linux32v1.c: Re-generated.
5178 * features/s390-linux32v2.c: Re-generated.
5179 * features/s390-linux64.c: Re-generated.
5180 * features/s390-linux64v1.c: Re-generated.
5181 * features/s390-linux64v2.c: Re-generated.
5182 * features/s390-te-linux64.c: Re-generated.
5183 * features/s390-tevx-linux64.c: Re-generated.
5184 * features/s390-vx-linux64.c: Re-generated.
5185 * features/s390x-linux64.c: Re-generated.
5186 * features/s390x-linux64v1.c: Re-generated.
5187 * features/s390x-linux64v2.c: Re-generated.
5188 * features/s390x-te-linux64.c: Re-generated.
5189 * features/s390x-tevx-linux64.c: Re-generated.
5190 * features/s390x-vx-linux64.c: Re-generated.
5191 * features/sparc/sparc32-solaris.c: Re-generated.
5192 * features/sparc/sparc64-solaris.c: Re-generated.
5193 * features/tic6x-c62x.c: Re-generated.
5194 * features/tic6x-c62x-linux.c: Re-generated.
5195 * features/tic6x-c64x.c: Re-generated.
5196 * features/tic6x-c64x-linux.c: Re-generated.
5197 * features/tic6x-c64xp.c: Re-generated.
5198 * features/tic6x-c64xp-linux.c: Re-generated.
5199
5200 2017-07-26 Yao Qi <yao.qi@linaro.org>
5201
5202 * i386-linux-tdep.c (i386_linux_read_description): New function.
5203 (i386_linux_core_read_description): Call
5204 i386_linux_read_description.
5205 * i386-linux-tdep.h (i386_linux_read_description): Declare.
5206 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5207 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5208 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5209 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5210 * x86-linux-nat.c (x86_linux_read_description): Call
5211 i386_linux_read_description.
5212
5213 2017-07-26 Yao Qi <yao.qi@linaro.org>
5214
5215 * NEWS: Mention it.
5216 * features/Makefile (%.c: %.xml): Pass the xml file name to
5217 command "maint print c-tdesc".
5218 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5219 name from 'arg'.
5220
5221 2017-07-26 Yao Qi <yao.qi@linaro.org>
5222
5223 * target-descriptions.c (target_desc): Add ctor and dtor. Do
5224 in-class initialization.
5225 (tdesc_create_feature): Call new instead of XCNEW.
5226 (free_target_description): Ue delete.
5227
5228 2017-07-25 John Baldwin <jhb@FreeBSD.org>
5229
5230 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5231
5232 2017-07-25 Yao Qi <yao.qi@linaro.org>
5233
5234 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5235 constant.
5236 (amd64_x32_init_abi): Likewise.
5237 * amd64-tdep.h (amd64_init_abi): Update declaration.
5238 (amd64_x32_init_abi): Likewise.
5239
5240 2017-07-25 Yao Qi <yao.qi@linaro.org>
5241
5242 PR tdep/21717
5243 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5244 condition for FPSCR.
5245 (arm_linux_store_inferior_registers): Likewise.
5246
5247 2017-07-22 Tom Tromey <tom@tromey.com>
5248
5249 * break-catch-syscall.c (struct catch_syscall_inferior_data)
5250 <syscalls_counts>: Now a std::vector.
5251 (get_catch_syscall_inferior_data): Use "new".
5252 (catch_syscall_inferior_data_cleanup): Use "delete".
5253 (insert_catch_syscall, remove_catch_syscall)
5254 (clear_syscall_counts): Update.
5255
5256 2017-07-22 Tom Tromey <tom@tromey.com>
5257
5258 * break-catch-syscall.c (syscall_catchpoint)
5259 <syscalls_to_be_caught>: Now a std::vector<int>
5260 (~syscall_catchpoint): Remove.
5261 (insert_catch_syscall, remove_catch_syscall)
5262 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5263 (print_mention_catch_syscall, print_recreate_catch_syscall):
5264 Update.
5265 (create_syscall_event_catchpoint): Change type of "filter"
5266 parameter.
5267 (catch_syscall_split_args): Return a std::vector.
5268 (catch_syscall_command_1, catching_syscall_number_1): Update.
5269
5270 2017-07-22 Tom Tromey <tom@tromey.com>
5271
5272 * break-catch-throw.c (struct exception_catchpoint)
5273 <exception_rx>: Now a std::string.
5274 (~exception_catchpoint): Remove.
5275 (print_one_detail_exception_catchpoint): Update.
5276 (handle_gnu_v3_exceptions): Change type of except_rx.
5277 (extract_exception_regexp): Return a std::string.
5278 (catch_exception_command_1): Update.
5279
5280 2017-07-22 Tom Tromey <tom@tromey.com>
5281
5282 * break-catch-sig.c (gdb_signal_type): Remove typedef.
5283 (struct signal_catchpoint) <signals_to_be_caught>: Now a
5284 std::vector.
5285 <catch_all>: Now a bool.
5286 (~signal_catchpoint): Remove.
5287 (signal_catchpoint_insert_location)
5288 (signal_catchpoint_remove_location)
5289 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5290 (signal_catchpoint_print_mention)
5291 (signal_catchpoint_print_recreate)
5292 (signal_catchpoint_explains_signal): Update.
5293 (create_signal_catchpoint): Change type of "filter" and
5294 "catch_all".
5295 (catch_signal_split_args): Return a std::vector. Change type of
5296 "catch_all".
5297 (catch_signal_command): Update.
5298
5299 2017-07-20 Pedro Alves <palves@redhat.com>
5300
5301 * ada-lang.c (ada_language_defn): Make extern.
5302 (_initialize_ada_language): Remove add_language call.
5303 * c-lang.c (c_language_defn, cplus_language_defn)
5304 (asm_language_defn, minimal_language_defn): Make extern.
5305 (_initialize_c_language): Delete.
5306 * completer.c (compare_cstrings): Delete, moved to utils.h.
5307 * d-lang.c (d_language_defn): Make extern.
5308 (_initialize_d_language): Remove add_language calls.
5309 * defs.h (enum language): Add comment.
5310 * f-lang.c (f_language_defn): Make extern.
5311 (_initialize_f_language): Remove add_language call.
5312 * go-lang.c (go_language_defn): Make extern.
5313 (_initialize_go_language): Remove add_language call.
5314 * language.c: Include <algorithm>.
5315 (languages): Redefine as const array.
5316 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5317 (set_language_command): Handle "local". Use for-range loop.
5318 (set_language): Remove loop.
5319 (language_enum): Rewrite.
5320 (language_def, language_str): Remove loops.
5321 (add_language): Delete.
5322 (add_set_language_command): New, based on add_languages.
5323 (skip_language_trampoline): Adjust.
5324 (local_language_defn): Delete.
5325 (language_gdbarch_post_init): Adjust.
5326 (_initialize_language): Remove add_language calls. Call
5327 add_set_language_command.
5328 * language.h (add_language): Delete.
5329 (auto_language_defn)
5330 (unknown_language_defn, minimal_language_defn, ada_language_defn)
5331 (asm_language_defn, c_language_defn, cplus_language_defn)
5332 (d_language_defn, f_language_defn, go_language_defn)
5333 (m2_language_defn, objc_language_defn, opencl_language_defn)
5334 (pascal_language_defn, rust_language_defn): Declare.
5335 * m2-lang.c (m2_language_defn): Make extern.
5336 (_initialize_m2_language): Remove add_language call.
5337 * objc-lang.c (objc_language_defn): Make extern.
5338 (_initialize_objc_language): Remove add_language call.
5339 * opencl-lang.c (opencl_language_defn): Make extern.
5340 (_initialize_opencl_language): Remove add_language call.
5341 * p-lang.c (pascal_language_defn): Make extern.
5342 (_initialize_pascal_language): Delete.
5343 * rust-lang.c (rust_language_defn): Make extern.
5344 (_initialize_rust_language): Delete.
5345 * utils.h (compare_cstrings): New static inline function.
5346
5347 2017-07-20 Pedro Alves <palves@redhat.com>
5348
5349 * ada-lang.c (ada_to_fixed_type_1): Adjust.
5350 (get_var_value): Constify parameters.
5351 (get_int_var_value): Change prototype.
5352 (to_fixed_range_type): Adjust.
5353 * ada-lang.h (get_int_var_value): Change prototype.
5354
5355 2017-07-20 Pedro Alves <palves@redhat.com>
5356
5357 * dwarf2read.c (dw2_lookup_symbol): Use
5358 SYMBOL_MATCHES_SEARCH_NAME.
5359 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5360
5361 2017-07-20 Pedro Alves <palves@redhat.com>
5362
5363 * block.c (block_iter_name_step, block_iter_name_first)
5364 (block_iter_name_next): Delete.
5365 (block_lookup_symbol_primary): Adjust to use
5366 dict_iter_match_first/dict_iter_match_next.
5367 * block.h (block_iter_name_first, block_iter_name_next): Delete
5368 declarations.
5369 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5370 dict_iter_match_first/dict_iter_match_next.
5371
5372 2017-07-20 Pedro Alves <palves@redhat.com>
5373
5374 * cp-support.c (cp_find_first_component_aux): Add missing case for
5375 end of string.
5376
5377 2017-07-18 David Blaikie <dblaikie@gmail.com>
5378
5379 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5380 of dwo_cu's dwo_file.
5381
5382 2017-07-18 Yao Qi <yao.qi@linaro.org>
5383
5384 * remote.c (store_registers_using_G): Remove one line comment.
5385
5386 2017-07-18 Yao Qi <yao.qi@linaro.org>
5387
5388 * regcache.c (regcache_cpy): Simplify it.
5389 (regcache::cpy_no_passthrough): Remove it.
5390 * regcache.h (cpy_no_passthrough): Remove it.
5391 (regcache_dup, regcache_cpy): Update comments.
5392
5393 2017-07-18 Pedro Alves <palves@redhat.com>
5394
5395 * remote-sim.c (sim_command_completer): Adjust to work with a
5396 completion_tracker instead of a VEC.
5397
5398 2017-07-17 Pedro Alves <palves@redhat.com>
5399
5400 * completer.c (complete_source_filenames): New function.
5401 (complete_address_and_linespec_locations): New function.
5402 (location_completer): Use complete_address_and_linespec_locations.
5403 (completion_tracker::build_completion_result): Honor the tracker's
5404 request to suppress append.
5405 * completer.h (completion_tracker::suppress_append_ws)
5406 (completion_tracker::set_suppress_append_ws): New methods.
5407 (completion_tracker::m_suppress_append_ws): New field.
5408 (complete_source_filenames): New declaration.
5409 * linespec.c (linespec_complete_what): New.
5410 (struct ls_parser) <complete_what, completion_word,
5411 completion_quote_char, completion_quote_end, completion_tracker>:
5412 New fields.
5413 (string_find_incomplete_keyword_at_end): New.
5414 (linespec_lexer_lex_string): Record quote char. If in completion
5415 mode, don't throw.
5416 (linespec_lexer_consume_token): Advance the completion word point.
5417 (linespec_lexer_peek_token): Save/restore completion info.
5418 (save_stream_and_consume_token): New.
5419 (set_completion_after_number): New.
5420 (linespec_parse_basic): Set what to complete next depending on
5421 token. Handle function and label completions specially.
5422 (parse_linespec): Disable objc shortcut in completion mode. Set
5423 what to complete next depending on token type. Skip keyword if in
5424 completion mode.
5425 (complete_linespec_component, linespec_complete): New.
5426 * linespec.h (linespec_complete): Declare.
5427
5428 2017-07-17 Pedro Alves <palves@redhat.com>
5429
5430 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5431 Handle 'operator<' / 'operator<<'.
5432
5433 2017-07-17 Pedro Alves <palves@redhat.com>
5434
5435 * completer.c (collect_explicit_location_matches): Handle
5436 MATCH_LABEL.
5437 (convert_explicit_location_to_linespec): New, factored out from
5438 ...
5439 (convert_explicit_location_to_sals): ... this.
5440 (complete_label): New.
5441 (linespec_complete_label, find_label_symbols_in_block): New.
5442 (find_label_symbols): Add completion_mode parameter and adjust to
5443 call find_label_symbols_in_block.
5444 * linespec.h (linespec_complete_label): Declare.
5445
5446 2017-07-17 Pedro Alves <palves@redhat.com>
5447
5448 * ada-lang.c (ada_collect_symbol_completion_matches): Add
5449 complete_symbol_mode parameter.
5450 * cli/cli-cmds.c (complete_command): Get the completion result out
5451 of the handle_brkchars tracker if used a custom word point.
5452 * completer.c: Include "linespec.h".
5453 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5454 (advance_to_expression_complete_word_point): New.
5455 (completion_tracker::completes_to_completion_word): New.
5456 (complete_files_symbols): Pass down
5457 complete_symbol_mode::EXPRESSION.
5458 (explicit_options, probe_options): New.
5459 (collect_explicit_location_matches): Complete on the
5460 explictit_loc->foo instead of word. Use
5461 linespec_complete_function. Handle MATCH_LINE. Handle offering
5462 keyword and options completions.
5463 (backup_text_ptr): Delete.
5464 (skip_keyword): New.
5465 (complete_explicit_location): Remove 'word' parameter. Add
5466 language, quoted_arg_start and quoted_arg_end parameters.
5467 Rewrite, parsing left to right.
5468 (location_completer): Rewrite.
5469 (location_completer_handle_brkchars): New function.
5470 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5471 (enum complete_line_internal_reason): Adjust comments.
5472 (completion_tracker::discard_completions): New.
5473 (completer_handle_brkchars_func_for_completer): Handle
5474 location_completer.
5475 (gdb_custom_word_point_brkchars)
5476 (gdb_org_rl_basic_quote_characters): New.
5477 (gdb_completion_word_break_characters_throw)
5478 (completion_find_completion_word): Handle trackers that use a
5479 custom word point.
5480 (completion_tracker::advance_custom_word_point_by): New.
5481 (completion_tracker::build_completion_result): Don't rely on
5482 readline appending the quote char.
5483 (gdb_rl_attempted_completion_function_throw): Handle trackers that
5484 use a custom word point.
5485 (gdb_rl_attempted_completion_function): Restore
5486 rl_basic_quote_characters.
5487 * completer.h (class completion_tracker): Extend intro comment.
5488 (completion_tracker::set_quote_char)
5489 (completion_tracker::quote_char)
5490 (completion_tracker::set_use_custom_word_point)
5491 (completion_tracker::use_custom_word_point)
5492 (completion_tracker::custom_word_point)
5493 (completion_tracker::set_custom_word_point)
5494 (completion_tracker::advance_custom_word_point_by)
5495 (completion_tracker::completes_to_completion_word)
5496 (completion_tracker::discard_completions): New methods.
5497 (completion_tracker::m_quote_char)
5498 (completion_tracker::m_use_custom_word_point)
5499 (completion_tracker::m_custom_word_point): New fields.
5500 (advance_to_expression_complete_word_point): Declare.
5501 * f-lang.c (f_collect_symbol_completion_matches): Add
5502 complete_symbol_mode parameter.
5503 * language.h (struct language_defn)
5504 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5505 parameter.
5506 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
5507 (linespec_complete_function): New function.
5508 (linespec_lexer_lex_keyword): Adjust.
5509 * linespec.h (linespec_keywords, linespec_complete_function): New
5510 declarations.
5511 * location.c (find_end_quote): New function.
5512 (explicit_location_lex_one): Add explicit_completion_info
5513 parameter. Save quoting info. Don't throw if being called for
5514 completion. Don't handle Ada operators here.
5515 (is_cp_operator, skip_op_false_positives, first_of)
5516 (explicit_location_lex_one_function): New function.
5517 (string_to_explicit_location): Replace 'dont_throw' parameter with
5518 an explicit_completion_info pointer parameter. Handle it. Don't
5519 use explicit_location_lex_one to lex function names. Use
5520 explicit_location_lex_one_function instead.
5521 * location.h (struct explicit_completion_info): New.
5522 (string_to_explicit_location): Replace 'dont_throw' parameter with
5523 an explicit_completion_info pointer parameter.
5524 * symtab.c (default_collect_symbol_completion_matches_break_on):
5525 Add complete_symbol_mode parameter. Handle LINESPEC mode.
5526 (default_collect_symbol_completion_matches)
5527 (collect_symbol_completion_matches): Add complete_symbol_mode
5528 parameter.
5529 (collect_symbol_completion_matches_type): Pass down
5530 complete_symbol_mode::EXPRESSION.
5531 (collect_file_symbol_completion_matches): Add complete_symbol_mode
5532 parameter. Handle LINESPEC mode.
5533 * symtab.h (complete_symbol_mode): New.
5534 (default_collect_symbol_completion_matches_break_on)
5535 (default_collect_symbol_completion_matches)
5536 (collect_symbol_completion_matches)
5537 (collect_file_symbol_completion_matches): Add complete_symbol_mode
5538 parameter.
5539
5540 2017-07-17 Pedro Alves <palves@redhat.com>
5541
5542 * utils.c (enum class strncmp_iw_mode): New.
5543 (strcmp_iw): Rename to ...
5544 (strncmp_iw_with_mode): ... this. Add string2_len and mode
5545 parameters. Handle them.
5546 (strncmp_iw): New.
5547 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5548 * utils.h (strncmp_iw): Declare.
5549 (strcmp_iw): Move describing comments here.
5550
5551 2017-07-17 Pedro Alves <palves@redhat.com>
5552
5553 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5554 CP_OPERATOR_STR.
5555 * c-typeprint.c (is_type_conversion_operator): Use
5556 CP_OPERATOR_STR.
5557 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5558 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5559 CP_OPERATOR_LEN.
5560 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5561 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5562 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5563 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5564 CP_OPERATOR_STR.
5565 * location.c: Include "cp-support.h".
5566 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5567 CP_OPERATOR_STR.
5568 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5569 CP_OPERATOR_LEN.
5570
5571 2017-07-17 Pedro Alves <palves@redhat.com>
5572
5573 * cli/cli-cmds.c (complete_command): Use a completion tracker
5574 along with completion_find_completion_word for handle_brkchars
5575 phase.
5576 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5577 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5578 (struct gdb_rl_completion_word_info): New.
5579 (gdb_rl_find_completion_word): New.
5580 (completion_find_completion_word): New.
5581 * completer.h (completion_find_completion_word): Declare.
5582
5583 2017-07-17 Pedro Alves <palves@redhat.com>
5584
5585 * ada-lang.c (symbol_completion_match): Adjust comments.
5586 (symbol_completion_add): Replace vector parameter with
5587 completion_tracker parameter. Use it.
5588 (ada_make_symbol_completion_list): Rename to...
5589 (ada_collect_symbol_completion_matches): ... this. Add
5590 completion_tracker parameter and use it.
5591 (ada_language_defn): Adjust.
5592 * break-catch-syscall.c (catch_syscall_completer): Adjust
5593 prototype and work with completion_tracker instead of VEC.
5594 * breakpoint.c (condition_completer): Adjust prototype and work
5595 with completion_tracker instead of VEC.
5596 * c-lang.c (c_language_defn, cplus_language_defn)
5597 (asm_language_defn, minimal_language_defn): Adjust to renames.
5598 * cli/cli-cmds.c (complete_command): Rework using
5599 completion_tracker. Catch exceptions when completing.
5600 * cli/cli-decode.c (integer_unlimited_completer)
5601 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5602 with completion_tracker instead of VEC.
5603 * command.h (struct completion_tracker): Forward declare.
5604 (completer_ftype, completer_handle_brkchars_ftype): Change
5605 types.
5606 (complete_on_cmdlist, complete_on_enum): Adjust.
5607 * completer.c: Include <algorithm>.
5608 (struct gdb_completer_state): New.
5609 (current_completion): New global.
5610 (readline_line_completion_function): Delete.
5611 (noop_completer, filename_completer)
5612 (filename_completer_handle_brkchars, complete_files_symbols)
5613 (linespec_location_completer): Adjust to work with a
5614 completion_tracker instead of a VEC.
5615 (string_or_empty): New.
5616 (collect_explicit_location_matches): Adjust to work with a
5617 completion_tracker instead of a VEC.
5618 (explicit_location_completer): Rename to ...
5619 (complete_explicit_location): ... this and adjust to work with a
5620 completion_tracker instead of a VEC.
5621 (location_completer): Adjust to work with a completion_tracker
5622 instead of a VEC.
5623 (add_struct_fields): Adjust to work with a completion_list instead
5624 of VEC.
5625 (expression_completer): Rename to ...
5626 (complete_expression): ... this and adjust to work with a
5627 completion_tracker instead of a VEC. Use complete_files_symbols.
5628 (expression_completer): Reimplement on top of complete_expression.
5629 (symbol_completer): Adjust to work with a completion_tracker
5630 instead of a VEC.
5631 (enum complete_line_internal_reason): Add describing comments.
5632 (complete_line_internal_normal_command): Adjust to work with a
5633 completion_tracker instead of a VEC.
5634 (complete_line_internal): Rename to ...
5635 (complete_line_internal_1): ... this and adjust to work with a
5636 completion_tracker instead of a VEC. Assert TEXT is NULL in the
5637 handle_brkchars phase.
5638 (new_completion_tracker): Delete.
5639 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5640 complete_line_internal_1.
5641 (free_completion_tracker): Delete.
5642 (INITIAL_COMPLETION_HTAB_SIZE): New.
5643 (completion_tracker::completion_tracker)
5644 (completion_tracker::~completion_tracker): New.
5645 (maybe_add_completion): Delete.
5646 (completion_tracker::maybe_add_completion)
5647 (completion_tracker::add_completion)
5648 (completion_tracker::add_completions): New.
5649 (throw_max_completions_reached_error): Delete.
5650 (complete_line): Adjust to work with a completion_tracker instead
5651 of a VEC. Don't create a completion_tracker_t or check for max
5652 completions here.
5653 (command_completer, command_completer_handle_brkchars)
5654 (signal_completer, reg_or_group_completer_1)
5655 (reg_or_group_completer, default_completer_handle_brkchars):
5656 Adjust to work with a completion_tracker.
5657 (gdb_completion_word_break_characters_throw): New.
5658 (gdb_completion_word_break_characters): Reimplement.
5659 (line_completion_function): Delete.
5660 (completion_tracker::recompute_lowest_common_denominator)
5661 (expand_preserving_ws)
5662 (completion_tracker::build_completion_result)
5663 (completion_result::completion_result)
5664 (completion_result::completion_result)
5665 (completion_result::~completion_result)
5666 (completion_result::completion_result)
5667 (completion_result::release_match_list, compare_cstrings)
5668 (completion_result::sort_match_list)
5669 (completion_result::reset_match_list)
5670 (gdb_rl_attempted_completion_function_throw)
5671 (gdb_rl_attempted_completion_function): New.
5672 * completer.h (completion_list, struct completion_result)
5673 (class completion_tracker): New.
5674 (complete_line): Add completion_tracker parameter.
5675 (readline_line_completion_function): Delete.
5676 (gdb_rl_attempted_completion_function): New.
5677 (noop_completer, filename_completer, expression_completer)
5678 (location_completer, symbol_completer, command_completer)
5679 (signal_completer, reg_or_group_completer): Update prototypes.
5680 (completion_tracker_t, new_completion_tracker)
5681 (make_cleanup_free_completion_tracker): Delete.
5682 (enum maybe_add_completion_enum): Delete.
5683 (maybe_add_completion): Delete.
5684 (throw_max_completions_reached_error): Delete.
5685 * corefile.c (complete_set_gnutarget): Adjust to work with a
5686 completion_tracker instead of a VEC.
5687 * cp-abi.c (cp_abi_completer): Adjust to work with a
5688 completion_tracker instead of a VEC.
5689 * d-lang.c (d_language_defn): Adjust.
5690 * disasm.c (disassembler_options_completer): Adjust to work with a
5691 completion_tracker instead of a VEC.
5692 * f-lang.c (f_make_symbol_completion_list): Rename to ...
5693 (f_collect_symbol_completion_matches): ... this. Adjust to work
5694 with a completion_tracker instead of a VEC.
5695 (f_language_defn): Adjust.
5696 * go-lang.c (go_language_defn): Adjust.
5697 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5698 Adjust to work with a completion_tracker instead of a VEC.
5699 * infrun.c (handle_completer): Likewise.
5700 * interps.c (interpreter_completer): Likewise.
5701 * interps.h (interpreter_completer): Likewise.
5702 * language.c (unknown_language_defn, auto_language_defn)
5703 (local_language_defn): Adjust.
5704 * language.h (language_defn::la_make_symbol_completion_list):
5705 Rename to ...
5706 (language_defn::la_collect_symbol_completion_matches): ... this
5707 and adjust to work with a completion_tracker instead of a VEC.
5708 * m2-lang.c (m2_language_defn): Adjust.
5709 * objc-lang.c (objc_language_defn): Adjust.
5710 * opencl-lang.c (opencl_language_defn): Adjust.
5711 * p-lang.c (pascal_language_defn): Adjust.
5712 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5713 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5714 with a completion_tracker.
5715 * rust-lang.c (rust_language_defn): Adjust.
5716 * symtab.c (free_completion_list, do_free_completion_list)
5717 (return_val, completion_tracker): Delete.
5718 (completion_list_add_name, completion_list_add_symbol)
5719 (completion_list_add_msymbol, completion_list_objc_symbol)
5720 (completion_list_add_fields, add_symtab_completions): Add
5721 completion_tracker parameter and use it.
5722 (default_make_symbol_completion_list_break_on_1): Rename to...
5723 (default_collect_symbol_completion_matches_break_on): ... this.
5724 Add completion_tracker parameter and use it instead of allocating
5725 a completion tracker here.
5726 (default_make_symbol_completion_list_break_on): Delete old
5727 implementation.
5728 (default_make_symbol_completion_list): Delete.
5729 (default_collect_symbol_completion_matches): New.
5730 (make_symbol_completion_list): Delete.
5731 (collect_symbol_completion_matches): New.
5732 (make_symbol_completion_type): Rename to ...
5733 (collect_symbol_completion_matches_type): ... this. Add
5734 completion_tracker parameter and use it instead of VEC.
5735 (make_file_symbol_completion_list_1): Rename to...
5736 (collect_file_symbol_completion_matches): ... this. Add
5737 completion_tracker parameter and use it instead of VEC.
5738 (make_file_symbol_completion_list): Delete.
5739 (add_filename_to_list): Use completion_list instead of a VEC.
5740 (add_partial_filename_data::list): Now a completion_list.
5741 (make_source_files_completion_list): Work with a completion_list
5742 instead of a VEC.
5743 * symtab.h: Include "completer.h".
5744 (default_make_symbol_completion_list_break_on)
5745 (default_make_symbol_completion_list, make_symbol_completion_list)
5746 (make_symbol_completion_type, make_file_symbol_completion_list)
5747 (make_source_files_completion_list): Delete.
5748 (default_collect_symbol_completion_matches_break_on)
5749 (default_collect_symbol_completion_matches)
5750 (collect_symbol_completion_matches)
5751 (collect_symbol_completion_matches_type)
5752 (collect_file_symbol_completion_matches)
5753 (make_source_files_completion_list): New.
5754 * top.c (init_main): Don't install a rl_completion_entry_function
5755 hook. Install a rl_attempted_completion_function hook instead.
5756 * tui/tui-layout.c (layout_completer): Adjust to work with a
5757 completion_tracker.
5758 * tui/tui-regs.c (tui_reggroup_completer):
5759 * tui/tui-win.c (window_name_completer, focus_completer)
5760 (winheight_completer): Adjust to work with a completion_tracker.
5761 * value.c: Include "completer.h".
5762 (complete_internalvar): Adjust to work with a completion_tracker.
5763 * value.h (complete_internalvar): Likewise.
5764
5765 2017-07-17 Pedro Alves <palves@redhat.com>
5766
5767 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5768 renames.
5769 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5770 comments to completer_ftype's declaration.
5771 <completer_handle_brkchars>: Change type to
5772 completer_handle_brkchars_ftype.
5773 * command.h (completer_ftype): Add describing comment and give
5774 names to parameters.
5775 (completer_ftype_void): Rename to ...
5776 (completer_handle_brkchars_ftype) ... this. Add describing comment.
5777 (set_cmd_completer_handle_brkchars): Adjust.
5778 * completer.c (filename_completer_handle_brkchars): New function.
5779 (complete_line_internal_normal_command): New function, factored
5780 out from ...
5781 (complete_line_internal): ... here.
5782 (command_completer_handle_brkchars)
5783 (default_completer_handle_brkchars)
5784 (completer_handle_brkchars_func_for_completer): New functions.
5785 * completer.h (set_gdb_completion_word_break_characters): Delete
5786 declaration.
5787 (completer_handle_brkchars_func_for_completer): New declaration.
5788 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5789 completer_handle_brkchars_func_for_completer.
5790
5791 2017-07-17 Pedro Alves <palves@redhat.com>
5792
5793 * completer.c (symbol_completer): New function, based on
5794 make_symbol_completion_list_fn.
5795 * completer.h (symbol_completer): New declaration.
5796 * guile/scm-cmd.c (cmdscm_completers): Adjust.
5797 * python/py-cmd.c (completers): Adjust.
5798 * symtab.c (make_symbol_completion_list_fn): Delete.
5799 * symtab.h (make_symbol_completion_list_fn): Delete.
5800 * cli/cli-decode.c (add_cmd): Adjust.
5801
5802 2017-07-17 Pedro Alves <palves@redhat.com>
5803
5804 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5805 * dwarf2read.c: Include "filename-seen-cache.h".
5806 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5807 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5808 * filename-seen-cache.c: New file.
5809 * filename-seen-cache.h: New file.
5810 * symtab.c: Include "filename-seen-cache.h".
5811 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5812 (create_filename_seen_cache, clear_filename_seen_cache)
5813 (delete_filename_seen_cache, filename_seen): Delete, parts moved
5814 to filename-seen-cache.h/filename-seen-cache.c.
5815 (output_source_filename, sources_info)
5816 (maybe_add_partial_symtab_filename)
5817 (make_source_files_completion_list): Adjust to use
5818 filename_seen_cache.
5819
5820 2017-07-17 Pedro Alves <palves@redhat.com>
5821
5822 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5823 fields.
5824 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5825 dwarf2_debug_sections*)): New.
5826 (dwarf2_per_objfile::dwarf2_per_objfile(const
5827 dwarf2_per_objfile&)): Declare as deleted.
5828 (dwarf2_per_objfile::operator=): Declare as deleted.
5829 (dwarf2_per_objfile::dwarf2_per_objfile)
5830 (dwarf2_per_objfile::~dwarf2_per_objfile)
5831 (dwarf2_per_objfile::free_cached_comp_units): New.
5832 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5833 ctor. Call dwarf2_per_objfile's ctor manually.
5834 (dwarf2_locate_sections): Deleted/refactored as ...
5835 (dwarf2_per_objfile::locate_sections): ... this new method.
5836 (free_cached_comp_units): Defer to
5837 dwarf2_per_objfile::free_cached_comp_units.
5838 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5839
5840 2017-07-14 Tom Tromey <tom@tromey.com>
5841
5842 PR rust/21764:
5843 * rust-exp.y (convert_ast_to_expression): Add "want_type"
5844 parameter.
5845 <UNOP_SIZEOF>: Split into separate case.
5846 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
5847
5848 2017-07-14 Tom Tromey <tom@tromey.com>
5849
5850 PR rust/21763:
5851 * symtab.c (symbol_matches_domain): Add language_rust to special
5852 case.
5853 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5854 treat LOC_TYPEDEF symbols as variables.
5855
5856 2017-07-14 Pedro Alves <palves@redhat.com>
5857
5858 * symtab.c (make_file_symbol_completion_list_1): Iterate over
5859 symtabs matching all symtabs with SRCFILE as file name instead of
5860 only considering the first hit, with lookup_symtab.
5861
5862 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5863
5864 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5865 operator_name parameters.
5866 (gen_expr): Update function call.
5867
5868 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5869
5870 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5871 parameter.
5872 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5873 Likewise.
5874 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5875 parameter, use agent_expr::gdbarch instead, update function
5876 calls.
5877 (locexpr_tracepoint_var_ref): Likewise.
5878 (loclist_tracepoint_var_ref): Likewise.
5879 * ax-gdb.c (gen_trace_static_fields): Likewise.
5880 (gen_traced_pop): Likewise.
5881 (gen_frame_args_address): Likewise.
5882 (gen_frame_locals_address): Likewise.
5883 (gen_var_ref): Likewise.
5884 (gen_struct_ref_recursive): Likewise.
5885 (gen_static_field): Likewise.
5886 (gen_maybe_namespace_elt): Likewise.
5887 (gen_expr): Likewise.
5888 (gen_trace_for_var): Likewise.
5889 (gen_trace_for_expr): Likewise.
5890 (gen_trace_for_return_address): Likewise.
5891
5892 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5893
5894 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5895 parameter.
5896 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5897
5898 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5899
5900 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5901 from ax, update calls.
5902 (gen_usual_arithmetic): Likewise.
5903 (gen_integral_promotions): Likewise.
5904 (gen_bitfield_ref): Likewise.
5905 (gen_primitive_field): Likewise.
5906 (gen_struct_ref_recursive): Likewise.
5907 (gen_struct_ref): Likewise.
5908 (gen_maybe_namespace_elt): Likewise.
5909 (gen_struct_elt_for_reference): Likewise.
5910 (gen_namespace_elt): Likewise.
5911 (gen_aggregate_elt_ref): Likewise.
5912 (gen_expr): Get gdbarch from ax, update calls.
5913 (gen_expr_binop_rest): Likewise.
5914
5915 2017-07-13 Pedro Alves <palves@redhat.com>
5916
5917 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5918 as default tdesc.
5919 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5920 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5921 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5922 tdesc_amd64_linux as default tdesc. Get final tdesc from the
5923 tdep.
5924 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5925 Get final tdesc from the tdep.
5926 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5927 default tdesc.
5928 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5929 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5930 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5931 Use it as default tdesc.
5932 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5933 down to amd_init_abi. No longer handle fallback tdesc here.
5934 * amd64-tdep.h (tdesc_x32): Declare.
5935 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5936 parameter.
5937 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5938 as default tdesc.
5939
5940 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5941
5942 * s390-linux-tdep.c (s390_process_record): Add support for
5943 instructions new in arch12.
5944
5945 2017-07-11 John Baldwin <jhb@FreeBSD.org>
5946
5947 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5948 PT_GETFSBASE and PT_GETGSBASE.
5949 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5950 PT_SETGSBASE.
5951
5952 2017-07-11 John Baldwin <jhb@FreeBSD.org>
5953
5954 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5955 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5956 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5957 those rules.
5958 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5959 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5960 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5961 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5962 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5963 * features/i386/amd64.xml: Add 64bit-segments.xml.
5964 * features/i386/amd64-avx-avx512.c: Regenerated.
5965 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5966 * features/i386/amd64-avx-mpx.c: Regenerated.
5967 * features/i386/amd64-avx.c: Regenerated.
5968 * features/i386/amd64-mpx.c: Regenerated.
5969 * features/i386/amd64.c: Regenerated.
5970 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5971 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5972 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5973 * regformats/i386/amd64-avx.dat: Regenerated.
5974 * regformats/i386/amd64-mpx.dat: Regenerated.
5975 * regformats/i386/amd64.dat: Regenerated.
5976
5977 2017-07-10 Yao Qi <yao.qi@linaro.org>
5978
5979 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5980 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5981
5982 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
5983
5984 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5985 unsetenv.
5986 * gnulib/aclocal.m4: Regenerate.
5987 * gnulib/config.in: Regenerate.
5988 * gnulib/configure: Regenerate.
5989 * gnulib/import/Makefile.am: Regenerate.
5990 * gnulib/import/Makefile.in: Regenerate.
5991 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5992 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5993 * gnulib/import/m4/environ.m4: New file.
5994 * gnulib/import/m4/setenv.m4: New file.
5995 * gnulib/import/setenv.c: New file.
5996 * gnulib/import/unsetenv.c: New file.
5997
5998 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
5999
6000 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
6001 address when op is DW_OP_addr.
6002
6003 2017-07-09 Tom Tromey <tom@tromey.com>
6004
6005 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
6006 check and apply to outer type.
6007
6008 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6009
6010 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
6011 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
6012 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
6013 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
6014
6015 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6016
6017 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
6018
6019 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6020
6021 * corelow.c (get_core_siginfo): Remove.
6022 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
6023 instead of get_core_siginfo.
6024 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
6025 * gdbarch.h: Re-generate.
6026 * gdbarch.c: Re-generate.
6027 * linux-tdep.c (linux_core_xfer_siginfo): New.
6028 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
6029
6030 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6031
6032 * corelow.c (thread_section_name): Move to ...
6033 * gdbcore.h (thread_section_name): ... here.
6034
6035 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6036
6037 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
6038 (struct siginfo32): New.
6039 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
6040 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
6041 via ptrace(PT_LWPINFO).
6042
6043 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6044
6045 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
6046 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
6047 (fbsd_get_siginfo_type): New.
6048 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
6049 (_initialize_fbsd_tdep): New.
6050
6051 2017-07-06 David Blaikie <dblaikie@gmail.com>
6052
6053 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
6054 a singular dwo_unit*) to support multiple CUs in the same way that
6055 multiple TUs are supported.
6056 (create_cus_hash_table): Replace create_dwo_cu with a function for
6057 parsing multiple CUs from a DWO file.
6058 (open_and_init_dwo_file): Use create_cus_hash_table rather than
6059 create_dwo_cu.
6060 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
6061 htab_find, rather than comparing the signature to a singleton CU in
6062 the dwo_file.
6063
6064 2017-07-06 Pedro Alves <palves@redhat.com>
6065
6066 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
6067
6068 2017-07-04 Pedro Alves <palves@redhat.com>
6069
6070 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
6071 * gdbtypes.h (TYPE_STATIC): Delete.
6072 (struct fn_field) <is_public, is_abstract, is_static, is_final,
6073 is_synchronized, is_native>: Delete.
6074 <dummy>: Bump.
6075 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
6076 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
6077 (TYPE_FN_FIELD_ABSTRACT): Delete.
6078
6079 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
6080
6081 * buffer.h (buffer_finish): Fix spelling mistakes.
6082
6083 2017-07-01 Eli Zaretskii <eliz@gnu.org>
6084
6085 * .dir-locals.el: Automatically switch to C-style comments in
6086 versions of Emacs that support the feature.
6087
6088 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
6089 Pedro Alves <palves@redhat.com>
6090
6091 PR cli/21688
6092 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
6093 (process_next_line): New variable 'inline_cmd'.
6094 Adjust 'if' clauses for "python", "compile" and "guile" to use
6095 'command_name_equals' and check for '!inline_cmd'.
6096
6097 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
6098
6099 PR cli/21688
6100 * cli/cli-script.c (command_name_equals_not_inline): New function.
6101 (process_next_line): Adjust 'if' clauses for "python", "compile"
6102 and "guile" to use command_name_equals_not_inline.
6103
6104 2017-06-29 Pedro Alves <palves@redhat.com>
6105
6106 * completer.c (expression_completer): Call
6107 linespec_location_completer instead of location_completer.
6108
6109 2017-06-29 Pedro Alves <palves@redhat.com>
6110
6111 * completer.c (expression_completer): Remove code that recomputes
6112 'text' from 'word'.
6113
6114 2017-06-29 Yao Qi <yao.qi@linaro.org>
6115
6116 * regformats/regdat.sh: Generate code with
6117 "ifndef IN_PROCESS_AGENT".
6118
6119 2017-06-28 Pedro Alves <palves@redhat.com>
6120
6121 * command.h: Include "common/scoped_restore.h".
6122
6123 2017-06-28 Yao Qi <yao.qi@linaro.org>
6124
6125 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
6126 instead of obstack_grow.
6127
6128 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
6129
6130 PR gdb/21337
6131 * symfile.c (reread_symbols): Call objfiles_changed just before
6132 read_symbols.
6133
6134 2017-06-27 Pedro Alves <palves@redhat.com>
6135
6136 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
6137 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
6138 (completion_list_add_symbol, completion_list_add_msymbol):
6139 ... these new functions.
6140 (add_symtab_completions)
6141 (default_make_symbol_completion_list_break_on_1): Adjust.
6142
6143 2017-06-27 Pedro Alves <palves@redhat.com>
6144
6145 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
6146 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
6147 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
6148 dtor.
6149 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
6150 'storage_obstack' field an auto_obstack. In-class initialize all
6151 non-bitfield fields. Make minsyms_read bool.
6152 * symfile.c (read_symbols): Adjust.
6153
6154 2017-06-27 Alan Hayward <alan.hayward@arm.com>
6155
6156 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
6157 (gdbsim_store_register): Likewise.
6158
6159 2017-06-27 Pedro Alves <palves@redhat.com>
6160
6161 * c-exp.y (name_obstack): Now an auto_obstack.
6162 (yylex): Use auto_obstack::clear.
6163 (c_parse): Use auto_obstack::clear instead of reinitializing and
6164 freeing the obstack.
6165 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
6166 * d-exp.y (name_obstack): Now an auto_obstack.
6167 (yylex): Use auto_obstack::clear.
6168 (d_parse): Use auto_obstack::clear instead of reinitializing and
6169 freeing the obstack.
6170 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6171 auto_obstack.
6172 * dwarf2read.c (create_addrmap_from_index)
6173 (dwarf2_build_psymtabs_hard)
6174 (update_enumeration_type_from_children): Likewise.
6175 * gdb_obstack.h (auto_obstack): New type.
6176 * go-exp.y (name_obstack): Now an auto_obstack.
6177 (build_packaged_name): Use auto_obstack::clear.
6178 (go_parse): Use auto_obstack::clear instead of reinitializing and
6179 freeing the obstack.
6180 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6181 auto_obstack.
6182 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6183 * rust-exp.y (work_obstack): Now an auto_obstack.
6184 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6185 reinitializing and freeing the obstack.
6186 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6187 (host_char_to_target): Use auto_obstack.
6188 * utils.h (make_cleanup_obstack_free): Delete declaration.
6189 * valprint.c (generic_emit_char, generic_printstr): Use
6190 auto_obstack.
6191
6192 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
6193
6194 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6195 thread.
6196 (darwin_init_thread_list): Don't update dummy thread.
6197 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6198
6199 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6200
6201 * record-full.c (netorder16): Remove.
6202
6203 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6204
6205 * common/diagnostics.h: Define macros for GCC.
6206 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6207 * common/vec.h: Include diagnostics.h.
6208 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6209 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6210 warning.
6211
6212 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6213
6214 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6215 New macro.
6216 * ada-lex.l: Ignore deprecated register warnings.
6217
6218 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6219
6220 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6221 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6222
6223 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6224
6225 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6226 its own line.
6227
6228 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6229
6230 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6231
6232 2017-06-23 Alan Hayward <alan.hayward@arm.com>
6233
6234 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6235 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6236 (xtensa_register_read_masked): Likewise.
6237
6238 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
6239
6240 * common/environ.c (gdb_environ::unset): Update comment.
6241
6242 2017-06-22 Alan Hayward <alan.hayward@arm.com>
6243
6244 * python/py-unwind.c (pyuw_sniffer): Allocate space for
6245 registers.
6246
6247 2017-06-22 Alan Hayward <alan.hayward@arm.com>
6248
6249 * record-full.c (record_full_exec_insn): Use byte_vector.
6250
6251 2017-06-22 Yao Qi <yao.qi@linaro.org>
6252
6253 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6254 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6255
6256 2017-06-22 Alan Hayward <alan.hayward@arm.com>
6257
6258 * remote.c (cached_reg): Move from here...
6259 * regcache.h (cached_reg): ...to here.
6260 * python/py-unwind.c (struct reg_info): Remove.
6261 (cached_frame_info): Use cached_reg_t.
6262 (pyuw_prev_register): Likewise.
6263 (pyuw_sniffer): Use cached_reg_t and allocate registers.
6264 (pyuw_dealloc_cache): Free all registers.
6265
6266 2017-06-22 Pedro Alves <palves@redhat.com>
6267 Simon Marchi <simon.marchi@ericsson.com>
6268
6269 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6270 warning.
6271 * common/diagnostics.h: New file.
6272
6273 2017-06-22 Pedro Alves <palves@redhat.com>
6274
6275 * common/agent.h: Add include guards.
6276
6277 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
6278
6279 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6280 talk about addressable units instead of bytes.
6281
6282 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6283
6284 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6285 of '::const_iterator'.
6286
6287 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6288
6289 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6290 'unittests/environ-selftests.c'.
6291 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6292 * charset.c (find_charset_names): Declare object 'iconv_env'.
6293 Update code to use 'iconv_env' object. Remove call to
6294 'free_environ'.
6295 * common/environ.c: Include <utility>.
6296 (make_environ): Delete function.
6297 (free_environ): Delete function.
6298 (gdb_environ::clear): New function.
6299 (gdb_environ::operator=): New function.
6300 (gdb_environ::get): Likewise.
6301 (environ_vector): Delete function.
6302 (set_in_environ): Delete function.
6303 (gdb_environ::set): New function.
6304 (unset_in_environ): Delete function.
6305 (gdb_environ::unset): New function.
6306 (gdb_environ::envp): Likewise.
6307 * common/environ.h: Include <vector>.
6308 (struct gdb_environ): Delete; transform into...
6309 (class gdb_environ): ... this class.
6310 (free_environ): Delete prototype.
6311 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6312 environ_vector): Likewise.
6313 * infcmd.c (run_command_1): Update code to call
6314 'envp' from 'gdb_environ' class.
6315 (environment_info): Update code to call methods from 'gdb_environ'
6316 class.
6317 (unset_environment_command): Likewise.
6318 (path_info): Likewise.
6319 (path_command): Likewise.
6320 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6321 (inferior::inferior): Initialize 'environment' using the host's
6322 information.
6323 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6324 Include "environ.h".
6325 (class inferior) <environment>: Change type from 'struct
6326 gdb_environ' to 'gdb_environ'.
6327 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6328 methods from 'gdb_environ' class.
6329 * solib.c (solib_find_1): Likewise
6330 * unittests/environ-selftests.c: New file.
6331
6332 2017-06-20 Yao Qi <yao.qi@linaro.org>
6333
6334 * features/i386/i386-linux.xml: Exchange the order of including
6335 32bit-linux.xml and 32bit-sse.xml.
6336 * features/i386/i386-linux.c: Regenerated.
6337
6338 2017-06-20 Yao Qi <yao.qi@linaro.org>
6339
6340 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6341 Delete copy ctor and assignment operator.
6342 (tdesc_type): Likewise.
6343 (tdesc_feature): Likewise.
6344 (tdesc_free_reg): Remove.
6345 (tdesc_create_reg): Use new.
6346 (tdesc_free_type): Remove.
6347 (tdesc_create_vector): Use new.
6348 (tdesc_create_union): Likewise.
6349 (tdesc_create_flags): Likewise.
6350 (tdesc_create_enum): Likewise.
6351 (tdesc_free_feature): Delete.
6352 (free_target_description): Use delete.
6353
6354 2017-06-19 John Baldwin <jhb@FreeBSD.org>
6355
6356 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6357 registers.
6358
6359 2017-06-19 Pedro Alves <palves@redhat.com>
6360
6361 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6362 after gdb::unlinker.
6363
6364 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
6365
6366 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6367 gdb_environ to access an environment variable.
6368
6369 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
6370
6371 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6372 gdb_byte*.
6373
6374 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6375
6376 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6377
6378 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6379
6380 * configure: Re-generate.
6381 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6382
6383 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6384
6385 * configure: Re-generate.
6386 * warning.m4: Pass -Werror to compiler when checking for
6387 supported warning flags.
6388
6389 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6390
6391 * Makefile.in (COMPILE.pre): Add "-x c++".
6392
6393 2017-06-16 Alan Hayward <alan.hayward@arm.com>
6394 Pedro Alves <palves@redhat.com>
6395 Yao Qi <yao.qi@linaro.org>
6396
6397 * defs.h (RequireLongest): New.
6398 (extract_integer): Declare function template.
6399 (extract_signed_integer): Remove the declaration, but define it
6400 static inline.
6401 (extract_unsigned_integer): Likewise.
6402 (store_integer): Declare function template.
6403 (store_signed_integer): Remove the declaration, but define it
6404 static inline.
6405 (store_unsigned_integer): Likewise.
6406 * findvar.c (extract_integer): New function template.
6407 (extract_signed_integer): Remove.
6408 (extract_unsigned_integer): Remove.
6409 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6410 instantiations.
6411 (store_integer): New function template.
6412 (store_signed_integer): Remove.
6413 (store_unsigned_integer): Remove.
6414 (store_integer): Explicit instantiations.
6415 * regcache.c (regcache_raw_read_signed): Update.
6416 (regcache::raw_read): New function.
6417 (regcache::raw_read_signed): Remove.
6418 (regcache::raw_read_unsigned): Remove.
6419 (regcache_raw_read_unsigned): Update.
6420 (regcache_raw_write_unsigned): Update.
6421 (regcache::raw_write_signed): Remove.
6422 (regcache::raw_write): New function.
6423 (regcache_cooked_read_signed): Update.
6424 (regcache::raw_write_unsigned): Remove.
6425 (regcache::cooked_read_signed): Remove.
6426 (regcache_cooked_read_unsigned): Update.
6427 (regcache::cooked_read_unsigned): Remove.
6428 (regcache_cooked_write_signed): Update.
6429 (regcache_cooked_write_unsigned): Update.
6430 * regcache.h (regcache) <raw_read_signed>: Remove.
6431 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6432 <raw_read, raw_write>: New.
6433 <cooked_read_signed, cooked_write_signed>: Remove.
6434 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6435 <cooked_read, cooked_write>: New.
6436 * sh64-tdep.c (sh64_pseudo_register_read): Update.
6437 (sh64_pseudo_register_write): Update.
6438
6439 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
6440
6441 * arc-tdep.c (arc_disassembler_options): New variable.
6442 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6443 of default_print_insn.
6444 (arc_delayed_print_insn): Set info->section when needed,
6445 use default_print_insn to retrieve a disassembler.
6446
6447 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
6448
6449 PR gdb/21574
6450 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6451 to mention $SHELL and startup-with-shell.
6452
6453 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
6454
6455 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6456
6457 2017-06-14 Yao Qi <yao.qi@linaro.org>
6458
6459 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6460 default_print_insn instead of print_insn_aarch64.
6461 * arm-tdep.c (gdb_print_insn_arm): Call
6462 default_print_insn instead of print_insn_big_arm
6463 and print_insn_little_arm.
6464 * i386-tdep.c (i386_print_insn): Call default_print_insn
6465 instead of print_insn_i386.
6466 * ia64-tdep.c (ia64_print_insn): Call
6467 default_print_insn instead of print_insn_ia64.
6468 * mips-tdep.c (gdb_print_insn_mips): Call
6469 default_print_insn instead of print_insn_big_mips
6470 and print_insn_little_mips.
6471 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6472 instead of print_insn_spu.
6473
6474 2017-06-14 Pedro Alves <palves@redhat.com>
6475
6476 * ada-lang.c: Include "common/byte-vector.h".
6477 (ada_value_primitive_packed_val): Use gdb::byte_vector.
6478 * charset.c (wchar_iterator::iterate): Resize the vector instead
6479 of reserving it.
6480 * common/byte-vector.h: Include "common/def-vector.h".
6481 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6482 * cli/cli-dump.c: Include "common/byte-vector.h".
6483 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6484 * common/byte-vector.h: New file.
6485 * common/def-vector.h: New file.
6486 * common/default-init-alloc.h: New file.
6487 * dwarf2loc.c: Include "common/byte-vector.h".
6488 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6489 instead of reserving it.
6490 * dwarf2read.c: Include "common/byte-vector.h".
6491 (data_buf::m_vec): Now a gdb::byte_vector.
6492 * gdb_regex.c: Include "common/def-vector.h".
6493 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6494 * mi/mi-main.c: Include "common/byte-vector.h".
6495 (mi_cmd_data_read_memory): Use gdb::byte_vector.
6496 * printcmd.c: Include "common/byte-vector.h".
6497 (print_scalar_formatted): Use gdb::byte_vector.
6498 * valprint.c: Include "common/byte-vector.h".
6499 (maybe_negate_by_bytes, print_decimal_chars): Use
6500 gdb::byte_vector.
6501
6502 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6503
6504 * darwin-nat.c: Include "nat/fork-inferior.h".
6505
6506 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6507
6508 * configure.nat: Factor out Darwin bits that are not
6509 architecture-specific. Add fork-inferior.o.
6510
6511 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6512
6513 * configure.nat: Factor out AIX bits that are not
6514 architecture-specific. Add fork-inferior.o.
6515
6516 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6517
6518 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
6519 (read_pieced_value, write_pieced_value): ...here. Reduce to
6520 wrappers that just call rw_pieced_value.
6521
6522 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6523
6524 * dwarf2loc.c (write_pieced_value): When writing the data for a
6525 memory piece, use write_memory_with_notification instead of
6526 write_memory.
6527
6528 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6529
6530 * valops.c (read_value_memory): Change embedded_offset to
6531 represent a bit offset instead of a byte offset.
6532 * value.h (read_value_memory): Adjust comment.
6533
6534 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6535
6536 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6537 dest_offset_bits and source_offset_bits.
6538 (write_pieced_value): Likewise.
6539
6540 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6541
6542 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6543 given by DW_OP_bit_piece.
6544 (write_pieced_value): Likewise.
6545
6546 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6547
6548 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6549 some other preparations to the places where sufficient information
6550 is available.
6551 (write_pieced_value): Likewise.
6552
6553 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6554
6555 * dwarf2loc.c (bits_to_bytes): New function.
6556 (read_pieced_value): Fix offset calculations for register pieces
6557 on big-endian targets.
6558 (write_pieced_value): Likewise.
6559
6560 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6561
6562 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6563 (write_pieced_value): Likewise.
6564
6565 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6566
6567 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6568 transfer the source value's least significant bits, instead of its
6569 lowest-addressed ones. Rename type_len to max_offset.
6570 (read_pieced_value): Mirror above changes to write_pieced_value as
6571 applicable.
6572
6573 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6574
6575 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6576 truncate full bytes from dest_offset_bits before using it as an
6577 offset into the buffer.
6578
6579 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6580
6581 * dwarf2loc.c (write_pieced_value): Include transfer size in
6582 byte-wise check.
6583
6584 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6585
6586 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6587 calculation of this_size.
6588
6589 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6590
6591 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6592 when targeting a bit-field.
6593 (write_pieced_value): Likewise.
6594
6595 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6596
6597 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6598 (allocate_piece_closure): Drop addr_size parameter.
6599 (dwarf2_evaluate_loc_desc_full): Adjust call to
6600 allocate_piece_closure.
6601
6602 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6603
6604 PR gdb/21226
6605 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6606 the LSB end, independent of endianness.
6607
6608 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6609
6610 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6611 size capping.
6612
6613 2017-06-13 Yao Qi <yao.qi@linaro.org>
6614
6615 * mips-linux-nat.c: Move include features/mips*-linux.c to
6616 mips-linux-tdep.c.
6617 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6618 to mips-linux-tdep.c.
6619 * mips-linux-tdep.c: Include features/mips*-linux.c
6620 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6621 functions.
6622 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6623 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6624 (tdesc_mips64_dsp_linux): Declare.
6625
6626 2017-06-12 Tom Tromey <tom@tromey.com>
6627
6628 * valprint.h (val_print_type_code_int): Remove.
6629 * valprint.c (generic_val_print_int): Always call
6630 val_print_scalar_formatted.
6631 (val_print_type_code_int): Remove.
6632 * printcmd.c (print_scalar_formatted): Handle options->format==0.
6633 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6634 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6635 * ada-valprint.c (ada_val_print_num): Use
6636 val_print_scalar_formatted.
6637
6638 2017-06-12 Tom Tromey <tom@tromey.com>
6639
6640 * printcmd.c (print_scalar_formatted): Unify the two switches.
6641 Don't convert scalars to LONGEST.
6642
6643 2017-06-12 Tom Tromey <tom@tromey.com>
6644
6645 PR exp/16225:
6646 * valprint.h (print_decimal_chars): Update.
6647 * valprint.c (maybe_negate_by_bytes): New function.
6648 (print_decimal_chars): Add "is_signed" argument.
6649 * printcmd.c (print_scalar_formatted): Update.
6650
6651 2017-06-12 Tom Tromey <tom@tromey.com>
6652
6653 PR exp/16225:
6654 * valprint.h (print_binary_chars, print_hex_chars): Update.
6655 * valprint.c (val_print_type_code_int): Update.
6656 (print_binary_chars): Add "zero_pad" argument.
6657 (emit_octal_digit): New function.
6658 (print_octal_chars): Don't zero-pad.
6659 (print_decimal_chars): Likewise.
6660 (print_hex_chars): Add "zero_pad" argument.
6661 * sh64-tdep.c (sh64_do_fp_register): Update.
6662 * regcache.c (regcache::dump): Update.
6663 * printcmd.c (print_scalar_formatted): Update.
6664 * infcmd.c (default_print_one_register_info): Update.
6665
6666 2017-06-12 Pedro Alves <palves@redhat.com>
6667 Alan Hayward <alan.hayward@arm.com>
6668
6669 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6670 (mips_eabi_push_dummy_call): Rename local 'regsize' to
6671 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
6672 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6673 Assert that abi_regsize bytes fit in 'ref_valbuf'.
6674
6675 2017-06-12 Pedro Alves <palves@redhat.com>
6676
6677 * dwarf2read.c (mapped_symtab::data): Now a vector of
6678 symtab_index_entry instead of vector of
6679 std::unique_ptr<symtab_index_entry>. All users adjusted to check
6680 whether an element's name is NULL instead of checking whether the
6681 element itself is NULL.
6682 (find_slot): Change return type. Adjust.
6683 (hash_expand, , add_index_entry, uniquify_cu_indices)
6684 (write_hash_table): Adjust.
6685
6686 2017-06-12 Pedro Alves <palves@redhat.com>
6687
6688 * dwarf2read.c (recursively_count_psymbols): New function.
6689 (write_psymtabs_to_index): Call it to compute number of psyms and
6690 pass estimate size of psyms_seen to unordered_set's ctor.
6691
6692 2017-06-12 Pedro Alves <palves@redhat.com>
6693
6694 * dwarf2read.c (write_hash_table): Check if key already exists
6695 before emplacing.
6696
6697 2017-06-12 Pedro Alves <palves@redhat.com>
6698
6699 * dwarf2read.c (data_buf::append_space): Rename to...
6700 (data_buf::grow): ... this, and make private. Adjust all callers.
6701 (data_buf::append_uint): New method.
6702 (add_address_entry, write_one_signatured_type)
6703 (write_psymtabs_to_index): Use it.
6704
6705 2017-06-12 Pedro Alves <palves@redhat.com>
6706
6707 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6708 (file_write (FILE *, const std::vector<Elem>&)): Delete.
6709 (data_buf::file_write): Call ::fwrite directly.
6710
6711 2017-06-12 Pedro Alves <palves@redhat.com>
6712
6713 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6714 std::vector::erase.
6715
6716 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6717
6718 Code cleanup: C++ify .gdb_index producer.
6719 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6720 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6721 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6722 (create_strtab, add_string): Remove.
6723 (file_write, data_buf): New.
6724 (struct symtab_index_entry): Use std::vector for cu_indices.
6725 (struct mapped_symtab): Use std::vector for data.
6726 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6727 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6728 Remove.
6729 (find_slot): Change return type. Update it to the new data structures.
6730 (hash_expand, add_index_entry): Update it to the new data structures.
6731 (offset_type_compare): Remove.
6732 (uniquify_cu_indices): Update it to the new data structures.
6733 (c_str_view, c_str_view_hasher, vector_hasher): New.
6734 (add_indices_to_cpool): Remove.
6735 (write_hash_table): Update it to the new data structures.
6736 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6737 (eq_psymtab_cu_index): Remove.
6738 (psym_index_map): New typedef.
6739 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6740 reference and std::unordered_map for cu_index_htab.
6741 (add_address_entry, add_address_entry_worker, write_address_map)
6742 (write_psymbols): Update it to the new data structures.
6743 (write_obstack): Remove.
6744 (struct signatured_type_index_data): Change types_list to a data_buf
6745 reference and psyms_seen to a std::unordered_set reference.
6746 (write_one_signatured_type, recursively_write_psymbols)
6747 (write_psymtabs_to_index): Update it to the new data structures.
6748
6749 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
6750
6751 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6752 separate-debug-file commands.
6753 * symfile.h (separate_debug_file_debug): New global.
6754 * symfile.c (separate_debug_file_debug): New global.
6755 (separate_debug_file_exists, find_separate_debug_file): Add
6756 debug output.
6757 (_initialize_symfile): Add "set debug separate-debug-file"
6758 command.
6759 * build-id.c (build_id_to_debug_bfd,
6760 find_separate_debug_file_by_buildid): Add debug output.
6761
6762 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6763
6764 * gdbarch.sh (displaced_step_free_closure): Remove.
6765 * gdbarch.h, gdbarch.c: Re-generate.
6766 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6767 displaced_step_free_closure.
6768 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6769 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6770 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6771 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6772 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6773 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6774 * arch-utils.h (simple_displaced_step_free_closure): Remove.
6775 * arch-utils.c (simple_displaced_step_free_closure): Remove.
6776 * infrun.c (displaced_step_clear): Call xfree instead of
6777 gdbarch_displaced_step_free_closure.
6778
6779 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
6780
6781 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6782 NULL".
6783
6784 2017-06-08 Alan Hayward <alan.hayward@arm.com>
6785
6786 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6787 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6788 (mn10300_push_dummy_call): Likewise.
6789
6790 2017-06-08 Alan Hayward <alan.hayward@arm.com>
6791
6792 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6793
6794 2017-06-08 Alan Hayward <alan.hayward@arm.com>
6795
6796 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6797
6798 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6799
6800 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6801 able to start inferiors using a shell.
6802 (New remote packets): Announce new packet "QStartupWithShell".
6803 * remote.c: Add PACKET_QStartupWithShell.
6804 (extended_remote_create_inferior): Handle new
6805 PACKET_QStartupWithShell.
6806 (remote_protocol_features) <QStartupWithShell>: New entry for
6807 PACKET_QStartupWithShell.
6808 (_initialize_remote): Call "add_packet_config_cmd" for
6809 QStartupShell.
6810
6811 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6812 Pedro Alves <palves@redhat.com>
6813
6814 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6815 and "nat/fork-inferior.h".
6816 * common/common-inferior.h: New file, with contents from
6817 "gdb/inferior.h".
6818 * commom/common-utils.c: Include "common-utils.h".
6819 (stringify_argv): New function.
6820 * common/common-utils.h (stringify_argv): New prototype.
6821 * configure.nat: Add "fork-inferior.o" as a dependency for
6822 "*linux*", "fbsd*" and "nbsd*" hosts.
6823 * corefile.c (get_exec_file): Update comment.
6824 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6825 instead of "startup_inferior".
6826 (darwin_create_inferior): Call "add_thread_silent" after
6827 "fork_inferior".
6828 * fork-child.c: Cleanup unnecessary includes.
6829 (SHELL_FILE): Move to "common/common-fork-child.c".
6830 (environ): Likewise.
6831 (exec_wrapper): Initialize.
6832 (get_exec_wrapper): New function.
6833 (breakup_args): Move to "common/common-fork-child.c"; rename to
6834 "breakup_args_for_exec".
6835 (escape_bang_in_quoted_argument): Move to
6836 "common/common-fork-child.c".
6837 (saved_ui): New variable.
6838 (prefork_hook): New function.
6839 (postfork_hook): Likewise.
6840 (postfork_child_hook): Likewise.
6841 (gdb_startup_inferior): Likewise.
6842 (fork_inferior): Move to "common/common-fork-child.c". Update
6843 function to support gdbserver.
6844 (startup_inferior): Likewise.
6845 * gdbcore.h (get_exec_file): Remove declaration.
6846 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6847 instead of "startup_inferior". Call "add_thread_silent" after
6848 "fork_inferior".
6849 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6850 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6851 instead of "startup_inferior". Call "add_thread_silent" after
6852 "fork_inferior".
6853 * inferior.h: Include "common-inferior.h".
6854 (trace_start_error): Move to "common/common-utils.h".
6855 (trace_start_error_with_name): Likewise.
6856 (fork_inferior): Move prototype to "nat/fork-inferior.h".
6857 (startup_inferior): Likewise.
6858 (gdb_startup_inferior): New prototype.
6859 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6860 * nat/fork-inferior.h: New file.
6861 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6862 instead of "startup_inferior". Call "add_thread_silent" after
6863 "fork_inferior".
6864 * target.h (target_terminal_init): Move prototype to
6865 "target/target.h".
6866 (target_terminal_inferior): Likewise.
6867 (target_terminal_ours): Likewise.
6868 * target/target.h (target_terminal_init): New prototype, moved
6869 from "target.h".
6870 (target_terminal_inferior): Likewise.
6871 (target_terminal_ours): Likewise.
6872 * utils.c (gdb_flush_out_err): New function.
6873
6874 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6875
6876 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6877 * common/common-gdbthread.h: New file, with parts from
6878 "gdb/gdbthread.h".
6879 * gdbthread.h: Include "common-gdbthread.h".
6880 (switch_to_thread): Moved to "common/common-gdbthread.h".
6881
6882 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6883
6884 * Makefile.in (SFILES): Add "common/job-control.c".
6885 (HFILES_NO_SRCDIR): Add "common/job-control.h".
6886 (COMMON_OBS): Add "job-control.o".
6887 * common/job-control.c: New file, with contents from
6888 "gdb/inflow.c".
6889 * common/job-control.h: New file, with contents from "terminal.h".
6890 * fork-child.c: Include "job-control.h".
6891 * inflow.c: Include "job-control.h".
6892 (gdb_setpgid): Move to "common/common-inflow.c".
6893 (_initialize_inflow): Move setting of "job_control" to
6894 "handle_job_control".
6895 * terminal.h (job_control): Moved to "common/common-terminal.h".
6896 (gdb_setpgid): Likewise.
6897 * top.c: Include "job_control.h".
6898 * utils.c: Likewise.
6899 (job_control): Moved to "job-control.c".
6900
6901 2017-06-07 Pedro Alves <palves@redhat.com>
6902
6903 * Makefile.in (SFILES): Add gdb_regex.c.
6904 (COMMON_OBS): Add gdb_regex.o.
6905 * ada-lang.c (ada_add_standard_exceptions)
6906 (ada_add_exceptions_from_frame, name_matches_regex)
6907 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6908 parameter type to compiled_regex. Adjust.
6909 (ada_exceptions_list): Use compiled_regex.
6910 * break-catch-throw.c (exception_catchpoint::pattern): Now a
6911 std::unique_ptr<compiled_regex>.
6912 (exception_catchpoint::~exception_catchpoint): Remove regfree
6913 call.
6914 (check_status_exception_catchpoint): Adjust to use compiled_regex.
6915 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6916 * breakpoint.c (solib_catchpoint::compiled): Now a
6917 std::unique_ptr<compiled_regex>.
6918 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6919 (check_status_catch_solib): Adjust to use compiled_regex.
6920 (add_solib_catchpoint): Adjust to use compiled_regex.
6921 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6922 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6923 compiled_regex reference. Adjust to use it.
6924 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6925 declaration. Include "gdb_regex.h".
6926 (apropos_cmd): Change regex parameter to compiled_regex reference.
6927 * gdb_regex.c: New file.
6928 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6929 declarations.
6930 (class compiled_regex): New.
6931 * linux-tdep.c: Include "common/gdb_optional.h".
6932 (struct mapping_regexes): New, factored out from
6933 mapping_is_anonymous_p, and adjusted to use compiled_regex.
6934 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6935 gdb::optional and remove cleanups. Adjust to compiled_regex.
6936 * probe.c: Include "common/gdb_optional.h".
6937 (collect_probes): Use compiled_regex and gdb::optional and remove
6938 cleanups.
6939 * skip.c: Include "common/gdb_optional.h".
6940 (skiplist_entry::compiled_function_regexp): Now a
6941 gdb::optional<compiled_regex>.
6942 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6943 (free_skiplist_entry): Remove regfree call.
6944 (compile_skip_regexp, skip_rfunction_p): Adjust to use
6945 compiled_regex and gdb::optional.
6946 * symtab.c: Include "common/gdb_optional.h".
6947 (search_symbols): Use compiled_regex and gdb::optional.
6948 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6949 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
6950 to gdb_regex.c.
6951
6952 2017-06-07 Alan Hayward <alan.hayward@arm.com>
6953
6954 * regcache.c (regcache::save): Avoid buffer use.
6955 (regcache::dump): Likewise.
6956
6957 2017-06-07 Alan Hayward <alan.hayward@arm.com>
6958
6959 * sh-tdep.c (sh_pseudo_register_read): Remove
6960 MAX_REGISTER_SIZE.
6961 (sh_pseudo_register_write): Likewise.
6962 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6963 (sh64_pseudo_register_write): Likewise
6964
6965 2017-06-07 Alan Hayward <alan.hayward@arm.com>
6966
6967 * aarch64-tdep.c (aarch64_store_return_value): Use
6968 V_REGISTER_SIZE.
6969 (aarch64_pseudo_read_value): Likewise.
6970 (aarch64_pseudo_write): Likewise.
6971
6972 2017-06-06 Yao Qi <yao.qi@linaro.org>
6973
6974 * regformats/regdef.h (set_register_cache): Remove the
6975 declaration.
6976
6977 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6978
6979 * frame.c (frame_unwind_register_signed): Use
6980 frame_unwind_register_value.
6981
6982 2017-06-06 Pedro Alves <palves@redhat.com>
6983
6984 PR breakpoints/21553
6985 * breakpoint.c (create_breakpoints_sal_default)
6986 (init_breakpoint_sal, create_breakpoint_sal): Use
6987 gdb::unique_xmalloc_ptr for string parameters.
6988 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6989 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
6990 (base_breakpoint_create_breakpoints_sal)
6991 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6992 (strace_marker_create_breakpoints_sal)
6993 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6994 string parameters.
6995 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6996 gdb::unique_xmalloc_ptr for string parameters.
6997 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6998 parameters.
6999
7000 2017-06-06 Alan Hayward <alan.hayward@arm.com>
7001
7002 * alpha-tdep.c (alpha_register_to_value): Use
7003 get_frame_register_value.
7004 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
7005
7006 2017-06-06 Alan Hayward <alan.hayward@arm.com>
7007
7008 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
7009 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
7010 (ia64_value_to_register): Likewise.
7011 (ia64_extract_return_value): Likewise.
7012 (ia64_store_return_value): Likewise.
7013 (ia64_push_dummy_call): Likewise.
7014
7015 2017-06-04 Joel Brobecker <brobecker@adacore.com>
7016
7017 GDB 8.0 released.
7018
7019 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
7020
7021 * x86-linux-nat.c (struct arch_lwp_info): Remove.
7022
7023 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
7024
7025 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
7026 parameter.
7027 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
7028
7029 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
7030
7031 * event-loop.c (poll_timers): Unallocate timer using delete
7032 instead of xfree.
7033
7034 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7035
7036 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
7037 (struct breakpoint) <~breakpoint>: New.
7038 (struct watchpoint): Inherit from breakpoint.
7039 <~watchpoint>: New.
7040 <base>: Remove.
7041 (struct tracepoint): Inherit from breakpoint.
7042 <base>: Remove.
7043 * breakpoint.c (longjmp_breakpoint_ops): Remove.
7044 (struct longjmp_breakpoint): Inherit from breakpoint.
7045 <~longjmp_breakpoint>: New.
7046 <base>: Remove.
7047 (new_breakpoint_from_type): Remove casts.
7048 (watchpoint_in_thread_scope): Remove reference to base field.
7049 (watchpoint_del_at_next_stop): Likewise.
7050 (update_watchpoint): Likewise.
7051 (watchpoint_check): Likewise.
7052 (bpstat_check_watchpoint): Likewise.
7053 (set_longjmp_breakpoint): Likewise.
7054 (struct fork_catchpoint): Inherit from breakpoint.
7055 <base>: Remove.
7056 (struct solib_catchpoint): Inherit from breakpoint.
7057 <~solib_catchpoint>: New.
7058 <base>: Remove.
7059 (dtor_catch_solib): Change to ...
7060 (solib_catchpoint::~solib_catchpoint): ... this.
7061 (breakpoint_hit_catch_solib): Remove reference to base field.
7062 (add_solib_catchpoint): Likewise.
7063 (create_fork_vfork_event_catchpoint): Likewise.
7064 (struct exec_catchpoint): Inherit from breakpoint.
7065 <~exec_catchpoint>: New.
7066 <base>: Remove.
7067 (dtor_catch_exec): Change to ...
7068 (exec_catchpoint::~exec_catchpoint): ... this.
7069 (dtor_watchpoint): Change to ...
7070 (watchpoint::~watchpoint): ... this.
7071 (watch_command_1): Remove reference to base field.
7072 (catch_exec_command_1): Likewise.
7073 (base_breakpoint_dtor): Change to ...
7074 (breakpoint::~breakpoint): ... this.
7075 (base_breakpoint_ops): Remove dtor field value.
7076 (longjmp_bkpt_dtor): Change to ...
7077 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
7078 (strace_marker_create_breakpoints_sal): Remove reference to base
7079 field.
7080 (delete_breakpoint): Don't manually call breakpoint destructor.
7081 (create_tracepoint_from_upload): Remove reference to base field.
7082 (trace_pass_set_count): Likewise.
7083 (initialize_breakpoint_ops): Don't initialize
7084 momentary_breakpoint_ops, don't set dtors.
7085 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
7086 <~ada_catchpoint>: New.
7087 <base>: Remove.
7088 (create_excep_cond_exprs): Remove reference to base field.
7089 (dtor_exception): Change to ...
7090 (ada_catchpoint::~ada_catchpoint): ... this.
7091 (dtor_catch_exception): Remove.
7092 (dtor_catch_exception_unhandled): Remove.
7093 (dtor_catch_assert): Remove.
7094 (create_ada_exception_catchpoint): Remove reference to base
7095 field.
7096 (initialize_ada_catchpoint_ops): Don't set dtors.
7097 * break-catch-sig.c (struct signal_catchpoint): Inherit from
7098 breakpoint.
7099 <~signal_catchpoint>: New.
7100 <base>: Remove.
7101 (signal_catchpoint_dtor): Change to ...
7102 (signal_catchpoint::~signal_catchpoint): ... this.
7103 (create_signal_catchpoint): Remove reference to base field.
7104 (initialize_signal_catchpoint_ops): Don't set dtor.
7105 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
7106 from breakpoint.
7107 <~syscall_catchpoint>: New.
7108 <base>: Remove.
7109 (dtor_catch_syscall): Change to ...
7110 (syscall_catchpoint::~syscall_catchpoint): ... this.
7111 (create_syscall_event_catchpoint): Remove reference to base
7112 field.
7113 (initialize_syscall_catchpoint_ops): Don't set dtor.
7114 * break-catch-throw.c (struct exception_catchpoint): Inherit
7115 from breakpoint.
7116 <~exception_catchpoint>: New.
7117 <base>: Remove.
7118 (dtor_exception_catchpoint): Change to ...
7119 (exception_catchpoint::~exception_catchpoint): ... this.
7120 (handle_gnu_v3_exceptions): Remove reference to base field.
7121 (initialize_throw_catchpoint_ops): Don't set dtor.
7122 * ctf.c (ctf_get_traceframe_address): Remove reference to base
7123 field.
7124 * remote.c (remote_get_tracepoint_status): Likewise.
7125 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
7126 * tracefile.c (tracefile_fetch_registers): Likewise.
7127 * tracepoint.c (actions_command): Likewise.
7128 (validate_actionline): Likewise.
7129 (tfind_1): Likewise.
7130 (get_traceframe_location): Likewise.
7131 (find_matching_tracepoint_location): Likewise.
7132 (parse_tracepoint_status): Likewise.
7133 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
7134
7135 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7136
7137 * breakpoint.c (struct longjmp_breakpoint): New struct.
7138 (is_tracepoint_type): Change return type to bool.
7139 (is_longjmp_type): New function.
7140 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
7141 (set_raw_breakpoint_without_location): Use
7142 new_breakpoint_from_type.
7143 (set_raw_breakpoint): Likewise.
7144
7145 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7146
7147 * breakpoint.c (new_breakpoint_from_type): New function.
7148 (create_breakpoint_sal): Use new_breakpoint_from_type and
7149 unique_ptr.
7150 (create_breakpoint): Likewise.
7151
7152 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
7153
7154 * memattr.c (mem_info_command): Rename to ...
7155 (info_mem_command): ... this.
7156 (mem_enable_command): Rename to ...
7157 (enable_mem_command): ... this.
7158 (mem_disable_command): Rename to ...
7159 (disable_mem_command): ... this.
7160 (mem_delete_command): Rename to ...
7161 (delete_mem_command): ... this.
7162 (_initialize_mem): Adjust function names.
7163
7164 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
7165
7166 * btrace.c (handle_pt_insn_events): New.
7167 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
7168 STATUS. Split into this and ...
7169 (handle_pt_insn_event_flags): ... this.
7170
7171 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
7172
7173 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7174 and struct pt_insn.resynced.
7175 * configure: Regenerated.
7176 * config.in: Regenerated.
7177
7178 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7179
7180 * btrace.c (ftrace_find_call_by_number): New function.
7181 (ftrace_new_function): Store objects, not pointers.
7182 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7183 ftrace_new_gap, ftrace_update_function,
7184 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7185 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7186 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7187 btrace_ends_with_single_insn, btrace_call_get): Account for
7188 btrace_thread_info::functions now storing objects.
7189 * btrace.h (struct btrace_thread_info): Add constructor.
7190 (struct btrace_thread_info) <functions>: Make std::vector.
7191 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7192 Initialize with default values.
7193 * record-btrace.c (record_btrace_frame_sniffer): Account for
7194 btrace_thread_info::functions now storing objects.
7195
7196 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7197
7198 * btrace.c: Remove typedef bfun_s.
7199 (ftrace_new_gap): Directly add gaps to the list of gaps.
7200 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7201 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7202 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7203 instead of gdb VEC.
7204
7205 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7206
7207 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7208 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7209 with btrace_thread_info::next_segment and
7210 btrace_thread_info::prev_segment.
7211 * btrace.h: Remove struct btrace_func_link.
7212 (struct btrace_function): Replace pair of function segment pointers
7213 with pair of indices.
7214 * python/py-record-btrace.c (btpy_call_prev_sibling,
7215 btpy_call_next_sibling): Replace references to
7216 btrace_thread_info::segment with btrace_thread_info::next_segment and
7217 btrace_thread_info::prev_segment.
7218 * record-btrace.c (record_btrace_frame_this_id): Use
7219 btrace_find_call_by_number.
7220
7221 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7222
7223 * btrace.c (ftrace_new_function, ftrace_fixup_level,
7224 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7225 btrace_insn_next, btrace_insn_prev): Remove references to
7226 btrace_thread_info::flow.
7227 * btrace.h (struct btrace_function): Remove FLOW.
7228
7229 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7230
7231 * btrace.c (ftrace_find_call_by_number): New function.
7232 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7233 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7234 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7235 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7236 index.
7237 * btrace.h (struct btrace_function): Turn UP into an index.
7238 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7239 as an index.
7240 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7241 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7242 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7243
7244 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7245
7246 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7247 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7248 ftrace_update_function, ftrace_compute_global_level_offset,
7249 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7250 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7251 btrace_insn_end, btrace_is_empty): Remove references to
7252 btrace_thread_info::begin and btrace_thread_info::end.
7253 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7254 (struct btrace_thread_info) <functions>: Adjust comment.
7255 * record-btrace.c (record_btrace_start_replaying): Remove reference to
7256 btrace_thread_info::begin.
7257
7258 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7259
7260 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7261 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7262 ftrace_update_function): Remove arguments that implicitly were always
7263 BTINFO->END.
7264 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7265 Don't pass BTINFO->END.
7266
7267 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7268
7269 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7270 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7271 btrace_find_insn_by_number): Replace function segment pointer with
7272 index.
7273 (btrace_insn_cmp): Simplify.
7274 * btrace.h: (struct btrace_insn_iterator) Rename index to
7275 insn_index. Replace function segment pointer with index into function
7276 segment vector.
7277 * record-btrace.c (record_btrace_call_history): Replace function
7278 segment pointer use with index.
7279 (record_btrace_frame_sniffer): Retrieve function call segment through
7280 vector.
7281 (record_btrace_set_replay): Remove defunc't safety check.
7282
7283 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7284
7285 * btrace.c (btrace_ends_with_single_insn): New function.
7286 (btrace_call_get, btrace_call_number, btrace_call_begin,
7287 btrace_call_end, btrace_call_next, btrace_call_prev,
7288 btrace_find_call_by_number): Use index into call segment vector
7289 instead of pointer.
7290 (btrace_call_cmp): Simplify.
7291 * btrace.h (struct btrace_call_iterator): Replace function call segment
7292 pointer with index into vector.
7293 * record-btrace.c (record_btrace_call_history): Use index instead of
7294 pointer.
7295
7296 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7297
7298 * btrace.c (btrace_insn_begin, btrace_insn_end,
7299 btrace_find_insn_by_number): Add btinfo to iterator.
7300 * btrace.h (struct btrace_insn_iterator): Add btinfo.
7301
7302 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7303
7304 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7305 and save pointers directly.
7306 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7307 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7308 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
7309 changed signature of functions.
7310 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7311 (btrace_fetch): Remove code that adds btrace_function pointers to
7312 vector of btrace_functions.
7313 (btrace_clear): Simplify freeing vector of btrace_functions.
7314
7315 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7316
7317 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7318 Replace VEC_* with std::vector functions.
7319 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7320 (struct btrace_thread_info)<functions>: Change type to std::vector.
7321
7322 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
7323
7324 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
7325 "Removed targets and native configurations" up. Merge duplicate
7326 "New commands" sub-sections. Add "New options" sub-sections.
7327
7328 2017-05-26 Alan Hayward <alan.hayward@arm.com>
7329
7330 * defs.h (copy_integer_to_size): New declaration.
7331 * findvar.c (copy_integer_to_size): New function.
7332 (do_cint_test): New selftest function.
7333 (copy_integer_to_size_test): Likewise.
7334 (_initialize_findvar): Likewise.
7335 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7336 (mips_fbsd_collect_reg): Use raw_collect_integer.
7337 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7338 (mips64_fill_gregset): Use raw_collect_integer
7339 (mips64_fill_fpregset): Use raw_supply_integer.
7340 * regcache.c (regcache::raw_supply_integer): New function.
7341 (regcache::raw_collect_integer): Likewise.
7342 * regcache.h: (regcache::raw_supply_integer): New declaration.
7343 (regcache::raw_collect_integer): Likewise.
7344
7345 2017-05-24 Yao Qi <yao.qi@linaro.org>
7346
7347 * Makefile.in (SFILES): Add gdbarch-selftests.c.
7348 (COMMON_OBS): Add gdbarch-selftests.o.
7349 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7350 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7351 * gdbarch-selftests.c: New file.
7352 * regcache.h (regcache) <~regcache>: Mark it virtual if
7353 GDB_SELF_TEST.
7354 <raw_write>: Likewise.
7355
7356 2017-05-24 Yao Qi <yao.qi@linaro.org>
7357
7358 * regcache.c (current_regcache): Change it to
7359 regcache::current_regcache.
7360 (regcache_observer_target_changed): Update.
7361 (regcache_thread_ptid_changed): Make it a regcache static
7362 method.
7363 (regcache_thread_ptid_changed): Update.
7364 (class regcache_access): New.
7365 (current_regcache_test): Update.
7366 (_initialize_regcache): Update.
7367 * regcache.h: Include forward_list.
7368 (regcache): Declare regcache_thread_ptid_changed and declare
7369 registers_changed_ptid as friend.
7370
7371 2017-05-24 Yao Qi <yao.qi@linaro.org>
7372
7373 * i387-tdep.c (i387_register_to_value): Use register_size
7374 instead of TYPE_LENGTH.
7375 * m68k-tdep.c (m68k_register_to_value): Likewise.
7376
7377 2017-05-24 Yao Qi <yao.qi@linaro.org>
7378
7379 * i387-tdep.c (i387_convert_register_p): Return false if type
7380 code isn't TYPE_CODE_FLT.
7381
7382 2017-05-24 Yao Qi <yao.qi@linaro.org>
7383
7384 * alpha-tdep.c (alpha_convert_register_p): Return true if type
7385 length is 4.
7386 (alpha_register_to_value): Remove type length check.
7387 (alpha_value_to_register): Likewise.
7388
7389 2017-05-24 Yao Qi <yao.qi@linaro.org>
7390
7391 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7392 TYPE_CODE_FLT.
7393
7394 2017-05-24 Yao Qi <yao.qi@linaro.org>
7395
7396 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7397 TYPE_CODE_FLT or not.
7398
7399 2017-05-24 Yao Qi <yao.qi@linaro.org>
7400
7401 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7402 * avr-tdep.c (avr_gdbarch_init): Likewise.
7403 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7404 * cris-tdep.c (cris_gdbarch_init): Likewise.
7405 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7406 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7407 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7408 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7409 * mep-tdep.c (mep_gdbarch_init): Likewise.
7410 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7411 * mips-tdep.c (mips_gdbarch_init): Likewise.
7412 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7413 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7414 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7415 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7416 * v850-tdep.c (v850_gdbarch_init): Likewise.
7417
7418 2017-05-24 Yao Qi <yao.qi@linaro.org>
7419
7420 * selftest-arch.c (tests_with_arch): Call registers_changed
7421 and reinit_frame_cache.
7422 * selftest.c (run_self_tests): Likewise.
7423
7424 2017-05-24 Yao Qi <yao.qi@linaro.org>
7425
7426 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7427 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7428
7429 2017-05-24 Yao Qi <yao.qi@linaro.org>
7430
7431 * rl78-tdep.c (rl78_gdbarch_init): Don't call
7432 set_gdbarch_print_insn.
7433
7434 2017-05-24 Yao Qi <yao.qi@linaro.org>
7435
7436 * h8300-tdep.c (h8300_gdbarch_init): Don't call
7437 set_gdbarch_print_insn.
7438
7439 2017-05-24 Yao Qi <yao.qi@linaro.org>
7440
7441 * alpha-tdep.c (alpha_gdbarch_init): Don't call
7442 set_gdbarch_print_insn.
7443 * arc-tdep.c (arc_gdbarch_init): Likewise.
7444 * arch-utils.c: include dis-asm.h.
7445 (default_print_insn): New function.
7446 * arch-utils.h (default_print_insn): Declare.
7447 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7448 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7449 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7450 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7451 * frv-tdep.c (frv_gdbarch_init): Likewise.
7452 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7453 * gdbarch.sh (print_insn): Use default_print_insn.
7454 * gdbarch.c: Regenerated.
7455 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7456 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7457 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7458 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7459 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7460 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7461 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7462 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7463 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7464 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7465 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7466 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7467 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7468 * mt-tdep.c (mt_gdbarch_init): Likewise.
7469 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7470 * nios2-tdep.c (nios2_print_insn): Remove.
7471 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7472 * rx-tdep.c (rx_gdbarch_init): Likewise.
7473 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7474 * score-tdep.c (score_print_insn): Remove.
7475 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7476 * sh-tdep.c (sh_gdbarch_init): Likewise.
7477 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7478 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7479 * tic6x-tdep.c (tic6x_print_insn): Remove.
7480 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7481 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7482 * v850-tdep.c (v850_gdbarch_init): Likewise.
7483 * vax-tdep.c (vax_gdbarch_init): Likewise.
7484 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7485 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7486
7487 2017-05-23 John Baldwin <jhb@FreeBSD.org>
7488
7489 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7490 (MIPS_FP0_REGNUM): Remove.
7491 (MIPS_FSR_REGNUM): Remove.
7492 (mips_fbsd_supply_fpregs): Use mips_regnum.
7493 (mips_fbsd_supply_gregs): Likewise.
7494 (mips_fbsd_collect_fpregs): Likewise.
7495 (mips_fbsd_collect_gregs): Likewise.
7496
7497 2017-05-23 John Baldwin <jhb@FreeBSD.org>
7498
7499 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7500 (getpfpregs_supplies): New function.
7501 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7502 getfpregs_supplies.
7503 (mips_fbsd_store_inferior_registers): Likewise.
7504
7505 2017-05-22 Pedro Alves <palves@redhat.com>
7506
7507 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7508 maintainer.
7509
7510 2017-05-22 Alan Hayward <alan.hayward@arm.com>
7511
7512 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7513 (store_register): Likewise.
7514 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7515 (get_decimal_float_return_value): Likewise.
7516 (do_ppc_sysv_return_value): Likewise.
7517 (ppc64_sysv_abi_push_integer): Likewise.
7518 (ppc64_sysv_abi_push_freg): Likewise.
7519 (ppc64_sysv_abi_return_value_base): Likewise.
7520 (ppc64_sysv_abi_return_value): Likewise.
7521 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7522 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7523 * rs6000-nat.c: Likewise.
7524 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7525 (rs6000_value_to_register): Likewise.
7526 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7527
7528 2017-05-21 Tom Tromey <tom@tromey.com>
7529
7530 PR rust/21466:
7531 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7532 arrays as "[T]", not "[T; ]".
7533
7534 2017-05-19 Tom Tromey <tom@tromey.com>
7535
7536 PR rust/21484:
7537 * rust-lang.c (exp_descriptor_rust): New function.
7538 (rust_language_defn): Use it.
7539 * p-lang.c (pascal_language_defn): Update.
7540 * opencl-lang.c (opencl_language_defn): Update.
7541 * objc-lang.c (objc_language_defn): Update.
7542 * m2-lang.c (m2_language_defn): Update.
7543 * language.h (struct language_defn)
7544 <la_watch_location_expression>: New member.
7545 * language.c (unknown_language_defn, auto_language_defn)
7546 (local_language_defn): Update.
7547 * go-lang.c (go_language_defn): Update.
7548 * f-lang.c (f_language_defn): Update.
7549 * d-lang.c (d_language_defn): Update.
7550 * c-lang.h (c_watch_location_expression): Declare.
7551 * c-lang.c (c_watch_location_expression): New function.
7552 (c_language_defn, cplus_language_defn, asm_language_defn)
7553 (minimal_language_defn): Use it.
7554 * breakpoint.c (watch_command_1): Call
7555 la_watch_location_expression.
7556 * ada-lang.c (ada_language_defn): Update.
7557
7558 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7559
7560 PR tui/21482
7561 * gdb_curses.h (NOMACROS): Define.
7562 (NCURSES_NOMACROS): Define.
7563
7564 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7565
7566 PR tui/21482
7567 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7568 arg to char *.
7569 * tui/tui-wingeneral.c (box_win): Likewise.
7570 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7571 (tui_show_source_line): Likewise.
7572 (tui_show_exec_info_content): Likewise.
7573
7574 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7575
7576 * sparc-tdep.c (sparc_structure_return_p)
7577 (sparc_arg_on_registers_p): New functions.
7578 (sparc32_store_arguments): Use them.
7579 * sparc64-tdep.c (sparc64_16_byte_align_p)
7580 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7581 Handle TYPE_CODE_ARRAY.
7582
7583 2017-05-17 Yao Qi <yao.qi@linaro.org>
7584
7585 * cli/cli-decode.c (add_alias_cmd): New function.
7586 * command.h (add_alias_cmd): Declare.
7587 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7588 instead call add_alias_cmd.
7589
7590 2017-05-17 Pedro Alves <palves@redhat.com>
7591
7592 * Makefile.in (nat_extra_makefile_frag): Rename to ...
7593 (nat_makefile_frag): ... this. All references updated.
7594 * configure.ac: Likewise.
7595 * configure.nat: Likewise. Enhance comments.
7596 * configure: Regenerate.
7597
7598 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7599
7600 * procfs.c (procfs_create_inferior): Change prototype to match
7601 definition.
7602
7603 2017-05-13 Eli Zaretskii <eliz@gnu.org>
7604
7605 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7606 C++ compiler warning.
7607
7608 2017-05-12 Tom Tromey <tom@tromey.com>
7609
7610 PR rust/21483:
7611 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7612 recurse, just call value_struct_elt directly.
7613
7614 2017-05-12 Tom Tromey <tom@tromey.com>
7615
7616 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7617 OP_RUST_ARRAY>: Fix.
7618
7619 2017-05-12 Tom Tromey <tom@tromey.com>
7620
7621 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7622
7623 2017-05-09 Yao Qi <yao.qi@linaro.org>
7624
7625 * regcache.c: Include <forward_list>.
7626 (struct regcache_list): Remove.
7627 (current_regcache): Update.
7628 (get_thread_arch_aspace_regcache): Update for std::forward_list.
7629 (regcache_thread_ptid_changed): Likewise.
7630 (registers_changed_ptid): Likewise.
7631 (current_regcache_size): Likewise.
7632
7633 2017-05-09 Yao Qi <yao.qi@linaro.org>
7634
7635 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7636 (current_regcache_size): New function.
7637 (current_regcache_test): New function.
7638 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7639
7640 2017-05-08 Alan Hayward <alan.hayward@arm.com>
7641
7642 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7643 (print_gp_register_row): Use get_frame_register_value.
7644
7645 2017-05-08 Alan Hayward <alan.hayward@arm.com>
7646
7647 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7648 (mips_supply_fpregset): Likewise.
7649 (mips64_supply_gregset): Likewise.
7650
7651 2017-05-08 Alan Hayward <alan.hayward@arm.com>
7652
7653 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
7654 regcache->raw_supply_zeroed.
7655
7656 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7657
7658 * configure.nat: Rearrange 'case' statements to match
7659 host before cpu.
7660
7661 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7662
7663 * Makefile.in: Remove "@host_makefile_frag@". Add variables
7664 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7665 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
7666 "@nat_extra_makefile_frag@".
7667 (Makefile): Remove dependency on "@frags@".
7668 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7669 (data-directory/Makefile): Likewise.
7670 * config/aarch64/linux.mh: Deleted; moved contents to
7671 "gdb/configure.nat".
7672 * config/alpha/alpha-linux.mh: Likewise.
7673 * config/alpha/nbsd.mh: Likewise.
7674 * config/arm/linux.mh: Likewise.
7675 * config/arm/nbsdelf.mh: Likewise.
7676 * config/i386/cygwin.mh: Likewise.
7677 * config/i386/cygwin64.mh: Likewise.
7678 * config/i386/darwin.mh: Likewise.
7679 * config/i386/fbsd.mh: Likewise.
7680 * config/i386/fbsd64.mh: Likewise.
7681 * config/i386/go32.mh: Likewise.
7682 * config/i386/i386gnu.mh: Likewise.
7683 * config/i386/i386sol2.mh: Likewise.
7684 * config/i386/linux.mh: Likewise.
7685 * config/i386/linux64.mh: Likewise.
7686 * config/i386/mingw.mh: Likewise.
7687 * config/i386/mingw64.mh: Likewise.
7688 * config/i386/nbsd64.mh: Likewise.
7689 * config/i386/nbsdelf.mh: Likewise.
7690 * config/i386/nto.mh: Likewise.
7691 * config/i386/obsd.mh: Likewise.
7692 * config/i386/obsd64.mh: Likewise.
7693 * config/i386/sol2-64.mh: Likewise.
7694 * config/ia64/linux.mh: Likewise.
7695 * config/m32r/linux.mh: Likewise.
7696 * config/m68k/linux.mh: Likewise.
7697 * config/m68k/nbsdelf.mh: Likewise.
7698 * config/m68k/obsd.mh: Likewise.
7699 * config/m88k/obsd.mh: Likewise.
7700 * config/mips/fbsd.mh: Likewise.
7701 * config/mips/linux.mh: Likewise.
7702 * config/mips/nbsd.mh: Likewise.
7703 * config/mips/obsd64.mh: Likewise.
7704 * config/pa/linux.mh: Likewise.
7705 * config/pa/nbsd.mh: Likewise.
7706 * config/pa/obsd.mh: Likewise.
7707 * config/powerpc/aix.mh: Likewise.
7708 * config/powerpc/fbsd.mh: Likewise.
7709 * config/powerpc/linux.mh: Likewise.
7710 * config/powerpc/nbsd.mh: Likewise.
7711 * config/powerpc/obsd.mh: Likewise.
7712 * config/powerpc/ppc64-linux.mh: Likewise.
7713 * config/powerpc/spu-linux.mh: Likewise.
7714 * config/s390/linux.mh: Likewise.
7715 * config/sh/nbsd.mh: Likewise.
7716 * config/sparc/fbsd.mh: Likewise.
7717 * config/sparc/linux.mh: Likewise.
7718 * config/sparc/linux64.mh: Likewise.
7719 * config/sparc/nbsd64.mh: Likewise.
7720 * config/sparc/nbsdelf.mh: Likewise.
7721 * config/sparc/obsd64.mh: Likewise.
7722 * config/sparc/sol2.mh: Likewise.
7723 * config/tilegx/linux.mh: Likewise.
7724 * config/vax/nbsdelf.mh: Likewise.
7725 * config/vax/obsd.mh: Likewise.
7726 * config/xtensa/linux.mh: Likewise.
7727 * config/i386/i386gnu.mn: New file, with excerpts from
7728 "config/i386/i386gnu.mh".
7729 * configure: Regenerate.
7730 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7731 *.mh files under "gdb/config".
7732 * configure.nat: New file, with contents from the
7733 "gdb/config/*/*.mh" files.
7734
7735 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
7736
7737 * btrace.c (btrace_clear): Free insn vector.
7738
7739 2017-05-05 Pedro Alves <palves@redhat.com>
7740
7741 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7742 * configure: Regenerate.
7743
7744 2017-05-04 Pedro Alves <palves@redhat.com>
7745
7746 * Makefile.in (SFILES): Add progspace-and-thread.c.
7747 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7748 (COMMON_OBS): Add progspace-and-thread.o.
7749 * breakpoint.c: Include "progspace-and-thread.h".
7750 (update_inserted_breakpoint_locations)
7751 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7752 Use scoped_restore_current_pspace_and_thread.
7753 (create_std_terminate_master_breakpoint): Use
7754 scoped_restore_current_program_space.
7755 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7756 (print_breakpoint_location): Use
7757 scoped_restore_current_program_space.
7758 (bp_loc_is_permanent): Use
7759 scoped_restore_current_pspace_and_thread.
7760 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7761 (download_tracepoint_locations): Use
7762 scoped_restore_current_pspace_and_thread.
7763 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7764 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7765 (enum step_over_calls_kind): Moved from inferior.h.
7766 (class scoped_restore_current_thread): New class.
7767 * gdbthread.h (make_cleanup_restore_current_thread): Delete
7768 declaration.
7769 (scoped_restore_current_thread): New class.
7770 * infcmd.c: Include "common/gdb_optional.h".
7771 (continue_1, proceed_after_attach): Use
7772 scoped_restore_current_thread.
7773 (notice_new_inferior): Use scoped_restore_current_thread.
7774 * inferior.c: Include "progspace-and-thread.h".
7775 (restore_inferior, save_current_inferior): Delete.
7776 (add_inferior_command, clone_inferior_command): Use
7777 scoped_restore_current_pspace_and_thread.
7778 * inferior.h (scoped_restore_current_inferior): New class.
7779 * infrun.c: Include "progspace-and-thread.h" and
7780 "common/gdb_optional.h".
7781 (follow_fork_inferior): Use
7782 scoped_restore_current_pspace_and_thread.
7783 (scoped_restore_exited_inferior): New class.
7784 (handle_vfork_child_exec_or_exit): Use
7785 scoped_restore_exited_inferior,
7786 scoped_restore_current_pspace_and_thread,
7787 scoped_restore_current_thread and scoped_restore.
7788 (fetch_inferior_event): Use scoped_restore_current_thread.
7789 * linespec.c (decode_line_full, decode_line_1): Use
7790 scoped_restore_current_program_space.
7791 * mi/mi-main.c: Include "progspace-and-thread.h".
7792 (exec_continue): Use scoped_restore_current_thread.
7793 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7794 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7795 * proc-service.c (ps_pglobal_lookup): Use
7796 scoped_restore_current_program_space.
7797 * progspace-and-thread.c: New file.
7798 * progspace-and-thread.h: New file.
7799 * progspace.c (release_program_space, clone_program_space): Use
7800 scoped_restore_current_program_space.
7801 (restore_program_space, save_current_program_space)
7802 (save_current_space_and_thread): Delete.
7803 (switch_to_program_space_and_thread): Moved to
7804 progspace-and-thread.c.
7805 * progspace.h (save_current_program_space)
7806 (save_current_space_and_thread): Delete declarations.
7807 (scoped_restore_current_program_space): New class.
7808 * remote.c (remote_btrace_maybe_reopen): Use
7809 scoped_restore_current_thread.
7810 * symtab.c: Include "progspace-and-thread.h".
7811 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7812 * thread.c (print_thread_info_1): Use
7813 scoped_restore_current_thread.
7814 (struct current_thread_cleanup): Delete.
7815 (do_restore_current_thread_cleanup)
7816 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7817 (scoped_restore_current_thread::~scoped_restore_current_thread):
7818 ... this new dtor.
7819 (make_cleanup_restore_current_thread): Rename/convert to ...
7820 (scoped_restore_current_thread::scoped_restore_current_thread):
7821 ... this new ctor.
7822 (thread_apply_all_command): Use scoped_restore_current_thread.
7823 (thread_apply_command): Use scoped_restore_current_thread.
7824 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7825 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7826
7827 2017-05-04 Pedro Alves <palves@redhat.com>
7828
7829 * thread.c (make_cleanup_restore_current_thread): Move
7830 find_thread_ptid call before the is_stopped call. Assert that the
7831 thread is found. Replace is_stopped call by checking the thread's
7832 state directly. Remove unnecessary NULL-thread check.
7833
7834 2017-05-04 Pedro Alves <palves@redhat.com>
7835
7836 * corelow.c (thread_section_name): New class.
7837 (get_core_register_section, get_core_siginfo): Use it.
7838
7839 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
7840
7841 * corelow.c (sniff_core_bfd): Remove extra semicolon.
7842 (get_core_register_section): Remove xfree of NULL pointer.
7843
7844 2017-05-03 Alan Hayward <alan.hayward@arm.com>
7845
7846 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7847 * regcache.c (regcache::raw_supply_zeroed): New function.
7848 * regcache.h (regcache::raw_supply_zeroed): New declaration.
7849
7850 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
7851
7852 * gdbarch.sh: Remove commented out definition of
7853 TARGET_CHAR_BIT.
7854 * gdbarch.h: Re-generate.
7855
7856 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7857
7858 * configure: Regenerate.
7859
7860 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
7861
7862 * solib-target.c (solib_target_relocate_section_addresses):
7863 Remove num_section_bases, num_bases, segment_bases variables.
7864
7865 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7866
7867 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7868
7869 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7870
7871 * solib-target.c: Include <vector>
7872 (struct lm_info_target) <~lm_info_target>: Remove.
7873 <segment_bases, section_bases>: Change type to
7874 std::vector<CORE_ADDR>.
7875 (library_list_start_segment, library_list_start_section,
7876 library_list_end_library,
7877 solib_target_relocate_section_addresses): Adjust.
7878
7879 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7880
7881 * gdbarch.sh (software_single_step): Change return type to
7882 std::vector<CORE_ADDR>.
7883 * gdbarch.c, gdbarch.h: Re-generate.
7884 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7885 Adjust.
7886 (arm_deal_with_atomic_sequence_raw): Adjust.
7887 (thumb_get_next_pcs_raw): Adjust.
7888 (arm_get_next_pcs_raw): Adjust.
7889 (arm_get_next_pcs): Adjust.
7890 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7891 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7892 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7893 (alpha_software_single_step): Adjust.
7894 * alpha-tdep.h (alpha_software_single_step): Adjust.
7895 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7896 * arm-tdep.c (arm_software_single_step): Adjust.
7897 (arm_breakpoint_kind_from_current_state): Adjust.
7898 * arm-tdep.h (arm_software_single_step): Adjust.
7899 * breakpoint.c (insert_single_step_breakpoint): Adjust.
7900 * cris-tdep.c (cris_software_single_step): Adjust.
7901 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7902 (micromips_deal_with_atomic_sequence): Adjust.
7903 (deal_with_atomic_sequence): Adjust.
7904 (mips_software_single_step): Adjust.
7905 * mips-tdep.h (mips_software_single_step): Adjust.
7906 * moxie-tdep.c (moxie_software_single_step): Adjust.
7907 * nios2-tdep.c (nios2_software_single_step): Adjust.
7908 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7909 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7910 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7911 * s390-linux-tdep.c (s390_software_single_step): Adjust.
7912 * sparc-tdep.c (sparc_software_single_step): Adjust.
7913 * spu-tdep.c (spu_software_single_step): Adjust.
7914 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7915
7916 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7917
7918 * gdbarch.sh: Use semi-colon as field separator instead of colon.
7919 * gdbarch.h: Re-generate.
7920
7921 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7922
7923 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7924 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7925 * python/py-instruction.c, python/py-instruction.h: New file.
7926 * python/py-record.c: Add py-instruction.h include.
7927 (gdbpy_initialize_record): Make gdb.Instruction a super class of
7928 gdb.RecordInstruction.
7929 * python/python-internal.h: Add gdbpy_initialize_instruction
7930 declaration.
7931 * python/python.c (do_start_initialization): Add
7932 gdbpy_initialize_instruction.
7933
7934 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7935
7936 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7937 Remove.
7938 (btrace_func_from_recpy_func): New function.
7939 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7940 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7941 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7942 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7943 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7944 Also, use new helper functions.
7945 (btpy_list_item): Use new helper functions.
7946 (recpy_bt_function_call_history): Use new type name.
7947 (btpy_call_getset): Remove.
7948 (gdbpy_initialize_btrace): Remove code to initialize
7949 gdb.BtraceFunctionCall.
7950 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7951 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7952 recpy_bt_func_prev, recpy_bt_func_next): New export.
7953 * python/py-record.c (recpy_func_type): New static object.
7954 (recpy_func_new, recpy_func_level, recpy_func_symbol,
7955 recpy_func_instructions, recpy_func_up, recpy_func_prev,
7956 recpy_func_next): New function.
7957 (recpy_element_hash, recpy_element_richcompare): Updated comment.
7958 (recpy_func_getset): New static object.
7959 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7960 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7961
7962 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7963
7964 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7965 (btpy_object, btpy_insn_type, btpy_new): Remove.
7966 (btpy_list_object): Use gdb.RecordInstruction type instead of
7967 gdb.BtraceInstruction type.
7968 (btrace_insn_from_recpy_insn): New function.
7969 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7970 btpy_new.
7971 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7972 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7973 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7974 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7975 instead of btpy_object.
7976 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7977 btpy_insn_data, btpy_insn_decode): Rename to ...
7978 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7979 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7980 recpy_bt_insn_decode): This. Also, use new helper functions.
7981 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7982 recpy_insn_type.
7983 (btpy_insn_getset): Remove.
7984 (gdbpy_initialize_btrace): Remove code to initialize
7985 gdb.BtraceInstruction. Use recpy_element_object.
7986 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7987 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7988 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7989 * python/py-record.c (recpy_insn_type): New static object.
7990 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7991 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7992 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7993 New function.
7994 (recpy_insn_getset): New static object.
7995 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7996 * python/py-record.h (recpy_element_object): New typedef.
7997 (recpy_insn_type, recpy_insn_new): New export.
7998
7999 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8000
8001 * py-record-btrace.c (btpy_insn_new): Removed.
8002 (btpy_insn_or_gap_new): New function.
8003 (btpy_insn_error): Removed.
8004 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8005 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
8006 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
8007 btpy_insn_or_gap_new instead of btpy_insn_new.
8008 (btpy_insn_getset): Remove btpy_insn_error.
8009 * py-record.c (recpy_gap_type): New static object.
8010 (recpy_gap_object): New typedef.
8011 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
8012 recpy_gap_reason_string): New function.
8013 (recpy_gap_getset): New static object.
8014 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
8015 * py-record.h (recpy_gap_new): New export.
8016
8017 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8018
8019 * python/py-record.c (recpy_ptid): Remove.
8020 (recpy_record_getset): Remove recpy_ptid.
8021
8022 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8023
8024 * btrace.c (btrace_fetch): Set inferior_ptid.
8025 * python/py-record-btrace.c: Add "py-record.h" include.
8026 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
8027 recpy_bt_end, recpy_bt_instruction_history,
8028 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
8029 in gdb.Record object instead of current ptid.
8030 * python/py-record.c: Include new "py-record.h" file.
8031 (recpy_record_object): Moved to py-record.h.
8032 * python/py-record.h: New file.
8033
8034 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8035
8036 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
8037 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
8038 indentation.
8039
8040 2017-05-01 Joel Brobecker <brobecker@adacore.com>
8041
8042 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
8043 the past maintainers section.
8044
8045 2017-04-28 Yao Qi <yao.qi@linaro.org>
8046
8047 * infcmd.c (get_return_value): Use regcache ctor, and remove
8048 cleanup.
8049
8050 2017-04-28 Yao Qi <yao.qi@linaro.org>
8051 Pedro Alves <palves@redhat.com>
8052
8053 * regcache.c (regcache::regcache): New tag dispatch ctor.
8054 (do_cooked_read): Moved above.
8055 (regcache_dup): Use the tag dispatch ctor..
8056 * regcache.h (regcache): Declare ctor, delete copy ctor and
8057 assignment operator, remove friend regcache_dup.
8058
8059 2017-04-28 Yao Qi <yao.qi@linaro.org>
8060
8061 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
8062 call method save instead of regcache_cpy.
8063 * regcache.h (struct regcache): Make regcache_dup a friend.
8064
8065 2017-04-28 Yao Qi <yao.qi@linaro.org>
8066
8067 * regcache.c (struct regcache): Move to regcache.h
8068 (regcache::arch): New method.
8069 (regcache_get_ptid): Update.
8070 (get_regcache_arch): Call arch method.
8071 (get_regcache_aspace): Call method aspace.
8072 (register_buffer): Change it to method.
8073 (regcache_save): Change it to regcache::save.
8074 (regcache_restore): Likewise.
8075 (regcache_cpy_no_passthrough): Remove the declaration.
8076 (regcache_cpy): Call methods restore and cpy_no_passthrough.
8077 (regcache_cpy_no_passthrough): Change it to method
8078 cpy_no_passthrough.
8079 (regcache_register_status): Change it to method
8080 get_register_status.
8081 (regcache_invalidate): Change it to method invalidate.
8082 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
8083 (regcache_raw_update): Change it to method raw_update.
8084 (regcache_raw_read): Likewise.
8085 (regcache_raw_read_signed): Likewise.
8086 (regcache_raw_read_unsigned): Likewise.
8087 (regcache_raw_write_signed): Likewise.
8088 (regcache_raw_write_unsigned): Likewise.
8089 (regcache_cooked_read): Likewise.
8090 (regcache_cooked_read_value): Likewise.
8091 (regcache_cooked_read_signed): Likewise.
8092 (regcache_cooked_read_unsigned): Likewise.
8093 (regcache_cooked_write_signed): Likewise.
8094 (regcache_cooked_write_unsigned): Likewise.
8095 (regcache_raw_set_cached_value): Likewise.
8096 (regcache_raw_write): Likewise.
8097 (regcache_cooked_write): Likewise.
8098 (regcache_xfer_part): Likewise.
8099 (regcache_raw_read_part): Likewise.
8100 (regcache_raw_write_part): Likewise.
8101 (regcache_cooked_read_part): Likewise.
8102 (regcache_cooked_write_part): Likewise.
8103 (regcache_raw_supply): Likewise.
8104 (regcache_raw_collect): Likewise.
8105 (regcache_transfer_regset): Likewise.
8106 (regcache_supply_regset): Likewise.
8107 (regcache_collect_regset): Likewise.
8108 (regcache_debug_print_register): Likewise.
8109 (enum regcache_dump_what): Move it to regcache.h.
8110 (regcache_dump): Change it to method dump.
8111 * regcache.h (enum regcache_dump_what): New.
8112 (class regcache): New.
8113 * target.c (target_fetch_registers): Call method
8114 debug_print_register.
8115 (target_store_registers): Likewise.
8116
8117 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8118
8119 * windows-nat.c (struct lm_info_windows): Initialize field.
8120 (windows_make_so): Allocate lm_info_windows with new.
8121 (windows_free_so): Free lm_info_windows with delete.
8122
8123 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8124
8125 * solib-darwin.c (struct lm_info_darwin): Initialize field.
8126 (darwin_current_sos): Allocate lm_info_darwin with new, remove
8127 cleanup.
8128 (darwin_free_so): Free lm_info_darwin with delete.
8129
8130 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8131
8132 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
8133 <l_addr_p>: Change type to bool.
8134 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
8135 (svr4_free_so): Free lm_info_svr4 with delete.
8136 (svr4_copy_library_list): Replace memcpy with call to copy
8137 constructor.
8138 (library_list_start_library, svr4_default_sos): Allocate
8139 lm_info_svr4 with new.
8140
8141 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8142
8143 * solib-target.c (struct lm_info_target): Add destructor,
8144 initialize fields.
8145 <name>: Change type to std::string.
8146 (library_list_start_library): Allocate lm_info_target with new.
8147 (solib_target_free_library_list): Free lm_info_target with
8148 delete.
8149 (solib_target_current_sos): Adapt to std::string.
8150 (solib_target_free_so): Free lm_info_target with delete.
8151
8152 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8153
8154 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
8155 fields.
8156 (frv_current_sos): Allocate lm_info_frv with new.
8157 (frv_relocate_main_executable): Free lm_info_frv with delete,
8158 allocate with new.
8159 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
8160
8161 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8162
8163 * solib-frv.c (struct lm_info_frv): Fix indentation.
8164
8165 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8166
8167 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
8168 map field.
8169 (dsbt_current_sos): Allocate lm_info_dsbt with new.
8170 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8171 and allocate with new.
8172 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8173
8174 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8175
8176 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8177 <filename, member_name>: Change type to std::string.
8178 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8179 (library_list_start_library): Allocate lm_info_aix with new.
8180 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8181 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8182 with copy constructor.
8183
8184 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8185
8186 * solist.h (struct lm_info): Remove.
8187 (struct lm_info_base): New class.
8188 (struct so_list) <lm_info>: Change type to lm_info_base *.
8189 * nto-tdep.c (struct lm_info): Remove.
8190 (lm_addr): Adjust.
8191 * solib-aix.c (struct lm_info): Rename to ...
8192 (struct lm_info_aix): ... this. Extend lm_info_base.
8193 (lm_info_p): Rename to ...
8194 (lm_info_aix_p): ... this, and adjust.
8195 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8196 solib_aix_parse_libraries, library_list_start_library,
8197 solib_aix_free_library_list, solib_aix_parse_libraries,
8198 solib_aix_get_library_list,
8199 solib_aix_relocate_section_addresses, solib_aix_free_so,
8200 solib_aix_get_section_offsets,
8201 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8202 Adjust.
8203 (struct solib_aix_inferior_data) <library_list>: Adjust.
8204 * solib-darwin.c (struct lm_info): Rename to ...
8205 (struct lm_info_darwin): ... this. Extend lm_info_base.
8206 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8207 * solib-dsbt.c (struct lm_info): Rename to ...
8208 (struct lm_info_dsbt): ... this. Extend lm_info_base.
8209 (struct dsbt_info) <main_executable_lm_info): Adjust.
8210 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8211 dsbt_relocate_section_addresses): Adjust.
8212 * solib-frv.c (struct lm_info): Rename to ...
8213 (struct lm_info_frv): ... this. Extend lm_info_base.
8214 (main_executable_lm_info): Adjust.
8215 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8216 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8217 find_canonical_descriptor_in_load_object,
8218 frv_fdpic_find_canonical_descriptor): Adjust.
8219 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8220 to lm_info_svr4.
8221 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8222 svr4_clear_so, svr4_copy_library_list,
8223 library_list_start_library, svr4_default_sos, svr4_read_so_list,
8224 svr4_current_sos, svr4_fetch_objfile_link_map,
8225 solist_update_incremental): Adjust.
8226 * solib-svr4.h (struct lm_info_svr4): Move here from
8227 solib-svr4.c.
8228 * solib-target.c (struct lm_info): Rename to ...
8229 (struct lm_info_target): ... this. Extend lm_info_base.
8230 (lm_info_p): Rename to ...
8231 (lm_info_target_p): ... this.
8232 (solib_target_parse_libraries, library_list_start_segment,
8233 library_list_start_section, library_list_start_library,
8234 library_list_end_library, solib_target_free_library_list,
8235 solib_target_current_sos, solib_target_free_so,
8236 solib_target_relocate_section_addresses): Adjust.
8237 * windows-nat.c (struct lm_info): Rename to ...
8238 (struct lm_info_windows): ... this. Extend lm_info_base.
8239 (windows_make_so, handle_load_dll, handle_unload_dll,
8240 windows_xfer_shared_libraries): Adjust.
8241
8242 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8243
8244 * solib-darwin.c (struct darwin_so_list): Remove.
8245 (darwin_current_sos): Allocate an so_list object instead of a
8246 darwin_so_list, separately allocate an lm_info object.
8247 (darwin_free_so): Free lm_info.
8248
8249 2017-04-28 John Baldwin <jhb@FreeBSD.org>
8250
8251 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8252 with fprintf_filtered.
8253
8254 2017-04-28 Yao Qi <yao.qi@linaro.org>
8255
8256 * regcache.c (regcache::regcache): New function.
8257 (regcache::~regcache): New function.
8258 (regcache_xmalloc_1): Remove.
8259 (regcache_xmalloc): Call new regcache.
8260 (regcache_xfree): Call delete regcache.
8261 (get_thread_arch_aspace_regcache): Call new regcache.
8262
8263 2017-04-28 Yao Qi <yao.qi@linaro.org>
8264
8265 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8266 lwp instead of ptid_get_lwp.
8267
8268 2017-04-28 Yao Qi <yao.qi@linaro.org>
8269
8270 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8271 lwp_info instead of getting from inferior_ptid.
8272
8273 2017-04-27 Keith Seitz <keiths@redhat.com>
8274
8275 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8276 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8277 (CV_CONVERSION_BADNESS): Define.
8278 (rank_one_type): Remove overly restrictive rvalue reference
8279 rank checks.
8280 Add cv-qualifier checks and subranks for type equality.
8281 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8282 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8283 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8284
8285 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
8286
8287 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8288 count when creating the object.
8289
8290 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
8291 Ulrich Weigand <uweigand@de.ibm.com>
8292
8293 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8294 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8295 is used in AIX.
8296 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8297 (process_xcoff_symbol): Likewise.
8298 (scan_xcoff_symtab): Likewise.
8299
8300 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8301
8302 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8303 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8304 (ia64_access_reg): Use get_frame_register_unsigned.
8305 (ia64_access_rse_reg): Likewise.
8306 (ia64_libunwind_frame_prev_register): Likewise.
8307
8308 2017-04-26 Jiong Wang <jiong.wang@arm.com>
8309
8310 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8311 * gdbarch.c: Regenerated.
8312 * gdbarch.h: Regenerated.
8313 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8314 visibility external.
8315 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8316 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8317 (enum cfa_how_kind): Move to ...
8318 (struct dwarf2_frame_state_reg_info): Likewise.
8319 (struct dwarf2_frame_state): Likewise.
8320 * dwarf2-frame.h: ... here.
8321 (dwarf2_frame_state_alloc_regs): New declaration.
8322 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8323 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8324
8325 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8326
8327 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8328 regcache_raw_read_unsigned.
8329 (xtensa_pseudo_register_write): Likewise.
8330
8331 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8332
8333 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8334 (nds32_pseudo_register_write): Likewise.
8335
8336 2017-04-25 Yao Qi <yao.qi@linaro.org>
8337
8338 * regcache.c (struct regcache) <readonly_p>: Change its type
8339 to bool.
8340 (regcache_xmalloc_1): Update parameter type and callers update.
8341
8342 2017-04-25 Yao Qi <yao.qi@linaro.org>
8343
8344 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8345 set_gdbarch_wchar_bit.
8346 * arm-tdep.c (arm_gdbarch_init): Likewise.
8347
8348 2017-04-25 Pedro Alves <palves@redhat.com>
8349
8350 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8351 (BothAreRelocatable, memcopy, memmove): Don't define.
8352 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8353 macros.
8354
8355 2017-04-25 Pedro Alves <palves@redhat.com>
8356
8357 * common/common-defs.h: Include "common/poison.h".
8358 * common/function-view.h: (Not, Or, Requires): Move to traits.h
8359 and adjust.
8360 * common/poison.h: New file.
8361 * common/traits.h: Include <type_traits>.
8362 (Not, Or, Requires): New, moved from common/function-view.h.
8363
8364 2017-04-25 Pedro Alves <palves@redhat.com>
8365
8366 * breakpoint.h (struct breakpoint): In-class initialize all
8367 fields. Make boolean fields "bool".
8368 * breakpoint.c (init_raw_breakpoint_without_location): Remove
8369 memset call and initializations no longer necessary.
8370
8371 2017-04-25 Pedro Alves <palves@redhat.com>
8372
8373 * btrace.c (pt_btrace_insn_flags): Change parameter type to
8374 reference.
8375 (pt_btrace_insn): New function.
8376 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8377
8378 2017-04-25 Pedro Alves <palves@redhat.com>
8379
8380 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
8381 "base" field and inherit from "bp_location" instead. Add
8382 non-default ctor.
8383 (allocate_location_exception): Use new non-default ctor.
8384 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8385 (init_bp_location): Convert to ...
8386 (bp_location::bp_location): ... this new ctor, and remove memset
8387 call.
8388 (base_breakpoint_allocate_location): Use the new non-default ctor.
8389 * breakpoint.h (bp_location): Now a class. Declare default and
8390 non-default ctors. In-class initialize all members.
8391 (init_bp_location): Remove declaration.
8392
8393 2017-04-25 Pedro Alves <palves@redhat.com>
8394
8395 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8396 assignment operator.
8397
8398 2017-04-24 Yao Qi <yao.qi@linaro.org>
8399
8400 * doublest.c (convert_doublest_to_floatformat): Call
8401 floatformat_totalsize_bytes.
8402
8403 2017-04-22 Tom Tromey <tom@tromey.com>
8404
8405 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8406 ui_out_emit_list.
8407 * stack.c (print_frame): Use ui_out_emit_list.
8408 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8409 ui_out_emit_list.
8410 * mi/mi-main.c (print_one_inferior)
8411 (mi_cmd_data_list_register_names)
8412 (mi_cmd_data_list_register_values, mi_cmd_list_features)
8413 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8414 ui_out_emit_list.
8415 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8416 (mi_output_solib_attribs): Use ui_out_emit_list,
8417 ui_out_emit_tuple.
8418 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8419 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8420 (mi_cmd_stack_list_args, list_args_or_locals): Use
8421 ui_out_emit_list.
8422 * disasm.c (do_assembly_only): Use ui_out_emit_list.
8423 * breakpoint.c (print_solib_event, output_thread_groups): Use
8424 ui_out_emit_list.
8425
8426 2017-04-22 Tom Tromey <tom@tromey.com>
8427
8428 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8429 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8430 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8431
8432 2017-04-22 Tom Tromey <tom@tromey.com>
8433
8434 * tracepoint.c (tvariables_info_1)
8435 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8436
8437 2017-04-22 Tom Tromey <tom@tromey.com>
8438
8439 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8440 annotate_arg_emitter.
8441 * breakpoint.c (print_mention_watchpoint)
8442 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8443 * annotate.h (struct annotate_arg_emitter): New.
8444
8445 2017-04-22 Tom Tromey <tom@tromey.com>
8446
8447 * record-btrace.c (record_btrace_insn_history)
8448 (record_btrace_insn_history_range, record_btrace_call_history)
8449 (record_btrace_call_history_range): Use ui_out_emit_tuple.
8450 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8451 ui_out_emit_tuple.
8452 * stack.c (print_frame_info): Use ui_out_emit_tuple.
8453 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8454 * skip.c (skip_info): Use ui_out_emit_tuple.
8455 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8456 * progspace.c (print_program_space): Use ui_out_emit_tuple.
8457 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8458 * osdata.c (info_osdata): Use ui_out_emit_tuple.
8459 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8460 ui_out_emit_tuple.
8461 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8462 (output_register, mi_cmd_data_read_memory)
8463 (mi_cmd_data_read_memory_bytes, mi_load_progress)
8464 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8465 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8466 Use ui_out_emit_tuple.
8467 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8468 ui_out_emit_tuple.
8469 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8470 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8471 * linux-thread-db.c (info_auto_load_libthread_db): Use
8472 ui_out_emit_tuple.
8473 * inferior.c (print_inferior): Use ui_out_emit_tuple.
8474 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8475 * disasm.c (do_mixed_source_and_assembly_deprecated)
8476 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8477 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8478 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8479 * breakpoint.c (print_one_breakpoint_location)
8480 (print_one_breakpoint): Use ui_out_emit_tuple.
8481 * auto-load.c (print_script, info_auto_load_cmd): Use
8482 ui_out_emit_tuple.
8483 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8484
8485 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
8486
8487 * thread.c (print_thread_info_1): Remove dead code.
8488
8489 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8490
8491 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8492 GDB_SELF_TEST.
8493 * arm-tdep.c (selftests::arm_record_test): Likewise.
8494
8495 2017-04-21 Yao Qi <yao.qi@linaro.org>
8496
8497 * regcache.c (regcache_restore): Remove argument 2. Replace
8498 argument 3 with regcache. Get register status from
8499 src->register_status and get register contents from
8500 register_buffer (src, regnum).
8501 (regcache_cpy): Update.
8502
8503 2017-04-19 Pedro Alves <palves@redhat.com>
8504
8505 * gdbthread.h (thread): Add missing closing parenthesis in
8506 comment.
8507
8508 2017-04-19 Pedro Alves <palves@redhat.com>
8509
8510 * common/refcounted-object.h: New file.
8511 * gdbthread.h: Include "common/refcounted-object.h".
8512 (thread_info): Inherit from refcounted_object and add comments.
8513 (thread_info::incref, thread_info::decref)
8514 (thread_info::m_refcount): Delete.
8515 (thread_info::deletable): Use the refcounted_object::refcount()
8516 method.
8517 * inferior.c (current_inferior_): Add comment.
8518 (set_current_inferior): Increment/decrement refcounts.
8519 (prune_inferiors, remove_inferior_command): Skip inferiors marked
8520 not-deletable instead of comparing with the current inferior.
8521 (initialize_inferiors): Increment the initial inferior's refcount.
8522 * inferior.h (struct inferior): Forward declare.
8523 Include "common/refcounted-object.h".
8524 (current_inferior, set_current_inferior): Move declaration to
8525 before struct inferior's definition, and fix comment.
8526 (inferior): Inherit from refcounted_object. Add comments.
8527 * thread.c (switch_to_thread_no_regs): Reference the thread's
8528 inferior pointer directly instead of doing a ptid lookup.
8529 (switch_to_no_thread): New function.
8530 (switch_to_thread(thread_info *)): New function, factored out
8531 from ...
8532 (switch_to_thread(ptid_t)): ... this.
8533 (restore_current_thread): Delete.
8534 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8535 fields, and add 'inf' field.
8536 (do_restore_current_thread_cleanup): Check whether old->inf is
8537 alive instead of looking up an inferior by ptid. Use
8538 switch_to_thread and switch_to_no_thread.
8539 (restore_current_thread_cleanup_dtor): Use old->inf directly
8540 instead of lookup up an inferior by id. Decref the inferior.
8541 Don't restore 'removable'.
8542 (make_cleanup_restore_current_thread): Same the inferior pointer
8543 in old, instead of the inferior number. Incref the inferior.
8544 Don't save/clear 'removable'.
8545
8546 2017-04-19 Pedro Alves <palves@redhat.com>
8547
8548 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8549 unittests/scoped_restore-selftests.c.
8550 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8551 * common/scoped_restore.h (scoped_restore_base): Make "class".
8552 (scoped_restore_base::release): New public method.
8553 (scoped_restore_base::scoped_restore_base): New protected ctor.
8554 (scoped_restore_base::m_saved_var): New protected field.
8555 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8556 scoped_restore_base base class instead of m_saved_var directly.
8557 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8558 (scoped_restore_tmpl::scoped_restore_tmpl(const
8559 scoped_restore_tmpl<T>&)): Likewise.
8560 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8561 method.
8562 (scoped_restore_tmpl::saved_var): New method.
8563 (scoped_restore_tmpl::m_saved_var): Delete.
8564 * inferior.h (inferior::detaching): Now a bool.
8565 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8566 cleanup.
8567 * unittests/scoped_restore-selftests.c: New file.
8568
8569 2017-04-19 Pedro Alves <palves@redhat.com>
8570
8571 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8572 Re-sort in alphabetic order.
8573
8574 2017-04-18 Pedro Alves <palves@redhat.com>
8575
8576 * xml-support.c (obstack_xml_printf): Delete.
8577 * xml-support.h (obstack_xml_printf): Delete.
8578
8579 2017-04-18 Pedro Alves <palves@redhat.com>
8580
8581 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8582 vdebug, verror, body_text, start_element, end_element, name,
8583 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8584 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8585 is_xinclude>: Make private and add m_ prefix.
8586 (gdb_xml_parser::body_text): New method, based on ...
8587 (gdb_xml_body_text): ... this. Adjust.
8588 (gdb_xml_parser::vdebug): New method, based on ...
8589 (gdb_xml_debug): ... this. Adjust.
8590 (gdb_xml_parser::verror): New method, based on ...
8591 (gdb_xml_error): ... this. Adjust.
8592 (gdb_xml_parser::start_element): New method, based on ...
8593 (gdb_xml_start_element): ... this. Adjust.
8594 (gdb_xml_start_element_wrapper): Defer to
8595 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8596 (gdb_xml_parser::end_element): New method, based on ...
8597 (gdb_xml_end_element_wrapper): ... this. Adjust.
8598 (gdb_xml_parser::~gdb_xml_parser): Adjust.
8599 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8600 (gdb_xml_parser::use_dtd): New method, based on ...
8601 (gdb_xml_use_dtd): ... this. Adjust.
8602 (gdb_xml_parser::parse): New method, based on ...
8603 (gdb_xml_parse): ... this. Adjust.
8604 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8605 (xinclude_start_include): Adjust to call the parser's name method.
8606 (xml_xinclude_default, xml_xinclude_start_doctype)
8607 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8608 method.
8609 (xml_process_xincludes): Adjust to call parser methods.
8610 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8611 declarations.
8612
8613 2017-04-18 Pedro Alves <palves@redhat.com>
8614
8615 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8616 gdb::optional<std::string>.
8617 * xml-support.c: Include <string>.
8618 (scope_level::scope_level(scope_level &&))
8619 (scope_level::~scope_level): Delete.
8620 (scope_level::body): Now a std::string.
8621 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8622 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8623 parameter.
8624 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8625 (xinclude_parsing_data::output): Now a std::string reference.
8626 (xinclude_start_include): Adjust.
8627 (xml_xinclude_default): Adjust.
8628 (xml_process_xincludes): Add 'output' parameter, and return bool.
8629 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8630 and return bool.
8631 * xml-tdesc.c: Include <unordered_map> and <string>.
8632 (tdesc_xml_cache): Delete.
8633 (tdesc_xml_cache_s): Delete.
8634 (xml_cache): Now an std::unordered_map.
8635 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8636 (target_fetch_description_xml): Change return type to
8637 gdb::optional<std::string>, and adjust.
8638 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8639 (target_fetch_description_xml): Change return type to
8640 gdb::optional<std::string>.
8641
8642 2017-04-18 Pedro Alves <palves@redhat.com>
8643
8644 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8645 unittests/optional-selftests.c.
8646 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8647 * unittests/optional-selftests.c: New file.
8648 * unittests/optional/assignment/1.cc: New file.
8649 * unittests/optional/assignment/2.cc: New file.
8650 * unittests/optional/assignment/3.cc: New file.
8651 * unittests/optional/assignment/4.cc: New file.
8652 * unittests/optional/assignment/5.cc: New file.
8653 * unittests/optional/assignment/6.cc: New file.
8654 * unittests/optional/assignment/7.cc: New file.
8655 * unittests/optional/cons/copy.cc: New file.
8656 * unittests/optional/cons/default.cc: New file.
8657 * unittests/optional/cons/move.cc: New file.
8658 * unittests/optional/cons/value.cc: New file.
8659 * unittests/optional/in_place.cc: New file.
8660 * unittests/optional/observers/1.cc: New file.
8661 * unittests/optional/observers/2.cc: New file.
8662
8663 2017-04-18 Pedro Alves <palves@redhat.com>
8664
8665 * common/gdb_optional.h: Include common/traits.h.
8666 (in_place_t): New type.
8667 (in_place): New constexpr variable.
8668 (optional::optional): Remove member initialization of
8669 m_instantiated.
8670 (optional::optional(in_place_t...)): New constructor.
8671 (optional::~optional): Use reset.
8672 (optional::optional(const optional&)): New.
8673 (optional::optional(const optional&&)): New.
8674 (optional::optional(T &)): New.
8675 (optional::optional(T &&)): New.
8676 (operator::operator=(const optional &)): New.
8677 (operator::operator=(optional &&)): New.
8678 (operator::operator= (const T &))
8679 (operator::operator= (T &&))
8680 (operator::emplace (Args &&... args)): Return a T&. Use reset.
8681 (operator::reset): New.
8682 (operator::m_instantiated):: Add in-class initializer.
8683 * common/traits.h: Include <type_traits>.
8684 (struct And): New types.
8685
8686 2017-04-18 Pedro Alves <palves@redhat.com>
8687
8688 * xml-support.c: Include <vector>.
8689 (scope_level::scope_level(const gdb_xml_element *))
8690 (scope_level::scope_level(scope_level&&)): New.
8691 (scope_level::~scope_level): New.
8692 (scope_level_s): Delete.
8693 (gdb_xml_parser::scopes): Now a std::vector.
8694 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8695 Use std::vector.
8696 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8697 scope cleanup code.
8698 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8699 of the scopes member. Use std::vector::emplace_back.
8700
8701 2017-04-18 Pedro Alves <palves@redhat.com>
8702
8703 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
8704 a bool.
8705 (gdb_xml_end_element): Change type of first parameter.
8706 (gdb_xml_cleanup): Rename to ...
8707 (gdb_xml_parser::~gdb_xml_parser): ... this.
8708 (gdb_xml_create_parser_and_cleanup): Delete with ...
8709 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8710 to this new ctor.
8711 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8712 using gdb_xml_create_parser_and_cleanup.
8713 (xinclude_parsing_data): Add ctor/dtor.
8714 (xml_xinclude_cleanup): Delete.
8715 (xml_process_xincludes): Create a local xinclude_parsing_data
8716 instead of heap-allocating one. Create a local gdb_xml_parser
8717 instead of heap-allocating one with
8718 gdb_xml_create_parser_and_cleanup.
8719
8720 2017-04-18 John Baldwin <jhb@FreeBSD.org>
8721
8722 PR threads/20743
8723 * fbsd-nat.c (resume_one_thread_cb): Remove.
8724 (resume_all_threads_cb): Remove.
8725 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8726 iterate_over_threads.
8727
8728 2017-04-17 Joel Brobecker <brobecker@adacore.com>
8729
8730 * NEWS: Create a new section for the next release branch.
8731 Rename the section of the current branch, now that it has
8732 been cut.
8733
8734 2017-04-17 Joel Brobecker <brobecker@adacore.com>
8735
8736 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8737 * version.in: Bump version to 8.0.50.DATE-git.
8738
8739 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
8740
8741 PR gdb/21385
8742 * windows-nat.c (windows_create_inferior): Declare 'allargs'
8743 independently of the host, and fix build breakage on Cygwin.
8744
8745 2017-04-13 Pedro Alves <palves@redhat.com>
8746
8747 * inferior.c (free_inferior): Convert to ...
8748 (inferior::~inferior): ... this dtor.
8749 (inferior::inferior): New ctor, factored out from ...
8750 (add_inferior_silent): ... here. Allocate the inferior with a new
8751 expression.
8752 (delete_inferior): Call delete instead of free_inferior.
8753 * inferior.h (gdb_environ, continuation): Forward declare.
8754 (inferior): Now a class. Add in-class initialization to all
8755 members. Make boolean fields bool, except 'detaching'.
8756 (inferior::inferior): New explicit ctor.
8757 (inferior::~inferior): New.
8758
8759 2017-04-13 Pedro Alves <palves@redhat.com>
8760
8761 * inferior.c (init_inferior_list): Delete.
8762 * inferior.h (init_inferior_list): Delete.
8763
8764 2017-04-13 Pedro Alves <palves@redhat.com>
8765
8766 PR threads/13217
8767 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8768 (top level): Call it twice, with different thread sets.
8769
8770 2017-04-13 Pedro Alves <palves@redhat.com>
8771
8772 * thread.c: Include <algorithm>.
8773 (thread_array_cleanup): Delete.
8774 (scoped_inc_dec_ref): New class.
8775 (live_threads_count): New function.
8776 (set_thread_refcount): Delete.
8777 (tp_array_compar_ascending): Now a bool.
8778 (tp_array_compar): Convert to a std::sort comparison function.
8779 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8780 and live_threads_count.
8781
8782 2017-04-13 Pedro Alves <palves@redhat.com>
8783
8784 * infrun.c (follow_fork_inferior): Also switch the current
8785 inferior.
8786
8787 2017-04-13 Pedro Alves <palves@redhat.com>
8788
8789 * breakpoint.c (watch_command_1): Save watchpoint-frame info
8790 before calling create_internal_breakpoint.
8791
8792 2017-04-13 Pedro Alves <palves@redhat.com>
8793
8794 * fork-child.c (execv_argv): New class.
8795 (breakup_args): Refactored as ...
8796 (execv_argv::init_for_no_shell): .. this method of execv_argv.
8797 Copy arguments to storage and replace separators with NULL
8798 terminators in place.
8799 (escape_bang_in_quoted_argument): Adjust to return bool.
8800 (execv_argv::execv_argv): New ctor.
8801 (execv_argv::init_for_shell): New method, factored out from
8802 fork_inferior. Don't strdup strings into the vector.
8803 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
8804 Remove free_vector_argv call.
8805
8806 2017-04-13 Yao Qi <yao.qi@linaro.org>
8807
8808 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8809 tdep->rx_psw_type.
8810
8811 2017-04-13 Yao Qi <yao.qi@linaro.org>
8812
8813 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8814 * rx-tdep.c (rx_gdbarch_init): Likewise.
8815
8816 2017-04-13 Pedro Alves <palves@redhat.com>
8817
8818 * breakpoint.h (struct breakpoint): Reindent.
8819
8820 2017-04-13 Pedro Alves <palves@redhat.com>
8821
8822 * breakpoint.c (bp_location): Rename to ...
8823 (bp_locations): ... this. All references updated.
8824 (bp_location_count): Rename to ...
8825 (bp_locations_count): ... this. All references updated.
8826 (bp_location_placed_address_before_address_max): Rename to ...
8827 (bp_locations_placed_address_before_address_max): ... this. All
8828 references updated.
8829 (bp_location_shadow_len_after_address_max): Rename to ...
8830 (bp_locations_shadow_len_after_address_max): ... this. All
8831 references updated.
8832 (bp_location_compare_addrs): Rename to ...
8833 (bp_locations_compare_addrs): ... this. All references updated.
8834 (bp_location_compare):Rename to ...
8835 (bp_locations_compare): ... this. All references updated.
8836 (bp_location_target_extensions_update): Rename to ...
8837 (bp_locations_target_extensions_update): ... this. All references
8838 updated.
8839
8840 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8841
8842 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8843 * common/common.m4: Check headers 'termios.h', 'termio.h' and
8844 'sgtty.h'.
8845 * common/gdb_termios.h: New file, with parts of "terminal.h".
8846 * inflow.c: Include "gdb_termios.h".
8847 * ser-unix.c: Include "gdb_termios.h".
8848 * terminal.h: Move terminal-related defines to
8849 "common/gdb_termios.h".
8850
8851 2017-04-12 Tom Tromey <tom@tromey.com>
8852
8853 * probe.c (parse_probes): Update.
8854 * location.h (delete_event_location): Don't declare.
8855 (event_location_deleter::operator()): Update.
8856 * location.c (event_location_deleter::operator()): Rename from
8857 delete_event_location.
8858 * linespec.h (linespec_result) <location>: Change type to
8859 event_location_up.
8860 * linespec.c (canonicalize_linespec, event_location_to_sals)
8861 (decode_objc): Update.
8862 (linespec_result): Don't call delete_event_location.
8863 * breakpoint.c (create_breakpoints_sal)
8864 (bkpt_probe_create_sals_from_location)
8865 (strace_marker_create_sals_from_location): Update.
8866
8867 2017-04-12 Tom Tromey <tom@tromey.com>
8868
8869 * linespec.h (struct linespec_result): Add constructor and
8870 destructor.
8871 (init_linespec_result, destroy_linespec_result)
8872 (make_cleanup_destroy_linespec_result): Don't declare.
8873 * linespec.c (init_linespec_result): Remove.
8874 (linespec_result::~linespec_result): Rename from
8875 destroy_linespec_result. Update.
8876 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8877 Remove.
8878 * breakpoint.c (create_breakpoint, break_range_command)
8879 (decode_location_default): Update.
8880 * ax-gdb.c (agent_command_1): Update.
8881
8882 2017-04-12 Tom Tromey <tom@tromey.com>
8883
8884 * remote.c (remote_download_tracepoint): Update.
8885 * python/py-breakpoint.c (bppy_get_location): Update.
8886 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8887 (gdbscm_breakpoint_location): Update.
8888 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8889 * breakpoint.h (struct breakpoint) <location, location_range_end>:
8890 Change type to event_location_up.
8891 * breakpoint.c (create_overlay_event_breakpoint)
8892 (create_longjmp_master_breakpoint)
8893 (create_std_terminate_master_breakpoint)
8894 (create_exception_master_breakpoint)
8895 (breakpoint_event_location_empty_p, print_breakpoint_location)
8896 (print_one_breakpoint_location, create_thread_event_breakpoint)
8897 (init_breakpoint_sal, create_breakpoint)
8898 (print_recreate_ranged_breakpoint, break_range_command)
8899 (init_ada_exception_breakpoint, say_where): Update.
8900 (base_breakpoint_dtor): Don't call delete_event_location.
8901 (bkpt_print_recreate, tracepoint_print_recreate)
8902 (dprintf_print_recreate, update_static_tracepoint)
8903 (breakpoint_re_set_default): Update.
8904
8905 2017-04-12 Tom Tromey <tom@tromey.com>
8906
8907 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8908 type of "to_do". Update.
8909 (compute_stack_depth): Use std::vector.
8910
8911 2017-04-12 Tom Tromey <tom@tromey.com>
8912
8913 * printcmd.c (find_instruction_backward): Use std::vector.
8914
8915 2017-04-12 Tom Tromey <tom@tromey.com>
8916
8917 * symfile.c (objfilep): Remove typedef.
8918 (reread_symbols): Use a std::vector.
8919
8920 2017-04-12 Tom Tromey <tom@tromey.com>
8921
8922 * mi/mi-main.c (exec_direction_forward): Remove.
8923 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8924 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8925 scoped_restore.
8926 * guile/guile.c (guile_repl_command, guile_command)
8927 (gdbscm_execute_gdb_command): Use scoped_restore.
8928 * go-exp.y (go_parse): Use scoped_restore.
8929 * d-exp.y (d_parse): Use scoped_restore.
8930 * cli/cli-decode.c (cmd_func): Use scoped_restore.
8931 * c-exp.y (c_parse): Use scoped_restore.
8932
8933 2017-04-12 Tom Tromey <tom@tromey.com>
8934
8935 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8936 (mi_parse): Update return type.
8937 (mi_parse_free): Remove.
8938 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8939 (mi_parse::~mi_parse): Rename from mi_parse_free.
8940 (mi_parse_cleanup): Remove.
8941 (mi_parse): Return a unique_ptr. Use new.
8942 * mi/mi-main.c (mi_execute_command): Update.
8943
8944 2017-04-12 Tom Tromey <tom@tromey.com>
8945
8946 * location.c (explicit_location_lex_one): Return a
8947 unique_xmalloc_ptr.
8948 (string_to_explicit_location): Update. Remove cleanups.
8949
8950 2017-04-12 Tom Tromey <tom@tromey.com>
8951
8952 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8953 (compare_value_and_voffset): Change type. Update.
8954 (compute_vtable_size): Change type of "offset_vec".
8955 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
8956 (gnuv3_get_typeid): Remove extraneous declaration.
8957
8958 2017-04-12 Tom Tromey <tom@tromey.com>
8959
8960 * charset.h (wchar_iterator): Fix comment.
8961
8962 2017-04-12 Tom Tromey <tom@tromey.com>
8963
8964 * charset.c (iconv_wrapper): New class.
8965 (cleanup_iconv): Remove.
8966 (convert_between_encodings): Use it.
8967
8968 2017-04-12 Tom Tromey <tom@tromey.com>
8969
8970 * symfile.h (increment_reading_symtab): Update type.
8971 * symfile.c (decrement_reading_symtab): Remove.
8972 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8973 * psymtab.c (psymtab_to_symtab): Update.
8974 * dwarf2read.c (dw2_instantiate_symtab): Update.
8975
8976 2017-04-12 Tom Tromey <tom@tromey.com>
8977
8978 * jit.c (struct jit_reader): Declare separately. Add constructor
8979 and destructor. Change type of "handle".
8980 (loaded_jit_reader): Define separately.
8981 (jit_reader_load): Update. New "new".
8982 (jit_reader_unload_command): Use "delete".
8983 * gdb-dlfcn.h (struct dlclose_deleter): New.
8984 (gdb_dlhandle_up): New typedef.
8985 (gdb_dlopen, gdb_dlsym): Update types.
8986 (gdb_dlclose): Remove.
8987 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8988 (gdb_dlsym): Change type of "handle".
8989 (make_cleanup_dlclose): Remove.
8990 (dlclose_deleter::operator()): Rename from gdb_dlclose.
8991 * compile/compile-c-support.c (load_libcc): Update.
8992
8993 2017-04-12 Tom Tromey <tom@tromey.com>
8994
8995 * symtab.h (find_pcs_for_symtab_line): Change return type.
8996 * symtab.c (find_pcs_for_symtab_line): Change return type.
8997 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8998 type of "vec". Update.
8999 (ltpy_get_pcs_for_line): Update.
9000 * linespec.c (decode_digits_ordinary): Update.
9001
9002 2017-04-12 Tom Tromey <tom@tromey.com>
9003
9004 * tracepoint.c (actions_command): Update.
9005 * python/python.c (python_command, python_interactive_command):
9006 Update.
9007 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9008 * guile/guile.c (guile_command): Update.
9009 * defs.h (read_command_lines, read_command_lines_1): Return
9010 command_line_up.
9011 (command_lines_deleter): New struct.
9012 (command_line_up): New typedef.
9013 * compile/compile.c (compile_code_command)
9014 (compile_print_command): Update.
9015 * cli/cli-script.h (get_command_line, copy_command_lines): Return
9016 command_line_up.
9017 (make_cleanup_free_command_lines): Remove.
9018 * cli/cli-script.c (get_command_line, read_command_lines_1)
9019 (copy_command_lines): Return command_line_up.
9020 (while_command, if_command, read_command_lines, define_command)
9021 (document_command): Update.
9022 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
9023 Remove.
9024 * breakpoint.h (breakpoint_set_commands): Change type of
9025 "commands".
9026 * breakpoint.c (breakpoint_set_commands): Change type of
9027 "commands". Update.
9028 (do_map_commands_command, update_dprintf_command_list)
9029 (create_tracepoint_from_upload): Update.
9030
9031 2017-04-12 Tom Tromey <tom@tromey.com>
9032
9033 * tracepoint.c (scope_info): Update.
9034 * spu-tdep.c (spu_catch_start): Update.
9035 * python/python.c (gdbpy_decode_line): Update.
9036 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
9037 * python/py-breakpoint.c (bppy_init): Update.
9038 * probe.c (parse_probes): Update.
9039 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
9040 * location.h (event_location_deleter): New struct.
9041 (event_location_up): New typedef.
9042 (new_linespec_location, new_address_location, new_probe_location)
9043 (new_explicit_location, copy_event_location)
9044 (string_to_event_location, string_to_event_location_basic)
9045 (string_to_explicit_location): Update return type.
9046 (make_cleanup_delete_event_location): Remove.
9047 * location.c (new_linespec_location, new_address_location)
9048 (new_probe_location, new_explicit_location, copy_event_location):
9049 Return event_location_up.
9050 (delete_event_location_cleanup)
9051 (make_cleanup_delete_event_location): Remove.
9052 (string_to_explicit_location, string_to_event_location_basic)
9053 (string_to_event_location): Return event_location_up.
9054 * linespec.c (canonicalize_linespec, event_location_to_sals)
9055 (decode_line_with_current_source)
9056 (decode_line_with_last_displayed, decode_objc): Update.
9057 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
9058 * completer.c (location_completer): Update.
9059 * cli/cli-cmds.c (edit_command, list_command): Update.
9060 * breakpoint.c (create_overlay_event_breakpoint)
9061 (create_longjmp_master_breakpoint)
9062 (create_std_terminate_master_breakpoint)
9063 (create_exception_master_breakpoint)
9064 (create_thread_event_breakpoint): Update.
9065 (init_breakpoint_sal): Update. Remove some dead code.
9066 (create_breakpoint_sal): Change type of "location". Update.
9067 (create_breakpoints_sal, create_breakpoint, break_command_1)
9068 (dprintf_command, break_range_command, until_break_command)
9069 (init_ada_exception_breakpoint)
9070 (strace_marker_create_sals_from_location)
9071 (update_static_tracepoint, trace_command, ftrace_command)
9072 (strace_command, create_tracepoint_from_upload): Update.
9073 * break-catch-throw.c (re_set_exception_catchpoint): Update.
9074 * ax-gdb.c (agent_command_1): Update.
9075
9076 2017-04-12 Pedro Alves <palves@redhat.com>
9077
9078 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
9079 * configure.tgt: Handle i[34567]86-*-go32* and
9080 i[34567]86-*-msdosdjgpp*.
9081 * i386-tdep.c (i386_svr4_reg_to_regnum):
9082 Make extern.
9083 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
9084 i386-go32-tdep.c.
9085 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
9086 * i386-go32-tdep.c: New file.
9087 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
9088 declarations.
9089
9090 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
9091
9092 * aix-thread.c (pd_status2str): Change return type to const char *.
9093
9094 2017-04-12 Pedro Alves <palves@redhat.com>
9095
9096 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
9097 calls to set_gdbarch_gnu_triplet_regexp.
9098
9099 2017-04-12 Pedro Alves <palves@redhat.com>
9100
9101 PR gdb/21323
9102 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
9103 New enum value.
9104 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
9105 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
9106 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
9107 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
9108 * gdbarch.h, gdbarch.c: Regenerate.
9109 * aarch64-tdep.c (aarch64_gdbarch_init): Override
9110 gdbarch_wchar_bit and gdbarch_wchar_signed.
9111 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
9112 * arm-tdep.c (arm_gdbarch_init): Likewise.
9113 * avr-tdep.c (avr_gdbarch_init): Likewise.
9114 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
9115 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
9116 * i386-tdep.c (i386_go32_init_abi): Likewise.
9117 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9118 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9119 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9120 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9121 * sh-tdep.c (sh_gdbarch_init): Likewise.
9122 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9123 * sparc64-tdep.c (sparc64_init_abi): Likewise.
9124 * windows-tdep.c (windows_init_abi): Likewise.
9125 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9126
9127 2017-04-12 Pedro Alves <palves@redhat.com>
9128
9129 PR c++/21323
9130 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
9131 cplus_primitive_type_char32_t>: New enum values.
9132 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
9133 and cplus_primitive_type_char32_t.
9134 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
9135 32, use the archtecture's built-in type for char16_t and char32_t,
9136 respectively. Otherwise, fallback to init_integer_type as before,
9137 but make the type unsigned, and issue a complaint.
9138 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
9139
9140 2017-04-12 Alan Hayward <alan.hayward@arm.com>
9141
9142 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
9143 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
9144
9145 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9146
9147 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
9148 'const char *'.
9149
9150 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9151
9152 * common/common-utils.c (free_vector_argv): New function.
9153 * common/common-utils.h: Include <vector>.
9154 (free_vector_argv): New prototype.
9155 * darwin-nat.c (darwin_create_inferior): Rewrite function
9156 prototype in order to constify "exec_file" and accept a
9157 "std::string" for "allargs".
9158 * fork-child.c: Include <vector>.
9159 (breakup_args): Rewrite function, using C++.
9160 (fork_inferior): Rewrite function header, constify "exec_file_arg"
9161 and accept "std::string" for "allargs". Update the code to
9162 calculate "argv" based on "allargs". Update calls to "exec_fun"
9163 and "execvp".
9164 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
9165 order to constify "exec_file" and accept a "std::string" for
9166 "allargs".
9167 * go32-nat.c (go32_create_inferior): Likewise.
9168 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
9169 * infcmd.c (run_command_1): Constify "exec_file". Use
9170 "std::string" for inferior arguments.
9171 * inferior.h (fork_inferior): Update prototype.
9172 * linux-nat.c (linux_nat_create_inferior): Rewrite function
9173 prototype in order to constify "exec_file" and accept a
9174 "std::string" for "allargs".
9175 * nto-procfs.c (procfs_create_inferior): Likewise.
9176 * procfs.c (procfs_create_inferior): Likewise.
9177 * remote-sim.c (gdbsim_create_inferior): Likewise.
9178 * remote.c (extended_remote_run): Update code to accept
9179 "std::string" as argument.
9180 (extended_remote_create_inferior): Rewrite function prototype in
9181 order to constify "exec_file" and accept a "std::string" for
9182 "allargs".
9183 * rs6000-nat.c (super_create_inferior): Likewise.
9184 (rs6000_create_inferior): Likewise.
9185 * target.h (struct target_ops) <to_create_inferior>: Likewise.
9186 * windows-nat.c (windows_create_inferior): Likewise.
9187
9188 2017-04-11 Pedro Alves <palves@redhat.com>
9189
9190 * thread.c: Fix whitespace throughout.
9191
9192 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
9193
9194 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9195
9196 2017-04-11 Alan Hayward <alan.hayward@arm.com>
9197
9198 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9199
9200 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
9201
9202 PR gdb/21364
9203 * osdata.c (info_osdata): Check if 'type' is an empty string
9204 instead of NULL.
9205
9206 2017-04-10 Pedro Alves <palves@redhat.com>
9207
9208 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9209 (ptid_to_global_thread_id, in_thread_list)
9210 (do_captured_list_thread_ids, set_resumed, set_running)
9211 (set_executing, set_stop_requested, finish_thread_state)
9212 (validate_registers_access, can_access_registers_ptid)
9213 (print_thread_info_1, switch_to_thread)
9214 (do_restore_current_thread_cleanup)
9215 (make_cleanup_restore_current_thread, thread_command)
9216 (thread_name_command): Use operator== instead of ptid_equal.
9217
9218 2017-04-10 Pedro Alves <palves@redhat.com>
9219
9220 * thread.c (struct current_thread_cleanup) <next>: Delete field.
9221 (current_thread_cleanup_chain): Delete.
9222 (restore_current_thread_cleanup_dtor)
9223 (make_cleanup_restore_current_thread): Remove references to
9224 current_thread_cleanup_chain.
9225
9226 2017-04-10 Alan Hayward <alan.hayward@arm.com>
9227
9228 * msp430-tdep.c (msp430_pseudo_register_read): Never return
9229 REG_UNKNOWN.
9230
9231 2017-04-10 Yao Qi <yao.qi@linaro.org>
9232
9233 PR gdb/19942
9234 * gdbthread.h (thread_info::deletable): New method.
9235 (thread_info::incref): New method.
9236 (thread_info::decref): New method.
9237 (thread_info::refcount): Move it to private.
9238 * infrun.c (save_stop_context): Call inc_refcount.
9239 (release_stop_context_cleanup): Likewise.
9240 * thread.c (set_thread_exited): New function.
9241 (init_thread_list): Delete "tp" only it is deletable, otherwise
9242 call set_thread_exited.
9243 (delete_thread_1): Call set_thread_exited.
9244 (current_thread_cleanup) <inferior_pid>: Remove.
9245 <thread>: New field.
9246 (restore_current_thread_ptid_changed): Removed.
9247 (do_restore_current_thread_cleanup): Adjust.
9248 (restore_current_thread_cleanup_dtor): Don't call
9249 find_thread_ptid.
9250 (set_thread_refcount): Use dec_refcount.
9251 (make_cleanup_restore_current_thread): Adjust.
9252 (thread_apply_all_command): Call inc_refcount.
9253 (_initialize_thread): Don't call
9254 observer_attach_thread_ptid_changed.
9255
9256 2017-04-10 Yao Qi <yao.qi@linaro.org>
9257
9258 * thread.c (delete_thread_1): Hoist code on marking thread as
9259 exited.
9260
9261 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9262
9263 * windows-nat.c (windows_detach): Initialize ptid with
9264 minus_one_ptid.
9265
9266 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
9267
9268 * unittests/ptid-selftests.c: Fix erroneous assert messages.
9269
9270 2017-04-07 Alan Hayward <alan.hayward@arm.com>
9271
9272 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9273 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9274 (bfin_pseudo_register_write): Likewise
9275
9276 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
9277
9278 * common/ptid.h (struct ptid): Change to...
9279 (class ptid_t): ... this.
9280 <ptid_t>: New constructors.
9281 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9282 matches>: New methods.
9283 <make_null, make_minus_one>: New static methods.
9284 <pid>: Rename to...
9285 <m_pid>: ...this.
9286 <lwp>: Rename to...
9287 <m_lwp>: ...this.
9288 <tid>: Rename to...
9289 <m_tid>: ...this.
9290 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9291 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9292 as references, move comment to class ptid_t.
9293 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9294 ptid_t static methods.
9295 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9296 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9297 Take ptid arguments as references, implement using ptid_t methods.
9298 * unittests/ptid-selftests.c: New file.
9299 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9300 unittests/ptid-selftests.c.
9301 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9302
9303 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
9304
9305 * python/python.c (python_run_simple_file): Cast mode literal to
9306 non-const char pointer as expected by PyFile_FromString.
9307
9308 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
9309
9310 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9311 minus_one_ptid and null_ptid.
9312
9313 2017-04-05 Pedro Alves <palves@redhat.com>
9314
9315 * warning.m4 (build_warnings): Remove -Wno-write-strings.
9316 * configure: Regenerate.
9317
9318 2017-04-05 Pedro Alves <palves@redhat.com>
9319
9320 * ada-exp.y (yyerror): Constify.
9321 * ada-lang.c (bound_name, get_selections)
9322 (ada_variant_discrim_type)
9323 (ada_variant_discrim_name, ada_value_struct_elt)
9324 (ada_lookup_struct_elt_type, is_unchecked_variant)
9325 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9326 (catch_ada_exception_command_split)
9327 (catch_ada_assert_command_split, catch_assert_command)
9328 (ada_op_name): Constify.
9329 * ada-lang.h (ada_yyerror, get_selections)
9330 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9331 * arc-tdep.c (arc_print_frame_cache): Constify.
9332 * arm-tdep.c (arm_skip_stub): Constify.
9333 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9334 (gen_aggregate_elt_ref): Constify.
9335 * bcache.c (print_bcache_statistics): Constify.
9336 * bcache.h (print_bcache_statistics): Constify.
9337 * break-catch-throw.c (catch_exception_command_1):
9338 * breakpoint.c (struct ep_type_description::description):
9339 Constify.
9340 (add_solib_catchpoint): Constify.
9341 (catch_fork_command_1): Add cast.
9342 (add_catch_command): Constify.
9343 * breakpoint.h (add_catch_command, add_solib_catchpoint):
9344 Constify.
9345 * bsd-uthread.c (bsd_uthread_state): Constify.
9346 * buildsym.c (patch_subfile_names): Constify.
9347 * buildsym.h (next_symbol_text_func, patch_subfile_names):
9348 Constify.
9349 * c-exp.y (yyerror): Constify.
9350 (token::oper): Constify.
9351 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9352 * c-varobj.c (cplus_describe_child): Constify.
9353 * charset.c (find_charset_names): Add cast.
9354 (find_charset_names): Constify array and add const_cast.
9355 * cli/cli-cmds.c (complete_command, cd_command): Constify.
9356 (edit_command): Constify.
9357 * cli/cli-decode.c (lookup_cmd): Constify.
9358 * cli/cli-dump.c (dump_memory_command, dump_value_command):
9359 Constify.
9360 (struct dump_context): Constify.
9361 (add_dump_command, restore_command): Constify.
9362 * cli/cli-script.c (get_command_line): Constify.
9363 * cli/cli-script.h (get_command_line): Constify.
9364 * cli/cli-utils.c (check_for_argument): Constify.
9365 * cli/cli-utils.h (check_for_argument): Constify.
9366 * coff-pe-read.c (struct read_pe_section_data): Constify.
9367 * command.h (lookup_cmd): Constify.
9368 * common/print-utils.c (decimal2str): Constify.
9369 * completer.c (gdb_print_filename): Constify.
9370 * corefile.c (set_gnutarget): Constify.
9371 * cp-name-parser.y (yyerror): Constify.
9372 * cp-valprint.c (cp_print_class_member): Constify.
9373 * cris-tdep.c (cris_register_name, crisv32_register_name):
9374 Constify.
9375 * d-exp.y (yyerror): Constify.
9376 (struct token::oper): Constify.
9377 * d-lang.h (d_yyerror): Constify.
9378 * dbxread.c (struct header_file_location::name): Constify.
9379 (add_old_header_file, add_new_header_file, last_function_name)
9380 (dbx_next_symbol_text, add_bincl_to_list)
9381 (find_corresponding_bincl_psymtab, set_namestring)
9382 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9383 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9384 * defs.h (command_line_input, print_address_symbolic)
9385 (deprecated_readline_begin_hook): Constify.
9386 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9387 Constify.
9388 * event-top.c (handle_line_of_input): Constify and add cast.
9389 * exceptions.c (catch_errors): Constify.
9390 * exceptions.h (catch_errors): Constify.
9391 * expprint.c (print_subexp_standard, op_string, op_name)
9392 (op_name_standard, dump_raw_expression, dump_raw_expression):
9393 * expression.h (op_name, op_string, dump_raw_expression):
9394 Constify.
9395 * f-exp.y (yyerror): Constify.
9396 (struct token::oper): Constify.
9397 (struct f77_boolean_val::name): Constify.
9398 * f-lang.c (f_word_break_characters): Constify.
9399 * f-lang.h (f_yyerror): Constify.
9400 * fork-child.c (fork_inferior): Add cast.
9401 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9402 (new_variant): Constify.
9403 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9404 * gdbarch.c: Regenerate.
9405 * gdbcore.h (set_gnutarget): Constify.
9406 * go-exp.y (yyerror): Constify.
9407 (token::oper): Constify.
9408 * go-lang.h (go_yyerror): Constify.
9409 * go32-nat.c (go32_sysinfo): Constify.
9410 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9411 * guile/scm-cmd.c (cmdscm_function): Constify.
9412 * guile/scm-param.c (pascm_param_value): Constify.
9413 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9414 (h8300sx_register_name): Constify.
9415 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9416 Constify.
9417 * ia64-tdep.c (ia64_register_names): Constify.
9418 * infcmd.c (construct_inferior_arguments): Constify.
9419 (path_command, attach_post_wait): Constify.
9420 * language.c (show_range_command, show_case_command)
9421 (unk_lang_error): Constify.
9422 * language.h (language_defn::la_error)
9423 (language_defn::la_name_of_this): Constify.
9424 * linespec.c (decode_line_2): Constify.
9425 * linux-thread-db.c (thread_db_err_str): Constify.
9426 * lm32-tdep.c (lm32_register_name): Constify.
9427 * m2-exp.y (yyerror): Constify.
9428 * m2-lang.h (m2_yyerror): Constify.
9429 * m32r-tdep.c (m32r_register_names): Constify and make static.
9430 * m68hc11-tdep.c (m68hc11_register_names): Constify.
9431 * m88k-tdep.c (m88k_register_name): Constify.
9432 * macroexp.c (appendmem): Constify.
9433 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9434 (upgrade_type, parse_external, parse_partial_symbols)
9435 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9436 (new_symbol): Constify.
9437 * memattr.c (mem_info_command): Constify.
9438 * mep-tdep.c (register_name_from_keyword): Constify.
9439 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9440 Constify.
9441 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9442 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9443 * mi/mi-main.c (captured_mi_execute_command): Constify and add
9444 cast.
9445 (mi_execute_async_cli_command): Constify.
9446 * mips-tdep.c (mips_register_name): Constify.
9447 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9448 (am33_register_name, am33_2_register_name)
9449 * moxie-tdep.c (moxie_register_names): Constify.
9450 * nat/linux-osdata.c (osdata_type): Constify fields.
9451 * nto-tdep.c (nto_parse_redirection): Constify.
9452 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9453 (lookup_child_selector): Constify.
9454 (objc_methcall::name): Constify.
9455 * objc-lang.h (lookup_objc_class, lookup_child_selector)
9456 (lookup_struct_typedef): Constify.
9457 * objfiles.c (pc_in_section): Constify.
9458 * objfiles.h (pc_in_section): Constify.
9459 * p-exp.y (struct token::oper): Constify.
9460 (yyerror): Constify.
9461 * p-lang.h (pascal_yyerror): Constify.
9462 * parser-defs.h (op_name_standard): Constify.
9463 (op_print::string): Constify.
9464 (exp_descriptor::op_name): Constify.
9465 * printcmd.c (print_address_symbolic): Constify.
9466 * psymtab.c (print_partial_symbols): Constify.
9467 * python/py-breakpoint.c (stop_func): Constify.
9468 (bppy_get_expression): Constify.
9469 * python/py-cmd.c (cmdpy_completer::name): Constify.
9470 (cmdpy_function): Constify.
9471 * python/py-event.c (evpy_add_attribute)
9472 (gdbpy_initialize_event_generic): Constify.
9473 * python/py-event.h (evpy_add_attribute)
9474 (gdbpy_initialize_event_generic): Constify.
9475 * python/py-evts.c (add_new_registry): Constify.
9476 * python/py-finishbreakpoint.c (outofscope_func): Constify.
9477 * python/py-framefilter.c (get_py_iter_from_func): Constify.
9478 * python/py-inferior.c (get_buffer): Add cast.
9479 * python/py-param.c (parm_constant::name): Constify.
9480 * python/py-unwind.c (fprint_frame_id): Constify.
9481 * python/python.c (gdbpy_parameter_value): Constify.
9482 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9483 * remote.c (memory_packet_config::name): Constify.
9484 (show_packet_config_cmd, remote_write_bytes)
9485 (remote_buffer_add_string):
9486 * reverse.c (exec_reverse_once): Constify.
9487 * rs6000-tdep.c (variant::name, variant::description): Constify.
9488 * rust-exp.y (rustyyerror): Constify.
9489 * rust-lang.c (rust_op_name): Constify.
9490 * rust-lang.h (rustyyerror): Constify.
9491 * serial.h (serial_ops::name): Constify.
9492 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9493 (sh_sh3e_register_name, sh_sh2e_register_name)
9494 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9495 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9496 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9497 (sh_sh4al_dsp_register_name): Constify.
9498 * sh64-tdep.c (sh64_register_name): Constify.
9499 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9500 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9501 * stabsread.c (patch_block_stabs, read_type_number)
9502 (ref_map::stabs, ref_add, process_reference)
9503 (symbol_reference_defined, define_symbol, define_symbol)
9504 (error_type, read_type, read_member_functions, read_cpp_abbrev)
9505 (read_one_struct_field, read_struct_fields, read_baseclasses)
9506 (read_tilde_fields, read_struct_type, read_array_type)
9507 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9508 (read_huge_number, read_range_type, read_args, common_block_start)
9509 (find_name_end): Constify.
9510 * stabsread.h (common_block_start, define_symbol)
9511 (process_one_symbol, symbol_reference_defined, ref_add):
9512 * symfile.c (get_section_index, add_symbol_file_command):
9513 * symfile.h (get_section_index): Constify.
9514 * target-descriptions.c (tdesc_type::name): Constify.
9515 (tdesc_free_type): Add cast.
9516 * target.c (find_default_run_target):
9517 (add_deprecated_target_alias, find_default_run_target)
9518 (target_announce_detach): Constify.
9519 (do_option): Constify.
9520 * target.h (add_deprecated_target_alias): Constify.
9521 * thread.c (print_thread_info_1): Constify.
9522 * top.c (deprecated_readline_begin_hook, command_line_input):
9523 Constify.
9524 (init_main): Add casts.
9525 * top.h (handle_line_of_input): Constify.
9526 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9527 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9528 (tfind_command): Rename to ...
9529 (tfind_command_1): ... this and constify.
9530 (tfind_command): New function.
9531 (tfind_end_command, tfind_start_command): Adjust.
9532 (encode_source_string): Constify.
9533 * tracepoint.h (encode_source_string): Constify.
9534 * tui/tui-data.c (tui_partial_win_by_name): Constify.
9535 * tui/tui-data.h (tui_partial_win_by_name): Constify.
9536 * tui/tui-source.c (tui_set_source_content_nil): Constify.
9537 * tui/tui-source.h (tui_set_source_content_nil): Constify.
9538 * tui/tui-win.c (parse_scrolling_args): Constify.
9539 * tui/tui-windata.c (tui_erase_data_content): Constify.
9540 * tui/tui-windata.h (tui_erase_data_content): Constify.
9541 * tui/tui-winsource.c (tui_erase_source_content): Constify.
9542 * tui/tui.c (tui_enable): Add cast.
9543 * utils.c (defaulted_query): Constify.
9544 (init_page_info): Add cast.
9545 (puts_debug, subset_compare): Constify.
9546 * utils.h (subset_compare): Constify.
9547 * varobj.c (varobj_format_string): Constify.
9548 * varobj.h (varobj_format_string): Constify.
9549 * vax-tdep.c (vax_register_name): Constify.
9550 * windows-nat.c (windows_detach): Constify.
9551 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9552 * xml-support.c (gdb_xml_end_element): Constify.
9553 * xml-tdesc.c (tdesc_start_reg): Constify.
9554 * xstormy16-tdep.c (xstormy16_register_name): Constify.
9555 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9556 * xtensa-tdep.h (xtensa_register_t::name): Constify.
9557
9558 2017-04-05 Pedro Alves <palves@redhat.com>
9559
9560 * proc-api.c (struct trans): Constify.
9561 (procfs_note): Constify.
9562 * proc-events.c (struct trans, syscall_table):
9563 * proc-flags.c (struct trans): Constify.
9564 * proc-utils.h (procfs_note): Constify.
9565 * proc-why.c (struct trans): Constify.
9566 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9567 (procfs_detach): Constify.
9568 * sol-thread.c (struct string_map): Constify.
9569 (td_err_string, td_state_string): Constify.
9570
9571 2017-04-05 Pedro Alves <palves@redhat.com>
9572
9573 * proc-api.c (procfs_filename): Don't initialize
9574 procfs_filename.
9575 (prepare_to_trace): Assume procfs_filename is non-NULL.
9576 (_initialize_proc_api): Give procfs_filename a default value here.
9577
9578 2017-04-05 Pedro Alves <palves@redhat.com>
9579
9580 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9581 'cond_string' parameter.
9582 (extract_exception_regexp): Constify 'string' parameter.
9583 (catch_exception_command_1): Constify.
9584 * breakpoint.c (init_catchpoint)
9585 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9586 parameter.
9587 (ep_parse_optional_if_clause, catch_fork_command_1)
9588 (catch_exec_command_1): Constify.
9589 * breakpoint.h (init_catchpoint): Constify 'cond_string'
9590 parameter.
9591 (ep_parse_optional_if_clause): Constify.
9592 * cli/cli-utils.c (remove_trailing_whitespace)
9593 (check_for_argument): Constify.
9594 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9595 non-const overload.
9596 (check_for_argument): Likewise.
9597
9598 2017-04-05 Pedro Alves <palves@redhat.com>
9599
9600 * event-top.c (command_line_handler): Add cast to execute_command
9601 call.
9602 * record-btrace.c (cmd_record_btrace_bts_start)
9603 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9604 (cmd_record_btrace_start): Add cast to execute_command call.
9605 * record-full.c (record_full_goto_insn):
9606 * record.c (record_start, record_stop): Add cast to
9607 execute_command_to_string calls.
9608 (cmd_record_start): Add cast to execute_command calls.
9609
9610 2017-04-05 Pedro Alves <palves@redhat.com>
9611
9612 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9613 static inline function.
9614 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9615 array and use gdb_PyArg_ParseTupleAndKeywords.
9616 * python/py-cmd.c (cmdpy_init): Likewise.
9617 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9618 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9619 (infpy_search_memory): Likewise.
9620 * python/py-objfile.c (objfpy_add_separate_debug_file)
9621 (gdbpy_lookup_objfile): Likewise.
9622 * python/py-symbol.c (gdbpy_lookup_symbol)
9623 (gdbpy_lookup_global_symbol): Likewise.
9624 * python/py-type.c (gdbpy_lookup_type): Likewise.
9625 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9626 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9627 Likewise.
9628
9629 2017-04-05 Pedro Alves <palves@redhat.com>
9630
9631 * python/python-internal.h (gdb_PyGetSetDef): New type.
9632 * python/py-block.c (block_object_getset)
9633 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9634 * python/py-event.c (event_object_getset)
9635 (finish_breakpoint_object_getset): Likewise.
9636 * python/py-inferior.c (inferior_object_getset): Likewise.
9637 * python/py-infthread.c (thread_object_getset): Likewise.
9638 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9639 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9640 * python/py-objfile.c (objfile_getset): Likewise.
9641 * python/py-progspace.c (pspace_getset): Likewise.
9642 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9643 Likewise.
9644 * python/py-record.c (recpy_record_getset): Likewise.
9645 * python/py-symbol.c (symbol_object_getset): Likewise.
9646 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9647 Likewise.
9648 * python/py-type.c (type_object_getset, field_object_getset):
9649 Likewise.
9650 * python/py-value.c (value_object_getset): Likewise.
9651
9652 2017-04-05 Pedro Alves <palves@redhat.com>
9653
9654 * python/python-internal.h (gdb_PyObject_CallMethod)
9655 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9656 New functions.
9657 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9658 (PySys_GetObject, PySys_SetPath): New macros.
9659
9660 2017-04-05 Pedro Alves <palves@redhat.com>
9661
9662 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9663 info_osdata_command.
9664 * osdata.c (info_osdata_command): Rename to ...
9665 (info_osdata): ... this. Constify 'type' parameter, and remove
9666 the 'from_tty' parameter. Accept NULL TYPE.
9667 (info_osdata_command): New function.
9668 * osdata.h (info_osdata_command): Remove declaration.
9669 (info_osdata): New declaration.
9670
9671 2017-04-05 Pedro Alves <palves@redhat.com>
9672
9673 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9674 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9675 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9676 parameter.
9677 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9678 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9679 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9680 parameter.
9681 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9682 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9683 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9684 (mi_cmd_file_list_exec_source_files)
9685 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9686 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9687 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9688 parameter.
9689 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9690 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9691 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9692 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9693 (mi_cmd_stack_info_frame): Constify 'command' parameter.
9694 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9695 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9696 'command' parameter.
9697 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9698 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9699 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9700 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9701 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9702 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9703 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9704 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9705 (mi_cmd_var_set_update_range): Constify 'command' parameter.
9706 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9707 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9708 parameter.
9709 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9710 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9711 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9712 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9713 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9714 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9715 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9716 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9717 (mi_cmd_data_list_changed_registers)
9718 (mi_cmd_data_write_register_values)
9719 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9720 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9721 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9722 (mi_cmd_list_features, mi_cmd_list_target_features)
9723 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9724 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9725 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9726 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9727 (mi_cmd_trace_frame_collected): Constify 'command'
9728 parameter.
9729 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9730 'command' parameter.
9731
9732 2017-04-05 Pedro Alves <palves@redhat.com>
9733
9734 * ada-lang.c (ada_completer_word_break_characters): Now a const
9735 array.
9736 (ada_get_gdb_completer_word_break_characters): Constify.
9737 * completer.c (gdb_completer_command_word_break_characters)
9738 (gdb_completer_file_name_break_characters)
9739 (gdb_completer_quote_characters): Now const arrays.
9740 (get_gdb_completer_quote_characters): Constify.
9741 (set_rl_completer_word_break_characters): New function.
9742 (set_gdb_completion_word_break_characters)
9743 (complete_line_internal): Use it.
9744 * completer.h (get_gdb_completer_quote_characters): Constify.
9745 (set_rl_completer_word_break_characters): Declare.
9746 * f-lang.c (f_word_break_characters): Constify.
9747 * language.c (default_word_break_characters): Constify.
9748 * language.h (language_defn::la_word_break_characters): Constify.
9749 (default_word_break_characters): Constify.
9750 * top.c (init_main): Use set_rl_completer_word_break_characters.
9751
9752 2017-04-05 Pedro Alves <palves@redhat.com>
9753
9754 * aix-thread.c (aix_thread_pid_to_str)
9755 (aix_thread_extra_thread_info): Constify.
9756 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9757 * bsd-uthread.c (bsd_uthread_extra_thread_info)
9758 (bsd_uthread_pid_to_str): Constify.
9759 * corelow.c (core_pid_to_str): Constify.
9760 * darwin-nat.c (darwin_pid_to_str): Constify.
9761 * fbsd-nat.c (fbsd_pid_to_str): Constify.
9762 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9763 Constify.
9764 * gnu-nat.c (gnu_pid_to_str): Constify.
9765 * go32-nat.c (go32_pid_to_str): Constify.
9766 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9767 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9768 * inferior.c (inferior_pid_to_str): Constify.
9769 * linux-nat.c (linux_nat_pid_to_str): Constify.
9770 * linux-tdep.c (linux_core_pid_to_str): Constify.
9771 * linux-thread-db.c (thread_db_pid_to_str)
9772 (thread_db_extra_thread_info): Constify.
9773 * nto-tdep.c (nto_extra_thread_info): Constify.
9774 * nto-tdep.h (nto_extra_thread_info): Constify.
9775 * obsd-nat.c (obsd_pid_to_str): Constify.
9776 * procfs.c (procfs_pid_to_str): Constify.
9777 * ravenscar-thread.c (ravenscar_extra_thread_info)
9778 (ravenscar_pid_to_str): Constify.
9779 * remote-sim.c (gdbsim_pid_to_str): Constify.
9780 * remote.c (remote_threads_extra_info, remote_pid_to_str):
9781 Constify.
9782 * sol-thread.c (solaris_pid_to_str): Constify.
9783 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9784 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9785 * target.c (default_pid_to_str, target_pid_to_str)
9786 (normal_pid_to_str, default_pid_to_str): Constify.
9787 * target.h (target_ops::to_pid_to_str)
9788 (target_ops::to_extra_thread_info): Constify.
9789 (target_pid_to_str, normal_pid_to_str): Constify.
9790 * windows-nat.c (windows_pid_to_str): Constify.
9791 * gdbarch.sh (core_pid_to_str): Constify.
9792 * target-delegates.c: Regenerate.
9793 * gdbarch.h, gdbarch.c: Regenerate.
9794
9795 2017-04-05 Pedro Alves <palves@redhat.com>
9796
9797 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9798 the memory of the temporary warning_pre_print override.
9799 * utils.c (warning_pre_print): Constify.
9800 * utils.h (warning_pre_print): Constify.
9801
9802 2017-04-05 Pedro Alves <palves@redhat.com>
9803
9804 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9805 (shell_command): New function.
9806 (make_command): Use std::string.
9807 (init_cli_cmds): Register shell_command instead of shell_escape.
9808
9809 2017-04-05 Pedro Alves <palves@redhat.com>
9810
9811 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9812 * tracepoint.c (default_collect): Don't initialize.
9813
9814 2017-04-05 Pedro Alves <palves@redhat.com>
9815
9816 * macroexp.c (macro_buffer::shared): Now a bool.
9817 (init_buffer): Update.
9818 (init_shared_buffer): Constify 'addr' parameter.
9819 (substitute_args, expand, macro_expand, macro_expand_next): Remove
9820 casts.
9821
9822 2017-04-05 Pedro Alves <palves@redhat.com>
9823
9824 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9825 * disasm.c (set_disassembler_options): Constify local.
9826 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9827
9828 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
9829
9830 PR gdb/21352
9831 * tracefile.c (tsave_command): Fix argument parsing for '-r'
9832 option.
9833
9834 2017-04-05 Yao Qi <yao.qi@linaro.org>
9835
9836 * frame.c (frame_unwind_register_unsigned): Call
9837 frame_unwind_register_value.
9838
9839 2017-04-05 Yao Qi <yao.qi@linaro.org>
9840
9841 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9842 Use gdb_test_multiple, and don't match anchor.
9843
9844 2017-04-05 Pedro Alves <palves@redhat.com>
9845
9846 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9847 (Write After Approval): Remove Simon Marchi.
9848
9849 2017-04-05 Pedro Alves <palves@redhat.com>
9850
9851 * common/gdb_optional.h (optional::optional): Make constexpr and
9852 initialize m_dummy.
9853
9854 2017-04-04 John Baldwin <jhb@FreeBSD.org>
9855
9856 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9857 (amd64fbsd_jmp_buf_reg_offset): Remove.
9858 (amd64fbsd_supply_uthread): Remove function.
9859 (amd64fbsd_collect_uthread): Remove function.
9860 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9861 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9862 (x86_64-*-freebsd*): Remove bsd-uthread.o.
9863 (fbsd-nat.c): Update comment.
9864 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9865 (i386fbsd_jmp_buf_reg_offset): Remove.
9866 (i386fbsd_supply_uthread): Remove function.
9867 (i386fbsd_collect_uthread): Remove function.
9868 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9869
9870 2017-04-04 John Baldwin <jhb@FreeBSD.org>
9871
9872 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9873 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9874 * NEWS: Mention that support for FreeBSD/alpha was removed.
9875 * alpha-fbsd-tdep.c: Delete file.
9876 * config/alpha/fbsd.mh: Delete file.
9877 * configure.host: Delete alpha*-*-freebsd* and
9878 alpha*-*-kfreebsd*-gnu.
9879 * configure.tgt: Delete alpha*-*-freebsd* and
9880 alpha*-*-kfreebsd*-gnu.
9881
9882 2017-04-04 John Baldwin <jhb@FreeBSD.org>
9883
9884 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9885 amd64bsd_store_inferior_registers): Use ptid from regcache.
9886
9887 2017-04-04 Pedro Alves <palves@redhat.com>
9888
9889 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
9890 data fields, make them private and add "m_" prefixes.
9891 (lnp_state_machine::lnp_state_machine): New ctor.
9892 (record_line, check_line_address, handle_set_discriminator)
9893 (handle_set_address, handle_advance_pc, handle_special_opcode)
9894 (handle_advance_line, handle_set_file, handle_negate_stmt)
9895 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9896 (end_sequence, advance_line): New methods.
9897 (m_gdbarch, m_record_lines_p): New fields.
9898 (lnp_reader_state): Delete.
9899 (dwarf_record_line): Rename to ...
9900 (lnp_state_machine::record_line): ... adjust.
9901 (init_lnp_state_machine): Delete.
9902 (lnp_state_machine::lnp_state_machine): New.
9903 (check_line_address): Rename to ...
9904 (lnp_state_machine::check_line_address): This.
9905 (dwarf_decode_lines_1): Remove reference to "reader_state".
9906 Adjust lnp_state_machine having a non-default ctor. Use bool.
9907 State machine internal state manipulation moved to
9908 lnp_state_machine methods.
9909
9910 2017-04-04 Pedro Alves <palves@redhat.com>
9911
9912 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9913 unittests/offset-type-selftests.c.
9914 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9915 * common/offset-type.h: New file.
9916 * common/preprocessor.h: New file.
9917 * common/traits.h: New file.
9918 * common/valid-expr.h: New file.
9919 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
9920 sect_offset and cu_offset strong typedefs throughout.
9921 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9922 typedefs throughout.
9923 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
9924 sect_offset and cu_offset strong typedefs throughout.
9925 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9926 typedefs throughout.
9927 * gdbtypes.h: Include "common/offset-type.h".
9928 (cu_offset): Now an offset type (strong typedef) instead of a
9929 struct.
9930 (sect_offset): Likewise.
9931 (union call_site_parameter_u): Rename "param_offset" field to
9932 "param_cu_off".
9933 * unittests/offset-type-selftests.c: New file.
9934
9935 2017-04-04 Pedro Alves <palves@redhat.com>
9936
9937 * common/underlying.h: New file.
9938 * dwarf2read.c: Include "common/gdb_optional.h" and
9939 "common/underlying.h".
9940 (dir_index, file_name_index): New types.
9941 (file_entry): Use them.
9942 (file_entry::include): Use to_underlying.
9943 (line_header::add_file_name): Use dir_index.
9944 (read_formatted_entries): Use gdb::optional. Read form before
9945 writting to file_entry.
9946 (dwarf_decode_line_header): Use dir_index.
9947 (lnp_state_machine::current_file): Use to_underlying.
9948 (lnp_state_machine::file): Change type to file_name_index.
9949 (dwarf_record_line): Use to_underlying.
9950 (init_lnp_state_machine): Use file_name_index.
9951 (dwarf_decode_lines_1): Use dir_index and file_name_index.
9952
9953 2017-04-04 Pedro Alves <palves@redhat.com>
9954
9955 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9956 operator bool, has_value and get methods.
9957
9958 2017-04-04 Pedro Alves <palves@redhat.com>
9959
9960 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9961 fields.
9962 (line_header): Initialize all data fields. Change type of
9963 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9964 Change type of include_dirs to std::vector<const char *>. Remove
9965 num_include_dirs, include_dirs_size. Change type of file_names to
9966 std::vector<file_entry>. Remove num_file_names, file_names_size.
9967 (line_header::line_header): New.
9968 (line_header::add_include_dir, line_header::add_file_name): New
9969 methods.
9970 (line_header::include_dir_at): Remove NULL check.
9971 (line_header::file_name_at): Add const overload.
9972 (line_header_up): New unique_ptr typedef.
9973 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
9974 std::vector. Remove free_line_header call.
9975 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
9976 free_line_header call.
9977 (free_cu_line_header): Delete.
9978 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9979 (setup_type_unit_groups): Use line_header_up instead of cleanups.
9980 Adjust to use std::vector.
9981 (free_line_header): Delete.
9982 (free_line_header_voidp): Use delete.
9983 (add_include_dir): Replace with ...
9984 (line_header::add_include_dir): ... this method. Use std::vector.
9985 (add_file_name): Replace with ...
9986 (line_header::add_file_name): ... this method. Use std::vector.
9987 (add_include_dir_stub): Delete.
9988 (read_formatted_entries): Remove memset.
9989 (dwarf_decode_line_header): Return a line_header_up instead of a
9990 raw pointer. Remove cleanup handling. Pass lambdas to
9991 read_formatted_entries. Adjust to use line_header methods.
9992 (dwarf_decode_lines_1): Adjust to use line_header methods.
9993 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9994 use std::vector.
9995
9996 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
9997
9998 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9999 instead of struct ptid.
10000
10001 2017-05-04 Alan Hayward <alan.hayward@arm.com>
10002
10003 * frame.c (get_frame_register_bytes): Unwind using value.
10004 (put_frame_register_bytes): Likewise.
10005
10006 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
10007
10008 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
10009 aggregate-like.
10010
10011 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
10012
10013 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
10014
10015 2017-03-29 Yao Qi <yao.qi@linaro.org>
10016
10017 * gdbthread.h (struct thread_info): Declare constructor and
10018 destructor. Add some in-class member initializers.
10019 * thread.c (free_thread): Remove.
10020 (init_thread_list): Call delete instead of free_thread.
10021 (new_thread): Call thread_info constructor.
10022 (thread_info::thread_info): New function.
10023 (thread_info::~thread_info): New function.
10024 (delete_thread_1): Call delete instead of free_thread.
10025 (make_cleanup_restore_current_thread): Move tp and frame to
10026 inner block.
10027
10028 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10029
10030 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
10031 (arc_skip_prologue): Likewise.
10032 (arc_make_frame_cache): Likewise.
10033 (arc_pv_get_operand): New function.
10034 (arc_is_in_prologue): Likewise.
10035 (arc_analyze_prologue): Likewise.
10036 (arc_print_frame_cache): Likewise.
10037 (MAX_PROLOGUE_LENGTH): New constant.
10038
10039 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10040
10041 * configure.tgt: Add arc-insn.o.
10042 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
10043 (dump_arc_instruction_command): New function.
10044 (arc_fprintf_disasm): Likewise.
10045 (arc_disassemble_info): Likewise.
10046 (arc_insn_get_operand_value): Likewise.
10047 (arc_insn_get_operand_value_signed): Likewise.
10048 (arc_insn_get_memory_base_reg): Likewise.
10049 (arc_insn_get_memory_offset): Likewise.
10050 (arc_insn_get_branch_target): Likewise.
10051 (arc_insn_dump): Likewise.
10052 (arc_insn_get_linear_next_pc): Likewise.
10053 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
10054 (arc_disassemble_info): Likewise.
10055 (arc_insn_get_branch_target): Likewise.
10056 (arc_insn_get_linear_next_pc): Likewise.
10057 * NEWS: Mention new "maint print arc arc-instruction".
10058
10059 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10060
10061 * arc-tdep (maintenance_print_arc_list): New variable.
10062 (maintenance_print_arc_command): New function.
10063
10064 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10065
10066 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
10067 Add "limm" and "reserved".
10068 (arc_cannot_fetch_register, arc_cannot_store_register): Add
10069 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
10070 * arc-tdep.h (arc_regnum): Likewise.
10071
10072 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10073
10074 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10075 for THREADPTR register.
10076 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
10077 register.
10078 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
10079 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
10080 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
10081
10082 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10083
10084 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
10085 registers above gdbarch_num_regs (gdbarch) as privileged in
10086 call0 ABI.
10087
10088 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10089
10090 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10091 for a single specified register or for all registers in
10092 a0_base..a0_base + C0_NREGS range.
10093 (supply_gregset_reg): Call regcache_raw_supply for a single
10094 specified register or for all registers in a0_base..a0_base +
10095 C0_NREGS range.
10096
10097 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10098
10099 * arch/xtensa.h (C0_NREGS): Add definition.
10100 * xtensa-tdep.c (C0_NREGS): Remove definition.
10101
10102 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10103
10104 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
10105 Drop xtensa_default_isa initialization.
10106 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
10107
10108 2017-03-27 Pedro Alves <palves@redhat.com>
10109
10110 * dwarf2read.c (file_entry) <dir_index>: Add comment.
10111 (file_entry::include_dir): New method.
10112 (line_header::include_dir_at, line_header::file_name_at): New
10113 methods.
10114 (setup_type_unit_groups, setup_type_unit_groups)
10115 (psymtab_include_file_name): Simplify using the new methods.
10116 (lnp_state_machine) <the_line_header>: New field.
10117 <file>: Add comment.
10118 (lnp_state_machine::current_file): New method.
10119 (dwarf_record_line): Simplify using the new methods.
10120 (init_lnp_state_machine): Initialize the "the_line_header" field.
10121 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
10122 Simplify using the new methods.
10123
10124 2017-03-27 Pedro Alves <palves@redhat.com>
10125
10126 * cp-name-parser.y (make_empty): Delete.
10127 (demangler_special, nested_name, ptr_operator, array_indicator)
10128 (direct_declarator, declarator_1): Use fill_comp instead of
10129 make_empty.
10130
10131 2017-03-27 Pedro Alves <palves@redhat.com>
10132
10133 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
10134 to ATTRIBUTE_PRINTF.
10135 * solib-target.c (library_list_start_list): Print "string" not
10136 "version".
10137 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
10138 gdb_xml_error call.
10139
10140 2017-03-27 Pedro Alves <palves@redhat.com>
10141
10142 * dwarf2read.c (struct file_and_directory): New.
10143 (dwarf2_get_dwz_file): Adjust to use std::string.
10144 (dw2_get_file_names_reader): Adjust to use file_and_directory.
10145 (find_file_and_directory): Adjust to return a file_and_directory
10146 object.
10147 (read_file_scope): Adjust to use file_and_directory. Remove
10148 make_cleanup/do_cleanups calls.
10149 (open_and_init_dwp_file): Adjust to use std::string. Remove
10150 make_cleanup/do_cleanups calls.
10151 * python/python.c (do_start_initialization): Adjust to ldirname
10152 returning a std::string.
10153 * utils.c (ldirname): Now returns a std::string.
10154 * utils.h (ldirname): Change return type to std::string.
10155 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
10156 returning a std::string.
10157 * xml-tdesc.c (file_read_description_xml): Likewise.
10158
10159 2017-03-24 Alan Hayward <alan.hayward@arm.com>
10160
10161 * regcache.c (regcache_debug_print_register): New function.
10162 * regcache.h (regcache_debug_print_register): New declaration.
10163 * target.c (debug_print_register): Remove.
10164 (target_fetch_registers): Call regcache_debug_print_register.
10165 (target_store_registers): Likewise.
10166
10167 2017-03-24 Pádraig Brady <pbrady@fb.com>
10168
10169 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10170 reference beyond the 'lh->include_dirs' array before accessing to
10171 it.
10172 (psymtab_include_file_name): Likewise.
10173 (dwarf_decode_lines_1): Likewise.
10174 (dwarf_decode_lines): Likewise.
10175 (file_file_name): Likewise.
10176
10177 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
10178
10179 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10180 inferior_ptid.
10181 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10182 ps_lsetfpregs): Likewise.
10183 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10184 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10185 ps_lsetfpregs): Likewise.
10186 * target.c (target_fetch_registers, target_store_registers):
10187 Remove asserts.
10188
10189 2017-03-23 Alan Hayward <alan.hayward@arm.com>
10190
10191 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10192
10193 2017-03-23 Yao Qi <yao.qi@linaro.org>
10194
10195 * aarch64-tdep.c (aarch64_process_record_test): Declare.
10196 (_initialize_aarch64_tdep): Register it.
10197 (aarch64_record_load_store): Handle PRFM instruction.
10198 (aarch64_process_record_test): New function.
10199
10200 2017-03-23 Yao Qi <yao.qi@linaro.org>
10201
10202 * aarch64-tdep.c (aarch64_record_load_store): Fix code
10203 indentation.
10204
10205 2017-03-23 Yao Qi <yao.qi@linaro.org>
10206
10207 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10208
10209 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10210
10211 python/python.c (do_start_initialization): Fix memory leak.
10212
10213 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10214
10215 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10216 using get_ptrace_pid.
10217 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10218 inferior_ptid.
10219 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10220 inferior_ptid instead of pid.
10221
10222 2017-03-22 Yao Qi <yao.qi@linaro.org>
10223
10224 * aarch64-tdep.c: Wrap locally used classes in anonymous
10225 namespace.
10226 * arm-tdep.c: Likewise.
10227 * linespec.c: Likewise.
10228 * ui-out.c: Likewise.
10229
10230 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
10231
10232 PR gdb/19637
10233 * python/lib/gdb/printer/bound_registers.py: Import sys.
10234
10235 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
10236
10237 * windows-nat.c (do_windows_fetch_inferior_registers): Add
10238 windows_thread_info parameter and use it instead of
10239 current_thread.
10240 (windows_fetch_inferior_registers): Don't set current_thread,
10241 pass the thread to do_windows_fetch_inferior_registers. Use
10242 ptid from regcache instead of inferior_ptid.
10243 (do_windows_store_inferior_registers): Add windows_thread_info
10244 parameter and use it instead of current_thread.
10245 (windows_store_inferior_registers): Don't set current_thread,
10246 pass the thread to do_windows_store_inferior_registers. Use
10247 ptid from regcache instead of inferior_ptid.
10248
10249 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
10250
10251 * ser-mingw.c (ser_windows_raw): Remove reference to
10252 struct serial::current_timeout.
10253
10254 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
10255
10256 PR tdep/20928
10257 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10258 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10259 (sparc64_fsr_type): Fix %fsr decoding.
10260
10261 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
10262
10263 * python/py-record-btrace.c (btpy_insn_data): Change return type
10264 for Python 2.
10265
10266 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
10267
10268 * spu-linux-nat.c (spu_fetch_inferior_registers,
10269 spu_store_inferior_registers): Use ptid from regcache, set and
10270 restore inferior_ptid.
10271 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10272 Likewise.
10273
10274 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
10275
10276 * i386-linux-nat.c (fetch_register, store_register,
10277 i386_linux_fetch_inferior_registers,
10278 i386_linux_store_inferior_registers): Use ptid from regcache.
10279 * ia64-linux-nat.c (ia64_linux_fetch_register,
10280 ia64_linux_store_register): Likewise.
10281 * inf-ptrace.c (inf_ptrace_fetch_register,
10282 inf_ptrace_store_register): Likewise.
10283 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10284 m32r_linux_store_inferior_registers): Likewise.
10285 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10286 m68kbsd_store_inferior_registers): Likewise.
10287 * m68k-linux-nat.c (fetch_register, store_register,
10288 m68k_linux_fetch_inferior_registers,
10289 m68k_linux_store_inferior_registers): Likewise.
10290 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10291 m88kbsd_store_inferior_registers): Likewise.
10292 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10293 mips_fbsd_store_inferior_registers): Likewise.
10294 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10295 mips64_linux_regsets_store_registers): Likewise.
10296 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10297 mipsnbsd_store_inferior_registers): Likewise.
10298 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10299 mips64obsd_store_inferior_registers): Likewise.
10300 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10301 Likewise.
10302 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10303 ppcfbsd_store_inferior_registers): Likewise.
10304 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10305 ppc_linux_store_inferior_registers): Likewise.
10306 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10307 ppcnbsd_store_inferior_registers): Likewise.
10308 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10309 ppcobsd_store_registers): Likewise.
10310 * procfs.c (procfs_fetch_registers, procfs_store_registers):
10311 Likewise.
10312 * ravenscar-thread.c (ravenscar_fetch_registers,
10313 ravenscar_store_registers, ravenscar_prepare_to_store):
10314 Likewise.
10315 * record-btrace.c (record_btrace_fetch_registers,
10316 record_btrace_store_registers, record_btrace_prepare_to_store):
10317 Likewise.
10318 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10319 Lookup inferior using ptid from regcache, instead of
10320 current_inferior.
10321 * remote.c (remote_fetch_registers, remote_store_registers): Use
10322 ptid from regcache.
10323 * rs6000-nat.c (fetch_register, store_register): Likewise.
10324 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10325 s390_linux_store_inferior_registers): Likewise.
10326 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10327 shnbsd_store_inferior_registers): Likewise.
10328 * sol-thread.c (sol_thread_fetch_registers,
10329 sol_thread_store_registers): Likewise.
10330 * sparc-nat.c (sparc_fetch_inferior_registers,
10331 sparc_store_inferior_registers): Likewise.
10332 * tilegx-linux-nat.c (fetch_inferior_registers,
10333 store_inferior_registers): Likewise.
10334 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10335 vaxbsd_store_inferior_registers): Likewise.
10336 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10337 store_xtregs): Likewise.
10338
10339 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10340
10341 PR gdb/14441
10342 * NEWS: Mention support for rvalue references in GDB and python.
10343 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10344 supports both lvalue and rvalue references.
10345
10346 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10347
10348 PR gdb/14441
10349 * gdbtypes.c (rank_one_type): Implement overloading
10350 resolution rules regarding rvalue references.
10351
10352 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10353
10354 PR gdb/14441
10355 * aarch64-tdep.c (aarch64_type_align)
10356 (aarch64_extract_return_value, aarch64_store_return_value): Change
10357 lvalue reference type checks to general reference type checks.
10358 * amd64-tdep.c (amd64_classify): Likewise.
10359 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10360 Likewise.
10361 * arm-tdep.c (arm_type_align, arm_extract_return_value)
10362 (arm_store_return_value): Likewise.
10363 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10364 * c-typeprint.c (c_print_type): Likewise.
10365 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10366 (cplus_number_of_children, cplus_describe_child): Likewise.
10367 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10368 * completer.c (expression_completer): Likewise.
10369 * cp-support.c (make_symbol_overload_list_adl_namespace):
10370 Likewise.
10371 * darwin-nat-info.c (info_mach_region_command): Likewise.
10372 * dwarf2loc.c (entry_data_value_coerce_ref)
10373 (value_of_dwarf_reg_entry): Likewise.
10374 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10375 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10376 Likewise.
10377 * findvar.c (extract_typed_address, store_typed_address):
10378 Likewise.
10379 * gdbtypes.c (rank_one_type): Likewise.
10380 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10381 * infcall.c (value_arg_coerce): Likewise.
10382 * language.c (pointer_type): Likewise.
10383 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10384 Likewise.
10385 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10386 * mn10300-tdep.c (mn10300_type_align): Likewise.
10387 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10388 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10389 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10390 Likewise.
10391 * printcmd.c (print_formatted, x_command): Likewise.
10392 * python/py-type.c (typy_get_composite, typy_template_argument):
10393 Likewise.
10394 * python/py-value.c (valpy_referenced_value)
10395 (valpy_get_dynamic_type, value_has_field): Likewise.
10396 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10397 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10398 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10399 * spu-tdep.c (spu_scalar_value_p): Likewise.
10400 * symtab.c (lookup_symbol_aux): Likewise.
10401 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10402 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10403 Likewise.
10404 * valops.c (value_cast_pointers, value_cast)
10405 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10406 (value_struct_elt, value_struct_elt_bitpos)
10407 (value_find_oload_method_list, find_overload_match)
10408 (value_rtti_indirect_type): Likewise.
10409 * valprint.c (val_print_scalar_type_p, generic_val_print):
10410 Likewise.
10411 * value.c (value_actual_type, value_as_address, unpack_long)
10412 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10413 (coerce_ref): Likewise.
10414 * varobj.c (varobj_get_value_type): Likewise.
10415
10416 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10417
10418 PR gdb/14441
10419 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10420 table of constants.
10421 * python/lib/gdb/command/explore.py: Support exploring values
10422 of rvalue reference types.
10423 * python/lib/gdb/types.py: Implement get_basic_type() for
10424 rvalue reference types.
10425 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10426 constant.
10427 * python/py-value.c (valpy_getitem): Add an rvalue reference
10428 check.
10429 (valpy_reference_value): Add new parameter "refcode".
10430 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10431 New wrappers for valpy_reference_value().
10432 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10433 (gdbpy_invoke_xmethod): Likewise.
10434
10435 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10436
10437 PR gdb/14441
10438 * dwarf2read.c (process_die, read_type_die_1): Handle the
10439 DW_TAG_rvalue_reference_type DIE.
10440 (read_tag_reference_type): Add new parameter "refcode".
10441
10442 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10443
10444 PR gdb/14441
10445 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10446 (c_type_print_modifier, c_type_print_varspec_suffix)
10447 (c_type_print_base): Support printing rvalue reference types.
10448 * c-valprint.c (c_val_print, c_value_print): Support printing
10449 rvalue reference values.
10450
10451 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10452
10453 PR gdb/14441
10454 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10455 typename.
10456 * cp-support.c (replace_typedefs): Handle
10457 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10458 * python/py-type.c (typy_lookup_type): Likewise.
10459
10460 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10461
10462 PR gdb/14441
10463 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10464 * parse.c (insert_type): Change assert statement.
10465 (follow_types): Handle rvalue reference types.
10466 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10467 constant.
10468
10469 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10470
10471 PR gdb/14441
10472 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10473 value_ref() interface.
10474 * c-valprint.c (c_value_print): Likewise.
10475 * infcall.c (value_arg_coerce): Likewise.
10476 * python/py-value.c (valpy_reference_value): Likewise.
10477 * valops.c (value_cast, value_reinterpret_cast)
10478 (value_dynamic_cast, typecmp): Likewise.
10479 (value_ref): Parameterize by kind of return value reference type.
10480 * value.h (value_ref): Add new parameter "refcode".
10481
10482 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10483
10484 PR gdb/14441
10485 * dwarf2read.c (read_tag_reference_type): Use
10486 lookup_lvalue_reference_type() instead of lookup_reference_type().
10487 * eval.c (evaluate_subexp_standard): Likewise.
10488 * f-exp.y: Likewise.
10489 * gdbtypes.c (make_reference_type, lookup_reference_type):
10490 Generalize with rvalue reference types.
10491 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10492 convenience wrappers for lookup_reference_type().
10493 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10494 reference kind parameter.
10495 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10496 wrappers for lookup_reference_type().
10497 * guile/scm-type.c (gdbscm_type_reference): Use
10498 lookup_lvalue_reference_type() instead of lookup_reference_type().
10499 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10500 * parse.c (follow_types): Likewise.
10501 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10502 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10503 Likewise.
10504 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10505 (gdbpy_invoke_xmethod): Likewise.
10506 * stabsread.c: Provide extra argument to make_reference_type()
10507 call.
10508 * valops.c (value_ref, value_rtti_indirect_type): Use
10509 lookup_lvalue_reference_type() instead of lookup_reference_type().
10510
10511 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10512
10513 PR gdb/14441
10514 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10515 (TYPE_IS_REFERENCE): New macro.
10516 (struct type): Add rvalue_reference_type field.
10517 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10518
10519 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
10520
10521 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10522 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10523 New function definition.
10524 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10525 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10526 New function declaration.
10527 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10528 * mi/mi-interp.h: New file.
10529 * solib.c (info_sharedlibrary_command): Replace for loop with
10530 ALL_SO_LIBS macro
10531 * solib.h (update_solib_list): New function declaration.
10532 (so_list_head): Move macro.
10533 * solist.h (ALL_SO_LIBS): New macro.
10534
10535 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
10536
10537 * infcmd.c (post_create_inferior): Remove unused argument in
10538 call to solib_add.
10539 * remote.c (remote_start_remote): Likewise.
10540 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10541 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10542 (enable_break): Likewise.
10543 * solib.c (update_solib_list): Remove unused target argument
10544 and its documentation.
10545 (solib_add): Remove unused target argument. Remove unused
10546 argument in call to update_solib_list.
10547 (info_sharedlibrary_command): Remove unused argument in call
10548 to update_solib_list.
10549 (sharedlibrary_command): Remove unused argument in call to
10550 solib_add.
10551 (handle_solib_event): Likewise.
10552 (reload_shared_libraries): Likewise.
10553 * solib.h (solib_add): Remove unused target argument.
10554
10555 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
10556
10557 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10558 (s390_displaced_step_fixup): Cover relative branches with the
10559 default fixup handling. This fixes lack of support for some
10560 relative branch instructions.
10561
10562 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10563
10564 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10565 ptid from regcache.
10566
10567 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10568
10569 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10570 i386_darwin_store_inferior_registers): Use ptid from regcache.
10571
10572 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10573
10574 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10575 i386bsd_store_inferior_registers): Use ptid from regcache.
10576
10577 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10578
10579 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10580 hppaobsd_store_registers): Use ptid from regcache.
10581
10582 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10583
10584 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10585 hppanbsd_store_registers): Use ptid from regcache.
10586
10587 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10588
10589 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10590 from regcache. Use get_ptrace_pid.
10591
10592 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10593
10594 * corelow.c (get_core_register_section): Use ptid from regcache,
10595 update doc.
10596
10597 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10598
10599 * bsd-uthread.c (bsd_uthread_fetch_registers,
10600 bsd_uthread_store_registers): Use ptid from regcache, set and
10601 restore inferior_ptid.
10602
10603 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10604
10605 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10606 fetch_fp_regs, store_register, store_regs, store_fp_register,
10607 store_fp_regs): Use ptid from regcache.
10608
10609 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10610
10611 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10612 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10613 store_vfp_regs): Use ptid from regcache.
10614
10615 2017-03-17 Pedro Alves <palves@redhat.com>
10616
10617 PR remote/21188
10618 * ser-base.c (ser_base_wait_for): Add comment.
10619 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10620 version.
10621 * ser-unix.c (hardwire_raw): Remove reference to
10622 scb->current_timeout.
10623 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10624 (hardwire_ops): Install ser_base_readchar instead of
10625 hardwire_readchar.
10626 * serial.h (struct serial) <current_timeout, timeout_remaining>:
10627 Remove fields.
10628
10629 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
10630
10631 PR gdb/19637
10632 * python/lib/gdb/printer/bound_registers.py: Add support for
10633 Python 3.
10634
10635 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
10636
10637 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10638 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10639 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10640 byte_offset to subobj_byte_offset. Fix the handling of
10641 DWARF_VALUE_STACK on big-endian targets when coming via an
10642 implicit pointer.
10643 (dwarf2_evaluate_loc_desc): Adjust call to
10644 dwarf2_evaluate_loc_desc_full.
10645 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10646 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10647
10648 2017-03-16 Yao Qi <yao.qi@linaro.org>
10649
10650 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10651 and REVSH instructions.
10652
10653 2017-03-16 Yao Qi <yao.qi@linaro.org>
10654
10655 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10656 (arm_record_test): Declare.
10657 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10658 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10659 align with the manual.
10660 (thumb_record_misc): Adjust the code order to align with the
10661 manual.
10662 (thumb2_record_decode_insn_handler): Fix instruction matching.
10663 (instruction_reader_thumb): New class.
10664 (arm_record_test): New function.
10665
10666 2017-03-16 Yao Qi <yao.qi@linaro.org>
10667
10668 * arm-tdep.c (abstract_memory_reader): New class.
10669 (instruction_reader): New class.
10670 (extract_arm_insn): Add argument 'reader'. Callers updated.
10671 (decode_insn): Likewise.
10672
10673 2017-03-16 Doug Evans <dje@google.com>
10674
10675 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10676 member. Change type of TYPE member to SCM. All uses updated.
10677 (lsscm_make_lazy_string_smob): Add assert.
10678 (lsscm_make_lazy_string): Flag bad length values.
10679 (lsscm_elt_type): New function.
10680 (gdbscm_lazy_string_to_value): Rewrite to use
10681 lsscm_safe_lazy_string_to_value.
10682 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10683 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10684 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
10685 in incoming type.
10686 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10687 * guile/scm-type.c (tyscm_scm_to_type): New function.
10688
10689 2017-03-15 Doug Evans <dje@google.com>
10690
10691 PR python/17728, python/18439, python/18779
10692 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10693 member. Change type of TYPE member to PyObject *. All uses updated.
10694 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10695 (gdbpy_create_lazy_string_object): Flag bad length values.
10696 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10697 Handle typedefs in incoming type.
10698 (stpy_lazy_string_elt_type): New function.
10699 (gdbpy_extract_lazy_string): Call it.
10700 * python/py-value.c (valpy_lazy_string): Flag bad length values.
10701 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
10702 typedefs in incoming type.
10703
10704 2017-03-16 Doug Evans <dje@google.com>
10705
10706 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10707 * guile/scm-type.c (tyscm_scm_to_type): New function.
10708
10709 2017-03-16 Jiong Wang <jiong.wang@arm.com>
10710
10711 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10712 "ULONGEST" for "skip".
10713
10714 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
10715
10716 PR gdb/21220
10717 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10718 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10719 (inf_ptrace_peek_poke): ...here. New function. Now also loop
10720 over ptrace peek/poke until end of buffer or error.
10721
10722 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
10723
10724 * parse.c (length_of_subexp): Make static.
10725 * parser-defs.h (length_of_subexp): Remove.
10726
10727 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
10728
10729 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10730 as well.
10731
10732 2017-03-14 Pedro Alves <palves@redhat.com>
10733
10734 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10735 (main): Use std::unique_ptr. Remove calls to
10736 cp_demangled_name_parse_free.
10737
10738 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10739
10740 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10741 alphabsd_store_inferior_registers): Use regcache->ptid instead
10742 of inferior_ptid.
10743
10744 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10745
10746 * aix-thread.c (aix_thread_fetch_registers,
10747 aix_thread_store_registers): Use regcache->ptid instead of
10748 inferior_ptid.
10749
10750 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10751
10752 * aarch64-linux-nat.c (fetch_gregs_from_thread,
10753 store_gregs_to_thread, fetch_fpregs_from_thread,
10754 store_fpregs_to_thread): Use regcache->ptid instead of
10755 inferior_ptid.
10756
10757 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10758
10759 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10760 amd64_linux_fetch_inferior_registers): Use regcache->ptid
10761 instead of inferior_ptid.
10762
10763 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10764
10765 * target.c (target_fetch_registers, target_store_registers): Add
10766 assert.
10767
10768 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10769
10770 * regcache.h (regcache_get_ptid): New function.
10771 * regcache.c (regcache_get_ptid): New function.
10772
10773 2017-03-13 Mark Wielaard <mark@klomp.org>
10774
10775 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10776
10777 2017-03-10 Keith Seitz <keiths@redhat.com>
10778
10779 PR c++/8218
10780 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10781
10782 2017-03-08 Pedro Alves <palves@redhat.com>
10783
10784 PR gdb/18360
10785 * infrun.c (start_step_over, do_target_resume, resume)
10786 (restart_threads): Assert we're not resuming a thread that is
10787 meant to be stopped.
10788 (infrun_thread_stop_requested_callback): Delete.
10789 (infrun_thread_stop_requested): If the thread is internally
10790 stopped, queue a pending stop event and clear the thread's
10791 inline-frame state.
10792 (handle_stop_requested): New function.
10793 (handle_syscall_event, handle_inferior_event_1): Use
10794 handle_stop_requested.
10795 (handle_stop_requested): New function.
10796 (handle_signal_stop): Set the thread's stop_signal here instead of
10797 at caller.
10798 (finish_step_over): Clear step over info unconditionally.
10799 (handle_signal_stop): If the user had interrupted the event
10800 thread, consider the stop a random signal.
10801 (handle_signal_stop) <signal arrived while stepping over
10802 breakpoint>: Don't restart threads here.
10803 (stop_waiting): Don't clear step-over info here.
10804
10805 2017-03-08 Pedro Alves <palves@redhat.com>
10806
10807 PR 21206
10808 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10809 goes to argument 2, not 1.
10810
10811 2017-03-08 Pedro Alves <palves@redhat.com>
10812
10813 PR cli/21218
10814 * top.c (gdb_readline_wrapper): Avoid passing NULL to
10815 display_gdb_prompt.
10816 (command_line_input): Add comment.
10817
10818 2017-03-08 Pedro Alves <palves@redhat.com>
10819
10820 PR tui/21216
10821 * tui/tui-file.c (tui_file::write): New.
10822 * tui/tui-file.h (tui_file): Override "write".
10823 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10824 factored out from ...
10825 (tui_puts): ... here.
10826 (tui_putc): Use them.
10827 (tui_write): New function.
10828 * tui/tui-io.h (tui_write): Declare.
10829
10830 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
10831
10832 * Makefile.in (SFILES): Replace "environ.c" with
10833 "common/environ.c".
10834 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10835 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
10836 to...
10837 * common/environ.c: ... here.
10838 * environ.h: Moved to...
10839 * common/environ.h: ... here.
10840
10841 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10842
10843 * gdbarch.sh (pstring_ptr): New static function.
10844 (gdbarch_disassembler_options): Use it.
10845 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10846 not valid_disassembler_option->name.
10847 * gdbarch.c: Regenerate.
10848
10849 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10850
10851 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10852
10853 2017-03-07 Pedro Alves <palves@redhat.com>
10854
10855 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10856
10857 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
10858
10859 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10860 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10861 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10862 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10863
10864 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
10865
10866 * xtensa-linux-nat.c (fetch_gregs): Remove const.
10867
10868 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
10869
10870 * remote.c (remote_add_target_side_commands): Use range-based
10871 for loop.
10872
10873 2017-03-03 Yao Qi <yao.qi@linaro.org>
10874
10875 PR gdb/21165
10876 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10877 value is lazy.
10878 * valprint.c (common_val_print): Likewise.
10879
10880 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
10881
10882 * NEWS: Mention new set/show disassembler-options commands.
10883 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10884 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10885 (prospective_options): New static variable.
10886 (gdb_disassembler::gdb_disassembler): Initialize
10887 m_di.disassembler_options.
10888 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10889 (get_disassembler_options): New function.
10890 (set_disassembler_options): Likewise.
10891 (set_disassembler_options_sfunc): Likewise.
10892 (show_disassembler_options_sfunc): Likewise.
10893 (disassembler_options_completer): Likewise.
10894 (_initialize_disasm): Likewise.
10895 * disasm.h (get_disassembler_options): New prototype.
10896 (set_disassembler_options): Likewise.
10897 * gdbarch.sh (gdbarch_disassembler_options): New variable.
10898 (gdbarch_verify_disassembler_options): Likewise.
10899 * gdbarch.c: Regenerate.
10900 * gdbarch.h: Likewise.
10901 * arm-tdep.c (num_disassembly_options): Delete.
10902 (set_disassembly_style): Likewise.
10903 (arm_disassembler_options): New static variable.
10904 (set_disassembly_style_sfunc): Convert short style name into long
10905 option name. Call set_disassembler_options.
10906 (show_disassembly_style_sfunc): New function.
10907 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10908 set_gdbarch_verify_disassembler_options.
10909 (_initialize_arm_tdep): Delete regnames variable and update callers.
10910 (arm_disassembler_options): Initialize.
10911 (disasm_options): New variable.
10912 (num_disassembly_options): Rename from this...
10913 (num_disassembly_styles): ...to this. Compute by scanning through
10914 disasm_options.
10915 (valid_disassembly_styles): Initialize using disasm_options.
10916 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10917 set_arm_regname_option.
10918 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10919 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10920 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10921 set_gdbarch_verify_disassembler_options.
10922 * s390-tdep.c (s390_disassembler_options): New static variable.
10923 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10924 set_gdbarch_verify_disassembler_options.
10925
10926 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10927
10928 * remote.c (remote_add_target_side_condition): Remove "struct"
10929 keyword from range-based for loop.
10930
10931 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10932
10933 * remote.c (remote_add_target_side_condition): Use range-based
10934 for loop. Update comment.
10935
10936 2017-02-27 Yao Qi <yao.qi@linaro.org>
10937
10938 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10939
10940 2017-02-26 Alan Hayward <alan.hayward@arm.com>
10941
10942 * regcache.c (regcache_raw_update): New function.
10943 (regcache_raw_read): Move code to regcache_raw_update.
10944 * regcache.h (regcache_raw_update): New declaration.
10945 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10946
10947 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
10948
10949 * dwarf2read.c (create_debug_type_hash_table): Initialize
10950 header.signature and header.type_offset_in_tu.
10951
10952 2017-02-24 Pedro Alves <palves@redhat.com>
10953
10954 * symtab.c (make_file_symbol_completion_list_1): Use
10955 add_symtab_completions.
10956
10957 2017-02-24 Alan Hayward <alan.hayward@arm.com>
10958
10959 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10960
10961 2017-02-24 Alan Hayward <alan.hayward@arm.com>
10962
10963 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10964 I386_MAX_REGISTER_SIZE.
10965 (i386_pseudo_register_write): Likewise.
10966 (i386_process_record): Likewise.
10967 * i387-tdep.c (i387_supply_xsave): Likewise.
10968 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10969 (store_register): Likewise.
10970
10971 2017-02-23 Pedro Alves <palves@redhat.com>
10972
10973 * ada-lang.c: Include "common/function-view.h".
10974 (ada_iterate_over_symbols): Adjust to use function_view as
10975 callback type.
10976 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10977 (ada_make_symbol_completion_list): Use a lambda.
10978 (ada_exc_search_name_matches): Delete.
10979 (name_matches_regex): New.
10980 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10981 * compile/compile-c-support.c: Include "common/function-view.h".
10982 (print_one_macro): Change prototype to accept a ui_file pointer.
10983 (write_macro_definitions): Use a lambda.
10984 * dwarf2read.c: Include "common/function-view.h".
10985 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10986 (dw2_expand_symtabs_matching): Adjust to use function_view as
10987 callback type.
10988 * language.h: Include "common/function-view.h".
10989 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10990 function_view as callback type.
10991 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10992 * linespec.c: Include "common/function-view.h".
10993 (collect_info::add_symbol): New method.
10994 (struct symbol_and_data_callback, iterate_inline_only, struct
10995 symbol_matcher_data, iterate_name_matcher): Delete.
10996 (iterate_over_all_matching_symtabs): Adjust to use function_view
10997 as callback type and lambdas.
10998 (iterate_over_file_blocks): Adjust to use function_view as
10999 callback type.
11000 (decode_compound_collector): Now a class with private fields.
11001 (decode_compound_collector::release_symbols): New method.
11002 (collect_one_symbol): Rename to...
11003 (decode_compound_collector::operator()): ... this and adjust.
11004 (lookup_prefix_sym): decode_compound_collector construction bits
11005 move to decode_compound_collector ctor. Pass the
11006 decode_compound_collector object directly as callback. Remove
11007 cleanups and use decode_compound_collector::release_symbols
11008 instead.
11009 (symtab_collector): Now a class with private fields.
11010 (symtab_collector::release_symtabs): New method.
11011 (add_symtabs_to_list): Rename to...
11012 (symtab_collector::operator()): ... this and adjust.
11013 (collect_symtabs_from_filename): symtab_collector construction
11014 bits move to symtab_collector ctor. Pass the symtab_collector
11015 object directly as callback. Remove cleanups and use
11016 symtab_collector::release_symtabs instead.
11017 (collect_symbols): Delete.
11018 (add_matching_symbols_to_info): Use lambdas.
11019 * macrocmd.c (print_macro_callback): Delete.
11020 (info_macro_command): Use a lambda.
11021 (info_macros_command): Pass print_macro_definition as callable
11022 directly.
11023 (print_one_macro): Remove 'ignore' parameter.
11024 (macro_list_command): Adjust.
11025 * macrotab.c (macro_for_each_data::fn): Now a function_view.
11026 (macro_for_each_data::user_data): Delete field.
11027 (foreach_macro): Adjust to call the function_view.
11028 (macro_for_each): Adjust to use function_view as callback type.
11029 (foreach_macro_in_scope): Adjust to call the function_view.
11030 (macro_for_each_in_scope): Adjust to use function_view as callback
11031 type.
11032 * macrotab.h: Include "common/function-view.h".
11033 (macro_callback_fn): Declare a prototype instead of a pointer.
11034 Remove "user_data" parameter.
11035 (macro_for_each, macro_for_each_in_scope): Adjust to use
11036 function_view as callback type.
11037 * psymtab.c (partial_map_expand_apply)
11038 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
11039 Adjust to use function_view as callback type and to return bool.
11040 (psym_expand_symtabs_matching): Adjust to use function_view as
11041 callback types.
11042 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
11043 to use function_view as callback type and to return bool.
11044 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
11045 callback types.
11046 * symfile.c (expand_symtabs_matching): Adjust to use function_view
11047 as callback types.
11048 * symfile.h: Include "common/function-view.h".
11049 (expand_symtabs_file_matcher_ftype)
11050 (expand_symtabs_symbol_matcher_ftype)
11051 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
11052 return bool.
11053 (quick_symbol_functions::map_symtabs_matching_filename)
11054 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
11055 function_view as callback type and return bool.
11056 (expand_symtabs_matching): Adjust to use function_view as callback
11057 type.
11058 (maintenance_expand_name_matcher)
11059 (maintenance_expand_file_matcher): Delete.
11060 (maintenance_expand_symtabs): Use lambdas.
11061 * symtab.c (iterate_over_some_symtabs): Adjust to use
11062 function_view as callback types and return bool.
11063 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
11064 of a cleanup.
11065 (lookup_symtab_callback): Delete.
11066 (lookup_symtab): Use a lambda.
11067 (iterate_over_symbols): Adjust to use function_view as callback
11068 type.
11069 (struct search_symbols_data, search_symbols_file_matches)
11070 (search_symbols_name_matches): Delete.
11071 (search_symbols): Use a pair of lambdas.
11072 (struct add_name_data, add_macro_name, symbol_completion_matcher)
11073 (symtab_expansion_callback): Delete.
11074 (default_make_symbol_completion_list_break_on_1): Use lambdas.
11075 * symtab.h: Include "common/function-view.h".
11076 (iterate_over_some_symtabs): Adjust to use function_view as
11077 callback type and return bool.
11078 (iterate_over_symtabs): Adjust to use function_view as callback
11079 type.
11080 (symbol_found_callback_ftype): Remove 'data' parameter and return
11081 bool.
11082 (iterate_over_symbols): Adjust to use function_view as callback
11083 type.
11084
11085 2017-02-23 Pedro Alves <palves@redhat.com>
11086
11087 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
11088 (%.o) <unittests/%.c>: New pattern.
11089 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
11090 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
11091 * common/function-view.h: New file.
11092 * unittests/function-view-selftests.c: New file.
11093 * configure: Regenerate.
11094
11095 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
11096
11097 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
11098 inferior_ptid.
11099 * go32-nat.c (go32_thread_alive): Likewise.
11100
11101 2017-02-23 Yao Qi <yao.qi@linaro.org>
11102
11103 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
11104 delete.
11105
11106 2017-02-23 Yao Qi <yao.qi@linaro.org>
11107
11108 * varobj.c (varobj_clear_saved_item): Use delete instead of
11109 xfree.
11110 (update_dynamic_varobj_children): Likewise.
11111
11112 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11113
11114 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
11115
11116 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
11117
11118 * common/enum-flags.h (enum_flags::enum_flags): Initialize
11119 m_enum_value to 0 in default constructor.
11120
11121 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11122
11123 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
11124 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
11125 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
11126 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
11127 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
11128 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
11129 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
11130 IS_STORE_CONDITIONAL_INSN.
11131
11132 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11133
11134 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
11135
11136 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11137
11138 * NEWS (Changes since GDB 7.12): Add DWARF-5.
11139
11140 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11141
11142 * dwarf2read.c (skip_one_die, read_attribute_value)
11143 (dwarf2_const_value_attr, dump_die_shallow)
11144 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
11145 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
11146
11147 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11148
11149 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
11150 (dwarf_parse_macro_header): Accept DWARF version 5.
11151 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
11152
11153 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11154
11155 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
11156 DW_AT_GNU_*.
11157 * common/common-exceptions.h (enum errors): Likewise.
11158 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
11159 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
11160 (dwarf_expr_context::execute_stack_op): Likewise.
11161 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
11162 Likewise.
11163 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
11164 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
11165 (show_entry_values_debug, call_site_to_target_addr)
11166 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
11167 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
11168 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
11169 (value_of_dwarf_block_entry, indirect_pieced_value)
11170 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11171 (disassemble_dwarf_expression): Likewise.
11172 * dwarf2read.c (process_die, inherit_abstract_dies)
11173 (read_call_site_scope): Likewise.
11174 * gdbtypes.h (struct func_type, struct call_site_parameter)
11175 (struct call_site): Likewise.
11176 * stack.c (read_frame_arg): Likewise.
11177 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11178
11179 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11180
11181 * defs.h (read_unsigned_leb128): New declaration.
11182 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11183 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11184 (dwarf2_find_location_expression): Call also
11185 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
11186 * dwarf2loc.h (dwarf2_version): New declaration.
11187 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11188 rnglists.
11189 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11190 .debug_rnglists.
11191 (struct dwop_section_names): Add loclists_dwo.
11192 (dwop_section_names): Add .debug_loclists.dwo.
11193 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11194 (struct dwarf2_per_cu_data): Add dwarf_version.
11195 (struct dwo_sections): Add loclists.
11196 (struct attr_abbrev): Add implicit_const.
11197 (read_indirect_line_string): New declaration.
11198 (read_unsigned_leb128): Delete declaration.
11199 (rcuh_kind): New definition.
11200 (read_and_check_comp_unit_head): Change parameter
11201 is_debug_types_section to section_kind.
11202 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11203 (read_comp_unit_head): Change parameter abfd to section, add parameter
11204 section_kind. Handle DWARF-5.
11205 (error_check_comp_unit_head): Accept also DWARF version 5.
11206 (read_and_check_comp_unit_head): Change parameter
11207 is_debug_types_section to section_kind.
11208 (read_and_check_type_unit_head): Delete function.
11209 (read_abbrev_offset): Handle DWARF-5.
11210 (create_debug_type_hash_table): Add parameter section_kind. Process
11211 only DW_UT_type. Use signature and type_offset_in_tu from struct
11212 comp_unit_head.
11213 (create_debug_types_hash_table): Update create_debug_type_hash_table
11214 caller.
11215 (create_all_type_units): Call create_debug_type_hash_table.
11216 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11217 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11218 caller.
11219 (skip_one_die): Handle DW_FORM_implicit_const.
11220 (dwarf2_rnglists_process): New function.
11221 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11222 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11223 (read_attribute_value): Handle DW_FORM_implicit_const,
11224 DW_FORM_line_strp.
11225 (read_attribute): Handle DW_FORM_implicit_const.
11226 (read_indirect_string_at_offset_from): New function from
11227 read_indirect_string_at_offset.
11228 (read_indirect_string_at_offset): Call
11229 read_indirect_string_at_offset_from.
11230 (read_indirect_line_string_at_offset): New function.
11231 (read_indirect_string): New function comment.
11232 (read_indirect_line_string): New function.
11233 (read_unsigned_leb128): Make it global.
11234 (dwarf2_string_attr): Handle DWARF-5.
11235 (add_include_dir_stub, read_formatted_entries): New functions.
11236 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11237 Handle DWARF-5.
11238 (per_cu_header_read_in): Update read_comp_unit_head caller.
11239 (dwarf2_version): New function.
11240 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11241 rnglists.
11242 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11243 fields.
11244
11245 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11246
11247 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11248
11249 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11250
11251 * dwarf2read.c (dwarf2_ranges_process): New function from
11252 dwarf2_ranges_read.
11253 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11254 dwarf2_ranges_process.
11255
11256 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11257
11258 * dwarf2read.c (create_debug_type_hash_table): New function from
11259 create_debug_types_hash_table.
11260 (create_debug_types_hash_table): Call create_debug_type_hash_table.
11261 (create_all_type_units, open_and_init_dwo_file): Update
11262 create_debug_types_hash_table callers.
11263
11264 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
11265
11266 PR gdb/16188
11267 * fork-child.c (trace_start_error): Fix thinko. va_end should
11268 refer to 'ap', not 'args'.
11269
11270 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
11271 Pedro Alves <palves@redhat.com>
11272
11273 PR gdb/16188
11274 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11275 calls succeeded.
11276 * fork-child.c (trace_start_error): New function.
11277 (trace_start_error_with_name): Likewise.
11278 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11279 * inf-ptrace.c (inf_ptrace_me): Likewise.
11280 * inferior.h (trace_start_error): New prototype.
11281 (trace_start_error_with_name): Likewise.
11282
11283 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
11284
11285 PR gdb/21164
11286 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11287 NULL before using it.
11288 * symmisc.c (maintenance_print_symbols): Likewise.
11289 (maintenance_print_msymbols): Likewise.
11290
11291 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11292
11293 * NEWS: Add record Python bindings entry.
11294
11295 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11296
11297 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11298 py-record-full.o.
11299 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11300 * python/py-record-btrace.c, python/py-record-btrace.h,
11301 python/py-record-full.c, python/py-record-full.h: New file.
11302 * python/py-record.c: Add include for py-record-btrace.h and
11303 py-record-full.h.
11304 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11305 recpy_instruction_history, recpy_function_call_history, recpy_begin,
11306 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11307 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11308 New definition.
11309 (gdbpy_initialize_btrace): New export.
11310 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11311
11312 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11313
11314 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11315 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11316 * python/py-record.c: New file.
11317 * python/python-internal.h (gdbpy_start_recording,
11318 gdbpy_current_recording, gdpy_stop_recording,
11319 gdbpy_initialize_record): New export.
11320 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11321 (python_GdbMethods): Add gdbpy_start_recording,
11322 gdbpy_current_recording and gdbpy_stop_recording.
11323
11324 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11325
11326 * record-btrace.c (record_btrace_record_method): New function.
11327 (init_record_btrace_ops): Initialize to_record_method.
11328 * record-full.c (record_full_record_method): New function.
11329 (init_record_full_ops, init_record_full_core_ops): Add
11330 record_full_record_method.
11331 * record.h (enum record_method): New enum.
11332 * target-debug.h (target_debug_print_enum_record_method: New define.
11333 * target-delegates.c: Regenerate.
11334 * target.c (target_record_method): New function.
11335 * target.h: Include record.h.
11336 (struct target_ops) <to_record_method>: New field.
11337 (target_record_method): New export.
11338
11339 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11340
11341 * record.h (record_start, record_stop): New export.
11342 * record.c (record_start, record_stop): New function.
11343
11344 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11345
11346 * btrace.c (btrace_fetch): Copy function call segments pointer
11347 into a vector.
11348 (btrace_clear): Clear the vector.
11349 (btrace_find_insn_by_number): Use binary search to find the correct
11350 function call segment.
11351 * btrace.h (brace_fun_p): New typedef.
11352 (struct btrace_thread_info) <functions>: New field.
11353
11354 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11355
11356 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11357 * btrace.c (btrace_decode_error): ... here. New function.
11358 * btrace.h (btrace_decode_error): New export.
11359
11360 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11361
11362 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11363 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11364 btrace_find_insn_by_number): Remove special case for gaps.
11365 * btrace.h (btrace_insn_get_error): New export.
11366 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11367 * record-btrace.c (btrace_insn_history): Print number for gaps.
11368 (record_btrace_info, record_btrace_goto): Handle gaps.
11369
11370 2017-02-14 Tom Tromey <tom@tromey.com>
11371
11372 PR python/13598:
11373 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11374 event.
11375 * python/py-evts.c (gdbpy_initialize_py_events): Add
11376 before_prompt registry.
11377 * python/py-events.h (events_object) <before_prompt>: New field.
11378
11379 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
11380
11381 * btrace.c (ftrace_new_switch): Preserve up link and flags.
11382
11383 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
11384
11385 * symfile (_initialize_symfile): Add usage text to the load command's
11386 help text.
11387
11388 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
11389
11390 * utils.c (defaulted_query): Don't query on secondary UIs.
11391
11392 2017-02-10 Tom Tromey <tom@tromey.com>
11393
11394 * rust-lang.c (rust_get_disr_info): Remove unused variable.
11395
11396 2017-02-10 Tom Tromey <tom@tromey.com>
11397
11398 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11399 "cleanup" local.
11400 * python/py-type.c (typy_legacy_template_argument): Remove
11401 unnecessary "cleanup" local.
11402
11403 2017-02-10 Tom Tromey <tom@tromey.com>
11404
11405 * python/python.c (do_start_initialization): New function, from
11406 _initialize_python.
11407 (_initialize_python): Call do_start_initialization.
11408 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11409 goto.
11410
11411 2017-02-10 Tom Tromey <tom@tromey.com>
11412
11413 * python/py-prettyprint.c (pretty_print_one_value): Use
11414 gdbpy_ref.
11415
11416 2017-02-10 Tom Tromey <tom@tromey.com>
11417
11418 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11419 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11420 gdbpy_ref.
11421 * python/py-type.c (field_new): Use gdbpy_ref.
11422 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11423 gdbpy_ref.
11424 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11425 (py_free_pspace): Likewise.
11426 (pspace_to_pspace_object): Likewise.
11427 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11428 (py_free_objfile): Likewise.
11429 (objfile_to_objfile_object): Likewise.
11430 * python/py-inferior.c (delete_thread_object): Use
11431 gdbpy_ref.
11432 (infpy_read_memory): Likewise.
11433 (py_free_inferior): Likewise.
11434 * python/py-evtregistry.c (create_eventregistry_object): Use
11435 gdbpy_ref.
11436 * python/py-event.c (create_event_object): Use gdbpy_ref.
11437
11438 2017-02-10 Tom Tromey <tom@tromey.com>
11439
11440 * python/py-ref.h (gdbpy_ref_policy): Now a template.
11441 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11442 used.
11443 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11444 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11445 python/py-exitedevent.c, python/py-finishbreakpoint.c,
11446 python/py-framefilter.c, python/py-function.c,
11447 python/py-inferior.c, python/py-infevents.c,
11448 python/py-linetable.c, python/py-newobjfileevent.c,
11449 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11450 python/py-signalevent.c, python/py-stopevent.c,
11451 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11452 python/py-unwind.c, python/py-utils.c, python/py-value.c,
11453 python/py-varobj.c, python/py-xmethods.c, python/python.c,
11454 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11455
11456 2017-02-10 Tom Tromey <tom@tromey.com>
11457
11458 * ui-out.h (ui_out_emit_type): New class.
11459 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11460 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11461 and ui_out_emit_tuple.
11462 (enumerate_locals): Likewise.
11463 (py_mi_print_variables, py_print_locals, py_print_args): Use
11464 ui_out_emit_list.
11465 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11466 ui_out_emit_list.
11467 * common/gdb_optional.h: New file.
11468
11469 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
11470
11471 * MAINTAINERS (Write After Approval): Update my e-mail address.
11472
11473 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
11474
11475 PR gdb/21122
11476 * breakpoint.c (_initialize_breakpoint): Update the help description
11477 of the 'commands' command to indicate that it takes a list argument.
11478
11479 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
11480
11481 * interps.c (current_interp_set_logging): Remove "return".
11482
11483 2017-02-09 Gary Benson <gbenson@redhat.com>
11484
11485 * symtab.c (add_symtab_completions): Prevent NULL pointer
11486 dereference.
11487
11488 2017-02-08 Pedro Alves <palves@redhat.com>
11489
11490 * interps.c (interp::interp): Remove reference to quiet_p.
11491 (interp_set): Make static. Remove dead "Switching to" output
11492 code.
11493 (interp_quiet_p, interp_set_quiet): Delete.
11494 (interpreter_exec_cmd): Don't set the interpreter quiet.
11495 * interps.h (interp_quiet_p): Make static.
11496 (class interp) <quiet_p>: Remove field
11497
11498 2017-02-08 Jerome Guitton <guitton@adacore.com>
11499
11500 * cli/cli-decode.c (find_command_name_length): Make it extern.
11501 * cli/cli-decode.h (find_command_name_length): Declare.
11502 * cli/cli-script.c (command_name_equals, line_first_arg):
11503 New functions.
11504 (process_next_line): Use cli-decode to parse command names.
11505 (build_command_line): Make args a constant pointer.
11506
11507 2017-02-08 Jerome Guitton <guitton@adacore.com>
11508
11509 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11510 Remove case-insensitive search.
11511
11512 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
11513
11514 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11515 at the end of the line. Avoids an ARI warning.
11516
11517 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
11518
11519 * NEWS: Mention support for record/replay of Intel 64 rdrand and
11520 rdseed instructions.
11521 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11522
11523 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
11524
11525 PR tdep/20936
11526 Provide and use sparc32 and sparc64 target description XML files.
11527 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11528 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11529 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11530 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11531 * features/sparc/sparc32-solaris.xml: New file.
11532 * features/sparc/sparc64-solaris.xml: New file.
11533 * features/sparc/sparc32-solaris.c: Generated.
11534 * features/sparc/sparc64-solaris.c: Generated.
11535 * sparc-tdep.h: Account for differences in target descriptions.
11536 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11537 (sparc32_register_type): Use target provided registers.
11538 (validate_tdesc_registers): New function.
11539 (sparc32_gdbarch_init): Use tdesc_has_registers.
11540 Set pseudoregister functions.
11541 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11542 (sparc64_register_type): Use target provided registers.
11543 (sparc64_init_abi): Set pseudoregister functions.
11544
11545 2017-02-03 Tom Tromey <tom@tromey.com>
11546
11547 PR rust/21097:
11548 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11549 with a single member.
11550
11551 2017-02-03 Pedro Alves <palves@redhat.com>
11552
11553 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11554 (cli_interp_base::~cli_interp_base): New.
11555 (cli_interp): New struct.
11556 (as_cli_interp): Cast the interp itself to cli_interp.
11557 (cli_interpreter_pre_command_loop): Rename to ...
11558 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
11559 parameter.
11560 (cli_interpreter_init): Rename to ...
11561 (cli_interp::init): ... this. Remove 'self' parameter. Use
11562 boolean. Make extern.
11563 (cli_interpreter_resume): Rename to ...
11564 (cli_interp::resume): ... this. Remove 'data' parameter. Make
11565 extern.
11566 (cli_interpreter_suspend): Rename to ...
11567 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
11568 extern.
11569 (cli_interpreter_exec): Rename to ...
11570 (cli_interp::exec): ... this. Remove 'data' parameter. Make
11571 extern.
11572 (cli_interpreter_supports_command_editing): Rename to ...
11573 (cli_interp_base::supports_command_editing): ... this. Remove
11574 'interp' parameter. Make extern.
11575 (cli_ui_out): Rename to ...
11576 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
11577 Make extern.
11578 (cli_set_logging): Rename to ...
11579 (cli_interp_base::set_logging): ... this. Remove 'interp'
11580 parameter. Make extern.
11581 (cli_interp_procs): Delete.
11582 (cli_interp_factory): Adjust to use "new".
11583 * cli/cli-interp.h: Include "interps.h".
11584 (struct cli_interp_base): New struct.
11585 * interps.c (struct interp): Delete. Fields moved to interps.h.
11586 (interp_new): Delete.
11587 (interp::interp, interp::~interp): New.
11588 (interp_set): Use bool, and return void. Assume the interpreter
11589 has suspend, init and resume methods, and that the all return
11590 void.
11591 (set_top_level_interpreter): interp_set returns void.
11592 (interp_ui_out): Adapt.
11593 (current_interp_set_logging): Adapt.
11594 (interp_data): Delete.
11595 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11596 (interp_exec): Adapt.
11597 (top_level_interpreter_data): Delete.
11598 * interps.h (interp_init_ftype, interp_resume_ftype)
11599 (interp_suspend_ftype, interp_exec_ftype)
11600 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11601 (class interp): New.
11602 (interp_new): Delete.
11603 (interp_set): Now returns void. Use bool.
11604 (interp_data, top_level_interpreter_data): Delete.
11605 * mi/mi-common.h: Include interps.h.
11606 (class mi_interp): Inherit from interp. Define a ctor. Declare
11607 init, resume, suspect, exec, interp_ui_out, set_logging and
11608 pre_command_loop methods.
11609 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11610 (mi_interpreter_init): Rename to ...
11611 (mi_interp::init): ... this. Remove the 'interp' parameter, use
11612 bool, return void and make extern. Adjust.
11613 (mi_interpreter_resume): ... Rename to ...
11614 (mi_interp::resume): ... this. Remove the 'data' parameter,
11615 return void and make extern. Adjust.
11616 (mi_interpreter_suspend): ... Rename to ...
11617 (mi_interp::suspend): ... this. Remove the 'data' parameter,
11618 return void and make extern. Adjust.
11619 (mi_interpreter_exec): ... Rename to ...
11620 (mi_interp::exec): ... this. Remove the 'data' parameter and make
11621 extern. Adjust.
11622 (mi_interpreter_pre_command_loop): ... Rename to ...
11623 (mi_interp::pre_command_loop): ... this. Remove the 'self'
11624 parameter and make extern.
11625 (mi_on_normal_stop_1): Adjust.
11626 (mi_ui_out): Rename to ...
11627 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
11628 parameter and make extern. Adjust.
11629 (mi_set_logging): Rename to ...
11630 (mi_interp::set_logging): ... this. Remove the 'interp'
11631 parameter and make extern. Adjust.
11632 (mi_interp_procs): Delete.
11633 (mi_interp_factory): Adjust to use 'new'.
11634 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11635 (mi_print_exception, mi_execute_command, mi_load_progress):
11636 Adjust.
11637 * tui/tui-interp.c (tui_interp): New class.
11638 (as_tui_interp): Return a tui_interp pointer.
11639 (tui_on_normal_stop, tui_on_signal_received)
11640 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11641 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11642 to use interp::interp_ui_out.
11643 (tui_init): Rename to ...
11644 (tui_interp::init): ... this. Remove the 'self' parameter, use
11645 bool, return void and make extern. Adjust.
11646 (tui_resume): Rename to ...
11647 (tui_interp::resume): ... this. Remove the 'data' parameter,
11648 return void and make extern. Adjust.
11649 (tui_suspend): Rename to ...
11650 (tui_interp::suspend): ... this. Remove the 'data' parameter,
11651 return void and make extern. Adjust.
11652 (tui_ui_out): Rename to ...
11653 (tui_interp::interp_ui_out): ... this. Remove the 'self'
11654 parameter, and make extern. Adjust.
11655 (tui_exec): Rename to ...
11656 (tui_interp::exec): ... this. Remove the 'data' parameter and
11657 make extern.
11658 (tui_interp_procs): Delete.
11659 (tui_interp_factory): Use "new".
11660
11661 2017-02-02 Tom Tromey <tom@tromey.com>
11662
11663 * rust-exp.y (ends_raw_string, space_then_number)
11664 (rust_identifier_start_p): Return bool.
11665 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11666 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11667 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11668 (rust_chartype_p): Return bool.
11669 (val_print_struct, rust_print_struct_def, rust_print_type):
11670 Update.
11671 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11672 Return bool.
11673
11674 2017-02-02 Tom Tromey <tom@tromey.com>
11675
11676 * rust-lang.c: Reindent.
11677
11678 2017-02-02 Tom Tromey <tom@tromey.com>
11679
11680 * rust-lang.h (rust_crate_for_block): Update.
11681 * rust-lang.c (rust_crate_for_block): Return std::string.
11682 (rust_get_disr_info): Use std:;string, not
11683 gdb::unique_xmalloc_ptr.
11684 * rust-exp.y (crate_name): Update.
11685
11686 2017-02-02 Pedro Alves <palves@redhat.com>
11687
11688 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11689 field out of gdb_disassembler_test and make it static.
11690
11691 2017-02-02 Pedro Alves <palves@redhat.com>
11692
11693 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11694 mi1_interp and mi_interp fields.
11695
11696 2017-02-02 Pedro Alves <palves@redhat.com>
11697
11698 * cli/cli-interp.c (struct saved_output_files, saved_output):
11699 Moved from cli/cli-logging.c.
11700 (cli_set_logging): New function.
11701 (cli_interp_procs): Install cli_set_logging.
11702 * cli/cli-interp.h (make_logging_output, cli_set_logging):
11703 Declare.
11704 * cli/cli-logging.c (struct saved_output_files, saved_output):
11705 Moved to cli/cli-interp.c.
11706 (pop_output_files): Don't save outputs here.
11707 (make_logging_output): New function.
11708 (handle_redirections): Don't build tee nor save previous outputs
11709 here.
11710 * interps.c (current_interp_set_logging): Change prototype.
11711 Assume there's always a set_logging_proc method installed.
11712 * interps.h (interp_set_logging_ftype): Change prototype.
11713 (current_interp_set_logging): Change prototype and adjust comment.
11714 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
11715 use make_logging_output.
11716 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11717 2017-02-02 Pedro Alves <palves@redhat.com>
11718
11719 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11720 from ...
11721 (set_logging_overwrite): ... here.
11722 (logging_no_redirect_file): Delete.
11723 (set_logging_redirect): Don't handle redirection on the fly.
11724 Instead warn that "logging off" / "logging on" is necessary.
11725 (pop_output_files): Delete references to logging_no_redirect_file.
11726 (show_logging_command): Always speak in terms of what will happen
11727 once logging is reenabled.
11728
11729 2017-02-02 Pedro Alves <palves@redhat.com>
11730
11731 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11732
11733 2017-02-02 Pedro Alves <palves@redhat.com>
11734
11735 * disasm.c (gdb_pretty_print_insn): Rename to ...
11736 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11737 Remove gdbarch parameter. Adapt to clear the object's buffers
11738 instead of allocating new buffers, and to print using the object's
11739 gdb_disassembler instead of calling gdb_print_insn.
11740 (dump_insns): Use gdb_pretty_print_disassembler.
11741 * disasm.h (gdb_pretty_print_insn): Delete declaration.
11742 (gdb_pretty_print_disassembler): New class.
11743 * record-btrace.c (btrace_insn_history): Use
11744 gdb_pretty_print_disassembler.
11745
11746 2017-02-02 Pedro Alves <palves@redhat.com>
11747
11748 * ada-lang.c (type_as_string): Use string_file.
11749 * ada-valprint.c (ada_print_floating): Use string_file.
11750 * ada-varobj.c (ada_varobj_scalar_image)
11751 (ada_varobj_get_value_image): Use string_file.
11752 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11753 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11754 * breakpoint.c (update_inserted_breakpoint_locations)
11755 (insert_breakpoint_locations, reattach_breakpoints)
11756 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11757 (print_it_watchpoint): Use string_file.
11758 (save_breakpoints): Use stdio_file.
11759 * c-exp.y (oper): Use string_file.
11760 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11761 tee_file.
11762 (pop_output_files): Use delete.
11763 (handle_redirections): Use stdio_file and tee_file.
11764 * cli/cli-setshow.c (do_show_command): Use string_file.
11765 * compile/compile-c-support.c (c_compute_program): Use
11766 string_file.
11767 * compile/compile-c-symbols.c (generate_vla_size): Take a
11768 'string_file &' instead of a 'ui_file *'.
11769 (generate_c_for_for_one_variable): Take a 'string_file &' instead
11770 of a 'ui_file *'. Use string_file.
11771 (generate_c_for_variable_locations): Take a 'string_file &'
11772 instead of a 'ui_file *'.
11773 * compile/compile-internal.h (generate_c_for_for_one_variable):
11774 Take a 'string_file &' instead of a 'ui_file *'.
11775 * compile/compile-loc2c.c (push, pushf, unary, binary)
11776 (print_label, pushf_register_address, pushf_register)
11777 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11778 'ui_file *'. Adjust.
11779 * compile/compile.c (compile_to_object): Use string_file.
11780 * compile/compile.h (compile_dwarf_expr_to_c)
11781 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11782 'ui_file *'.
11783 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11784 (replace_typedefs_qualified_name): Use string_file and
11785 obstack_copy0.
11786 * disasm.c (gdb_pretty_print_insn): Use string_file.
11787 (gdb_disassembly): Adjust reference the null_stream global.
11788 (do_ui_file_delete): Delete.
11789 (gdb_insn_length): Use null_stream.
11790 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11791 * dwarf2loc.c (dwarf2_compile_property_to_c)
11792 (locexpr_generate_c_location, loclist_generate_c_location): Take a
11793 'string_file &' instead of a 'ui_file *'.
11794 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11795 * dwarf2read.c (do_ui_file_peek_last): Delete.
11796 (dwarf2_compute_name): Use string_file.
11797 * event-top.c (gdb_setup_readline): Use stdio_file.
11798 * gdbarch.sh (verify_gdbarch): Use string_file.
11799 * gdbtypes.c (safe_parse_type): Use null_stream.
11800 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11801 string_file.
11802 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11803 'string_file *' instead of a 'ui_file *'.
11804 (gdbscm_arch_disassemble): Use string_file.
11805 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11806 * guile/scm-ports.c (class ioscm_file_port): Now a class that
11807 inherits from ui_file.
11808 (ioscm_file_port_delete, ioscm_file_port_rewind)
11809 (ioscm_file_port_put): Delete.
11810 (ioscm_file_port_write): Rename to ...
11811 (ioscm_file_port::write): ... this. Remove file_port_magic
11812 checks.
11813 (ioscm_file_port_new): Delete.
11814 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11815 ui_file_up.
11816 * guile/scm-type.c (tyscm_type_name): Use string_file.
11817 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11818 Use string_file.
11819 * infcmd.c (print_return_value_1): Use string_file.
11820 * infrun.c (print_target_wait_results): Use string_file.
11821 * language.c (add_language): Use string_file.
11822 * location.c (explicit_to_string_internal): Use string_file.
11823 * main.c (captured_main_1): Use null_file.
11824 * maint.c (maintenance_print_architecture): Use stdio_file.
11825 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11826 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11827 event_channel>: Change type to mi_console_file pointer.
11828 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11829 (mi_console_file_delete): Delete.
11830 (struct mi_console_file): Delete.
11831 (mi_console_file_magic): Delete.
11832 (mi_console_file_new): Delete.
11833 (mi_console_file::mi_console_file): New.
11834 (mi_console_file_delete): Delete.
11835 (mi_console_file_fputs): Delete.
11836 (mi_console_file::write): New.
11837 (mi_console_raw_packet): Delete.
11838 (mi_console_file::flush): New.
11839 (mi_console_file_flush): Delete.
11840 (mi_console_set_raw): Rename to ...
11841 (mi_console_file::set_raw): ... this.
11842 * mi/mi-console.h (class mi_console_file): New class.
11843 (mi_console_file_new, mi_console_set_raw): Delete.
11844 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11845 (mi_set_logging): Use delete and tee_file. Adjust.
11846 * mi/mi-main.c (output_register): Use string_file.
11847 (mi_cmd_data_evaluate_expression): Use string_file.
11848 (mi_cmd_data_read_memory): Use string_file.
11849 (mi_cmd_execute, print_variable_or_computed): Use string_file.
11850 * mi/mi-out.c (mi_ui_out::main_stream): New.
11851 (mi_ui_out::rewind): Use main_stream and
11852 string_file.
11853 (mi_ui_out::put): Use main_stream and string_file.
11854 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11855 Allocate a 'string_file' instead.
11856 (mi_out_new): Don't allocate a mem_fileopen stream here.
11857 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11858 (mi_ui_out::main_stream): Declare method.
11859 * printcmd.c (eval_command): Use string_file.
11860 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11861 * python/py-arch.c (archpy_disassemble): Use string_file.
11862 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11863 * python/py-frame.c (frapy_str): Use string_file.
11864 * python/py-framefilter.c (py_print_type, py_print_single_arg):
11865 Use string_file.
11866 * python/py-type.c (typy_str): Use string_file.
11867 * python/py-unwind.c (unwind_infopy_str): Use string_file.
11868 * python/py-value.c (valpy_str): Use string_file.
11869 * record-btrace.c (btrace_insn_history): Use string_file.
11870 * regcache.c (regcache_print): Use stdio_file.
11871 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11872 * remote.c (escape_buffer): Use string_file.
11873 * rust-lang.c (rust_get_disr_info): Use string_file.
11874 * serial.c (serial_open_ops_1): Use stdio_file.
11875 (do_serial_close): Use delete.
11876 * stack.c (print_frame_arg): Use string_file.
11877 (print_frame_args): Remove local mem_fileopen stream, not used.
11878 (print_frame): Use string_file.
11879 * symmisc.c (maintenance_print_symbols): Use stdio_file.
11880 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11881 Take a 'string_file *' instead of a 'ui_file *'.
11882 * top.c (new_ui): Use stdio_file and stderr_file.
11883 (free_ui): Use delete.
11884 (execute_command_to_string): Use string_file.
11885 (quit_confirm): Use string_file.
11886 * tracepoint.c (collection_list::append_exp): Use string_file.
11887 * tui/tui-disasm.c (tui_disassemble): Use string_file.
11888 * tui/tui-file.c: Don't include "ui-file.h".
11889 (enum streamtype, struct tui_stream): Delete.
11890 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11891 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11892 (tui_file::tui_file): New method.
11893 (tui_file_fputs): Delete.
11894 (tui_file_get_strbuf): Delete.
11895 (tui_file::puts): New method.
11896 (tui_file_adjust_strbuf): Delete.
11897 (tui_file_flush): Delete.
11898 (tui_file::flush): New method.
11899 * tui/tui-file.h: Tweak intro comment.
11900 Include ui-file.h.
11901 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11902 (tui_file_adjust_strbuf): Delete declarations.
11903 (class tui_file): New class.
11904 * tui/tui-io.c (tui_initialize_io): Use tui_file.
11905 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11906 (tui_register_format): Use string_stream.
11907 * tui/tui-stack.c (tui_make_status_line): Use string_file.
11908 (tui_get_function_from_frame): Use string_file.
11909 * typeprint.c (type_to_string): Use string_file.
11910 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11911 (null_stream): New global.
11912 (ui_file_delete): Delete.
11913 (ui_file::ui_file): New.
11914 (null_file_isatty): Delete.
11915 (ui_file::~ui_file): New.
11916 (null_file_rewind): Delete.
11917 (ui_file::printf): New.
11918 (null_file_put): Delete.
11919 (null_file_flush): Delete.
11920 (ui_file::putstr): New.
11921 (null_file_write): Delete.
11922 (ui_file::putstrn): New.
11923 (null_file_read): Delete.
11924 (ui_file::putc): New.
11925 (null_file_fputs): Delete.
11926 (null_file_write_async_safe): Delete.
11927 (ui_file::vprintf): New.
11928 (null_file_delete): Delete.
11929 (null_file::write): New.
11930 (null_file_fseek): Delete.
11931 (null_file::puts): New.
11932 (ui_file_data): Delete.
11933 (null_file::write_async_safe): New.
11934 (gdb_flush, ui_file_isatty): Adjust.
11935 (ui_file_put, ui_file_rewind): Delete.
11936 (ui_file_write): Adjust.
11937 (ui_file_write_for_put): Delete.
11938 (ui_file_write_async_safe, ui_file_read): Adjust.
11939 (ui_file_fseek): Delete.
11940 (fputs_unfiltered): Adjust.
11941 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11942 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11943 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11944 (set_ui_file_data): Delete.
11945 (string_file::~string_file, string_file::write)
11946 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11947 (do_ui_file_as_string, ui_file_as_string): Delete.
11948 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11949 (struct mem_file): Delete.
11950 (mem_file_new): Delete.
11951 (stdio_file::stdio_file): New.
11952 (mem_file_delete): Delete.
11953 (stdio_file::stdio_file): New.
11954 (mem_fileopen): Delete.
11955 (stdio_file::~stdio_file): New.
11956 (mem_file_rewind): Delete.
11957 (stdio_file::set_stream): New.
11958 (mem_file_put): Delete.
11959 (stdio_file::open): New.
11960 (mem_file_write): Delete.
11961 (stdio_file_magic, struct stdio_file): Delete.
11962 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11963 (stdio_file::flush): New.
11964 (stdio_file_read): Rename to ...
11965 (stdio_file::read): ... this. Adjust.
11966 (stdio_file_write): Rename to ...
11967 (stdio_file::write): ... this. Adjust.
11968 (stdio_file_write_async_safe): Rename to ...
11969 (stdio_file::write_async_safe) ... this. Adjust.
11970 (stdio_file_fputs): Rename to ...
11971 (stdio_file::puts) ... this. Adjust.
11972 (stdio_file_isatty): Delete.
11973 (stdio_file_fseek): Delete.
11974 (stdio_file::isatty): New.
11975 (stderr_file_write): Rename to ...
11976 (stderr_file::write) ... this. Adjust.
11977 (stderr_file_fputs): Rename to ...
11978 (stderr_file::puts) ... this. Adjust.
11979 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11980 (stderr_file::stderr_file): New.
11981 (tee_file_magic): Delete.
11982 (struct tee_file): Delete.
11983 (tee_file::tee_file): New.
11984 (tee_file_new): Delete.
11985 (tee_file::~tee_file): New.
11986 (tee_file_delete): Delete.
11987 (tee_file_flush): Rename to ...
11988 (tee_file::flush): ... this. Adjust.
11989 (tee_file_write): Rename to ...
11990 (tee_file::write): ... this. Adjust.
11991 (tee_file::write_async_safe): New.
11992 (tee_file_fputs): Rename to ...
11993 (tee_file::puts): ... this. Adjust.
11994 (tee_file_isatty): Rename to ...
11995 (tee_file::isatty): ... this. Adjust.
11996 * ui-file.h (struct obstack, struct ui_file): Don't
11997 forward-declare.
11998 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11999 (ui_file_write_ftype)
12000 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
12001 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
12002 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
12003 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
12004 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
12005 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
12006 (set_ui_file_fseek): Delete.
12007 (ui_file_data, ui_file_delete, ui_file_rewind)
12008 (struct ui_file): New.
12009 (ui_file_up): New.
12010 (class null_file): New.
12011 (null_stream): Declare.
12012 (ui_file_write_for_put, ui_file_put): Delete.
12013 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
12014 Delete.
12015 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
12016 (gdb_fopen, tee_file_new): Delete.
12017 (struct string_file): New.
12018 (struct stdio_file): New.
12019 (stdio_file_up): New.
12020 (struct stderr_file): New.
12021 (class tee_file): New.
12022 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
12023 of a 'ui_file *'. Adjust.
12024 * ui-out.h (class ui_out) <field_stream>: Likewise.
12025 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
12026 (null_stream): Delete.
12027 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
12028 Adjust.
12029 * utils.h (struct ui_file): Delete forward declaration..
12030 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
12031 (error_stream): Take a 'string_file &' instead of a
12032 'ui_file *'.
12033 * varobj.c (varobj_value_get_print_value): Use string_file.
12034 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
12035 * gdbarch.c: Regenerate.
12036
12037 2017-02-02 Pedro Alves <palves@redhat.com>
12038
12039 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
12040 (gdb_pretty_print_insn): ... this. Now a free function. Add back
12041 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
12042 Adjust to call gdb_print_insn instead of
12043 gdb_disassembler::print_insn.
12044 (dump_insns, do_mixed_source_and_assembly_deprecated)
12045 (do_mixed_source_and_assembly, do_assembly_only): Add back a
12046 'gdbarch' parameter. Remove gdb_disassembler parameter.
12047 (gdb_disassembly): Don't allocate a gdb_disassembler here.
12048 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
12049 declaration.
12050 (gdb_pretty_print_insn): Re-add declaration.
12051 * record-btrace.c (btrace_insn_history): Don't allocate a
12052 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
12053
12054 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
12055
12056 * disasm.h (gdb_disassembly): Remove file_string parameter.
12057 * disasm.c (gdb_disassembly): Likewise.
12058 * cli/cli-cmds.c (print_disassembly): Adapt.
12059 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
12060 * stack.c (do_gdb_disassembly): Likewise.
12061
12062 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
12063
12064 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
12065 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
12066 targets. And if the implicit value is longer than needed, extract
12067 the first bytes instead of the "least significant" ones.
12068
12069 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
12070
12071 * btrace.c (btrace_enable): Do not call btrace_add_pc for
12072 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
12073 (btrace_fetch): Assert can_access_registers_ptid.
12074 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
12075 validate_registers_access.
12076
12077 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
12078
12079 * gdbthread.h (can_access_registers_ptid): New.
12080 * thread.c (can_access_registers_ptid): New.
12081
12082 2017-02-01 Pedro Alves <palves@redhat.com>
12083
12084 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
12085
12086 2017-01-31 Pedro Alves <palves@redhat.com>
12087
12088 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
12089 Fix typos.
12090
12091 2017-01-31 Pedro Alves <palves@redhat.com>
12092
12093 * stack.c (print_frame_args): Remove local mem_fileopen stream,
12094 not used.
12095
12096 2017-01-31 Pedro Alves <palves@redhat.com>
12097
12098 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
12099
12100 2017-01-31 Pedro Alves <palves@redhat.com>
12101
12102 * common/scoped_restore.h
12103 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
12104 change the value's parameter type to T2.
12105 (make_scoped_restore): Likewise.
12106
12107 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12108 Richard Henderson <rth@redhat.com>
12109
12110 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
12111 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
12112 GS_BASE for older kernels.
12113 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
12114 GS_BASE for older kernels.
12115 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
12116 and GS_BASE to the offset table.
12117 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
12118 system register group.
12119 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
12120 for older kernels.
12121 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
12122 amd64 ABI.
12123 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
12124 AMD64_GSBASE_REGNUM.
12125 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
12126 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
12127 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
12128 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
12129 i386/64bit-segments.xml in those rules.
12130 * features/i386/64bit-segments.xml: New file.
12131 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
12132 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
12133 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
12134 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
12135 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
12136 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
12137 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
12138 * features/i386/amd64-avx-linux.c: Regenerated.
12139 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
12140 * features/i386/amd64-avx-mpx.c: Regenerated.
12141 * features/i386/amd64-avx512-linux.c: Regenerated.
12142 * features/i386/amd64-linux.c: Regenerated.
12143 * features/i386/amd64-mpx-linux.c: Regenerated.
12144 * features/i386/i386-avx-mpx-linux.c: Regenerated.
12145 * features/i386/i386-avx-mpx.c: Regenerated.
12146 * features/i386/x32-avx-linux.c: Regenerated.
12147 * features/i386/x32-avx512-linux.c: Regenerated.
12148 * regformats/i386/amd64-avx-linux.dat: Regenerated.
12149 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
12150 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
12151 * regformats/i386/amd64-linux.dat: Regenerated.
12152 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
12153 * regformats/i386/x32-avx-linux.dat: Regenerated.
12154 * regformats/i386/x32-avx512-linux.dat: Regenerated.
12155 * regformats/i386/x32-linux.dat: Regenerated.
12156
12157 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12158
12159 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
12160 Set to AMD64_NUM_REGS.
12161
12162 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12163
12164 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
12165 that checks validity of a register number.
12166
12167 2017-01-27 Kees Cook <keescook@google.com>
12168
12169 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12170 fetch_fpregs if target has fpa registers.
12171 (arm_linux_store_inferior_registers): Call store_fpregs if target
12172 has fpa registers.
12173
12174 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
12175
12176 * cris-tdep.c (cris_gdbarch_init): Remove check for
12177 info.byte_order and force it to BFD_ENDIAN_LITTLE.
12178
12179 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
12180
12181 * corelow.c (get_core_register_section): Check for regset
12182 existence before checking for REGSET_VARIABLE_SIZE.
12183
12184 2017-01-26 Yao Qi <yao.qi@linaro.org>
12185 Pedro Alves <palves@redhat.com>
12186
12187 PR gdb/20939
12188 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12189 call memory_error, save memaddr instead.
12190 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12191 negative, cal memory_error.
12192 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12193
12194 2017-01-26 Yao Qi <yao.qi@linaro.org>
12195
12196 * disasm-selftests.c (memory_error_test): New function.
12197 (_initialize_disasm_selftests): Register memory_error_test.
12198
12199 2017-01-26 Yao Qi <yao.qi@linaro.org>
12200
12201 * Makefile.in (SFILES): Add disasm-selftests.c and
12202 selftest-arch.c.
12203 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12204 * disasm-selftests.c: New file.
12205 * selftest-arch.c: New file.
12206 * selftest-arch.h: New file.
12207
12208 2017-01-26 Yao Qi <yao.qi@linaro.org>
12209
12210 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12211 to bfd_arch_mep. Don't return 0 if section is not
12212 found. Call print_insn_mep.
12213
12214 2017-01-26 Pedro Alves <palves@redhat.com>
12215 Yao Qi <yao.qi@linaro.org>
12216
12217 * arm-tdep.c: Include "disasm.h".
12218 (gdb_print_insn_arm): Update code to get gdbarch.
12219 * disasm.c (dis_asm_read_memory): Change it to
12220 gdb_disassembler::dis_asm_read_memory.
12221 (dis_asm_memory_error): Likewise.
12222 (dis_asm_print_address): Likewise.
12223 (gdb_pretty_print_insn): Change it to
12224 gdb_disassembler::pretty_print_insn.
12225 (dump_insns): Add one argument gdb_disassemlber. All
12226 callers updated.
12227 (do_mixed_source_and_assembly_deprecated): Likewise.
12228 (do_mixed_source_and_assembly): Likewise.
12229 (do_assembly_only): Likewise.
12230 (gdb_disassembler::gdb_disassembler): New.
12231 (gdb_disassembler::print_insn): New.
12232 * disasm.h (class gdb_disassembler): New.
12233 (gdb_pretty_print_insn): Remove declaration.
12234 (gdb_disassemble_info): Likewise.
12235 * guile/scm-disasm.c (class gdbscm_disassembler): New.
12236 (gdbscm_disasm_read_memory_worker): Update.
12237 (gdbscm_disasm_read_memory): Update.
12238 (gdbscm_disasm_memory_error): Remove.
12239 (gdbscm_disasm_print_address): Remove.
12240 (gdbscm_disassembler::gdbscm_disassembler): New.
12241 (gdbscm_print_insn_from_port): Update.
12242 * mips-tdep.c: Include disasm.h.
12243 (gdb_print_insn_mips): Update code to get gdbarch.
12244 * record-btrace.c (btrace_insn_history): Update.
12245 * spu-tdep.c: Include disasm.h.
12246 (struct spu_dis_asm_data): Remove.
12247 (struct spu_dis_asm_info): New.
12248 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12249 SPU id.
12250 (gdb_print_insn_spu): Cast disassemble_info to
12251 spu_dis_asm_info.
12252
12253 2017-01-26 Yao Qi <yao.qi@linaro.org>
12254
12255 * disasm.c (do_ui_file_delete): Delete.
12256 (gdb_insn_length): Move code creating stream to ...
12257 * utils.c (null_stream): ... here. New function.
12258 * utils.h (null_stream): Declare.
12259
12260 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
12261
12262 * python/py-inferior.c (find_thread_object): Return directly
12263 from the loop. Remove "found" variable.
12264
12265 2017-01-21 Joel Brobecker <brobecker@adacore.com>
12266
12267 GDB 7.12.1 released.
12268
12269 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
12270
12271 * python/py-function.c (fnpy_call): Reorder declarations to have
12272 the gdbpy_enter object declared first.
12273 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12274
12275 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
12276
12277 PR python/21068
12278 * python/python-internal.h (PyMem_RawMalloc): Define for
12279 Python < 3.4.
12280 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12281 PyMem_RawMalloc instead of PyMem_Malloc.
12282
12283 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
12284 Luis Machado <lgustavo@codesourcery.com>
12285
12286 * NEWS (New commands): Mention flash-erase.
12287 (New MI commands): Mention target-flash-erase.
12288 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12289 command.
12290 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12291 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12292 * target.c (flash_erase_command): New function.
12293 (initialize_targets): Add new flash-erase command.
12294 * target.h (flash_erase_command): New declaration.
12295
12296 2017-01-20 Joel Brobecker <brobecker@adacore.com>
12297
12298 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12299 HAVE_SYS_PROCFS_H is defined.
12300
12301 2017-01-18 Alan Hayward <alan.hayward@arm.com>
12302
12303 * remote.c (struct cached_reg): Change data into a pointer.
12304 * (stop_reply_dtr): Free data pointers before deleting vector.
12305 (process_stop_reply): Likewise.
12306 (remote_parse_stop_reply): Allocate space for data
12307
12308 2017-01-18 Alan Hayward <alan.hayward@arm.com>
12309
12310 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12311 MAX_REGISTER_SIZE.
12312 (amd64_pseudo_register_read_value): Likewise.
12313 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12314 (store_register_using_P): Likewise.
12315 * regcache.c (regcache_xfer_part): Likewise.
12316
12317 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
12318
12319 Split real and pseudo registers.
12320 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12321 (sparc32_pseudo_regnum): New enum.
12322 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12323 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12324 (SPARC32_CP0_REGISTERS): New macro.
12325 (sparc32_pseudo_register_name): New function.
12326 (sparc32_register_name): Use sparc32_pseudo_register_name.
12327 (sparc32_pseudo_register_type): New function.
12328 (sparc32_register_type): Use sparc32_pseudo_register_type.
12329 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12330 pseudo register numbers.
12331 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12332 (SPARC64_CP0_REGISTERS): New macro.
12333 (sparc64_pseudo_register_name): New function.
12334 (sparc64_register_name): Use sparc64_pseudo_register_name.
12335 (sparc64_pseudo_register_type): New function.
12336 (sparc64_register_type): Use sparc64_pseudo_register_type.
12337 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12338 pseudo register numbers.
12339 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12340 sparc64_store_arguments): Handle pseudo register numbers.
12341
12342 2017-01-13 Yao Qi <yao.qi@linaro.org>
12343
12344 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12345 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12346 output.
12347 (getpkt_or_notif_sane_1): Likewise.
12348
12349 2017-01-13 Yao Qi <yao.qi@linaro.org>
12350
12351 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12352 of CC. Pass "-x c++-header" instead of "-x c".
12353
12354 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12355
12356 * remote.c (remote_can_async_p): Update comment.
12357
12358 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12359
12360 * linux-nat.c (linux_nat_can_async_p): Update comment.
12361
12362 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12363
12364 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12365
12366 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
12367
12368 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12369
12370 2017-01-10 Tom Tromey <tom@tromey.com>
12371
12372 * python/py-type.c (typy_legacy_template_argument): Update.
12373 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12374 ~demangle_parse_info): Declare new members.
12375 (cp_demangled_name_to_comp): Return unique_ptr.
12376 (cp_demangled_name_parse_free)
12377 (make_cleanup_cp_demangled_name_parse_free)
12378 (cp_new_demangle_parse_info): Remove.
12379 * cp-support.c (do_demangled_name_parse_free_cleanup)
12380 (make_cleanup_cp_demangled_name_parse_free): Remove.
12381 (inspect_type, cp_canonicalize_string_full)
12382 (cp_canonicalize_string): Update.
12383 (mangled_name_to_comp): Change return type.
12384 (cp_class_name_from_physname, method_name_from_physname)
12385 (cp_func_name, cp_remove_params): Update.
12386 * cp-name-parser.y (demangle_parse_info): New constructor, from
12387 cp_new_demangle_parse_info.
12388 (~demangle_parse_info): New destructor, from
12389 cp_demangled_name_parse_free.
12390 (cp_merge_demangle_parse_infos): Update.
12391 (cp_demangled_name_to_comp): Change return type.
12392
12393 2017-01-10 Tom Tromey <tom@tromey.com>
12394
12395 * top.c (prevent_dont_repeat): Change return type.
12396 * python/python.c (execute_gdb_command): Use std::string.
12397 Update.
12398 * guile/guile.c (gdbscm_execute_gdb_command): Update.
12399 * command.h (prevent_dont_repeat): Change return type.
12400 * breakpoint.c (bpstat_do_actions_1): Update.
12401
12402 2017-01-10 Tom Tromey <tom@tromey.com>
12403
12404 * value.h (scoped_value_mark::~scoped_value_mark): Call
12405 free_to_mark.
12406 (scoped_value_mark::free_to_mark): New method.
12407 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12408 scoped_value_mark.
12409
12410 2017-01-10 Tom Tromey <tom@tromey.com>
12411
12412 * python/py-value.c (valpy_dereference, valpy_referenced_value)
12413 (valpy_reference_value, valpy_const_value, valpy_get_address)
12414 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12415 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12416 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12417 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12418 scoped_value_mark.
12419 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12420 * value.h (scoped_value_mark): New class.
12421
12422 2017-01-10 Tom Tromey <tom@tromey.com>
12423
12424 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12425 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12426 * psymtab.c (discard_psymtabs_upto): Remove.
12427 (make_cleanup_discard_psymtabs): Remove.
12428 (struct psymtab_state): Remove.
12429
12430 2017-01-10 Tom Tromey <tom@tromey.com>
12431
12432 * record-full.c (record_full_save_cleanups): Remove.
12433 (record_full_save): Use gdb::unlinker.
12434 * gcore.c (do_bfd_delete_cleanup): Remove.
12435 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
12436 cleanups.
12437 * dwarf2read.c (unlink_if_set): Remove.
12438 (write_psymtabs_to_index): Use gdb::unlinker.
12439 * common/gdb_unlinker.h: New file.
12440
12441 2017-01-10 Tom Tromey <tom@tromey.com>
12442
12443 * windows-tdep.c (windows_xfer_shared_library): Update.
12444 * windows-nat.c (windows_make_so): Update.
12445 * utils.h (make_cleanup_bfd_unref): Remove.
12446 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12447 * symfile.h (symfile_bfd_open)
12448 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12449 * symfile.c (read_symbols, symbol_file_add)
12450 (separate_debug_file_exists): Update.
12451 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12452 (generic_load, reread_symbols): Update.
12453 * symfile-mem.c (symbol_file_add_from_memory): Update.
12454 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12455 (spu_symbol_file_add_from_memory): Update.
12456 * solist.h (struct target_so_ops) <bfd_open>: Return
12457 gdb_bfd_ref_ptr.
12458 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12459 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12460 gdb_bfd_ref_ptr.
12461 (solib_map_sections, reload_shared_libraries_1): Update.
12462 * solib-svr4.c (enable_break): Update.
12463 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12464 * solib-frv.c (enable_break2): Update.
12465 * solib-dsbt.c (enable_break): Update.
12466 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12467 gdb_bfd_ref_ptr.
12468 (darwin_solib_get_all_image_info_addr_at_init): Update.
12469 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12470 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12471 * record-full.c (record_full_save): Update.
12472 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12473 * procfs.c (insert_dbx_link_bpt_in_file): Update.
12474 * minidebug.c (find_separate_debug_file_in_section): Return
12475 gdb_bfd_ref_ptr.
12476 * machoread.c (macho_add_oso_symfile): Change abfd to
12477 gdb_bfd_ref_ptr.
12478 (macho_symfile_read_all_oso): Update.
12479 (macho_check_dsym): Return gdb_bfd_ref_ptr.
12480 (macho_symfile_read): Update.
12481 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12482 (jit_bfd_try_read_symtab): Update.
12483 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12484 (gdb_bfd_openw, gdb_bfd_openr_iovec)
12485 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12486 gdb_bfd_ref_ptr.
12487 (gdb_bfd_ref_policy): New struct.
12488 (gdb_bfd_ref_ptr): New typedef.
12489 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12490 (gdb_bfd_openw, gdb_bfd_openr_iovec)
12491 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12492 gdb_bfd_ref_ptr.
12493 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12494 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12495 (gcore_command): Update.
12496 * exec.c (exec_file_attach): Update.
12497 * elfread.c (elf_symfile_read): Update.
12498 * dwarf2read.c (dwarf2_get_dwz_file): Update.
12499 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12500 (open_and_init_dwo_file): Update.
12501 (open_dwp_file): Return gdb_bfd_ref_ptr.
12502 (open_and_init_dwp_file): Update.
12503 * corelow.c (core_open): Update.
12504 * compile/compile-object-load.c (compile_object_load): Update.
12505 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12506 * coffread.c (coff_symfile_read): Update.
12507 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12508 gdb_bfd_ref_ptr. Rename.
12509 (dump_bfd_file, restore_command): Update.
12510 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12511 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12512 (find_separate_debug_file_by_buildid): Update.
12513
12514 2017-01-10 Tom Tromey <tom@tromey.com>
12515
12516 * common/gdb_ref_ptr.h: New file.
12517 * python/py-ref.h (struct gdbpy_ref_policy): New.
12518 (gdbpy_ref): Now a typedef.
12519
12520 2017-01-10 Tom Tromey <tom@tromey.com>
12521
12522 * utils.h (make_cleanup_htab_delete): Don't declare.
12523 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12524 Remove.
12525 * linespec.c (decode_compound_collector): Add constructor,
12526 destructor.
12527 (lookup_prefix_sym): Remove cleanup.
12528 (symtab_collector): Add constructor, destructor.
12529 (collect_symtabs_from_filename): Remove cleanup.
12530 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12531 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12532 Use htab_up.
12533 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12534 * dwarf2read.c (dw2_expand_symtabs_matching)
12535 (dw2_map_symbol_filenames, dwarf_decode_macros)
12536 (write_psymtabs_to_index): Use htab_up.
12537 * dwarf2loc.c (func_verify_no_selftailcall)
12538 (call_site_find_chain_1, func_verify_no_selftailcall)
12539 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12540 std::vector, gdb::unique_xmalloc_ptr.
12541 (call_sitep): Remove typedef.
12542 (dwarf2_locexpr_baton_eval): Remove unused variable.
12543
12544 2017-01-10 Tom Tromey <tom@tromey.com>
12545
12546 * python/python-internal.h (make_cleanup_py_decref)
12547 (make_cleanup_py_xdecref): Don't declare.
12548 * python/py-utils.c (py_decref, make_cleanup_py_decref)
12549 (py_xdecref, make_cleanup_py_xdecref): Remove.
12550
12551 2017-01-10 Tom Tromey <tom@tromey.com>
12552
12553 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12554 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12555
12556 2017-01-10 Tom Tromey <tom@tromey.com>
12557
12558 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12559
12560 2017-01-10 Tom Tromey <tom@tromey.com>
12561
12562 * python/py-utils.c (unicode_to_encoded_string)
12563 (python_string_to_target_string)
12564 (python_string_to_target_python_string)
12565 (python_string_to_host_string, gdbpy_obj_to_string)
12566 (get_addr_from_python): Use gdbpy_ref.
12567
12568 2017-01-10 Tom Tromey <tom@tromey.com>
12569
12570 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12571 gdbpy_ref.
12572
12573 2017-01-10 Tom Tromey <tom@tromey.com>
12574
12575 * python/python.c (eval_python_command, gdbpy_decode_line)
12576 (gdbpy_run_events, gdbpy_start_type_printers)
12577 (gdbpy_apply_type_printers): Use gdbpy_ref.
12578
12579 2017-01-10 Tom Tromey <tom@tromey.com>
12580
12581 * python/py-param.c (get_doc_string, compute_enum_values): Use
12582 gdbpy_ref.
12583
12584 2017-01-10 Tom Tromey <tom@tromey.com>
12585
12586 * python/py-inferior.c (find_thread_object, build_inferior_list):
12587 Use gdbpy_ref.
12588
12589 2017-01-10 Tom Tromey <tom@tromey.com>
12590
12591 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12592
12593 2017-01-10 Tom Tromey <tom@tromey.com>
12594
12595 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12596 gdbpy_ref.
12597
12598 2017-01-10 Tom Tromey <tom@tromey.com>
12599
12600 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
12601 extra incref.
12602 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12603 Use gdbpy_ref.
12604
12605 2017-01-10 Tom Tromey <tom@tromey.com>
12606
12607 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12608 gdbpy_ref.
12609
12610 2017-01-10 Tom Tromey <tom@tromey.com>
12611
12612 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
12613 decref results of PyArg_ParseTupleAndKeywords.
12614
12615 2017-01-10 Tom Tromey <tom@tromey.com>
12616
12617 * python/python.c (python_run_simple_file): Use
12618 unique_xmalloc_ptr, gdbpy_ref.
12619
12620 2017-01-10 Tom Tromey <tom@tromey.com>
12621
12622 * python/py-prettyprint.c (print_stack_unless_memory_error)
12623 (print_string_repr, print_children): Use gdbpy_ref.
12624 (dummy_python_frame): New class.
12625 (dummy_python_frame::dummy_python_frame): Rename from
12626 push_dummy_python_frame.
12627 (py_restore_tstate): Remove.
12628
12629 2017-01-10 Tom Tromey <tom@tromey.com>
12630
12631 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12632
12633 2017-01-10 Tom Tromey <tom@tromey.com>
12634
12635 * python/python.c (ensure_python_env, restore_python_env):
12636 Remove.
12637 * python/python-internal.h (ensure_python_env): Don't declare.
12638 * varobj.h (varobj_ensure_python_env): Don't declare.
12639 * varobj.c (varobj_ensure_python_env): Remove.
12640
12641 2017-01-10 Tom Tromey <tom@tromey.com>
12642
12643 * varobj.c (varobj_value_get_print_value): Use
12644 gdbpy_enter_varobj.
12645
12646 2017-01-10 Tom Tromey <tom@tromey.com>
12647
12648 * python/py-prettyprint.c (print_string_repr, print_children):
12649 Update.
12650 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12651 of "encoding".
12652 * varobj.c (varobj_value_get_print_value): Update.
12653 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12654
12655 2017-01-10 Tom Tromey <tom@tromey.com>
12656
12657 * varobj.c (varobj_get_display_hint)
12658 (dynamic_varobj_has_child_method, install_new_value_visualizer)
12659 (varobj_set_visualizer, free_variable): Use
12660 gdbpy_enter_varobj.
12661
12662 2017-01-10 Tom Tromey <tom@tromey.com>
12663
12664 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12665 (do_finish_initialization): New function. Use gdbpy_ref.
12666 (gdbpy_finish_initialization): Use gdbpy_enter. Call
12667 do_finish_initialization.
12668
12669 2017-01-10 Tom Tromey <tom@tromey.com>
12670
12671 * python/py-param.c (get_set_value, get_show_value): Use
12672 gdbpy_enter, gdbpy_ref.
12673
12674 2017-01-10 Tom Tromey <tom@tromey.com>
12675
12676 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12677
12678 2017-01-10 Tom Tromey <tom@tromey.com>
12679
12680 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12681
12682 2017-01-10 Tom Tromey <tom@tromey.com>
12683
12684 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12685 Use gdbpy_enter_varobj.
12686
12687 2017-01-10 Tom Tromey <tom@tromey.com>
12688
12689 * varobj.c (gdbpy_enter_varobj): New constructor.
12690 * python/python-internal.h (gdbpy_enter_varobj): New class.
12691 * python/py-varobj.c (py_varobj_get_iterator): Use
12692 gdbpy_enter_varobj.
12693
12694 2017-01-10 Tom Tromey <tom@tromey.com>
12695
12696 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12697 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12698 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12699 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12700 unique_xmalloc_ptr.
12701 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12702
12703 2017-01-10 Tom Tromey <tom@tromey.com>
12704
12705 * python/py-xmethods.c (invoke_match_method): Use
12706 gdbpy_ref.
12707
12708 2017-01-10 Tom Tromey <tom@tromey.com>
12709
12710 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12711 gdbpy_enter, gdbpy_ref.
12712
12713 2017-01-10 Tom Tromey <tom@tromey.com>
12714
12715 * python/python.c (python_interactive_command): Use gdbpy_enter.
12716
12717 2017-01-10 Tom Tromey <tom@tromey.com>
12718
12719 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12720 gdbpy_ref.
12721
12722 2017-01-10 Tom Tromey <tom@tromey.com>
12723
12724 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12725 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12726
12727 2017-01-10 Tom Tromey <tom@tromey.com>
12728
12729 * utils.h (htab_deleter): New struct.
12730 (htab_up): New typedef.
12731 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12732 gdbpy_enter, gdbpy_ref, htab_up.
12733
12734 2017-01-10 Tom Tromey <tom@tromey.com>
12735
12736 * python/py-unwind.c (pending_frame_invalidate): Remove.
12737 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12738
12739 2017-01-10 Tom Tromey <tom@tromey.com>
12740
12741 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12742 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12743
12744 2017-01-10 Tom Tromey <tom@tromey.com>
12745
12746 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12747
12748 2017-01-10 Tom Tromey <tom@tromey.com>
12749
12750 * python/python.c (gdbpy_eval_from_control_command)
12751 (gdbpy_source_script, gdbpy_run_events)
12752 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12753 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12754 gdbpy_enter.
12755
12756 2017-01-10 Tom Tromey <tom@tromey.com>
12757
12758 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12759
12760 2017-01-10 Tom Tromey <tom@tromey.com>
12761
12762 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12763
12764 2017-01-10 Tom Tromey <tom@tromey.com>
12765
12766 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12767 (python_on_inferior_call_pre, python_on_inferior_call_post)
12768 (python_on_memory_change, python_on_register_change)
12769 (python_inferior_exit, python_new_objfile, add_thread_object)
12770 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12771
12772 2017-01-10 Tom Tromey <tom@tromey.com>
12773
12774 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12775 (bpfinishpy_handle_exit): Use gdbpy_enter.
12776
12777 2017-01-10 Tom Tromey <tom@tromey.com>
12778
12779 * python/py-cmd.c (cmdpy_destroyer)
12780 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12781 gdbpy_enter.
12782
12783 2017-01-10 Tom Tromey <tom@tromey.com>
12784
12785 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12786 gdbpy_enter.
12787 (gdbpy_breakpoint_has_cond): Likewise.
12788
12789 2017-01-10 Tom Tromey <tom@tromey.com>
12790
12791 * python/python.c (gdbpy_enter): New constructor.
12792 (~gdbpy_enter): New destructor.
12793 (restore_python_env, ensure_python_env): Rewrite.
12794 * python/python-internal.h (gdbpy_enter): New class.
12795
12796 2017-01-10 Tom Tromey <tom@tromey.com>
12797
12798 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12799
12800 2017-01-10 Tom Tromey <tom@tromey.com>
12801
12802 * python/py-value.c (value_has_field, get_field_flag)
12803 (get_field_type, valpy_getitem, convert_value_from_python): Use
12804 gdbpy_ref.
12805
12806 2017-01-10 Tom Tromey <tom@tromey.com>
12807
12808 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12809 gdbpy_ref.
12810
12811 2017-01-10 Tom Tromey <tom@tromey.com>
12812
12813 * python/py-prettyprint.c (search_pp_list)
12814 (find_pretty_printer_from_objfiles)
12815 (find_pretty_printer_from_progspace)
12816 (find_pretty_printer_from_gdb, find_pretty_printer)
12817 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12818 gdbpy_ref.
12819
12820 2017-01-10 Tom Tromey <tom@tromey.com>
12821
12822 * python/py-param.c (call_doc_function): Use gdbpy_ref.
12823
12824 2017-01-10 Tom Tromey <tom@tromey.com>
12825
12826 * python/py-linetable.c (build_line_table_tuple_from_pcs)
12827 (ltpy_get_all_source_lines): Use gdbpy_ref.
12828
12829 2017-01-10 Tom Tromey <tom@tromey.com>
12830
12831 * python/py-framefilter.c (extract_sym, extract_value)
12832 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12833 gdbpy_ref.
12834
12835 2017-01-10 Tom Tromey <tom@tromey.com>
12836
12837 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12838
12839 2017-01-10 Tom Tromey <tom@tromey.com>
12840
12841 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12842
12843 2017-01-10 Tom Tromey <tom@tromey.com>
12844
12845 * python/py-function.c (convert_values_to_python, fnpy_init): Use
12846 gdbpy_ref.
12847
12848 2017-01-10 Tom Tromey <tom@tromey.com>
12849
12850 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12851
12852 2017-01-10 Tom Tromey <tom@tromey.com>
12853
12854 * python/py-type.c (convert_field, make_fielditem, typy_fields)
12855 (typy_range): Use gdbpy_ref.
12856
12857 2017-01-10 Tom Tromey <tom@tromey.com>
12858
12859 * python/py-threadevent.c (create_thread_event_object): Use
12860 gdbpy_ref.
12861 * python/py-stopevent.c (create_stop_event_object): Simplify.
12862 (emit_stop_event): Use gdbpy_ref.
12863 * python/py-signalevent.c (create_signal_event_object): Use
12864 gdbpy_ref.
12865 * python/py-newobjfileevent.c (create_new_objfile_event_object)
12866 (emit_new_objfile_event, create_clear_objfiles_event_object)
12867 (emit_clear_objfiles_event): Use gdbpy_ref.
12868 * python/py-infevents.c (create_inferior_call_event_object)
12869 (create_register_changed_event_object)
12870 (create_memory_changed_event_object, emit_inferior_call_event)
12871 (emit_memory_changed_event, emit_register_changed_event): Use
12872 gdbpy_ref.
12873 * python/py-exitedevent.c (create_exited_event_object)
12874 (emit_exited_event): Use gdbpy_ref.
12875 * python/py-event.h (evpy_emit_event): Remove
12876 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12877 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12878 * python/py-continueevent.c (emit_continue_event): Use
12879 gdbpy_ref.
12880 * python/py-breakpoint.c (gdbpy_breakpoint_created)
12881 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12882 gdbpy_ref.
12883 * python/py-bpevent.c (create_breakpoint_event_object): Use
12884 gdbpy_ref.
12885
12886 2017-01-10 Tom Tromey <tom@tromey.com>
12887
12888 * python/py-ref.h: New file.
12889
12890 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12891
12892 * cli-out.c (cli_ui_out::do_redirect): Change return type to
12893 void.
12894 * cli-out.h (cli_ui_out::do_redirect): Likewise.
12895 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12896 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12897 * ui-out.c (ui_out::redirect): Likewise.
12898 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12899 * cli/cli-logging.c (set_logging_redirect): Update call site of
12900 ui_out::redirect.
12901 (handle_redirections): Likewise.
12902 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12903 * top.c (execute_command_to_string): Likewise.
12904 * utils.c (do_ui_out_redirect_pop): Likewise.
12905
12906 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12907
12908 * stack.c (_initialize_stack): Update "frame" command help message.
12909
12910 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
12911
12912 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12913
12914 2017-01-06 Yao Qi <yao.qi@linaro.org>
12915
12916 * x86-linux-nat.h: Include gdb_proc_service.h.
12917
12918 2017-01-06 Yao Qi <yao.qi@linaro.org>
12919
12920 * ser-base.h: Include serial.h.
12921
12922 2017-01-06 Yao Qi <yao.qi@linaro.org>
12923
12924 * ppc-linux-tdep.h: Include ppc-tdep.h.
12925
12926 2017-01-06 Yao Qi <yao.qi@linaro.org>
12927
12928 * nat/amd64-linux-siginfo.h: Include signal.h.
12929
12930 2017-01-06 Yao Qi <yao.qi@linaro.org>
12931
12932 * nat/aarch64-linux-hw-point.h: Include break-common.h.
12933
12934 2017-01-06 Yao Qi <yao.qi@linaro.org>
12935
12936 * mi/mi-parse.h: Include mi-cmds.h.
12937
12938 2017-01-06 Yao Qi <yao.qi@linaro.org>
12939
12940 * inf-loop.c: Don't include "target.h".
12941 * inf-loop.h: Include it here.
12942
12943 2017-01-06 Yao Qi <yao.qi@linaro.org>
12944
12945 * dfp.h: Include "dboulest.h" and "expression.h".
12946
12947 2017-01-06 Yao Qi <yao.qi@linaro.org>
12948
12949 * ax-gdb.h: Include "ax.h".
12950
12951 2017-01-06 Yao Qi <yao.qi@linaro.org>
12952
12953 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12954 with nat/gdb_ptrace.h.
12955
12956 2017-01-05 Yao Qi <yao.qi@linaro.org>
12957
12958 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12959 new line.
12960 (mips64_fbsd_sigframe_init): Likewise.
12961
12962 2017-01-04 John Baldwin <jhb@FreeBSD.org>
12963
12964 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12965 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12966
12967 2017-01-04 John Baldwin <jhb@FreeBSD.org>
12968
12969 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12970 * NEWS: Mention new FreeBSD/mips native configuration.
12971 * config/mips/fbsd.mh: New file.
12972 * configure.host: Add mips*-*-freebsd*.
12973 * mips-fbsd-nat.c: New file.
12974
12975 2017-01-04 John Baldwin <jhb@FreeBSD.org>
12976
12977 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12978 (ALLDEPFILES): Add mips-fbsd-tdep.c.
12979 * NEWS: Mention new FreeBSD/mips target.
12980 * configure.tgt: Add mips*-*-freebsd*.
12981 * mips-fbsd-tdep.c: New file.
12982 * mips-fbsd-tdep.h: New file.
12983
12984 2017-01-04 Yao Qi <yao.qi@linaro.org>
12985
12986 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12987 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12988
12989 2017-01-01 Joel Brobecker <brobecker@adacore.com>
12990
12991 Update copyright year range in all GDB files.
12992
12993 2017-01-01 Joel Brobecker <brobecker@adacore.com>
12994
12995 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12996
12997 For older changes see ChangeLog-2016.
12998 \f
12999 Local Variables:
13000 mode: change-log
13001 left-margin: 8
13002 fill-column: 74
13003 version-control: never
13004 coding: utf-8
13005 End:
This page took 0.909872 seconds and 5 git commands to generate.