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