1 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
3 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
5 2017-03-29 Yao Qi <yao.qi@linaro.org>
7 * gdbthread.h (struct thread_info): Declare constructor and
8 destructor. Add some in-class member initializers.
9 * thread.c (free_thread): Remove.
10 (init_thread_list): Call delete instead of free_thread.
11 (new_thread): Call thread_info constructor.
12 (thread_info::thread_info): New function.
13 (thread_info::~thread_info): New function.
14 (delete_thread_1): Call delete instead of free_thread.
15 (make_cleanup_restore_current_thread): Move tp and frame to
18 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
20 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
21 (arc_skip_prologue): Likewise.
22 (arc_make_frame_cache): Likewise.
23 (arc_pv_get_operand): New function.
24 (arc_is_in_prologue): Likewise.
25 (arc_analyze_prologue): Likewise.
26 (arc_print_frame_cache): Likewise.
27 (MAX_PROLOGUE_LENGTH): New constant.
29 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
31 * configure.tgt: Add arc-insn.o.
32 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
33 (dump_arc_instruction_command): New function.
34 (arc_fprintf_disasm): Likewise.
35 (arc_disassemble_info): Likewise.
36 (arc_insn_get_operand_value): Likewise.
37 (arc_insn_get_operand_value_signed): Likewise.
38 (arc_insn_get_memory_base_reg): Likewise.
39 (arc_insn_get_memory_offset): Likewise.
40 (arc_insn_get_branch_target): Likewise.
41 (arc_insn_dump): Likewise.
42 (arc_insn_get_linear_next_pc): Likewise.
43 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
44 (arc_disassemble_info): Likewise.
45 (arc_insn_get_branch_target): Likewise.
46 (arc_insn_get_linear_next_pc): Likewise.
47 * NEWS: Mention new "maint print arc arc-instruction".
49 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
51 * arc-tdep (maintenance_print_arc_list): New variable.
52 (maintenance_print_arc_command): New function.
54 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
56 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
57 Add "limm" and "reserved".
58 (arc_cannot_fetch_register, arc_cannot_store_register): Add
59 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
60 * arc-tdep.h (arc_regnum): Likewise.
62 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
64 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
65 for THREADPTR register.
66 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
68 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
69 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
70 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
72 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
74 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
75 registers above gdbarch_num_regs (gdbarch) as privileged in
78 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
80 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
81 for a single specified register or for all registers in
82 a0_base..a0_base + C0_NREGS range.
83 (supply_gregset_reg): Call regcache_raw_supply for a single
84 specified register or for all registers in a0_base..a0_base +
87 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
89 * arch/xtensa.h (C0_NREGS): Add definition.
90 * xtensa-tdep.c (C0_NREGS): Remove definition.
92 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
94 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
95 Drop xtensa_default_isa initialization.
96 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
98 2017-03-27 Pedro Alves <palves@redhat.com>
100 * dwarf2read.c (file_entry) <dir_index>: Add comment.
101 (file_entry::include_dir): New method.
102 (line_header::include_dir_at, line_header::file_name_at): New
104 (setup_type_unit_groups, setup_type_unit_groups)
105 (psymtab_include_file_name): Simplify using the new methods.
106 (lnp_state_machine) <the_line_header>: New field.
108 (lnp_state_machine::current_file): New method.
109 (dwarf_record_line): Simplify using the new methods.
110 (init_lnp_state_machine): Initialize the "the_line_header" field.
111 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
112 Simplify using the new methods.
114 2017-03-27 Pedro Alves <palves@redhat.com>
116 * cp-name-parser.y (make_empty): Delete.
117 (demangler_special, nested_name, ptr_operator, array_indicator)
118 (direct_declarator, declarator_1): Use fill_comp instead of
121 2017-03-27 Pedro Alves <palves@redhat.com>
123 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
125 * solib-target.c (library_list_start_list): Print "string" not
127 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
130 2017-03-27 Pedro Alves <palves@redhat.com>
132 * dwarf2read.c (struct file_and_directory): New.
133 (dwarf2_get_dwz_file): Adjust to use std::string.
134 (dw2_get_file_names_reader): Adjust to use file_and_directory.
135 (find_file_and_directory): Adjust to return a file_and_directory
137 (read_file_scope): Adjust to use file_and_directory. Remove
138 make_cleanup/do_cleanups calls.
139 (open_and_init_dwp_file): Adjust to use std::string. Remove
140 make_cleanup/do_cleanups calls.
141 * python/python.c (do_start_initialization): Adjust to ldirname
142 returning a std::string.
143 * utils.c (ldirname): Now returns a std::string.
144 * utils.h (ldirname): Change return type to std::string.
145 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
146 returning a std::string.
147 * xml-tdesc.c (file_read_description_xml): Likewise.
149 2017-03-24 Alan Hayward <alan.hayward@arm.com>
151 * regcache.c (regcache_debug_print_register): New function.
152 * regcache.h (regcache_debug_print_register): New declaration.
153 * target.c (debug_print_register): Remove.
154 (target_fetch_registers): Call regcache_debug_print_register.
155 (target_store_registers): Likewise.
157 2017-03-24 Pádraig Brady <pbrady@fb.com>
159 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
160 reference beyond the 'lh->include_dirs' array before accessing to
162 (psymtab_include_file_name): Likewise.
163 (dwarf_decode_lines_1): Likewise.
164 (dwarf_decode_lines): Likewise.
165 (file_file_name): Likewise.
167 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
169 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
171 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
172 ps_lsetfpregs): Likewise.
173 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
174 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
175 ps_lsetfpregs): Likewise.
176 * target.c (target_fetch_registers, target_store_registers):
179 2017-03-23 Alan Hayward <alan.hayward@arm.com>
181 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
183 2017-03-23 Yao Qi <yao.qi@linaro.org>
185 * aarch64-tdep.c (aarch64_process_record_test): Declare.
186 (_initialize_aarch64_tdep): Register it.
187 (aarch64_record_load_store): Handle PRFM instruction.
188 (aarch64_process_record_test): New function.
190 2017-03-23 Yao Qi <yao.qi@linaro.org>
192 * aarch64-tdep.c (aarch64_record_load_store): Fix code
195 2017-03-23 Yao Qi <yao.qi@linaro.org>
197 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
199 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
201 python/python.c (do_start_initialization): Fix memory leak.
203 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
205 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
206 using get_ptrace_pid.
207 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
209 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
210 inferior_ptid instead of pid.
212 2017-03-22 Yao Qi <yao.qi@linaro.org>
214 * aarch64-tdep.c: Wrap locally used classes in anonymous
216 * arm-tdep.c: Likewise.
217 * linespec.c: Likewise.
218 * ui-out.c: Likewise.
220 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
223 * python/lib/gdb/printer/bound_registers.py: Import sys.
225 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
227 * windows-nat.c (do_windows_fetch_inferior_registers): Add
228 windows_thread_info parameter and use it instead of
230 (windows_fetch_inferior_registers): Don't set current_thread,
231 pass the thread to do_windows_fetch_inferior_registers. Use
232 ptid from regcache instead of inferior_ptid.
233 (do_windows_store_inferior_registers): Add windows_thread_info
234 parameter and use it instead of current_thread.
235 (windows_store_inferior_registers): Don't set current_thread,
236 pass the thread to do_windows_store_inferior_registers. Use
237 ptid from regcache instead of inferior_ptid.
239 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
241 * ser-mingw.c (ser_windows_raw): Remove reference to
242 struct serial::current_timeout.
244 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
247 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
248 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
249 (sparc64_fsr_type): Fix %fsr decoding.
251 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
253 * python/py-record-btrace.c (btpy_insn_data): Change return type
256 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
258 * spu-linux-nat.c (spu_fetch_inferior_registers,
259 spu_store_inferior_registers): Use ptid from regcache, set and
260 restore inferior_ptid.
261 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
264 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
266 * i386-linux-nat.c (fetch_register, store_register,
267 i386_linux_fetch_inferior_registers,
268 i386_linux_store_inferior_registers): Use ptid from regcache.
269 * ia64-linux-nat.c (ia64_linux_fetch_register,
270 ia64_linux_store_register): Likewise.
271 * inf-ptrace.c (inf_ptrace_fetch_register,
272 inf_ptrace_store_register): Likewise.
273 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
274 m32r_linux_store_inferior_registers): Likewise.
275 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
276 m68kbsd_store_inferior_registers): Likewise.
277 * m68k-linux-nat.c (fetch_register, store_register,
278 m68k_linux_fetch_inferior_registers,
279 m68k_linux_store_inferior_registers): Likewise.
280 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
281 m88kbsd_store_inferior_registers): Likewise.
282 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
283 mips_fbsd_store_inferior_registers): Likewise.
284 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
285 mips64_linux_regsets_store_registers): Likewise.
286 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
287 mipsnbsd_store_inferior_registers): Likewise.
288 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
289 mips64obsd_store_inferior_registers): Likewise.
290 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
292 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
293 ppcfbsd_store_inferior_registers): Likewise.
294 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
295 ppc_linux_store_inferior_registers): Likewise.
296 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
297 ppcnbsd_store_inferior_registers): Likewise.
298 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
299 ppcobsd_store_registers): Likewise.
300 * procfs.c (procfs_fetch_registers, procfs_store_registers):
302 * ravenscar-thread.c (ravenscar_fetch_registers,
303 ravenscar_store_registers, ravenscar_prepare_to_store):
305 * record-btrace.c (record_btrace_fetch_registers,
306 record_btrace_store_registers, record_btrace_prepare_to_store):
308 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
309 Lookup inferior using ptid from regcache, instead of
311 * remote.c (remote_fetch_registers, remote_store_registers): Use
313 * rs6000-nat.c (fetch_register, store_register): Likewise.
314 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
315 s390_linux_store_inferior_registers): Likewise.
316 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
317 shnbsd_store_inferior_registers): Likewise.
318 * sol-thread.c (sol_thread_fetch_registers,
319 sol_thread_store_registers): Likewise.
320 * sparc-nat.c (sparc_fetch_inferior_registers,
321 sparc_store_inferior_registers): Likewise.
322 * tilegx-linux-nat.c (fetch_inferior_registers,
323 store_inferior_registers): Likewise.
324 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
325 vaxbsd_store_inferior_registers): Likewise.
326 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
327 store_xtregs): Likewise.
329 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
332 * NEWS: Mention support for rvalue references in GDB and python.
333 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
334 supports both lvalue and rvalue references.
336 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
339 * gdbtypes.c (rank_one_type): Implement overloading
340 resolution rules regarding rvalue references.
342 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
345 * aarch64-tdep.c (aarch64_type_align)
346 (aarch64_extract_return_value, aarch64_store_return_value): Change
347 lvalue reference type checks to general reference type checks.
348 * amd64-tdep.c (amd64_classify): Likewise.
349 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
351 * arm-tdep.c (arm_type_align, arm_extract_return_value)
352 (arm_store_return_value): Likewise.
353 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
354 * c-typeprint.c (c_print_type): Likewise.
355 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
356 (cplus_number_of_children, cplus_describe_child): Likewise.
357 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
358 * completer.c (expression_completer): Likewise.
359 * cp-support.c (make_symbol_overload_list_adl_namespace):
361 * darwin-nat-info.c (info_mach_region_command): Likewise.
362 * dwarf2loc.c (entry_data_value_coerce_ref)
363 (value_of_dwarf_reg_entry): Likewise.
364 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
365 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
367 * findvar.c (extract_typed_address, store_typed_address):
369 * gdbtypes.c (rank_one_type): Likewise.
370 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
371 * infcall.c (value_arg_coerce): Likewise.
372 * language.c (pointer_type): Likewise.
373 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
375 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
376 * mn10300-tdep.c (mn10300_type_align): Likewise.
377 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
378 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
379 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
381 * printcmd.c (print_formatted, x_command): Likewise.
382 * python/py-type.c (typy_get_composite, typy_template_argument):
384 * python/py-value.c (valpy_referenced_value)
385 (valpy_get_dynamic_type, value_has_field): Likewise.
386 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
387 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
388 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
389 * spu-tdep.c (spu_scalar_value_p): Likewise.
390 * symtab.c (lookup_symbol_aux): Likewise.
391 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
392 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
394 * valops.c (value_cast_pointers, value_cast)
395 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
396 (value_struct_elt, value_struct_elt_bitpos)
397 (value_find_oload_method_list, find_overload_match)
398 (value_rtti_indirect_type): Likewise.
399 * valprint.c (val_print_scalar_type_p, generic_val_print):
401 * value.c (value_actual_type, value_as_address, unpack_long)
402 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
403 (coerce_ref): Likewise.
404 * varobj.c (varobj_get_value_type): Likewise.
406 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
409 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
411 * python/lib/gdb/command/explore.py: Support exploring values
412 of rvalue reference types.
413 * python/lib/gdb/types.py: Implement get_basic_type() for
414 rvalue reference types.
415 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
417 * python/py-value.c (valpy_getitem): Add an rvalue reference
419 (valpy_reference_value): Add new parameter "refcode".
420 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
421 New wrappers for valpy_reference_value().
422 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
423 (gdbpy_invoke_xmethod): Likewise.
425 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
428 * dwarf2read.c (process_die, read_type_die_1): Handle the
429 DW_TAG_rvalue_reference_type DIE.
430 (read_tag_reference_type): Add new parameter "refcode".
432 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
435 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
436 (c_type_print_modifier, c_type_print_varspec_suffix)
437 (c_type_print_base): Support printing rvalue reference types.
438 * c-valprint.c (c_val_print, c_value_print): Support printing
439 rvalue reference values.
441 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
444 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
446 * cp-support.c (replace_typedefs): Handle
447 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
448 * python/py-type.c (typy_lookup_type): Likewise.
450 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
453 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
454 * parse.c (insert_type): Change assert statement.
455 (follow_types): Handle rvalue reference types.
456 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
459 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
462 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
463 value_ref() interface.
464 * c-valprint.c (c_value_print): Likewise.
465 * infcall.c (value_arg_coerce): Likewise.
466 * python/py-value.c (valpy_reference_value): Likewise.
467 * valops.c (value_cast, value_reinterpret_cast)
468 (value_dynamic_cast, typecmp): Likewise.
469 (value_ref): Parameterize by kind of return value reference type.
470 * value.h (value_ref): Add new parameter "refcode".
472 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
475 * dwarf2read.c (read_tag_reference_type): Use
476 lookup_lvalue_reference_type() instead of lookup_reference_type().
477 * eval.c (evaluate_subexp_standard): Likewise.
479 * gdbtypes.c (make_reference_type, lookup_reference_type):
480 Generalize with rvalue reference types.
481 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
482 convenience wrappers for lookup_reference_type().
483 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
484 reference kind parameter.
485 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
486 wrappers for lookup_reference_type().
487 * guile/scm-type.c (gdbscm_type_reference): Use
488 lookup_lvalue_reference_type() instead of lookup_reference_type().
489 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
490 * parse.c (follow_types): Likewise.
491 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
492 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
494 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
495 (gdbpy_invoke_xmethod): Likewise.
496 * stabsread.c: Provide extra argument to make_reference_type()
498 * valops.c (value_ref, value_rtti_indirect_type): Use
499 lookup_lvalue_reference_type() instead of lookup_reference_type().
501 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
504 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
505 (TYPE_IS_REFERENCE): New macro.
506 (struct type): Add rvalue_reference_type field.
507 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
509 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
511 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
512 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
513 New function definition.
514 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
515 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
516 New function declaration.
517 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
518 * mi/mi-interp.h: New file.
519 * solib.c (info_sharedlibrary_command): Replace for loop with
521 * solib.h (update_solib_list): New function declaration.
522 (so_list_head): Move macro.
523 * solist.h (ALL_SO_LIBS): New macro.
525 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
527 * infcmd.c (post_create_inferior): Remove unused argument in
529 * remote.c (remote_start_remote): Likewise.
530 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
531 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
532 (enable_break): Likewise.
533 * solib.c (update_solib_list): Remove unused target argument
534 and its documentation.
535 (solib_add): Remove unused target argument. Remove unused
536 argument in call to update_solib_list.
537 (info_sharedlibrary_command): Remove unused argument in call
538 to update_solib_list.
539 (sharedlibrary_command): Remove unused argument in call to
541 (handle_solib_event): Likewise.
542 (reload_shared_libraries): Likewise.
543 * solib.h (solib_add): Remove unused target argument.
545 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
547 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
548 (s390_displaced_step_fixup): Cover relative branches with the
549 default fixup handling. This fixes lack of support for some
550 relative branch instructions.
552 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
554 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
557 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
559 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
560 i386_darwin_store_inferior_registers): Use ptid from regcache.
562 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
564 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
565 i386bsd_store_inferior_registers): Use ptid from regcache.
567 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
569 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
570 hppaobsd_store_registers): Use ptid from regcache.
572 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
574 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
575 hppanbsd_store_registers): Use ptid from regcache.
577 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
579 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
580 from regcache. Use get_ptrace_pid.
582 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
584 * corelow.c (get_core_register_section): Use ptid from regcache,
587 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
589 * bsd-uthread.c (bsd_uthread_fetch_registers,
590 bsd_uthread_store_registers): Use ptid from regcache, set and
591 restore inferior_ptid.
593 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
595 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
596 fetch_fp_regs, store_register, store_regs, store_fp_register,
597 store_fp_regs): Use ptid from regcache.
599 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
601 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
602 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
603 store_vfp_regs): Use ptid from regcache.
605 2017-03-17 Pedro Alves <palves@redhat.com>
608 * ser-base.c (ser_base_wait_for): Add comment.
609 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
611 * ser-unix.c (hardwire_raw): Remove reference to
612 scb->current_timeout.
613 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
614 (hardwire_ops): Install ser_base_readchar instead of
616 * serial.h (struct serial) <current_timeout, timeout_remaining>:
619 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
622 * python/lib/gdb/printer/bound_registers.py: Add support for
625 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
627 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
628 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
629 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
630 byte_offset to subobj_byte_offset. Fix the handling of
631 DWARF_VALUE_STACK on big-endian targets when coming via an
633 (dwarf2_evaluate_loc_desc): Adjust call to
634 dwarf2_evaluate_loc_desc_full.
635 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
636 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
638 2017-03-16 Yao Qi <yao.qi@linaro.org>
640 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
641 and REVSH instructions.
643 2017-03-16 Yao Qi <yao.qi@linaro.org>
645 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
646 (arm_record_test): Declare.
647 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
648 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
649 align with the manual.
650 (thumb_record_misc): Adjust the code order to align with the
652 (thumb2_record_decode_insn_handler): Fix instruction matching.
653 (instruction_reader_thumb): New class.
654 (arm_record_test): New function.
656 2017-03-16 Yao Qi <yao.qi@linaro.org>
658 * arm-tdep.c (abstract_memory_reader): New class.
659 (instruction_reader): New class.
660 (extract_arm_insn): Add argument 'reader'. Callers updated.
661 (decode_insn): Likewise.
663 2017-03-16 Doug Evans <dje@google.com>
665 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
666 member. Change type of TYPE member to SCM. All uses updated.
667 (lsscm_make_lazy_string_smob): Add assert.
668 (lsscm_make_lazy_string): Flag bad length values.
669 (lsscm_elt_type): New function.
670 (gdbscm_lazy_string_to_value): Rewrite to use
671 lsscm_safe_lazy_string_to_value.
672 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
673 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
674 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
676 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
677 * guile/scm-type.c (tyscm_scm_to_type): New function.
679 2017-03-15 Doug Evans <dje@google.com>
681 PR python/17728, python/18439, python/18779
682 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
683 member. Change type of TYPE member to PyObject *. All uses updated.
684 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
685 (gdbpy_create_lazy_string_object): Flag bad length values.
686 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
687 Handle typedefs in incoming type.
688 (stpy_lazy_string_elt_type): New function.
689 (gdbpy_extract_lazy_string): Call it.
690 * python/py-value.c (valpy_lazy_string): Flag bad length values.
691 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
692 typedefs in incoming type.
694 2017-03-16 Doug Evans <dje@google.com>
696 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
697 * guile/scm-type.c (tyscm_scm_to_type): New function.
699 2017-03-16 Jiong Wang <jiong.wang@arm.com>
701 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
702 "ULONGEST" for "skip".
704 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
707 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
708 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
709 (inf_ptrace_peek_poke): ...here. New function. Now also loop
710 over ptrace peek/poke until end of buffer or error.
712 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
714 * parse.c (length_of_subexp): Make static.
715 * parser-defs.h (length_of_subexp): Remove.
717 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
719 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
722 2017-03-14 Pedro Alves <palves@redhat.com>
724 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
725 (main): Use std::unique_ptr. Remove calls to
726 cp_demangled_name_parse_free.
728 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
730 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
731 alphabsd_store_inferior_registers): Use regcache->ptid instead
734 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
736 * aix-thread.c (aix_thread_fetch_registers,
737 aix_thread_store_registers): Use regcache->ptid instead of
740 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
742 * aarch64-linux-nat.c (fetch_gregs_from_thread,
743 store_gregs_to_thread, fetch_fpregs_from_thread,
744 store_fpregs_to_thread): Use regcache->ptid instead of
747 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
749 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
750 amd64_linux_fetch_inferior_registers): Use regcache->ptid
751 instead of inferior_ptid.
753 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
755 * target.c (target_fetch_registers, target_store_registers): Add
758 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
760 * regcache.h (regcache_get_ptid): New function.
761 * regcache.c (regcache_get_ptid): New function.
763 2017-03-13 Mark Wielaard <mark@klomp.org>
765 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
767 2017-03-10 Keith Seitz <keiths@redhat.com>
770 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
772 2017-03-08 Pedro Alves <palves@redhat.com>
775 * infrun.c (start_step_over, do_target_resume, resume)
776 (restart_threads): Assert we're not resuming a thread that is
778 (infrun_thread_stop_requested_callback): Delete.
779 (infrun_thread_stop_requested): If the thread is internally
780 stopped, queue a pending stop event and clear the thread's
782 (handle_stop_requested): New function.
783 (handle_syscall_event, handle_inferior_event_1): Use
784 handle_stop_requested.
785 (handle_stop_requested): New function.
786 (handle_signal_stop): Set the thread's stop_signal here instead of
788 (finish_step_over): Clear step over info unconditionally.
789 (handle_signal_stop): If the user had interrupted the event
790 thread, consider the stop a random signal.
791 (handle_signal_stop) <signal arrived while stepping over
792 breakpoint>: Don't restart threads here.
793 (stop_waiting): Don't clear step-over info here.
795 2017-03-08 Pedro Alves <palves@redhat.com>
798 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
799 goes to argument 2, not 1.
801 2017-03-08 Pedro Alves <palves@redhat.com>
804 * top.c (gdb_readline_wrapper): Avoid passing NULL to
806 (command_line_input): Add comment.
808 2017-03-08 Pedro Alves <palves@redhat.com>
811 * tui/tui-file.c (tui_file::write): New.
812 * tui/tui-file.h (tui_file): Override "write".
813 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
814 factored out from ...
815 (tui_puts): ... here.
816 (tui_putc): Use them.
817 (tui_write): New function.
818 * tui/tui-io.h (tui_write): Declare.
820 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
822 * Makefile.in (SFILES): Replace "environ.c" with
824 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
825 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
827 * common/environ.c: ... here.
828 * environ.h: Moved to...
829 * common/environ.h: ... here.
831 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
833 * gdbarch.sh (pstring_ptr): New static function.
834 (gdbarch_disassembler_options): Use it.
835 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
836 not valid_disassembler_option->name.
837 * gdbarch.c: Regenerate.
839 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
841 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
843 2017-03-07 Pedro Alves <palves@redhat.com>
845 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
847 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
849 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
850 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
851 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
852 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
854 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
856 * xtensa-linux-nat.c (fetch_gregs): Remove const.
858 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
860 * remote.c (remote_add_target_side_commands): Use range-based
863 2017-03-03 Yao Qi <yao.qi@linaro.org>
866 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
868 * valprint.c (common_val_print): Likewise.
870 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
872 * NEWS: Mention new set/show disassembler-options commands.
873 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
874 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
875 (prospective_options): New static variable.
876 (gdb_disassembler::gdb_disassembler): Initialize
877 m_di.disassembler_options.
878 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
879 (get_disassembler_options): New function.
880 (set_disassembler_options): Likewise.
881 (set_disassembler_options_sfunc): Likewise.
882 (show_disassembler_options_sfunc): Likewise.
883 (disassembler_options_completer): Likewise.
884 (_initialize_disasm): Likewise.
885 * disasm.h (get_disassembler_options): New prototype.
886 (set_disassembler_options): Likewise.
887 * gdbarch.sh (gdbarch_disassembler_options): New variable.
888 (gdbarch_verify_disassembler_options): Likewise.
889 * gdbarch.c: Regenerate.
890 * gdbarch.h: Likewise.
891 * arm-tdep.c (num_disassembly_options): Delete.
892 (set_disassembly_style): Likewise.
893 (arm_disassembler_options): New static variable.
894 (set_disassembly_style_sfunc): Convert short style name into long
895 option name. Call set_disassembler_options.
896 (show_disassembly_style_sfunc): New function.
897 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
898 set_gdbarch_verify_disassembler_options.
899 (_initialize_arm_tdep): Delete regnames variable and update callers.
900 (arm_disassembler_options): Initialize.
901 (disasm_options): New variable.
902 (num_disassembly_options): Rename from this...
903 (num_disassembly_styles): ...to this. Compute by scanning through
905 (valid_disassembly_styles): Initialize using disasm_options.
906 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
907 set_arm_regname_option.
908 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
909 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
910 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
911 set_gdbarch_verify_disassembler_options.
912 * s390-tdep.c (s390_disassembler_options): New static variable.
913 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
914 set_gdbarch_verify_disassembler_options.
916 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
918 * remote.c (remote_add_target_side_condition): Remove "struct"
919 keyword from range-based for loop.
921 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
923 * remote.c (remote_add_target_side_condition): Use range-based
924 for loop. Update comment.
926 2017-02-27 Yao Qi <yao.qi@linaro.org>
928 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
930 2017-02-26 Alan Hayward <alan.hayward@arm.com>
932 * regcache.c (regcache_raw_update): New function.
933 (regcache_raw_read): Move code to regcache_raw_update.
934 * regcache.h (regcache_raw_update): New declaration.
935 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
937 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
939 * dwarf2read.c (create_debug_type_hash_table): Initialize
940 header.signature and header.type_offset_in_tu.
942 2017-02-24 Pedro Alves <palves@redhat.com>
944 * symtab.c (make_file_symbol_completion_list_1): Use
945 add_symtab_completions.
947 2017-02-24 Alan Hayward <alan.hayward@arm.com>
949 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
951 2017-02-24 Alan Hayward <alan.hayward@arm.com>
953 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
954 I386_MAX_REGISTER_SIZE.
955 (i386_pseudo_register_write): Likewise.
956 (i386_process_record): Likewise.
957 * i387-tdep.c (i387_supply_xsave): Likewise.
958 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
959 (store_register): Likewise.
961 2017-02-23 Pedro Alves <palves@redhat.com>
963 * ada-lang.c: Include "common/function-view.h".
964 (ada_iterate_over_symbols): Adjust to use function_view as
966 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
967 (ada_make_symbol_completion_list): Use a lambda.
968 (ada_exc_search_name_matches): Delete.
969 (name_matches_regex): New.
970 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
971 * compile/compile-c-support.c: Include "common/function-view.h".
972 (print_one_macro): Change prototype to accept a ui_file pointer.
973 (write_macro_definitions): Use a lambda.
974 * dwarf2read.c: Include "common/function-view.h".
975 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
976 (dw2_expand_symtabs_matching): Adjust to use function_view as
978 * language.h: Include "common/function-view.h".
979 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
980 function_view as callback type.
981 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
982 * linespec.c: Include "common/function-view.h".
983 (collect_info::add_symbol): New method.
984 (struct symbol_and_data_callback, iterate_inline_only, struct
985 symbol_matcher_data, iterate_name_matcher): Delete.
986 (iterate_over_all_matching_symtabs): Adjust to use function_view
987 as callback type and lambdas.
988 (iterate_over_file_blocks): Adjust to use function_view as
990 (decode_compound_collector): Now a class with private fields.
991 (decode_compound_collector::release_symbols): New method.
992 (collect_one_symbol): Rename to...
993 (decode_compound_collector::operator()): ... this and adjust.
994 (lookup_prefix_sym): decode_compound_collector construction bits
995 move to decode_compound_collector ctor. Pass the
996 decode_compound_collector object directly as callback. Remove
997 cleanups and use decode_compound_collector::release_symbols
999 (symtab_collector): Now a class with private fields.
1000 (symtab_collector::release_symtabs): New method.
1001 (add_symtabs_to_list): Rename to...
1002 (symtab_collector::operator()): ... this and adjust.
1003 (collect_symtabs_from_filename): symtab_collector construction
1004 bits move to symtab_collector ctor. Pass the symtab_collector
1005 object directly as callback. Remove cleanups and use
1006 symtab_collector::release_symtabs instead.
1007 (collect_symbols): Delete.
1008 (add_matching_symbols_to_info): Use lambdas.
1009 * macrocmd.c (print_macro_callback): Delete.
1010 (info_macro_command): Use a lambda.
1011 (info_macros_command): Pass print_macro_definition as callable
1013 (print_one_macro): Remove 'ignore' parameter.
1014 (macro_list_command): Adjust.
1015 * macrotab.c (macro_for_each_data::fn): Now a function_view.
1016 (macro_for_each_data::user_data): Delete field.
1017 (foreach_macro): Adjust to call the function_view.
1018 (macro_for_each): Adjust to use function_view as callback type.
1019 (foreach_macro_in_scope): Adjust to call the function_view.
1020 (macro_for_each_in_scope): Adjust to use function_view as callback
1022 * macrotab.h: Include "common/function-view.h".
1023 (macro_callback_fn): Declare a prototype instead of a pointer.
1024 Remove "user_data" parameter.
1025 (macro_for_each, macro_for_each_in_scope): Adjust to use
1026 function_view as callback type.
1027 * psymtab.c (partial_map_expand_apply)
1028 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
1029 Adjust to use function_view as callback type and to return bool.
1030 (psym_expand_symtabs_matching): Adjust to use function_view as
1032 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
1033 to use function_view as callback type and to return bool.
1034 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
1036 * symfile.c (expand_symtabs_matching): Adjust to use function_view
1038 * symfile.h: Include "common/function-view.h".
1039 (expand_symtabs_file_matcher_ftype)
1040 (expand_symtabs_symbol_matcher_ftype)
1041 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
1043 (quick_symbol_functions::map_symtabs_matching_filename)
1044 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
1045 function_view as callback type and return bool.
1046 (expand_symtabs_matching): Adjust to use function_view as callback
1048 (maintenance_expand_name_matcher)
1049 (maintenance_expand_file_matcher): Delete.
1050 (maintenance_expand_symtabs): Use lambdas.
1051 * symtab.c (iterate_over_some_symtabs): Adjust to use
1052 function_view as callback types and return bool.
1053 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
1055 (lookup_symtab_callback): Delete.
1056 (lookup_symtab): Use a lambda.
1057 (iterate_over_symbols): Adjust to use function_view as callback
1059 (struct search_symbols_data, search_symbols_file_matches)
1060 (search_symbols_name_matches): Delete.
1061 (search_symbols): Use a pair of lambdas.
1062 (struct add_name_data, add_macro_name, symbol_completion_matcher)
1063 (symtab_expansion_callback): Delete.
1064 (default_make_symbol_completion_list_break_on_1): Use lambdas.
1065 * symtab.h: Include "common/function-view.h".
1066 (iterate_over_some_symtabs): Adjust to use function_view as
1067 callback type and return bool.
1068 (iterate_over_symtabs): Adjust to use function_view as callback
1070 (symbol_found_callback_ftype): Remove 'data' parameter and return
1072 (iterate_over_symbols): Adjust to use function_view as callback
1075 2017-02-23 Pedro Alves <palves@redhat.com>
1077 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
1078 (%.o) <unittests/%.c>: New pattern.
1079 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
1080 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
1081 * common/function-view.h: New file.
1082 * unittests/function-view-selftests.c: New file.
1083 * configure: Regenerate.
1085 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
1087 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
1089 * go32-nat.c (go32_thread_alive): Likewise.
1091 2017-02-23 Yao Qi <yao.qi@linaro.org>
1093 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
1096 2017-02-23 Yao Qi <yao.qi@linaro.org>
1098 * varobj.c (varobj_clear_saved_item): Use delete instead of
1100 (update_dynamic_varobj_children): Likewise.
1102 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1104 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
1106 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
1108 * common/enum-flags.h (enum_flags::enum_flags): Initialize
1109 m_enum_value to 0 in default constructor.
1111 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1113 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
1114 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
1115 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
1116 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
1117 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
1118 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
1119 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
1120 IS_STORE_CONDITIONAL_INSN.
1122 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1124 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
1126 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1128 * NEWS (Changes since GDB 7.12): Add DWARF-5.
1130 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1132 * dwarf2read.c (skip_one_die, read_attribute_value)
1133 (dwarf2_const_value_attr, dump_die_shallow)
1134 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1135 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
1137 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1139 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
1140 (dwarf_parse_macro_header): Accept DWARF version 5.
1141 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
1143 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1145 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
1147 * common/common-exceptions.h (enum errors): Likewise.
1148 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
1149 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
1150 (dwarf_expr_context::execute_stack_op): Likewise.
1151 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
1153 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
1154 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
1155 (show_entry_values_debug, call_site_to_target_addr)
1156 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
1157 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
1158 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
1159 (value_of_dwarf_block_entry, indirect_pieced_value)
1160 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
1161 (disassemble_dwarf_expression): Likewise.
1162 * dwarf2read.c (process_die, inherit_abstract_dies)
1163 (read_call_site_scope): Likewise.
1164 * gdbtypes.h (struct func_type, struct call_site_parameter)
1165 (struct call_site): Likewise.
1166 * stack.c (read_frame_arg): Likewise.
1167 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
1169 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1171 * defs.h (read_unsigned_leb128): New declaration.
1172 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
1173 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
1174 (dwarf2_find_location_expression): Call also
1175 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
1176 * dwarf2loc.h (dwarf2_version): New declaration.
1177 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
1179 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
1181 (struct dwop_section_names): Add loclists_dwo.
1182 (dwop_section_names): Add .debug_loclists.dwo.
1183 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
1184 (struct dwarf2_per_cu_data): Add dwarf_version.
1185 (struct dwo_sections): Add loclists.
1186 (struct attr_abbrev): Add implicit_const.
1187 (read_indirect_line_string): New declaration.
1188 (read_unsigned_leb128): Delete declaration.
1189 (rcuh_kind): New definition.
1190 (read_and_check_comp_unit_head): Change parameter
1191 is_debug_types_section to section_kind.
1192 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
1193 (read_comp_unit_head): Change parameter abfd to section, add parameter
1194 section_kind. Handle DWARF-5.
1195 (error_check_comp_unit_head): Accept also DWARF version 5.
1196 (read_and_check_comp_unit_head): Change parameter
1197 is_debug_types_section to section_kind.
1198 (read_and_check_type_unit_head): Delete function.
1199 (read_abbrev_offset): Handle DWARF-5.
1200 (create_debug_type_hash_table): Add parameter section_kind. Process
1201 only DW_UT_type. Use signature and type_offset_in_tu from struct
1203 (create_debug_types_hash_table): Update create_debug_type_hash_table
1205 (create_all_type_units): Call create_debug_type_hash_table.
1206 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
1207 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
1209 (skip_one_die): Handle DW_FORM_implicit_const.
1210 (dwarf2_rnglists_process): New function.
1211 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
1212 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
1213 (read_attribute_value): Handle DW_FORM_implicit_const,
1215 (read_attribute): Handle DW_FORM_implicit_const.
1216 (read_indirect_string_at_offset_from): New function from
1217 read_indirect_string_at_offset.
1218 (read_indirect_string_at_offset): Call
1219 read_indirect_string_at_offset_from.
1220 (read_indirect_line_string_at_offset): New function.
1221 (read_indirect_string): New function comment.
1222 (read_indirect_line_string): New function.
1223 (read_unsigned_leb128): Make it global.
1224 (dwarf2_string_attr): Handle DWARF-5.
1225 (add_include_dir_stub, read_formatted_entries): New functions.
1226 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
1228 (per_cu_header_read_in): Update read_comp_unit_head caller.
1229 (dwarf2_version): New function.
1230 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
1232 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
1235 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1237 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
1239 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1241 * dwarf2read.c (dwarf2_ranges_process): New function from
1243 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
1244 dwarf2_ranges_process.
1246 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1248 * dwarf2read.c (create_debug_type_hash_table): New function from
1249 create_debug_types_hash_table.
1250 (create_debug_types_hash_table): Call create_debug_type_hash_table.
1251 (create_all_type_units, open_and_init_dwo_file): Update
1252 create_debug_types_hash_table callers.
1254 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
1257 * fork-child.c (trace_start_error): Fix thinko. va_end should
1258 refer to 'ap', not 'args'.
1260 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
1261 Pedro Alves <palves@redhat.com>
1264 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
1266 * fork-child.c (trace_start_error): New function.
1267 (trace_start_error_with_name): Likewise.
1268 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
1269 * inf-ptrace.c (inf_ptrace_me): Likewise.
1270 * inferior.h (trace_start_error): New prototype.
1271 (trace_start_error_with_name): Likewise.
1273 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
1276 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
1277 NULL before using it.
1278 * symmisc.c (maintenance_print_symbols): Likewise.
1279 (maintenance_print_msymbols): Likewise.
1281 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
1283 * NEWS: Add record Python bindings entry.
1285 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
1287 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
1289 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
1290 * python/py-record-btrace.c, python/py-record-btrace.h,
1291 python/py-record-full.c, python/py-record-full.h: New file.
1292 * python/py-record.c: Add include for py-record-btrace.h and
1294 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
1295 recpy_instruction_history, recpy_function_call_history, recpy_begin,
1296 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
1297 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
1299 (gdbpy_initialize_btrace): New export.
1300 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
1302 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
1304 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
1305 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
1306 * python/py-record.c: New file.
1307 * python/python-internal.h (gdbpy_start_recording,
1308 gdbpy_current_recording, gdpy_stop_recording,
1309 gdbpy_initialize_record): New export.
1310 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
1311 (python_GdbMethods): Add gdbpy_start_recording,
1312 gdbpy_current_recording and gdbpy_stop_recording.
1314 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
1316 * record-btrace.c (record_btrace_record_method): New function.
1317 (init_record_btrace_ops): Initialize to_record_method.
1318 * record-full.c (record_full_record_method): New function.
1319 (init_record_full_ops, init_record_full_core_ops): Add
1320 record_full_record_method.
1321 * record.h (enum record_method): New enum.
1322 * target-debug.h (target_debug_print_enum_record_method: New define.
1323 * target-delegates.c: Regenerate.
1324 * target.c (target_record_method): New function.
1325 * target.h: Include record.h.
1326 (struct target_ops) <to_record_method>: New field.
1327 (target_record_method): New export.
1329 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
1331 * record.h (record_start, record_stop): New export.
1332 * record.c (record_start, record_stop): New function.
1334 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
1336 * btrace.c (btrace_fetch): Copy function call segments pointer
1338 (btrace_clear): Clear the vector.
1339 (btrace_find_insn_by_number): Use binary search to find the correct
1340 function call segment.
1341 * btrace.h (brace_fun_p): New typedef.
1342 (struct btrace_thread_info) <functions>: New field.
1344 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
1346 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
1347 * btrace.c (btrace_decode_error): ... here. New function.
1348 * btrace.h (btrace_decode_error): New export.
1350 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
1352 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
1353 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
1354 btrace_find_insn_by_number): Remove special case for gaps.
1355 * btrace.h (btrace_insn_get_error): New export.
1356 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
1357 * record-btrace.c (btrace_insn_history): Print number for gaps.
1358 (record_btrace_info, record_btrace_goto): Handle gaps.
1360 2017-02-14 Tom Tromey <tom@tromey.com>
1363 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
1365 * python/py-evts.c (gdbpy_initialize_py_events): Add
1366 before_prompt registry.
1367 * python/py-events.h (events_object) <before_prompt>: New field.
1369 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
1371 * btrace.c (ftrace_new_switch): Preserve up link and flags.
1373 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
1375 * symfile (_initialize_symfile): Add usage text to the load command's
1378 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
1380 * utils.c (defaulted_query): Don't query on secondary UIs.
1382 2017-02-10 Tom Tromey <tom@tromey.com>
1384 * rust-lang.c (rust_get_disr_info): Remove unused variable.
1386 2017-02-10 Tom Tromey <tom@tromey.com>
1388 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
1390 * python/py-type.c (typy_legacy_template_argument): Remove
1391 unnecessary "cleanup" local.
1393 2017-02-10 Tom Tromey <tom@tromey.com>
1395 * python/python.c (do_start_initialization): New function, from
1397 (_initialize_python): Call do_start_initialization.
1398 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
1401 2017-02-10 Tom Tromey <tom@tromey.com>
1403 * python/py-prettyprint.c (pretty_print_one_value): Use
1406 2017-02-10 Tom Tromey <tom@tromey.com>
1408 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
1409 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
1411 * python/py-type.c (field_new): Use gdbpy_ref.
1412 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
1414 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
1415 (py_free_pspace): Likewise.
1416 (pspace_to_pspace_object): Likewise.
1417 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
1418 (py_free_objfile): Likewise.
1419 (objfile_to_objfile_object): Likewise.
1420 * python/py-inferior.c (delete_thread_object): Use
1422 (infpy_read_memory): Likewise.
1423 (py_free_inferior): Likewise.
1424 * python/py-evtregistry.c (create_eventregistry_object): Use
1426 * python/py-event.c (create_event_object): Use gdbpy_ref.
1428 2017-02-10 Tom Tromey <tom@tromey.com>
1430 * python/py-ref.h (gdbpy_ref_policy): Now a template.
1431 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
1433 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
1434 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
1435 python/py-exitedevent.c, python/py-finishbreakpoint.c,
1436 python/py-framefilter.c, python/py-function.c,
1437 python/py-inferior.c, python/py-infevents.c,
1438 python/py-linetable.c, python/py-newobjfileevent.c,
1439 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
1440 python/py-signalevent.c, python/py-stopevent.c,
1441 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
1442 python/py-unwind.c, python/py-utils.c, python/py-value.c,
1443 python/py-varobj.c, python/py-xmethods.c, python/python.c,
1444 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
1446 2017-02-10 Tom Tromey <tom@tromey.com>
1448 * ui-out.h (ui_out_emit_type): New class.
1449 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
1450 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
1451 and ui_out_emit_tuple.
1452 (enumerate_locals): Likewise.
1453 (py_mi_print_variables, py_print_locals, py_print_args): Use
1455 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
1457 * common/gdb_optional.h: New file.
1459 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
1461 * MAINTAINERS (Write After Approval): Update my e-mail address.
1463 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
1466 * breakpoint.c (_initialize_breakpoint): Update the help description
1467 of the 'commands' command to indicate that it takes a list argument.
1469 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
1471 * interps.c (current_interp_set_logging): Remove "return".
1473 2017-02-09 Gary Benson <gbenson@redhat.com>
1475 * symtab.c (add_symtab_completions): Prevent NULL pointer
1478 2017-02-08 Pedro Alves <palves@redhat.com>
1480 * interps.c (interp::interp): Remove reference to quiet_p.
1481 (interp_set): Make static. Remove dead "Switching to" output
1483 (interp_quiet_p, interp_set_quiet): Delete.
1484 (interpreter_exec_cmd): Don't set the interpreter quiet.
1485 * interps.h (interp_quiet_p): Make static.
1486 (class interp) <quiet_p>: Remove field
1488 2017-02-08 Jerome Guitton <guitton@adacore.com>
1490 * cli/cli-decode.c (find_command_name_length): Make it extern.
1491 * cli/cli-decode.h (find_command_name_length): Declare.
1492 * cli/cli-script.c (command_name_equals, line_first_arg):
1494 (process_next_line): Use cli-decode to parse command names.
1495 (build_command_line): Make args a constant pointer.
1497 2017-02-08 Jerome Guitton <guitton@adacore.com>
1499 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
1500 Remove case-insensitive search.
1502 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
1504 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
1505 at the end of the line. Avoids an ARI warning.
1507 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
1509 * NEWS: Mention support for record/replay of Intel 64 rdrand and
1510 rdseed instructions.
1511 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
1513 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
1516 Provide and use sparc32 and sparc64 target description XML files.
1517 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
1518 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
1519 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
1520 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
1521 * features/sparc/sparc32-solaris.xml: New file.
1522 * features/sparc/sparc64-solaris.xml: New file.
1523 * features/sparc/sparc32-solaris.c: Generated.
1524 * features/sparc/sparc64-solaris.c: Generated.
1525 * sparc-tdep.h: Account for differences in target descriptions.
1526 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
1527 (sparc32_register_type): Use target provided registers.
1528 (validate_tdesc_registers): New function.
1529 (sparc32_gdbarch_init): Use tdesc_has_registers.
1530 Set pseudoregister functions.
1531 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
1532 (sparc64_register_type): Use target provided registers.
1533 (sparc64_init_abi): Set pseudoregister functions.
1535 2017-02-03 Tom Tromey <tom@tromey.com>
1538 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
1539 with a single member.
1541 2017-02-03 Pedro Alves <palves@redhat.com>
1543 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
1544 (cli_interp_base::~cli_interp_base): New.
1545 (cli_interp): New struct.
1546 (as_cli_interp): Cast the interp itself to cli_interp.
1547 (cli_interpreter_pre_command_loop): Rename to ...
1548 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
1550 (cli_interpreter_init): Rename to ...
1551 (cli_interp::init): ... this. Remove 'self' parameter. Use
1552 boolean. Make extern.
1553 (cli_interpreter_resume): Rename to ...
1554 (cli_interp::resume): ... this. Remove 'data' parameter. Make
1556 (cli_interpreter_suspend): Rename to ...
1557 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
1559 (cli_interpreter_exec): Rename to ...
1560 (cli_interp::exec): ... this. Remove 'data' parameter. Make
1562 (cli_interpreter_supports_command_editing): Rename to ...
1563 (cli_interp_base::supports_command_editing): ... this. Remove
1564 'interp' parameter. Make extern.
1565 (cli_ui_out): Rename to ...
1566 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
1568 (cli_set_logging): Rename to ...
1569 (cli_interp_base::set_logging): ... this. Remove 'interp'
1570 parameter. Make extern.
1571 (cli_interp_procs): Delete.
1572 (cli_interp_factory): Adjust to use "new".
1573 * cli/cli-interp.h: Include "interps.h".
1574 (struct cli_interp_base): New struct.
1575 * interps.c (struct interp): Delete. Fields moved to interps.h.
1576 (interp_new): Delete.
1577 (interp::interp, interp::~interp): New.
1578 (interp_set): Use bool, and return void. Assume the interpreter
1579 has suspend, init and resume methods, and that the all return
1581 (set_top_level_interpreter): interp_set returns void.
1582 (interp_ui_out): Adapt.
1583 (current_interp_set_logging): Adapt.
1584 (interp_data): Delete.
1585 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
1586 (interp_exec): Adapt.
1587 (top_level_interpreter_data): Delete.
1588 * interps.h (interp_init_ftype, interp_resume_ftype)
1589 (interp_suspend_ftype, interp_exec_ftype)
1590 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
1591 (class interp): New.
1592 (interp_new): Delete.
1593 (interp_set): Now returns void. Use bool.
1594 (interp_data, top_level_interpreter_data): Delete.
1595 * mi/mi-common.h: Include interps.h.
1596 (class mi_interp): Inherit from interp. Define a ctor. Declare
1597 init, resume, suspect, exec, interp_ui_out, set_logging and
1598 pre_command_loop methods.
1599 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
1600 (mi_interpreter_init): Rename to ...
1601 (mi_interp::init): ... this. Remove the 'interp' parameter, use
1602 bool, return void and make extern. Adjust.
1603 (mi_interpreter_resume): ... Rename to ...
1604 (mi_interp::resume): ... this. Remove the 'data' parameter,
1605 return void and make extern. Adjust.
1606 (mi_interpreter_suspend): ... Rename to ...
1607 (mi_interp::suspend): ... this. Remove the 'data' parameter,
1608 return void and make extern. Adjust.
1609 (mi_interpreter_exec): ... Rename to ...
1610 (mi_interp::exec): ... this. Remove the 'data' parameter and make
1612 (mi_interpreter_pre_command_loop): ... Rename to ...
1613 (mi_interp::pre_command_loop): ... this. Remove the 'self'
1614 parameter and make extern.
1615 (mi_on_normal_stop_1): Adjust.
1616 (mi_ui_out): Rename to ...
1617 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
1618 parameter and make extern. Adjust.
1619 (mi_set_logging): Rename to ...
1620 (mi_interp::set_logging): ... this. Remove the 'interp'
1621 parameter and make extern. Adjust.
1622 (mi_interp_procs): Delete.
1623 (mi_interp_factory): Adjust to use 'new'.
1624 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
1625 (mi_print_exception, mi_execute_command, mi_load_progress):
1627 * tui/tui-interp.c (tui_interp): New class.
1628 (as_tui_interp): Return a tui_interp pointer.
1629 (tui_on_normal_stop, tui_on_signal_received)
1630 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
1631 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
1632 to use interp::interp_ui_out.
1633 (tui_init): Rename to ...
1634 (tui_interp::init): ... this. Remove the 'self' parameter, use
1635 bool, return void and make extern. Adjust.
1636 (tui_resume): Rename to ...
1637 (tui_interp::resume): ... this. Remove the 'data' parameter,
1638 return void and make extern. Adjust.
1639 (tui_suspend): Rename to ...
1640 (tui_interp::suspend): ... this. Remove the 'data' parameter,
1641 return void and make extern. Adjust.
1642 (tui_ui_out): Rename to ...
1643 (tui_interp::interp_ui_out): ... this. Remove the 'self'
1644 parameter, and make extern. Adjust.
1645 (tui_exec): Rename to ...
1646 (tui_interp::exec): ... this. Remove the 'data' parameter and
1648 (tui_interp_procs): Delete.
1649 (tui_interp_factory): Use "new".
1651 2017-02-02 Tom Tromey <tom@tromey.com>
1653 * rust-exp.y (ends_raw_string, space_then_number)
1654 (rust_identifier_start_p): Return bool.
1655 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
1656 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
1657 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
1658 (rust_chartype_p): Return bool.
1659 (val_print_struct, rust_print_struct_def, rust_print_type):
1661 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
1664 2017-02-02 Tom Tromey <tom@tromey.com>
1666 * rust-lang.c: Reindent.
1668 2017-02-02 Tom Tromey <tom@tromey.com>
1670 * rust-lang.h (rust_crate_for_block): Update.
1671 * rust-lang.c (rust_crate_for_block): Return std::string.
1672 (rust_get_disr_info): Use std:;string, not
1673 gdb::unique_xmalloc_ptr.
1674 * rust-exp.y (crate_name): Update.
1676 2017-02-02 Pedro Alves <palves@redhat.com>
1678 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
1679 field out of gdb_disassembler_test and make it static.
1681 2017-02-02 Pedro Alves <palves@redhat.com>
1683 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
1684 mi1_interp and mi_interp fields.
1686 2017-02-02 Pedro Alves <palves@redhat.com>
1688 * cli/cli-interp.c (struct saved_output_files, saved_output):
1689 Moved from cli/cli-logging.c.
1690 (cli_set_logging): New function.
1691 (cli_interp_procs): Install cli_set_logging.
1692 * cli/cli-interp.h (make_logging_output, cli_set_logging):
1694 * cli/cli-logging.c (struct saved_output_files, saved_output):
1695 Moved to cli/cli-interp.c.
1696 (pop_output_files): Don't save outputs here.
1697 (make_logging_output): New function.
1698 (handle_redirections): Don't build tee nor save previous outputs
1700 * interps.c (current_interp_set_logging): Change prototype.
1701 Assume there's always a set_logging_proc method installed.
1702 * interps.h (interp_set_logging_ftype): Change prototype.
1703 (current_interp_set_logging): Change prototype and adjust comment.
1704 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
1705 use make_logging_output.
1706 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
1707 2017-02-02 Pedro Alves <palves@redhat.com>
1709 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
1711 (set_logging_overwrite): ... here.
1712 (logging_no_redirect_file): Delete.
1713 (set_logging_redirect): Don't handle redirection on the fly.
1714 Instead warn that "logging off" / "logging on" is necessary.
1715 (pop_output_files): Delete references to logging_no_redirect_file.
1716 (show_logging_command): Always speak in terms of what will happen
1717 once logging is reenabled.
1719 2017-02-02 Pedro Alves <palves@redhat.com>
1721 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
1723 2017-02-02 Pedro Alves <palves@redhat.com>
1725 * disasm.c (gdb_pretty_print_insn): Rename to ...
1726 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
1727 Remove gdbarch parameter. Adapt to clear the object's buffers
1728 instead of allocating new buffers, and to print using the object's
1729 gdb_disassembler instead of calling gdb_print_insn.
1730 (dump_insns): Use gdb_pretty_print_disassembler.
1731 * disasm.h (gdb_pretty_print_insn): Delete declaration.
1732 (gdb_pretty_print_disassembler): New class.
1733 * record-btrace.c (btrace_insn_history): Use
1734 gdb_pretty_print_disassembler.
1736 2017-02-02 Pedro Alves <palves@redhat.com>
1738 * ada-lang.c (type_as_string): Use string_file.
1739 * ada-valprint.c (ada_print_floating): Use string_file.
1740 * ada-varobj.c (ada_varobj_scalar_image)
1741 (ada_varobj_get_value_image): Use string_file.
1742 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
1743 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
1744 * breakpoint.c (update_inserted_breakpoint_locations)
1745 (insert_breakpoint_locations, reattach_breakpoints)
1746 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
1747 (print_it_watchpoint): Use string_file.
1748 (save_breakpoints): Use stdio_file.
1749 * c-exp.y (oper): Use string_file.
1750 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
1752 (pop_output_files): Use delete.
1753 (handle_redirections): Use stdio_file and tee_file.
1754 * cli/cli-setshow.c (do_show_command): Use string_file.
1755 * compile/compile-c-support.c (c_compute_program): Use
1757 * compile/compile-c-symbols.c (generate_vla_size): Take a
1758 'string_file &' instead of a 'ui_file *'.
1759 (generate_c_for_for_one_variable): Take a 'string_file &' instead
1760 of a 'ui_file *'. Use string_file.
1761 (generate_c_for_variable_locations): Take a 'string_file &'
1762 instead of a 'ui_file *'.
1763 * compile/compile-internal.h (generate_c_for_for_one_variable):
1764 Take a 'string_file &' instead of a 'ui_file *'.
1765 * compile/compile-loc2c.c (push, pushf, unary, binary)
1766 (print_label, pushf_register_address, pushf_register)
1767 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
1768 'ui_file *'. Adjust.
1769 * compile/compile.c (compile_to_object): Use string_file.
1770 * compile/compile.h (compile_dwarf_expr_to_c)
1771 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
1773 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
1774 (replace_typedefs_qualified_name): Use string_file and
1776 * disasm.c (gdb_pretty_print_insn): Use string_file.
1777 (gdb_disassembly): Adjust reference the null_stream global.
1778 (do_ui_file_delete): Delete.
1779 (gdb_insn_length): Use null_stream.
1780 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
1781 * dwarf2loc.c (dwarf2_compile_property_to_c)
1782 (locexpr_generate_c_location, loclist_generate_c_location): Take a
1783 'string_file &' instead of a 'ui_file *'.
1784 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
1785 * dwarf2read.c (do_ui_file_peek_last): Delete.
1786 (dwarf2_compute_name): Use string_file.
1787 * event-top.c (gdb_setup_readline): Use stdio_file.
1788 * gdbarch.sh (verify_gdbarch): Use string_file.
1789 * gdbtypes.c (safe_parse_type): Use null_stream.
1790 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
1792 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
1793 'string_file *' instead of a 'ui_file *'.
1794 (gdbscm_arch_disassemble): Use string_file.
1795 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
1796 * guile/scm-ports.c (class ioscm_file_port): Now a class that
1797 inherits from ui_file.
1798 (ioscm_file_port_delete, ioscm_file_port_rewind)
1799 (ioscm_file_port_put): Delete.
1800 (ioscm_file_port_write): Rename to ...
1801 (ioscm_file_port::write): ... this. Remove file_port_magic
1803 (ioscm_file_port_new): Delete.
1804 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
1806 * guile/scm-type.c (tyscm_type_name): Use string_file.
1807 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
1809 * infcmd.c (print_return_value_1): Use string_file.
1810 * infrun.c (print_target_wait_results): Use string_file.
1811 * language.c (add_language): Use string_file.
1812 * location.c (explicit_to_string_internal): Use string_file.
1813 * main.c (captured_main_1): Use null_file.
1814 * maint.c (maintenance_print_architecture): Use stdio_file.
1815 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
1816 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
1817 event_channel>: Change type to mi_console_file pointer.
1818 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
1819 (mi_console_file_delete): Delete.
1820 (struct mi_console_file): Delete.
1821 (mi_console_file_magic): Delete.
1822 (mi_console_file_new): Delete.
1823 (mi_console_file::mi_console_file): New.
1824 (mi_console_file_delete): Delete.
1825 (mi_console_file_fputs): Delete.
1826 (mi_console_file::write): New.
1827 (mi_console_raw_packet): Delete.
1828 (mi_console_file::flush): New.
1829 (mi_console_file_flush): Delete.
1830 (mi_console_set_raw): Rename to ...
1831 (mi_console_file::set_raw): ... this.
1832 * mi/mi-console.h (class mi_console_file): New class.
1833 (mi_console_file_new, mi_console_set_raw): Delete.
1834 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
1835 (mi_set_logging): Use delete and tee_file. Adjust.
1836 * mi/mi-main.c (output_register): Use string_file.
1837 (mi_cmd_data_evaluate_expression): Use string_file.
1838 (mi_cmd_data_read_memory): Use string_file.
1839 (mi_cmd_execute, print_variable_or_computed): Use string_file.
1840 * mi/mi-out.c (mi_ui_out::main_stream): New.
1841 (mi_ui_out::rewind): Use main_stream and
1843 (mi_ui_out::put): Use main_stream and string_file.
1844 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
1845 Allocate a 'string_file' instead.
1846 (mi_out_new): Don't allocate a mem_fileopen stream here.
1847 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
1848 (mi_ui_out::main_stream): Declare method.
1849 * printcmd.c (eval_command): Use string_file.
1850 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
1851 * python/py-arch.c (archpy_disassemble): Use string_file.
1852 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
1853 * python/py-frame.c (frapy_str): Use string_file.
1854 * python/py-framefilter.c (py_print_type, py_print_single_arg):
1856 * python/py-type.c (typy_str): Use string_file.
1857 * python/py-unwind.c (unwind_infopy_str): Use string_file.
1858 * python/py-value.c (valpy_str): Use string_file.
1859 * record-btrace.c (btrace_insn_history): Use string_file.
1860 * regcache.c (regcache_print): Use stdio_file.
1861 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
1862 * remote.c (escape_buffer): Use string_file.
1863 * rust-lang.c (rust_get_disr_info): Use string_file.
1864 * serial.c (serial_open_ops_1): Use stdio_file.
1865 (do_serial_close): Use delete.
1866 * stack.c (print_frame_arg): Use string_file.
1867 (print_frame_args): Remove local mem_fileopen stream, not used.
1868 (print_frame): Use string_file.
1869 * symmisc.c (maintenance_print_symbols): Use stdio_file.
1870 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1871 Take a 'string_file *' instead of a 'ui_file *'.
1872 * top.c (new_ui): Use stdio_file and stderr_file.
1873 (free_ui): Use delete.
1874 (execute_command_to_string): Use string_file.
1875 (quit_confirm): Use string_file.
1876 * tracepoint.c (collection_list::append_exp): Use string_file.
1877 * tui/tui-disasm.c (tui_disassemble): Use string_file.
1878 * tui/tui-file.c: Don't include "ui-file.h".
1879 (enum streamtype, struct tui_stream): Delete.
1880 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
1881 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
1882 (tui_file::tui_file): New method.
1883 (tui_file_fputs): Delete.
1884 (tui_file_get_strbuf): Delete.
1885 (tui_file::puts): New method.
1886 (tui_file_adjust_strbuf): Delete.
1887 (tui_file_flush): Delete.
1888 (tui_file::flush): New method.
1889 * tui/tui-file.h: Tweak intro comment.
1891 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
1892 (tui_file_adjust_strbuf): Delete declarations.
1893 (class tui_file): New class.
1894 * tui/tui-io.c (tui_initialize_io): Use tui_file.
1895 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
1896 (tui_register_format): Use string_stream.
1897 * tui/tui-stack.c (tui_make_status_line): Use string_file.
1898 (tui_get_function_from_frame): Use string_file.
1899 * typeprint.c (type_to_string): Use string_file.
1900 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
1901 (null_stream): New global.
1902 (ui_file_delete): Delete.
1903 (ui_file::ui_file): New.
1904 (null_file_isatty): Delete.
1905 (ui_file::~ui_file): New.
1906 (null_file_rewind): Delete.
1907 (ui_file::printf): New.
1908 (null_file_put): Delete.
1909 (null_file_flush): Delete.
1910 (ui_file::putstr): New.
1911 (null_file_write): Delete.
1912 (ui_file::putstrn): New.
1913 (null_file_read): Delete.
1914 (ui_file::putc): New.
1915 (null_file_fputs): Delete.
1916 (null_file_write_async_safe): Delete.
1917 (ui_file::vprintf): New.
1918 (null_file_delete): Delete.
1919 (null_file::write): New.
1920 (null_file_fseek): Delete.
1921 (null_file::puts): New.
1922 (ui_file_data): Delete.
1923 (null_file::write_async_safe): New.
1924 (gdb_flush, ui_file_isatty): Adjust.
1925 (ui_file_put, ui_file_rewind): Delete.
1926 (ui_file_write): Adjust.
1927 (ui_file_write_for_put): Delete.
1928 (ui_file_write_async_safe, ui_file_read): Adjust.
1929 (ui_file_fseek): Delete.
1930 (fputs_unfiltered): Adjust.
1931 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
1932 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
1933 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
1934 (set_ui_file_data): Delete.
1935 (string_file::~string_file, string_file::write)
1936 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
1937 (do_ui_file_as_string, ui_file_as_string): Delete.
1938 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
1939 (struct mem_file): Delete.
1940 (mem_file_new): Delete.
1941 (stdio_file::stdio_file): New.
1942 (mem_file_delete): Delete.
1943 (stdio_file::stdio_file): New.
1944 (mem_fileopen): Delete.
1945 (stdio_file::~stdio_file): New.
1946 (mem_file_rewind): Delete.
1947 (stdio_file::set_stream): New.
1948 (mem_file_put): Delete.
1949 (stdio_file::open): New.
1950 (mem_file_write): Delete.
1951 (stdio_file_magic, struct stdio_file): Delete.
1952 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
1953 (stdio_file::flush): New.
1954 (stdio_file_read): Rename to ...
1955 (stdio_file::read): ... this. Adjust.
1956 (stdio_file_write): Rename to ...
1957 (stdio_file::write): ... this. Adjust.
1958 (stdio_file_write_async_safe): Rename to ...
1959 (stdio_file::write_async_safe) ... this. Adjust.
1960 (stdio_file_fputs): Rename to ...
1961 (stdio_file::puts) ... this. Adjust.
1962 (stdio_file_isatty): Delete.
1963 (stdio_file_fseek): Delete.
1964 (stdio_file::isatty): New.
1965 (stderr_file_write): Rename to ...
1966 (stderr_file::write) ... this. Adjust.
1967 (stderr_file_fputs): Rename to ...
1968 (stderr_file::puts) ... this. Adjust.
1969 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
1970 (stderr_file::stderr_file): New.
1971 (tee_file_magic): Delete.
1972 (struct tee_file): Delete.
1973 (tee_file::tee_file): New.
1974 (tee_file_new): Delete.
1975 (tee_file::~tee_file): New.
1976 (tee_file_delete): Delete.
1977 (tee_file_flush): Rename to ...
1978 (tee_file::flush): ... this. Adjust.
1979 (tee_file_write): Rename to ...
1980 (tee_file::write): ... this. Adjust.
1981 (tee_file::write_async_safe): New.
1982 (tee_file_fputs): Rename to ...
1983 (tee_file::puts): ... this. Adjust.
1984 (tee_file_isatty): Rename to ...
1985 (tee_file::isatty): ... this. Adjust.
1986 * ui-file.h (struct obstack, struct ui_file): Don't
1988 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
1989 (ui_file_write_ftype)
1990 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
1991 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
1992 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
1993 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
1994 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
1995 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
1996 (set_ui_file_fseek): Delete.
1997 (ui_file_data, ui_file_delete, ui_file_rewind)
1998 (struct ui_file): New.
2000 (class null_file): New.
2001 (null_stream): Declare.
2002 (ui_file_write_for_put, ui_file_put): Delete.
2003 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
2005 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
2006 (gdb_fopen, tee_file_new): Delete.
2007 (struct string_file): New.
2008 (struct stdio_file): New.
2009 (stdio_file_up): New.
2010 (struct stderr_file): New.
2011 (class tee_file): New.
2012 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
2013 of a 'ui_file *'. Adjust.
2014 * ui-out.h (class ui_out) <field_stream>: Likewise.
2015 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
2016 (null_stream): Delete.
2017 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
2019 * utils.h (struct ui_file): Delete forward declaration..
2020 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
2021 (error_stream): Take a 'string_file &' instead of a
2023 * varobj.c (varobj_value_get_print_value): Use string_file.
2024 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
2025 * gdbarch.c: Regenerate.
2027 2017-02-02 Pedro Alves <palves@redhat.com>
2029 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
2030 (gdb_pretty_print_insn): ... this. Now a free function. Add back
2031 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
2032 Adjust to call gdb_print_insn instead of
2033 gdb_disassembler::print_insn.
2034 (dump_insns, do_mixed_source_and_assembly_deprecated)
2035 (do_mixed_source_and_assembly, do_assembly_only): Add back a
2036 'gdbarch' parameter. Remove gdb_disassembler parameter.
2037 (gdb_disassembly): Don't allocate a gdb_disassembler here.
2038 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
2040 (gdb_pretty_print_insn): Re-add declaration.
2041 * record-btrace.c (btrace_insn_history): Don't allocate a
2042 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
2044 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
2046 * disasm.h (gdb_disassembly): Remove file_string parameter.
2047 * disasm.c (gdb_disassembly): Likewise.
2048 * cli/cli-cmds.c (print_disassembly): Adapt.
2049 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
2050 * stack.c (do_gdb_disassembly): Likewise.
2052 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
2054 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
2055 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
2056 targets. And if the implicit value is longer than needed, extract
2057 the first bytes instead of the "least significant" ones.
2059 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
2061 * btrace.c (btrace_enable): Do not call btrace_add_pc for
2062 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
2063 (btrace_fetch): Assert can_access_registers_ptid.
2064 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
2065 validate_registers_access.
2067 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
2069 * gdbthread.h (can_access_registers_ptid): New.
2070 * thread.c (can_access_registers_ptid): New.
2072 2017-02-01 Pedro Alves <palves@redhat.com>
2074 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
2076 2017-01-31 Pedro Alves <palves@redhat.com>
2078 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
2081 2017-01-31 Pedro Alves <palves@redhat.com>
2083 * stack.c (print_frame_args): Remove local mem_fileopen stream,
2086 2017-01-31 Pedro Alves <palves@redhat.com>
2088 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
2090 2017-01-31 Pedro Alves <palves@redhat.com>
2092 * common/scoped_restore.h
2093 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
2094 change the value's parameter type to T2.
2095 (make_scoped_restore): Likewise.
2097 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2098 Richard Henderson <rth@redhat.com>
2100 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
2101 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
2102 GS_BASE for older kernels.
2103 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
2104 GS_BASE for older kernels.
2105 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
2106 and GS_BASE to the offset table.
2107 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
2108 system register group.
2109 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
2111 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
2113 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
2114 AMD64_GSBASE_REGNUM.
2115 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
2116 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
2117 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
2118 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
2119 i386/64bit-segments.xml in those rules.
2120 * features/i386/64bit-segments.xml: New file.
2121 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
2122 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
2123 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
2124 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
2125 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
2126 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
2127 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
2128 * features/i386/amd64-avx-linux.c: Regenerated.
2129 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
2130 * features/i386/amd64-avx-mpx.c: Regenerated.
2131 * features/i386/amd64-avx512-linux.c: Regenerated.
2132 * features/i386/amd64-linux.c: Regenerated.
2133 * features/i386/amd64-mpx-linux.c: Regenerated.
2134 * features/i386/i386-avx-mpx-linux.c: Regenerated.
2135 * features/i386/i386-avx-mpx.c: Regenerated.
2136 * features/i386/x32-avx-linux.c: Regenerated.
2137 * features/i386/x32-avx512-linux.c: Regenerated.
2138 * regformats/i386/amd64-avx-linux.dat: Regenerated.
2139 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
2140 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
2141 * regformats/i386/amd64-linux.dat: Regenerated.
2142 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
2143 * regformats/i386/x32-avx-linux.dat: Regenerated.
2144 * regformats/i386/x32-avx512-linux.dat: Regenerated.
2145 * regformats/i386/x32-linux.dat: Regenerated.
2147 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2149 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
2150 Set to AMD64_NUM_REGS.
2152 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2154 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
2155 that checks validity of a register number.
2157 2017-01-27 Kees Cook <keescook@google.com>
2159 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
2160 fetch_fpregs if target has fpa registers.
2161 (arm_linux_store_inferior_registers): Call store_fpregs if target
2164 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
2166 * cris-tdep.c (cris_gdbarch_init): Remove check for
2167 info.byte_order and force it to BFD_ENDIAN_LITTLE.
2169 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
2171 * corelow.c (get_core_register_section): Check for regset
2172 existence before checking for REGSET_VARIABLE_SIZE.
2174 2017-01-26 Yao Qi <yao.qi@linaro.org>
2175 Pedro Alves <palves@redhat.com>
2178 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
2179 call memory_error, save memaddr instead.
2180 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
2181 negative, cal memory_error.
2182 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
2184 2017-01-26 Yao Qi <yao.qi@linaro.org>
2186 * disasm-selftests.c (memory_error_test): New function.
2187 (_initialize_disasm_selftests): Register memory_error_test.
2189 2017-01-26 Yao Qi <yao.qi@linaro.org>
2191 * Makefile.in (SFILES): Add disasm-selftests.c and
2193 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
2194 * disasm-selftests.c: New file.
2195 * selftest-arch.c: New file.
2196 * selftest-arch.h: New file.
2198 2017-01-26 Yao Qi <yao.qi@linaro.org>
2200 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
2201 to bfd_arch_mep. Don't return 0 if section is not
2202 found. Call print_insn_mep.
2204 2017-01-26 Pedro Alves <palves@redhat.com>
2205 Yao Qi <yao.qi@linaro.org>
2207 * arm-tdep.c: Include "disasm.h".
2208 (gdb_print_insn_arm): Update code to get gdbarch.
2209 * disasm.c (dis_asm_read_memory): Change it to
2210 gdb_disassembler::dis_asm_read_memory.
2211 (dis_asm_memory_error): Likewise.
2212 (dis_asm_print_address): Likewise.
2213 (gdb_pretty_print_insn): Change it to
2214 gdb_disassembler::pretty_print_insn.
2215 (dump_insns): Add one argument gdb_disassemlber. All
2217 (do_mixed_source_and_assembly_deprecated): Likewise.
2218 (do_mixed_source_and_assembly): Likewise.
2219 (do_assembly_only): Likewise.
2220 (gdb_disassembler::gdb_disassembler): New.
2221 (gdb_disassembler::print_insn): New.
2222 * disasm.h (class gdb_disassembler): New.
2223 (gdb_pretty_print_insn): Remove declaration.
2224 (gdb_disassemble_info): Likewise.
2225 * guile/scm-disasm.c (class gdbscm_disassembler): New.
2226 (gdbscm_disasm_read_memory_worker): Update.
2227 (gdbscm_disasm_read_memory): Update.
2228 (gdbscm_disasm_memory_error): Remove.
2229 (gdbscm_disasm_print_address): Remove.
2230 (gdbscm_disassembler::gdbscm_disassembler): New.
2231 (gdbscm_print_insn_from_port): Update.
2232 * mips-tdep.c: Include disasm.h.
2233 (gdb_print_insn_mips): Update code to get gdbarch.
2234 * record-btrace.c (btrace_insn_history): Update.
2235 * spu-tdep.c: Include disasm.h.
2236 (struct spu_dis_asm_data): Remove.
2237 (struct spu_dis_asm_info): New.
2238 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
2240 (gdb_print_insn_spu): Cast disassemble_info to
2243 2017-01-26 Yao Qi <yao.qi@linaro.org>
2245 * disasm.c (do_ui_file_delete): Delete.
2246 (gdb_insn_length): Move code creating stream to ...
2247 * utils.c (null_stream): ... here. New function.
2248 * utils.h (null_stream): Declare.
2250 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
2252 * python/py-inferior.c (find_thread_object): Return directly
2253 from the loop. Remove "found" variable.
2255 2017-01-21 Joel Brobecker <brobecker@adacore.com>
2257 GDB 7.12.1 released.
2259 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
2261 * python/py-function.c (fnpy_call): Reorder declarations to have
2262 the gdbpy_enter object declared first.
2263 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
2265 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
2268 * python/python-internal.h (PyMem_RawMalloc): Define for
2270 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
2271 PyMem_RawMalloc instead of PyMem_Malloc.
2273 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
2274 Luis Machado <lgustavo@codesourcery.com>
2276 * NEWS (New commands): Mention flash-erase.
2277 (New MI commands): Mention target-flash-erase.
2278 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
2280 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
2281 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
2282 * target.c (flash_erase_command): New function.
2283 (initialize_targets): Add new flash-erase command.
2284 * target.h (flash_erase_command): New declaration.
2286 2017-01-20 Joel Brobecker <brobecker@adacore.com>
2288 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
2289 HAVE_SYS_PROCFS_H is defined.
2291 2017-01-18 Alan Hayward <alan.hayward@arm.com>
2293 * remote.c (struct cached_reg): Change data into a pointer.
2294 * (stop_reply_dtr): Free data pointers before deleting vector.
2295 (process_stop_reply): Likewise.
2296 (remote_parse_stop_reply): Allocate space for data
2298 2017-01-18 Alan Hayward <alan.hayward@arm.com>
2300 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
2302 (amd64_pseudo_register_read_value): Likewise.
2303 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
2304 (store_register_using_P): Likewise.
2305 * regcache.c (regcache_xfer_part): Likewise.
2307 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
2309 Split real and pseudo registers.
2310 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
2311 (sparc32_pseudo_regnum): New enum.
2312 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
2313 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
2314 (SPARC32_CP0_REGISTERS): New macro.
2315 (sparc32_pseudo_register_name): New function.
2316 (sparc32_register_name): Use sparc32_pseudo_register_name.
2317 (sparc32_pseudo_register_type): New function.
2318 (sparc32_register_type): Use sparc32_pseudo_register_type.
2319 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
2320 pseudo register numbers.
2321 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
2322 (SPARC64_CP0_REGISTERS): New macro.
2323 (sparc64_pseudo_register_name): New function.
2324 (sparc64_register_name): Use sparc64_pseudo_register_name.
2325 (sparc64_pseudo_register_type): New function.
2326 (sparc64_register_type): Use sparc64_pseudo_register_type.
2327 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
2328 pseudo register numbers.
2329 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
2330 sparc64_store_arguments): Handle pseudo register numbers.
2332 2017-01-13 Yao Qi <yao.qi@linaro.org>
2334 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
2335 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
2337 (getpkt_or_notif_sane_1): Likewise.
2339 2017-01-13 Yao Qi <yao.qi@linaro.org>
2341 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
2342 of CC. Pass "-x c++-header" instead of "-x c".
2344 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
2346 * remote.c (remote_can_async_p): Update comment.
2348 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
2350 * linux-nat.c (linux_nat_can_async_p): Update comment.
2352 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
2354 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
2356 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
2358 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
2360 2017-01-10 Tom Tromey <tom@tromey.com>
2362 * python/py-type.c (typy_legacy_template_argument): Update.
2363 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
2364 ~demangle_parse_info): Declare new members.
2365 (cp_demangled_name_to_comp): Return unique_ptr.
2366 (cp_demangled_name_parse_free)
2367 (make_cleanup_cp_demangled_name_parse_free)
2368 (cp_new_demangle_parse_info): Remove.
2369 * cp-support.c (do_demangled_name_parse_free_cleanup)
2370 (make_cleanup_cp_demangled_name_parse_free): Remove.
2371 (inspect_type, cp_canonicalize_string_full)
2372 (cp_canonicalize_string): Update.
2373 (mangled_name_to_comp): Change return type.
2374 (cp_class_name_from_physname, method_name_from_physname)
2375 (cp_func_name, cp_remove_params): Update.
2376 * cp-name-parser.y (demangle_parse_info): New constructor, from
2377 cp_new_demangle_parse_info.
2378 (~demangle_parse_info): New destructor, from
2379 cp_demangled_name_parse_free.
2380 (cp_merge_demangle_parse_infos): Update.
2381 (cp_demangled_name_to_comp): Change return type.
2383 2017-01-10 Tom Tromey <tom@tromey.com>
2385 * top.c (prevent_dont_repeat): Change return type.
2386 * python/python.c (execute_gdb_command): Use std::string.
2388 * guile/guile.c (gdbscm_execute_gdb_command): Update.
2389 * command.h (prevent_dont_repeat): Change return type.
2390 * breakpoint.c (bpstat_do_actions_1): Update.
2392 2017-01-10 Tom Tromey <tom@tromey.com>
2394 * value.h (scoped_value_mark::~scoped_value_mark): Call
2396 (scoped_value_mark::free_to_mark): New method.
2397 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
2400 2017-01-10 Tom Tromey <tom@tromey.com>
2402 * python/py-value.c (valpy_dereference, valpy_referenced_value)
2403 (valpy_reference_value, valpy_const_value, valpy_get_address)
2404 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
2405 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
2406 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
2407 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
2409 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
2410 * value.h (scoped_value_mark): New class.
2412 2017-01-10 Tom Tromey <tom@tromey.com>
2414 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
2415 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
2416 * psymtab.c (discard_psymtabs_upto): Remove.
2417 (make_cleanup_discard_psymtabs): Remove.
2418 (struct psymtab_state): Remove.
2420 2017-01-10 Tom Tromey <tom@tromey.com>
2422 * record-full.c (record_full_save_cleanups): Remove.
2423 (record_full_save): Use gdb::unlinker.
2424 * gcore.c (do_bfd_delete_cleanup): Remove.
2425 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
2427 * dwarf2read.c (unlink_if_set): Remove.
2428 (write_psymtabs_to_index): Use gdb::unlinker.
2429 * common/gdb_unlinker.h: New file.
2431 2017-01-10 Tom Tromey <tom@tromey.com>
2433 * windows-tdep.c (windows_xfer_shared_library): Update.
2434 * windows-nat.c (windows_make_so): Update.
2435 * utils.h (make_cleanup_bfd_unref): Remove.
2436 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
2437 * symfile.h (symfile_bfd_open)
2438 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
2439 * symfile.c (read_symbols, symbol_file_add)
2440 (separate_debug_file_exists): Update.
2441 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
2442 (generic_load, reread_symbols): Update.
2443 * symfile-mem.c (symbol_file_add_from_memory): Update.
2444 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
2445 (spu_symbol_file_add_from_memory): Update.
2446 * solist.h (struct target_so_ops) <bfd_open>: Return
2448 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
2449 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
2451 (solib_map_sections, reload_shared_libraries_1): Update.
2452 * solib-svr4.c (enable_break): Update.
2453 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
2454 * solib-frv.c (enable_break2): Update.
2455 * solib-dsbt.c (enable_break): Update.
2456 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
2458 (darwin_solib_get_all_image_info_addr_at_init): Update.
2459 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
2460 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
2461 * record-full.c (record_full_save): Update.
2462 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
2463 * procfs.c (insert_dbx_link_bpt_in_file): Update.
2464 * minidebug.c (find_separate_debug_file_in_section): Return
2466 * machoread.c (macho_add_oso_symfile): Change abfd to
2468 (macho_symfile_read_all_oso): Update.
2469 (macho_check_dsym): Return gdb_bfd_ref_ptr.
2470 (macho_symfile_read): Update.
2471 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
2472 (jit_bfd_try_read_symtab): Update.
2473 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2474 (gdb_bfd_openw, gdb_bfd_openr_iovec)
2475 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
2477 (gdb_bfd_ref_policy): New struct.
2478 (gdb_bfd_ref_ptr): New typedef.
2479 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2480 (gdb_bfd_openw, gdb_bfd_openr_iovec)
2481 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
2483 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
2484 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
2485 (gcore_command): Update.
2486 * exec.c (exec_file_attach): Update.
2487 * elfread.c (elf_symfile_read): Update.
2488 * dwarf2read.c (dwarf2_get_dwz_file): Update.
2489 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
2490 (open_and_init_dwo_file): Update.
2491 (open_dwp_file): Return gdb_bfd_ref_ptr.
2492 (open_and_init_dwp_file): Update.
2493 * corelow.c (core_open): Update.
2494 * compile/compile-object-load.c (compile_object_load): Update.
2495 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
2496 * coffread.c (coff_symfile_read): Update.
2497 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
2498 gdb_bfd_ref_ptr. Rename.
2499 (dump_bfd_file, restore_command): Update.
2500 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
2501 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
2502 (find_separate_debug_file_by_buildid): Update.
2504 2017-01-10 Tom Tromey <tom@tromey.com>
2506 * common/gdb_ref_ptr.h: New file.
2507 * python/py-ref.h (struct gdbpy_ref_policy): New.
2508 (gdbpy_ref): Now a typedef.
2510 2017-01-10 Tom Tromey <tom@tromey.com>
2512 * utils.h (make_cleanup_htab_delete): Don't declare.
2513 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
2515 * linespec.c (decode_compound_collector): Add constructor,
2517 (lookup_prefix_sym): Remove cleanup.
2518 (symtab_collector): Add constructor, destructor.
2519 (collect_symtabs_from_filename): Remove cleanup.
2520 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
2521 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2523 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
2524 * dwarf2read.c (dw2_expand_symtabs_matching)
2525 (dw2_map_symbol_filenames, dwarf_decode_macros)
2526 (write_psymtabs_to_index): Use htab_up.
2527 * dwarf2loc.c (func_verify_no_selftailcall)
2528 (call_site_find_chain_1, func_verify_no_selftailcall)
2529 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
2530 std::vector, gdb::unique_xmalloc_ptr.
2531 (call_sitep): Remove typedef.
2532 (dwarf2_locexpr_baton_eval): Remove unused variable.
2534 2017-01-10 Tom Tromey <tom@tromey.com>
2536 * python/python-internal.h (make_cleanup_py_decref)
2537 (make_cleanup_py_xdecref): Don't declare.
2538 * python/py-utils.c (py_decref, make_cleanup_py_decref)
2539 (py_xdecref, make_cleanup_py_xdecref): Remove.
2541 2017-01-10 Tom Tromey <tom@tromey.com>
2543 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
2544 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
2546 2017-01-10 Tom Tromey <tom@tromey.com>
2548 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
2550 2017-01-10 Tom Tromey <tom@tromey.com>
2552 * python/py-utils.c (unicode_to_encoded_string)
2553 (python_string_to_target_string)
2554 (python_string_to_target_python_string)
2555 (python_string_to_host_string, gdbpy_obj_to_string)
2556 (get_addr_from_python): Use gdbpy_ref.
2558 2017-01-10 Tom Tromey <tom@tromey.com>
2560 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
2563 2017-01-10 Tom Tromey <tom@tromey.com>
2565 * python/python.c (eval_python_command, gdbpy_decode_line)
2566 (gdbpy_run_events, gdbpy_start_type_printers)
2567 (gdbpy_apply_type_printers): Use gdbpy_ref.
2569 2017-01-10 Tom Tromey <tom@tromey.com>
2571 * python/py-param.c (get_doc_string, compute_enum_values): Use
2574 2017-01-10 Tom Tromey <tom@tromey.com>
2576 * python/py-inferior.c (find_thread_object, build_inferior_list):
2579 2017-01-10 Tom Tromey <tom@tromey.com>
2581 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
2583 2017-01-10 Tom Tromey <tom@tromey.com>
2585 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
2588 2017-01-10 Tom Tromey <tom@tromey.com>
2590 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
2592 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
2595 2017-01-10 Tom Tromey <tom@tromey.com>
2597 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
2600 2017-01-10 Tom Tromey <tom@tromey.com>
2602 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
2603 decref results of PyArg_ParseTupleAndKeywords.
2605 2017-01-10 Tom Tromey <tom@tromey.com>
2607 * python/python.c (python_run_simple_file): Use
2608 unique_xmalloc_ptr, gdbpy_ref.
2610 2017-01-10 Tom Tromey <tom@tromey.com>
2612 * python/py-prettyprint.c (print_stack_unless_memory_error)
2613 (print_string_repr, print_children): Use gdbpy_ref.
2614 (dummy_python_frame): New class.
2615 (dummy_python_frame::dummy_python_frame): Rename from
2616 push_dummy_python_frame.
2617 (py_restore_tstate): Remove.
2619 2017-01-10 Tom Tromey <tom@tromey.com>
2621 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
2623 2017-01-10 Tom Tromey <tom@tromey.com>
2625 * python/python.c (ensure_python_env, restore_python_env):
2627 * python/python-internal.h (ensure_python_env): Don't declare.
2628 * varobj.h (varobj_ensure_python_env): Don't declare.
2629 * varobj.c (varobj_ensure_python_env): Remove.
2631 2017-01-10 Tom Tromey <tom@tromey.com>
2633 * varobj.c (varobj_value_get_print_value): Use
2636 2017-01-10 Tom Tromey <tom@tromey.com>
2638 * python/py-prettyprint.c (print_string_repr, print_children):
2640 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
2642 * varobj.c (varobj_value_get_print_value): Update.
2643 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
2645 2017-01-10 Tom Tromey <tom@tromey.com>
2647 * varobj.c (varobj_get_display_hint)
2648 (dynamic_varobj_has_child_method, install_new_value_visualizer)
2649 (varobj_set_visualizer, free_variable): Use
2652 2017-01-10 Tom Tromey <tom@tromey.com>
2654 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
2655 (do_finish_initialization): New function. Use gdbpy_ref.
2656 (gdbpy_finish_initialization): Use gdbpy_enter. Call
2657 do_finish_initialization.
2659 2017-01-10 Tom Tromey <tom@tromey.com>
2661 * python/py-param.c (get_set_value, get_show_value): Use
2662 gdbpy_enter, gdbpy_ref.
2664 2017-01-10 Tom Tromey <tom@tromey.com>
2666 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
2668 2017-01-10 Tom Tromey <tom@tromey.com>
2670 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
2672 2017-01-10 Tom Tromey <tom@tromey.com>
2674 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
2675 Use gdbpy_enter_varobj.
2677 2017-01-10 Tom Tromey <tom@tromey.com>
2679 * varobj.c (gdbpy_enter_varobj): New constructor.
2680 * python/python-internal.h (gdbpy_enter_varobj): New class.
2681 * python/py-varobj.c (py_varobj_get_iterator): Use
2684 2017-01-10 Tom Tromey <tom@tromey.com>
2686 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
2687 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
2688 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
2689 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
2691 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
2693 2017-01-10 Tom Tromey <tom@tromey.com>
2695 * python/py-xmethods.c (invoke_match_method): Use
2698 2017-01-10 Tom Tromey <tom@tromey.com>
2700 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
2701 gdbpy_enter, gdbpy_ref.
2703 2017-01-10 Tom Tromey <tom@tromey.com>
2705 * python/python.c (python_interactive_command): Use gdbpy_enter.
2707 2017-01-10 Tom Tromey <tom@tromey.com>
2709 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
2712 2017-01-10 Tom Tromey <tom@tromey.com>
2714 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
2715 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
2717 2017-01-10 Tom Tromey <tom@tromey.com>
2719 * utils.h (htab_deleter): New struct.
2720 (htab_up): New typedef.
2721 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
2722 gdbpy_enter, gdbpy_ref, htab_up.
2724 2017-01-10 Tom Tromey <tom@tromey.com>
2726 * python/py-unwind.c (pending_frame_invalidate): Remove.
2727 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
2729 2017-01-10 Tom Tromey <tom@tromey.com>
2731 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
2732 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
2734 2017-01-10 Tom Tromey <tom@tromey.com>
2736 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
2738 2017-01-10 Tom Tromey <tom@tromey.com>
2740 * python/python.c (gdbpy_eval_from_control_command)
2741 (gdbpy_source_script, gdbpy_run_events)
2742 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
2743 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
2746 2017-01-10 Tom Tromey <tom@tromey.com>
2748 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
2750 2017-01-10 Tom Tromey <tom@tromey.com>
2752 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
2754 2017-01-10 Tom Tromey <tom@tromey.com>
2756 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
2757 (python_on_inferior_call_pre, python_on_inferior_call_post)
2758 (python_on_memory_change, python_on_register_change)
2759 (python_inferior_exit, python_new_objfile, add_thread_object)
2760 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
2762 2017-01-10 Tom Tromey <tom@tromey.com>
2764 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
2765 (bpfinishpy_handle_exit): Use gdbpy_enter.
2767 2017-01-10 Tom Tromey <tom@tromey.com>
2769 * python/py-cmd.c (cmdpy_destroyer)
2770 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
2773 2017-01-10 Tom Tromey <tom@tromey.com>
2775 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
2777 (gdbpy_breakpoint_has_cond): Likewise.
2779 2017-01-10 Tom Tromey <tom@tromey.com>
2781 * python/python.c (gdbpy_enter): New constructor.
2782 (~gdbpy_enter): New destructor.
2783 (restore_python_env, ensure_python_env): Rewrite.
2784 * python/python-internal.h (gdbpy_enter): New class.
2786 2017-01-10 Tom Tromey <tom@tromey.com>
2788 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
2790 2017-01-10 Tom Tromey <tom@tromey.com>
2792 * python/py-value.c (value_has_field, get_field_flag)
2793 (get_field_type, valpy_getitem, convert_value_from_python): Use
2796 2017-01-10 Tom Tromey <tom@tromey.com>
2798 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
2801 2017-01-10 Tom Tromey <tom@tromey.com>
2803 * python/py-prettyprint.c (search_pp_list)
2804 (find_pretty_printer_from_objfiles)
2805 (find_pretty_printer_from_progspace)
2806 (find_pretty_printer_from_gdb, find_pretty_printer)
2807 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
2810 2017-01-10 Tom Tromey <tom@tromey.com>
2812 * python/py-param.c (call_doc_function): Use gdbpy_ref.
2814 2017-01-10 Tom Tromey <tom@tromey.com>
2816 * python/py-linetable.c (build_line_table_tuple_from_pcs)
2817 (ltpy_get_all_source_lines): Use gdbpy_ref.
2819 2017-01-10 Tom Tromey <tom@tromey.com>
2821 * python/py-framefilter.c (extract_sym, extract_value)
2822 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
2825 2017-01-10 Tom Tromey <tom@tromey.com>
2827 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
2829 2017-01-10 Tom Tromey <tom@tromey.com>
2831 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
2833 2017-01-10 Tom Tromey <tom@tromey.com>
2835 * python/py-function.c (convert_values_to_python, fnpy_init): Use
2838 2017-01-10 Tom Tromey <tom@tromey.com>
2840 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
2842 2017-01-10 Tom Tromey <tom@tromey.com>
2844 * python/py-type.c (convert_field, make_fielditem, typy_fields)
2845 (typy_range): Use gdbpy_ref.
2847 2017-01-10 Tom Tromey <tom@tromey.com>
2849 * python/py-threadevent.c (create_thread_event_object): Use
2851 * python/py-stopevent.c (create_stop_event_object): Simplify.
2852 (emit_stop_event): Use gdbpy_ref.
2853 * python/py-signalevent.c (create_signal_event_object): Use
2855 * python/py-newobjfileevent.c (create_new_objfile_event_object)
2856 (emit_new_objfile_event, create_clear_objfiles_event_object)
2857 (emit_clear_objfiles_event): Use gdbpy_ref.
2858 * python/py-infevents.c (create_inferior_call_event_object)
2859 (create_register_changed_event_object)
2860 (create_memory_changed_event_object, emit_inferior_call_event)
2861 (emit_memory_changed_event, emit_register_changed_event): Use
2863 * python/py-exitedevent.c (create_exited_event_object)
2864 (emit_exited_event): Use gdbpy_ref.
2865 * python/py-event.h (evpy_emit_event): Remove
2866 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
2867 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
2868 * python/py-continueevent.c (emit_continue_event): Use
2870 * python/py-breakpoint.c (gdbpy_breakpoint_created)
2871 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
2873 * python/py-bpevent.c (create_breakpoint_event_object): Use
2876 2017-01-10 Tom Tromey <tom@tromey.com>
2878 * python/py-ref.h: New file.
2880 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
2882 * cli-out.c (cli_ui_out::do_redirect): Change return type to
2884 * cli-out.h (cli_ui_out::do_redirect): Likewise.
2885 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
2886 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
2887 * ui-out.c (ui_out::redirect): Likewise.
2888 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
2889 * cli/cli-logging.c (set_logging_redirect): Update call site of
2891 (handle_redirections): Likewise.
2892 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
2893 * top.c (execute_command_to_string): Likewise.
2894 * utils.c (do_ui_out_redirect_pop): Likewise.
2896 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
2898 * stack.c (_initialize_stack): Update "frame" command help message.
2900 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
2902 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
2904 2017-01-06 Yao Qi <yao.qi@linaro.org>
2906 * x86-linux-nat.h: Include gdb_proc_service.h.
2908 2017-01-06 Yao Qi <yao.qi@linaro.org>
2910 * ser-base.h: Include serial.h.
2912 2017-01-06 Yao Qi <yao.qi@linaro.org>
2914 * ppc-linux-tdep.h: Include ppc-tdep.h.
2916 2017-01-06 Yao Qi <yao.qi@linaro.org>
2918 * nat/amd64-linux-siginfo.h: Include signal.h.
2920 2017-01-06 Yao Qi <yao.qi@linaro.org>
2922 * nat/aarch64-linux-hw-point.h: Include break-common.h.
2924 2017-01-06 Yao Qi <yao.qi@linaro.org>
2926 * mi/mi-parse.h: Include mi-cmds.h.
2928 2017-01-06 Yao Qi <yao.qi@linaro.org>
2930 * inf-loop.c: Don't include "target.h".
2931 * inf-loop.h: Include it here.
2933 2017-01-06 Yao Qi <yao.qi@linaro.org>
2935 * dfp.h: Include "dboulest.h" and "expression.h".
2937 2017-01-06 Yao Qi <yao.qi@linaro.org>
2939 * ax-gdb.h: Include "ax.h".
2941 2017-01-06 Yao Qi <yao.qi@linaro.org>
2943 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
2944 with nat/gdb_ptrace.h.
2946 2017-01-05 Yao Qi <yao.qi@linaro.org>
2948 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
2950 (mips64_fbsd_sigframe_init): Likewise.
2952 2017-01-04 John Baldwin <jhb@FreeBSD.org>
2954 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
2955 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
2957 2017-01-04 John Baldwin <jhb@FreeBSD.org>
2959 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2960 * NEWS: Mention new FreeBSD/mips native configuration.
2961 * config/mips/fbsd.mh: New file.
2962 * configure.host: Add mips*-*-freebsd*.
2963 * mips-fbsd-nat.c: New file.
2965 2017-01-04 John Baldwin <jhb@FreeBSD.org>
2967 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
2968 (ALLDEPFILES): Add mips-fbsd-tdep.c.
2969 * NEWS: Mention new FreeBSD/mips target.
2970 * configure.tgt: Add mips*-*-freebsd*.
2971 * mips-fbsd-tdep.c: New file.
2972 * mips-fbsd-tdep.h: New file.
2974 2017-01-04 Yao Qi <yao.qi@linaro.org>
2976 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
2977 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
2979 2017-01-01 Joel Brobecker <brobecker@adacore.com>
2981 Update copyright year range in all GDB files.
2983 2017-01-01 Joel Brobecker <brobecker@adacore.com>
2985 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
2987 For older changes see ChangeLog-2016.
2993 version-control: never