1 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
3 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
4 "Removed targets and native configurations" up. Merge duplicate
5 "New commands" sub-sections. Add "New options" sub-sections.
7 2017-05-26 Alan Hayward <alan.hayward@arm.com>
9 * defs.h (copy_integer_to_size): New declaration.
10 * findvar.c (copy_integer_to_size): New function.
11 (do_cint_test): New selftest function.
12 (copy_integer_to_size_test): Likewise.
13 (_initialize_findvar): Likewise.
14 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
15 (mips_fbsd_collect_reg): Use raw_collect_integer.
16 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
17 (mips64_fill_gregset): Use raw_collect_integer
18 (mips64_fill_fpregset): Use raw_supply_integer.
19 * regcache.c (regcache::raw_supply_integer): New function.
20 (regcache::raw_collect_integer): Likewise.
21 * regcache.h: (regcache::raw_supply_integer): New declaration.
22 (regcache::raw_collect_integer): Likewise.
24 2017-05-24 Yao Qi <yao.qi@linaro.org>
26 * Makefile.in (SFILES): Add gdbarch-selftests.c.
27 (COMMON_OBS): Add gdbarch-selftests.o.
28 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
29 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
30 * gdbarch-selftests.c: New file.
31 * regcache.h (regcache) <~regcache>: Mark it virtual if
33 <raw_write>: Likewise.
35 2017-05-24 Yao Qi <yao.qi@linaro.org>
37 * regcache.c (current_regcache): Change it to
38 regcache::current_regcache.
39 (regcache_observer_target_changed): Update.
40 (regcache_thread_ptid_changed): Make it a regcache static
42 (regcache_thread_ptid_changed): Update.
43 (class regcache_access): New.
44 (current_regcache_test): Update.
45 (_initialize_regcache): Update.
46 * regcache.h: Include forward_list.
47 (regcache): Declare regcache_thread_ptid_changed and declare
48 registers_changed_ptid as friend.
50 2017-05-24 Yao Qi <yao.qi@linaro.org>
52 * i387-tdep.c (i387_register_to_value): Use register_size
53 instead of TYPE_LENGTH.
54 * m68k-tdep.c (m68k_register_to_value): Likewise.
56 2017-05-24 Yao Qi <yao.qi@linaro.org>
58 * i387-tdep.c (i387_convert_register_p): Return false if type
59 code isn't TYPE_CODE_FLT.
61 2017-05-24 Yao Qi <yao.qi@linaro.org>
63 * alpha-tdep.c (alpha_convert_register_p): Return true if type
65 (alpha_register_to_value): Remove type length check.
66 (alpha_value_to_register): Likewise.
68 2017-05-24 Yao Qi <yao.qi@linaro.org>
70 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
73 2017-05-24 Yao Qi <yao.qi@linaro.org>
75 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
78 2017-05-24 Yao Qi <yao.qi@linaro.org>
80 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
81 * avr-tdep.c (avr_gdbarch_init): Likewise.
82 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
83 * cris-tdep.c (cris_gdbarch_init): Likewise.
84 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
85 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
86 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
87 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
88 * mep-tdep.c (mep_gdbarch_init): Likewise.
89 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
90 * mips-tdep.c (mips_gdbarch_init): Likewise.
91 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
92 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
93 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
94 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
95 * v850-tdep.c (v850_gdbarch_init): Likewise.
97 2017-05-24 Yao Qi <yao.qi@linaro.org>
99 * selftest-arch.c (tests_with_arch): Call registers_changed
100 and reinit_frame_cache.
101 * selftest.c (run_self_tests): Likewise.
103 2017-05-24 Yao Qi <yao.qi@linaro.org>
105 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
106 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
108 2017-05-24 Yao Qi <yao.qi@linaro.org>
110 * rl78-tdep.c (rl78_gdbarch_init): Don't call
111 set_gdbarch_print_insn.
113 2017-05-24 Yao Qi <yao.qi@linaro.org>
115 * h8300-tdep.c (h8300_gdbarch_init): Don't call
116 set_gdbarch_print_insn.
118 2017-05-24 Yao Qi <yao.qi@linaro.org>
120 * alpha-tdep.c (alpha_gdbarch_init): Don't call
121 set_gdbarch_print_insn.
122 * arc-tdep.c (arc_gdbarch_init): Likewise.
123 * arch-utils.c: include dis-asm.h.
124 (default_print_insn): New function.
125 * arch-utils.h (default_print_insn): Declare.
126 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
127 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
128 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
129 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
130 * frv-tdep.c (frv_gdbarch_init): Likewise.
131 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
132 * gdbarch.sh (print_insn): Use default_print_insn.
133 * gdbarch.c: Regenerated.
134 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
135 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
136 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
137 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
138 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
139 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
140 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
141 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
142 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
143 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
144 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
145 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
146 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
147 * mt-tdep.c (mt_gdbarch_init): Likewise.
148 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
149 * nios2-tdep.c (nios2_print_insn): Remove.
150 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
151 * rx-tdep.c (rx_gdbarch_init): Likewise.
152 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
153 * score-tdep.c (score_print_insn): Remove.
154 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
155 * sh-tdep.c (sh_gdbarch_init): Likewise.
156 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
157 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
158 * tic6x-tdep.c (tic6x_print_insn): Remove.
159 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
160 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
161 * v850-tdep.c (v850_gdbarch_init): Likewise.
162 * vax-tdep.c (vax_gdbarch_init): Likewise.
163 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
164 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
166 2017-05-23 John Baldwin <jhb@FreeBSD.org>
168 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
169 (MIPS_FP0_REGNUM): Remove.
170 (MIPS_FSR_REGNUM): Remove.
171 (mips_fbsd_supply_fpregs): Use mips_regnum.
172 (mips_fbsd_supply_gregs): Likewise.
173 (mips_fbsd_collect_fpregs): Likewise.
174 (mips_fbsd_collect_gregs): Likewise.
176 2017-05-23 John Baldwin <jhb@FreeBSD.org>
178 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
179 (getpfpregs_supplies): New function.
180 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
182 (mips_fbsd_store_inferior_registers): Likewise.
184 2017-05-22 Pedro Alves <palves@redhat.com>
186 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
189 2017-05-22 Alan Hayward <alan.hayward@arm.com>
191 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
192 (store_register): Likewise.
193 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
194 (get_decimal_float_return_value): Likewise.
195 (do_ppc_sysv_return_value): Likewise.
196 (ppc64_sysv_abi_push_integer): Likewise.
197 (ppc64_sysv_abi_push_freg): Likewise.
198 (ppc64_sysv_abi_return_value_base): Likewise.
199 (ppc64_sysv_abi_return_value): Likewise.
200 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
201 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
202 * rs6000-nat.c: Likewise.
203 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
204 (rs6000_value_to_register): Likewise.
205 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
207 2017-05-21 Tom Tromey <tom@tromey.com>
210 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
211 arrays as "[T]", not "[T; ]".
213 2017-05-19 Tom Tromey <tom@tromey.com>
216 * rust-lang.c (exp_descriptor_rust): New function.
217 (rust_language_defn): Use it.
218 * p-lang.c (pascal_language_defn): Update.
219 * opencl-lang.c (opencl_language_defn): Update.
220 * objc-lang.c (objc_language_defn): Update.
221 * m2-lang.c (m2_language_defn): Update.
222 * language.h (struct language_defn)
223 <la_watch_location_expression>: New member.
224 * language.c (unknown_language_defn, auto_language_defn)
225 (local_language_defn): Update.
226 * go-lang.c (go_language_defn): Update.
227 * f-lang.c (f_language_defn): Update.
228 * d-lang.c (d_language_defn): Update.
229 * c-lang.h (c_watch_location_expression): Declare.
230 * c-lang.c (c_watch_location_expression): New function.
231 (c_language_defn, cplus_language_defn, asm_language_defn)
232 (minimal_language_defn): Use it.
233 * breakpoint.c (watch_command_1): Call
234 la_watch_location_expression.
235 * ada-lang.c (ada_language_defn): Update.
237 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
240 * gdb_curses.h (NOMACROS): Define.
241 (NCURSES_NOMACROS): Define.
243 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
246 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
248 * tui/tui-wingeneral.c (box_win): Likewise.
249 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
250 (tui_show_source_line): Likewise.
251 (tui_show_exec_info_content): Likewise.
253 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
255 * sparc-tdep.c (sparc_structure_return_p)
256 (sparc_arg_on_registers_p): New functions.
257 (sparc32_store_arguments): Use them.
258 * sparc64-tdep.c (sparc64_16_byte_align_p)
259 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
260 Handle TYPE_CODE_ARRAY.
262 2017-05-17 Yao Qi <yao.qi@linaro.org>
264 * cli/cli-decode.c (add_alias_cmd): New function.
265 * command.h (add_alias_cmd): Declare.
266 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
267 instead call add_alias_cmd.
269 2017-05-17 Pedro Alves <palves@redhat.com>
271 * Makefile.in (nat_extra_makefile_frag): Rename to ...
272 (nat_makefile_frag): ... this. All references updated.
273 * configure.ac: Likewise.
274 * configure.nat: Likewise. Enhance comments.
275 * configure: Regenerate.
277 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
279 * procfs.c (procfs_create_inferior): Change prototype to match
282 2017-05-13 Eli Zaretskii <eliz@gnu.org>
284 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
285 C++ compiler warning.
287 2017-05-12 Tom Tromey <tom@tromey.com>
290 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
291 recurse, just call value_struct_elt directly.
293 2017-05-12 Tom Tromey <tom@tromey.com>
295 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
298 2017-05-12 Tom Tromey <tom@tromey.com>
300 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
302 2017-05-09 Yao Qi <yao.qi@linaro.org>
304 * regcache.c: Include <forward_list>.
305 (struct regcache_list): Remove.
306 (current_regcache): Update.
307 (get_thread_arch_aspace_regcache): Update for std::forward_list.
308 (regcache_thread_ptid_changed): Likewise.
309 (registers_changed_ptid): Likewise.
310 (current_regcache_size): Likewise.
312 2017-05-09 Yao Qi <yao.qi@linaro.org>
314 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
315 (current_regcache_size): New function.
316 (current_regcache_test): New function.
317 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
319 2017-05-08 Alan Hayward <alan.hayward@arm.com>
321 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
322 (print_gp_register_row): Use get_frame_register_value.
324 2017-05-08 Alan Hayward <alan.hayward@arm.com>
326 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
327 (mips_supply_fpregset): Likewise.
328 (mips64_supply_gregset): Likewise.
330 2017-05-08 Alan Hayward <alan.hayward@arm.com>
332 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
333 regcache->raw_supply_zeroed.
335 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
337 * configure.nat: Rearrange 'case' statements to match
340 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
342 * Makefile.in: Remove "@host_makefile_frag@". Add variables
343 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
344 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
345 "@nat_extra_makefile_frag@".
346 (Makefile): Remove dependency on "@frags@".
347 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
348 (data-directory/Makefile): Likewise.
349 * config/aarch64/linux.mh: Deleted; moved contents to
351 * config/alpha/alpha-linux.mh: Likewise.
352 * config/alpha/nbsd.mh: Likewise.
353 * config/arm/linux.mh: Likewise.
354 * config/arm/nbsdelf.mh: Likewise.
355 * config/i386/cygwin.mh: Likewise.
356 * config/i386/cygwin64.mh: Likewise.
357 * config/i386/darwin.mh: Likewise.
358 * config/i386/fbsd.mh: Likewise.
359 * config/i386/fbsd64.mh: Likewise.
360 * config/i386/go32.mh: Likewise.
361 * config/i386/i386gnu.mh: Likewise.
362 * config/i386/i386sol2.mh: Likewise.
363 * config/i386/linux.mh: Likewise.
364 * config/i386/linux64.mh: Likewise.
365 * config/i386/mingw.mh: Likewise.
366 * config/i386/mingw64.mh: Likewise.
367 * config/i386/nbsd64.mh: Likewise.
368 * config/i386/nbsdelf.mh: Likewise.
369 * config/i386/nto.mh: Likewise.
370 * config/i386/obsd.mh: Likewise.
371 * config/i386/obsd64.mh: Likewise.
372 * config/i386/sol2-64.mh: Likewise.
373 * config/ia64/linux.mh: Likewise.
374 * config/m32r/linux.mh: Likewise.
375 * config/m68k/linux.mh: Likewise.
376 * config/m68k/nbsdelf.mh: Likewise.
377 * config/m68k/obsd.mh: Likewise.
378 * config/m88k/obsd.mh: Likewise.
379 * config/mips/fbsd.mh: Likewise.
380 * config/mips/linux.mh: Likewise.
381 * config/mips/nbsd.mh: Likewise.
382 * config/mips/obsd64.mh: Likewise.
383 * config/pa/linux.mh: Likewise.
384 * config/pa/nbsd.mh: Likewise.
385 * config/pa/obsd.mh: Likewise.
386 * config/powerpc/aix.mh: Likewise.
387 * config/powerpc/fbsd.mh: Likewise.
388 * config/powerpc/linux.mh: Likewise.
389 * config/powerpc/nbsd.mh: Likewise.
390 * config/powerpc/obsd.mh: Likewise.
391 * config/powerpc/ppc64-linux.mh: Likewise.
392 * config/powerpc/spu-linux.mh: Likewise.
393 * config/s390/linux.mh: Likewise.
394 * config/sh/nbsd.mh: Likewise.
395 * config/sparc/fbsd.mh: Likewise.
396 * config/sparc/linux.mh: Likewise.
397 * config/sparc/linux64.mh: Likewise.
398 * config/sparc/nbsd64.mh: Likewise.
399 * config/sparc/nbsdelf.mh: Likewise.
400 * config/sparc/obsd64.mh: Likewise.
401 * config/sparc/sol2.mh: Likewise.
402 * config/tilegx/linux.mh: Likewise.
403 * config/vax/nbsdelf.mh: Likewise.
404 * config/vax/obsd.mh: Likewise.
405 * config/xtensa/linux.mh: Likewise.
406 * config/i386/i386gnu.mn: New file, with excerpts from
407 "config/i386/i386gnu.mh".
408 * configure: Regenerate.
409 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
410 *.mh files under "gdb/config".
411 * configure.nat: New file, with contents from the
412 "gdb/config/*/*.mh" files.
414 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
416 * btrace.c (btrace_clear): Free insn vector.
418 2017-05-05 Pedro Alves <palves@redhat.com>
420 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
421 * configure: Regenerate.
423 2017-05-04 Pedro Alves <palves@redhat.com>
425 * Makefile.in (SFILES): Add progspace-and-thread.c.
426 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
427 (COMMON_OBS): Add progspace-and-thread.o.
428 * breakpoint.c: Include "progspace-and-thread.h".
429 (update_inserted_breakpoint_locations)
430 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
431 Use scoped_restore_current_pspace_and_thread.
432 (create_std_terminate_master_breakpoint): Use
433 scoped_restore_current_program_space.
434 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
435 (print_breakpoint_location): Use
436 scoped_restore_current_program_space.
437 (bp_loc_is_permanent): Use
438 scoped_restore_current_pspace_and_thread.
439 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
440 (download_tracepoint_locations): Use
441 scoped_restore_current_pspace_and_thread.
442 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
443 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
444 (enum step_over_calls_kind): Moved from inferior.h.
445 (class scoped_restore_current_thread): New class.
446 * gdbthread.h (make_cleanup_restore_current_thread): Delete
448 (scoped_restore_current_thread): New class.
449 * infcmd.c: Include "common/gdb_optional.h".
450 (continue_1, proceed_after_attach): Use
451 scoped_restore_current_thread.
452 (notice_new_inferior): Use scoped_restore_current_thread.
453 * inferior.c: Include "progspace-and-thread.h".
454 (restore_inferior, save_current_inferior): Delete.
455 (add_inferior_command, clone_inferior_command): Use
456 scoped_restore_current_pspace_and_thread.
457 * inferior.h (scoped_restore_current_inferior): New class.
458 * infrun.c: Include "progspace-and-thread.h" and
459 "common/gdb_optional.h".
460 (follow_fork_inferior): Use
461 scoped_restore_current_pspace_and_thread.
462 (scoped_restore_exited_inferior): New class.
463 (handle_vfork_child_exec_or_exit): Use
464 scoped_restore_exited_inferior,
465 scoped_restore_current_pspace_and_thread,
466 scoped_restore_current_thread and scoped_restore.
467 (fetch_inferior_event): Use scoped_restore_current_thread.
468 * linespec.c (decode_line_full, decode_line_1): Use
469 scoped_restore_current_program_space.
470 * mi/mi-main.c: Include "progspace-and-thread.h".
471 (exec_continue): Use scoped_restore_current_thread.
472 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
473 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
474 * proc-service.c (ps_pglobal_lookup): Use
475 scoped_restore_current_program_space.
476 * progspace-and-thread.c: New file.
477 * progspace-and-thread.h: New file.
478 * progspace.c (release_program_space, clone_program_space): Use
479 scoped_restore_current_program_space.
480 (restore_program_space, save_current_program_space)
481 (save_current_space_and_thread): Delete.
482 (switch_to_program_space_and_thread): Moved to
483 progspace-and-thread.c.
484 * progspace.h (save_current_program_space)
485 (save_current_space_and_thread): Delete declarations.
486 (scoped_restore_current_program_space): New class.
487 * remote.c (remote_btrace_maybe_reopen): Use
488 scoped_restore_current_thread.
489 * symtab.c: Include "progspace-and-thread.h".
490 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
491 * thread.c (print_thread_info_1): Use
492 scoped_restore_current_thread.
493 (struct current_thread_cleanup): Delete.
494 (do_restore_current_thread_cleanup)
495 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
496 (scoped_restore_current_thread::~scoped_restore_current_thread):
498 (make_cleanup_restore_current_thread): Rename/convert to ...
499 (scoped_restore_current_thread::scoped_restore_current_thread):
501 (thread_apply_all_command): Use scoped_restore_current_thread.
502 (thread_apply_command): Use scoped_restore_current_thread.
503 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
504 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
506 2017-05-04 Pedro Alves <palves@redhat.com>
508 * thread.c (make_cleanup_restore_current_thread): Move
509 find_thread_ptid call before the is_stopped call. Assert that the
510 thread is found. Replace is_stopped call by checking the thread's
511 state directly. Remove unnecessary NULL-thread check.
513 2017-05-04 Pedro Alves <palves@redhat.com>
515 * corelow.c (thread_section_name): New class.
516 (get_core_register_section, get_core_siginfo): Use it.
518 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
520 * corelow.c (sniff_core_bfd): Remove extra semicolon.
521 (get_core_register_section): Remove xfree of NULL pointer.
523 2017-05-03 Alan Hayward <alan.hayward@arm.com>
525 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
526 * regcache.c (regcache::raw_supply_zeroed): New function.
527 * regcache.h (regcache::raw_supply_zeroed): New declaration.
529 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
531 * gdbarch.sh: Remove commented out definition of
533 * gdbarch.h: Re-generate.
535 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
537 * configure: Regenerate.
539 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
541 * solib-target.c (solib_target_relocate_section_addresses):
542 Remove num_section_bases, num_bases, segment_bases variables.
544 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
546 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
548 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
550 * solib-target.c: Include <vector>
551 (struct lm_info_target) <~lm_info_target>: Remove.
552 <segment_bases, section_bases>: Change type to
553 std::vector<CORE_ADDR>.
554 (library_list_start_segment, library_list_start_section,
555 library_list_end_library,
556 solib_target_relocate_section_addresses): Adjust.
558 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
560 * gdbarch.sh (software_single_step): Change return type to
561 std::vector<CORE_ADDR>.
562 * gdbarch.c, gdbarch.h: Re-generate.
563 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
565 (arm_deal_with_atomic_sequence_raw): Adjust.
566 (thumb_get_next_pcs_raw): Adjust.
567 (arm_get_next_pcs_raw): Adjust.
568 (arm_get_next_pcs): Adjust.
569 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
570 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
571 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
572 (alpha_software_single_step): Adjust.
573 * alpha-tdep.h (alpha_software_single_step): Adjust.
574 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
575 * arm-tdep.c (arm_software_single_step): Adjust.
576 (arm_breakpoint_kind_from_current_state): Adjust.
577 * arm-tdep.h (arm_software_single_step): Adjust.
578 * breakpoint.c (insert_single_step_breakpoint): Adjust.
579 * cris-tdep.c (cris_software_single_step): Adjust.
580 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
581 (micromips_deal_with_atomic_sequence): Adjust.
582 (deal_with_atomic_sequence): Adjust.
583 (mips_software_single_step): Adjust.
584 * mips-tdep.h (mips_software_single_step): Adjust.
585 * moxie-tdep.c (moxie_software_single_step): Adjust.
586 * nios2-tdep.c (nios2_software_single_step): Adjust.
587 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
588 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
589 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
590 * s390-linux-tdep.c (s390_software_single_step): Adjust.
591 * sparc-tdep.c (sparc_software_single_step): Adjust.
592 * spu-tdep.c (spu_software_single_step): Adjust.
593 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
595 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
597 * gdbarch.sh: Use semi-colon as field separator instead of colon.
598 * gdbarch.h: Re-generate.
600 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
602 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
603 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
604 * python/py-instruction.c, python/py-instruction.h: New file.
605 * python/py-record.c: Add py-instruction.h include.
606 (gdbpy_initialize_record): Make gdb.Instruction a super class of
607 gdb.RecordInstruction.
608 * python/python-internal.h: Add gdbpy_initialize_instruction
610 * python/python.c (do_start_initialization): Add
611 gdbpy_initialize_instruction.
613 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
615 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
617 (btrace_func_from_recpy_func): New function.
618 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
619 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
620 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
621 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
622 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
623 Also, use new helper functions.
624 (btpy_list_item): Use new helper functions.
625 (recpy_bt_function_call_history): Use new type name.
626 (btpy_call_getset): Remove.
627 (gdbpy_initialize_btrace): Remove code to initialize
628 gdb.BtraceFunctionCall.
629 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
630 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
631 recpy_bt_func_prev, recpy_bt_func_next): New export.
632 * python/py-record.c (recpy_func_type): New static object.
633 (recpy_func_new, recpy_func_level, recpy_func_symbol,
634 recpy_func_instructions, recpy_func_up, recpy_func_prev,
635 recpy_func_next): New function.
636 (recpy_element_hash, recpy_element_richcompare): Updated comment.
637 (recpy_func_getset): New static object.
638 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
639 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
641 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
643 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
644 (btpy_object, btpy_insn_type, btpy_new): Remove.
645 (btpy_list_object): Use gdb.RecordInstruction type instead of
646 gdb.BtraceInstruction type.
647 (btrace_insn_from_recpy_insn): New function.
648 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
650 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
651 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
652 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
653 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
654 instead of btpy_object.
655 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
656 btpy_insn_data, btpy_insn_decode): Rename to ...
657 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
658 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
659 recpy_bt_insn_decode): This. Also, use new helper functions.
660 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
662 (btpy_insn_getset): Remove.
663 (gdbpy_initialize_btrace): Remove code to initialize
664 gdb.BtraceInstruction. Use recpy_element_object.
665 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
666 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
667 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
668 * python/py-record.c (recpy_insn_type): New static object.
669 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
670 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
671 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
673 (recpy_insn_getset): New static object.
674 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
675 * python/py-record.h (recpy_element_object): New typedef.
676 (recpy_insn_type, recpy_insn_new): New export.
678 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
680 * py-record-btrace.c (btpy_insn_new): Removed.
681 (btpy_insn_or_gap_new): New function.
682 (btpy_insn_error): Removed.
683 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
684 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
685 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
686 btpy_insn_or_gap_new instead of btpy_insn_new.
687 (btpy_insn_getset): Remove btpy_insn_error.
688 * py-record.c (recpy_gap_type): New static object.
689 (recpy_gap_object): New typedef.
690 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
691 recpy_gap_reason_string): New function.
692 (recpy_gap_getset): New static object.
693 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
694 * py-record.h (recpy_gap_new): New export.
696 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
698 * python/py-record.c (recpy_ptid): Remove.
699 (recpy_record_getset): Remove recpy_ptid.
701 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
703 * btrace.c (btrace_fetch): Set inferior_ptid.
704 * python/py-record-btrace.c: Add "py-record.h" include.
705 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
706 recpy_bt_end, recpy_bt_instruction_history,
707 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
708 in gdb.Record object instead of current ptid.
709 * python/py-record.c: Include new "py-record.h" file.
710 (recpy_record_object): Moved to py-record.h.
711 * python/py-record.h: New file.
713 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
715 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
716 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
719 2017-05-01 Joel Brobecker <brobecker@adacore.com>
721 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
722 the past maintainers section.
724 2017-04-28 Yao Qi <yao.qi@linaro.org>
726 * infcmd.c (get_return_value): Use regcache ctor, and remove
729 2017-04-28 Yao Qi <yao.qi@linaro.org>
730 Pedro Alves <palves@redhat.com>
732 * regcache.c (regcache::regcache): New tag dispatch ctor.
733 (do_cooked_read): Moved above.
734 (regcache_dup): Use the tag dispatch ctor..
735 * regcache.h (regcache): Declare ctor, delete copy ctor and
736 assignment operator, remove friend regcache_dup.
738 2017-04-28 Yao Qi <yao.qi@linaro.org>
740 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
741 call method save instead of regcache_cpy.
742 * regcache.h (struct regcache): Make regcache_dup a friend.
744 2017-04-28 Yao Qi <yao.qi@linaro.org>
746 * regcache.c (struct regcache): Move to regcache.h
747 (regcache::arch): New method.
748 (regcache_get_ptid): Update.
749 (get_regcache_arch): Call arch method.
750 (get_regcache_aspace): Call method aspace.
751 (register_buffer): Change it to method.
752 (regcache_save): Change it to regcache::save.
753 (regcache_restore): Likewise.
754 (regcache_cpy_no_passthrough): Remove the declaration.
755 (regcache_cpy): Call methods restore and cpy_no_passthrough.
756 (regcache_cpy_no_passthrough): Change it to method
758 (regcache_register_status): Change it to method
760 (regcache_invalidate): Change it to method invalidate.
761 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
762 (regcache_raw_update): Change it to method raw_update.
763 (regcache_raw_read): Likewise.
764 (regcache_raw_read_signed): Likewise.
765 (regcache_raw_read_unsigned): Likewise.
766 (regcache_raw_write_signed): Likewise.
767 (regcache_raw_write_unsigned): Likewise.
768 (regcache_cooked_read): Likewise.
769 (regcache_cooked_read_value): Likewise.
770 (regcache_cooked_read_signed): Likewise.
771 (regcache_cooked_read_unsigned): Likewise.
772 (regcache_cooked_write_signed): Likewise.
773 (regcache_cooked_write_unsigned): Likewise.
774 (regcache_raw_set_cached_value): Likewise.
775 (regcache_raw_write): Likewise.
776 (regcache_cooked_write): Likewise.
777 (regcache_xfer_part): Likewise.
778 (regcache_raw_read_part): Likewise.
779 (regcache_raw_write_part): Likewise.
780 (regcache_cooked_read_part): Likewise.
781 (regcache_cooked_write_part): Likewise.
782 (regcache_raw_supply): Likewise.
783 (regcache_raw_collect): Likewise.
784 (regcache_transfer_regset): Likewise.
785 (regcache_supply_regset): Likewise.
786 (regcache_collect_regset): Likewise.
787 (regcache_debug_print_register): Likewise.
788 (enum regcache_dump_what): Move it to regcache.h.
789 (regcache_dump): Change it to method dump.
790 * regcache.h (enum regcache_dump_what): New.
791 (class regcache): New.
792 * target.c (target_fetch_registers): Call method
793 debug_print_register.
794 (target_store_registers): Likewise.
796 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
798 * windows-nat.c (struct lm_info_windows): Initialize field.
799 (windows_make_so): Allocate lm_info_windows with new.
800 (windows_free_so): Free lm_info_windows with delete.
802 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
804 * solib-darwin.c (struct lm_info_darwin): Initialize field.
805 (darwin_current_sos): Allocate lm_info_darwin with new, remove
807 (darwin_free_so): Free lm_info_darwin with delete.
809 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
811 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
812 <l_addr_p>: Change type to bool.
813 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
814 (svr4_free_so): Free lm_info_svr4 with delete.
815 (svr4_copy_library_list): Replace memcpy with call to copy
817 (library_list_start_library, svr4_default_sos): Allocate
818 lm_info_svr4 with new.
820 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
822 * solib-target.c (struct lm_info_target): Add destructor,
824 <name>: Change type to std::string.
825 (library_list_start_library): Allocate lm_info_target with new.
826 (solib_target_free_library_list): Free lm_info_target with
828 (solib_target_current_sos): Adapt to std::string.
829 (solib_target_free_so): Free lm_info_target with delete.
831 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
833 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
835 (frv_current_sos): Allocate lm_info_frv with new.
836 (frv_relocate_main_executable): Free lm_info_frv with delete,
838 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
840 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
842 * solib-frv.c (struct lm_info_frv): Fix indentation.
844 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
846 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
848 (dsbt_current_sos): Allocate lm_info_dsbt with new.
849 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
850 and allocate with new.
851 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
853 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
855 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
856 <filename, member_name>: Change type to std::string.
857 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
858 (library_list_start_library): Allocate lm_info_aix with new.
859 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
860 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
861 with copy constructor.
863 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
865 * solist.h (struct lm_info): Remove.
866 (struct lm_info_base): New class.
867 (struct so_list) <lm_info>: Change type to lm_info_base *.
868 * nto-tdep.c (struct lm_info): Remove.
870 * solib-aix.c (struct lm_info): Rename to ...
871 (struct lm_info_aix): ... this. Extend lm_info_base.
872 (lm_info_p): Rename to ...
873 (lm_info_aix_p): ... this, and adjust.
874 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
875 solib_aix_parse_libraries, library_list_start_library,
876 solib_aix_free_library_list, solib_aix_parse_libraries,
877 solib_aix_get_library_list,
878 solib_aix_relocate_section_addresses, solib_aix_free_so,
879 solib_aix_get_section_offsets,
880 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
882 (struct solib_aix_inferior_data) <library_list>: Adjust.
883 * solib-darwin.c (struct lm_info): Rename to ...
884 (struct lm_info_darwin): ... this. Extend lm_info_base.
885 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
886 * solib-dsbt.c (struct lm_info): Rename to ...
887 (struct lm_info_dsbt): ... this. Extend lm_info_base.
888 (struct dsbt_info) <main_executable_lm_info): Adjust.
889 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
890 dsbt_relocate_section_addresses): Adjust.
891 * solib-frv.c (struct lm_info): Rename to ...
892 (struct lm_info_frv): ... this. Extend lm_info_base.
893 (main_executable_lm_info): Adjust.
894 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
895 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
896 find_canonical_descriptor_in_load_object,
897 frv_fdpic_find_canonical_descriptor): Adjust.
898 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
900 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
901 svr4_clear_so, svr4_copy_library_list,
902 library_list_start_library, svr4_default_sos, svr4_read_so_list,
903 svr4_current_sos, svr4_fetch_objfile_link_map,
904 solist_update_incremental): Adjust.
905 * solib-svr4.h (struct lm_info_svr4): Move here from
907 * solib-target.c (struct lm_info): Rename to ...
908 (struct lm_info_target): ... this. Extend lm_info_base.
909 (lm_info_p): Rename to ...
910 (lm_info_target_p): ... this.
911 (solib_target_parse_libraries, library_list_start_segment,
912 library_list_start_section, library_list_start_library,
913 library_list_end_library, solib_target_free_library_list,
914 solib_target_current_sos, solib_target_free_so,
915 solib_target_relocate_section_addresses): Adjust.
916 * windows-nat.c (struct lm_info): Rename to ...
917 (struct lm_info_windows): ... this. Extend lm_info_base.
918 (windows_make_so, handle_load_dll, handle_unload_dll,
919 windows_xfer_shared_libraries): Adjust.
921 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
923 * solib-darwin.c (struct darwin_so_list): Remove.
924 (darwin_current_sos): Allocate an so_list object instead of a
925 darwin_so_list, separately allocate an lm_info object.
926 (darwin_free_so): Free lm_info.
928 2017-04-28 John Baldwin <jhb@FreeBSD.org>
930 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
931 with fprintf_filtered.
933 2017-04-28 Yao Qi <yao.qi@linaro.org>
935 * regcache.c (regcache::regcache): New function.
936 (regcache::~regcache): New function.
937 (regcache_xmalloc_1): Remove.
938 (regcache_xmalloc): Call new regcache.
939 (regcache_xfree): Call delete regcache.
940 (get_thread_arch_aspace_regcache): Call new regcache.
942 2017-04-28 Yao Qi <yao.qi@linaro.org>
944 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
945 lwp instead of ptid_get_lwp.
947 2017-04-28 Yao Qi <yao.qi@linaro.org>
949 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
950 lwp_info instead of getting from inferior_ptid.
952 2017-04-27 Keith Seitz <keiths@redhat.com>
954 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
955 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
956 (CV_CONVERSION_BADNESS): Define.
957 (rank_one_type): Remove overly restrictive rvalue reference
959 Add cv-qualifier checks and subranks for type equality.
960 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
961 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
962 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
964 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
966 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
967 count when creating the object.
969 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
970 Ulrich Weigand <uweigand@de.ibm.com>
972 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
973 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
975 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
976 (process_xcoff_symbol): Likewise.
977 (scan_xcoff_symtab): Likewise.
979 2017-04-26 Alan Hayward <alan.hayward@arm.com>
981 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
982 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
983 (ia64_access_reg): Use get_frame_register_unsigned.
984 (ia64_access_rse_reg): Likewise.
985 (ia64_libunwind_frame_prev_register): Likewise.
987 2017-04-26 Jiong Wang <jiong.wang@arm.com>
989 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
990 * gdbarch.c: Regenerated.
991 * gdbarch.h: Regenerated.
992 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
994 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
995 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
996 (enum cfa_how_kind): Move to ...
997 (struct dwarf2_frame_state_reg_info): Likewise.
998 (struct dwarf2_frame_state): Likewise.
999 * dwarf2-frame.h: ... here.
1000 (dwarf2_frame_state_alloc_regs): New declaration.
1001 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
1002 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
1004 2017-04-26 Alan Hayward <alan.hayward@arm.com>
1006 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
1007 regcache_raw_read_unsigned.
1008 (xtensa_pseudo_register_write): Likewise.
1010 2017-04-26 Alan Hayward <alan.hayward@arm.com>
1012 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
1013 (nds32_pseudo_register_write): Likewise.
1015 2017-04-25 Yao Qi <yao.qi@linaro.org>
1017 * regcache.c (struct regcache) <readonly_p>: Change its type
1019 (regcache_xmalloc_1): Update parameter type and callers update.
1021 2017-04-25 Yao Qi <yao.qi@linaro.org>
1023 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
1024 set_gdbarch_wchar_bit.
1025 * arm-tdep.c (arm_gdbarch_init): Likewise.
1027 2017-04-25 Pedro Alves <palves@redhat.com>
1029 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
1030 (BothAreRelocatable, memcopy, memmove): Don't define.
1031 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
1034 2017-04-25 Pedro Alves <palves@redhat.com>
1036 * common/common-defs.h: Include "common/poison.h".
1037 * common/function-view.h: (Not, Or, Requires): Move to traits.h
1039 * common/poison.h: New file.
1040 * common/traits.h: Include <type_traits>.
1041 (Not, Or, Requires): New, moved from common/function-view.h.
1043 2017-04-25 Pedro Alves <palves@redhat.com>
1045 * breakpoint.h (struct breakpoint): In-class initialize all
1046 fields. Make boolean fields "bool".
1047 * breakpoint.c (init_raw_breakpoint_without_location): Remove
1048 memset call and initializations no longer necessary.
1050 2017-04-25 Pedro Alves <palves@redhat.com>
1052 * btrace.c (pt_btrace_insn_flags): Change parameter type to
1054 (pt_btrace_insn): New function.
1055 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
1057 2017-04-25 Pedro Alves <palves@redhat.com>
1059 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
1060 "base" field and inherit from "bp_location" instead. Add
1062 (allocate_location_exception): Use new non-default ctor.
1063 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
1064 (init_bp_location): Convert to ...
1065 (bp_location::bp_location): ... this new ctor, and remove memset
1067 (base_breakpoint_allocate_location): Use the new non-default ctor.
1068 * breakpoint.h (bp_location): Now a class. Declare default and
1069 non-default ctors. In-class initialize all members.
1070 (init_bp_location): Remove declaration.
1072 2017-04-25 Pedro Alves <palves@redhat.com>
1074 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
1075 assignment operator.
1077 2017-04-24 Yao Qi <yao.qi@linaro.org>
1079 * doublest.c (convert_doublest_to_floatformat): Call
1080 floatformat_totalsize_bytes.
1082 2017-04-22 Tom Tromey <tom@tromey.com>
1084 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1086 * stack.c (print_frame): Use ui_out_emit_list.
1087 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
1089 * mi/mi-main.c (print_one_inferior)
1090 (mi_cmd_data_list_register_names)
1091 (mi_cmd_data_list_register_values, mi_cmd_list_features)
1092 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
1094 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
1095 (mi_output_solib_attribs): Use ui_out_emit_list,
1097 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
1098 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
1099 (mi_cmd_stack_list_args, list_args_or_locals): Use
1101 * disasm.c (do_assembly_only): Use ui_out_emit_list.
1102 * breakpoint.c (print_solib_event, output_thread_groups): Use
1105 2017-04-22 Tom Tromey <tom@tromey.com>
1107 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
1108 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
1109 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
1111 2017-04-22 Tom Tromey <tom@tromey.com>
1113 * tracepoint.c (tvariables_info_1)
1114 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
1116 2017-04-22 Tom Tromey <tom@tromey.com>
1118 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
1119 annotate_arg_emitter.
1120 * breakpoint.c (print_mention_watchpoint)
1121 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
1122 * annotate.h (struct annotate_arg_emitter): New.
1124 2017-04-22 Tom Tromey <tom@tromey.com>
1126 * record-btrace.c (record_btrace_insn_history)
1127 (record_btrace_insn_history_range, record_btrace_call_history)
1128 (record_btrace_call_history_range): Use ui_out_emit_tuple.
1129 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
1131 * stack.c (print_frame_info): Use ui_out_emit_tuple.
1132 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
1133 * skip.c (skip_info): Use ui_out_emit_tuple.
1134 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
1135 * progspace.c (print_program_space): Use ui_out_emit_tuple.
1136 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
1137 * osdata.c (info_osdata): Use ui_out_emit_tuple.
1138 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
1140 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
1141 (output_register, mi_cmd_data_read_memory)
1142 (mi_cmd_data_read_memory_bytes, mi_load_progress)
1143 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
1144 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
1145 Use ui_out_emit_tuple.
1146 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
1148 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
1149 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
1150 * linux-thread-db.c (info_auto_load_libthread_db): Use
1152 * inferior.c (print_inferior): Use ui_out_emit_tuple.
1153 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
1154 * disasm.c (do_mixed_source_and_assembly_deprecated)
1155 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
1156 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
1157 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
1158 * breakpoint.c (print_one_breakpoint_location)
1159 (print_one_breakpoint): Use ui_out_emit_tuple.
1160 * auto-load.c (print_script, info_auto_load_cmd): Use
1162 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
1164 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
1166 * thread.c (print_thread_info_1): Remove dead code.
1168 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1170 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
1172 * arm-tdep.c (selftests::arm_record_test): Likewise.
1174 2017-04-21 Yao Qi <yao.qi@linaro.org>
1176 * regcache.c (regcache_restore): Remove argument 2. Replace
1177 argument 3 with regcache. Get register status from
1178 src->register_status and get register contents from
1179 register_buffer (src, regnum).
1180 (regcache_cpy): Update.
1182 2017-04-19 Pedro Alves <palves@redhat.com>
1184 * gdbthread.h (thread): Add missing closing parenthesis in
1187 2017-04-19 Pedro Alves <palves@redhat.com>
1189 * common/refcounted-object.h: New file.
1190 * gdbthread.h: Include "common/refcounted-object.h".
1191 (thread_info): Inherit from refcounted_object and add comments.
1192 (thread_info::incref, thread_info::decref)
1193 (thread_info::m_refcount): Delete.
1194 (thread_info::deletable): Use the refcounted_object::refcount()
1196 * inferior.c (current_inferior_): Add comment.
1197 (set_current_inferior): Increment/decrement refcounts.
1198 (prune_inferiors, remove_inferior_command): Skip inferiors marked
1199 not-deletable instead of comparing with the current inferior.
1200 (initialize_inferiors): Increment the initial inferior's refcount.
1201 * inferior.h (struct inferior): Forward declare.
1202 Include "common/refcounted-object.h".
1203 (current_inferior, set_current_inferior): Move declaration to
1204 before struct inferior's definition, and fix comment.
1205 (inferior): Inherit from refcounted_object. Add comments.
1206 * thread.c (switch_to_thread_no_regs): Reference the thread's
1207 inferior pointer directly instead of doing a ptid lookup.
1208 (switch_to_no_thread): New function.
1209 (switch_to_thread(thread_info *)): New function, factored out
1211 (switch_to_thread(ptid_t)): ... this.
1212 (restore_current_thread): Delete.
1213 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
1214 fields, and add 'inf' field.
1215 (do_restore_current_thread_cleanup): Check whether old->inf is
1216 alive instead of looking up an inferior by ptid. Use
1217 switch_to_thread and switch_to_no_thread.
1218 (restore_current_thread_cleanup_dtor): Use old->inf directly
1219 instead of lookup up an inferior by id. Decref the inferior.
1220 Don't restore 'removable'.
1221 (make_cleanup_restore_current_thread): Same the inferior pointer
1222 in old, instead of the inferior number. Incref the inferior.
1223 Don't save/clear 'removable'.
1225 2017-04-19 Pedro Alves <palves@redhat.com>
1227 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1228 unittests/scoped_restore-selftests.c.
1229 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
1230 * common/scoped_restore.h (scoped_restore_base): Make "class".
1231 (scoped_restore_base::release): New public method.
1232 (scoped_restore_base::scoped_restore_base): New protected ctor.
1233 (scoped_restore_base::m_saved_var): New protected field.
1234 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
1235 scoped_restore_base base class instead of m_saved_var directly.
1236 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
1237 (scoped_restore_tmpl::scoped_restore_tmpl(const
1238 scoped_restore_tmpl<T>&)): Likewise.
1239 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
1241 (scoped_restore_tmpl::saved_var): New method.
1242 (scoped_restore_tmpl::m_saved_var): Delete.
1243 * inferior.h (inferior::detaching): Now a bool.
1244 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
1246 * unittests/scoped_restore-selftests.c: New file.
1248 2017-04-19 Pedro Alves <palves@redhat.com>
1250 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
1251 Re-sort in alphabetic order.
1253 2017-04-18 Pedro Alves <palves@redhat.com>
1255 * xml-support.c (obstack_xml_printf): Delete.
1256 * xml-support.h (obstack_xml_printf): Delete.
1258 2017-04-18 Pedro Alves <palves@redhat.com>
1260 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
1261 vdebug, verror, body_text, start_element, end_element, name,
1262 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
1263 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
1264 is_xinclude>: Make private and add m_ prefix.
1265 (gdb_xml_parser::body_text): New method, based on ...
1266 (gdb_xml_body_text): ... this. Adjust.
1267 (gdb_xml_parser::vdebug): New method, based on ...
1268 (gdb_xml_debug): ... this. Adjust.
1269 (gdb_xml_parser::verror): New method, based on ...
1270 (gdb_xml_error): ... this. Adjust.
1271 (gdb_xml_parser::start_element): New method, based on ...
1272 (gdb_xml_start_element): ... this. Adjust.
1273 (gdb_xml_start_element_wrapper): Defer to
1274 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
1275 (gdb_xml_parser::end_element): New method, based on ...
1276 (gdb_xml_end_element_wrapper): ... this. Adjust.
1277 (gdb_xml_parser::~gdb_xml_parser): Adjust.
1278 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
1279 (gdb_xml_parser::use_dtd): New method, based on ...
1280 (gdb_xml_use_dtd): ... this. Adjust.
1281 (gdb_xml_parser::parse): New method, based on ...
1282 (gdb_xml_parse): ... this. Adjust.
1283 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
1284 (xinclude_start_include): Adjust to call the parser's name method.
1285 (xml_xinclude_default, xml_xinclude_start_doctype)
1286 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
1288 (xml_process_xincludes): Adjust to call parser methods.
1289 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
1292 2017-04-18 Pedro Alves <palves@redhat.com>
1294 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
1295 gdb::optional<std::string>.
1296 * xml-support.c: Include <string>.
1297 (scope_level::scope_level(scope_level &&))
1298 (scope_level::~scope_level): Delete.
1299 (scope_level::body): Now a std::string.
1300 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
1301 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
1303 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
1304 (xinclude_parsing_data::output): Now a std::string reference.
1305 (xinclude_start_include): Adjust.
1306 (xml_xinclude_default): Adjust.
1307 (xml_process_xincludes): Add 'output' parameter, and return bool.
1308 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
1310 * xml-tdesc.c: Include <unordered_map> and <string>.
1311 (tdesc_xml_cache): Delete.
1312 (tdesc_xml_cache_s): Delete.
1313 (xml_cache): Now an std::unordered_map.
1314 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
1315 (target_fetch_description_xml): Change return type to
1316 gdb::optional<std::string>, and adjust.
1317 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
1318 (target_fetch_description_xml): Change return type to
1319 gdb::optional<std::string>.
1321 2017-04-18 Pedro Alves <palves@redhat.com>
1323 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1324 unittests/optional-selftests.c.
1325 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
1326 * unittests/optional-selftests.c: New file.
1327 * unittests/optional/assignment/1.cc: New file.
1328 * unittests/optional/assignment/2.cc: New file.
1329 * unittests/optional/assignment/3.cc: New file.
1330 * unittests/optional/assignment/4.cc: New file.
1331 * unittests/optional/assignment/5.cc: New file.
1332 * unittests/optional/assignment/6.cc: New file.
1333 * unittests/optional/assignment/7.cc: New file.
1334 * unittests/optional/cons/copy.cc: New file.
1335 * unittests/optional/cons/default.cc: New file.
1336 * unittests/optional/cons/move.cc: New file.
1337 * unittests/optional/cons/value.cc: New file.
1338 * unittests/optional/in_place.cc: New file.
1339 * unittests/optional/observers/1.cc: New file.
1340 * unittests/optional/observers/2.cc: New file.
1342 2017-04-18 Pedro Alves <palves@redhat.com>
1344 * common/gdb_optional.h: Include common/traits.h.
1345 (in_place_t): New type.
1346 (in_place): New constexpr variable.
1347 (optional::optional): Remove member initialization of
1349 (optional::optional(in_place_t...)): New constructor.
1350 (optional::~optional): Use reset.
1351 (optional::optional(const optional&)): New.
1352 (optional::optional(const optional&&)): New.
1353 (optional::optional(T &)): New.
1354 (optional::optional(T &&)): New.
1355 (operator::operator=(const optional &)): New.
1356 (operator::operator=(optional &&)): New.
1357 (operator::operator= (const T &))
1358 (operator::operator= (T &&))
1359 (operator::emplace (Args &&... args)): Return a T&. Use reset.
1360 (operator::reset): New.
1361 (operator::m_instantiated):: Add in-class initializer.
1362 * common/traits.h: Include <type_traits>.
1363 (struct And): New types.
1365 2017-04-18 Pedro Alves <palves@redhat.com>
1367 * xml-support.c: Include <vector>.
1368 (scope_level::scope_level(const gdb_xml_element *))
1369 (scope_level::scope_level(scope_level&&)): New.
1370 (scope_level::~scope_level): New.
1371 (scope_level_s): Delete.
1372 (gdb_xml_parser::scopes): Now a std::vector.
1373 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
1375 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
1377 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
1378 of the scopes member. Use std::vector::emplace_back.
1380 2017-04-18 Pedro Alves <palves@redhat.com>
1382 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
1384 (gdb_xml_end_element): Change type of first parameter.
1385 (gdb_xml_cleanup): Rename to ...
1386 (gdb_xml_parser::~gdb_xml_parser): ... this.
1387 (gdb_xml_create_parser_and_cleanup): Delete with ...
1388 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
1390 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
1391 using gdb_xml_create_parser_and_cleanup.
1392 (xinclude_parsing_data): Add ctor/dtor.
1393 (xml_xinclude_cleanup): Delete.
1394 (xml_process_xincludes): Create a local xinclude_parsing_data
1395 instead of heap-allocating one. Create a local gdb_xml_parser
1396 instead of heap-allocating one with
1397 gdb_xml_create_parser_and_cleanup.
1399 2017-04-18 John Baldwin <jhb@FreeBSD.org>
1402 * fbsd-nat.c (resume_one_thread_cb): Remove.
1403 (resume_all_threads_cb): Remove.
1404 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
1405 iterate_over_threads.
1407 2017-04-17 Joel Brobecker <brobecker@adacore.com>
1409 * NEWS: Create a new section for the next release branch.
1410 Rename the section of the current branch, now that it has
1413 2017-04-17 Joel Brobecker <brobecker@adacore.com>
1415 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
1416 * version.in: Bump version to 8.0.50.DATE-git.
1418 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
1421 * windows-nat.c (windows_create_inferior): Declare 'allargs'
1422 independently of the host, and fix build breakage on Cygwin.
1424 2017-04-13 Pedro Alves <palves@redhat.com>
1426 * inferior.c (free_inferior): Convert to ...
1427 (inferior::~inferior): ... this dtor.
1428 (inferior::inferior): New ctor, factored out from ...
1429 (add_inferior_silent): ... here. Allocate the inferior with a new
1431 (delete_inferior): Call delete instead of free_inferior.
1432 * inferior.h (gdb_environ, continuation): Forward declare.
1433 (inferior): Now a class. Add in-class initialization to all
1434 members. Make boolean fields bool, except 'detaching'.
1435 (inferior::inferior): New explicit ctor.
1436 (inferior::~inferior): New.
1438 2017-04-13 Pedro Alves <palves@redhat.com>
1440 * inferior.c (init_inferior_list): Delete.
1441 * inferior.h (init_inferior_list): Delete.
1443 2017-04-13 Pedro Alves <palves@redhat.com>
1446 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
1447 (top level): Call it twice, with different thread sets.
1449 2017-04-13 Pedro Alves <palves@redhat.com>
1451 * thread.c: Include <algorithm>.
1452 (thread_array_cleanup): Delete.
1453 (scoped_inc_dec_ref): New class.
1454 (live_threads_count): New function.
1455 (set_thread_refcount): Delete.
1456 (tp_array_compar_ascending): Now a bool.
1457 (tp_array_compar): Convert to a std::sort comparison function.
1458 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
1459 and live_threads_count.
1461 2017-04-13 Pedro Alves <palves@redhat.com>
1463 * infrun.c (follow_fork_inferior): Also switch the current
1466 2017-04-13 Pedro Alves <palves@redhat.com>
1468 * breakpoint.c (watch_command_1): Save watchpoint-frame info
1469 before calling create_internal_breakpoint.
1471 2017-04-13 Pedro Alves <palves@redhat.com>
1473 * fork-child.c (execv_argv): New class.
1474 (breakup_args): Refactored as ...
1475 (execv_argv::init_for_no_shell): .. this method of execv_argv.
1476 Copy arguments to storage and replace separators with NULL
1477 terminators in place.
1478 (escape_bang_in_quoted_argument): Adjust to return bool.
1479 (execv_argv::execv_argv): New ctor.
1480 (execv_argv::init_for_shell): New method, factored out from
1481 fork_inferior. Don't strdup strings into the vector.
1482 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
1483 Remove free_vector_argv call.
1485 2017-04-13 Yao Qi <yao.qi@linaro.org>
1487 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
1490 2017-04-13 Yao Qi <yao.qi@linaro.org>
1492 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
1493 * rx-tdep.c (rx_gdbarch_init): Likewise.
1495 2017-04-13 Pedro Alves <palves@redhat.com>
1497 * breakpoint.h (struct breakpoint): Reindent.
1499 2017-04-13 Pedro Alves <palves@redhat.com>
1501 * breakpoint.c (bp_location): Rename to ...
1502 (bp_locations): ... this. All references updated.
1503 (bp_location_count): Rename to ...
1504 (bp_locations_count): ... this. All references updated.
1505 (bp_location_placed_address_before_address_max): Rename to ...
1506 (bp_locations_placed_address_before_address_max): ... this. All
1508 (bp_location_shadow_len_after_address_max): Rename to ...
1509 (bp_locations_shadow_len_after_address_max): ... this. All
1511 (bp_location_compare_addrs): Rename to ...
1512 (bp_locations_compare_addrs): ... this. All references updated.
1513 (bp_location_compare):Rename to ...
1514 (bp_locations_compare): ... this. All references updated.
1515 (bp_location_target_extensions_update): Rename to ...
1516 (bp_locations_target_extensions_update): ... this. All references
1519 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1521 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
1522 * common/common.m4: Check headers 'termios.h', 'termio.h' and
1524 * common/gdb_termios.h: New file, with parts of "terminal.h".
1525 * inflow.c: Include "gdb_termios.h".
1526 * ser-unix.c: Include "gdb_termios.h".
1527 * terminal.h: Move terminal-related defines to
1528 "common/gdb_termios.h".
1530 2017-04-12 Tom Tromey <tom@tromey.com>
1532 * probe.c (parse_probes): Update.
1533 * location.h (delete_event_location): Don't declare.
1534 (event_location_deleter::operator()): Update.
1535 * location.c (event_location_deleter::operator()): Rename from
1536 delete_event_location.
1537 * linespec.h (linespec_result) <location>: Change type to
1539 * linespec.c (canonicalize_linespec, event_location_to_sals)
1540 (decode_objc): Update.
1541 (linespec_result): Don't call delete_event_location.
1542 * breakpoint.c (create_breakpoints_sal)
1543 (bkpt_probe_create_sals_from_location)
1544 (strace_marker_create_sals_from_location): Update.
1546 2017-04-12 Tom Tromey <tom@tromey.com>
1548 * linespec.h (struct linespec_result): Add constructor and
1550 (init_linespec_result, destroy_linespec_result)
1551 (make_cleanup_destroy_linespec_result): Don't declare.
1552 * linespec.c (init_linespec_result): Remove.
1553 (linespec_result::~linespec_result): Rename from
1554 destroy_linespec_result. Update.
1555 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
1557 * breakpoint.c (create_breakpoint, break_range_command)
1558 (decode_location_default): Update.
1559 * ax-gdb.c (agent_command_1): Update.
1561 2017-04-12 Tom Tromey <tom@tromey.com>
1563 * remote.c (remote_download_tracepoint): Update.
1564 * python/py-breakpoint.c (bppy_get_location): Update.
1565 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
1566 (gdbscm_breakpoint_location): Update.
1567 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
1568 * breakpoint.h (struct breakpoint) <location, location_range_end>:
1569 Change type to event_location_up.
1570 * breakpoint.c (create_overlay_event_breakpoint)
1571 (create_longjmp_master_breakpoint)
1572 (create_std_terminate_master_breakpoint)
1573 (create_exception_master_breakpoint)
1574 (breakpoint_event_location_empty_p, print_breakpoint_location)
1575 (print_one_breakpoint_location, create_thread_event_breakpoint)
1576 (init_breakpoint_sal, create_breakpoint)
1577 (print_recreate_ranged_breakpoint, break_range_command)
1578 (init_ada_exception_breakpoint, say_where): Update.
1579 (base_breakpoint_dtor): Don't call delete_event_location.
1580 (bkpt_print_recreate, tracepoint_print_recreate)
1581 (dprintf_print_recreate, update_static_tracepoint)
1582 (breakpoint_re_set_default): Update.
1584 2017-04-12 Tom Tromey <tom@tromey.com>
1586 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1587 type of "to_do". Update.
1588 (compute_stack_depth): Use std::vector.
1590 2017-04-12 Tom Tromey <tom@tromey.com>
1592 * printcmd.c (find_instruction_backward): Use std::vector.
1594 2017-04-12 Tom Tromey <tom@tromey.com>
1596 * symfile.c (objfilep): Remove typedef.
1597 (reread_symbols): Use a std::vector.
1599 2017-04-12 Tom Tromey <tom@tromey.com>
1601 * mi/mi-main.c (exec_direction_forward): Remove.
1602 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
1603 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1605 * guile/guile.c (guile_repl_command, guile_command)
1606 (gdbscm_execute_gdb_command): Use scoped_restore.
1607 * go-exp.y (go_parse): Use scoped_restore.
1608 * d-exp.y (d_parse): Use scoped_restore.
1609 * cli/cli-decode.c (cmd_func): Use scoped_restore.
1610 * c-exp.y (c_parse): Use scoped_restore.
1612 2017-04-12 Tom Tromey <tom@tromey.com>
1614 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
1615 (mi_parse): Update return type.
1616 (mi_parse_free): Remove.
1617 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
1618 (mi_parse::~mi_parse): Rename from mi_parse_free.
1619 (mi_parse_cleanup): Remove.
1620 (mi_parse): Return a unique_ptr. Use new.
1621 * mi/mi-main.c (mi_execute_command): Update.
1623 2017-04-12 Tom Tromey <tom@tromey.com>
1625 * location.c (explicit_location_lex_one): Return a
1627 (string_to_explicit_location): Update. Remove cleanups.
1629 2017-04-12 Tom Tromey <tom@tromey.com>
1631 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
1632 (compare_value_and_voffset): Change type. Update.
1633 (compute_vtable_size): Change type of "offset_vec".
1634 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
1635 (gnuv3_get_typeid): Remove extraneous declaration.
1637 2017-04-12 Tom Tromey <tom@tromey.com>
1639 * charset.h (wchar_iterator): Fix comment.
1641 2017-04-12 Tom Tromey <tom@tromey.com>
1643 * charset.c (iconv_wrapper): New class.
1644 (cleanup_iconv): Remove.
1645 (convert_between_encodings): Use it.
1647 2017-04-12 Tom Tromey <tom@tromey.com>
1649 * symfile.h (increment_reading_symtab): Update type.
1650 * symfile.c (decrement_reading_symtab): Remove.
1651 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
1652 * psymtab.c (psymtab_to_symtab): Update.
1653 * dwarf2read.c (dw2_instantiate_symtab): Update.
1655 2017-04-12 Tom Tromey <tom@tromey.com>
1657 * jit.c (struct jit_reader): Declare separately. Add constructor
1658 and destructor. Change type of "handle".
1659 (loaded_jit_reader): Define separately.
1660 (jit_reader_load): Update. New "new".
1661 (jit_reader_unload_command): Use "delete".
1662 * gdb-dlfcn.h (struct dlclose_deleter): New.
1663 (gdb_dlhandle_up): New typedef.
1664 (gdb_dlopen, gdb_dlsym): Update types.
1665 (gdb_dlclose): Remove.
1666 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
1667 (gdb_dlsym): Change type of "handle".
1668 (make_cleanup_dlclose): Remove.
1669 (dlclose_deleter::operator()): Rename from gdb_dlclose.
1670 * compile/compile-c-support.c (load_libcc): Update.
1672 2017-04-12 Tom Tromey <tom@tromey.com>
1674 * symtab.h (find_pcs_for_symtab_line): Change return type.
1675 * symtab.c (find_pcs_for_symtab_line): Change return type.
1676 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
1677 type of "vec". Update.
1678 (ltpy_get_pcs_for_line): Update.
1679 * linespec.c (decode_digits_ordinary): Update.
1681 2017-04-12 Tom Tromey <tom@tromey.com>
1683 * tracepoint.c (actions_command): Update.
1684 * python/python.c (python_command, python_interactive_command):
1686 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
1687 * guile/guile.c (guile_command): Update.
1688 * defs.h (read_command_lines, read_command_lines_1): Return
1690 (command_lines_deleter): New struct.
1691 (command_line_up): New typedef.
1692 * compile/compile.c (compile_code_command)
1693 (compile_print_command): Update.
1694 * cli/cli-script.h (get_command_line, copy_command_lines): Return
1696 (make_cleanup_free_command_lines): Remove.
1697 * cli/cli-script.c (get_command_line, read_command_lines_1)
1698 (copy_command_lines): Return command_line_up.
1699 (while_command, if_command, read_command_lines, define_command)
1700 (document_command): Update.
1701 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
1703 * breakpoint.h (breakpoint_set_commands): Change type of
1705 * breakpoint.c (breakpoint_set_commands): Change type of
1707 (do_map_commands_command, update_dprintf_command_list)
1708 (create_tracepoint_from_upload): Update.
1710 2017-04-12 Tom Tromey <tom@tromey.com>
1712 * tracepoint.c (scope_info): Update.
1713 * spu-tdep.c (spu_catch_start): Update.
1714 * python/python.c (gdbpy_decode_line): Update.
1715 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
1716 * python/py-breakpoint.c (bppy_init): Update.
1717 * probe.c (parse_probes): Update.
1718 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
1719 * location.h (event_location_deleter): New struct.
1720 (event_location_up): New typedef.
1721 (new_linespec_location, new_address_location, new_probe_location)
1722 (new_explicit_location, copy_event_location)
1723 (string_to_event_location, string_to_event_location_basic)
1724 (string_to_explicit_location): Update return type.
1725 (make_cleanup_delete_event_location): Remove.
1726 * location.c (new_linespec_location, new_address_location)
1727 (new_probe_location, new_explicit_location, copy_event_location):
1728 Return event_location_up.
1729 (delete_event_location_cleanup)
1730 (make_cleanup_delete_event_location): Remove.
1731 (string_to_explicit_location, string_to_event_location_basic)
1732 (string_to_event_location): Return event_location_up.
1733 * linespec.c (canonicalize_linespec, event_location_to_sals)
1734 (decode_line_with_current_source)
1735 (decode_line_with_last_displayed, decode_objc): Update.
1736 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
1737 * completer.c (location_completer): Update.
1738 * cli/cli-cmds.c (edit_command, list_command): Update.
1739 * breakpoint.c (create_overlay_event_breakpoint)
1740 (create_longjmp_master_breakpoint)
1741 (create_std_terminate_master_breakpoint)
1742 (create_exception_master_breakpoint)
1743 (create_thread_event_breakpoint): Update.
1744 (init_breakpoint_sal): Update. Remove some dead code.
1745 (create_breakpoint_sal): Change type of "location". Update.
1746 (create_breakpoints_sal, create_breakpoint, break_command_1)
1747 (dprintf_command, break_range_command, until_break_command)
1748 (init_ada_exception_breakpoint)
1749 (strace_marker_create_sals_from_location)
1750 (update_static_tracepoint, trace_command, ftrace_command)
1751 (strace_command, create_tracepoint_from_upload): Update.
1752 * break-catch-throw.c (re_set_exception_catchpoint): Update.
1753 * ax-gdb.c (agent_command_1): Update.
1755 2017-04-12 Pedro Alves <palves@redhat.com>
1757 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
1758 * configure.tgt: Handle i[34567]86-*-go32* and
1759 i[34567]86-*-msdosdjgpp*.
1760 * i386-tdep.c (i386_svr4_reg_to_regnum):
1762 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
1764 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
1765 * i386-go32-tdep.c: New file.
1766 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
1769 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
1771 * aix-thread.c (pd_status2str): Change return type to const char *.
1773 2017-04-12 Pedro Alves <palves@redhat.com>
1775 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
1776 calls to set_gdbarch_gnu_triplet_regexp.
1778 2017-04-12 Pedro Alves <palves@redhat.com>
1781 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
1783 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
1784 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
1785 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
1786 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
1787 * gdbarch.h, gdbarch.c: Regenerate.
1788 * aarch64-tdep.c (aarch64_gdbarch_init): Override
1789 gdbarch_wchar_bit and gdbarch_wchar_signed.
1790 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
1791 * arm-tdep.c (arm_gdbarch_init): Likewise.
1792 * avr-tdep.c (avr_gdbarch_init): Likewise.
1793 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
1794 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
1795 * i386-tdep.c (i386_go32_init_abi): Likewise.
1796 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
1797 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
1798 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1799 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
1800 * sh-tdep.c (sh_gdbarch_init): Likewise.
1801 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
1802 * sparc64-tdep.c (sparc64_init_abi): Likewise.
1803 * windows-tdep.c (windows_init_abi): Likewise.
1804 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
1806 2017-04-12 Pedro Alves <palves@redhat.com>
1809 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
1810 cplus_primitive_type_char32_t>: New enum values.
1811 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
1812 and cplus_primitive_type_char32_t.
1813 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
1814 32, use the archtecture's built-in type for char16_t and char32_t,
1815 respectively. Otherwise, fallback to init_integer_type as before,
1816 but make the type unsigned, and issue a complaint.
1817 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
1819 2017-04-12 Alan Hayward <alan.hayward@arm.com>
1821 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
1822 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
1824 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1826 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
1829 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1831 * common/common-utils.c (free_vector_argv): New function.
1832 * common/common-utils.h: Include <vector>.
1833 (free_vector_argv): New prototype.
1834 * darwin-nat.c (darwin_create_inferior): Rewrite function
1835 prototype in order to constify "exec_file" and accept a
1836 "std::string" for "allargs".
1837 * fork-child.c: Include <vector>.
1838 (breakup_args): Rewrite function, using C++.
1839 (fork_inferior): Rewrite function header, constify "exec_file_arg"
1840 and accept "std::string" for "allargs". Update the code to
1841 calculate "argv" based on "allargs". Update calls to "exec_fun"
1843 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
1844 order to constify "exec_file" and accept a "std::string" for
1846 * go32-nat.c (go32_create_inferior): Likewise.
1847 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
1848 * infcmd.c (run_command_1): Constify "exec_file". Use
1849 "std::string" for inferior arguments.
1850 * inferior.h (fork_inferior): Update prototype.
1851 * linux-nat.c (linux_nat_create_inferior): Rewrite function
1852 prototype in order to constify "exec_file" and accept a
1853 "std::string" for "allargs".
1854 * nto-procfs.c (procfs_create_inferior): Likewise.
1855 * procfs.c (procfs_create_inferior): Likewise.
1856 * remote-sim.c (gdbsim_create_inferior): Likewise.
1857 * remote.c (extended_remote_run): Update code to accept
1858 "std::string" as argument.
1859 (extended_remote_create_inferior): Rewrite function prototype in
1860 order to constify "exec_file" and accept a "std::string" for
1862 * rs6000-nat.c (super_create_inferior): Likewise.
1863 (rs6000_create_inferior): Likewise.
1864 * target.h (struct target_ops) <to_create_inferior>: Likewise.
1865 * windows-nat.c (windows_create_inferior): Likewise.
1867 2017-04-11 Pedro Alves <palves@redhat.com>
1869 * thread.c: Fix whitespace throughout.
1871 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
1873 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
1875 2017-04-11 Alan Hayward <alan.hayward@arm.com>
1877 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
1879 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
1882 * osdata.c (info_osdata): Check if 'type' is an empty string
1885 2017-04-10 Pedro Alves <palves@redhat.com>
1887 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
1888 (ptid_to_global_thread_id, in_thread_list)
1889 (do_captured_list_thread_ids, set_resumed, set_running)
1890 (set_executing, set_stop_requested, finish_thread_state)
1891 (validate_registers_access, can_access_registers_ptid)
1892 (print_thread_info_1, switch_to_thread)
1893 (do_restore_current_thread_cleanup)
1894 (make_cleanup_restore_current_thread, thread_command)
1895 (thread_name_command): Use operator== instead of ptid_equal.
1897 2017-04-10 Pedro Alves <palves@redhat.com>
1899 * thread.c (struct current_thread_cleanup) <next>: Delete field.
1900 (current_thread_cleanup_chain): Delete.
1901 (restore_current_thread_cleanup_dtor)
1902 (make_cleanup_restore_current_thread): Remove references to
1903 current_thread_cleanup_chain.
1905 2017-04-10 Alan Hayward <alan.hayward@arm.com>
1907 * msp430-tdep.c (msp430_pseudo_register_read): Never return
1910 2017-04-10 Yao Qi <yao.qi@linaro.org>
1913 * gdbthread.h (thread_info::deletable): New method.
1914 (thread_info::incref): New method.
1915 (thread_info::decref): New method.
1916 (thread_info::refcount): Move it to private.
1917 * infrun.c (save_stop_context): Call inc_refcount.
1918 (release_stop_context_cleanup): Likewise.
1919 * thread.c (set_thread_exited): New function.
1920 (init_thread_list): Delete "tp" only it is deletable, otherwise
1921 call set_thread_exited.
1922 (delete_thread_1): Call set_thread_exited.
1923 (current_thread_cleanup) <inferior_pid>: Remove.
1924 <thread>: New field.
1925 (restore_current_thread_ptid_changed): Removed.
1926 (do_restore_current_thread_cleanup): Adjust.
1927 (restore_current_thread_cleanup_dtor): Don't call
1929 (set_thread_refcount): Use dec_refcount.
1930 (make_cleanup_restore_current_thread): Adjust.
1931 (thread_apply_all_command): Call inc_refcount.
1932 (_initialize_thread): Don't call
1933 observer_attach_thread_ptid_changed.
1935 2017-04-10 Yao Qi <yao.qi@linaro.org>
1937 * thread.c (delete_thread_1): Hoist code on marking thread as
1940 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
1942 * windows-nat.c (windows_detach): Initialize ptid with
1945 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
1947 * unittests/ptid-selftests.c: Fix erroneous assert messages.
1949 2017-04-07 Alan Hayward <alan.hayward@arm.com>
1951 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
1952 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
1953 (bfin_pseudo_register_write): Likewise
1955 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1957 * common/ptid.h (struct ptid): Change to...
1958 (class ptid_t): ... this.
1959 <ptid_t>: New constructors.
1960 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
1961 matches>: New methods.
1962 <make_null, make_minus_one>: New static methods.
1969 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
1970 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
1971 as references, move comment to class ptid_t.
1972 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
1973 ptid_t static methods.
1974 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
1975 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
1976 Take ptid arguments as references, implement using ptid_t methods.
1977 * unittests/ptid-selftests.c: New file.
1978 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1979 unittests/ptid-selftests.c.
1980 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
1982 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
1984 * python/python.c (python_run_simple_file): Cast mode literal to
1985 non-const char pointer as expected by PyFile_FromString.
1987 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
1989 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
1990 minus_one_ptid and null_ptid.
1992 2017-04-05 Pedro Alves <palves@redhat.com>
1994 * warning.m4 (build_warnings): Remove -Wno-write-strings.
1995 * configure: Regenerate.
1997 2017-04-05 Pedro Alves <palves@redhat.com>
1999 * ada-exp.y (yyerror): Constify.
2000 * ada-lang.c (bound_name, get_selections)
2001 (ada_variant_discrim_type)
2002 (ada_variant_discrim_name, ada_value_struct_elt)
2003 (ada_lookup_struct_elt_type, is_unchecked_variant)
2004 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
2005 (catch_ada_exception_command_split)
2006 (catch_ada_assert_command_split, catch_assert_command)
2007 (ada_op_name): Constify.
2008 * ada-lang.h (ada_yyerror, get_selections)
2009 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
2010 * arc-tdep.c (arc_print_frame_cache): Constify.
2011 * arm-tdep.c (arm_skip_stub): Constify.
2012 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
2013 (gen_aggregate_elt_ref): Constify.
2014 * bcache.c (print_bcache_statistics): Constify.
2015 * bcache.h (print_bcache_statistics): Constify.
2016 * break-catch-throw.c (catch_exception_command_1):
2017 * breakpoint.c (struct ep_type_description::description):
2019 (add_solib_catchpoint): Constify.
2020 (catch_fork_command_1): Add cast.
2021 (add_catch_command): Constify.
2022 * breakpoint.h (add_catch_command, add_solib_catchpoint):
2024 * bsd-uthread.c (bsd_uthread_state): Constify.
2025 * buildsym.c (patch_subfile_names): Constify.
2026 * buildsym.h (next_symbol_text_func, patch_subfile_names):
2028 * c-exp.y (yyerror): Constify.
2029 (token::oper): Constify.
2030 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
2031 * c-varobj.c (cplus_describe_child): Constify.
2032 * charset.c (find_charset_names): Add cast.
2033 (find_charset_names): Constify array and add const_cast.
2034 * cli/cli-cmds.c (complete_command, cd_command): Constify.
2035 (edit_command): Constify.
2036 * cli/cli-decode.c (lookup_cmd): Constify.
2037 * cli/cli-dump.c (dump_memory_command, dump_value_command):
2039 (struct dump_context): Constify.
2040 (add_dump_command, restore_command): Constify.
2041 * cli/cli-script.c (get_command_line): Constify.
2042 * cli/cli-script.h (get_command_line): Constify.
2043 * cli/cli-utils.c (check_for_argument): Constify.
2044 * cli/cli-utils.h (check_for_argument): Constify.
2045 * coff-pe-read.c (struct read_pe_section_data): Constify.
2046 * command.h (lookup_cmd): Constify.
2047 * common/print-utils.c (decimal2str): Constify.
2048 * completer.c (gdb_print_filename): Constify.
2049 * corefile.c (set_gnutarget): Constify.
2050 * cp-name-parser.y (yyerror): Constify.
2051 * cp-valprint.c (cp_print_class_member): Constify.
2052 * cris-tdep.c (cris_register_name, crisv32_register_name):
2054 * d-exp.y (yyerror): Constify.
2055 (struct token::oper): Constify.
2056 * d-lang.h (d_yyerror): Constify.
2057 * dbxread.c (struct header_file_location::name): Constify.
2058 (add_old_header_file, add_new_header_file, last_function_name)
2059 (dbx_next_symbol_text, add_bincl_to_list)
2060 (find_corresponding_bincl_psymtab, set_namestring)
2061 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
2062 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
2063 * defs.h (command_line_input, print_address_symbolic)
2064 (deprecated_readline_begin_hook): Constify.
2065 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
2067 * event-top.c (handle_line_of_input): Constify and add cast.
2068 * exceptions.c (catch_errors): Constify.
2069 * exceptions.h (catch_errors): Constify.
2070 * expprint.c (print_subexp_standard, op_string, op_name)
2071 (op_name_standard, dump_raw_expression, dump_raw_expression):
2072 * expression.h (op_name, op_string, dump_raw_expression):
2074 * f-exp.y (yyerror): Constify.
2075 (struct token::oper): Constify.
2076 (struct f77_boolean_val::name): Constify.
2077 * f-lang.c (f_word_break_characters): Constify.
2078 * f-lang.h (f_yyerror): Constify.
2079 * fork-child.c (fork_inferior): Add cast.
2080 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
2081 (new_variant): Constify.
2082 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
2083 * gdbarch.c: Regenerate.
2084 * gdbcore.h (set_gnutarget): Constify.
2085 * go-exp.y (yyerror): Constify.
2086 (token::oper): Constify.
2087 * go-lang.h (go_yyerror): Constify.
2088 * go32-nat.c (go32_sysinfo): Constify.
2089 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
2090 * guile/scm-cmd.c (cmdscm_function): Constify.
2091 * guile/scm-param.c (pascm_param_value): Constify.
2092 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
2093 (h8300sx_register_name): Constify.
2094 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
2096 * ia64-tdep.c (ia64_register_names): Constify.
2097 * infcmd.c (construct_inferior_arguments): Constify.
2098 (path_command, attach_post_wait): Constify.
2099 * language.c (show_range_command, show_case_command)
2100 (unk_lang_error): Constify.
2101 * language.h (language_defn::la_error)
2102 (language_defn::la_name_of_this): Constify.
2103 * linespec.c (decode_line_2): Constify.
2104 * linux-thread-db.c (thread_db_err_str): Constify.
2105 * lm32-tdep.c (lm32_register_name): Constify.
2106 * m2-exp.y (yyerror): Constify.
2107 * m2-lang.h (m2_yyerror): Constify.
2108 * m32r-tdep.c (m32r_register_names): Constify and make static.
2109 * m68hc11-tdep.c (m68hc11_register_names): Constify.
2110 * m88k-tdep.c (m88k_register_name): Constify.
2111 * macroexp.c (appendmem): Constify.
2112 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
2113 (upgrade_type, parse_external, parse_partial_symbols)
2114 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
2115 (new_symbol): Constify.
2116 * memattr.c (mem_info_command): Constify.
2117 * mep-tdep.c (register_name_from_keyword): Constify.
2118 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
2120 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
2121 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
2122 * mi/mi-main.c (captured_mi_execute_command): Constify and add
2124 (mi_execute_async_cli_command): Constify.
2125 * mips-tdep.c (mips_register_name): Constify.
2126 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
2127 (am33_register_name, am33_2_register_name)
2128 * moxie-tdep.c (moxie_register_names): Constify.
2129 * nat/linux-osdata.c (osdata_type): Constify fields.
2130 * nto-tdep.c (nto_parse_redirection): Constify.
2131 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
2132 (lookup_child_selector): Constify.
2133 (objc_methcall::name): Constify.
2134 * objc-lang.h (lookup_objc_class, lookup_child_selector)
2135 (lookup_struct_typedef): Constify.
2136 * objfiles.c (pc_in_section): Constify.
2137 * objfiles.h (pc_in_section): Constify.
2138 * p-exp.y (struct token::oper): Constify.
2139 (yyerror): Constify.
2140 * p-lang.h (pascal_yyerror): Constify.
2141 * parser-defs.h (op_name_standard): Constify.
2142 (op_print::string): Constify.
2143 (exp_descriptor::op_name): Constify.
2144 * printcmd.c (print_address_symbolic): Constify.
2145 * psymtab.c (print_partial_symbols): Constify.
2146 * python/py-breakpoint.c (stop_func): Constify.
2147 (bppy_get_expression): Constify.
2148 * python/py-cmd.c (cmdpy_completer::name): Constify.
2149 (cmdpy_function): Constify.
2150 * python/py-event.c (evpy_add_attribute)
2151 (gdbpy_initialize_event_generic): Constify.
2152 * python/py-event.h (evpy_add_attribute)
2153 (gdbpy_initialize_event_generic): Constify.
2154 * python/py-evts.c (add_new_registry): Constify.
2155 * python/py-finishbreakpoint.c (outofscope_func): Constify.
2156 * python/py-framefilter.c (get_py_iter_from_func): Constify.
2157 * python/py-inferior.c (get_buffer): Add cast.
2158 * python/py-param.c (parm_constant::name): Constify.
2159 * python/py-unwind.c (fprint_frame_id): Constify.
2160 * python/python.c (gdbpy_parameter_value): Constify.
2161 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
2162 * remote.c (memory_packet_config::name): Constify.
2163 (show_packet_config_cmd, remote_write_bytes)
2164 (remote_buffer_add_string):
2165 * reverse.c (exec_reverse_once): Constify.
2166 * rs6000-tdep.c (variant::name, variant::description): Constify.
2167 * rust-exp.y (rustyyerror): Constify.
2168 * rust-lang.c (rust_op_name): Constify.
2169 * rust-lang.h (rustyyerror): Constify.
2170 * serial.h (serial_ops::name): Constify.
2171 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
2172 (sh_sh3e_register_name, sh_sh2e_register_name)
2173 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
2174 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
2175 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
2176 (sh_sh4al_dsp_register_name): Constify.
2177 * sh64-tdep.c (sh64_register_name): Constify.
2178 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
2179 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
2180 * stabsread.c (patch_block_stabs, read_type_number)
2181 (ref_map::stabs, ref_add, process_reference)
2182 (symbol_reference_defined, define_symbol, define_symbol)
2183 (error_type, read_type, read_member_functions, read_cpp_abbrev)
2184 (read_one_struct_field, read_struct_fields, read_baseclasses)
2185 (read_tilde_fields, read_struct_type, read_array_type)
2186 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
2187 (read_huge_number, read_range_type, read_args, common_block_start)
2188 (find_name_end): Constify.
2189 * stabsread.h (common_block_start, define_symbol)
2190 (process_one_symbol, symbol_reference_defined, ref_add):
2191 * symfile.c (get_section_index, add_symbol_file_command):
2192 * symfile.h (get_section_index): Constify.
2193 * target-descriptions.c (tdesc_type::name): Constify.
2194 (tdesc_free_type): Add cast.
2195 * target.c (find_default_run_target):
2196 (add_deprecated_target_alias, find_default_run_target)
2197 (target_announce_detach): Constify.
2198 (do_option): Constify.
2199 * target.h (add_deprecated_target_alias): Constify.
2200 * thread.c (print_thread_info_1): Constify.
2201 * top.c (deprecated_readline_begin_hook, command_line_input):
2203 (init_main): Add casts.
2204 * top.h (handle_line_of_input): Constify.
2205 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
2206 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
2207 (tfind_command): Rename to ...
2208 (tfind_command_1): ... this and constify.
2209 (tfind_command): New function.
2210 (tfind_end_command, tfind_start_command): Adjust.
2211 (encode_source_string): Constify.
2212 * tracepoint.h (encode_source_string): Constify.
2213 * tui/tui-data.c (tui_partial_win_by_name): Constify.
2214 * tui/tui-data.h (tui_partial_win_by_name): Constify.
2215 * tui/tui-source.c (tui_set_source_content_nil): Constify.
2216 * tui/tui-source.h (tui_set_source_content_nil): Constify.
2217 * tui/tui-win.c (parse_scrolling_args): Constify.
2218 * tui/tui-windata.c (tui_erase_data_content): Constify.
2219 * tui/tui-windata.h (tui_erase_data_content): Constify.
2220 * tui/tui-winsource.c (tui_erase_source_content): Constify.
2221 * tui/tui.c (tui_enable): Add cast.
2222 * utils.c (defaulted_query): Constify.
2223 (init_page_info): Add cast.
2224 (puts_debug, subset_compare): Constify.
2225 * utils.h (subset_compare): Constify.
2226 * varobj.c (varobj_format_string): Constify.
2227 * varobj.h (varobj_format_string): Constify.
2228 * vax-tdep.c (vax_register_name): Constify.
2229 * windows-nat.c (windows_detach): Constify.
2230 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
2231 * xml-support.c (gdb_xml_end_element): Constify.
2232 * xml-tdesc.c (tdesc_start_reg): Constify.
2233 * xstormy16-tdep.c (xstormy16_register_name): Constify.
2234 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
2235 * xtensa-tdep.h (xtensa_register_t::name): Constify.
2237 2017-04-05 Pedro Alves <palves@redhat.com>
2239 * proc-api.c (struct trans): Constify.
2240 (procfs_note): Constify.
2241 * proc-events.c (struct trans, syscall_table):
2242 * proc-flags.c (struct trans): Constify.
2243 * proc-utils.h (procfs_note): Constify.
2244 * proc-why.c (struct trans): Constify.
2245 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
2246 (procfs_detach): Constify.
2247 * sol-thread.c (struct string_map): Constify.
2248 (td_err_string, td_state_string): Constify.
2250 2017-04-05 Pedro Alves <palves@redhat.com>
2252 * proc-api.c (procfs_filename): Don't initialize
2254 (prepare_to_trace): Assume procfs_filename is non-NULL.
2255 (_initialize_proc_api): Give procfs_filename a default value here.
2257 2017-04-05 Pedro Alves <palves@redhat.com>
2259 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
2260 'cond_string' parameter.
2261 (extract_exception_regexp): Constify 'string' parameter.
2262 (catch_exception_command_1): Constify.
2263 * breakpoint.c (init_catchpoint)
2264 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
2266 (ep_parse_optional_if_clause, catch_fork_command_1)
2267 (catch_exec_command_1): Constify.
2268 * breakpoint.h (init_catchpoint): Constify 'cond_string'
2270 (ep_parse_optional_if_clause): Constify.
2271 * cli/cli-utils.c (remove_trailing_whitespace)
2272 (check_for_argument): Constify.
2273 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
2275 (check_for_argument): Likewise.
2277 2017-04-05 Pedro Alves <palves@redhat.com>
2279 * event-top.c (command_line_handler): Add cast to execute_command
2281 * record-btrace.c (cmd_record_btrace_bts_start)
2282 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
2283 (cmd_record_btrace_start): Add cast to execute_command call.
2284 * record-full.c (record_full_goto_insn):
2285 * record.c (record_start, record_stop): Add cast to
2286 execute_command_to_string calls.
2287 (cmd_record_start): Add cast to execute_command calls.
2289 2017-04-05 Pedro Alves <palves@redhat.com>
2291 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
2292 static inline function.
2293 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
2294 array and use gdb_PyArg_ParseTupleAndKeywords.
2295 * python/py-cmd.c (cmdpy_init): Likewise.
2296 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
2297 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
2298 (infpy_search_memory): Likewise.
2299 * python/py-objfile.c (objfpy_add_separate_debug_file)
2300 (gdbpy_lookup_objfile): Likewise.
2301 * python/py-symbol.c (gdbpy_lookup_symbol)
2302 (gdbpy_lookup_global_symbol): Likewise.
2303 * python/py-type.c (gdbpy_lookup_type): Likewise.
2304 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
2305 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
2308 2017-04-05 Pedro Alves <palves@redhat.com>
2310 * python/python-internal.h (gdb_PyGetSetDef): New type.
2311 * python/py-block.c (block_object_getset)
2312 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
2313 * python/py-event.c (event_object_getset)
2314 (finish_breakpoint_object_getset): Likewise.
2315 * python/py-inferior.c (inferior_object_getset): Likewise.
2316 * python/py-infthread.c (thread_object_getset): Likewise.
2317 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
2318 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
2319 * python/py-objfile.c (objfile_getset): Likewise.
2320 * python/py-progspace.c (pspace_getset): Likewise.
2321 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
2323 * python/py-record.c (recpy_record_getset): Likewise.
2324 * python/py-symbol.c (symbol_object_getset): Likewise.
2325 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
2327 * python/py-type.c (type_object_getset, field_object_getset):
2329 * python/py-value.c (value_object_getset): Likewise.
2331 2017-04-05 Pedro Alves <palves@redhat.com>
2333 * python/python-internal.h (gdb_PyObject_CallMethod)
2334 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
2336 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
2337 (PySys_GetObject, PySys_SetPath): New macros.
2339 2017-04-05 Pedro Alves <palves@redhat.com>
2341 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
2342 info_osdata_command.
2343 * osdata.c (info_osdata_command): Rename to ...
2344 (info_osdata): ... this. Constify 'type' parameter, and remove
2345 the 'from_tty' parameter. Accept NULL TYPE.
2346 (info_osdata_command): New function.
2347 * osdata.h (info_osdata_command): Remove declaration.
2348 (info_osdata): New declaration.
2350 2017-04-05 Pedro Alves <palves@redhat.com>
2352 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
2353 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
2354 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
2356 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
2357 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
2358 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
2360 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
2361 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
2362 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
2363 (mi_cmd_file_list_exec_source_files)
2364 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
2365 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
2366 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
2368 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
2369 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
2370 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
2371 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
2372 (mi_cmd_stack_info_frame): Constify 'command' parameter.
2373 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
2374 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
2375 'command' parameter.
2376 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
2377 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
2378 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
2379 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
2380 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
2381 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
2382 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
2383 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
2384 (mi_cmd_var_set_update_range): Constify 'command' parameter.
2385 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
2386 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
2388 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
2389 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
2390 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
2391 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
2392 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
2393 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
2394 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
2395 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
2396 (mi_cmd_data_list_changed_registers)
2397 (mi_cmd_data_write_register_values)
2398 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
2399 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
2400 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
2401 (mi_cmd_list_features, mi_cmd_list_target_features)
2402 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
2403 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
2404 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
2405 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
2406 (mi_cmd_trace_frame_collected): Constify 'command'
2408 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
2409 'command' parameter.
2411 2017-04-05 Pedro Alves <palves@redhat.com>
2413 * ada-lang.c (ada_completer_word_break_characters): Now a const
2415 (ada_get_gdb_completer_word_break_characters): Constify.
2416 * completer.c (gdb_completer_command_word_break_characters)
2417 (gdb_completer_file_name_break_characters)
2418 (gdb_completer_quote_characters): Now const arrays.
2419 (get_gdb_completer_quote_characters): Constify.
2420 (set_rl_completer_word_break_characters): New function.
2421 (set_gdb_completion_word_break_characters)
2422 (complete_line_internal): Use it.
2423 * completer.h (get_gdb_completer_quote_characters): Constify.
2424 (set_rl_completer_word_break_characters): Declare.
2425 * f-lang.c (f_word_break_characters): Constify.
2426 * language.c (default_word_break_characters): Constify.
2427 * language.h (language_defn::la_word_break_characters): Constify.
2428 (default_word_break_characters): Constify.
2429 * top.c (init_main): Use set_rl_completer_word_break_characters.
2431 2017-04-05 Pedro Alves <palves@redhat.com>
2433 * aix-thread.c (aix_thread_pid_to_str)
2434 (aix_thread_extra_thread_info): Constify.
2435 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
2436 * bsd-uthread.c (bsd_uthread_extra_thread_info)
2437 (bsd_uthread_pid_to_str): Constify.
2438 * corelow.c (core_pid_to_str): Constify.
2439 * darwin-nat.c (darwin_pid_to_str): Constify.
2440 * fbsd-nat.c (fbsd_pid_to_str): Constify.
2441 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
2443 * gnu-nat.c (gnu_pid_to_str): Constify.
2444 * go32-nat.c (go32_pid_to_str): Constify.
2445 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
2446 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
2447 * inferior.c (inferior_pid_to_str): Constify.
2448 * linux-nat.c (linux_nat_pid_to_str): Constify.
2449 * linux-tdep.c (linux_core_pid_to_str): Constify.
2450 * linux-thread-db.c (thread_db_pid_to_str)
2451 (thread_db_extra_thread_info): Constify.
2452 * nto-tdep.c (nto_extra_thread_info): Constify.
2453 * nto-tdep.h (nto_extra_thread_info): Constify.
2454 * obsd-nat.c (obsd_pid_to_str): Constify.
2455 * procfs.c (procfs_pid_to_str): Constify.
2456 * ravenscar-thread.c (ravenscar_extra_thread_info)
2457 (ravenscar_pid_to_str): Constify.
2458 * remote-sim.c (gdbsim_pid_to_str): Constify.
2459 * remote.c (remote_threads_extra_info, remote_pid_to_str):
2461 * sol-thread.c (solaris_pid_to_str): Constify.
2462 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
2463 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
2464 * target.c (default_pid_to_str, target_pid_to_str)
2465 (normal_pid_to_str, default_pid_to_str): Constify.
2466 * target.h (target_ops::to_pid_to_str)
2467 (target_ops::to_extra_thread_info): Constify.
2468 (target_pid_to_str, normal_pid_to_str): Constify.
2469 * windows-nat.c (windows_pid_to_str): Constify.
2470 * gdbarch.sh (core_pid_to_str): Constify.
2471 * target-delegates.c: Regenerate.
2472 * gdbarch.h, gdbarch.c: Regenerate.
2474 2017-04-05 Pedro Alves <palves@redhat.com>
2476 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
2477 the memory of the temporary warning_pre_print override.
2478 * utils.c (warning_pre_print): Constify.
2479 * utils.h (warning_pre_print): Constify.
2481 2017-04-05 Pedro Alves <palves@redhat.com>
2483 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
2484 (shell_command): New function.
2485 (make_command): Use std::string.
2486 (init_cli_cmds): Register shell_command instead of shell_escape.
2488 2017-04-05 Pedro Alves <palves@redhat.com>
2490 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
2491 * tracepoint.c (default_collect): Don't initialize.
2493 2017-04-05 Pedro Alves <palves@redhat.com>
2495 * macroexp.c (macro_buffer::shared): Now a bool.
2496 (init_buffer): Update.
2497 (init_shared_buffer): Constify 'addr' parameter.
2498 (substitute_args, expand, macro_expand, macro_expand_next): Remove
2501 2017-04-05 Pedro Alves <palves@redhat.com>
2503 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
2504 * disasm.c (set_disassembler_options): Constify local.
2505 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
2507 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
2510 * tracefile.c (tsave_command): Fix argument parsing for '-r'
2513 2017-04-05 Yao Qi <yao.qi@linaro.org>
2515 * frame.c (frame_unwind_register_unsigned): Call
2516 frame_unwind_register_value.
2518 2017-04-05 Yao Qi <yao.qi@linaro.org>
2520 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
2521 Use gdb_test_multiple, and don't match anchor.
2523 2017-04-05 Pedro Alves <palves@redhat.com>
2525 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
2526 (Write After Approval): Remove Simon Marchi.
2528 2017-04-05 Pedro Alves <palves@redhat.com>
2530 * common/gdb_optional.h (optional::optional): Make constexpr and
2533 2017-04-04 John Baldwin <jhb@FreeBSD.org>
2535 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
2536 (amd64fbsd_jmp_buf_reg_offset): Remove.
2537 (amd64fbsd_supply_uthread): Remove function.
2538 (amd64fbsd_collect_uthread): Remove function.
2539 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
2540 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
2541 (x86_64-*-freebsd*): Remove bsd-uthread.o.
2542 (fbsd-nat.c): Update comment.
2543 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
2544 (i386fbsd_jmp_buf_reg_offset): Remove.
2545 (i386fbsd_supply_uthread): Remove function.
2546 (i386fbsd_collect_uthread): Remove function.
2547 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
2549 2017-04-04 John Baldwin <jhb@FreeBSD.org>
2551 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
2552 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
2553 * NEWS: Mention that support for FreeBSD/alpha was removed.
2554 * alpha-fbsd-tdep.c: Delete file.
2555 * config/alpha/fbsd.mh: Delete file.
2556 * configure.host: Delete alpha*-*-freebsd* and
2557 alpha*-*-kfreebsd*-gnu.
2558 * configure.tgt: Delete alpha*-*-freebsd* and
2559 alpha*-*-kfreebsd*-gnu.
2561 2017-04-04 John Baldwin <jhb@FreeBSD.org>
2563 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
2564 amd64bsd_store_inferior_registers): Use ptid from regcache.
2566 2017-04-04 Pedro Alves <palves@redhat.com>
2568 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
2569 data fields, make them private and add "m_" prefixes.
2570 (lnp_state_machine::lnp_state_machine): New ctor.
2571 (record_line, check_line_address, handle_set_discriminator)
2572 (handle_set_address, handle_advance_pc, handle_special_opcode)
2573 (handle_advance_line, handle_set_file, handle_negate_stmt)
2574 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
2575 (end_sequence, advance_line): New methods.
2576 (m_gdbarch, m_record_lines_p): New fields.
2577 (lnp_reader_state): Delete.
2578 (dwarf_record_line): Rename to ...
2579 (lnp_state_machine::record_line): ... adjust.
2580 (init_lnp_state_machine): Delete.
2581 (lnp_state_machine::lnp_state_machine): New.
2582 (check_line_address): Rename to ...
2583 (lnp_state_machine::check_line_address): This.
2584 (dwarf_decode_lines_1): Remove reference to "reader_state".
2585 Adjust lnp_state_machine having a non-default ctor. Use bool.
2586 State machine internal state manipulation moved to
2587 lnp_state_machine methods.
2589 2017-04-04 Pedro Alves <palves@redhat.com>
2591 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2592 unittests/offset-type-selftests.c.
2593 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
2594 * common/offset-type.h: New file.
2595 * common/preprocessor.h: New file.
2596 * common/traits.h: New file.
2597 * common/valid-expr.h: New file.
2598 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
2599 sect_offset and cu_offset strong typedefs throughout.
2600 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
2601 typedefs throughout.
2602 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
2603 sect_offset and cu_offset strong typedefs throughout.
2604 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
2605 typedefs throughout.
2606 * gdbtypes.h: Include "common/offset-type.h".
2607 (cu_offset): Now an offset type (strong typedef) instead of a
2609 (sect_offset): Likewise.
2610 (union call_site_parameter_u): Rename "param_offset" field to
2612 * unittests/offset-type-selftests.c: New file.
2614 2017-04-04 Pedro Alves <palves@redhat.com>
2616 * common/underlying.h: New file.
2617 * dwarf2read.c: Include "common/gdb_optional.h" and
2618 "common/underlying.h".
2619 (dir_index, file_name_index): New types.
2620 (file_entry): Use them.
2621 (file_entry::include): Use to_underlying.
2622 (line_header::add_file_name): Use dir_index.
2623 (read_formatted_entries): Use gdb::optional. Read form before
2624 writting to file_entry.
2625 (dwarf_decode_line_header): Use dir_index.
2626 (lnp_state_machine::current_file): Use to_underlying.
2627 (lnp_state_machine::file): Change type to file_name_index.
2628 (dwarf_record_line): Use to_underlying.
2629 (init_lnp_state_machine): Use file_name_index.
2630 (dwarf_decode_lines_1): Use dir_index and file_name_index.
2632 2017-04-04 Pedro Alves <palves@redhat.com>
2634 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
2635 operator bool, has_value and get methods.
2637 2017-04-04 Pedro Alves <palves@redhat.com>
2639 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
2641 (line_header): Initialize all data fields. Change type of
2642 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
2643 Change type of include_dirs to std::vector<const char *>. Remove
2644 num_include_dirs, include_dirs_size. Change type of file_names to
2645 std::vector<file_entry>. Remove num_file_names, file_names_size.
2646 (line_header::line_header): New.
2647 (line_header::add_include_dir, line_header::add_file_name): New
2649 (line_header::include_dir_at): Remove NULL check.
2650 (line_header::file_name_at): Add const overload.
2651 (line_header_up): New unique_ptr typedef.
2652 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
2653 std::vector. Remove free_line_header call.
2654 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
2655 free_line_header call.
2656 (free_cu_line_header): Delete.
2657 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
2658 (setup_type_unit_groups): Use line_header_up instead of cleanups.
2659 Adjust to use std::vector.
2660 (free_line_header): Delete.
2661 (free_line_header_voidp): Use delete.
2662 (add_include_dir): Replace with ...
2663 (line_header::add_include_dir): ... this method. Use std::vector.
2664 (add_file_name): Replace with ...
2665 (line_header::add_file_name): ... this method. Use std::vector.
2666 (add_include_dir_stub): Delete.
2667 (read_formatted_entries): Remove memset.
2668 (dwarf_decode_line_header): Return a line_header_up instead of a
2669 raw pointer. Remove cleanup handling. Pass lambdas to
2670 read_formatted_entries. Adjust to use line_header methods.
2671 (dwarf_decode_lines_1): Adjust to use line_header methods.
2672 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
2675 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
2677 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
2678 instead of struct ptid.
2680 2017-05-04 Alan Hayward <alan.hayward@arm.com>
2682 * frame.c (get_frame_register_bytes): Unwind using value.
2683 (put_frame_register_bytes): Likewise.
2685 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
2687 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
2690 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
2692 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
2694 2017-03-29 Yao Qi <yao.qi@linaro.org>
2696 * gdbthread.h (struct thread_info): Declare constructor and
2697 destructor. Add some in-class member initializers.
2698 * thread.c (free_thread): Remove.
2699 (init_thread_list): Call delete instead of free_thread.
2700 (new_thread): Call thread_info constructor.
2701 (thread_info::thread_info): New function.
2702 (thread_info::~thread_info): New function.
2703 (delete_thread_1): Call delete instead of free_thread.
2704 (make_cleanup_restore_current_thread): Move tp and frame to
2707 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
2709 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
2710 (arc_skip_prologue): Likewise.
2711 (arc_make_frame_cache): Likewise.
2712 (arc_pv_get_operand): New function.
2713 (arc_is_in_prologue): Likewise.
2714 (arc_analyze_prologue): Likewise.
2715 (arc_print_frame_cache): Likewise.
2716 (MAX_PROLOGUE_LENGTH): New constant.
2718 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
2720 * configure.tgt: Add arc-insn.o.
2721 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
2722 (dump_arc_instruction_command): New function.
2723 (arc_fprintf_disasm): Likewise.
2724 (arc_disassemble_info): Likewise.
2725 (arc_insn_get_operand_value): Likewise.
2726 (arc_insn_get_operand_value_signed): Likewise.
2727 (arc_insn_get_memory_base_reg): Likewise.
2728 (arc_insn_get_memory_offset): Likewise.
2729 (arc_insn_get_branch_target): Likewise.
2730 (arc_insn_dump): Likewise.
2731 (arc_insn_get_linear_next_pc): Likewise.
2732 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
2733 (arc_disassemble_info): Likewise.
2734 (arc_insn_get_branch_target): Likewise.
2735 (arc_insn_get_linear_next_pc): Likewise.
2736 * NEWS: Mention new "maint print arc arc-instruction".
2738 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
2740 * arc-tdep (maintenance_print_arc_list): New variable.
2741 (maintenance_print_arc_command): New function.
2743 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
2745 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
2746 Add "limm" and "reserved".
2747 (arc_cannot_fetch_register, arc_cannot_store_register): Add
2748 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
2749 * arc-tdep.h (arc_regnum): Likewise.
2751 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2753 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
2754 for THREADPTR register.
2755 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
2757 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
2758 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
2759 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
2761 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2763 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
2764 registers above gdbarch_num_regs (gdbarch) as privileged in
2767 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2769 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
2770 for a single specified register or for all registers in
2771 a0_base..a0_base + C0_NREGS range.
2772 (supply_gregset_reg): Call regcache_raw_supply for a single
2773 specified register or for all registers in a0_base..a0_base +
2776 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2778 * arch/xtensa.h (C0_NREGS): Add definition.
2779 * xtensa-tdep.c (C0_NREGS): Remove definition.
2781 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2783 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
2784 Drop xtensa_default_isa initialization.
2785 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
2787 2017-03-27 Pedro Alves <palves@redhat.com>
2789 * dwarf2read.c (file_entry) <dir_index>: Add comment.
2790 (file_entry::include_dir): New method.
2791 (line_header::include_dir_at, line_header::file_name_at): New
2793 (setup_type_unit_groups, setup_type_unit_groups)
2794 (psymtab_include_file_name): Simplify using the new methods.
2795 (lnp_state_machine) <the_line_header>: New field.
2796 <file>: Add comment.
2797 (lnp_state_machine::current_file): New method.
2798 (dwarf_record_line): Simplify using the new methods.
2799 (init_lnp_state_machine): Initialize the "the_line_header" field.
2800 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
2801 Simplify using the new methods.
2803 2017-03-27 Pedro Alves <palves@redhat.com>
2805 * cp-name-parser.y (make_empty): Delete.
2806 (demangler_special, nested_name, ptr_operator, array_indicator)
2807 (direct_declarator, declarator_1): Use fill_comp instead of
2810 2017-03-27 Pedro Alves <palves@redhat.com>
2812 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
2813 to ATTRIBUTE_PRINTF.
2814 * solib-target.c (library_list_start_list): Print "string" not
2816 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
2819 2017-03-27 Pedro Alves <palves@redhat.com>
2821 * dwarf2read.c (struct file_and_directory): New.
2822 (dwarf2_get_dwz_file): Adjust to use std::string.
2823 (dw2_get_file_names_reader): Adjust to use file_and_directory.
2824 (find_file_and_directory): Adjust to return a file_and_directory
2826 (read_file_scope): Adjust to use file_and_directory. Remove
2827 make_cleanup/do_cleanups calls.
2828 (open_and_init_dwp_file): Adjust to use std::string. Remove
2829 make_cleanup/do_cleanups calls.
2830 * python/python.c (do_start_initialization): Adjust to ldirname
2831 returning a std::string.
2832 * utils.c (ldirname): Now returns a std::string.
2833 * utils.h (ldirname): Change return type to std::string.
2834 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
2835 returning a std::string.
2836 * xml-tdesc.c (file_read_description_xml): Likewise.
2838 2017-03-24 Alan Hayward <alan.hayward@arm.com>
2840 * regcache.c (regcache_debug_print_register): New function.
2841 * regcache.h (regcache_debug_print_register): New declaration.
2842 * target.c (debug_print_register): Remove.
2843 (target_fetch_registers): Call regcache_debug_print_register.
2844 (target_store_registers): Likewise.
2846 2017-03-24 Pádraig Brady <pbrady@fb.com>
2848 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
2849 reference beyond the 'lh->include_dirs' array before accessing to
2851 (psymtab_include_file_name): Likewise.
2852 (dwarf_decode_lines_1): Likewise.
2853 (dwarf_decode_lines): Likewise.
2854 (file_file_name): Likewise.
2856 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
2858 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
2860 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
2861 ps_lsetfpregs): Likewise.
2862 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
2863 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
2864 ps_lsetfpregs): Likewise.
2865 * target.c (target_fetch_registers, target_store_registers):
2868 2017-03-23 Alan Hayward <alan.hayward@arm.com>
2870 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
2872 2017-03-23 Yao Qi <yao.qi@linaro.org>
2874 * aarch64-tdep.c (aarch64_process_record_test): Declare.
2875 (_initialize_aarch64_tdep): Register it.
2876 (aarch64_record_load_store): Handle PRFM instruction.
2877 (aarch64_process_record_test): New function.
2879 2017-03-23 Yao Qi <yao.qi@linaro.org>
2881 * aarch64-tdep.c (aarch64_record_load_store): Fix code
2884 2017-03-23 Yao Qi <yao.qi@linaro.org>
2886 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
2888 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2890 python/python.c (do_start_initialization): Fix memory leak.
2892 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
2894 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
2895 using get_ptrace_pid.
2896 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
2898 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
2899 inferior_ptid instead of pid.
2901 2017-03-22 Yao Qi <yao.qi@linaro.org>
2903 * aarch64-tdep.c: Wrap locally used classes in anonymous
2905 * arm-tdep.c: Likewise.
2906 * linespec.c: Likewise.
2907 * ui-out.c: Likewise.
2909 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
2912 * python/lib/gdb/printer/bound_registers.py: Import sys.
2914 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
2916 * windows-nat.c (do_windows_fetch_inferior_registers): Add
2917 windows_thread_info parameter and use it instead of
2919 (windows_fetch_inferior_registers): Don't set current_thread,
2920 pass the thread to do_windows_fetch_inferior_registers. Use
2921 ptid from regcache instead of inferior_ptid.
2922 (do_windows_store_inferior_registers): Add windows_thread_info
2923 parameter and use it instead of current_thread.
2924 (windows_store_inferior_registers): Don't set current_thread,
2925 pass the thread to do_windows_store_inferior_registers. Use
2926 ptid from regcache instead of inferior_ptid.
2928 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
2930 * ser-mingw.c (ser_windows_raw): Remove reference to
2931 struct serial::current_timeout.
2933 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
2936 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
2937 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
2938 (sparc64_fsr_type): Fix %fsr decoding.
2940 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
2942 * python/py-record-btrace.c (btpy_insn_data): Change return type
2945 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
2947 * spu-linux-nat.c (spu_fetch_inferior_registers,
2948 spu_store_inferior_registers): Use ptid from regcache, set and
2949 restore inferior_ptid.
2950 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
2953 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
2955 * i386-linux-nat.c (fetch_register, store_register,
2956 i386_linux_fetch_inferior_registers,
2957 i386_linux_store_inferior_registers): Use ptid from regcache.
2958 * ia64-linux-nat.c (ia64_linux_fetch_register,
2959 ia64_linux_store_register): Likewise.
2960 * inf-ptrace.c (inf_ptrace_fetch_register,
2961 inf_ptrace_store_register): Likewise.
2962 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
2963 m32r_linux_store_inferior_registers): Likewise.
2964 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
2965 m68kbsd_store_inferior_registers): Likewise.
2966 * m68k-linux-nat.c (fetch_register, store_register,
2967 m68k_linux_fetch_inferior_registers,
2968 m68k_linux_store_inferior_registers): Likewise.
2969 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
2970 m88kbsd_store_inferior_registers): Likewise.
2971 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
2972 mips_fbsd_store_inferior_registers): Likewise.
2973 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
2974 mips64_linux_regsets_store_registers): Likewise.
2975 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
2976 mipsnbsd_store_inferior_registers): Likewise.
2977 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
2978 mips64obsd_store_inferior_registers): Likewise.
2979 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
2981 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
2982 ppcfbsd_store_inferior_registers): Likewise.
2983 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
2984 ppc_linux_store_inferior_registers): Likewise.
2985 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
2986 ppcnbsd_store_inferior_registers): Likewise.
2987 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
2988 ppcobsd_store_registers): Likewise.
2989 * procfs.c (procfs_fetch_registers, procfs_store_registers):
2991 * ravenscar-thread.c (ravenscar_fetch_registers,
2992 ravenscar_store_registers, ravenscar_prepare_to_store):
2994 * record-btrace.c (record_btrace_fetch_registers,
2995 record_btrace_store_registers, record_btrace_prepare_to_store):
2997 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
2998 Lookup inferior using ptid from regcache, instead of
3000 * remote.c (remote_fetch_registers, remote_store_registers): Use
3002 * rs6000-nat.c (fetch_register, store_register): Likewise.
3003 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
3004 s390_linux_store_inferior_registers): Likewise.
3005 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
3006 shnbsd_store_inferior_registers): Likewise.
3007 * sol-thread.c (sol_thread_fetch_registers,
3008 sol_thread_store_registers): Likewise.
3009 * sparc-nat.c (sparc_fetch_inferior_registers,
3010 sparc_store_inferior_registers): Likewise.
3011 * tilegx-linux-nat.c (fetch_inferior_registers,
3012 store_inferior_registers): Likewise.
3013 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
3014 vaxbsd_store_inferior_registers): Likewise.
3015 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
3016 store_xtregs): Likewise.
3018 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3021 * NEWS: Mention support for rvalue references in GDB and python.
3022 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
3023 supports both lvalue and rvalue references.
3025 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3028 * gdbtypes.c (rank_one_type): Implement overloading
3029 resolution rules regarding rvalue references.
3031 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3034 * aarch64-tdep.c (aarch64_type_align)
3035 (aarch64_extract_return_value, aarch64_store_return_value): Change
3036 lvalue reference type checks to general reference type checks.
3037 * amd64-tdep.c (amd64_classify): Likewise.
3038 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
3040 * arm-tdep.c (arm_type_align, arm_extract_return_value)
3041 (arm_store_return_value): Likewise.
3042 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
3043 * c-typeprint.c (c_print_type): Likewise.
3044 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
3045 (cplus_number_of_children, cplus_describe_child): Likewise.
3046 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3047 * completer.c (expression_completer): Likewise.
3048 * cp-support.c (make_symbol_overload_list_adl_namespace):
3050 * darwin-nat-info.c (info_mach_region_command): Likewise.
3051 * dwarf2loc.c (entry_data_value_coerce_ref)
3052 (value_of_dwarf_reg_entry): Likewise.
3053 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
3054 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
3056 * findvar.c (extract_typed_address, store_typed_address):
3058 * gdbtypes.c (rank_one_type): Likewise.
3059 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
3060 * infcall.c (value_arg_coerce): Likewise.
3061 * language.c (pointer_type): Likewise.
3062 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
3064 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
3065 * mn10300-tdep.c (mn10300_type_align): Likewise.
3066 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
3067 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
3068 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
3070 * printcmd.c (print_formatted, x_command): Likewise.
3071 * python/py-type.c (typy_get_composite, typy_template_argument):
3073 * python/py-value.c (valpy_referenced_value)
3074 (valpy_get_dynamic_type, value_has_field): Likewise.
3075 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
3076 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
3077 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
3078 * spu-tdep.c (spu_scalar_value_p): Likewise.
3079 * symtab.c (lookup_symbol_aux): Likewise.
3080 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
3081 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
3083 * valops.c (value_cast_pointers, value_cast)
3084 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
3085 (value_struct_elt, value_struct_elt_bitpos)
3086 (value_find_oload_method_list, find_overload_match)
3087 (value_rtti_indirect_type): Likewise.
3088 * valprint.c (val_print_scalar_type_p, generic_val_print):
3090 * value.c (value_actual_type, value_as_address, unpack_long)
3091 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
3092 (coerce_ref): Likewise.
3093 * varobj.c (varobj_get_value_type): Likewise.
3095 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3098 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
3100 * python/lib/gdb/command/explore.py: Support exploring values
3101 of rvalue reference types.
3102 * python/lib/gdb/types.py: Implement get_basic_type() for
3103 rvalue reference types.
3104 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
3106 * python/py-value.c (valpy_getitem): Add an rvalue reference
3108 (valpy_reference_value): Add new parameter "refcode".
3109 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
3110 New wrappers for valpy_reference_value().
3111 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
3112 (gdbpy_invoke_xmethod): Likewise.
3114 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3117 * dwarf2read.c (process_die, read_type_die_1): Handle the
3118 DW_TAG_rvalue_reference_type DIE.
3119 (read_tag_reference_type): Add new parameter "refcode".
3121 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3124 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
3125 (c_type_print_modifier, c_type_print_varspec_suffix)
3126 (c_type_print_base): Support printing rvalue reference types.
3127 * c-valprint.c (c_val_print, c_value_print): Support printing
3128 rvalue reference values.
3130 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3133 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
3135 * cp-support.c (replace_typedefs): Handle
3136 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
3137 * python/py-type.c (typy_lookup_type): Likewise.
3139 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3142 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
3143 * parse.c (insert_type): Change assert statement.
3144 (follow_types): Handle rvalue reference types.
3145 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
3148 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3151 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
3152 value_ref() interface.
3153 * c-valprint.c (c_value_print): Likewise.
3154 * infcall.c (value_arg_coerce): Likewise.
3155 * python/py-value.c (valpy_reference_value): Likewise.
3156 * valops.c (value_cast, value_reinterpret_cast)
3157 (value_dynamic_cast, typecmp): Likewise.
3158 (value_ref): Parameterize by kind of return value reference type.
3159 * value.h (value_ref): Add new parameter "refcode".
3161 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3164 * dwarf2read.c (read_tag_reference_type): Use
3165 lookup_lvalue_reference_type() instead of lookup_reference_type().
3166 * eval.c (evaluate_subexp_standard): Likewise.
3167 * f-exp.y: Likewise.
3168 * gdbtypes.c (make_reference_type, lookup_reference_type):
3169 Generalize with rvalue reference types.
3170 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
3171 convenience wrappers for lookup_reference_type().
3172 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
3173 reference kind parameter.
3174 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
3175 wrappers for lookup_reference_type().
3176 * guile/scm-type.c (gdbscm_type_reference): Use
3177 lookup_lvalue_reference_type() instead of lookup_reference_type().
3178 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
3179 * parse.c (follow_types): Likewise.
3180 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
3181 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
3183 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
3184 (gdbpy_invoke_xmethod): Likewise.
3185 * stabsread.c: Provide extra argument to make_reference_type()
3187 * valops.c (value_ref, value_rtti_indirect_type): Use
3188 lookup_lvalue_reference_type() instead of lookup_reference_type().
3190 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3193 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
3194 (TYPE_IS_REFERENCE): New macro.
3195 (struct type): Add rvalue_reference_type field.
3196 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
3198 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
3200 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
3201 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
3202 New function definition.
3203 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
3204 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
3205 New function declaration.
3206 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
3207 * mi/mi-interp.h: New file.
3208 * solib.c (info_sharedlibrary_command): Replace for loop with
3210 * solib.h (update_solib_list): New function declaration.
3211 (so_list_head): Move macro.
3212 * solist.h (ALL_SO_LIBS): New macro.
3214 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
3216 * infcmd.c (post_create_inferior): Remove unused argument in
3218 * remote.c (remote_start_remote): Likewise.
3219 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
3220 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
3221 (enable_break): Likewise.
3222 * solib.c (update_solib_list): Remove unused target argument
3223 and its documentation.
3224 (solib_add): Remove unused target argument. Remove unused
3225 argument in call to update_solib_list.
3226 (info_sharedlibrary_command): Remove unused argument in call
3227 to update_solib_list.
3228 (sharedlibrary_command): Remove unused argument in call to
3230 (handle_solib_event): Likewise.
3231 (reload_shared_libraries): Likewise.
3232 * solib.h (solib_add): Remove unused target argument.
3234 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
3236 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
3237 (s390_displaced_step_fixup): Cover relative branches with the
3238 default fixup handling. This fixes lack of support for some
3239 relative branch instructions.
3241 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3243 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
3246 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3248 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
3249 i386_darwin_store_inferior_registers): Use ptid from regcache.
3251 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3253 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
3254 i386bsd_store_inferior_registers): Use ptid from regcache.
3256 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3258 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
3259 hppaobsd_store_registers): Use ptid from regcache.
3261 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3263 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
3264 hppanbsd_store_registers): Use ptid from regcache.
3266 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3268 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
3269 from regcache. Use get_ptrace_pid.
3271 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3273 * corelow.c (get_core_register_section): Use ptid from regcache,
3276 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3278 * bsd-uthread.c (bsd_uthread_fetch_registers,
3279 bsd_uthread_store_registers): Use ptid from regcache, set and
3280 restore inferior_ptid.
3282 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3284 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
3285 fetch_fp_regs, store_register, store_regs, store_fp_register,
3286 store_fp_regs): Use ptid from regcache.
3288 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3290 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
3291 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
3292 store_vfp_regs): Use ptid from regcache.
3294 2017-03-17 Pedro Alves <palves@redhat.com>
3297 * ser-base.c (ser_base_wait_for): Add comment.
3298 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
3300 * ser-unix.c (hardwire_raw): Remove reference to
3301 scb->current_timeout.
3302 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
3303 (hardwire_ops): Install ser_base_readchar instead of
3305 * serial.h (struct serial) <current_timeout, timeout_remaining>:
3308 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
3311 * python/lib/gdb/printer/bound_registers.py: Add support for
3314 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3316 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
3317 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
3318 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
3319 byte_offset to subobj_byte_offset. Fix the handling of
3320 DWARF_VALUE_STACK on big-endian targets when coming via an
3322 (dwarf2_evaluate_loc_desc): Adjust call to
3323 dwarf2_evaluate_loc_desc_full.
3324 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
3325 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
3327 2017-03-16 Yao Qi <yao.qi@linaro.org>
3329 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
3330 and REVSH instructions.
3332 2017-03-16 Yao Qi <yao.qi@linaro.org>
3334 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
3335 (arm_record_test): Declare.
3336 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
3337 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
3338 align with the manual.
3339 (thumb_record_misc): Adjust the code order to align with the
3341 (thumb2_record_decode_insn_handler): Fix instruction matching.
3342 (instruction_reader_thumb): New class.
3343 (arm_record_test): New function.
3345 2017-03-16 Yao Qi <yao.qi@linaro.org>
3347 * arm-tdep.c (abstract_memory_reader): New class.
3348 (instruction_reader): New class.
3349 (extract_arm_insn): Add argument 'reader'. Callers updated.
3350 (decode_insn): Likewise.
3352 2017-03-16 Doug Evans <dje@google.com>
3354 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
3355 member. Change type of TYPE member to SCM. All uses updated.
3356 (lsscm_make_lazy_string_smob): Add assert.
3357 (lsscm_make_lazy_string): Flag bad length values.
3358 (lsscm_elt_type): New function.
3359 (gdbscm_lazy_string_to_value): Rewrite to use
3360 lsscm_safe_lazy_string_to_value.
3361 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
3362 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
3363 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
3365 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
3366 * guile/scm-type.c (tyscm_scm_to_type): New function.
3368 2017-03-15 Doug Evans <dje@google.com>
3370 PR python/17728, python/18439, python/18779
3371 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
3372 member. Change type of TYPE member to PyObject *. All uses updated.
3373 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
3374 (gdbpy_create_lazy_string_object): Flag bad length values.
3375 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
3376 Handle typedefs in incoming type.
3377 (stpy_lazy_string_elt_type): New function.
3378 (gdbpy_extract_lazy_string): Call it.
3379 * python/py-value.c (valpy_lazy_string): Flag bad length values.
3380 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
3381 typedefs in incoming type.
3383 2017-03-16 Doug Evans <dje@google.com>
3385 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
3386 * guile/scm-type.c (tyscm_scm_to_type): New function.
3388 2017-03-16 Jiong Wang <jiong.wang@arm.com>
3390 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
3391 "ULONGEST" for "skip".
3393 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
3396 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
3397 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
3398 (inf_ptrace_peek_poke): ...here. New function. Now also loop
3399 over ptrace peek/poke until end of buffer or error.
3401 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
3403 * parse.c (length_of_subexp): Make static.
3404 * parser-defs.h (length_of_subexp): Remove.
3406 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
3408 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
3411 2017-03-14 Pedro Alves <palves@redhat.com>
3413 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
3414 (main): Use std::unique_ptr. Remove calls to
3415 cp_demangled_name_parse_free.
3417 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3419 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
3420 alphabsd_store_inferior_registers): Use regcache->ptid instead
3423 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3425 * aix-thread.c (aix_thread_fetch_registers,
3426 aix_thread_store_registers): Use regcache->ptid instead of
3429 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3431 * aarch64-linux-nat.c (fetch_gregs_from_thread,
3432 store_gregs_to_thread, fetch_fpregs_from_thread,
3433 store_fpregs_to_thread): Use regcache->ptid instead of
3436 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3438 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
3439 amd64_linux_fetch_inferior_registers): Use regcache->ptid
3440 instead of inferior_ptid.
3442 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3444 * target.c (target_fetch_registers, target_store_registers): Add
3447 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3449 * regcache.h (regcache_get_ptid): New function.
3450 * regcache.c (regcache_get_ptid): New function.
3452 2017-03-13 Mark Wielaard <mark@klomp.org>
3454 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
3456 2017-03-10 Keith Seitz <keiths@redhat.com>
3459 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
3461 2017-03-08 Pedro Alves <palves@redhat.com>
3464 * infrun.c (start_step_over, do_target_resume, resume)
3465 (restart_threads): Assert we're not resuming a thread that is
3466 meant to be stopped.
3467 (infrun_thread_stop_requested_callback): Delete.
3468 (infrun_thread_stop_requested): If the thread is internally
3469 stopped, queue a pending stop event and clear the thread's
3471 (handle_stop_requested): New function.
3472 (handle_syscall_event, handle_inferior_event_1): Use
3473 handle_stop_requested.
3474 (handle_stop_requested): New function.
3475 (handle_signal_stop): Set the thread's stop_signal here instead of
3477 (finish_step_over): Clear step over info unconditionally.
3478 (handle_signal_stop): If the user had interrupted the event
3479 thread, consider the stop a random signal.
3480 (handle_signal_stop) <signal arrived while stepping over
3481 breakpoint>: Don't restart threads here.
3482 (stop_waiting): Don't clear step-over info here.
3484 2017-03-08 Pedro Alves <palves@redhat.com>
3487 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
3488 goes to argument 2, not 1.
3490 2017-03-08 Pedro Alves <palves@redhat.com>
3493 * top.c (gdb_readline_wrapper): Avoid passing NULL to
3495 (command_line_input): Add comment.
3497 2017-03-08 Pedro Alves <palves@redhat.com>
3500 * tui/tui-file.c (tui_file::write): New.
3501 * tui/tui-file.h (tui_file): Override "write".
3502 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
3503 factored out from ...
3504 (tui_puts): ... here.
3505 (tui_putc): Use them.
3506 (tui_write): New function.
3507 * tui/tui-io.h (tui_write): Declare.
3509 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3511 * Makefile.in (SFILES): Replace "environ.c" with
3513 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
3514 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
3516 * common/environ.c: ... here.
3517 * environ.h: Moved to...
3518 * common/environ.h: ... here.
3520 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
3522 * gdbarch.sh (pstring_ptr): New static function.
3523 (gdbarch_disassembler_options): Use it.
3524 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
3525 not valid_disassembler_option->name.
3526 * gdbarch.c: Regenerate.
3528 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
3530 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
3532 2017-03-07 Pedro Alves <palves@redhat.com>
3534 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
3536 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
3538 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
3539 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
3540 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
3541 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
3543 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
3545 * xtensa-linux-nat.c (fetch_gregs): Remove const.
3547 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
3549 * remote.c (remote_add_target_side_commands): Use range-based
3552 2017-03-03 Yao Qi <yao.qi@linaro.org>
3555 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
3557 * valprint.c (common_val_print): Likewise.
3559 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
3561 * NEWS: Mention new set/show disassembler-options commands.
3562 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
3563 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
3564 (prospective_options): New static variable.
3565 (gdb_disassembler::gdb_disassembler): Initialize
3566 m_di.disassembler_options.
3567 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
3568 (get_disassembler_options): New function.
3569 (set_disassembler_options): Likewise.
3570 (set_disassembler_options_sfunc): Likewise.
3571 (show_disassembler_options_sfunc): Likewise.
3572 (disassembler_options_completer): Likewise.
3573 (_initialize_disasm): Likewise.
3574 * disasm.h (get_disassembler_options): New prototype.
3575 (set_disassembler_options): Likewise.
3576 * gdbarch.sh (gdbarch_disassembler_options): New variable.
3577 (gdbarch_verify_disassembler_options): Likewise.
3578 * gdbarch.c: Regenerate.
3579 * gdbarch.h: Likewise.
3580 * arm-tdep.c (num_disassembly_options): Delete.
3581 (set_disassembly_style): Likewise.
3582 (arm_disassembler_options): New static variable.
3583 (set_disassembly_style_sfunc): Convert short style name into long
3584 option name. Call set_disassembler_options.
3585 (show_disassembly_style_sfunc): New function.
3586 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
3587 set_gdbarch_verify_disassembler_options.
3588 (_initialize_arm_tdep): Delete regnames variable and update callers.
3589 (arm_disassembler_options): Initialize.
3590 (disasm_options): New variable.
3591 (num_disassembly_options): Rename from this...
3592 (num_disassembly_styles): ...to this. Compute by scanning through
3594 (valid_disassembly_styles): Initialize using disasm_options.
3595 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
3596 set_arm_regname_option.
3597 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
3598 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
3599 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
3600 set_gdbarch_verify_disassembler_options.
3601 * s390-tdep.c (s390_disassembler_options): New static variable.
3602 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
3603 set_gdbarch_verify_disassembler_options.
3605 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
3607 * remote.c (remote_add_target_side_condition): Remove "struct"
3608 keyword from range-based for loop.
3610 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
3612 * remote.c (remote_add_target_side_condition): Use range-based
3613 for loop. Update comment.
3615 2017-02-27 Yao Qi <yao.qi@linaro.org>
3617 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
3619 2017-02-26 Alan Hayward <alan.hayward@arm.com>
3621 * regcache.c (regcache_raw_update): New function.
3622 (regcache_raw_read): Move code to regcache_raw_update.
3623 * regcache.h (regcache_raw_update): New declaration.
3624 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
3626 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
3628 * dwarf2read.c (create_debug_type_hash_table): Initialize
3629 header.signature and header.type_offset_in_tu.
3631 2017-02-24 Pedro Alves <palves@redhat.com>
3633 * symtab.c (make_file_symbol_completion_list_1): Use
3634 add_symtab_completions.
3636 2017-02-24 Alan Hayward <alan.hayward@arm.com>
3638 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
3640 2017-02-24 Alan Hayward <alan.hayward@arm.com>
3642 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
3643 I386_MAX_REGISTER_SIZE.
3644 (i386_pseudo_register_write): Likewise.
3645 (i386_process_record): Likewise.
3646 * i387-tdep.c (i387_supply_xsave): Likewise.
3647 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
3648 (store_register): Likewise.
3650 2017-02-23 Pedro Alves <palves@redhat.com>
3652 * ada-lang.c: Include "common/function-view.h".
3653 (ada_iterate_over_symbols): Adjust to use function_view as
3655 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
3656 (ada_make_symbol_completion_list): Use a lambda.
3657 (ada_exc_search_name_matches): Delete.
3658 (name_matches_regex): New.
3659 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
3660 * compile/compile-c-support.c: Include "common/function-view.h".
3661 (print_one_macro): Change prototype to accept a ui_file pointer.
3662 (write_macro_definitions): Use a lambda.
3663 * dwarf2read.c: Include "common/function-view.h".
3664 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
3665 (dw2_expand_symtabs_matching): Adjust to use function_view as
3667 * language.h: Include "common/function-view.h".
3668 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
3669 function_view as callback type.
3670 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
3671 * linespec.c: Include "common/function-view.h".
3672 (collect_info::add_symbol): New method.
3673 (struct symbol_and_data_callback, iterate_inline_only, struct
3674 symbol_matcher_data, iterate_name_matcher): Delete.
3675 (iterate_over_all_matching_symtabs): Adjust to use function_view
3676 as callback type and lambdas.
3677 (iterate_over_file_blocks): Adjust to use function_view as
3679 (decode_compound_collector): Now a class with private fields.
3680 (decode_compound_collector::release_symbols): New method.
3681 (collect_one_symbol): Rename to...
3682 (decode_compound_collector::operator()): ... this and adjust.
3683 (lookup_prefix_sym): decode_compound_collector construction bits
3684 move to decode_compound_collector ctor. Pass the
3685 decode_compound_collector object directly as callback. Remove
3686 cleanups and use decode_compound_collector::release_symbols
3688 (symtab_collector): Now a class with private fields.
3689 (symtab_collector::release_symtabs): New method.
3690 (add_symtabs_to_list): Rename to...
3691 (symtab_collector::operator()): ... this and adjust.
3692 (collect_symtabs_from_filename): symtab_collector construction
3693 bits move to symtab_collector ctor. Pass the symtab_collector
3694 object directly as callback. Remove cleanups and use
3695 symtab_collector::release_symtabs instead.
3696 (collect_symbols): Delete.
3697 (add_matching_symbols_to_info): Use lambdas.
3698 * macrocmd.c (print_macro_callback): Delete.
3699 (info_macro_command): Use a lambda.
3700 (info_macros_command): Pass print_macro_definition as callable
3702 (print_one_macro): Remove 'ignore' parameter.
3703 (macro_list_command): Adjust.
3704 * macrotab.c (macro_for_each_data::fn): Now a function_view.
3705 (macro_for_each_data::user_data): Delete field.
3706 (foreach_macro): Adjust to call the function_view.
3707 (macro_for_each): Adjust to use function_view as callback type.
3708 (foreach_macro_in_scope): Adjust to call the function_view.
3709 (macro_for_each_in_scope): Adjust to use function_view as callback
3711 * macrotab.h: Include "common/function-view.h".
3712 (macro_callback_fn): Declare a prototype instead of a pointer.
3713 Remove "user_data" parameter.
3714 (macro_for_each, macro_for_each_in_scope): Adjust to use
3715 function_view as callback type.
3716 * psymtab.c (partial_map_expand_apply)
3717 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
3718 Adjust to use function_view as callback type and to return bool.
3719 (psym_expand_symtabs_matching): Adjust to use function_view as
3721 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
3722 to use function_view as callback type and to return bool.
3723 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
3725 * symfile.c (expand_symtabs_matching): Adjust to use function_view
3727 * symfile.h: Include "common/function-view.h".
3728 (expand_symtabs_file_matcher_ftype)
3729 (expand_symtabs_symbol_matcher_ftype)
3730 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
3732 (quick_symbol_functions::map_symtabs_matching_filename)
3733 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
3734 function_view as callback type and return bool.
3735 (expand_symtabs_matching): Adjust to use function_view as callback
3737 (maintenance_expand_name_matcher)
3738 (maintenance_expand_file_matcher): Delete.
3739 (maintenance_expand_symtabs): Use lambdas.
3740 * symtab.c (iterate_over_some_symtabs): Adjust to use
3741 function_view as callback types and return bool.
3742 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
3744 (lookup_symtab_callback): Delete.
3745 (lookup_symtab): Use a lambda.
3746 (iterate_over_symbols): Adjust to use function_view as callback
3748 (struct search_symbols_data, search_symbols_file_matches)
3749 (search_symbols_name_matches): Delete.
3750 (search_symbols): Use a pair of lambdas.
3751 (struct add_name_data, add_macro_name, symbol_completion_matcher)
3752 (symtab_expansion_callback): Delete.
3753 (default_make_symbol_completion_list_break_on_1): Use lambdas.
3754 * symtab.h: Include "common/function-view.h".
3755 (iterate_over_some_symtabs): Adjust to use function_view as
3756 callback type and return bool.
3757 (iterate_over_symtabs): Adjust to use function_view as callback
3759 (symbol_found_callback_ftype): Remove 'data' parameter and return
3761 (iterate_over_symbols): Adjust to use function_view as callback
3764 2017-02-23 Pedro Alves <palves@redhat.com>
3766 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
3767 (%.o) <unittests/%.c>: New pattern.
3768 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
3769 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
3770 * common/function-view.h: New file.
3771 * unittests/function-view-selftests.c: New file.
3772 * configure: Regenerate.
3774 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
3776 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
3778 * go32-nat.c (go32_thread_alive): Likewise.
3780 2017-02-23 Yao Qi <yao.qi@linaro.org>
3782 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
3785 2017-02-23 Yao Qi <yao.qi@linaro.org>
3787 * varobj.c (varobj_clear_saved_item): Use delete instead of
3789 (update_dynamic_varobj_children): Likewise.
3791 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3793 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
3795 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
3797 * common/enum-flags.h (enum_flags::enum_flags): Initialize
3798 m_enum_value to 0 in default constructor.
3800 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3802 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
3803 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
3804 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
3805 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
3806 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
3807 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
3808 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
3809 IS_STORE_CONDITIONAL_INSN.
3811 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3813 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
3815 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3817 * NEWS (Changes since GDB 7.12): Add DWARF-5.
3819 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3821 * dwarf2read.c (skip_one_die, read_attribute_value)
3822 (dwarf2_const_value_attr, dump_die_shallow)
3823 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3824 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
3826 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3828 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
3829 (dwarf_parse_macro_header): Accept DWARF version 5.
3830 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
3832 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3834 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
3836 * common/common-exceptions.h (enum errors): Likewise.
3837 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
3838 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
3839 (dwarf_expr_context::execute_stack_op): Likewise.
3840 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
3842 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
3843 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
3844 (show_entry_values_debug, call_site_to_target_addr)
3845 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
3846 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
3847 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
3848 (value_of_dwarf_block_entry, indirect_pieced_value)
3849 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
3850 (disassemble_dwarf_expression): Likewise.
3851 * dwarf2read.c (process_die, inherit_abstract_dies)
3852 (read_call_site_scope): Likewise.
3853 * gdbtypes.h (struct func_type, struct call_site_parameter)
3854 (struct call_site): Likewise.
3855 * stack.c (read_frame_arg): Likewise.
3856 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
3858 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3860 * defs.h (read_unsigned_leb128): New declaration.
3861 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
3862 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
3863 (dwarf2_find_location_expression): Call also
3864 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
3865 * dwarf2loc.h (dwarf2_version): New declaration.
3866 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
3868 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
3870 (struct dwop_section_names): Add loclists_dwo.
3871 (dwop_section_names): Add .debug_loclists.dwo.
3872 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
3873 (struct dwarf2_per_cu_data): Add dwarf_version.
3874 (struct dwo_sections): Add loclists.
3875 (struct attr_abbrev): Add implicit_const.
3876 (read_indirect_line_string): New declaration.
3877 (read_unsigned_leb128): Delete declaration.
3878 (rcuh_kind): New definition.
3879 (read_and_check_comp_unit_head): Change parameter
3880 is_debug_types_section to section_kind.
3881 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
3882 (read_comp_unit_head): Change parameter abfd to section, add parameter
3883 section_kind. Handle DWARF-5.
3884 (error_check_comp_unit_head): Accept also DWARF version 5.
3885 (read_and_check_comp_unit_head): Change parameter
3886 is_debug_types_section to section_kind.
3887 (read_and_check_type_unit_head): Delete function.
3888 (read_abbrev_offset): Handle DWARF-5.
3889 (create_debug_type_hash_table): Add parameter section_kind. Process
3890 only DW_UT_type. Use signature and type_offset_in_tu from struct
3892 (create_debug_types_hash_table): Update create_debug_type_hash_table
3894 (create_all_type_units): Call create_debug_type_hash_table.
3895 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
3896 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
3898 (skip_one_die): Handle DW_FORM_implicit_const.
3899 (dwarf2_rnglists_process): New function.
3900 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
3901 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
3902 (read_attribute_value): Handle DW_FORM_implicit_const,
3904 (read_attribute): Handle DW_FORM_implicit_const.
3905 (read_indirect_string_at_offset_from): New function from
3906 read_indirect_string_at_offset.
3907 (read_indirect_string_at_offset): Call
3908 read_indirect_string_at_offset_from.
3909 (read_indirect_line_string_at_offset): New function.
3910 (read_indirect_string): New function comment.
3911 (read_indirect_line_string): New function.
3912 (read_unsigned_leb128): Make it global.
3913 (dwarf2_string_attr): Handle DWARF-5.
3914 (add_include_dir_stub, read_formatted_entries): New functions.
3915 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
3917 (per_cu_header_read_in): Update read_comp_unit_head caller.
3918 (dwarf2_version): New function.
3919 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
3921 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
3924 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3926 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
3928 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3930 * dwarf2read.c (dwarf2_ranges_process): New function from
3932 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
3933 dwarf2_ranges_process.
3935 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3937 * dwarf2read.c (create_debug_type_hash_table): New function from
3938 create_debug_types_hash_table.
3939 (create_debug_types_hash_table): Call create_debug_type_hash_table.
3940 (create_all_type_units, open_and_init_dwo_file): Update
3941 create_debug_types_hash_table callers.
3943 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
3946 * fork-child.c (trace_start_error): Fix thinko. va_end should
3947 refer to 'ap', not 'args'.
3949 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
3950 Pedro Alves <palves@redhat.com>
3953 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
3955 * fork-child.c (trace_start_error): New function.
3956 (trace_start_error_with_name): Likewise.
3957 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
3958 * inf-ptrace.c (inf_ptrace_me): Likewise.
3959 * inferior.h (trace_start_error): New prototype.
3960 (trace_start_error_with_name): Likewise.
3962 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
3965 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
3966 NULL before using it.
3967 * symmisc.c (maintenance_print_symbols): Likewise.
3968 (maintenance_print_msymbols): Likewise.
3970 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
3972 * NEWS: Add record Python bindings entry.
3974 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
3976 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
3978 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
3979 * python/py-record-btrace.c, python/py-record-btrace.h,
3980 python/py-record-full.c, python/py-record-full.h: New file.
3981 * python/py-record.c: Add include for py-record-btrace.h and
3983 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
3984 recpy_instruction_history, recpy_function_call_history, recpy_begin,
3985 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
3986 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
3988 (gdbpy_initialize_btrace): New export.
3989 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
3991 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
3993 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
3994 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
3995 * python/py-record.c: New file.
3996 * python/python-internal.h (gdbpy_start_recording,
3997 gdbpy_current_recording, gdpy_stop_recording,
3998 gdbpy_initialize_record): New export.
3999 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
4000 (python_GdbMethods): Add gdbpy_start_recording,
4001 gdbpy_current_recording and gdbpy_stop_recording.
4003 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4005 * record-btrace.c (record_btrace_record_method): New function.
4006 (init_record_btrace_ops): Initialize to_record_method.
4007 * record-full.c (record_full_record_method): New function.
4008 (init_record_full_ops, init_record_full_core_ops): Add
4009 record_full_record_method.
4010 * record.h (enum record_method): New enum.
4011 * target-debug.h (target_debug_print_enum_record_method: New define.
4012 * target-delegates.c: Regenerate.
4013 * target.c (target_record_method): New function.
4014 * target.h: Include record.h.
4015 (struct target_ops) <to_record_method>: New field.
4016 (target_record_method): New export.
4018 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4020 * record.h (record_start, record_stop): New export.
4021 * record.c (record_start, record_stop): New function.
4023 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4025 * btrace.c (btrace_fetch): Copy function call segments pointer
4027 (btrace_clear): Clear the vector.
4028 (btrace_find_insn_by_number): Use binary search to find the correct
4029 function call segment.
4030 * btrace.h (brace_fun_p): New typedef.
4031 (struct btrace_thread_info) <functions>: New field.
4033 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4035 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
4036 * btrace.c (btrace_decode_error): ... here. New function.
4037 * btrace.h (btrace_decode_error): New export.
4039 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4041 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
4042 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
4043 btrace_find_insn_by_number): Remove special case for gaps.
4044 * btrace.h (btrace_insn_get_error): New export.
4045 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
4046 * record-btrace.c (btrace_insn_history): Print number for gaps.
4047 (record_btrace_info, record_btrace_goto): Handle gaps.
4049 2017-02-14 Tom Tromey <tom@tromey.com>
4052 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
4054 * python/py-evts.c (gdbpy_initialize_py_events): Add
4055 before_prompt registry.
4056 * python/py-events.h (events_object) <before_prompt>: New field.
4058 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
4060 * btrace.c (ftrace_new_switch): Preserve up link and flags.
4062 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
4064 * symfile (_initialize_symfile): Add usage text to the load command's
4067 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
4069 * utils.c (defaulted_query): Don't query on secondary UIs.
4071 2017-02-10 Tom Tromey <tom@tromey.com>
4073 * rust-lang.c (rust_get_disr_info): Remove unused variable.
4075 2017-02-10 Tom Tromey <tom@tromey.com>
4077 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
4079 * python/py-type.c (typy_legacy_template_argument): Remove
4080 unnecessary "cleanup" local.
4082 2017-02-10 Tom Tromey <tom@tromey.com>
4084 * python/python.c (do_start_initialization): New function, from
4086 (_initialize_python): Call do_start_initialization.
4087 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
4090 2017-02-10 Tom Tromey <tom@tromey.com>
4092 * python/py-prettyprint.c (pretty_print_one_value): Use
4095 2017-02-10 Tom Tromey <tom@tromey.com>
4097 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
4098 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
4100 * python/py-type.c (field_new): Use gdbpy_ref.
4101 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
4103 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
4104 (py_free_pspace): Likewise.
4105 (pspace_to_pspace_object): Likewise.
4106 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
4107 (py_free_objfile): Likewise.
4108 (objfile_to_objfile_object): Likewise.
4109 * python/py-inferior.c (delete_thread_object): Use
4111 (infpy_read_memory): Likewise.
4112 (py_free_inferior): Likewise.
4113 * python/py-evtregistry.c (create_eventregistry_object): Use
4115 * python/py-event.c (create_event_object): Use gdbpy_ref.
4117 2017-02-10 Tom Tromey <tom@tromey.com>
4119 * python/py-ref.h (gdbpy_ref_policy): Now a template.
4120 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
4122 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
4123 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
4124 python/py-exitedevent.c, python/py-finishbreakpoint.c,
4125 python/py-framefilter.c, python/py-function.c,
4126 python/py-inferior.c, python/py-infevents.c,
4127 python/py-linetable.c, python/py-newobjfileevent.c,
4128 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
4129 python/py-signalevent.c, python/py-stopevent.c,
4130 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
4131 python/py-unwind.c, python/py-utils.c, python/py-value.c,
4132 python/py-varobj.c, python/py-xmethods.c, python/python.c,
4133 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
4135 2017-02-10 Tom Tromey <tom@tromey.com>
4137 * ui-out.h (ui_out_emit_type): New class.
4138 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
4139 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
4140 and ui_out_emit_tuple.
4141 (enumerate_locals): Likewise.
4142 (py_mi_print_variables, py_print_locals, py_print_args): Use
4144 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
4146 * common/gdb_optional.h: New file.
4148 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
4150 * MAINTAINERS (Write After Approval): Update my e-mail address.
4152 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
4155 * breakpoint.c (_initialize_breakpoint): Update the help description
4156 of the 'commands' command to indicate that it takes a list argument.
4158 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
4160 * interps.c (current_interp_set_logging): Remove "return".
4162 2017-02-09 Gary Benson <gbenson@redhat.com>
4164 * symtab.c (add_symtab_completions): Prevent NULL pointer
4167 2017-02-08 Pedro Alves <palves@redhat.com>
4169 * interps.c (interp::interp): Remove reference to quiet_p.
4170 (interp_set): Make static. Remove dead "Switching to" output
4172 (interp_quiet_p, interp_set_quiet): Delete.
4173 (interpreter_exec_cmd): Don't set the interpreter quiet.
4174 * interps.h (interp_quiet_p): Make static.
4175 (class interp) <quiet_p>: Remove field
4177 2017-02-08 Jerome Guitton <guitton@adacore.com>
4179 * cli/cli-decode.c (find_command_name_length): Make it extern.
4180 * cli/cli-decode.h (find_command_name_length): Declare.
4181 * cli/cli-script.c (command_name_equals, line_first_arg):
4183 (process_next_line): Use cli-decode to parse command names.
4184 (build_command_line): Make args a constant pointer.
4186 2017-02-08 Jerome Guitton <guitton@adacore.com>
4188 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
4189 Remove case-insensitive search.
4191 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
4193 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
4194 at the end of the line. Avoids an ARI warning.
4196 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
4198 * NEWS: Mention support for record/replay of Intel 64 rdrand and
4199 rdseed instructions.
4200 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
4202 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
4205 Provide and use sparc32 and sparc64 target description XML files.
4206 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
4207 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
4208 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
4209 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
4210 * features/sparc/sparc32-solaris.xml: New file.
4211 * features/sparc/sparc64-solaris.xml: New file.
4212 * features/sparc/sparc32-solaris.c: Generated.
4213 * features/sparc/sparc64-solaris.c: Generated.
4214 * sparc-tdep.h: Account for differences in target descriptions.
4215 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
4216 (sparc32_register_type): Use target provided registers.
4217 (validate_tdesc_registers): New function.
4218 (sparc32_gdbarch_init): Use tdesc_has_registers.
4219 Set pseudoregister functions.
4220 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
4221 (sparc64_register_type): Use target provided registers.
4222 (sparc64_init_abi): Set pseudoregister functions.
4224 2017-02-03 Tom Tromey <tom@tromey.com>
4227 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
4228 with a single member.
4230 2017-02-03 Pedro Alves <palves@redhat.com>
4232 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
4233 (cli_interp_base::~cli_interp_base): New.
4234 (cli_interp): New struct.
4235 (as_cli_interp): Cast the interp itself to cli_interp.
4236 (cli_interpreter_pre_command_loop): Rename to ...
4237 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
4239 (cli_interpreter_init): Rename to ...
4240 (cli_interp::init): ... this. Remove 'self' parameter. Use
4241 boolean. Make extern.
4242 (cli_interpreter_resume): Rename to ...
4243 (cli_interp::resume): ... this. Remove 'data' parameter. Make
4245 (cli_interpreter_suspend): Rename to ...
4246 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
4248 (cli_interpreter_exec): Rename to ...
4249 (cli_interp::exec): ... this. Remove 'data' parameter. Make
4251 (cli_interpreter_supports_command_editing): Rename to ...
4252 (cli_interp_base::supports_command_editing): ... this. Remove
4253 'interp' parameter. Make extern.
4254 (cli_ui_out): Rename to ...
4255 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
4257 (cli_set_logging): Rename to ...
4258 (cli_interp_base::set_logging): ... this. Remove 'interp'
4259 parameter. Make extern.
4260 (cli_interp_procs): Delete.
4261 (cli_interp_factory): Adjust to use "new".
4262 * cli/cli-interp.h: Include "interps.h".
4263 (struct cli_interp_base): New struct.
4264 * interps.c (struct interp): Delete. Fields moved to interps.h.
4265 (interp_new): Delete.
4266 (interp::interp, interp::~interp): New.
4267 (interp_set): Use bool, and return void. Assume the interpreter
4268 has suspend, init and resume methods, and that the all return
4270 (set_top_level_interpreter): interp_set returns void.
4271 (interp_ui_out): Adapt.
4272 (current_interp_set_logging): Adapt.
4273 (interp_data): Delete.
4274 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
4275 (interp_exec): Adapt.
4276 (top_level_interpreter_data): Delete.
4277 * interps.h (interp_init_ftype, interp_resume_ftype)
4278 (interp_suspend_ftype, interp_exec_ftype)
4279 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
4280 (class interp): New.
4281 (interp_new): Delete.
4282 (interp_set): Now returns void. Use bool.
4283 (interp_data, top_level_interpreter_data): Delete.
4284 * mi/mi-common.h: Include interps.h.
4285 (class mi_interp): Inherit from interp. Define a ctor. Declare
4286 init, resume, suspect, exec, interp_ui_out, set_logging and
4287 pre_command_loop methods.
4288 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
4289 (mi_interpreter_init): Rename to ...
4290 (mi_interp::init): ... this. Remove the 'interp' parameter, use
4291 bool, return void and make extern. Adjust.
4292 (mi_interpreter_resume): ... Rename to ...
4293 (mi_interp::resume): ... this. Remove the 'data' parameter,
4294 return void and make extern. Adjust.
4295 (mi_interpreter_suspend): ... Rename to ...
4296 (mi_interp::suspend): ... this. Remove the 'data' parameter,
4297 return void and make extern. Adjust.
4298 (mi_interpreter_exec): ... Rename to ...
4299 (mi_interp::exec): ... this. Remove the 'data' parameter and make
4301 (mi_interpreter_pre_command_loop): ... Rename to ...
4302 (mi_interp::pre_command_loop): ... this. Remove the 'self'
4303 parameter and make extern.
4304 (mi_on_normal_stop_1): Adjust.
4305 (mi_ui_out): Rename to ...
4306 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
4307 parameter and make extern. Adjust.
4308 (mi_set_logging): Rename to ...
4309 (mi_interp::set_logging): ... this. Remove the 'interp'
4310 parameter and make extern. Adjust.
4311 (mi_interp_procs): Delete.
4312 (mi_interp_factory): Adjust to use 'new'.
4313 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
4314 (mi_print_exception, mi_execute_command, mi_load_progress):
4316 * tui/tui-interp.c (tui_interp): New class.
4317 (as_tui_interp): Return a tui_interp pointer.
4318 (tui_on_normal_stop, tui_on_signal_received)
4319 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
4320 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
4321 to use interp::interp_ui_out.
4322 (tui_init): Rename to ...
4323 (tui_interp::init): ... this. Remove the 'self' parameter, use
4324 bool, return void and make extern. Adjust.
4325 (tui_resume): Rename to ...
4326 (tui_interp::resume): ... this. Remove the 'data' parameter,
4327 return void and make extern. Adjust.
4328 (tui_suspend): Rename to ...
4329 (tui_interp::suspend): ... this. Remove the 'data' parameter,
4330 return void and make extern. Adjust.
4331 (tui_ui_out): Rename to ...
4332 (tui_interp::interp_ui_out): ... this. Remove the 'self'
4333 parameter, and make extern. Adjust.
4334 (tui_exec): Rename to ...
4335 (tui_interp::exec): ... this. Remove the 'data' parameter and
4337 (tui_interp_procs): Delete.
4338 (tui_interp_factory): Use "new".
4340 2017-02-02 Tom Tromey <tom@tromey.com>
4342 * rust-exp.y (ends_raw_string, space_then_number)
4343 (rust_identifier_start_p): Return bool.
4344 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
4345 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
4346 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
4347 (rust_chartype_p): Return bool.
4348 (val_print_struct, rust_print_struct_def, rust_print_type):
4350 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
4353 2017-02-02 Tom Tromey <tom@tromey.com>
4355 * rust-lang.c: Reindent.
4357 2017-02-02 Tom Tromey <tom@tromey.com>
4359 * rust-lang.h (rust_crate_for_block): Update.
4360 * rust-lang.c (rust_crate_for_block): Return std::string.
4361 (rust_get_disr_info): Use std:;string, not
4362 gdb::unique_xmalloc_ptr.
4363 * rust-exp.y (crate_name): Update.
4365 2017-02-02 Pedro Alves <palves@redhat.com>
4367 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
4368 field out of gdb_disassembler_test and make it static.
4370 2017-02-02 Pedro Alves <palves@redhat.com>
4372 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
4373 mi1_interp and mi_interp fields.
4375 2017-02-02 Pedro Alves <palves@redhat.com>
4377 * cli/cli-interp.c (struct saved_output_files, saved_output):
4378 Moved from cli/cli-logging.c.
4379 (cli_set_logging): New function.
4380 (cli_interp_procs): Install cli_set_logging.
4381 * cli/cli-interp.h (make_logging_output, cli_set_logging):
4383 * cli/cli-logging.c (struct saved_output_files, saved_output):
4384 Moved to cli/cli-interp.c.
4385 (pop_output_files): Don't save outputs here.
4386 (make_logging_output): New function.
4387 (handle_redirections): Don't build tee nor save previous outputs
4389 * interps.c (current_interp_set_logging): Change prototype.
4390 Assume there's always a set_logging_proc method installed.
4391 * interps.h (interp_set_logging_ftype): Change prototype.
4392 (current_interp_set_logging): Change prototype and adjust comment.
4393 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
4394 use make_logging_output.
4395 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
4396 2017-02-02 Pedro Alves <palves@redhat.com>
4398 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
4400 (set_logging_overwrite): ... here.
4401 (logging_no_redirect_file): Delete.
4402 (set_logging_redirect): Don't handle redirection on the fly.
4403 Instead warn that "logging off" / "logging on" is necessary.
4404 (pop_output_files): Delete references to logging_no_redirect_file.
4405 (show_logging_command): Always speak in terms of what will happen
4406 once logging is reenabled.
4408 2017-02-02 Pedro Alves <palves@redhat.com>
4410 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
4412 2017-02-02 Pedro Alves <palves@redhat.com>
4414 * disasm.c (gdb_pretty_print_insn): Rename to ...
4415 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
4416 Remove gdbarch parameter. Adapt to clear the object's buffers
4417 instead of allocating new buffers, and to print using the object's
4418 gdb_disassembler instead of calling gdb_print_insn.
4419 (dump_insns): Use gdb_pretty_print_disassembler.
4420 * disasm.h (gdb_pretty_print_insn): Delete declaration.
4421 (gdb_pretty_print_disassembler): New class.
4422 * record-btrace.c (btrace_insn_history): Use
4423 gdb_pretty_print_disassembler.
4425 2017-02-02 Pedro Alves <palves@redhat.com>
4427 * ada-lang.c (type_as_string): Use string_file.
4428 * ada-valprint.c (ada_print_floating): Use string_file.
4429 * ada-varobj.c (ada_varobj_scalar_image)
4430 (ada_varobj_get_value_image): Use string_file.
4431 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
4432 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
4433 * breakpoint.c (update_inserted_breakpoint_locations)
4434 (insert_breakpoint_locations, reattach_breakpoints)
4435 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
4436 (print_it_watchpoint): Use string_file.
4437 (save_breakpoints): Use stdio_file.
4438 * c-exp.y (oper): Use string_file.
4439 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
4441 (pop_output_files): Use delete.
4442 (handle_redirections): Use stdio_file and tee_file.
4443 * cli/cli-setshow.c (do_show_command): Use string_file.
4444 * compile/compile-c-support.c (c_compute_program): Use
4446 * compile/compile-c-symbols.c (generate_vla_size): Take a
4447 'string_file &' instead of a 'ui_file *'.
4448 (generate_c_for_for_one_variable): Take a 'string_file &' instead
4449 of a 'ui_file *'. Use string_file.
4450 (generate_c_for_variable_locations): Take a 'string_file &'
4451 instead of a 'ui_file *'.
4452 * compile/compile-internal.h (generate_c_for_for_one_variable):
4453 Take a 'string_file &' instead of a 'ui_file *'.
4454 * compile/compile-loc2c.c (push, pushf, unary, binary)
4455 (print_label, pushf_register_address, pushf_register)
4456 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
4457 'ui_file *'. Adjust.
4458 * compile/compile.c (compile_to_object): Use string_file.
4459 * compile/compile.h (compile_dwarf_expr_to_c)
4460 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
4462 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
4463 (replace_typedefs_qualified_name): Use string_file and
4465 * disasm.c (gdb_pretty_print_insn): Use string_file.
4466 (gdb_disassembly): Adjust reference the null_stream global.
4467 (do_ui_file_delete): Delete.
4468 (gdb_insn_length): Use null_stream.
4469 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
4470 * dwarf2loc.c (dwarf2_compile_property_to_c)
4471 (locexpr_generate_c_location, loclist_generate_c_location): Take a
4472 'string_file &' instead of a 'ui_file *'.
4473 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
4474 * dwarf2read.c (do_ui_file_peek_last): Delete.
4475 (dwarf2_compute_name): Use string_file.
4476 * event-top.c (gdb_setup_readline): Use stdio_file.
4477 * gdbarch.sh (verify_gdbarch): Use string_file.
4478 * gdbtypes.c (safe_parse_type): Use null_stream.
4479 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
4481 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
4482 'string_file *' instead of a 'ui_file *'.
4483 (gdbscm_arch_disassemble): Use string_file.
4484 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
4485 * guile/scm-ports.c (class ioscm_file_port): Now a class that
4486 inherits from ui_file.
4487 (ioscm_file_port_delete, ioscm_file_port_rewind)
4488 (ioscm_file_port_put): Delete.
4489 (ioscm_file_port_write): Rename to ...
4490 (ioscm_file_port::write): ... this. Remove file_port_magic
4492 (ioscm_file_port_new): Delete.
4493 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
4495 * guile/scm-type.c (tyscm_type_name): Use string_file.
4496 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
4498 * infcmd.c (print_return_value_1): Use string_file.
4499 * infrun.c (print_target_wait_results): Use string_file.
4500 * language.c (add_language): Use string_file.
4501 * location.c (explicit_to_string_internal): Use string_file.
4502 * main.c (captured_main_1): Use null_file.
4503 * maint.c (maintenance_print_architecture): Use stdio_file.
4504 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
4505 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
4506 event_channel>: Change type to mi_console_file pointer.
4507 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
4508 (mi_console_file_delete): Delete.
4509 (struct mi_console_file): Delete.
4510 (mi_console_file_magic): Delete.
4511 (mi_console_file_new): Delete.
4512 (mi_console_file::mi_console_file): New.
4513 (mi_console_file_delete): Delete.
4514 (mi_console_file_fputs): Delete.
4515 (mi_console_file::write): New.
4516 (mi_console_raw_packet): Delete.
4517 (mi_console_file::flush): New.
4518 (mi_console_file_flush): Delete.
4519 (mi_console_set_raw): Rename to ...
4520 (mi_console_file::set_raw): ... this.
4521 * mi/mi-console.h (class mi_console_file): New class.
4522 (mi_console_file_new, mi_console_set_raw): Delete.
4523 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
4524 (mi_set_logging): Use delete and tee_file. Adjust.
4525 * mi/mi-main.c (output_register): Use string_file.
4526 (mi_cmd_data_evaluate_expression): Use string_file.
4527 (mi_cmd_data_read_memory): Use string_file.
4528 (mi_cmd_execute, print_variable_or_computed): Use string_file.
4529 * mi/mi-out.c (mi_ui_out::main_stream): New.
4530 (mi_ui_out::rewind): Use main_stream and
4532 (mi_ui_out::put): Use main_stream and string_file.
4533 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
4534 Allocate a 'string_file' instead.
4535 (mi_out_new): Don't allocate a mem_fileopen stream here.
4536 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
4537 (mi_ui_out::main_stream): Declare method.
4538 * printcmd.c (eval_command): Use string_file.
4539 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
4540 * python/py-arch.c (archpy_disassemble): Use string_file.
4541 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
4542 * python/py-frame.c (frapy_str): Use string_file.
4543 * python/py-framefilter.c (py_print_type, py_print_single_arg):
4545 * python/py-type.c (typy_str): Use string_file.
4546 * python/py-unwind.c (unwind_infopy_str): Use string_file.
4547 * python/py-value.c (valpy_str): Use string_file.
4548 * record-btrace.c (btrace_insn_history): Use string_file.
4549 * regcache.c (regcache_print): Use stdio_file.
4550 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
4551 * remote.c (escape_buffer): Use string_file.
4552 * rust-lang.c (rust_get_disr_info): Use string_file.
4553 * serial.c (serial_open_ops_1): Use stdio_file.
4554 (do_serial_close): Use delete.
4555 * stack.c (print_frame_arg): Use string_file.
4556 (print_frame_args): Remove local mem_fileopen stream, not used.
4557 (print_frame): Use string_file.
4558 * symmisc.c (maintenance_print_symbols): Use stdio_file.
4559 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4560 Take a 'string_file *' instead of a 'ui_file *'.
4561 * top.c (new_ui): Use stdio_file and stderr_file.
4562 (free_ui): Use delete.
4563 (execute_command_to_string): Use string_file.
4564 (quit_confirm): Use string_file.
4565 * tracepoint.c (collection_list::append_exp): Use string_file.
4566 * tui/tui-disasm.c (tui_disassemble): Use string_file.
4567 * tui/tui-file.c: Don't include "ui-file.h".
4568 (enum streamtype, struct tui_stream): Delete.
4569 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
4570 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
4571 (tui_file::tui_file): New method.
4572 (tui_file_fputs): Delete.
4573 (tui_file_get_strbuf): Delete.
4574 (tui_file::puts): New method.
4575 (tui_file_adjust_strbuf): Delete.
4576 (tui_file_flush): Delete.
4577 (tui_file::flush): New method.
4578 * tui/tui-file.h: Tweak intro comment.
4580 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
4581 (tui_file_adjust_strbuf): Delete declarations.
4582 (class tui_file): New class.
4583 * tui/tui-io.c (tui_initialize_io): Use tui_file.
4584 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
4585 (tui_register_format): Use string_stream.
4586 * tui/tui-stack.c (tui_make_status_line): Use string_file.
4587 (tui_get_function_from_frame): Use string_file.
4588 * typeprint.c (type_to_string): Use string_file.
4589 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
4590 (null_stream): New global.
4591 (ui_file_delete): Delete.
4592 (ui_file::ui_file): New.
4593 (null_file_isatty): Delete.
4594 (ui_file::~ui_file): New.
4595 (null_file_rewind): Delete.
4596 (ui_file::printf): New.
4597 (null_file_put): Delete.
4598 (null_file_flush): Delete.
4599 (ui_file::putstr): New.
4600 (null_file_write): Delete.
4601 (ui_file::putstrn): New.
4602 (null_file_read): Delete.
4603 (ui_file::putc): New.
4604 (null_file_fputs): Delete.
4605 (null_file_write_async_safe): Delete.
4606 (ui_file::vprintf): New.
4607 (null_file_delete): Delete.
4608 (null_file::write): New.
4609 (null_file_fseek): Delete.
4610 (null_file::puts): New.
4611 (ui_file_data): Delete.
4612 (null_file::write_async_safe): New.
4613 (gdb_flush, ui_file_isatty): Adjust.
4614 (ui_file_put, ui_file_rewind): Delete.
4615 (ui_file_write): Adjust.
4616 (ui_file_write_for_put): Delete.
4617 (ui_file_write_async_safe, ui_file_read): Adjust.
4618 (ui_file_fseek): Delete.
4619 (fputs_unfiltered): Adjust.
4620 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
4621 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
4622 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
4623 (set_ui_file_data): Delete.
4624 (string_file::~string_file, string_file::write)
4625 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
4626 (do_ui_file_as_string, ui_file_as_string): Delete.
4627 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
4628 (struct mem_file): Delete.
4629 (mem_file_new): Delete.
4630 (stdio_file::stdio_file): New.
4631 (mem_file_delete): Delete.
4632 (stdio_file::stdio_file): New.
4633 (mem_fileopen): Delete.
4634 (stdio_file::~stdio_file): New.
4635 (mem_file_rewind): Delete.
4636 (stdio_file::set_stream): New.
4637 (mem_file_put): Delete.
4638 (stdio_file::open): New.
4639 (mem_file_write): Delete.
4640 (stdio_file_magic, struct stdio_file): Delete.
4641 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
4642 (stdio_file::flush): New.
4643 (stdio_file_read): Rename to ...
4644 (stdio_file::read): ... this. Adjust.
4645 (stdio_file_write): Rename to ...
4646 (stdio_file::write): ... this. Adjust.
4647 (stdio_file_write_async_safe): Rename to ...
4648 (stdio_file::write_async_safe) ... this. Adjust.
4649 (stdio_file_fputs): Rename to ...
4650 (stdio_file::puts) ... this. Adjust.
4651 (stdio_file_isatty): Delete.
4652 (stdio_file_fseek): Delete.
4653 (stdio_file::isatty): New.
4654 (stderr_file_write): Rename to ...
4655 (stderr_file::write) ... this. Adjust.
4656 (stderr_file_fputs): Rename to ...
4657 (stderr_file::puts) ... this. Adjust.
4658 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
4659 (stderr_file::stderr_file): New.
4660 (tee_file_magic): Delete.
4661 (struct tee_file): Delete.
4662 (tee_file::tee_file): New.
4663 (tee_file_new): Delete.
4664 (tee_file::~tee_file): New.
4665 (tee_file_delete): Delete.
4666 (tee_file_flush): Rename to ...
4667 (tee_file::flush): ... this. Adjust.
4668 (tee_file_write): Rename to ...
4669 (tee_file::write): ... this. Adjust.
4670 (tee_file::write_async_safe): New.
4671 (tee_file_fputs): Rename to ...
4672 (tee_file::puts): ... this. Adjust.
4673 (tee_file_isatty): Rename to ...
4674 (tee_file::isatty): ... this. Adjust.
4675 * ui-file.h (struct obstack, struct ui_file): Don't
4677 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
4678 (ui_file_write_ftype)
4679 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
4680 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
4681 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
4682 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
4683 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
4684 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
4685 (set_ui_file_fseek): Delete.
4686 (ui_file_data, ui_file_delete, ui_file_rewind)
4687 (struct ui_file): New.
4689 (class null_file): New.
4690 (null_stream): Declare.
4691 (ui_file_write_for_put, ui_file_put): Delete.
4692 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
4694 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
4695 (gdb_fopen, tee_file_new): Delete.
4696 (struct string_file): New.
4697 (struct stdio_file): New.
4698 (stdio_file_up): New.
4699 (struct stderr_file): New.
4700 (class tee_file): New.
4701 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
4702 of a 'ui_file *'. Adjust.
4703 * ui-out.h (class ui_out) <field_stream>: Likewise.
4704 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
4705 (null_stream): Delete.
4706 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
4708 * utils.h (struct ui_file): Delete forward declaration..
4709 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
4710 (error_stream): Take a 'string_file &' instead of a
4712 * varobj.c (varobj_value_get_print_value): Use string_file.
4713 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
4714 * gdbarch.c: Regenerate.
4716 2017-02-02 Pedro Alves <palves@redhat.com>
4718 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
4719 (gdb_pretty_print_insn): ... this. Now a free function. Add back
4720 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
4721 Adjust to call gdb_print_insn instead of
4722 gdb_disassembler::print_insn.
4723 (dump_insns, do_mixed_source_and_assembly_deprecated)
4724 (do_mixed_source_and_assembly, do_assembly_only): Add back a
4725 'gdbarch' parameter. Remove gdb_disassembler parameter.
4726 (gdb_disassembly): Don't allocate a gdb_disassembler here.
4727 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
4729 (gdb_pretty_print_insn): Re-add declaration.
4730 * record-btrace.c (btrace_insn_history): Don't allocate a
4731 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
4733 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
4735 * disasm.h (gdb_disassembly): Remove file_string parameter.
4736 * disasm.c (gdb_disassembly): Likewise.
4737 * cli/cli-cmds.c (print_disassembly): Adapt.
4738 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
4739 * stack.c (do_gdb_disassembly): Likewise.
4741 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
4743 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
4744 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
4745 targets. And if the implicit value is longer than needed, extract
4746 the first bytes instead of the "least significant" ones.
4748 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
4750 * btrace.c (btrace_enable): Do not call btrace_add_pc for
4751 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
4752 (btrace_fetch): Assert can_access_registers_ptid.
4753 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
4754 validate_registers_access.
4756 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
4758 * gdbthread.h (can_access_registers_ptid): New.
4759 * thread.c (can_access_registers_ptid): New.
4761 2017-02-01 Pedro Alves <palves@redhat.com>
4763 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
4765 2017-01-31 Pedro Alves <palves@redhat.com>
4767 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
4770 2017-01-31 Pedro Alves <palves@redhat.com>
4772 * stack.c (print_frame_args): Remove local mem_fileopen stream,
4775 2017-01-31 Pedro Alves <palves@redhat.com>
4777 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
4779 2017-01-31 Pedro Alves <palves@redhat.com>
4781 * common/scoped_restore.h
4782 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
4783 change the value's parameter type to T2.
4784 (make_scoped_restore): Likewise.
4786 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4787 Richard Henderson <rth@redhat.com>
4789 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
4790 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
4791 GS_BASE for older kernels.
4792 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
4793 GS_BASE for older kernels.
4794 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
4795 and GS_BASE to the offset table.
4796 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
4797 system register group.
4798 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
4800 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
4802 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
4803 AMD64_GSBASE_REGNUM.
4804 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
4805 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
4806 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
4807 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
4808 i386/64bit-segments.xml in those rules.
4809 * features/i386/64bit-segments.xml: New file.
4810 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
4811 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
4812 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
4813 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
4814 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
4815 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
4816 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
4817 * features/i386/amd64-avx-linux.c: Regenerated.
4818 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
4819 * features/i386/amd64-avx-mpx.c: Regenerated.
4820 * features/i386/amd64-avx512-linux.c: Regenerated.
4821 * features/i386/amd64-linux.c: Regenerated.
4822 * features/i386/amd64-mpx-linux.c: Regenerated.
4823 * features/i386/i386-avx-mpx-linux.c: Regenerated.
4824 * features/i386/i386-avx-mpx.c: Regenerated.
4825 * features/i386/x32-avx-linux.c: Regenerated.
4826 * features/i386/x32-avx512-linux.c: Regenerated.
4827 * regformats/i386/amd64-avx-linux.dat: Regenerated.
4828 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
4829 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
4830 * regformats/i386/amd64-linux.dat: Regenerated.
4831 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
4832 * regformats/i386/x32-avx-linux.dat: Regenerated.
4833 * regformats/i386/x32-avx512-linux.dat: Regenerated.
4834 * regformats/i386/x32-linux.dat: Regenerated.
4836 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4838 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
4839 Set to AMD64_NUM_REGS.
4841 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4843 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
4844 that checks validity of a register number.
4846 2017-01-27 Kees Cook <keescook@google.com>
4848 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
4849 fetch_fpregs if target has fpa registers.
4850 (arm_linux_store_inferior_registers): Call store_fpregs if target
4853 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
4855 * cris-tdep.c (cris_gdbarch_init): Remove check for
4856 info.byte_order and force it to BFD_ENDIAN_LITTLE.
4858 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
4860 * corelow.c (get_core_register_section): Check for regset
4861 existence before checking for REGSET_VARIABLE_SIZE.
4863 2017-01-26 Yao Qi <yao.qi@linaro.org>
4864 Pedro Alves <palves@redhat.com>
4867 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
4868 call memory_error, save memaddr instead.
4869 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
4870 negative, cal memory_error.
4871 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
4873 2017-01-26 Yao Qi <yao.qi@linaro.org>
4875 * disasm-selftests.c (memory_error_test): New function.
4876 (_initialize_disasm_selftests): Register memory_error_test.
4878 2017-01-26 Yao Qi <yao.qi@linaro.org>
4880 * Makefile.in (SFILES): Add disasm-selftests.c and
4882 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
4883 * disasm-selftests.c: New file.
4884 * selftest-arch.c: New file.
4885 * selftest-arch.h: New file.
4887 2017-01-26 Yao Qi <yao.qi@linaro.org>
4889 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
4890 to bfd_arch_mep. Don't return 0 if section is not
4891 found. Call print_insn_mep.
4893 2017-01-26 Pedro Alves <palves@redhat.com>
4894 Yao Qi <yao.qi@linaro.org>
4896 * arm-tdep.c: Include "disasm.h".
4897 (gdb_print_insn_arm): Update code to get gdbarch.
4898 * disasm.c (dis_asm_read_memory): Change it to
4899 gdb_disassembler::dis_asm_read_memory.
4900 (dis_asm_memory_error): Likewise.
4901 (dis_asm_print_address): Likewise.
4902 (gdb_pretty_print_insn): Change it to
4903 gdb_disassembler::pretty_print_insn.
4904 (dump_insns): Add one argument gdb_disassemlber. All
4906 (do_mixed_source_and_assembly_deprecated): Likewise.
4907 (do_mixed_source_and_assembly): Likewise.
4908 (do_assembly_only): Likewise.
4909 (gdb_disassembler::gdb_disassembler): New.
4910 (gdb_disassembler::print_insn): New.
4911 * disasm.h (class gdb_disassembler): New.
4912 (gdb_pretty_print_insn): Remove declaration.
4913 (gdb_disassemble_info): Likewise.
4914 * guile/scm-disasm.c (class gdbscm_disassembler): New.
4915 (gdbscm_disasm_read_memory_worker): Update.
4916 (gdbscm_disasm_read_memory): Update.
4917 (gdbscm_disasm_memory_error): Remove.
4918 (gdbscm_disasm_print_address): Remove.
4919 (gdbscm_disassembler::gdbscm_disassembler): New.
4920 (gdbscm_print_insn_from_port): Update.
4921 * mips-tdep.c: Include disasm.h.
4922 (gdb_print_insn_mips): Update code to get gdbarch.
4923 * record-btrace.c (btrace_insn_history): Update.
4924 * spu-tdep.c: Include disasm.h.
4925 (struct spu_dis_asm_data): Remove.
4926 (struct spu_dis_asm_info): New.
4927 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
4929 (gdb_print_insn_spu): Cast disassemble_info to
4932 2017-01-26 Yao Qi <yao.qi@linaro.org>
4934 * disasm.c (do_ui_file_delete): Delete.
4935 (gdb_insn_length): Move code creating stream to ...
4936 * utils.c (null_stream): ... here. New function.
4937 * utils.h (null_stream): Declare.
4939 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
4941 * python/py-inferior.c (find_thread_object): Return directly
4942 from the loop. Remove "found" variable.
4944 2017-01-21 Joel Brobecker <brobecker@adacore.com>
4946 GDB 7.12.1 released.
4948 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
4950 * python/py-function.c (fnpy_call): Reorder declarations to have
4951 the gdbpy_enter object declared first.
4952 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
4954 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
4957 * python/python-internal.h (PyMem_RawMalloc): Define for
4959 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
4960 PyMem_RawMalloc instead of PyMem_Malloc.
4962 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
4963 Luis Machado <lgustavo@codesourcery.com>
4965 * NEWS (New commands): Mention flash-erase.
4966 (New MI commands): Mention target-flash-erase.
4967 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
4969 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
4970 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
4971 * target.c (flash_erase_command): New function.
4972 (initialize_targets): Add new flash-erase command.
4973 * target.h (flash_erase_command): New declaration.
4975 2017-01-20 Joel Brobecker <brobecker@adacore.com>
4977 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
4978 HAVE_SYS_PROCFS_H is defined.
4980 2017-01-18 Alan Hayward <alan.hayward@arm.com>
4982 * remote.c (struct cached_reg): Change data into a pointer.
4983 * (stop_reply_dtr): Free data pointers before deleting vector.
4984 (process_stop_reply): Likewise.
4985 (remote_parse_stop_reply): Allocate space for data
4987 2017-01-18 Alan Hayward <alan.hayward@arm.com>
4989 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
4991 (amd64_pseudo_register_read_value): Likewise.
4992 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
4993 (store_register_using_P): Likewise.
4994 * regcache.c (regcache_xfer_part): Likewise.
4996 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
4998 Split real and pseudo registers.
4999 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
5000 (sparc32_pseudo_regnum): New enum.
5001 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
5002 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
5003 (SPARC32_CP0_REGISTERS): New macro.
5004 (sparc32_pseudo_register_name): New function.
5005 (sparc32_register_name): Use sparc32_pseudo_register_name.
5006 (sparc32_pseudo_register_type): New function.
5007 (sparc32_register_type): Use sparc32_pseudo_register_type.
5008 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
5009 pseudo register numbers.
5010 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
5011 (SPARC64_CP0_REGISTERS): New macro.
5012 (sparc64_pseudo_register_name): New function.
5013 (sparc64_register_name): Use sparc64_pseudo_register_name.
5014 (sparc64_pseudo_register_type): New function.
5015 (sparc64_register_type): Use sparc64_pseudo_register_type.
5016 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
5017 pseudo register numbers.
5018 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
5019 sparc64_store_arguments): Handle pseudo register numbers.
5021 2017-01-13 Yao Qi <yao.qi@linaro.org>
5023 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
5024 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
5026 (getpkt_or_notif_sane_1): Likewise.
5028 2017-01-13 Yao Qi <yao.qi@linaro.org>
5030 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
5031 of CC. Pass "-x c++-header" instead of "-x c".
5033 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
5035 * remote.c (remote_can_async_p): Update comment.
5037 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
5039 * linux-nat.c (linux_nat_can_async_p): Update comment.
5041 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
5043 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
5045 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
5047 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
5049 2017-01-10 Tom Tromey <tom@tromey.com>
5051 * python/py-type.c (typy_legacy_template_argument): Update.
5052 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
5053 ~demangle_parse_info): Declare new members.
5054 (cp_demangled_name_to_comp): Return unique_ptr.
5055 (cp_demangled_name_parse_free)
5056 (make_cleanup_cp_demangled_name_parse_free)
5057 (cp_new_demangle_parse_info): Remove.
5058 * cp-support.c (do_demangled_name_parse_free_cleanup)
5059 (make_cleanup_cp_demangled_name_parse_free): Remove.
5060 (inspect_type, cp_canonicalize_string_full)
5061 (cp_canonicalize_string): Update.
5062 (mangled_name_to_comp): Change return type.
5063 (cp_class_name_from_physname, method_name_from_physname)
5064 (cp_func_name, cp_remove_params): Update.
5065 * cp-name-parser.y (demangle_parse_info): New constructor, from
5066 cp_new_demangle_parse_info.
5067 (~demangle_parse_info): New destructor, from
5068 cp_demangled_name_parse_free.
5069 (cp_merge_demangle_parse_infos): Update.
5070 (cp_demangled_name_to_comp): Change return type.
5072 2017-01-10 Tom Tromey <tom@tromey.com>
5074 * top.c (prevent_dont_repeat): Change return type.
5075 * python/python.c (execute_gdb_command): Use std::string.
5077 * guile/guile.c (gdbscm_execute_gdb_command): Update.
5078 * command.h (prevent_dont_repeat): Change return type.
5079 * breakpoint.c (bpstat_do_actions_1): Update.
5081 2017-01-10 Tom Tromey <tom@tromey.com>
5083 * value.h (scoped_value_mark::~scoped_value_mark): Call
5085 (scoped_value_mark::free_to_mark): New method.
5086 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
5089 2017-01-10 Tom Tromey <tom@tromey.com>
5091 * python/py-value.c (valpy_dereference, valpy_referenced_value)
5092 (valpy_reference_value, valpy_const_value, valpy_get_address)
5093 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
5094 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
5095 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
5096 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
5098 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
5099 * value.h (scoped_value_mark): New class.
5101 2017-01-10 Tom Tromey <tom@tromey.com>
5103 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
5104 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
5105 * psymtab.c (discard_psymtabs_upto): Remove.
5106 (make_cleanup_discard_psymtabs): Remove.
5107 (struct psymtab_state): Remove.
5109 2017-01-10 Tom Tromey <tom@tromey.com>
5111 * record-full.c (record_full_save_cleanups): Remove.
5112 (record_full_save): Use gdb::unlinker.
5113 * gcore.c (do_bfd_delete_cleanup): Remove.
5114 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
5116 * dwarf2read.c (unlink_if_set): Remove.
5117 (write_psymtabs_to_index): Use gdb::unlinker.
5118 * common/gdb_unlinker.h: New file.
5120 2017-01-10 Tom Tromey <tom@tromey.com>
5122 * windows-tdep.c (windows_xfer_shared_library): Update.
5123 * windows-nat.c (windows_make_so): Update.
5124 * utils.h (make_cleanup_bfd_unref): Remove.
5125 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
5126 * symfile.h (symfile_bfd_open)
5127 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
5128 * symfile.c (read_symbols, symbol_file_add)
5129 (separate_debug_file_exists): Update.
5130 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
5131 (generic_load, reread_symbols): Update.
5132 * symfile-mem.c (symbol_file_add_from_memory): Update.
5133 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
5134 (spu_symbol_file_add_from_memory): Update.
5135 * solist.h (struct target_so_ops) <bfd_open>: Return
5137 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
5138 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
5140 (solib_map_sections, reload_shared_libraries_1): Update.
5141 * solib-svr4.c (enable_break): Update.
5142 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
5143 * solib-frv.c (enable_break2): Update.
5144 * solib-dsbt.c (enable_break): Update.
5145 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
5147 (darwin_solib_get_all_image_info_addr_at_init): Update.
5148 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
5149 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
5150 * record-full.c (record_full_save): Update.
5151 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
5152 * procfs.c (insert_dbx_link_bpt_in_file): Update.
5153 * minidebug.c (find_separate_debug_file_in_section): Return
5155 * machoread.c (macho_add_oso_symfile): Change abfd to
5157 (macho_symfile_read_all_oso): Update.
5158 (macho_check_dsym): Return gdb_bfd_ref_ptr.
5159 (macho_symfile_read): Update.
5160 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
5161 (jit_bfd_try_read_symtab): Update.
5162 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5163 (gdb_bfd_openw, gdb_bfd_openr_iovec)
5164 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
5166 (gdb_bfd_ref_policy): New struct.
5167 (gdb_bfd_ref_ptr): New typedef.
5168 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5169 (gdb_bfd_openw, gdb_bfd_openr_iovec)
5170 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
5172 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
5173 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
5174 (gcore_command): Update.
5175 * exec.c (exec_file_attach): Update.
5176 * elfread.c (elf_symfile_read): Update.
5177 * dwarf2read.c (dwarf2_get_dwz_file): Update.
5178 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
5179 (open_and_init_dwo_file): Update.
5180 (open_dwp_file): Return gdb_bfd_ref_ptr.
5181 (open_and_init_dwp_file): Update.
5182 * corelow.c (core_open): Update.
5183 * compile/compile-object-load.c (compile_object_load): Update.
5184 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
5185 * coffread.c (coff_symfile_read): Update.
5186 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
5187 gdb_bfd_ref_ptr. Rename.
5188 (dump_bfd_file, restore_command): Update.
5189 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
5190 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
5191 (find_separate_debug_file_by_buildid): Update.
5193 2017-01-10 Tom Tromey <tom@tromey.com>
5195 * common/gdb_ref_ptr.h: New file.
5196 * python/py-ref.h (struct gdbpy_ref_policy): New.
5197 (gdbpy_ref): Now a typedef.
5199 2017-01-10 Tom Tromey <tom@tromey.com>
5201 * utils.h (make_cleanup_htab_delete): Don't declare.
5202 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
5204 * linespec.c (decode_compound_collector): Add constructor,
5206 (lookup_prefix_sym): Remove cleanup.
5207 (symtab_collector): Add constructor, destructor.
5208 (collect_symtabs_from_filename): Remove cleanup.
5209 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
5210 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5212 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
5213 * dwarf2read.c (dw2_expand_symtabs_matching)
5214 (dw2_map_symbol_filenames, dwarf_decode_macros)
5215 (write_psymtabs_to_index): Use htab_up.
5216 * dwarf2loc.c (func_verify_no_selftailcall)
5217 (call_site_find_chain_1, func_verify_no_selftailcall)
5218 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
5219 std::vector, gdb::unique_xmalloc_ptr.
5220 (call_sitep): Remove typedef.
5221 (dwarf2_locexpr_baton_eval): Remove unused variable.
5223 2017-01-10 Tom Tromey <tom@tromey.com>
5225 * python/python-internal.h (make_cleanup_py_decref)
5226 (make_cleanup_py_xdecref): Don't declare.
5227 * python/py-utils.c (py_decref, make_cleanup_py_decref)
5228 (py_xdecref, make_cleanup_py_xdecref): Remove.
5230 2017-01-10 Tom Tromey <tom@tromey.com>
5232 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
5233 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
5235 2017-01-10 Tom Tromey <tom@tromey.com>
5237 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
5239 2017-01-10 Tom Tromey <tom@tromey.com>
5241 * python/py-utils.c (unicode_to_encoded_string)
5242 (python_string_to_target_string)
5243 (python_string_to_target_python_string)
5244 (python_string_to_host_string, gdbpy_obj_to_string)
5245 (get_addr_from_python): Use gdbpy_ref.
5247 2017-01-10 Tom Tromey <tom@tromey.com>
5249 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
5252 2017-01-10 Tom Tromey <tom@tromey.com>
5254 * python/python.c (eval_python_command, gdbpy_decode_line)
5255 (gdbpy_run_events, gdbpy_start_type_printers)
5256 (gdbpy_apply_type_printers): Use gdbpy_ref.
5258 2017-01-10 Tom Tromey <tom@tromey.com>
5260 * python/py-param.c (get_doc_string, compute_enum_values): Use
5263 2017-01-10 Tom Tromey <tom@tromey.com>
5265 * python/py-inferior.c (find_thread_object, build_inferior_list):
5268 2017-01-10 Tom Tromey <tom@tromey.com>
5270 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
5272 2017-01-10 Tom Tromey <tom@tromey.com>
5274 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
5277 2017-01-10 Tom Tromey <tom@tromey.com>
5279 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
5281 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
5284 2017-01-10 Tom Tromey <tom@tromey.com>
5286 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
5289 2017-01-10 Tom Tromey <tom@tromey.com>
5291 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
5292 decref results of PyArg_ParseTupleAndKeywords.
5294 2017-01-10 Tom Tromey <tom@tromey.com>
5296 * python/python.c (python_run_simple_file): Use
5297 unique_xmalloc_ptr, gdbpy_ref.
5299 2017-01-10 Tom Tromey <tom@tromey.com>
5301 * python/py-prettyprint.c (print_stack_unless_memory_error)
5302 (print_string_repr, print_children): Use gdbpy_ref.
5303 (dummy_python_frame): New class.
5304 (dummy_python_frame::dummy_python_frame): Rename from
5305 push_dummy_python_frame.
5306 (py_restore_tstate): Remove.
5308 2017-01-10 Tom Tromey <tom@tromey.com>
5310 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
5312 2017-01-10 Tom Tromey <tom@tromey.com>
5314 * python/python.c (ensure_python_env, restore_python_env):
5316 * python/python-internal.h (ensure_python_env): Don't declare.
5317 * varobj.h (varobj_ensure_python_env): Don't declare.
5318 * varobj.c (varobj_ensure_python_env): Remove.
5320 2017-01-10 Tom Tromey <tom@tromey.com>
5322 * varobj.c (varobj_value_get_print_value): Use
5325 2017-01-10 Tom Tromey <tom@tromey.com>
5327 * python/py-prettyprint.c (print_string_repr, print_children):
5329 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
5331 * varobj.c (varobj_value_get_print_value): Update.
5332 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
5334 2017-01-10 Tom Tromey <tom@tromey.com>
5336 * varobj.c (varobj_get_display_hint)
5337 (dynamic_varobj_has_child_method, install_new_value_visualizer)
5338 (varobj_set_visualizer, free_variable): Use
5341 2017-01-10 Tom Tromey <tom@tromey.com>
5343 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
5344 (do_finish_initialization): New function. Use gdbpy_ref.
5345 (gdbpy_finish_initialization): Use gdbpy_enter. Call
5346 do_finish_initialization.
5348 2017-01-10 Tom Tromey <tom@tromey.com>
5350 * python/py-param.c (get_set_value, get_show_value): Use
5351 gdbpy_enter, gdbpy_ref.
5353 2017-01-10 Tom Tromey <tom@tromey.com>
5355 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
5357 2017-01-10 Tom Tromey <tom@tromey.com>
5359 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
5361 2017-01-10 Tom Tromey <tom@tromey.com>
5363 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
5364 Use gdbpy_enter_varobj.
5366 2017-01-10 Tom Tromey <tom@tromey.com>
5368 * varobj.c (gdbpy_enter_varobj): New constructor.
5369 * python/python-internal.h (gdbpy_enter_varobj): New class.
5370 * python/py-varobj.c (py_varobj_get_iterator): Use
5373 2017-01-10 Tom Tromey <tom@tromey.com>
5375 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
5376 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
5377 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
5378 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
5380 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
5382 2017-01-10 Tom Tromey <tom@tromey.com>
5384 * python/py-xmethods.c (invoke_match_method): Use
5387 2017-01-10 Tom Tromey <tom@tromey.com>
5389 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
5390 gdbpy_enter, gdbpy_ref.
5392 2017-01-10 Tom Tromey <tom@tromey.com>
5394 * python/python.c (python_interactive_command): Use gdbpy_enter.
5396 2017-01-10 Tom Tromey <tom@tromey.com>
5398 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
5401 2017-01-10 Tom Tromey <tom@tromey.com>
5403 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
5404 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
5406 2017-01-10 Tom Tromey <tom@tromey.com>
5408 * utils.h (htab_deleter): New struct.
5409 (htab_up): New typedef.
5410 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
5411 gdbpy_enter, gdbpy_ref, htab_up.
5413 2017-01-10 Tom Tromey <tom@tromey.com>
5415 * python/py-unwind.c (pending_frame_invalidate): Remove.
5416 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
5418 2017-01-10 Tom Tromey <tom@tromey.com>
5420 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
5421 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
5423 2017-01-10 Tom Tromey <tom@tromey.com>
5425 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
5427 2017-01-10 Tom Tromey <tom@tromey.com>
5429 * python/python.c (gdbpy_eval_from_control_command)
5430 (gdbpy_source_script, gdbpy_run_events)
5431 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
5432 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
5435 2017-01-10 Tom Tromey <tom@tromey.com>
5437 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
5439 2017-01-10 Tom Tromey <tom@tromey.com>
5441 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
5443 2017-01-10 Tom Tromey <tom@tromey.com>
5445 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
5446 (python_on_inferior_call_pre, python_on_inferior_call_post)
5447 (python_on_memory_change, python_on_register_change)
5448 (python_inferior_exit, python_new_objfile, add_thread_object)
5449 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
5451 2017-01-10 Tom Tromey <tom@tromey.com>
5453 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
5454 (bpfinishpy_handle_exit): Use gdbpy_enter.
5456 2017-01-10 Tom Tromey <tom@tromey.com>
5458 * python/py-cmd.c (cmdpy_destroyer)
5459 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
5462 2017-01-10 Tom Tromey <tom@tromey.com>
5464 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
5466 (gdbpy_breakpoint_has_cond): Likewise.
5468 2017-01-10 Tom Tromey <tom@tromey.com>
5470 * python/python.c (gdbpy_enter): New constructor.
5471 (~gdbpy_enter): New destructor.
5472 (restore_python_env, ensure_python_env): Rewrite.
5473 * python/python-internal.h (gdbpy_enter): New class.
5475 2017-01-10 Tom Tromey <tom@tromey.com>
5477 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
5479 2017-01-10 Tom Tromey <tom@tromey.com>
5481 * python/py-value.c (value_has_field, get_field_flag)
5482 (get_field_type, valpy_getitem, convert_value_from_python): Use
5485 2017-01-10 Tom Tromey <tom@tromey.com>
5487 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
5490 2017-01-10 Tom Tromey <tom@tromey.com>
5492 * python/py-prettyprint.c (search_pp_list)
5493 (find_pretty_printer_from_objfiles)
5494 (find_pretty_printer_from_progspace)
5495 (find_pretty_printer_from_gdb, find_pretty_printer)
5496 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
5499 2017-01-10 Tom Tromey <tom@tromey.com>
5501 * python/py-param.c (call_doc_function): Use gdbpy_ref.
5503 2017-01-10 Tom Tromey <tom@tromey.com>
5505 * python/py-linetable.c (build_line_table_tuple_from_pcs)
5506 (ltpy_get_all_source_lines): Use gdbpy_ref.
5508 2017-01-10 Tom Tromey <tom@tromey.com>
5510 * python/py-framefilter.c (extract_sym, extract_value)
5511 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
5514 2017-01-10 Tom Tromey <tom@tromey.com>
5516 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
5518 2017-01-10 Tom Tromey <tom@tromey.com>
5520 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
5522 2017-01-10 Tom Tromey <tom@tromey.com>
5524 * python/py-function.c (convert_values_to_python, fnpy_init): Use
5527 2017-01-10 Tom Tromey <tom@tromey.com>
5529 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
5531 2017-01-10 Tom Tromey <tom@tromey.com>
5533 * python/py-type.c (convert_field, make_fielditem, typy_fields)
5534 (typy_range): Use gdbpy_ref.
5536 2017-01-10 Tom Tromey <tom@tromey.com>
5538 * python/py-threadevent.c (create_thread_event_object): Use
5540 * python/py-stopevent.c (create_stop_event_object): Simplify.
5541 (emit_stop_event): Use gdbpy_ref.
5542 * python/py-signalevent.c (create_signal_event_object): Use
5544 * python/py-newobjfileevent.c (create_new_objfile_event_object)
5545 (emit_new_objfile_event, create_clear_objfiles_event_object)
5546 (emit_clear_objfiles_event): Use gdbpy_ref.
5547 * python/py-infevents.c (create_inferior_call_event_object)
5548 (create_register_changed_event_object)
5549 (create_memory_changed_event_object, emit_inferior_call_event)
5550 (emit_memory_changed_event, emit_register_changed_event): Use
5552 * python/py-exitedevent.c (create_exited_event_object)
5553 (emit_exited_event): Use gdbpy_ref.
5554 * python/py-event.h (evpy_emit_event): Remove
5555 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
5556 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
5557 * python/py-continueevent.c (emit_continue_event): Use
5559 * python/py-breakpoint.c (gdbpy_breakpoint_created)
5560 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
5562 * python/py-bpevent.c (create_breakpoint_event_object): Use
5565 2017-01-10 Tom Tromey <tom@tromey.com>
5567 * python/py-ref.h: New file.
5569 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
5571 * cli-out.c (cli_ui_out::do_redirect): Change return type to
5573 * cli-out.h (cli_ui_out::do_redirect): Likewise.
5574 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
5575 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
5576 * ui-out.c (ui_out::redirect): Likewise.
5577 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
5578 * cli/cli-logging.c (set_logging_redirect): Update call site of
5580 (handle_redirections): Likewise.
5581 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
5582 * top.c (execute_command_to_string): Likewise.
5583 * utils.c (do_ui_out_redirect_pop): Likewise.
5585 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
5587 * stack.c (_initialize_stack): Update "frame" command help message.
5589 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
5591 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
5593 2017-01-06 Yao Qi <yao.qi@linaro.org>
5595 * x86-linux-nat.h: Include gdb_proc_service.h.
5597 2017-01-06 Yao Qi <yao.qi@linaro.org>
5599 * ser-base.h: Include serial.h.
5601 2017-01-06 Yao Qi <yao.qi@linaro.org>
5603 * ppc-linux-tdep.h: Include ppc-tdep.h.
5605 2017-01-06 Yao Qi <yao.qi@linaro.org>
5607 * nat/amd64-linux-siginfo.h: Include signal.h.
5609 2017-01-06 Yao Qi <yao.qi@linaro.org>
5611 * nat/aarch64-linux-hw-point.h: Include break-common.h.
5613 2017-01-06 Yao Qi <yao.qi@linaro.org>
5615 * mi/mi-parse.h: Include mi-cmds.h.
5617 2017-01-06 Yao Qi <yao.qi@linaro.org>
5619 * inf-loop.c: Don't include "target.h".
5620 * inf-loop.h: Include it here.
5622 2017-01-06 Yao Qi <yao.qi@linaro.org>
5624 * dfp.h: Include "dboulest.h" and "expression.h".
5626 2017-01-06 Yao Qi <yao.qi@linaro.org>
5628 * ax-gdb.h: Include "ax.h".
5630 2017-01-06 Yao Qi <yao.qi@linaro.org>
5632 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
5633 with nat/gdb_ptrace.h.
5635 2017-01-05 Yao Qi <yao.qi@linaro.org>
5637 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
5639 (mips64_fbsd_sigframe_init): Likewise.
5641 2017-01-04 John Baldwin <jhb@FreeBSD.org>
5643 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
5644 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
5646 2017-01-04 John Baldwin <jhb@FreeBSD.org>
5648 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5649 * NEWS: Mention new FreeBSD/mips native configuration.
5650 * config/mips/fbsd.mh: New file.
5651 * configure.host: Add mips*-*-freebsd*.
5652 * mips-fbsd-nat.c: New file.
5654 2017-01-04 John Baldwin <jhb@FreeBSD.org>
5656 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
5657 (ALLDEPFILES): Add mips-fbsd-tdep.c.
5658 * NEWS: Mention new FreeBSD/mips target.
5659 * configure.tgt: Add mips*-*-freebsd*.
5660 * mips-fbsd-tdep.c: New file.
5661 * mips-fbsd-tdep.h: New file.
5663 2017-01-04 Yao Qi <yao.qi@linaro.org>
5665 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
5666 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
5668 2017-01-01 Joel Brobecker <brobecker@adacore.com>
5670 Update copyright year range in all GDB files.
5672 2017-01-01 Joel Brobecker <brobecker@adacore.com>
5674 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
5676 For older changes see ChangeLog-2016.
5682 version-control: never