amd64-linux-nat: Use ptid from regcache instead of inferior_ptid
[external/binutils.git] / gdb / ChangeLog
1 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
4         amd64_linux_fetch_inferior_registers): Use regcache->ptid
5         instead of inferior_ptid.
6
7 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8
9         * target.c (target_fetch_registers, target_store_registers): Add
10         assert.
11
12 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13
14         * regcache.h (regcache_get_ptid): New function.
15         * regcache.c (regcache_get_ptid): New function.
16
17 2017-03-13  Mark Wielaard  <mark@klomp.org>
18
19         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
20
21 2017-03-10  Keith Seitz  <keiths@redhat.com>
22
23         PR c++/8218
24         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
25
26 2017-03-08  Pedro Alves  <palves@redhat.com>
27
28         PR gdb/18360
29         * infrun.c (start_step_over, do_target_resume, resume)
30         (restart_threads): Assert we're not resuming a thread that is
31         meant to be stopped.
32         (infrun_thread_stop_requested_callback): Delete.
33         (infrun_thread_stop_requested): If the thread is internally
34         stopped, queue a pending stop event and clear the thread's
35         inline-frame state.
36         (handle_stop_requested): New function.
37         (handle_syscall_event, handle_inferior_event_1): Use
38         handle_stop_requested.
39         (handle_stop_requested): New function.
40         (handle_signal_stop): Set the thread's stop_signal here instead of
41         at caller.
42         (finish_step_over): Clear step over info unconditionally.
43         (handle_signal_stop): If the user had interrupted the event
44         thread, consider the stop a random signal.
45         (handle_signal_stop) <signal arrived while stepping over
46         breakpoint>: Don't restart threads here.
47         (stop_waiting): Don't clear step-over info here.
48
49 2017-03-08  Pedro Alves  <palves@redhat.com>
50
51         PR 21206
52         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
53         goes to argument 2, not 1.
54
55 2017-03-08  Pedro Alves  <palves@redhat.com>
56
57         PR cli/21218
58         * top.c (gdb_readline_wrapper): Avoid passing NULL to
59         display_gdb_prompt.
60         (command_line_input): Add comment.
61
62 2017-03-08  Pedro Alves  <palves@redhat.com>
63
64         PR tui/21216
65         * tui/tui-file.c (tui_file::write): New.
66         * tui/tui-file.h (tui_file): Override "write".
67         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
68         factored out from ...
69         (tui_puts): ... here.
70         (tui_putc): Use them.
71         (tui_write): New function.
72         * tui/tui-io.h (tui_write): Declare.
73
74 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
75
76         * Makefile.in (SFILES): Replace "environ.c" with
77         "common/environ.c".
78         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
79         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
80         to...
81         * common/environ.c: ... here.
82         * environ.h: Moved to...
83         * common/environ.h: ... here.
84
85 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
86
87         * gdbarch.sh (pstring_ptr): New static function.
88         (gdbarch_disassembler_options): Use it.
89         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
90         not valid_disassembler_option->name.
91         * gdbarch.c: Regenerate.
92
93 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
94
95         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
96
97 2017-03-07  Pedro Alves  <palves@redhat.com>
98
99         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
100
101 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
102
103         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
104         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
105         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
106         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
107
108 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
109
110         * xtensa-linux-nat.c (fetch_gregs): Remove const.
111
112 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
113
114         * remote.c (remote_add_target_side_commands): Use range-based
115         for loop.
116
117 2017-03-03  Yao Qi  <yao.qi@linaro.org>
118
119         PR gdb/21165
120         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
121         value is lazy.
122         * valprint.c (common_val_print): Likewise.
123
124 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
125
126         * NEWS: Mention new set/show disassembler-options commands.
127         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
128         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
129         (prospective_options): New static variable.
130         (gdb_disassembler::gdb_disassembler): Initialize
131         m_di.disassembler_options.
132         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
133         (get_disassembler_options): New function.
134         (set_disassembler_options): Likewise.
135         (set_disassembler_options_sfunc): Likewise.
136         (show_disassembler_options_sfunc): Likewise.
137         (disassembler_options_completer): Likewise.
138         (_initialize_disasm): Likewise.
139         * disasm.h (get_disassembler_options): New prototype.
140         (set_disassembler_options): Likewise.
141         * gdbarch.sh (gdbarch_disassembler_options): New variable.
142         (gdbarch_verify_disassembler_options): Likewise.
143         * gdbarch.c: Regenerate.
144         * gdbarch.h: Likewise.
145         * arm-tdep.c (num_disassembly_options): Delete.
146         (set_disassembly_style): Likewise.
147         (arm_disassembler_options): New static variable.
148         (set_disassembly_style_sfunc): Convert short style name into long
149         option name.  Call set_disassembler_options.
150         (show_disassembly_style_sfunc): New function.
151         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
152         set_gdbarch_verify_disassembler_options.
153         (_initialize_arm_tdep): Delete regnames variable and update callers.
154         (arm_disassembler_options): Initialize.
155         (disasm_options): New variable.
156         (num_disassembly_options): Rename from this...
157         (num_disassembly_styles): ...to this.  Compute by scanning through
158         disasm_options.
159         (valid_disassembly_styles): Initialize using disasm_options.
160         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
161         set_arm_regname_option.
162         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
163         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
164         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
165         set_gdbarch_verify_disassembler_options.
166         * s390-tdep.c (s390_disassembler_options): New static variable.
167         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
168         set_gdbarch_verify_disassembler_options.
169
170 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
171
172         * remote.c (remote_add_target_side_condition): Remove "struct"
173         keyword from range-based for loop.
174
175 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
176
177         * remote.c (remote_add_target_side_condition): Use range-based
178         for loop.  Update comment.
179
180 2017-02-27  Yao Qi  <yao.qi@linaro.org>
181
182         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
183
184 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
185
186         * regcache.c (regcache_raw_update): New function.
187         (regcache_raw_read): Move code to regcache_raw_update.
188         * regcache.h (regcache_raw_update): New declaration.
189         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
190
191 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
192
193         * dwarf2read.c (create_debug_type_hash_table): Initialize
194         header.signature and header.type_offset_in_tu.
195
196 2017-02-24  Pedro Alves  <palves@redhat.com>
197
198         * symtab.c (make_file_symbol_completion_list_1): Use
199         add_symtab_completions.
200
201 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
202
203         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
204
205 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
206
207         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
208         I386_MAX_REGISTER_SIZE.
209         (i386_pseudo_register_write): Likewise.
210         (i386_process_record): Likewise.
211         * i387-tdep.c (i387_supply_xsave): Likewise.
212         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
213         (store_register): Likewise.
214
215 2017-02-23  Pedro Alves  <palves@redhat.com>
216
217         * ada-lang.c: Include "common/function-view.h".
218         (ada_iterate_over_symbols): Adjust to use function_view as
219         callback type.
220         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
221         (ada_make_symbol_completion_list): Use a lambda.
222         (ada_exc_search_name_matches): Delete.
223         (name_matches_regex): New.
224         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
225         * compile/compile-c-support.c: Include "common/function-view.h".
226         (print_one_macro): Change prototype to accept a ui_file pointer.
227         (write_macro_definitions): Use a lambda.
228         * dwarf2read.c: Include "common/function-view.h".
229         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
230         (dw2_expand_symtabs_matching): Adjust to use function_view as
231         callback type.
232         * language.h: Include "common/function-view.h".
233         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
234         function_view as callback type.
235         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
236         * linespec.c: Include "common/function-view.h".
237         (collect_info::add_symbol): New method.
238         (struct symbol_and_data_callback, iterate_inline_only, struct
239         symbol_matcher_data, iterate_name_matcher): Delete.
240         (iterate_over_all_matching_symtabs): Adjust to use function_view
241         as callback type and lambdas.
242         (iterate_over_file_blocks): Adjust to use function_view as
243         callback type.
244         (decode_compound_collector): Now a class with private fields.
245         (decode_compound_collector::release_symbols): New method.
246         (collect_one_symbol): Rename to...
247         (decode_compound_collector::operator()): ... this and adjust.
248         (lookup_prefix_sym): decode_compound_collector construction bits
249         move to decode_compound_collector ctor.  Pass the
250         decode_compound_collector object directly as callback.  Remove
251         cleanups and use decode_compound_collector::release_symbols
252         instead.
253         (symtab_collector): Now a class with private fields.
254         (symtab_collector::release_symtabs): New method.
255         (add_symtabs_to_list): Rename to...
256         (symtab_collector::operator()): ... this and adjust.
257         (collect_symtabs_from_filename): symtab_collector construction
258         bits move to symtab_collector ctor.  Pass the symtab_collector
259         object directly as callback.  Remove cleanups and use
260         symtab_collector::release_symtabs instead.
261         (collect_symbols): Delete.
262         (add_matching_symbols_to_info): Use lambdas.
263         * macrocmd.c (print_macro_callback): Delete.
264         (info_macro_command): Use a lambda.
265         (info_macros_command): Pass print_macro_definition as callable
266         directly.
267         (print_one_macro): Remove 'ignore' parameter.
268         (macro_list_command): Adjust.
269         * macrotab.c (macro_for_each_data::fn): Now a function_view.
270         (macro_for_each_data::user_data): Delete field.
271         (foreach_macro): Adjust to call the function_view.
272         (macro_for_each): Adjust to use function_view as callback type.
273         (foreach_macro_in_scope): Adjust to call the function_view.
274         (macro_for_each_in_scope): Adjust to use function_view as callback
275         type.
276         * macrotab.h: Include "common/function-view.h".
277         (macro_callback_fn): Declare a prototype instead of a pointer.
278         Remove "user_data" parameter.
279         (macro_for_each, macro_for_each_in_scope): Adjust to use
280         function_view as callback type.
281         * psymtab.c (partial_map_expand_apply)
282         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
283         Adjust to use function_view as callback type and to return bool.
284         (psym_expand_symtabs_matching): Adjust to use function_view as
285         callback types.
286         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
287         to use function_view as callback type and to return bool.
288         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
289         callback types.
290         * symfile.c (expand_symtabs_matching): Adjust to use function_view
291         as callback types.
292         * symfile.h: Include "common/function-view.h".
293         (expand_symtabs_file_matcher_ftype)
294         (expand_symtabs_symbol_matcher_ftype)
295         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
296         return bool.
297         (quick_symbol_functions::map_symtabs_matching_filename)
298         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
299         function_view as callback type and return bool.
300         (expand_symtabs_matching): Adjust to use function_view as callback
301         type.
302         (maintenance_expand_name_matcher)
303         (maintenance_expand_file_matcher): Delete.
304         (maintenance_expand_symtabs): Use lambdas.
305         * symtab.c (iterate_over_some_symtabs): Adjust to use
306         function_view as callback types and return bool.
307         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
308         of a cleanup.
309         (lookup_symtab_callback): Delete.
310         (lookup_symtab): Use a lambda.
311         (iterate_over_symbols): Adjust to use function_view as callback
312         type.
313         (struct search_symbols_data, search_symbols_file_matches)
314         (search_symbols_name_matches): Delete.
315         (search_symbols): Use a pair of lambdas.
316         (struct add_name_data, add_macro_name, symbol_completion_matcher)
317         (symtab_expansion_callback): Delete.
318         (default_make_symbol_completion_list_break_on_1): Use lambdas.
319         * symtab.h: Include "common/function-view.h".
320         (iterate_over_some_symtabs): Adjust to use function_view as
321         callback type and return bool.
322         (iterate_over_symtabs): Adjust to use function_view as callback
323         type.
324         (symbol_found_callback_ftype): Remove 'data' parameter and return
325         bool.
326         (iterate_over_symbols): Adjust to use function_view as callback
327         type.
328
329 2017-02-23  Pedro Alves  <palves@redhat.com>
330
331         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
332         (%.o) <unittests/%.c>: New pattern.
333         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
334         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
335         * common/function-view.h: New file.
336         * unittests/function-view-selftests.c: New file.
337         * configure: Regenerate.
338
339 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
340
341         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
342         inferior_ptid.
343         * go32-nat.c (go32_thread_alive): Likewise.
344
345 2017-02-23  Yao Qi  <yao.qi@linaro.org>
346
347         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
348         delete.
349
350 2017-02-23  Yao Qi  <yao.qi@linaro.org>
351
352         * varobj.c (varobj_clear_saved_item): Use delete instead of
353         xfree.
354         (update_dynamic_varobj_children): Likewise.
355
356 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
357
358         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
359
360 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
361
362         * common/enum-flags.h (enum_flags::enum_flags): Initialize
363         m_enum_value to 0 in default constructor.
364
365 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
366
367         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
368         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
369         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
370         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
371         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
372         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
373         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
374         IS_STORE_CONDITIONAL_INSN.
375
376 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
377
378         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
379
380 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
381
382         * NEWS (Changes since GDB 7.12): Add DWARF-5.
383
384 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
385
386         * dwarf2read.c (skip_one_die, read_attribute_value)
387         (dwarf2_const_value_attr, dump_die_shallow)
388         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
389         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
390
391 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
392
393         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
394         (dwarf_parse_macro_header): Accept DWARF version 5.
395         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
396
397 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
398
399         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
400         DW_AT_GNU_*.
401         * common/common-exceptions.h (enum errors): Likewise.
402         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
403         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
404         (dwarf_expr_context::execute_stack_op): Likewise.
405         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
406         Likewise.
407         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
408         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
409         (show_entry_values_debug, call_site_to_target_addr)
410         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
411         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
412         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
413         (value_of_dwarf_block_entry, indirect_pieced_value)
414         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
415         (disassemble_dwarf_expression): Likewise.
416         * dwarf2read.c (process_die, inherit_abstract_dies)
417         (read_call_site_scope): Likewise.
418         * gdbtypes.h (struct func_type, struct call_site_parameter)
419         (struct call_site): Likewise.
420         * stack.c (read_frame_arg): Likewise.
421         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
422
423 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
424
425         * defs.h (read_unsigned_leb128): New declaration.
426         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
427         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
428         (dwarf2_find_location_expression): Call also
429         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
430         * dwarf2loc.h (dwarf2_version): New declaration.
431         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
432         rnglists.
433         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
434         .debug_rnglists.
435         (struct dwop_section_names): Add loclists_dwo.
436         (dwop_section_names): Add .debug_loclists.dwo.
437         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
438         (struct dwarf2_per_cu_data): Add dwarf_version.
439         (struct dwo_sections): Add loclists.
440         (struct attr_abbrev): Add implicit_const.
441         (read_indirect_line_string): New declaration.
442         (read_unsigned_leb128): Delete declaration.
443         (rcuh_kind): New definition.
444         (read_and_check_comp_unit_head): Change parameter
445         is_debug_types_section to section_kind.
446         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
447         (read_comp_unit_head): Change parameter abfd to section, add parameter
448         section_kind.  Handle DWARF-5.
449         (error_check_comp_unit_head): Accept also DWARF version 5.
450         (read_and_check_comp_unit_head): Change parameter
451         is_debug_types_section to section_kind.
452         (read_and_check_type_unit_head): Delete function.
453         (read_abbrev_offset): Handle DWARF-5.
454         (create_debug_type_hash_table): Add parameter section_kind.  Process
455         only DW_UT_type.  Use signature and type_offset_in_tu from struct
456         comp_unit_head.
457         (create_debug_types_hash_table): Update create_debug_type_hash_table
458         caller.
459         (create_all_type_units): Call create_debug_type_hash_table.
460         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
461         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
462         caller.
463         (skip_one_die): Handle DW_FORM_implicit_const.
464         (dwarf2_rnglists_process): New function.
465         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
466         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
467         (read_attribute_value): Handle DW_FORM_implicit_const,
468         DW_FORM_line_strp.
469         (read_attribute): Handle DW_FORM_implicit_const.
470         (read_indirect_string_at_offset_from): New function from
471         read_indirect_string_at_offset.
472         (read_indirect_string_at_offset): Call
473         read_indirect_string_at_offset_from.
474         (read_indirect_line_string_at_offset): New function.
475         (read_indirect_string): New function comment.
476         (read_indirect_line_string): New function.
477         (read_unsigned_leb128): Make it global.
478         (dwarf2_string_attr): Handle DWARF-5.
479         (add_include_dir_stub, read_formatted_entries): New functions.
480         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
481         Handle DWARF-5.
482         (per_cu_header_read_in): Update read_comp_unit_head caller.
483         (dwarf2_version): New function.
484         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
485         rnglists.
486         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
487         fields.
488
489 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
490
491         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
492
493 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
494
495         * dwarf2read.c (dwarf2_ranges_process): New function from
496         dwarf2_ranges_read.
497         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
498         dwarf2_ranges_process.
499
500 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
501
502         * dwarf2read.c (create_debug_type_hash_table): New function from
503         create_debug_types_hash_table.
504         (create_debug_types_hash_table): Call create_debug_type_hash_table.
505         (create_all_type_units, open_and_init_dwo_file): Update
506         create_debug_types_hash_table callers.
507
508 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
509
510         PR gdb/16188
511         * fork-child.c (trace_start_error): Fix thinko.  va_end should
512         refer to 'ap', not 'args'.
513
514 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
515             Pedro Alves  <palves@redhat.com>
516
517         PR gdb/16188
518         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
519         calls succeeded.
520         * fork-child.c (trace_start_error): New function.
521         (trace_start_error_with_name): Likewise.
522         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
523         * inf-ptrace.c (inf_ptrace_me): Likewise.
524         * inferior.h (trace_start_error): New prototype.
525         (trace_start_error_with_name): Likewise.
526
527 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
528
529         PR gdb/21164
530         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
531         NULL before using it.
532         * symmisc.c (maintenance_print_symbols): Likewise.
533         (maintenance_print_msymbols): Likewise.
534
535 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
536
537         * NEWS: Add record Python bindings entry.
538
539 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
540
541         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
542         py-record-full.o.
543         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
544         * python/py-record-btrace.c, python/py-record-btrace.h,
545         python/py-record-full.c, python/py-record-full.h: New file.
546         * python/py-record.c: Add include for py-record-btrace.h and
547         py-record-full.h.
548         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
549         recpy_instruction_history, recpy_function_call_history, recpy_begin,
550         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
551         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
552         New definition.
553         (gdbpy_initialize_btrace): New export.
554         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
555
556 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
557
558         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
559         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
560         * python/py-record.c: New file.
561         * python/python-internal.h (gdbpy_start_recording,
562         gdbpy_current_recording, gdpy_stop_recording,
563         gdbpy_initialize_record): New export.
564         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
565         (python_GdbMethods): Add gdbpy_start_recording,
566         gdbpy_current_recording and gdbpy_stop_recording.
567
568 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
569
570         * record-btrace.c (record_btrace_record_method): New function.
571         (init_record_btrace_ops): Initialize to_record_method.
572         * record-full.c (record_full_record_method): New function.
573         (init_record_full_ops, init_record_full_core_ops): Add
574         record_full_record_method.
575         * record.h (enum record_method): New enum.
576         * target-debug.h (target_debug_print_enum_record_method: New define.
577         * target-delegates.c: Regenerate.
578         * target.c (target_record_method): New function.
579         * target.h: Include record.h.
580         (struct target_ops) <to_record_method>: New field.
581         (target_record_method): New export.
582
583 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
584
585         * record.h (record_start, record_stop): New export.
586         * record.c (record_start, record_stop): New function.
587
588 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
589
590         * btrace.c (btrace_fetch): Copy function call segments pointer
591         into a vector.
592         (btrace_clear): Clear the vector.
593         (btrace_find_insn_by_number): Use binary search to find the correct
594         function call segment.
595         * btrace.h (brace_fun_p): New typedef.
596         (struct btrace_thread_info) <functions>: New field.
597
598 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
599
600         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
601         * btrace.c (btrace_decode_error): ... here.  New function.
602         * btrace.h (btrace_decode_error): New export.
603
604 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
605
606         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
607         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
608         btrace_find_insn_by_number): Remove special case for gaps.
609         * btrace.h (btrace_insn_get_error): New export.
610         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
611         * record-btrace.c (btrace_insn_history): Print number for gaps.
612         (record_btrace_info, record_btrace_goto): Handle gaps.
613
614 2017-02-14  Tom Tromey  <tom@tromey.com>
615
616         PR python/13598:
617         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
618         event.
619         * python/py-evts.c (gdbpy_initialize_py_events): Add
620         before_prompt registry.
621         * python/py-events.h (events_object) <before_prompt>: New field.
622
623 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
624
625         * btrace.c (ftrace_new_switch): Preserve up link and flags.
626
627 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
628
629         * symfile (_initialize_symfile): Add usage text to the load command's
630         help text.
631
632 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
633
634         * utils.c (defaulted_query): Don't query on secondary UIs.
635
636 2017-02-10  Tom Tromey  <tom@tromey.com>
637
638         * rust-lang.c (rust_get_disr_info): Remove unused variable.
639
640 2017-02-10  Tom Tromey  <tom@tromey.com>
641
642         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
643         "cleanup" local.
644         * python/py-type.c (typy_legacy_template_argument): Remove
645         unnecessary "cleanup" local.
646
647 2017-02-10  Tom Tromey  <tom@tromey.com>
648
649         * python/python.c (do_start_initialization): New function, from
650         _initialize_python.
651         (_initialize_python): Call do_start_initialization.
652         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
653         goto.
654
655 2017-02-10  Tom Tromey  <tom@tromey.com>
656
657         * python/py-prettyprint.c (pretty_print_one_value): Use
658         gdbpy_ref.
659
660 2017-02-10  Tom Tromey  <tom@tromey.com>
661
662         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
663         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
664         gdbpy_ref.
665         * python/py-type.c (field_new): Use gdbpy_ref.
666         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
667         gdbpy_ref.
668         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
669         (py_free_pspace): Likewise.
670         (pspace_to_pspace_object): Likewise.
671         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
672         (py_free_objfile): Likewise.
673         (objfile_to_objfile_object): Likewise.
674         * python/py-inferior.c (delete_thread_object): Use
675         gdbpy_ref.
676         (infpy_read_memory): Likewise.
677         (py_free_inferior): Likewise.
678         * python/py-evtregistry.c (create_eventregistry_object): Use
679         gdbpy_ref.
680         * python/py-event.c (create_event_object): Use gdbpy_ref.
681
682 2017-02-10  Tom Tromey  <tom@tromey.com>
683
684         * python/py-ref.h (gdbpy_ref_policy): Now a template.
685         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
686         used.
687         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
688         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
689         python/py-exitedevent.c, python/py-finishbreakpoint.c,
690         python/py-framefilter.c, python/py-function.c,
691         python/py-inferior.c, python/py-infevents.c,
692         python/py-linetable.c, python/py-newobjfileevent.c,
693         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
694         python/py-signalevent.c, python/py-stopevent.c,
695         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
696         python/py-unwind.c, python/py-utils.c, python/py-value.c,
697         python/py-varobj.c, python/py-xmethods.c, python/python.c,
698         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
699
700 2017-02-10  Tom Tromey  <tom@tromey.com>
701
702         * ui-out.h (ui_out_emit_type): New class.
703         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
704         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
705         and ui_out_emit_tuple.
706         (enumerate_locals): Likewise.
707         (py_mi_print_variables, py_print_locals, py_print_args): Use
708         ui_out_emit_list.
709         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
710         ui_out_emit_list.
711         * common/gdb_optional.h: New file.
712
713 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
714
715         * MAINTAINERS (Write After Approval): Update my e-mail address.
716
717 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
718
719         PR gdb/21122
720         * breakpoint.c (_initialize_breakpoint): Update the help description
721         of the 'commands' command to indicate that it takes a list argument.
722
723 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
724
725         * interps.c (current_interp_set_logging): Remove "return".
726
727 2017-02-09  Gary Benson  <gbenson@redhat.com>
728
729         * symtab.c (add_symtab_completions): Prevent NULL pointer
730         dereference.
731
732 2017-02-08  Pedro Alves  <palves@redhat.com>
733
734         * interps.c (interp::interp): Remove reference to quiet_p.
735         (interp_set): Make static.  Remove dead "Switching to" output
736         code.
737         (interp_quiet_p, interp_set_quiet): Delete.
738         (interpreter_exec_cmd): Don't set the interpreter quiet.
739         * interps.h (interp_quiet_p): Make static.
740         (class interp) <quiet_p>: Remove field
741
742 2017-02-08  Jerome Guitton  <guitton@adacore.com>
743
744         * cli/cli-decode.c (find_command_name_length): Make it extern.
745         * cli/cli-decode.h (find_command_name_length): Declare.
746         * cli/cli-script.c (command_name_equals, line_first_arg):
747         New functions.
748         (process_next_line): Use cli-decode to parse command names.
749         (build_command_line): Make args a constant pointer.
750
751 2017-02-08  Jerome Guitton  <guitton@adacore.com>
752
753         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
754         Remove case-insensitive search.
755
756 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
757
758         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
759         at the end of the line.  Avoids an ARI warning.
760
761 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
762
763         * NEWS: Mention support for record/replay of Intel 64 rdrand and
764         rdseed instructions.
765         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
766
767 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
768
769         PR tdep/20936
770         Provide and use sparc32 and sparc64 target description XML files.
771         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
772         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
773         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
774         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
775         * features/sparc/sparc32-solaris.xml: New file.
776         * features/sparc/sparc64-solaris.xml: New file.
777         * features/sparc/sparc32-solaris.c: Generated.
778         * features/sparc/sparc64-solaris.c: Generated.
779         * sparc-tdep.h: Account for differences in target descriptions.
780         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
781         (sparc32_register_type): Use target provided registers.
782         (validate_tdesc_registers): New function.
783         (sparc32_gdbarch_init): Use tdesc_has_registers.
784         Set pseudoregister functions.
785         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
786         (sparc64_register_type): Use target provided registers.
787         (sparc64_init_abi): Set pseudoregister functions.
788
789 2017-02-03  Tom Tromey  <tom@tromey.com>
790
791         PR rust/21097:
792         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
793         with a single member.
794
795 2017-02-03  Pedro Alves  <palves@redhat.com>
796
797         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
798         (cli_interp_base::~cli_interp_base): New.
799         (cli_interp): New struct.
800         (as_cli_interp): Cast the interp itself to cli_interp.
801         (cli_interpreter_pre_command_loop): Rename to ...
802         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
803         parameter.
804         (cli_interpreter_init): Rename to ...
805         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
806         boolean.  Make extern.
807         (cli_interpreter_resume): Rename to ...
808         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
809         extern.
810         (cli_interpreter_suspend): Rename to ...
811         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
812         extern.
813         (cli_interpreter_exec): Rename to ...
814         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
815         extern.
816         (cli_interpreter_supports_command_editing): Rename to ...
817         (cli_interp_base::supports_command_editing): ... this.  Remove
818         'interp' parameter.  Make extern.
819         (cli_ui_out): Rename to ...
820         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
821         Make extern.
822         (cli_set_logging): Rename to ...
823         (cli_interp_base::set_logging): ... this.  Remove 'interp'
824         parameter.  Make extern.
825         (cli_interp_procs): Delete.
826         (cli_interp_factory): Adjust to use "new".
827         * cli/cli-interp.h: Include "interps.h".
828         (struct cli_interp_base): New struct.
829         * interps.c (struct interp): Delete.  Fields moved to interps.h.
830         (interp_new): Delete.
831         (interp::interp, interp::~interp): New.
832         (interp_set): Use bool, and return void.  Assume the interpreter
833         has suspend, init and resume methods, and that the all return
834         void.
835         (set_top_level_interpreter): interp_set returns void.
836         (interp_ui_out): Adapt.
837         (current_interp_set_logging): Adapt.
838         (interp_data): Delete.
839         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
840         (interp_exec): Adapt.
841         (top_level_interpreter_data): Delete.
842         * interps.h (interp_init_ftype, interp_resume_ftype)
843         (interp_suspend_ftype, interp_exec_ftype)
844         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
845         (class interp): New.
846         (interp_new): Delete.
847         (interp_set): Now returns void.  Use bool.
848         (interp_data, top_level_interpreter_data): Delete.
849         * mi/mi-common.h: Include interps.h.
850         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
851         init, resume, suspect, exec, interp_ui_out, set_logging and
852         pre_command_loop methods.
853         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
854         (mi_interpreter_init): Rename to ...
855         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
856         bool, return void and make extern.  Adjust.
857         (mi_interpreter_resume): ... Rename to ...
858         (mi_interp::resume): ... this.  Remove the 'data' parameter,
859         return void and make extern.  Adjust.
860         (mi_interpreter_suspend): ... Rename to ...
861         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
862         return void and make extern.  Adjust.
863         (mi_interpreter_exec): ... Rename to ...
864         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
865         extern.  Adjust.
866         (mi_interpreter_pre_command_loop): ... Rename to ...
867         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
868         parameter and make extern.
869         (mi_on_normal_stop_1): Adjust.
870         (mi_ui_out): Rename to ...
871         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
872         parameter and make extern.  Adjust.
873         (mi_set_logging): Rename to ...
874         (mi_interp::set_logging): ... this.  Remove the 'interp'
875         parameter and make extern.  Adjust.
876         (mi_interp_procs): Delete.
877         (mi_interp_factory): Adjust to use 'new'.
878         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
879         (mi_print_exception, mi_execute_command, mi_load_progress):
880         Adjust.
881         * tui/tui-interp.c (tui_interp): New class.
882         (as_tui_interp): Return a tui_interp pointer.
883         (tui_on_normal_stop, tui_on_signal_received)
884         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
885         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
886         to use interp::interp_ui_out.
887         (tui_init): Rename to ...
888         (tui_interp::init): ... this.  Remove the 'self' parameter, use
889         bool, return void and make extern.  Adjust.
890         (tui_resume): Rename to ...
891         (tui_interp::resume): ... this.  Remove the 'data' parameter,
892         return void and make extern.  Adjust.
893         (tui_suspend): Rename to ...
894         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
895         return void and make extern.  Adjust.
896         (tui_ui_out): Rename to ...
897         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
898         parameter, and make extern.  Adjust.
899         (tui_exec): Rename to ...
900         (tui_interp::exec): ... this.  Remove the 'data' parameter and
901         make extern.
902         (tui_interp_procs): Delete.
903         (tui_interp_factory): Use "new".
904
905 2017-02-02  Tom Tromey  <tom@tromey.com>
906
907         * rust-exp.y (ends_raw_string, space_then_number)
908         (rust_identifier_start_p): Return bool.
909         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
910         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
911         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
912         (rust_chartype_p): Return bool.
913         (val_print_struct, rust_print_struct_def, rust_print_type):
914         Update.
915         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
916         Return bool.
917
918 2017-02-02  Tom Tromey  <tom@tromey.com>
919
920         * rust-lang.c: Reindent.
921
922 2017-02-02  Tom Tromey  <tom@tromey.com>
923
924         * rust-lang.h (rust_crate_for_block): Update.
925         * rust-lang.c (rust_crate_for_block): Return std::string.
926         (rust_get_disr_info): Use std:;string, not
927         gdb::unique_xmalloc_ptr.
928         * rust-exp.y (crate_name): Update.
929
930 2017-02-02  Pedro Alves  <palves@redhat.com>
931
932         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
933         field out of gdb_disassembler_test and make it static.
934
935 2017-02-02  Pedro Alves  <palves@redhat.com>
936
937         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
938         mi1_interp and mi_interp fields.
939
940 2017-02-02  Pedro Alves  <palves@redhat.com>
941
942         * cli/cli-interp.c (struct saved_output_files, saved_output):
943         Moved from cli/cli-logging.c.
944         (cli_set_logging): New function.
945         (cli_interp_procs): Install cli_set_logging.
946         * cli/cli-interp.h (make_logging_output, cli_set_logging):
947         Declare.
948         * cli/cli-logging.c (struct saved_output_files, saved_output):
949         Moved to cli/cli-interp.c.
950         (pop_output_files): Don't save outputs here.
951         (make_logging_output): New function.
952         (handle_redirections): Don't build tee nor save previous outputs
953         here.
954         * interps.c (current_interp_set_logging): Change prototype.
955         Assume there's always a set_logging_proc method installed.
956         * interps.h (interp_set_logging_ftype): Change prototype.
957         (current_interp_set_logging): Change prototype and adjust comment.
958         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
959         use make_logging_output.
960         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
961 2017-02-02  Pedro Alves  <palves@redhat.com>
962
963         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
964         from ...
965         (set_logging_overwrite): ... here.
966         (logging_no_redirect_file): Delete.
967         (set_logging_redirect): Don't handle redirection on the fly.
968         Instead warn that "logging off" / "logging on" is necessary.
969         (pop_output_files): Delete references to logging_no_redirect_file.
970         (show_logging_command): Always speak in terms of what will happen
971         once logging is reenabled.
972
973 2017-02-02  Pedro Alves  <palves@redhat.com>
974
975         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
976
977 2017-02-02  Pedro Alves  <palves@redhat.com>
978
979         * disasm.c (gdb_pretty_print_insn): Rename to ...
980         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
981         Remove gdbarch parameter.  Adapt to clear the object's buffers
982         instead of allocating new buffers, and to print using the object's
983         gdb_disassembler instead of calling gdb_print_insn.
984         (dump_insns): Use gdb_pretty_print_disassembler.
985         * disasm.h (gdb_pretty_print_insn): Delete declaration.
986         (gdb_pretty_print_disassembler): New class.
987         * record-btrace.c (btrace_insn_history): Use
988         gdb_pretty_print_disassembler.
989
990 2017-02-02  Pedro Alves  <palves@redhat.com>
991
992         * ada-lang.c (type_as_string): Use string_file.
993         * ada-valprint.c (ada_print_floating): Use string_file.
994         * ada-varobj.c (ada_varobj_scalar_image)
995         (ada_varobj_get_value_image): Use string_file.
996         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
997         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
998         * breakpoint.c (update_inserted_breakpoint_locations)
999         (insert_breakpoint_locations, reattach_breakpoints)
1000         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
1001         (print_it_watchpoint): Use string_file.
1002         (save_breakpoints): Use stdio_file.
1003         * c-exp.y (oper): Use string_file.
1004         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
1005         tee_file.
1006         (pop_output_files): Use delete.
1007         (handle_redirections): Use stdio_file and tee_file.
1008         * cli/cli-setshow.c (do_show_command): Use string_file.
1009         * compile/compile-c-support.c (c_compute_program): Use
1010         string_file.
1011         * compile/compile-c-symbols.c (generate_vla_size): Take a
1012         'string_file &' instead of a 'ui_file *'.
1013         (generate_c_for_for_one_variable): Take a 'string_file &' instead
1014         of a 'ui_file *'.  Use string_file.
1015         (generate_c_for_variable_locations): Take a 'string_file &'
1016         instead of a 'ui_file *'.
1017         * compile/compile-internal.h (generate_c_for_for_one_variable):
1018         Take a 'string_file &' instead of a 'ui_file *'.
1019         * compile/compile-loc2c.c (push, pushf, unary, binary)
1020         (print_label, pushf_register_address, pushf_register)
1021         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
1022         'ui_file *'.  Adjust.
1023         * compile/compile.c (compile_to_object): Use string_file.
1024         * compile/compile.h (compile_dwarf_expr_to_c)
1025         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
1026         'ui_file *'.
1027         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
1028         (replace_typedefs_qualified_name): Use string_file and
1029         obstack_copy0.
1030         * disasm.c (gdb_pretty_print_insn): Use string_file.
1031         (gdb_disassembly): Adjust reference the null_stream global.
1032         (do_ui_file_delete): Delete.
1033         (gdb_insn_length): Use null_stream.
1034         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
1035         * dwarf2loc.c (dwarf2_compile_property_to_c)
1036         (locexpr_generate_c_location, loclist_generate_c_location): Take a
1037         'string_file &' instead of a 'ui_file *'.
1038         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
1039         * dwarf2read.c (do_ui_file_peek_last): Delete.
1040         (dwarf2_compute_name): Use string_file.
1041         * event-top.c (gdb_setup_readline): Use stdio_file.
1042         * gdbarch.sh (verify_gdbarch): Use string_file.
1043         * gdbtypes.c (safe_parse_type): Use null_stream.
1044         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
1045         string_file.
1046         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
1047         'string_file *' instead of a 'ui_file *'.
1048         (gdbscm_arch_disassemble): Use string_file.
1049         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
1050         * guile/scm-ports.c (class ioscm_file_port): Now a class that
1051         inherits from ui_file.
1052         (ioscm_file_port_delete, ioscm_file_port_rewind)
1053         (ioscm_file_port_put): Delete.
1054         (ioscm_file_port_write): Rename to ...
1055         (ioscm_file_port::write): ... this.  Remove file_port_magic
1056         checks.
1057         (ioscm_file_port_new): Delete.
1058         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
1059         ui_file_up.
1060         * guile/scm-type.c (tyscm_type_name): Use string_file.
1061         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
1062         Use string_file.
1063         * infcmd.c (print_return_value_1): Use string_file.
1064         * infrun.c (print_target_wait_results): Use string_file.
1065         * language.c (add_language): Use string_file.
1066         * location.c (explicit_to_string_internal): Use string_file.
1067         * main.c (captured_main_1): Use null_file.
1068         * maint.c (maintenance_print_architecture): Use stdio_file.
1069         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
1070         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
1071         event_channel>: Change type to mi_console_file pointer.
1072         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
1073         (mi_console_file_delete): Delete.
1074         (struct mi_console_file): Delete.
1075         (mi_console_file_magic): Delete.
1076         (mi_console_file_new): Delete.
1077         (mi_console_file::mi_console_file): New.
1078         (mi_console_file_delete): Delete.
1079         (mi_console_file_fputs): Delete.
1080         (mi_console_file::write): New.
1081         (mi_console_raw_packet): Delete.
1082         (mi_console_file::flush): New.
1083         (mi_console_file_flush): Delete.
1084         (mi_console_set_raw): Rename to ...
1085         (mi_console_file::set_raw): ... this.
1086         * mi/mi-console.h (class mi_console_file): New class.
1087         (mi_console_file_new, mi_console_set_raw): Delete.
1088         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
1089         (mi_set_logging): Use delete and tee_file.  Adjust.
1090         * mi/mi-main.c (output_register): Use string_file.
1091         (mi_cmd_data_evaluate_expression): Use string_file.
1092         (mi_cmd_data_read_memory): Use string_file.
1093         (mi_cmd_execute, print_variable_or_computed): Use string_file.
1094         * mi/mi-out.c (mi_ui_out::main_stream): New.
1095         (mi_ui_out::rewind): Use main_stream and
1096         string_file.
1097         (mi_ui_out::put): Use main_stream and string_file.
1098         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
1099         Allocate a 'string_file' instead.
1100         (mi_out_new): Don't allocate a mem_fileopen stream here.
1101         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
1102         (mi_ui_out::main_stream): Declare method.
1103         * printcmd.c (eval_command): Use string_file.
1104         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
1105         * python/py-arch.c (archpy_disassemble): Use string_file.
1106         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
1107         * python/py-frame.c (frapy_str): Use string_file.
1108         * python/py-framefilter.c (py_print_type, py_print_single_arg):
1109         Use string_file.
1110         * python/py-type.c (typy_str): Use string_file.
1111         * python/py-unwind.c (unwind_infopy_str): Use string_file.
1112         * python/py-value.c (valpy_str): Use string_file.
1113         * record-btrace.c (btrace_insn_history): Use string_file.
1114         * regcache.c (regcache_print): Use stdio_file.
1115         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
1116         * remote.c (escape_buffer): Use string_file.
1117         * rust-lang.c (rust_get_disr_info): Use string_file.
1118         * serial.c (serial_open_ops_1): Use stdio_file.
1119         (do_serial_close): Use delete.
1120         * stack.c (print_frame_arg): Use string_file.
1121         (print_frame_args): Remove local mem_fileopen stream, not used.
1122         (print_frame): Use string_file.
1123         * symmisc.c (maintenance_print_symbols): Use stdio_file.
1124         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1125         Take a 'string_file *' instead of a 'ui_file *'.
1126         * top.c (new_ui): Use stdio_file and stderr_file.
1127         (free_ui): Use delete.
1128         (execute_command_to_string): Use string_file.
1129         (quit_confirm): Use string_file.
1130         * tracepoint.c (collection_list::append_exp): Use string_file.
1131         * tui/tui-disasm.c (tui_disassemble): Use string_file.
1132         * tui/tui-file.c: Don't include "ui-file.h".
1133         (enum streamtype, struct tui_stream): Delete.
1134         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
1135         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
1136         (tui_file::tui_file): New method.
1137         (tui_file_fputs): Delete.
1138         (tui_file_get_strbuf): Delete.
1139         (tui_file::puts): New method.
1140         (tui_file_adjust_strbuf): Delete.
1141         (tui_file_flush): Delete.
1142         (tui_file::flush): New method.
1143         * tui/tui-file.h: Tweak intro comment.
1144         Include ui-file.h.
1145         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
1146         (tui_file_adjust_strbuf): Delete declarations.
1147         (class tui_file): New class.
1148         * tui/tui-io.c (tui_initialize_io): Use tui_file.
1149         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
1150         (tui_register_format): Use string_stream.
1151         * tui/tui-stack.c (tui_make_status_line): Use string_file.
1152         (tui_get_function_from_frame): Use string_file.
1153         * typeprint.c (type_to_string): Use string_file.
1154         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
1155         (null_stream): New global.
1156         (ui_file_delete): Delete.
1157         (ui_file::ui_file): New.
1158         (null_file_isatty): Delete.
1159         (ui_file::~ui_file): New.
1160         (null_file_rewind): Delete.
1161         (ui_file::printf): New.
1162         (null_file_put): Delete.
1163         (null_file_flush): Delete.
1164         (ui_file::putstr): New.
1165         (null_file_write): Delete.
1166         (ui_file::putstrn): New.
1167         (null_file_read): Delete.
1168         (ui_file::putc): New.
1169         (null_file_fputs): Delete.
1170         (null_file_write_async_safe): Delete.
1171         (ui_file::vprintf): New.
1172         (null_file_delete): Delete.
1173         (null_file::write): New.
1174         (null_file_fseek): Delete.
1175         (null_file::puts): New.
1176         (ui_file_data): Delete.
1177         (null_file::write_async_safe): New.
1178         (gdb_flush, ui_file_isatty): Adjust.
1179         (ui_file_put, ui_file_rewind): Delete.
1180         (ui_file_write): Adjust.
1181         (ui_file_write_for_put): Delete.
1182         (ui_file_write_async_safe, ui_file_read): Adjust.
1183         (ui_file_fseek): Delete.
1184         (fputs_unfiltered): Adjust.
1185         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
1186         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
1187         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
1188         (set_ui_file_data): Delete.
1189         (string_file::~string_file, string_file::write)
1190         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
1191         (do_ui_file_as_string, ui_file_as_string): Delete.
1192         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
1193         (struct mem_file): Delete.
1194         (mem_file_new): Delete.
1195         (stdio_file::stdio_file): New.
1196         (mem_file_delete): Delete.
1197         (stdio_file::stdio_file): New.
1198         (mem_fileopen): Delete.
1199         (stdio_file::~stdio_file): New.
1200         (mem_file_rewind): Delete.
1201         (stdio_file::set_stream): New.
1202         (mem_file_put): Delete.
1203         (stdio_file::open): New.
1204         (mem_file_write): Delete.
1205         (stdio_file_magic, struct stdio_file): Delete.
1206         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
1207         (stdio_file::flush): New.
1208         (stdio_file_read): Rename to ...
1209         (stdio_file::read): ... this.  Adjust.
1210         (stdio_file_write): Rename to ...
1211         (stdio_file::write): ... this.  Adjust.
1212         (stdio_file_write_async_safe): Rename to ...
1213         (stdio_file::write_async_safe) ... this.  Adjust.
1214         (stdio_file_fputs): Rename to ...
1215         (stdio_file::puts) ... this.  Adjust.
1216         (stdio_file_isatty): Delete.
1217         (stdio_file_fseek): Delete.
1218         (stdio_file::isatty): New.
1219         (stderr_file_write): Rename to ...
1220         (stderr_file::write) ... this.  Adjust.
1221         (stderr_file_fputs): Rename to ...
1222         (stderr_file::puts) ... this.  Adjust.
1223         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
1224         (stderr_file::stderr_file): New.
1225         (tee_file_magic): Delete.
1226         (struct tee_file): Delete.
1227         (tee_file::tee_file): New.
1228         (tee_file_new): Delete.
1229         (tee_file::~tee_file): New.
1230         (tee_file_delete): Delete.
1231         (tee_file_flush): Rename to ...
1232         (tee_file::flush): ... this.  Adjust.
1233         (tee_file_write): Rename to ...
1234         (tee_file::write): ... this.  Adjust.
1235         (tee_file::write_async_safe): New.
1236         (tee_file_fputs): Rename to ...
1237         (tee_file::puts): ... this.  Adjust.
1238         (tee_file_isatty): Rename to ...
1239         (tee_file::isatty): ... this.  Adjust.
1240         * ui-file.h (struct obstack, struct ui_file): Don't
1241         forward-declare.
1242         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
1243         (ui_file_write_ftype)
1244         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
1245         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
1246         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
1247         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
1248         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
1249         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
1250         (set_ui_file_fseek): Delete.
1251         (ui_file_data, ui_file_delete, ui_file_rewind)
1252         (struct ui_file): New.
1253         (ui_file_up): New.
1254         (class null_file): New.
1255         (null_stream): Declare.
1256         (ui_file_write_for_put, ui_file_put): Delete.
1257         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
1258         Delete.
1259         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
1260         (gdb_fopen, tee_file_new): Delete.
1261         (struct string_file): New.
1262         (struct stdio_file): New.
1263         (stdio_file_up): New.
1264         (struct stderr_file): New.
1265         (class tee_file): New.
1266         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
1267         of a 'ui_file *'.  Adjust.
1268         * ui-out.h (class ui_out) <field_stream>: Likewise.
1269         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
1270         (null_stream): Delete.
1271         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
1272         Adjust.
1273         * utils.h (struct ui_file): Delete forward declaration..
1274         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
1275         (error_stream): Take a 'string_file &' instead of a
1276         'ui_file *'.
1277         * varobj.c (varobj_value_get_print_value): Use string_file.
1278         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
1279         * gdbarch.c: Regenerate.
1280
1281 2017-02-02  Pedro Alves  <palves@redhat.com>
1282
1283         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
1284         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
1285         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
1286         Adjust to call gdb_print_insn instead of
1287         gdb_disassembler::print_insn.
1288         (dump_insns, do_mixed_source_and_assembly_deprecated)
1289         (do_mixed_source_and_assembly, do_assembly_only): Add back a
1290         'gdbarch' parameter.  Remove gdb_disassembler parameter.
1291         (gdb_disassembly): Don't allocate a gdb_disassembler here.
1292         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
1293         declaration.
1294         (gdb_pretty_print_insn): Re-add declaration.
1295         * record-btrace.c (btrace_insn_history): Don't allocate a
1296         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
1297
1298 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
1299
1300         * disasm.h (gdb_disassembly): Remove file_string parameter.
1301         * disasm.c (gdb_disassembly): Likewise.
1302         * cli/cli-cmds.c (print_disassembly): Adapt.
1303         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
1304         * stack.c (do_gdb_disassembly): Likewise.
1305
1306 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1307
1308         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
1309         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
1310         targets.  And if the implicit value is longer than needed, extract
1311         the first bytes instead of the "least significant" ones.
1312
1313 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
1314
1315         * btrace.c (btrace_enable): Do not call btrace_add_pc for
1316         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
1317         (btrace_fetch): Assert can_access_registers_ptid.
1318         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
1319         validate_registers_access.
1320
1321 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
1322
1323         * gdbthread.h (can_access_registers_ptid): New.
1324         * thread.c (can_access_registers_ptid): New.
1325
1326 2017-02-01  Pedro Alves  <palves@redhat.com>
1327
1328         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
1329
1330 2017-01-31  Pedro Alves  <palves@redhat.com>
1331
1332         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
1333         Fix typos.
1334
1335 2017-01-31  Pedro Alves  <palves@redhat.com>
1336
1337         * stack.c (print_frame_args): Remove local mem_fileopen stream,
1338         not used.
1339
1340 2017-01-31  Pedro Alves  <palves@redhat.com>
1341
1342         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
1343
1344 2017-01-31  Pedro Alves  <palves@redhat.com>
1345
1346         * common/scoped_restore.h
1347         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
1348         change the value's parameter type to T2.
1349         (make_scoped_restore): Likewise.
1350
1351 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1352             Richard Henderson  <rth@redhat.com>
1353
1354         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
1355         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
1356         GS_BASE for older kernels.
1357         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
1358         GS_BASE for older kernels.
1359         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
1360         and GS_BASE to the offset table.
1361         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
1362         system register group.
1363         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
1364         for older kernels.
1365         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
1366         amd64 ABI.
1367         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
1368         AMD64_GSBASE_REGNUM.
1369         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
1370         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
1371         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
1372         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
1373         i386/64bit-segments.xml in those rules.
1374         * features/i386/64bit-segments.xml: New file.
1375         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
1376         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
1377         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
1378         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
1379         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
1380         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
1381         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
1382         * features/i386/amd64-avx-linux.c: Regenerated.
1383         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
1384         * features/i386/amd64-avx-mpx.c: Regenerated.
1385         * features/i386/amd64-avx512-linux.c: Regenerated.
1386         * features/i386/amd64-linux.c: Regenerated.
1387         * features/i386/amd64-mpx-linux.c: Regenerated.
1388         * features/i386/i386-avx-mpx-linux.c: Regenerated.
1389         * features/i386/i386-avx-mpx.c: Regenerated.
1390         * features/i386/x32-avx-linux.c: Regenerated.
1391         * features/i386/x32-avx512-linux.c: Regenerated.
1392         * regformats/i386/amd64-avx-linux.dat: Regenerated.
1393         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
1394         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
1395         * regformats/i386/amd64-linux.dat: Regenerated.
1396         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
1397         * regformats/i386/x32-avx-linux.dat: Regenerated.
1398         * regformats/i386/x32-avx512-linux.dat: Regenerated.
1399         * regformats/i386/x32-linux.dat: Regenerated.
1400
1401 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1402
1403         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
1404         Set to AMD64_NUM_REGS.
1405
1406 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1407
1408         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
1409         that checks validity of a register number.
1410
1411 2017-01-27  Kees Cook  <keescook@google.com>
1412
1413         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
1414         fetch_fpregs if target has fpa registers.
1415         (arm_linux_store_inferior_registers): Call store_fpregs if target
1416         has fpa registers.
1417
1418 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1419
1420         * cris-tdep.c (cris_gdbarch_init): Remove check for
1421         info.byte_order and force it to BFD_ENDIAN_LITTLE.
1422
1423 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1424
1425         * corelow.c (get_core_register_section): Check for regset
1426         existence before checking for REGSET_VARIABLE_SIZE.
1427
1428 2017-01-26  Yao Qi  <yao.qi@linaro.org>
1429             Pedro Alves  <palves@redhat.com>
1430
1431         PR gdb/20939
1432         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
1433         call memory_error, save memaddr instead.
1434         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
1435         negative, cal memory_error.
1436         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
1437
1438 2017-01-26  Yao Qi  <yao.qi@linaro.org>
1439
1440         * disasm-selftests.c (memory_error_test): New function.
1441         (_initialize_disasm_selftests): Register memory_error_test.
1442
1443 2017-01-26  Yao Qi  <yao.qi@linaro.org>
1444
1445         * Makefile.in (SFILES): Add disasm-selftests.c and
1446         selftest-arch.c.
1447         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
1448         * disasm-selftests.c: New file.
1449         * selftest-arch.c: New file.
1450         * selftest-arch.h: New file.
1451
1452 2017-01-26  Yao Qi  <yao.qi@linaro.org>
1453
1454         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
1455         to bfd_arch_mep.  Don't return 0 if section is not
1456         found.  Call print_insn_mep.
1457
1458 2017-01-26  Pedro Alves  <palves@redhat.com>
1459             Yao Qi  <yao.qi@linaro.org>
1460
1461         * arm-tdep.c: Include "disasm.h".
1462         (gdb_print_insn_arm): Update code to get gdbarch.
1463         * disasm.c (dis_asm_read_memory): Change it to
1464         gdb_disassembler::dis_asm_read_memory.
1465         (dis_asm_memory_error): Likewise.
1466         (dis_asm_print_address): Likewise.
1467         (gdb_pretty_print_insn): Change it to
1468         gdb_disassembler::pretty_print_insn.
1469         (dump_insns): Add one argument gdb_disassemlber.  All
1470         callers updated.
1471         (do_mixed_source_and_assembly_deprecated): Likewise.
1472         (do_mixed_source_and_assembly): Likewise.
1473         (do_assembly_only): Likewise.
1474         (gdb_disassembler::gdb_disassembler): New.
1475         (gdb_disassembler::print_insn): New.
1476         * disasm.h (class gdb_disassembler): New.
1477         (gdb_pretty_print_insn): Remove declaration.
1478         (gdb_disassemble_info): Likewise.
1479         * guile/scm-disasm.c (class gdbscm_disassembler): New.
1480         (gdbscm_disasm_read_memory_worker): Update.
1481         (gdbscm_disasm_read_memory): Update.
1482         (gdbscm_disasm_memory_error): Remove.
1483         (gdbscm_disasm_print_address): Remove.
1484         (gdbscm_disassembler::gdbscm_disassembler): New.
1485         (gdbscm_print_insn_from_port): Update.
1486         * mips-tdep.c: Include disasm.h.
1487         (gdb_print_insn_mips): Update code to get gdbarch.
1488         * record-btrace.c (btrace_insn_history): Update.
1489         * spu-tdep.c: Include disasm.h.
1490         (struct spu_dis_asm_data): Remove.
1491         (struct spu_dis_asm_info): New.
1492         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
1493         SPU id.
1494         (gdb_print_insn_spu): Cast disassemble_info to
1495         spu_dis_asm_info.
1496
1497 2017-01-26  Yao Qi  <yao.qi@linaro.org>
1498
1499         * disasm.c (do_ui_file_delete): Delete.
1500         (gdb_insn_length): Move code creating stream to ...
1501         * utils.c (null_stream): ... here.  New function.
1502         * utils.h (null_stream): Declare.
1503
1504 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
1505
1506         * python/py-inferior.c (find_thread_object): Return directly
1507         from the loop.  Remove "found" variable.
1508
1509 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
1510
1511         GDB 7.12.1 released.
1512
1513 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
1514
1515         * python/py-function.c (fnpy_call): Reorder declarations to have
1516         the gdbpy_enter object declared first.
1517         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
1518
1519 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
1520
1521         PR python/21068
1522         * python/python-internal.h (PyMem_RawMalloc): Define for
1523         Python < 3.4.
1524         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
1525         PyMem_RawMalloc instead of PyMem_Malloc.
1526
1527 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
1528             Luis Machado  <lgustavo@codesourcery.com>
1529
1530         * NEWS (New commands): Mention flash-erase.
1531         (New MI commands): Mention target-flash-erase.
1532         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
1533         command.
1534         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
1535         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
1536         * target.c (flash_erase_command): New function.
1537         (initialize_targets): Add new flash-erase command.
1538         * target.h (flash_erase_command): New declaration.
1539
1540 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
1541
1542         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
1543         HAVE_SYS_PROCFS_H is defined.
1544
1545 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
1546
1547         * remote.c (struct cached_reg): Change data into a pointer.
1548         * (stop_reply_dtr): Free data pointers before deleting vector.
1549         (process_stop_reply): Likewise.
1550         (remote_parse_stop_reply): Allocate space for data
1551
1552 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
1553
1554         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
1555         MAX_REGISTER_SIZE.
1556         (amd64_pseudo_register_read_value): Likewise.
1557         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
1558         (store_register_using_P): Likewise.
1559         * regcache.c (regcache_xfer_part): Likewise.
1560
1561 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
1562
1563         Split real and pseudo registers.
1564         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
1565         (sparc32_pseudo_regnum): New enum.
1566         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
1567         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
1568         (SPARC32_CP0_REGISTERS): New macro.
1569         (sparc32_pseudo_register_name): New function.
1570         (sparc32_register_name): Use sparc32_pseudo_register_name.
1571         (sparc32_pseudo_register_type): New function.
1572         (sparc32_register_type): Use sparc32_pseudo_register_type.
1573         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
1574         pseudo register numbers.
1575         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
1576         (SPARC64_CP0_REGISTERS): New macro.
1577         (sparc64_pseudo_register_name): New function.
1578         (sparc64_register_name): Use sparc64_pseudo_register_name.
1579         (sparc64_pseudo_register_type): New function.
1580         (sparc64_register_type): Use sparc64_pseudo_register_type.
1581         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
1582         pseudo register numbers.
1583         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
1584         sparc64_store_arguments): Handle pseudo register numbers.
1585
1586 2017-01-13  Yao Qi  <yao.qi@linaro.org>
1587
1588         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
1589         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
1590         output.
1591         (getpkt_or_notif_sane_1): Likewise.
1592
1593 2017-01-13  Yao Qi  <yao.qi@linaro.org>
1594
1595         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
1596         of CC.  Pass "-x c++-header" instead of "-x c".
1597
1598 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
1599
1600         * remote.c (remote_can_async_p): Update comment.
1601
1602 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
1603
1604         * linux-nat.c (linux_nat_can_async_p): Update comment.
1605
1606 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
1607
1608         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
1609
1610 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
1611
1612         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
1613
1614 2017-01-10  Tom Tromey  <tom@tromey.com>
1615
1616         * python/py-type.c (typy_legacy_template_argument): Update.
1617         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
1618         ~demangle_parse_info): Declare new members.
1619         (cp_demangled_name_to_comp): Return unique_ptr.
1620         (cp_demangled_name_parse_free)
1621         (make_cleanup_cp_demangled_name_parse_free)
1622         (cp_new_demangle_parse_info): Remove.
1623         * cp-support.c (do_demangled_name_parse_free_cleanup)
1624         (make_cleanup_cp_demangled_name_parse_free): Remove.
1625         (inspect_type, cp_canonicalize_string_full)
1626         (cp_canonicalize_string): Update.
1627         (mangled_name_to_comp): Change return type.
1628         (cp_class_name_from_physname, method_name_from_physname)
1629         (cp_func_name, cp_remove_params): Update.
1630         * cp-name-parser.y (demangle_parse_info): New constructor, from
1631         cp_new_demangle_parse_info.
1632         (~demangle_parse_info): New destructor, from
1633         cp_demangled_name_parse_free.
1634         (cp_merge_demangle_parse_infos): Update.
1635         (cp_demangled_name_to_comp): Change return type.
1636
1637 2017-01-10  Tom Tromey  <tom@tromey.com>
1638
1639         * top.c (prevent_dont_repeat): Change return type.
1640         * python/python.c (execute_gdb_command): Use std::string.
1641         Update.
1642         * guile/guile.c (gdbscm_execute_gdb_command): Update.
1643         * command.h (prevent_dont_repeat): Change return type.
1644         * breakpoint.c (bpstat_do_actions_1): Update.
1645
1646 2017-01-10  Tom Tromey  <tom@tromey.com>
1647
1648         * value.h (scoped_value_mark::~scoped_value_mark): Call
1649         free_to_mark.
1650         (scoped_value_mark::free_to_mark): New method.
1651         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
1652         scoped_value_mark.
1653
1654 2017-01-10  Tom Tromey  <tom@tromey.com>
1655
1656         * python/py-value.c (valpy_dereference, valpy_referenced_value)
1657         (valpy_reference_value, valpy_const_value, valpy_get_address)
1658         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
1659         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
1660         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
1661         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
1662         scoped_value_mark.
1663         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
1664         * value.h (scoped_value_mark): New class.
1665
1666 2017-01-10  Tom Tromey  <tom@tromey.com>
1667
1668         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
1669         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
1670         * psymtab.c (discard_psymtabs_upto): Remove.
1671         (make_cleanup_discard_psymtabs): Remove.
1672         (struct psymtab_state): Remove.
1673
1674 2017-01-10  Tom Tromey  <tom@tromey.com>
1675
1676         * record-full.c (record_full_save_cleanups): Remove.
1677         (record_full_save): Use gdb::unlinker.
1678         * gcore.c (do_bfd_delete_cleanup): Remove.
1679         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
1680         cleanups.
1681         * dwarf2read.c (unlink_if_set): Remove.
1682         (write_psymtabs_to_index): Use gdb::unlinker.
1683         * common/gdb_unlinker.h: New file.
1684
1685 2017-01-10  Tom Tromey  <tom@tromey.com>
1686
1687         * windows-tdep.c (windows_xfer_shared_library): Update.
1688         * windows-nat.c (windows_make_so): Update.
1689         * utils.h (make_cleanup_bfd_unref): Remove.
1690         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
1691         * symfile.h (symfile_bfd_open)
1692         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
1693         * symfile.c (read_symbols, symbol_file_add)
1694         (separate_debug_file_exists): Update.
1695         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
1696         (generic_load, reread_symbols): Update.
1697         * symfile-mem.c (symbol_file_add_from_memory): Update.
1698         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
1699         (spu_symbol_file_add_from_memory): Update.
1700         * solist.h (struct target_so_ops) <bfd_open>: Return
1701         gdb_bfd_ref_ptr.
1702         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
1703         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
1704         gdb_bfd_ref_ptr.
1705         (solib_map_sections, reload_shared_libraries_1): Update.
1706         * solib-svr4.c (enable_break): Update.
1707         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
1708         * solib-frv.c (enable_break2): Update.
1709         * solib-dsbt.c (enable_break): Update.
1710         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
1711         gdb_bfd_ref_ptr.
1712         (darwin_solib_get_all_image_info_addr_at_init): Update.
1713         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
1714         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
1715         * record-full.c (record_full_save): Update.
1716         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
1717         * procfs.c (insert_dbx_link_bpt_in_file): Update.
1718         * minidebug.c (find_separate_debug_file_in_section): Return
1719         gdb_bfd_ref_ptr.
1720         * machoread.c (macho_add_oso_symfile): Change abfd to
1721         gdb_bfd_ref_ptr.
1722         (macho_symfile_read_all_oso): Update.
1723         (macho_check_dsym): Return gdb_bfd_ref_ptr.
1724         (macho_symfile_read): Update.
1725         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
1726         (jit_bfd_try_read_symtab): Update.
1727         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1728         (gdb_bfd_openw, gdb_bfd_openr_iovec)
1729         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
1730         gdb_bfd_ref_ptr.
1731         (gdb_bfd_ref_policy): New struct.
1732         (gdb_bfd_ref_ptr): New typedef.
1733         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1734         (gdb_bfd_openw, gdb_bfd_openr_iovec)
1735         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
1736         gdb_bfd_ref_ptr.
1737         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
1738         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
1739         (gcore_command): Update.
1740         * exec.c (exec_file_attach): Update.
1741         * elfread.c (elf_symfile_read): Update.
1742         * dwarf2read.c (dwarf2_get_dwz_file): Update.
1743         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
1744         (open_and_init_dwo_file): Update.
1745         (open_dwp_file): Return gdb_bfd_ref_ptr.
1746         (open_and_init_dwp_file): Update.
1747         * corelow.c (core_open): Update.
1748         * compile/compile-object-load.c (compile_object_load): Update.
1749         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
1750         * coffread.c (coff_symfile_read): Update.
1751         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
1752         gdb_bfd_ref_ptr.  Rename.
1753         (dump_bfd_file, restore_command): Update.
1754         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
1755         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
1756         (find_separate_debug_file_by_buildid): Update.
1757
1758 2017-01-10  Tom Tromey  <tom@tromey.com>
1759
1760         * common/gdb_ref_ptr.h: New file.
1761         * python/py-ref.h (struct gdbpy_ref_policy): New.
1762         (gdbpy_ref): Now a typedef.
1763
1764 2017-01-10  Tom Tromey  <tom@tromey.com>
1765
1766         * utils.h (make_cleanup_htab_delete): Don't declare.
1767         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
1768         Remove.
1769         * linespec.c (decode_compound_collector): Add constructor,
1770         destructor.
1771         (lookup_prefix_sym): Remove cleanup.
1772         (symtab_collector): Add constructor, destructor.
1773         (collect_symtabs_from_filename): Remove cleanup.
1774         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
1775         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1776         Use htab_up.
1777         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
1778         * dwarf2read.c (dw2_expand_symtabs_matching)
1779         (dw2_map_symbol_filenames, dwarf_decode_macros)
1780         (write_psymtabs_to_index): Use htab_up.
1781         * dwarf2loc.c (func_verify_no_selftailcall)
1782         (call_site_find_chain_1, func_verify_no_selftailcall)
1783         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
1784         std::vector, gdb::unique_xmalloc_ptr.
1785         (call_sitep): Remove typedef.
1786         (dwarf2_locexpr_baton_eval): Remove unused variable.
1787
1788 2017-01-10  Tom Tromey  <tom@tromey.com>
1789
1790         * python/python-internal.h (make_cleanup_py_decref)
1791         (make_cleanup_py_xdecref): Don't declare.
1792         * python/py-utils.c (py_decref, make_cleanup_py_decref)
1793         (py_xdecref, make_cleanup_py_xdecref): Remove.
1794
1795 2017-01-10  Tom Tromey  <tom@tromey.com>
1796
1797         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
1798         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
1799
1800 2017-01-10  Tom Tromey  <tom@tromey.com>
1801
1802         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
1803
1804 2017-01-10  Tom Tromey  <tom@tromey.com>
1805
1806         * python/py-utils.c (unicode_to_encoded_string)
1807         (python_string_to_target_string)
1808         (python_string_to_target_python_string)
1809         (python_string_to_host_string, gdbpy_obj_to_string)
1810         (get_addr_from_python): Use gdbpy_ref.
1811
1812 2017-01-10  Tom Tromey  <tom@tromey.com>
1813
1814         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
1815         gdbpy_ref.
1816
1817 2017-01-10  Tom Tromey  <tom@tromey.com>
1818
1819         * python/python.c (eval_python_command, gdbpy_decode_line)
1820         (gdbpy_run_events, gdbpy_start_type_printers)
1821         (gdbpy_apply_type_printers): Use gdbpy_ref.
1822
1823 2017-01-10  Tom Tromey  <tom@tromey.com>
1824
1825         * python/py-param.c (get_doc_string, compute_enum_values): Use
1826         gdbpy_ref.
1827
1828 2017-01-10  Tom Tromey  <tom@tromey.com>
1829
1830         * python/py-inferior.c (find_thread_object, build_inferior_list):
1831         Use gdbpy_ref.
1832
1833 2017-01-10  Tom Tromey  <tom@tromey.com>
1834
1835         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
1836
1837 2017-01-10  Tom Tromey  <tom@tromey.com>
1838
1839         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
1840         gdbpy_ref.
1841
1842 2017-01-10  Tom Tromey  <tom@tromey.com>
1843
1844         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
1845         extra incref.
1846         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
1847         Use gdbpy_ref.
1848
1849 2017-01-10  Tom Tromey  <tom@tromey.com>
1850
1851         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
1852         gdbpy_ref.
1853
1854 2017-01-10  Tom Tromey  <tom@tromey.com>
1855
1856         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
1857         decref results of PyArg_ParseTupleAndKeywords.
1858
1859 2017-01-10  Tom Tromey  <tom@tromey.com>
1860
1861         * python/python.c (python_run_simple_file): Use
1862         unique_xmalloc_ptr, gdbpy_ref.
1863
1864 2017-01-10  Tom Tromey  <tom@tromey.com>
1865
1866         * python/py-prettyprint.c (print_stack_unless_memory_error)
1867         (print_string_repr, print_children): Use gdbpy_ref.
1868         (dummy_python_frame): New class.
1869         (dummy_python_frame::dummy_python_frame): Rename from
1870         push_dummy_python_frame.
1871         (py_restore_tstate): Remove.
1872
1873 2017-01-10  Tom Tromey  <tom@tromey.com>
1874
1875         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
1876
1877 2017-01-10  Tom Tromey  <tom@tromey.com>
1878
1879         * python/python.c (ensure_python_env, restore_python_env):
1880         Remove.
1881         * python/python-internal.h (ensure_python_env): Don't declare.
1882         * varobj.h (varobj_ensure_python_env): Don't declare.
1883         * varobj.c (varobj_ensure_python_env): Remove.
1884
1885 2017-01-10  Tom Tromey  <tom@tromey.com>
1886
1887         * varobj.c (varobj_value_get_print_value): Use
1888         gdbpy_enter_varobj.
1889
1890 2017-01-10  Tom Tromey  <tom@tromey.com>
1891
1892         * python/py-prettyprint.c (print_string_repr, print_children):
1893         Update.
1894         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
1895         of "encoding".
1896         * varobj.c (varobj_value_get_print_value): Update.
1897         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
1898
1899 2017-01-10  Tom Tromey  <tom@tromey.com>
1900
1901         * varobj.c (varobj_get_display_hint)
1902         (dynamic_varobj_has_child_method, install_new_value_visualizer)
1903         (varobj_set_visualizer, free_variable): Use
1904         gdbpy_enter_varobj.
1905
1906 2017-01-10  Tom Tromey  <tom@tromey.com>
1907
1908         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
1909         (do_finish_initialization): New function.  Use gdbpy_ref.
1910         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
1911         do_finish_initialization.
1912
1913 2017-01-10  Tom Tromey  <tom@tromey.com>
1914
1915         * python/py-param.c (get_set_value, get_show_value): Use
1916         gdbpy_enter, gdbpy_ref.
1917
1918 2017-01-10  Tom Tromey  <tom@tromey.com>
1919
1920         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
1921
1922 2017-01-10  Tom Tromey  <tom@tromey.com>
1923
1924         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
1925
1926 2017-01-10  Tom Tromey  <tom@tromey.com>
1927
1928         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
1929         Use gdbpy_enter_varobj.
1930
1931 2017-01-10  Tom Tromey  <tom@tromey.com>
1932
1933         * varobj.c (gdbpy_enter_varobj): New constructor.
1934         * python/python-internal.h (gdbpy_enter_varobj): New class.
1935         * python/py-varobj.c (py_varobj_get_iterator): Use
1936         gdbpy_enter_varobj.
1937
1938 2017-01-10  Tom Tromey  <tom@tromey.com>
1939
1940         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
1941         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
1942         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
1943         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
1944         unique_xmalloc_ptr.
1945         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
1946
1947 2017-01-10  Tom Tromey  <tom@tromey.com>
1948
1949         * python/py-xmethods.c (invoke_match_method): Use
1950         gdbpy_ref.
1951
1952 2017-01-10  Tom Tromey  <tom@tromey.com>
1953
1954         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
1955         gdbpy_enter, gdbpy_ref.
1956
1957 2017-01-10  Tom Tromey  <tom@tromey.com>
1958
1959         * python/python.c (python_interactive_command): Use gdbpy_enter.
1960
1961 2017-01-10  Tom Tromey  <tom@tromey.com>
1962
1963         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
1964         gdbpy_ref.
1965
1966 2017-01-10  Tom Tromey  <tom@tromey.com>
1967
1968         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
1969         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
1970
1971 2017-01-10  Tom Tromey  <tom@tromey.com>
1972
1973         * utils.h (htab_deleter): New struct.
1974         (htab_up): New typedef.
1975         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
1976         gdbpy_enter, gdbpy_ref, htab_up.
1977
1978 2017-01-10  Tom Tromey  <tom@tromey.com>
1979
1980         * python/py-unwind.c (pending_frame_invalidate): Remove.
1981         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
1982
1983 2017-01-10  Tom Tromey  <tom@tromey.com>
1984
1985         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
1986         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
1987
1988 2017-01-10  Tom Tromey  <tom@tromey.com>
1989
1990         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
1991
1992 2017-01-10  Tom Tromey  <tom@tromey.com>
1993
1994         * python/python.c (gdbpy_eval_from_control_command)
1995         (gdbpy_source_script, gdbpy_run_events)
1996         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
1997         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
1998         gdbpy_enter.
1999
2000 2017-01-10  Tom Tromey  <tom@tromey.com>
2001
2002         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
2003
2004 2017-01-10  Tom Tromey  <tom@tromey.com>
2005
2006         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
2007
2008 2017-01-10  Tom Tromey  <tom@tromey.com>
2009
2010         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
2011         (python_on_inferior_call_pre, python_on_inferior_call_post)
2012         (python_on_memory_change, python_on_register_change)
2013         (python_inferior_exit, python_new_objfile, add_thread_object)
2014         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
2015
2016 2017-01-10  Tom Tromey  <tom@tromey.com>
2017
2018         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
2019         (bpfinishpy_handle_exit): Use gdbpy_enter.
2020
2021 2017-01-10  Tom Tromey  <tom@tromey.com>
2022
2023         * python/py-cmd.c (cmdpy_destroyer)
2024         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
2025         gdbpy_enter.
2026
2027 2017-01-10  Tom Tromey  <tom@tromey.com>
2028
2029         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
2030         gdbpy_enter.
2031         (gdbpy_breakpoint_has_cond): Likewise.
2032
2033 2017-01-10  Tom Tromey  <tom@tromey.com>
2034
2035         * python/python.c (gdbpy_enter): New constructor.
2036         (~gdbpy_enter): New destructor.
2037         (restore_python_env, ensure_python_env): Rewrite.
2038         * python/python-internal.h (gdbpy_enter): New class.
2039
2040 2017-01-10  Tom Tromey  <tom@tromey.com>
2041
2042         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
2043
2044 2017-01-10  Tom Tromey  <tom@tromey.com>
2045
2046         * python/py-value.c (value_has_field, get_field_flag)
2047         (get_field_type, valpy_getitem, convert_value_from_python): Use
2048         gdbpy_ref.
2049
2050 2017-01-10  Tom Tromey  <tom@tromey.com>
2051
2052         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
2053         gdbpy_ref.
2054
2055 2017-01-10  Tom Tromey  <tom@tromey.com>
2056
2057         * python/py-prettyprint.c (search_pp_list)
2058         (find_pretty_printer_from_objfiles)
2059         (find_pretty_printer_from_progspace)
2060         (find_pretty_printer_from_gdb, find_pretty_printer)
2061         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
2062         gdbpy_ref.
2063
2064 2017-01-10  Tom Tromey  <tom@tromey.com>
2065
2066         * python/py-param.c (call_doc_function): Use gdbpy_ref.
2067
2068 2017-01-10  Tom Tromey  <tom@tromey.com>
2069
2070         * python/py-linetable.c (build_line_table_tuple_from_pcs)
2071         (ltpy_get_all_source_lines): Use gdbpy_ref.
2072
2073 2017-01-10  Tom Tromey  <tom@tromey.com>
2074
2075         * python/py-framefilter.c (extract_sym, extract_value)
2076         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
2077         gdbpy_ref.
2078
2079 2017-01-10  Tom Tromey  <tom@tromey.com>
2080
2081         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
2082
2083 2017-01-10  Tom Tromey  <tom@tromey.com>
2084
2085         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
2086
2087 2017-01-10  Tom Tromey  <tom@tromey.com>
2088
2089         * python/py-function.c (convert_values_to_python, fnpy_init): Use
2090         gdbpy_ref.
2091
2092 2017-01-10  Tom Tromey  <tom@tromey.com>
2093
2094         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
2095
2096 2017-01-10  Tom Tromey  <tom@tromey.com>
2097
2098         * python/py-type.c (convert_field, make_fielditem, typy_fields)
2099         (typy_range): Use gdbpy_ref.
2100
2101 2017-01-10  Tom Tromey  <tom@tromey.com>
2102
2103         * python/py-threadevent.c (create_thread_event_object): Use
2104         gdbpy_ref.
2105         * python/py-stopevent.c (create_stop_event_object): Simplify.
2106         (emit_stop_event): Use gdbpy_ref.
2107         * python/py-signalevent.c (create_signal_event_object): Use
2108         gdbpy_ref.
2109         * python/py-newobjfileevent.c (create_new_objfile_event_object)
2110         (emit_new_objfile_event, create_clear_objfiles_event_object)
2111         (emit_clear_objfiles_event): Use gdbpy_ref.
2112         * python/py-infevents.c (create_inferior_call_event_object)
2113         (create_register_changed_event_object)
2114         (create_memory_changed_event_object, emit_inferior_call_event)
2115         (emit_memory_changed_event, emit_register_changed_event): Use
2116         gdbpy_ref.
2117         * python/py-exitedevent.c (create_exited_event_object)
2118         (emit_exited_event): Use gdbpy_ref.
2119         * python/py-event.h (evpy_emit_event): Remove
2120         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
2121         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
2122         * python/py-continueevent.c (emit_continue_event): Use
2123         gdbpy_ref.
2124         * python/py-breakpoint.c (gdbpy_breakpoint_created)
2125         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
2126         gdbpy_ref.
2127         * python/py-bpevent.c (create_breakpoint_event_object): Use
2128         gdbpy_ref.
2129
2130 2017-01-10  Tom Tromey  <tom@tromey.com>
2131
2132         * python/py-ref.h: New file.
2133
2134 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
2135
2136         * cli-out.c (cli_ui_out::do_redirect): Change return type to
2137         void.
2138         * cli-out.h (cli_ui_out::do_redirect): Likewise.
2139         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
2140         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
2141         * ui-out.c (ui_out::redirect): Likewise.
2142         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
2143         * cli/cli-logging.c (set_logging_redirect): Update call site of
2144         ui_out::redirect.
2145         (handle_redirections): Likewise.
2146         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
2147         * top.c (execute_command_to_string): Likewise.
2148         * utils.c (do_ui_out_redirect_pop): Likewise.
2149
2150 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
2151
2152         * stack.c (_initialize_stack): Update "frame" command help message.
2153
2154 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
2155
2156         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
2157
2158 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2159
2160         * x86-linux-nat.h: Include gdb_proc_service.h.
2161
2162 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2163
2164         * ser-base.h: Include serial.h.
2165
2166 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2167
2168         * ppc-linux-tdep.h: Include ppc-tdep.h.
2169
2170 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2171
2172         * nat/amd64-linux-siginfo.h: Include signal.h.
2173
2174 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2175
2176         * nat/aarch64-linux-hw-point.h: Include break-common.h.
2177
2178 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2179
2180         * mi/mi-parse.h: Include mi-cmds.h.
2181
2182 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2183
2184         * inf-loop.c: Don't include "target.h".
2185         * inf-loop.h: Include it here.
2186
2187 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2188
2189         * dfp.h: Include "dboulest.h" and "expression.h".
2190
2191 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2192
2193         * ax-gdb.h: Include "ax.h".
2194
2195 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2196
2197         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
2198         with nat/gdb_ptrace.h.
2199
2200 2017-01-05  Yao Qi  <yao.qi@linaro.org>
2201
2202         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
2203         new line.
2204         (mips64_fbsd_sigframe_init): Likewise.
2205
2206 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
2207
2208         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
2209         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
2210
2211 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
2212
2213         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2214         * NEWS: Mention new FreeBSD/mips native configuration.
2215         * config/mips/fbsd.mh: New file.
2216         * configure.host: Add mips*-*-freebsd*.
2217         * mips-fbsd-nat.c: New file.
2218
2219 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
2220
2221         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
2222         (ALLDEPFILES): Add mips-fbsd-tdep.c.
2223         * NEWS: Mention new FreeBSD/mips target.
2224         * configure.tgt: Add mips*-*-freebsd*.
2225         * mips-fbsd-tdep.c: New file.
2226         * mips-fbsd-tdep.h: New file.
2227
2228 2017-01-04  Yao Qi  <yao.qi@linaro.org>
2229
2230         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
2231         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
2232
2233 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
2234
2235         Update copyright year range in all GDB files.
2236
2237 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
2238
2239         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
2240
2241 For older changes see ChangeLog-2016.
2242 \f
2243 Local Variables:
2244 mode: change-log
2245 left-margin: 8
2246 fill-column: 74
2247 version-control: never
2248 coding: utf-8
2249 End: