Change one more spot to use gdbpy_ref
[binutils-gdb.git] / gdb / ChangeLog
1 2017-02-10 Tom Tromey <tom@tromey.com>
2
3 * python/py-prettyprint.c (pretty_print_one_value): Use
4 gdbpy_ref.
5
6 2017-02-10 Tom Tromey <tom@tromey.com>
7
8 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10 gdbpy_ref.
11 * python/py-type.c (field_new): Use gdbpy_ref.
12 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13 gdbpy_ref.
14 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15 (py_free_pspace): Likewise.
16 (pspace_to_pspace_object): Likewise.
17 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
18 (py_free_objfile): Likewise.
19 (objfile_to_objfile_object): Likewise.
20 * python/py-inferior.c (delete_thread_object): Use
21 gdbpy_ref.
22 (infpy_read_memory): Likewise.
23 (py_free_inferior): Likewise.
24 * python/py-evtregistry.c (create_eventregistry_object): Use
25 gdbpy_ref.
26 * python/py-event.c (create_event_object): Use gdbpy_ref.
27
28 2017-02-10 Tom Tromey <tom@tromey.com>
29
30 * python/py-ref.h (gdbpy_ref_policy): Now a template.
31 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
32 used.
33 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
34 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
35 python/py-exitedevent.c, python/py-finishbreakpoint.c,
36 python/py-framefilter.c, python/py-function.c,
37 python/py-inferior.c, python/py-infevents.c,
38 python/py-linetable.c, python/py-newobjfileevent.c,
39 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
40 python/py-signalevent.c, python/py-stopevent.c,
41 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
42 python/py-unwind.c, python/py-utils.c, python/py-value.c,
43 python/py-varobj.c, python/py-xmethods.c, python/python.c,
44 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
45
46 2017-02-10 Tom Tromey <tom@tromey.com>
47
48 * ui-out.h (ui_out_emit_type): New class.
49 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
50 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
51 and ui_out_emit_tuple.
52 (enumerate_locals): Likewise.
53 (py_mi_print_variables, py_print_locals, py_print_args): Use
54 ui_out_emit_list.
55 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
56 ui_out_emit_list.
57 * common/gdb_optional.h: New file.
58
59 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
60
61 * MAINTAINERS (Write After Approval): Update my e-mail address.
62
63 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
64
65 PR gdb/21122
66 * breakpoint.c (_initialize_breakpoint): Update the help description
67 of the 'commands' command to indicate that it takes a list argument.
68
69 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
70
71 * interps.c (current_interp_set_logging): Remove "return".
72
73 2017-02-09 Gary Benson <gbenson@redhat.com>
74
75 * symtab.c (add_symtab_completions): Prevent NULL pointer
76 dereference.
77
78 2017-02-08 Pedro Alves <palves@redhat.com>
79
80 * interps.c (interp::interp): Remove reference to quiet_p.
81 (interp_set): Make static. Remove dead "Switching to" output
82 code.
83 (interp_quiet_p, interp_set_quiet): Delete.
84 (interpreter_exec_cmd): Don't set the interpreter quiet.
85 * interps.h (interp_quiet_p): Make static.
86 (class interp) <quiet_p>: Remove field
87
88 2017-02-08 Jerome Guitton <guitton@adacore.com>
89
90 * cli/cli-decode.c (find_command_name_length): Make it extern.
91 * cli/cli-decode.h (find_command_name_length): Declare.
92 * cli/cli-script.c (command_name_equals, line_first_arg):
93 New functions.
94 (process_next_line): Use cli-decode to parse command names.
95 (build_command_line): Make args a constant pointer.
96
97 2017-02-08 Jerome Guitton <guitton@adacore.com>
98
99 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
100 Remove case-insensitive search.
101
102 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
103
104 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
105 at the end of the line. Avoids an ARI warning.
106
107 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
108
109 * NEWS: Mention support for record/replay of Intel 64 rdrand and
110 rdseed instructions.
111 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
112
113 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
114
115 PR tdep/20936
116 Provide and use sparc32 and sparc64 target description XML files.
117 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
118 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
119 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
120 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
121 * features/sparc/sparc32-solaris.xml: New file.
122 * features/sparc/sparc64-solaris.xml: New file.
123 * features/sparc/sparc32-solaris.c: Generated.
124 * features/sparc/sparc64-solaris.c: Generated.
125 * sparc-tdep.h: Account for differences in target descriptions.
126 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
127 (sparc32_register_type): Use target provided registers.
128 (validate_tdesc_registers): New function.
129 (sparc32_gdbarch_init): Use tdesc_has_registers.
130 Set pseudoregister functions.
131 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
132 (sparc64_register_type): Use target provided registers.
133 (sparc64_init_abi): Set pseudoregister functions.
134
135 2017-02-03 Tom Tromey <tom@tromey.com>
136
137 PR rust/21097:
138 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
139 with a single member.
140
141 2017-02-03 Pedro Alves <palves@redhat.com>
142
143 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
144 (cli_interp_base::~cli_interp_base): New.
145 (cli_interp): New struct.
146 (as_cli_interp): Cast the interp itself to cli_interp.
147 (cli_interpreter_pre_command_loop): Rename to ...
148 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
149 parameter.
150 (cli_interpreter_init): Rename to ...
151 (cli_interp::init): ... this. Remove 'self' parameter. Use
152 boolean. Make extern.
153 (cli_interpreter_resume): Rename to ...
154 (cli_interp::resume): ... this. Remove 'data' parameter. Make
155 extern.
156 (cli_interpreter_suspend): Rename to ...
157 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
158 extern.
159 (cli_interpreter_exec): Rename to ...
160 (cli_interp::exec): ... this. Remove 'data' parameter. Make
161 extern.
162 (cli_interpreter_supports_command_editing): Rename to ...
163 (cli_interp_base::supports_command_editing): ... this. Remove
164 'interp' parameter. Make extern.
165 (cli_ui_out): Rename to ...
166 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
167 Make extern.
168 (cli_set_logging): Rename to ...
169 (cli_interp_base::set_logging): ... this. Remove 'interp'
170 parameter. Make extern.
171 (cli_interp_procs): Delete.
172 (cli_interp_factory): Adjust to use "new".
173 * cli/cli-interp.h: Include "interps.h".
174 (struct cli_interp_base): New struct.
175 * interps.c (struct interp): Delete. Fields moved to interps.h.
176 (interp_new): Delete.
177 (interp::interp, interp::~interp): New.
178 (interp_set): Use bool, and return void. Assume the interpreter
179 has suspend, init and resume methods, and that the all return
180 void.
181 (set_top_level_interpreter): interp_set returns void.
182 (interp_ui_out): Adapt.
183 (current_interp_set_logging): Adapt.
184 (interp_data): Delete.
185 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
186 (interp_exec): Adapt.
187 (top_level_interpreter_data): Delete.
188 * interps.h (interp_init_ftype, interp_resume_ftype)
189 (interp_suspend_ftype, interp_exec_ftype)
190 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
191 (class interp): New.
192 (interp_new): Delete.
193 (interp_set): Now returns void. Use bool.
194 (interp_data, top_level_interpreter_data): Delete.
195 * mi/mi-common.h: Include interps.h.
196 (class mi_interp): Inherit from interp. Define a ctor. Declare
197 init, resume, suspect, exec, interp_ui_out, set_logging and
198 pre_command_loop methods.
199 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
200 (mi_interpreter_init): Rename to ...
201 (mi_interp::init): ... this. Remove the 'interp' parameter, use
202 bool, return void and make extern. Adjust.
203 (mi_interpreter_resume): ... Rename to ...
204 (mi_interp::resume): ... this. Remove the 'data' parameter,
205 return void and make extern. Adjust.
206 (mi_interpreter_suspend): ... Rename to ...
207 (mi_interp::suspend): ... this. Remove the 'data' parameter,
208 return void and make extern. Adjust.
209 (mi_interpreter_exec): ... Rename to ...
210 (mi_interp::exec): ... this. Remove the 'data' parameter and make
211 extern. Adjust.
212 (mi_interpreter_pre_command_loop): ... Rename to ...
213 (mi_interp::pre_command_loop): ... this. Remove the 'self'
214 parameter and make extern.
215 (mi_on_normal_stop_1): Adjust.
216 (mi_ui_out): Rename to ...
217 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
218 parameter and make extern. Adjust.
219 (mi_set_logging): Rename to ...
220 (mi_interp::set_logging): ... this. Remove the 'interp'
221 parameter and make extern. Adjust.
222 (mi_interp_procs): Delete.
223 (mi_interp_factory): Adjust to use 'new'.
224 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
225 (mi_print_exception, mi_execute_command, mi_load_progress):
226 Adjust.
227 * tui/tui-interp.c (tui_interp): New class.
228 (as_tui_interp): Return a tui_interp pointer.
229 (tui_on_normal_stop, tui_on_signal_received)
230 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
231 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
232 to use interp::interp_ui_out.
233 (tui_init): Rename to ...
234 (tui_interp::init): ... this. Remove the 'self' parameter, use
235 bool, return void and make extern. Adjust.
236 (tui_resume): Rename to ...
237 (tui_interp::resume): ... this. Remove the 'data' parameter,
238 return void and make extern. Adjust.
239 (tui_suspend): Rename to ...
240 (tui_interp::suspend): ... this. Remove the 'data' parameter,
241 return void and make extern. Adjust.
242 (tui_ui_out): Rename to ...
243 (tui_interp::interp_ui_out): ... this. Remove the 'self'
244 parameter, and make extern. Adjust.
245 (tui_exec): Rename to ...
246 (tui_interp::exec): ... this. Remove the 'data' parameter and
247 make extern.
248 (tui_interp_procs): Delete.
249 (tui_interp_factory): Use "new".
250
251 2017-02-02 Tom Tromey <tom@tromey.com>
252
253 * rust-exp.y (ends_raw_string, space_then_number)
254 (rust_identifier_start_p): Return bool.
255 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
256 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
257 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
258 (rust_chartype_p): Return bool.
259 (val_print_struct, rust_print_struct_def, rust_print_type):
260 Update.
261 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
262 Return bool.
263
264 2017-02-02 Tom Tromey <tom@tromey.com>
265
266 * rust-lang.c: Reindent.
267
268 2017-02-02 Tom Tromey <tom@tromey.com>
269
270 * rust-lang.h (rust_crate_for_block): Update.
271 * rust-lang.c (rust_crate_for_block): Return std::string.
272 (rust_get_disr_info): Use std:;string, not
273 gdb::unique_xmalloc_ptr.
274 * rust-exp.y (crate_name): Update.
275
276 2017-02-02 Pedro Alves <palves@redhat.com>
277
278 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
279 field out of gdb_disassembler_test and make it static.
280
281 2017-02-02 Pedro Alves <palves@redhat.com>
282
283 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
284 mi1_interp and mi_interp fields.
285
286 2017-02-02 Pedro Alves <palves@redhat.com>
287
288 * cli/cli-interp.c (struct saved_output_files, saved_output):
289 Moved from cli/cli-logging.c.
290 (cli_set_logging): New function.
291 (cli_interp_procs): Install cli_set_logging.
292 * cli/cli-interp.h (make_logging_output, cli_set_logging):
293 Declare.
294 * cli/cli-logging.c (struct saved_output_files, saved_output):
295 Moved to cli/cli-interp.c.
296 (pop_output_files): Don't save outputs here.
297 (make_logging_output): New function.
298 (handle_redirections): Don't build tee nor save previous outputs
299 here.
300 * interps.c (current_interp_set_logging): Change prototype.
301 Assume there's always a set_logging_proc method installed.
302 * interps.h (interp_set_logging_ftype): Change prototype.
303 (current_interp_set_logging): Change prototype and adjust comment.
304 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
305 use make_logging_output.
306 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
307 2017-02-02 Pedro Alves <palves@redhat.com>
308
309 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
310 from ...
311 (set_logging_overwrite): ... here.
312 (logging_no_redirect_file): Delete.
313 (set_logging_redirect): Don't handle redirection on the fly.
314 Instead warn that "logging off" / "logging on" is necessary.
315 (pop_output_files): Delete references to logging_no_redirect_file.
316 (show_logging_command): Always speak in terms of what will happen
317 once logging is reenabled.
318
319 2017-02-02 Pedro Alves <palves@redhat.com>
320
321 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
322
323 2017-02-02 Pedro Alves <palves@redhat.com>
324
325 * disasm.c (gdb_pretty_print_insn): Rename to ...
326 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
327 Remove gdbarch parameter. Adapt to clear the object's buffers
328 instead of allocating new buffers, and to print using the object's
329 gdb_disassembler instead of calling gdb_print_insn.
330 (dump_insns): Use gdb_pretty_print_disassembler.
331 * disasm.h (gdb_pretty_print_insn): Delete declaration.
332 (gdb_pretty_print_disassembler): New class.
333 * record-btrace.c (btrace_insn_history): Use
334 gdb_pretty_print_disassembler.
335
336 2017-02-02 Pedro Alves <palves@redhat.com>
337
338 * ada-lang.c (type_as_string): Use string_file.
339 * ada-valprint.c (ada_print_floating): Use string_file.
340 * ada-varobj.c (ada_varobj_scalar_image)
341 (ada_varobj_get_value_image): Use string_file.
342 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
343 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
344 * breakpoint.c (update_inserted_breakpoint_locations)
345 (insert_breakpoint_locations, reattach_breakpoints)
346 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
347 (print_it_watchpoint): Use string_file.
348 (save_breakpoints): Use stdio_file.
349 * c-exp.y (oper): Use string_file.
350 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
351 tee_file.
352 (pop_output_files): Use delete.
353 (handle_redirections): Use stdio_file and tee_file.
354 * cli/cli-setshow.c (do_show_command): Use string_file.
355 * compile/compile-c-support.c (c_compute_program): Use
356 string_file.
357 * compile/compile-c-symbols.c (generate_vla_size): Take a
358 'string_file &' instead of a 'ui_file *'.
359 (generate_c_for_for_one_variable): Take a 'string_file &' instead
360 of a 'ui_file *'. Use string_file.
361 (generate_c_for_variable_locations): Take a 'string_file &'
362 instead of a 'ui_file *'.
363 * compile/compile-internal.h (generate_c_for_for_one_variable):
364 Take a 'string_file &' instead of a 'ui_file *'.
365 * compile/compile-loc2c.c (push, pushf, unary, binary)
366 (print_label, pushf_register_address, pushf_register)
367 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
368 'ui_file *'. Adjust.
369 * compile/compile.c (compile_to_object): Use string_file.
370 * compile/compile.h (compile_dwarf_expr_to_c)
371 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
372 'ui_file *'.
373 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
374 (replace_typedefs_qualified_name): Use string_file and
375 obstack_copy0.
376 * disasm.c (gdb_pretty_print_insn): Use string_file.
377 (gdb_disassembly): Adjust reference the null_stream global.
378 (do_ui_file_delete): Delete.
379 (gdb_insn_length): Use null_stream.
380 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
381 * dwarf2loc.c (dwarf2_compile_property_to_c)
382 (locexpr_generate_c_location, loclist_generate_c_location): Take a
383 'string_file &' instead of a 'ui_file *'.
384 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
385 * dwarf2read.c (do_ui_file_peek_last): Delete.
386 (dwarf2_compute_name): Use string_file.
387 * event-top.c (gdb_setup_readline): Use stdio_file.
388 * gdbarch.sh (verify_gdbarch): Use string_file.
389 * gdbtypes.c (safe_parse_type): Use null_stream.
390 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
391 string_file.
392 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
393 'string_file *' instead of a 'ui_file *'.
394 (gdbscm_arch_disassemble): Use string_file.
395 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
396 * guile/scm-ports.c (class ioscm_file_port): Now a class that
397 inherits from ui_file.
398 (ioscm_file_port_delete, ioscm_file_port_rewind)
399 (ioscm_file_port_put): Delete.
400 (ioscm_file_port_write): Rename to ...
401 (ioscm_file_port::write): ... this. Remove file_port_magic
402 checks.
403 (ioscm_file_port_new): Delete.
404 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
405 ui_file_up.
406 * guile/scm-type.c (tyscm_type_name): Use string_file.
407 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
408 Use string_file.
409 * infcmd.c (print_return_value_1): Use string_file.
410 * infrun.c (print_target_wait_results): Use string_file.
411 * language.c (add_language): Use string_file.
412 * location.c (explicit_to_string_internal): Use string_file.
413 * main.c (captured_main_1): Use null_file.
414 * maint.c (maintenance_print_architecture): Use stdio_file.
415 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
416 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
417 event_channel>: Change type to mi_console_file pointer.
418 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
419 (mi_console_file_delete): Delete.
420 (struct mi_console_file): Delete.
421 (mi_console_file_magic): Delete.
422 (mi_console_file_new): Delete.
423 (mi_console_file::mi_console_file): New.
424 (mi_console_file_delete): Delete.
425 (mi_console_file_fputs): Delete.
426 (mi_console_file::write): New.
427 (mi_console_raw_packet): Delete.
428 (mi_console_file::flush): New.
429 (mi_console_file_flush): Delete.
430 (mi_console_set_raw): Rename to ...
431 (mi_console_file::set_raw): ... this.
432 * mi/mi-console.h (class mi_console_file): New class.
433 (mi_console_file_new, mi_console_set_raw): Delete.
434 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
435 (mi_set_logging): Use delete and tee_file. Adjust.
436 * mi/mi-main.c (output_register): Use string_file.
437 (mi_cmd_data_evaluate_expression): Use string_file.
438 (mi_cmd_data_read_memory): Use string_file.
439 (mi_cmd_execute, print_variable_or_computed): Use string_file.
440 * mi/mi-out.c (mi_ui_out::main_stream): New.
441 (mi_ui_out::rewind): Use main_stream and
442 string_file.
443 (mi_ui_out::put): Use main_stream and string_file.
444 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
445 Allocate a 'string_file' instead.
446 (mi_out_new): Don't allocate a mem_fileopen stream here.
447 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
448 (mi_ui_out::main_stream): Declare method.
449 * printcmd.c (eval_command): Use string_file.
450 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
451 * python/py-arch.c (archpy_disassemble): Use string_file.
452 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
453 * python/py-frame.c (frapy_str): Use string_file.
454 * python/py-framefilter.c (py_print_type, py_print_single_arg):
455 Use string_file.
456 * python/py-type.c (typy_str): Use string_file.
457 * python/py-unwind.c (unwind_infopy_str): Use string_file.
458 * python/py-value.c (valpy_str): Use string_file.
459 * record-btrace.c (btrace_insn_history): Use string_file.
460 * regcache.c (regcache_print): Use stdio_file.
461 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
462 * remote.c (escape_buffer): Use string_file.
463 * rust-lang.c (rust_get_disr_info): Use string_file.
464 * serial.c (serial_open_ops_1): Use stdio_file.
465 (do_serial_close): Use delete.
466 * stack.c (print_frame_arg): Use string_file.
467 (print_frame_args): Remove local mem_fileopen stream, not used.
468 (print_frame): Use string_file.
469 * symmisc.c (maintenance_print_symbols): Use stdio_file.
470 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
471 Take a 'string_file *' instead of a 'ui_file *'.
472 * top.c (new_ui): Use stdio_file and stderr_file.
473 (free_ui): Use delete.
474 (execute_command_to_string): Use string_file.
475 (quit_confirm): Use string_file.
476 * tracepoint.c (collection_list::append_exp): Use string_file.
477 * tui/tui-disasm.c (tui_disassemble): Use string_file.
478 * tui/tui-file.c: Don't include "ui-file.h".
479 (enum streamtype, struct tui_stream): Delete.
480 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
481 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
482 (tui_file::tui_file): New method.
483 (tui_file_fputs): Delete.
484 (tui_file_get_strbuf): Delete.
485 (tui_file::puts): New method.
486 (tui_file_adjust_strbuf): Delete.
487 (tui_file_flush): Delete.
488 (tui_file::flush): New method.
489 * tui/tui-file.h: Tweak intro comment.
490 Include ui-file.h.
491 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
492 (tui_file_adjust_strbuf): Delete declarations.
493 (class tui_file): New class.
494 * tui/tui-io.c (tui_initialize_io): Use tui_file.
495 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
496 (tui_register_format): Use string_stream.
497 * tui/tui-stack.c (tui_make_status_line): Use string_file.
498 (tui_get_function_from_frame): Use string_file.
499 * typeprint.c (type_to_string): Use string_file.
500 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
501 (null_stream): New global.
502 (ui_file_delete): Delete.
503 (ui_file::ui_file): New.
504 (null_file_isatty): Delete.
505 (ui_file::~ui_file): New.
506 (null_file_rewind): Delete.
507 (ui_file::printf): New.
508 (null_file_put): Delete.
509 (null_file_flush): Delete.
510 (ui_file::putstr): New.
511 (null_file_write): Delete.
512 (ui_file::putstrn): New.
513 (null_file_read): Delete.
514 (ui_file::putc): New.
515 (null_file_fputs): Delete.
516 (null_file_write_async_safe): Delete.
517 (ui_file::vprintf): New.
518 (null_file_delete): Delete.
519 (null_file::write): New.
520 (null_file_fseek): Delete.
521 (null_file::puts): New.
522 (ui_file_data): Delete.
523 (null_file::write_async_safe): New.
524 (gdb_flush, ui_file_isatty): Adjust.
525 (ui_file_put, ui_file_rewind): Delete.
526 (ui_file_write): Adjust.
527 (ui_file_write_for_put): Delete.
528 (ui_file_write_async_safe, ui_file_read): Adjust.
529 (ui_file_fseek): Delete.
530 (fputs_unfiltered): Adjust.
531 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
532 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
533 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
534 (set_ui_file_data): Delete.
535 (string_file::~string_file, string_file::write)
536 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
537 (do_ui_file_as_string, ui_file_as_string): Delete.
538 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
539 (struct mem_file): Delete.
540 (mem_file_new): Delete.
541 (stdio_file::stdio_file): New.
542 (mem_file_delete): Delete.
543 (stdio_file::stdio_file): New.
544 (mem_fileopen): Delete.
545 (stdio_file::~stdio_file): New.
546 (mem_file_rewind): Delete.
547 (stdio_file::set_stream): New.
548 (mem_file_put): Delete.
549 (stdio_file::open): New.
550 (mem_file_write): Delete.
551 (stdio_file_magic, struct stdio_file): Delete.
552 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
553 (stdio_file::flush): New.
554 (stdio_file_read): Rename to ...
555 (stdio_file::read): ... this. Adjust.
556 (stdio_file_write): Rename to ...
557 (stdio_file::write): ... this. Adjust.
558 (stdio_file_write_async_safe): Rename to ...
559 (stdio_file::write_async_safe) ... this. Adjust.
560 (stdio_file_fputs): Rename to ...
561 (stdio_file::puts) ... this. Adjust.
562 (stdio_file_isatty): Delete.
563 (stdio_file_fseek): Delete.
564 (stdio_file::isatty): New.
565 (stderr_file_write): Rename to ...
566 (stderr_file::write) ... this. Adjust.
567 (stderr_file_fputs): Rename to ...
568 (stderr_file::puts) ... this. Adjust.
569 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
570 (stderr_file::stderr_file): New.
571 (tee_file_magic): Delete.
572 (struct tee_file): Delete.
573 (tee_file::tee_file): New.
574 (tee_file_new): Delete.
575 (tee_file::~tee_file): New.
576 (tee_file_delete): Delete.
577 (tee_file_flush): Rename to ...
578 (tee_file::flush): ... this. Adjust.
579 (tee_file_write): Rename to ...
580 (tee_file::write): ... this. Adjust.
581 (tee_file::write_async_safe): New.
582 (tee_file_fputs): Rename to ...
583 (tee_file::puts): ... this. Adjust.
584 (tee_file_isatty): Rename to ...
585 (tee_file::isatty): ... this. Adjust.
586 * ui-file.h (struct obstack, struct ui_file): Don't
587 forward-declare.
588 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
589 (ui_file_write_ftype)
590 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
591 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
592 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
593 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
594 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
595 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
596 (set_ui_file_fseek): Delete.
597 (ui_file_data, ui_file_delete, ui_file_rewind)
598 (struct ui_file): New.
599 (ui_file_up): New.
600 (class null_file): New.
601 (null_stream): Declare.
602 (ui_file_write_for_put, ui_file_put): Delete.
603 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
604 Delete.
605 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
606 (gdb_fopen, tee_file_new): Delete.
607 (struct string_file): New.
608 (struct stdio_file): New.
609 (stdio_file_up): New.
610 (struct stderr_file): New.
611 (class tee_file): New.
612 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
613 of a 'ui_file *'. Adjust.
614 * ui-out.h (class ui_out) <field_stream>: Likewise.
615 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
616 (null_stream): Delete.
617 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
618 Adjust.
619 * utils.h (struct ui_file): Delete forward declaration..
620 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
621 (error_stream): Take a 'string_file &' instead of a
622 'ui_file *'.
623 * varobj.c (varobj_value_get_print_value): Use string_file.
624 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
625 * gdbarch.c: Regenerate.
626
627 2017-02-02 Pedro Alves <palves@redhat.com>
628
629 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
630 (gdb_pretty_print_insn): ... this. Now a free function. Add back
631 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
632 Adjust to call gdb_print_insn instead of
633 gdb_disassembler::print_insn.
634 (dump_insns, do_mixed_source_and_assembly_deprecated)
635 (do_mixed_source_and_assembly, do_assembly_only): Add back a
636 'gdbarch' parameter. Remove gdb_disassembler parameter.
637 (gdb_disassembly): Don't allocate a gdb_disassembler here.
638 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
639 declaration.
640 (gdb_pretty_print_insn): Re-add declaration.
641 * record-btrace.c (btrace_insn_history): Don't allocate a
642 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
643
644 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
645
646 * disasm.h (gdb_disassembly): Remove file_string parameter.
647 * disasm.c (gdb_disassembly): Likewise.
648 * cli/cli-cmds.c (print_disassembly): Adapt.
649 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
650 * stack.c (do_gdb_disassembly): Likewise.
651
652 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
653
654 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
655 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
656 targets. And if the implicit value is longer than needed, extract
657 the first bytes instead of the "least significant" ones.
658
659 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
660
661 * btrace.c (btrace_enable): Do not call btrace_add_pc for
662 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
663 (btrace_fetch): Assert can_access_registers_ptid.
664 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
665 validate_registers_access.
666
667 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
668
669 * gdbthread.h (can_access_registers_ptid): New.
670 * thread.c (can_access_registers_ptid): New.
671
672 2017-02-01 Pedro Alves <palves@redhat.com>
673
674 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
675
676 2017-01-31 Pedro Alves <palves@redhat.com>
677
678 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
679 Fix typos.
680
681 2017-01-31 Pedro Alves <palves@redhat.com>
682
683 * stack.c (print_frame_args): Remove local mem_fileopen stream,
684 not used.
685
686 2017-01-31 Pedro Alves <palves@redhat.com>
687
688 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
689
690 2017-01-31 Pedro Alves <palves@redhat.com>
691
692 * common/scoped_restore.h
693 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
694 change the value's parameter type to T2.
695 (make_scoped_restore): Likewise.
696
697 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
698 Richard Henderson <rth@redhat.com>
699
700 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
701 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
702 GS_BASE for older kernels.
703 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
704 GS_BASE for older kernels.
705 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
706 and GS_BASE to the offset table.
707 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
708 system register group.
709 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
710 for older kernels.
711 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
712 amd64 ABI.
713 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
714 AMD64_GSBASE_REGNUM.
715 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
716 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
717 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
718 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
719 i386/64bit-segments.xml in those rules.
720 * features/i386/64bit-segments.xml: New file.
721 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
722 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
723 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
724 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
725 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
726 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
727 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
728 * features/i386/amd64-avx-linux.c: Regenerated.
729 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
730 * features/i386/amd64-avx-mpx.c: Regenerated.
731 * features/i386/amd64-avx512-linux.c: Regenerated.
732 * features/i386/amd64-linux.c: Regenerated.
733 * features/i386/amd64-mpx-linux.c: Regenerated.
734 * features/i386/i386-avx-mpx-linux.c: Regenerated.
735 * features/i386/i386-avx-mpx.c: Regenerated.
736 * features/i386/x32-avx-linux.c: Regenerated.
737 * features/i386/x32-avx512-linux.c: Regenerated.
738 * regformats/i386/amd64-avx-linux.dat: Regenerated.
739 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
740 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
741 * regformats/i386/amd64-linux.dat: Regenerated.
742 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
743 * regformats/i386/x32-avx-linux.dat: Regenerated.
744 * regformats/i386/x32-avx512-linux.dat: Regenerated.
745 * regformats/i386/x32-linux.dat: Regenerated.
746
747 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
748
749 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
750 Set to AMD64_NUM_REGS.
751
752 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
753
754 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
755 that checks validity of a register number.
756
757 2017-01-27 Kees Cook <keescook@google.com>
758
759 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
760 fetch_fpregs if target has fpa registers.
761 (arm_linux_store_inferior_registers): Call store_fpregs if target
762 has fpa registers.
763
764 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
765
766 * cris-tdep.c (cris_gdbarch_init): Remove check for
767 info.byte_order and force it to BFD_ENDIAN_LITTLE.
768
769 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
770
771 * corelow.c (get_core_register_section): Check for regset
772 existence before checking for REGSET_VARIABLE_SIZE.
773
774 2017-01-26 Yao Qi <yao.qi@linaro.org>
775 Pedro Alves <palves@redhat.com>
776
777 PR gdb/20939
778 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
779 call memory_error, save memaddr instead.
780 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
781 negative, cal memory_error.
782 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
783
784 2017-01-26 Yao Qi <yao.qi@linaro.org>
785
786 * disasm-selftests.c (memory_error_test): New function.
787 (_initialize_disasm_selftests): Register memory_error_test.
788
789 2017-01-26 Yao Qi <yao.qi@linaro.org>
790
791 * Makefile.in (SFILES): Add disasm-selftests.c and
792 selftest-arch.c.
793 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
794 * disasm-selftests.c: New file.
795 * selftest-arch.c: New file.
796 * selftest-arch.h: New file.
797
798 2017-01-26 Yao Qi <yao.qi@linaro.org>
799
800 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
801 to bfd_arch_mep. Don't return 0 if section is not
802 found. Call print_insn_mep.
803
804 2017-01-26 Pedro Alves <palves@redhat.com>
805 Yao Qi <yao.qi@linaro.org>
806
807 * arm-tdep.c: Include "disasm.h".
808 (gdb_print_insn_arm): Update code to get gdbarch.
809 * disasm.c (dis_asm_read_memory): Change it to
810 gdb_disassembler::dis_asm_read_memory.
811 (dis_asm_memory_error): Likewise.
812 (dis_asm_print_address): Likewise.
813 (gdb_pretty_print_insn): Change it to
814 gdb_disassembler::pretty_print_insn.
815 (dump_insns): Add one argument gdb_disassemlber. All
816 callers updated.
817 (do_mixed_source_and_assembly_deprecated): Likewise.
818 (do_mixed_source_and_assembly): Likewise.
819 (do_assembly_only): Likewise.
820 (gdb_disassembler::gdb_disassembler): New.
821 (gdb_disassembler::print_insn): New.
822 * disasm.h (class gdb_disassembler): New.
823 (gdb_pretty_print_insn): Remove declaration.
824 (gdb_disassemble_info): Likewise.
825 * guile/scm-disasm.c (class gdbscm_disassembler): New.
826 (gdbscm_disasm_read_memory_worker): Update.
827 (gdbscm_disasm_read_memory): Update.
828 (gdbscm_disasm_memory_error): Remove.
829 (gdbscm_disasm_print_address): Remove.
830 (gdbscm_disassembler::gdbscm_disassembler): New.
831 (gdbscm_print_insn_from_port): Update.
832 * mips-tdep.c: Include disasm.h.
833 (gdb_print_insn_mips): Update code to get gdbarch.
834 * record-btrace.c (btrace_insn_history): Update.
835 * spu-tdep.c: Include disasm.h.
836 (struct spu_dis_asm_data): Remove.
837 (struct spu_dis_asm_info): New.
838 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
839 SPU id.
840 (gdb_print_insn_spu): Cast disassemble_info to
841 spu_dis_asm_info.
842
843 2017-01-26 Yao Qi <yao.qi@linaro.org>
844
845 * disasm.c (do_ui_file_delete): Delete.
846 (gdb_insn_length): Move code creating stream to ...
847 * utils.c (null_stream): ... here. New function.
848 * utils.h (null_stream): Declare.
849
850 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
851
852 * python/py-inferior.c (find_thread_object): Return directly
853 from the loop. Remove "found" variable.
854
855 2017-01-21 Joel Brobecker <brobecker@adacore.com>
856
857 GDB 7.12.1 released.
858
859 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
860
861 * python/py-function.c (fnpy_call): Reorder declarations to have
862 the gdbpy_enter object declared first.
863 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
864
865 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
866
867 PR python/21068
868 * python/python-internal.h (PyMem_RawMalloc): Define for
869 Python < 3.4.
870 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
871 PyMem_RawMalloc instead of PyMem_Malloc.
872
873 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
874 Luis Machado <lgustavo@codesourcery.com>
875
876 * NEWS (New commands): Mention flash-erase.
877 (New MI commands): Mention target-flash-erase.
878 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
879 command.
880 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
881 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
882 * target.c (flash_erase_command): New function.
883 (initialize_targets): Add new flash-erase command.
884 * target.h (flash_erase_command): New declaration.
885
886 2017-01-20 Joel Brobecker <brobecker@adacore.com>
887
888 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
889 HAVE_SYS_PROCFS_H is defined.
890
891 2017-01-18 Alan Hayward <alan.hayward@arm.com>
892
893 * remote.c (struct cached_reg): Change data into a pointer.
894 * (stop_reply_dtr): Free data pointers before deleting vector.
895 (process_stop_reply): Likewise.
896 (remote_parse_stop_reply): Allocate space for data
897
898 2017-01-18 Alan Hayward <alan.hayward@arm.com>
899
900 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
901 MAX_REGISTER_SIZE.
902 (amd64_pseudo_register_read_value): Likewise.
903 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
904 (store_register_using_P): Likewise.
905 * regcache.c (regcache_xfer_part): Likewise.
906
907 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
908
909 Split real and pseudo registers.
910 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
911 (sparc32_pseudo_regnum): New enum.
912 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
913 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
914 (SPARC32_CP0_REGISTERS): New macro.
915 (sparc32_pseudo_register_name): New function.
916 (sparc32_register_name): Use sparc32_pseudo_register_name.
917 (sparc32_pseudo_register_type): New function.
918 (sparc32_register_type): Use sparc32_pseudo_register_type.
919 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
920 pseudo register numbers.
921 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
922 (SPARC64_CP0_REGISTERS): New macro.
923 (sparc64_pseudo_register_name): New function.
924 (sparc64_register_name): Use sparc64_pseudo_register_name.
925 (sparc64_pseudo_register_type): New function.
926 (sparc64_register_type): Use sparc64_pseudo_register_type.
927 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
928 pseudo register numbers.
929 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
930 sparc64_store_arguments): Handle pseudo register numbers.
931
932 2017-01-13 Yao Qi <yao.qi@linaro.org>
933
934 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
935 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
936 output.
937 (getpkt_or_notif_sane_1): Likewise.
938
939 2017-01-13 Yao Qi <yao.qi@linaro.org>
940
941 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
942 of CC. Pass "-x c++-header" instead of "-x c".
943
944 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
945
946 * remote.c (remote_can_async_p): Update comment.
947
948 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
949
950 * linux-nat.c (linux_nat_can_async_p): Update comment.
951
952 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
953
954 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
955
956 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
957
958 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
959
960 2017-01-10 Tom Tromey <tom@tromey.com>
961
962 * python/py-type.c (typy_legacy_template_argument): Update.
963 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
964 ~demangle_parse_info): Declare new members.
965 (cp_demangled_name_to_comp): Return unique_ptr.
966 (cp_demangled_name_parse_free)
967 (make_cleanup_cp_demangled_name_parse_free)
968 (cp_new_demangle_parse_info): Remove.
969 * cp-support.c (do_demangled_name_parse_free_cleanup)
970 (make_cleanup_cp_demangled_name_parse_free): Remove.
971 (inspect_type, cp_canonicalize_string_full)
972 (cp_canonicalize_string): Update.
973 (mangled_name_to_comp): Change return type.
974 (cp_class_name_from_physname, method_name_from_physname)
975 (cp_func_name, cp_remove_params): Update.
976 * cp-name-parser.y (demangle_parse_info): New constructor, from
977 cp_new_demangle_parse_info.
978 (~demangle_parse_info): New destructor, from
979 cp_demangled_name_parse_free.
980 (cp_merge_demangle_parse_infos): Update.
981 (cp_demangled_name_to_comp): Change return type.
982
983 2017-01-10 Tom Tromey <tom@tromey.com>
984
985 * top.c (prevent_dont_repeat): Change return type.
986 * python/python.c (execute_gdb_command): Use std::string.
987 Update.
988 * guile/guile.c (gdbscm_execute_gdb_command): Update.
989 * command.h (prevent_dont_repeat): Change return type.
990 * breakpoint.c (bpstat_do_actions_1): Update.
991
992 2017-01-10 Tom Tromey <tom@tromey.com>
993
994 * value.h (scoped_value_mark::~scoped_value_mark): Call
995 free_to_mark.
996 (scoped_value_mark::free_to_mark): New method.
997 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
998 scoped_value_mark.
999
1000 2017-01-10 Tom Tromey <tom@tromey.com>
1001
1002 * python/py-value.c (valpy_dereference, valpy_referenced_value)
1003 (valpy_reference_value, valpy_const_value, valpy_get_address)
1004 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
1005 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
1006 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
1007 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
1008 scoped_value_mark.
1009 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
1010 * value.h (scoped_value_mark): New class.
1011
1012 2017-01-10 Tom Tromey <tom@tromey.com>
1013
1014 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
1015 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
1016 * psymtab.c (discard_psymtabs_upto): Remove.
1017 (make_cleanup_discard_psymtabs): Remove.
1018 (struct psymtab_state): Remove.
1019
1020 2017-01-10 Tom Tromey <tom@tromey.com>
1021
1022 * record-full.c (record_full_save_cleanups): Remove.
1023 (record_full_save): Use gdb::unlinker.
1024 * gcore.c (do_bfd_delete_cleanup): Remove.
1025 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
1026 cleanups.
1027 * dwarf2read.c (unlink_if_set): Remove.
1028 (write_psymtabs_to_index): Use gdb::unlinker.
1029 * common/gdb_unlinker.h: New file.
1030
1031 2017-01-10 Tom Tromey <tom@tromey.com>
1032
1033 * windows-tdep.c (windows_xfer_shared_library): Update.
1034 * windows-nat.c (windows_make_so): Update.
1035 * utils.h (make_cleanup_bfd_unref): Remove.
1036 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
1037 * symfile.h (symfile_bfd_open)
1038 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
1039 * symfile.c (read_symbols, symbol_file_add)
1040 (separate_debug_file_exists): Update.
1041 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
1042 (generic_load, reread_symbols): Update.
1043 * symfile-mem.c (symbol_file_add_from_memory): Update.
1044 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
1045 (spu_symbol_file_add_from_memory): Update.
1046 * solist.h (struct target_so_ops) <bfd_open>: Return
1047 gdb_bfd_ref_ptr.
1048 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
1049 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
1050 gdb_bfd_ref_ptr.
1051 (solib_map_sections, reload_shared_libraries_1): Update.
1052 * solib-svr4.c (enable_break): Update.
1053 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
1054 * solib-frv.c (enable_break2): Update.
1055 * solib-dsbt.c (enable_break): Update.
1056 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
1057 gdb_bfd_ref_ptr.
1058 (darwin_solib_get_all_image_info_addr_at_init): Update.
1059 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
1060 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
1061 * record-full.c (record_full_save): Update.
1062 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
1063 * procfs.c (insert_dbx_link_bpt_in_file): Update.
1064 * minidebug.c (find_separate_debug_file_in_section): Return
1065 gdb_bfd_ref_ptr.
1066 * machoread.c (macho_add_oso_symfile): Change abfd to
1067 gdb_bfd_ref_ptr.
1068 (macho_symfile_read_all_oso): Update.
1069 (macho_check_dsym): Return gdb_bfd_ref_ptr.
1070 (macho_symfile_read): Update.
1071 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
1072 (jit_bfd_try_read_symtab): Update.
1073 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1074 (gdb_bfd_openw, gdb_bfd_openr_iovec)
1075 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
1076 gdb_bfd_ref_ptr.
1077 (gdb_bfd_ref_policy): New struct.
1078 (gdb_bfd_ref_ptr): New typedef.
1079 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1080 (gdb_bfd_openw, gdb_bfd_openr_iovec)
1081 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
1082 gdb_bfd_ref_ptr.
1083 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
1084 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
1085 (gcore_command): Update.
1086 * exec.c (exec_file_attach): Update.
1087 * elfread.c (elf_symfile_read): Update.
1088 * dwarf2read.c (dwarf2_get_dwz_file): Update.
1089 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
1090 (open_and_init_dwo_file): Update.
1091 (open_dwp_file): Return gdb_bfd_ref_ptr.
1092 (open_and_init_dwp_file): Update.
1093 * corelow.c (core_open): Update.
1094 * compile/compile-object-load.c (compile_object_load): Update.
1095 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
1096 * coffread.c (coff_symfile_read): Update.
1097 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
1098 gdb_bfd_ref_ptr. Rename.
1099 (dump_bfd_file, restore_command): Update.
1100 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
1101 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
1102 (find_separate_debug_file_by_buildid): Update.
1103
1104 2017-01-10 Tom Tromey <tom@tromey.com>
1105
1106 * common/gdb_ref_ptr.h: New file.
1107 * python/py-ref.h (struct gdbpy_ref_policy): New.
1108 (gdbpy_ref): Now a typedef.
1109
1110 2017-01-10 Tom Tromey <tom@tromey.com>
1111
1112 * utils.h (make_cleanup_htab_delete): Don't declare.
1113 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
1114 Remove.
1115 * linespec.c (decode_compound_collector): Add constructor,
1116 destructor.
1117 (lookup_prefix_sym): Remove cleanup.
1118 (symtab_collector): Add constructor, destructor.
1119 (collect_symtabs_from_filename): Remove cleanup.
1120 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
1121 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1122 Use htab_up.
1123 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
1124 * dwarf2read.c (dw2_expand_symtabs_matching)
1125 (dw2_map_symbol_filenames, dwarf_decode_macros)
1126 (write_psymtabs_to_index): Use htab_up.
1127 * dwarf2loc.c (func_verify_no_selftailcall)
1128 (call_site_find_chain_1, func_verify_no_selftailcall)
1129 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
1130 std::vector, gdb::unique_xmalloc_ptr.
1131 (call_sitep): Remove typedef.
1132 (dwarf2_locexpr_baton_eval): Remove unused variable.
1133
1134 2017-01-10 Tom Tromey <tom@tromey.com>
1135
1136 * python/python-internal.h (make_cleanup_py_decref)
1137 (make_cleanup_py_xdecref): Don't declare.
1138 * python/py-utils.c (py_decref, make_cleanup_py_decref)
1139 (py_xdecref, make_cleanup_py_xdecref): Remove.
1140
1141 2017-01-10 Tom Tromey <tom@tromey.com>
1142
1143 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
1144 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
1145
1146 2017-01-10 Tom Tromey <tom@tromey.com>
1147
1148 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
1149
1150 2017-01-10 Tom Tromey <tom@tromey.com>
1151
1152 * python/py-utils.c (unicode_to_encoded_string)
1153 (python_string_to_target_string)
1154 (python_string_to_target_python_string)
1155 (python_string_to_host_string, gdbpy_obj_to_string)
1156 (get_addr_from_python): Use gdbpy_ref.
1157
1158 2017-01-10 Tom Tromey <tom@tromey.com>
1159
1160 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
1161 gdbpy_ref.
1162
1163 2017-01-10 Tom Tromey <tom@tromey.com>
1164
1165 * python/python.c (eval_python_command, gdbpy_decode_line)
1166 (gdbpy_run_events, gdbpy_start_type_printers)
1167 (gdbpy_apply_type_printers): Use gdbpy_ref.
1168
1169 2017-01-10 Tom Tromey <tom@tromey.com>
1170
1171 * python/py-param.c (get_doc_string, compute_enum_values): Use
1172 gdbpy_ref.
1173
1174 2017-01-10 Tom Tromey <tom@tromey.com>
1175
1176 * python/py-inferior.c (find_thread_object, build_inferior_list):
1177 Use gdbpy_ref.
1178
1179 2017-01-10 Tom Tromey <tom@tromey.com>
1180
1181 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
1182
1183 2017-01-10 Tom Tromey <tom@tromey.com>
1184
1185 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
1186 gdbpy_ref.
1187
1188 2017-01-10 Tom Tromey <tom@tromey.com>
1189
1190 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
1191 extra incref.
1192 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
1193 Use gdbpy_ref.
1194
1195 2017-01-10 Tom Tromey <tom@tromey.com>
1196
1197 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
1198 gdbpy_ref.
1199
1200 2017-01-10 Tom Tromey <tom@tromey.com>
1201
1202 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
1203 decref results of PyArg_ParseTupleAndKeywords.
1204
1205 2017-01-10 Tom Tromey <tom@tromey.com>
1206
1207 * python/python.c (python_run_simple_file): Use
1208 unique_xmalloc_ptr, gdbpy_ref.
1209
1210 2017-01-10 Tom Tromey <tom@tromey.com>
1211
1212 * python/py-prettyprint.c (print_stack_unless_memory_error)
1213 (print_string_repr, print_children): Use gdbpy_ref.
1214 (dummy_python_frame): New class.
1215 (dummy_python_frame::dummy_python_frame): Rename from
1216 push_dummy_python_frame.
1217 (py_restore_tstate): Remove.
1218
1219 2017-01-10 Tom Tromey <tom@tromey.com>
1220
1221 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
1222
1223 2017-01-10 Tom Tromey <tom@tromey.com>
1224
1225 * python/python.c (ensure_python_env, restore_python_env):
1226 Remove.
1227 * python/python-internal.h (ensure_python_env): Don't declare.
1228 * varobj.h (varobj_ensure_python_env): Don't declare.
1229 * varobj.c (varobj_ensure_python_env): Remove.
1230
1231 2017-01-10 Tom Tromey <tom@tromey.com>
1232
1233 * varobj.c (varobj_value_get_print_value): Use
1234 gdbpy_enter_varobj.
1235
1236 2017-01-10 Tom Tromey <tom@tromey.com>
1237
1238 * python/py-prettyprint.c (print_string_repr, print_children):
1239 Update.
1240 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
1241 of "encoding".
1242 * varobj.c (varobj_value_get_print_value): Update.
1243 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
1244
1245 2017-01-10 Tom Tromey <tom@tromey.com>
1246
1247 * varobj.c (varobj_get_display_hint)
1248 (dynamic_varobj_has_child_method, install_new_value_visualizer)
1249 (varobj_set_visualizer, free_variable): Use
1250 gdbpy_enter_varobj.
1251
1252 2017-01-10 Tom Tromey <tom@tromey.com>
1253
1254 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
1255 (do_finish_initialization): New function. Use gdbpy_ref.
1256 (gdbpy_finish_initialization): Use gdbpy_enter. Call
1257 do_finish_initialization.
1258
1259 2017-01-10 Tom Tromey <tom@tromey.com>
1260
1261 * python/py-param.c (get_set_value, get_show_value): Use
1262 gdbpy_enter, gdbpy_ref.
1263
1264 2017-01-10 Tom Tromey <tom@tromey.com>
1265
1266 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
1267
1268 2017-01-10 Tom Tromey <tom@tromey.com>
1269
1270 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
1271
1272 2017-01-10 Tom Tromey <tom@tromey.com>
1273
1274 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
1275 Use gdbpy_enter_varobj.
1276
1277 2017-01-10 Tom Tromey <tom@tromey.com>
1278
1279 * varobj.c (gdbpy_enter_varobj): New constructor.
1280 * python/python-internal.h (gdbpy_enter_varobj): New class.
1281 * python/py-varobj.c (py_varobj_get_iterator): Use
1282 gdbpy_enter_varobj.
1283
1284 2017-01-10 Tom Tromey <tom@tromey.com>
1285
1286 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
1287 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
1288 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
1289 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
1290 unique_xmalloc_ptr.
1291 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
1292
1293 2017-01-10 Tom Tromey <tom@tromey.com>
1294
1295 * python/py-xmethods.c (invoke_match_method): Use
1296 gdbpy_ref.
1297
1298 2017-01-10 Tom Tromey <tom@tromey.com>
1299
1300 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
1301 gdbpy_enter, gdbpy_ref.
1302
1303 2017-01-10 Tom Tromey <tom@tromey.com>
1304
1305 * python/python.c (python_interactive_command): Use gdbpy_enter.
1306
1307 2017-01-10 Tom Tromey <tom@tromey.com>
1308
1309 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
1310 gdbpy_ref.
1311
1312 2017-01-10 Tom Tromey <tom@tromey.com>
1313
1314 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
1315 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
1316
1317 2017-01-10 Tom Tromey <tom@tromey.com>
1318
1319 * utils.h (htab_deleter): New struct.
1320 (htab_up): New typedef.
1321 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
1322 gdbpy_enter, gdbpy_ref, htab_up.
1323
1324 2017-01-10 Tom Tromey <tom@tromey.com>
1325
1326 * python/py-unwind.c (pending_frame_invalidate): Remove.
1327 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
1328
1329 2017-01-10 Tom Tromey <tom@tromey.com>
1330
1331 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
1332 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
1333
1334 2017-01-10 Tom Tromey <tom@tromey.com>
1335
1336 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
1337
1338 2017-01-10 Tom Tromey <tom@tromey.com>
1339
1340 * python/python.c (gdbpy_eval_from_control_command)
1341 (gdbpy_source_script, gdbpy_run_events)
1342 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
1343 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
1344 gdbpy_enter.
1345
1346 2017-01-10 Tom Tromey <tom@tromey.com>
1347
1348 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
1349
1350 2017-01-10 Tom Tromey <tom@tromey.com>
1351
1352 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
1353
1354 2017-01-10 Tom Tromey <tom@tromey.com>
1355
1356 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
1357 (python_on_inferior_call_pre, python_on_inferior_call_post)
1358 (python_on_memory_change, python_on_register_change)
1359 (python_inferior_exit, python_new_objfile, add_thread_object)
1360 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
1361
1362 2017-01-10 Tom Tromey <tom@tromey.com>
1363
1364 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
1365 (bpfinishpy_handle_exit): Use gdbpy_enter.
1366
1367 2017-01-10 Tom Tromey <tom@tromey.com>
1368
1369 * python/py-cmd.c (cmdpy_destroyer)
1370 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
1371 gdbpy_enter.
1372
1373 2017-01-10 Tom Tromey <tom@tromey.com>
1374
1375 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
1376 gdbpy_enter.
1377 (gdbpy_breakpoint_has_cond): Likewise.
1378
1379 2017-01-10 Tom Tromey <tom@tromey.com>
1380
1381 * python/python.c (gdbpy_enter): New constructor.
1382 (~gdbpy_enter): New destructor.
1383 (restore_python_env, ensure_python_env): Rewrite.
1384 * python/python-internal.h (gdbpy_enter): New class.
1385
1386 2017-01-10 Tom Tromey <tom@tromey.com>
1387
1388 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
1389
1390 2017-01-10 Tom Tromey <tom@tromey.com>
1391
1392 * python/py-value.c (value_has_field, get_field_flag)
1393 (get_field_type, valpy_getitem, convert_value_from_python): Use
1394 gdbpy_ref.
1395
1396 2017-01-10 Tom Tromey <tom@tromey.com>
1397
1398 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
1399 gdbpy_ref.
1400
1401 2017-01-10 Tom Tromey <tom@tromey.com>
1402
1403 * python/py-prettyprint.c (search_pp_list)
1404 (find_pretty_printer_from_objfiles)
1405 (find_pretty_printer_from_progspace)
1406 (find_pretty_printer_from_gdb, find_pretty_printer)
1407 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
1408 gdbpy_ref.
1409
1410 2017-01-10 Tom Tromey <tom@tromey.com>
1411
1412 * python/py-param.c (call_doc_function): Use gdbpy_ref.
1413
1414 2017-01-10 Tom Tromey <tom@tromey.com>
1415
1416 * python/py-linetable.c (build_line_table_tuple_from_pcs)
1417 (ltpy_get_all_source_lines): Use gdbpy_ref.
1418
1419 2017-01-10 Tom Tromey <tom@tromey.com>
1420
1421 * python/py-framefilter.c (extract_sym, extract_value)
1422 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
1423 gdbpy_ref.
1424
1425 2017-01-10 Tom Tromey <tom@tromey.com>
1426
1427 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
1428
1429 2017-01-10 Tom Tromey <tom@tromey.com>
1430
1431 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
1432
1433 2017-01-10 Tom Tromey <tom@tromey.com>
1434
1435 * python/py-function.c (convert_values_to_python, fnpy_init): Use
1436 gdbpy_ref.
1437
1438 2017-01-10 Tom Tromey <tom@tromey.com>
1439
1440 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
1441
1442 2017-01-10 Tom Tromey <tom@tromey.com>
1443
1444 * python/py-type.c (convert_field, make_fielditem, typy_fields)
1445 (typy_range): Use gdbpy_ref.
1446
1447 2017-01-10 Tom Tromey <tom@tromey.com>
1448
1449 * python/py-threadevent.c (create_thread_event_object): Use
1450 gdbpy_ref.
1451 * python/py-stopevent.c (create_stop_event_object): Simplify.
1452 (emit_stop_event): Use gdbpy_ref.
1453 * python/py-signalevent.c (create_signal_event_object): Use
1454 gdbpy_ref.
1455 * python/py-newobjfileevent.c (create_new_objfile_event_object)
1456 (emit_new_objfile_event, create_clear_objfiles_event_object)
1457 (emit_clear_objfiles_event): Use gdbpy_ref.
1458 * python/py-infevents.c (create_inferior_call_event_object)
1459 (create_register_changed_event_object)
1460 (create_memory_changed_event_object, emit_inferior_call_event)
1461 (emit_memory_changed_event, emit_register_changed_event): Use
1462 gdbpy_ref.
1463 * python/py-exitedevent.c (create_exited_event_object)
1464 (emit_exited_event): Use gdbpy_ref.
1465 * python/py-event.h (evpy_emit_event): Remove
1466 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
1467 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
1468 * python/py-continueevent.c (emit_continue_event): Use
1469 gdbpy_ref.
1470 * python/py-breakpoint.c (gdbpy_breakpoint_created)
1471 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
1472 gdbpy_ref.
1473 * python/py-bpevent.c (create_breakpoint_event_object): Use
1474 gdbpy_ref.
1475
1476 2017-01-10 Tom Tromey <tom@tromey.com>
1477
1478 * python/py-ref.h: New file.
1479
1480 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
1481
1482 * cli-out.c (cli_ui_out::do_redirect): Change return type to
1483 void.
1484 * cli-out.h (cli_ui_out::do_redirect): Likewise.
1485 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
1486 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
1487 * ui-out.c (ui_out::redirect): Likewise.
1488 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
1489 * cli/cli-logging.c (set_logging_redirect): Update call site of
1490 ui_out::redirect.
1491 (handle_redirections): Likewise.
1492 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
1493 * top.c (execute_command_to_string): Likewise.
1494 * utils.c (do_ui_out_redirect_pop): Likewise.
1495
1496 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
1497
1498 * stack.c (_initialize_stack): Update "frame" command help message.
1499
1500 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
1501
1502 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
1503
1504 2017-01-06 Yao Qi <yao.qi@linaro.org>
1505
1506 * x86-linux-nat.h: Include gdb_proc_service.h.
1507
1508 2017-01-06 Yao Qi <yao.qi@linaro.org>
1509
1510 * ser-base.h: Include serial.h.
1511
1512 2017-01-06 Yao Qi <yao.qi@linaro.org>
1513
1514 * ppc-linux-tdep.h: Include ppc-tdep.h.
1515
1516 2017-01-06 Yao Qi <yao.qi@linaro.org>
1517
1518 * nat/amd64-linux-siginfo.h: Include signal.h.
1519
1520 2017-01-06 Yao Qi <yao.qi@linaro.org>
1521
1522 * nat/aarch64-linux-hw-point.h: Include break-common.h.
1523
1524 2017-01-06 Yao Qi <yao.qi@linaro.org>
1525
1526 * mi/mi-parse.h: Include mi-cmds.h.
1527
1528 2017-01-06 Yao Qi <yao.qi@linaro.org>
1529
1530 * inf-loop.c: Don't include "target.h".
1531 * inf-loop.h: Include it here.
1532
1533 2017-01-06 Yao Qi <yao.qi@linaro.org>
1534
1535 * dfp.h: Include "dboulest.h" and "expression.h".
1536
1537 2017-01-06 Yao Qi <yao.qi@linaro.org>
1538
1539 * ax-gdb.h: Include "ax.h".
1540
1541 2017-01-06 Yao Qi <yao.qi@linaro.org>
1542
1543 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
1544 with nat/gdb_ptrace.h.
1545
1546 2017-01-05 Yao Qi <yao.qi@linaro.org>
1547
1548 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
1549 new line.
1550 (mips64_fbsd_sigframe_init): Likewise.
1551
1552 2017-01-04 John Baldwin <jhb@FreeBSD.org>
1553
1554 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
1555 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
1556
1557 2017-01-04 John Baldwin <jhb@FreeBSD.org>
1558
1559 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1560 * NEWS: Mention new FreeBSD/mips native configuration.
1561 * config/mips/fbsd.mh: New file.
1562 * configure.host: Add mips*-*-freebsd*.
1563 * mips-fbsd-nat.c: New file.
1564
1565 2017-01-04 John Baldwin <jhb@FreeBSD.org>
1566
1567 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
1568 (ALLDEPFILES): Add mips-fbsd-tdep.c.
1569 * NEWS: Mention new FreeBSD/mips target.
1570 * configure.tgt: Add mips*-*-freebsd*.
1571 * mips-fbsd-tdep.c: New file.
1572 * mips-fbsd-tdep.h: New file.
1573
1574 2017-01-04 Yao Qi <yao.qi@linaro.org>
1575
1576 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
1577 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
1578
1579 2017-01-01 Joel Brobecker <brobecker@adacore.com>
1580
1581 Update copyright year range in all GDB files.
1582
1583 2017-01-01 Joel Brobecker <brobecker@adacore.com>
1584
1585 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
1586
1587 For older changes see ChangeLog-2016.
1588 \f
1589 Local Variables:
1590 mode: change-log
1591 left-margin: 8
1592 fill-column: 74
1593 version-control: never
1594 coding: utf-8
1595 End: