1 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
3 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
4 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
5 New function definition.
6 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
7 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
8 New function declaration.
9 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10 * mi/mi-interp.h: New file.
11 * solib.c (info_sharedlibrary_command): Replace for loop with
13 * solib.h (update_solib_list): New function declaration.
14 (so_list_head): Move macro.
15 * solist.h (ALL_SO_LIBS): New macro.
17 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
19 * infcmd.c (post_create_inferior): Remove unused argument in
21 * remote.c (remote_start_remote): Likewise.
22 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
23 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
24 (enable_break): Likewise.
25 * solib.c (update_solib_list): Remove unused target argument
26 and its documentation.
27 (solib_add): Remove unused target argument. Remove unused
28 argument in call to update_solib_list.
29 (info_sharedlibrary_command): Remove unused argument in call
31 (sharedlibrary_command): Remove unused argument in call to
33 (handle_solib_event): Likewise.
34 (reload_shared_libraries): Likewise.
35 * solib.h (solib_add): Remove unused target argument.
37 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
39 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
40 (s390_displaced_step_fixup): Cover relative branches with the
41 default fixup handling. This fixes lack of support for some
42 relative branch instructions.
44 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
46 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
49 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
51 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
52 i386_darwin_store_inferior_registers): Use ptid from regcache.
54 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
56 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
57 i386bsd_store_inferior_registers): Use ptid from regcache.
59 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
61 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
62 hppaobsd_store_registers): Use ptid from regcache.
64 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
66 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
67 hppanbsd_store_registers): Use ptid from regcache.
69 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
71 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
72 from regcache. Use get_ptrace_pid.
74 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
76 * corelow.c (get_core_register_section): Use ptid from regcache,
79 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
81 * bsd-uthread.c (bsd_uthread_fetch_registers,
82 bsd_uthread_store_registers): Use ptid from regcache, set and
83 restore inferior_ptid.
85 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
87 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
88 fetch_fp_regs, store_register, store_regs, store_fp_register,
89 store_fp_regs): Use ptid from regcache.
91 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
93 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
94 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
95 store_vfp_regs): Use ptid from regcache.
97 2017-03-17 Pedro Alves <palves@redhat.com>
100 * ser-base.c (ser_base_wait_for): Add comment.
101 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
103 * ser-unix.c (hardwire_raw): Remove reference to
104 scb->current_timeout.
105 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
106 (hardwire_ops): Install ser_base_readchar instead of
108 * serial.h (struct serial) <current_timeout, timeout_remaining>:
111 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
114 * python/lib/gdb/printer/bound_registers.py: Add support for
117 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
119 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
120 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
121 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
122 byte_offset to subobj_byte_offset. Fix the handling of
123 DWARF_VALUE_STACK on big-endian targets when coming via an
125 (dwarf2_evaluate_loc_desc): Adjust call to
126 dwarf2_evaluate_loc_desc_full.
127 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
128 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
130 2017-03-16 Yao Qi <yao.qi@linaro.org>
132 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
133 and REVSH instructions.
135 2017-03-16 Yao Qi <yao.qi@linaro.org>
137 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
138 (arm_record_test): Declare.
139 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
140 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
141 align with the manual.
142 (thumb_record_misc): Adjust the code order to align with the
144 (thumb2_record_decode_insn_handler): Fix instruction matching.
145 (instruction_reader_thumb): New class.
146 (arm_record_test): New function.
148 2017-03-16 Yao Qi <yao.qi@linaro.org>
150 * arm-tdep.c (abstract_memory_reader): New class.
151 (instruction_reader): New class.
152 (extract_arm_insn): Add argument 'reader'. Callers updated.
153 (decode_insn): Likewise.
155 2017-03-16 Doug Evans <dje@google.com>
157 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
158 member. Change type of TYPE member to SCM. All uses updated.
159 (lsscm_make_lazy_string_smob): Add assert.
160 (lsscm_make_lazy_string): Flag bad length values.
161 (lsscm_elt_type): New function.
162 (gdbscm_lazy_string_to_value): Rewrite to use
163 lsscm_safe_lazy_string_to_value.
164 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
165 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
166 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
168 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
169 * guile/scm-type.c (tyscm_scm_to_type): New function.
171 2017-03-15 Doug Evans <dje@google.com>
173 PR python/17728, python/18439, python/18779
174 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
175 member. Change type of TYPE member to PyObject *. All uses updated.
176 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
177 (gdbpy_create_lazy_string_object): Flag bad length values.
178 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
179 Handle typedefs in incoming type.
180 (stpy_lazy_string_elt_type): New function.
181 (gdbpy_extract_lazy_string): Call it.
182 * python/py-value.c (valpy_lazy_string): Flag bad length values.
183 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
184 typedefs in incoming type.
186 2017-03-16 Doug Evans <dje@google.com>
188 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
189 * guile/scm-type.c (tyscm_scm_to_type): New function.
191 2017-03-16 Jiong Wang <jiong.wang@arm.com>
193 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
194 "ULONGEST" for "skip".
196 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
199 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
200 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
201 (inf_ptrace_peek_poke): ...here. New function. Now also loop
202 over ptrace peek/poke until end of buffer or error.
204 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
206 * parse.c (length_of_subexp): Make static.
207 * parser-defs.h (length_of_subexp): Remove.
209 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
211 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
214 2017-03-14 Pedro Alves <palves@redhat.com>
216 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
217 (main): Use std::unique_ptr. Remove calls to
218 cp_demangled_name_parse_free.
220 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
222 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
223 alphabsd_store_inferior_registers): Use regcache->ptid instead
226 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
228 * aix-thread.c (aix_thread_fetch_registers,
229 aix_thread_store_registers): Use regcache->ptid instead of
232 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
234 * aarch64-linux-nat.c (fetch_gregs_from_thread,
235 store_gregs_to_thread, fetch_fpregs_from_thread,
236 store_fpregs_to_thread): Use regcache->ptid instead of
239 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
241 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
242 amd64_linux_fetch_inferior_registers): Use regcache->ptid
243 instead of inferior_ptid.
245 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
247 * target.c (target_fetch_registers, target_store_registers): Add
250 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
252 * regcache.h (regcache_get_ptid): New function.
253 * regcache.c (regcache_get_ptid): New function.
255 2017-03-13 Mark Wielaard <mark@klomp.org>
257 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
259 2017-03-10 Keith Seitz <keiths@redhat.com>
262 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
264 2017-03-08 Pedro Alves <palves@redhat.com>
267 * infrun.c (start_step_over, do_target_resume, resume)
268 (restart_threads): Assert we're not resuming a thread that is
270 (infrun_thread_stop_requested_callback): Delete.
271 (infrun_thread_stop_requested): If the thread is internally
272 stopped, queue a pending stop event and clear the thread's
274 (handle_stop_requested): New function.
275 (handle_syscall_event, handle_inferior_event_1): Use
276 handle_stop_requested.
277 (handle_stop_requested): New function.
278 (handle_signal_stop): Set the thread's stop_signal here instead of
280 (finish_step_over): Clear step over info unconditionally.
281 (handle_signal_stop): If the user had interrupted the event
282 thread, consider the stop a random signal.
283 (handle_signal_stop) <signal arrived while stepping over
284 breakpoint>: Don't restart threads here.
285 (stop_waiting): Don't clear step-over info here.
287 2017-03-08 Pedro Alves <palves@redhat.com>
290 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
291 goes to argument 2, not 1.
293 2017-03-08 Pedro Alves <palves@redhat.com>
296 * top.c (gdb_readline_wrapper): Avoid passing NULL to
298 (command_line_input): Add comment.
300 2017-03-08 Pedro Alves <palves@redhat.com>
303 * tui/tui-file.c (tui_file::write): New.
304 * tui/tui-file.h (tui_file): Override "write".
305 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
306 factored out from ...
307 (tui_puts): ... here.
308 (tui_putc): Use them.
309 (tui_write): New function.
310 * tui/tui-io.h (tui_write): Declare.
312 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
314 * Makefile.in (SFILES): Replace "environ.c" with
316 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
317 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
319 * common/environ.c: ... here.
320 * environ.h: Moved to...
321 * common/environ.h: ... here.
323 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
325 * gdbarch.sh (pstring_ptr): New static function.
326 (gdbarch_disassembler_options): Use it.
327 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
328 not valid_disassembler_option->name.
329 * gdbarch.c: Regenerate.
331 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
333 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
335 2017-03-07 Pedro Alves <palves@redhat.com>
337 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
339 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
341 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
342 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
343 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
344 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
346 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
348 * xtensa-linux-nat.c (fetch_gregs): Remove const.
350 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
352 * remote.c (remote_add_target_side_commands): Use range-based
355 2017-03-03 Yao Qi <yao.qi@linaro.org>
358 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
360 * valprint.c (common_val_print): Likewise.
362 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
364 * NEWS: Mention new set/show disassembler-options commands.
365 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
366 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
367 (prospective_options): New static variable.
368 (gdb_disassembler::gdb_disassembler): Initialize
369 m_di.disassembler_options.
370 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
371 (get_disassembler_options): New function.
372 (set_disassembler_options): Likewise.
373 (set_disassembler_options_sfunc): Likewise.
374 (show_disassembler_options_sfunc): Likewise.
375 (disassembler_options_completer): Likewise.
376 (_initialize_disasm): Likewise.
377 * disasm.h (get_disassembler_options): New prototype.
378 (set_disassembler_options): Likewise.
379 * gdbarch.sh (gdbarch_disassembler_options): New variable.
380 (gdbarch_verify_disassembler_options): Likewise.
381 * gdbarch.c: Regenerate.
382 * gdbarch.h: Likewise.
383 * arm-tdep.c (num_disassembly_options): Delete.
384 (set_disassembly_style): Likewise.
385 (arm_disassembler_options): New static variable.
386 (set_disassembly_style_sfunc): Convert short style name into long
387 option name. Call set_disassembler_options.
388 (show_disassembly_style_sfunc): New function.
389 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
390 set_gdbarch_verify_disassembler_options.
391 (_initialize_arm_tdep): Delete regnames variable and update callers.
392 (arm_disassembler_options): Initialize.
393 (disasm_options): New variable.
394 (num_disassembly_options): Rename from this...
395 (num_disassembly_styles): ...to this. Compute by scanning through
397 (valid_disassembly_styles): Initialize using disasm_options.
398 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
399 set_arm_regname_option.
400 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
401 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
402 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
403 set_gdbarch_verify_disassembler_options.
404 * s390-tdep.c (s390_disassembler_options): New static variable.
405 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
406 set_gdbarch_verify_disassembler_options.
408 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
410 * remote.c (remote_add_target_side_condition): Remove "struct"
411 keyword from range-based for loop.
413 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
415 * remote.c (remote_add_target_side_condition): Use range-based
416 for loop. Update comment.
418 2017-02-27 Yao Qi <yao.qi@linaro.org>
420 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
422 2017-02-26 Alan Hayward <alan.hayward@arm.com>
424 * regcache.c (regcache_raw_update): New function.
425 (regcache_raw_read): Move code to regcache_raw_update.
426 * regcache.h (regcache_raw_update): New declaration.
427 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
429 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
431 * dwarf2read.c (create_debug_type_hash_table): Initialize
432 header.signature and header.type_offset_in_tu.
434 2017-02-24 Pedro Alves <palves@redhat.com>
436 * symtab.c (make_file_symbol_completion_list_1): Use
437 add_symtab_completions.
439 2017-02-24 Alan Hayward <alan.hayward@arm.com>
441 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
443 2017-02-24 Alan Hayward <alan.hayward@arm.com>
445 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
446 I386_MAX_REGISTER_SIZE.
447 (i386_pseudo_register_write): Likewise.
448 (i386_process_record): Likewise.
449 * i387-tdep.c (i387_supply_xsave): Likewise.
450 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
451 (store_register): Likewise.
453 2017-02-23 Pedro Alves <palves@redhat.com>
455 * ada-lang.c: Include "common/function-view.h".
456 (ada_iterate_over_symbols): Adjust to use function_view as
458 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
459 (ada_make_symbol_completion_list): Use a lambda.
460 (ada_exc_search_name_matches): Delete.
461 (name_matches_regex): New.
462 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
463 * compile/compile-c-support.c: Include "common/function-view.h".
464 (print_one_macro): Change prototype to accept a ui_file pointer.
465 (write_macro_definitions): Use a lambda.
466 * dwarf2read.c: Include "common/function-view.h".
467 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
468 (dw2_expand_symtabs_matching): Adjust to use function_view as
470 * language.h: Include "common/function-view.h".
471 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
472 function_view as callback type.
473 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
474 * linespec.c: Include "common/function-view.h".
475 (collect_info::add_symbol): New method.
476 (struct symbol_and_data_callback, iterate_inline_only, struct
477 symbol_matcher_data, iterate_name_matcher): Delete.
478 (iterate_over_all_matching_symtabs): Adjust to use function_view
479 as callback type and lambdas.
480 (iterate_over_file_blocks): Adjust to use function_view as
482 (decode_compound_collector): Now a class with private fields.
483 (decode_compound_collector::release_symbols): New method.
484 (collect_one_symbol): Rename to...
485 (decode_compound_collector::operator()): ... this and adjust.
486 (lookup_prefix_sym): decode_compound_collector construction bits
487 move to decode_compound_collector ctor. Pass the
488 decode_compound_collector object directly as callback. Remove
489 cleanups and use decode_compound_collector::release_symbols
491 (symtab_collector): Now a class with private fields.
492 (symtab_collector::release_symtabs): New method.
493 (add_symtabs_to_list): Rename to...
494 (symtab_collector::operator()): ... this and adjust.
495 (collect_symtabs_from_filename): symtab_collector construction
496 bits move to symtab_collector ctor. Pass the symtab_collector
497 object directly as callback. Remove cleanups and use
498 symtab_collector::release_symtabs instead.
499 (collect_symbols): Delete.
500 (add_matching_symbols_to_info): Use lambdas.
501 * macrocmd.c (print_macro_callback): Delete.
502 (info_macro_command): Use a lambda.
503 (info_macros_command): Pass print_macro_definition as callable
505 (print_one_macro): Remove 'ignore' parameter.
506 (macro_list_command): Adjust.
507 * macrotab.c (macro_for_each_data::fn): Now a function_view.
508 (macro_for_each_data::user_data): Delete field.
509 (foreach_macro): Adjust to call the function_view.
510 (macro_for_each): Adjust to use function_view as callback type.
511 (foreach_macro_in_scope): Adjust to call the function_view.
512 (macro_for_each_in_scope): Adjust to use function_view as callback
514 * macrotab.h: Include "common/function-view.h".
515 (macro_callback_fn): Declare a prototype instead of a pointer.
516 Remove "user_data" parameter.
517 (macro_for_each, macro_for_each_in_scope): Adjust to use
518 function_view as callback type.
519 * psymtab.c (partial_map_expand_apply)
520 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
521 Adjust to use function_view as callback type and to return bool.
522 (psym_expand_symtabs_matching): Adjust to use function_view as
524 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
525 to use function_view as callback type and to return bool.
526 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
528 * symfile.c (expand_symtabs_matching): Adjust to use function_view
530 * symfile.h: Include "common/function-view.h".
531 (expand_symtabs_file_matcher_ftype)
532 (expand_symtabs_symbol_matcher_ftype)
533 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
535 (quick_symbol_functions::map_symtabs_matching_filename)
536 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
537 function_view as callback type and return bool.
538 (expand_symtabs_matching): Adjust to use function_view as callback
540 (maintenance_expand_name_matcher)
541 (maintenance_expand_file_matcher): Delete.
542 (maintenance_expand_symtabs): Use lambdas.
543 * symtab.c (iterate_over_some_symtabs): Adjust to use
544 function_view as callback types and return bool.
545 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
547 (lookup_symtab_callback): Delete.
548 (lookup_symtab): Use a lambda.
549 (iterate_over_symbols): Adjust to use function_view as callback
551 (struct search_symbols_data, search_symbols_file_matches)
552 (search_symbols_name_matches): Delete.
553 (search_symbols): Use a pair of lambdas.
554 (struct add_name_data, add_macro_name, symbol_completion_matcher)
555 (symtab_expansion_callback): Delete.
556 (default_make_symbol_completion_list_break_on_1): Use lambdas.
557 * symtab.h: Include "common/function-view.h".
558 (iterate_over_some_symtabs): Adjust to use function_view as
559 callback type and return bool.
560 (iterate_over_symtabs): Adjust to use function_view as callback
562 (symbol_found_callback_ftype): Remove 'data' parameter and return
564 (iterate_over_symbols): Adjust to use function_view as callback
567 2017-02-23 Pedro Alves <palves@redhat.com>
569 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
570 (%.o) <unittests/%.c>: New pattern.
571 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
572 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
573 * common/function-view.h: New file.
574 * unittests/function-view-selftests.c: New file.
575 * configure: Regenerate.
577 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
579 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
581 * go32-nat.c (go32_thread_alive): Likewise.
583 2017-02-23 Yao Qi <yao.qi@linaro.org>
585 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
588 2017-02-23 Yao Qi <yao.qi@linaro.org>
590 * varobj.c (varobj_clear_saved_item): Use delete instead of
592 (update_dynamic_varobj_children): Likewise.
594 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
596 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
598 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
600 * common/enum-flags.h (enum_flags::enum_flags): Initialize
601 m_enum_value to 0 in default constructor.
603 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
605 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
606 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
607 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
608 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
609 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
610 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
611 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
612 IS_STORE_CONDITIONAL_INSN.
614 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
616 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
618 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
620 * NEWS (Changes since GDB 7.12): Add DWARF-5.
622 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
624 * dwarf2read.c (skip_one_die, read_attribute_value)
625 (dwarf2_const_value_attr, dump_die_shallow)
626 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
627 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
629 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
631 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
632 (dwarf_parse_macro_header): Accept DWARF version 5.
633 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
635 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
637 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
639 * common/common-exceptions.h (enum errors): Likewise.
640 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
641 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
642 (dwarf_expr_context::execute_stack_op): Likewise.
643 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
645 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
646 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
647 (show_entry_values_debug, call_site_to_target_addr)
648 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
649 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
650 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
651 (value_of_dwarf_block_entry, indirect_pieced_value)
652 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
653 (disassemble_dwarf_expression): Likewise.
654 * dwarf2read.c (process_die, inherit_abstract_dies)
655 (read_call_site_scope): Likewise.
656 * gdbtypes.h (struct func_type, struct call_site_parameter)
657 (struct call_site): Likewise.
658 * stack.c (read_frame_arg): Likewise.
659 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
661 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
663 * defs.h (read_unsigned_leb128): New declaration.
664 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
665 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
666 (dwarf2_find_location_expression): Call also
667 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
668 * dwarf2loc.h (dwarf2_version): New declaration.
669 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
671 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
673 (struct dwop_section_names): Add loclists_dwo.
674 (dwop_section_names): Add .debug_loclists.dwo.
675 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
676 (struct dwarf2_per_cu_data): Add dwarf_version.
677 (struct dwo_sections): Add loclists.
678 (struct attr_abbrev): Add implicit_const.
679 (read_indirect_line_string): New declaration.
680 (read_unsigned_leb128): Delete declaration.
681 (rcuh_kind): New definition.
682 (read_and_check_comp_unit_head): Change parameter
683 is_debug_types_section to section_kind.
684 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
685 (read_comp_unit_head): Change parameter abfd to section, add parameter
686 section_kind. Handle DWARF-5.
687 (error_check_comp_unit_head): Accept also DWARF version 5.
688 (read_and_check_comp_unit_head): Change parameter
689 is_debug_types_section to section_kind.
690 (read_and_check_type_unit_head): Delete function.
691 (read_abbrev_offset): Handle DWARF-5.
692 (create_debug_type_hash_table): Add parameter section_kind. Process
693 only DW_UT_type. Use signature and type_offset_in_tu from struct
695 (create_debug_types_hash_table): Update create_debug_type_hash_table
697 (create_all_type_units): Call create_debug_type_hash_table.
698 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
699 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
701 (skip_one_die): Handle DW_FORM_implicit_const.
702 (dwarf2_rnglists_process): New function.
703 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
704 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
705 (read_attribute_value): Handle DW_FORM_implicit_const,
707 (read_attribute): Handle DW_FORM_implicit_const.
708 (read_indirect_string_at_offset_from): New function from
709 read_indirect_string_at_offset.
710 (read_indirect_string_at_offset): Call
711 read_indirect_string_at_offset_from.
712 (read_indirect_line_string_at_offset): New function.
713 (read_indirect_string): New function comment.
714 (read_indirect_line_string): New function.
715 (read_unsigned_leb128): Make it global.
716 (dwarf2_string_attr): Handle DWARF-5.
717 (add_include_dir_stub, read_formatted_entries): New functions.
718 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
720 (per_cu_header_read_in): Update read_comp_unit_head caller.
721 (dwarf2_version): New function.
722 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
724 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
727 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
729 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
731 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
733 * dwarf2read.c (dwarf2_ranges_process): New function from
735 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
736 dwarf2_ranges_process.
738 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
740 * dwarf2read.c (create_debug_type_hash_table): New function from
741 create_debug_types_hash_table.
742 (create_debug_types_hash_table): Call create_debug_type_hash_table.
743 (create_all_type_units, open_and_init_dwo_file): Update
744 create_debug_types_hash_table callers.
746 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
749 * fork-child.c (trace_start_error): Fix thinko. va_end should
750 refer to 'ap', not 'args'.
752 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
753 Pedro Alves <palves@redhat.com>
756 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
758 * fork-child.c (trace_start_error): New function.
759 (trace_start_error_with_name): Likewise.
760 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
761 * inf-ptrace.c (inf_ptrace_me): Likewise.
762 * inferior.h (trace_start_error): New prototype.
763 (trace_start_error_with_name): Likewise.
765 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
768 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
769 NULL before using it.
770 * symmisc.c (maintenance_print_symbols): Likewise.
771 (maintenance_print_msymbols): Likewise.
773 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
775 * NEWS: Add record Python bindings entry.
777 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
779 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
781 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
782 * python/py-record-btrace.c, python/py-record-btrace.h,
783 python/py-record-full.c, python/py-record-full.h: New file.
784 * python/py-record.c: Add include for py-record-btrace.h and
786 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
787 recpy_instruction_history, recpy_function_call_history, recpy_begin,
788 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
789 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
791 (gdbpy_initialize_btrace): New export.
792 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
794 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
796 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
797 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
798 * python/py-record.c: New file.
799 * python/python-internal.h (gdbpy_start_recording,
800 gdbpy_current_recording, gdpy_stop_recording,
801 gdbpy_initialize_record): New export.
802 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
803 (python_GdbMethods): Add gdbpy_start_recording,
804 gdbpy_current_recording and gdbpy_stop_recording.
806 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
808 * record-btrace.c (record_btrace_record_method): New function.
809 (init_record_btrace_ops): Initialize to_record_method.
810 * record-full.c (record_full_record_method): New function.
811 (init_record_full_ops, init_record_full_core_ops): Add
812 record_full_record_method.
813 * record.h (enum record_method): New enum.
814 * target-debug.h (target_debug_print_enum_record_method: New define.
815 * target-delegates.c: Regenerate.
816 * target.c (target_record_method): New function.
817 * target.h: Include record.h.
818 (struct target_ops) <to_record_method>: New field.
819 (target_record_method): New export.
821 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
823 * record.h (record_start, record_stop): New export.
824 * record.c (record_start, record_stop): New function.
826 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
828 * btrace.c (btrace_fetch): Copy function call segments pointer
830 (btrace_clear): Clear the vector.
831 (btrace_find_insn_by_number): Use binary search to find the correct
832 function call segment.
833 * btrace.h (brace_fun_p): New typedef.
834 (struct btrace_thread_info) <functions>: New field.
836 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
838 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
839 * btrace.c (btrace_decode_error): ... here. New function.
840 * btrace.h (btrace_decode_error): New export.
842 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
844 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
845 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
846 btrace_find_insn_by_number): Remove special case for gaps.
847 * btrace.h (btrace_insn_get_error): New export.
848 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
849 * record-btrace.c (btrace_insn_history): Print number for gaps.
850 (record_btrace_info, record_btrace_goto): Handle gaps.
852 2017-02-14 Tom Tromey <tom@tromey.com>
855 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
857 * python/py-evts.c (gdbpy_initialize_py_events): Add
858 before_prompt registry.
859 * python/py-events.h (events_object) <before_prompt>: New field.
861 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
863 * btrace.c (ftrace_new_switch): Preserve up link and flags.
865 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
867 * symfile (_initialize_symfile): Add usage text to the load command's
870 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
872 * utils.c (defaulted_query): Don't query on secondary UIs.
874 2017-02-10 Tom Tromey <tom@tromey.com>
876 * rust-lang.c (rust_get_disr_info): Remove unused variable.
878 2017-02-10 Tom Tromey <tom@tromey.com>
880 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
882 * python/py-type.c (typy_legacy_template_argument): Remove
883 unnecessary "cleanup" local.
885 2017-02-10 Tom Tromey <tom@tromey.com>
887 * python/python.c (do_start_initialization): New function, from
889 (_initialize_python): Call do_start_initialization.
890 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
893 2017-02-10 Tom Tromey <tom@tromey.com>
895 * python/py-prettyprint.c (pretty_print_one_value): Use
898 2017-02-10 Tom Tromey <tom@tromey.com>
900 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
901 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
903 * python/py-type.c (field_new): Use gdbpy_ref.
904 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
906 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
907 (py_free_pspace): Likewise.
908 (pspace_to_pspace_object): Likewise.
909 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
910 (py_free_objfile): Likewise.
911 (objfile_to_objfile_object): Likewise.
912 * python/py-inferior.c (delete_thread_object): Use
914 (infpy_read_memory): Likewise.
915 (py_free_inferior): Likewise.
916 * python/py-evtregistry.c (create_eventregistry_object): Use
918 * python/py-event.c (create_event_object): Use gdbpy_ref.
920 2017-02-10 Tom Tromey <tom@tromey.com>
922 * python/py-ref.h (gdbpy_ref_policy): Now a template.
923 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
925 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
926 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
927 python/py-exitedevent.c, python/py-finishbreakpoint.c,
928 python/py-framefilter.c, python/py-function.c,
929 python/py-inferior.c, python/py-infevents.c,
930 python/py-linetable.c, python/py-newobjfileevent.c,
931 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
932 python/py-signalevent.c, python/py-stopevent.c,
933 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
934 python/py-unwind.c, python/py-utils.c, python/py-value.c,
935 python/py-varobj.c, python/py-xmethods.c, python/python.c,
936 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
938 2017-02-10 Tom Tromey <tom@tromey.com>
940 * ui-out.h (ui_out_emit_type): New class.
941 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
942 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
943 and ui_out_emit_tuple.
944 (enumerate_locals): Likewise.
945 (py_mi_print_variables, py_print_locals, py_print_args): Use
947 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
949 * common/gdb_optional.h: New file.
951 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
953 * MAINTAINERS (Write After Approval): Update my e-mail address.
955 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
958 * breakpoint.c (_initialize_breakpoint): Update the help description
959 of the 'commands' command to indicate that it takes a list argument.
961 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
963 * interps.c (current_interp_set_logging): Remove "return".
965 2017-02-09 Gary Benson <gbenson@redhat.com>
967 * symtab.c (add_symtab_completions): Prevent NULL pointer
970 2017-02-08 Pedro Alves <palves@redhat.com>
972 * interps.c (interp::interp): Remove reference to quiet_p.
973 (interp_set): Make static. Remove dead "Switching to" output
975 (interp_quiet_p, interp_set_quiet): Delete.
976 (interpreter_exec_cmd): Don't set the interpreter quiet.
977 * interps.h (interp_quiet_p): Make static.
978 (class interp) <quiet_p>: Remove field
980 2017-02-08 Jerome Guitton <guitton@adacore.com>
982 * cli/cli-decode.c (find_command_name_length): Make it extern.
983 * cli/cli-decode.h (find_command_name_length): Declare.
984 * cli/cli-script.c (command_name_equals, line_first_arg):
986 (process_next_line): Use cli-decode to parse command names.
987 (build_command_line): Make args a constant pointer.
989 2017-02-08 Jerome Guitton <guitton@adacore.com>
991 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
992 Remove case-insensitive search.
994 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
996 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
997 at the end of the line. Avoids an ARI warning.
999 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
1001 * NEWS: Mention support for record/replay of Intel 64 rdrand and
1002 rdseed instructions.
1003 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
1005 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
1008 Provide and use sparc32 and sparc64 target description XML files.
1009 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
1010 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
1011 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
1012 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
1013 * features/sparc/sparc32-solaris.xml: New file.
1014 * features/sparc/sparc64-solaris.xml: New file.
1015 * features/sparc/sparc32-solaris.c: Generated.
1016 * features/sparc/sparc64-solaris.c: Generated.
1017 * sparc-tdep.h: Account for differences in target descriptions.
1018 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
1019 (sparc32_register_type): Use target provided registers.
1020 (validate_tdesc_registers): New function.
1021 (sparc32_gdbarch_init): Use tdesc_has_registers.
1022 Set pseudoregister functions.
1023 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
1024 (sparc64_register_type): Use target provided registers.
1025 (sparc64_init_abi): Set pseudoregister functions.
1027 2017-02-03 Tom Tromey <tom@tromey.com>
1030 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
1031 with a single member.
1033 2017-02-03 Pedro Alves <palves@redhat.com>
1035 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
1036 (cli_interp_base::~cli_interp_base): New.
1037 (cli_interp): New struct.
1038 (as_cli_interp): Cast the interp itself to cli_interp.
1039 (cli_interpreter_pre_command_loop): Rename to ...
1040 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
1042 (cli_interpreter_init): Rename to ...
1043 (cli_interp::init): ... this. Remove 'self' parameter. Use
1044 boolean. Make extern.
1045 (cli_interpreter_resume): Rename to ...
1046 (cli_interp::resume): ... this. Remove 'data' parameter. Make
1048 (cli_interpreter_suspend): Rename to ...
1049 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
1051 (cli_interpreter_exec): Rename to ...
1052 (cli_interp::exec): ... this. Remove 'data' parameter. Make
1054 (cli_interpreter_supports_command_editing): Rename to ...
1055 (cli_interp_base::supports_command_editing): ... this. Remove
1056 'interp' parameter. Make extern.
1057 (cli_ui_out): Rename to ...
1058 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
1060 (cli_set_logging): Rename to ...
1061 (cli_interp_base::set_logging): ... this. Remove 'interp'
1062 parameter. Make extern.
1063 (cli_interp_procs): Delete.
1064 (cli_interp_factory): Adjust to use "new".
1065 * cli/cli-interp.h: Include "interps.h".
1066 (struct cli_interp_base): New struct.
1067 * interps.c (struct interp): Delete. Fields moved to interps.h.
1068 (interp_new): Delete.
1069 (interp::interp, interp::~interp): New.
1070 (interp_set): Use bool, and return void. Assume the interpreter
1071 has suspend, init and resume methods, and that the all return
1073 (set_top_level_interpreter): interp_set returns void.
1074 (interp_ui_out): Adapt.
1075 (current_interp_set_logging): Adapt.
1076 (interp_data): Delete.
1077 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
1078 (interp_exec): Adapt.
1079 (top_level_interpreter_data): Delete.
1080 * interps.h (interp_init_ftype, interp_resume_ftype)
1081 (interp_suspend_ftype, interp_exec_ftype)
1082 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
1083 (class interp): New.
1084 (interp_new): Delete.
1085 (interp_set): Now returns void. Use bool.
1086 (interp_data, top_level_interpreter_data): Delete.
1087 * mi/mi-common.h: Include interps.h.
1088 (class mi_interp): Inherit from interp. Define a ctor. Declare
1089 init, resume, suspect, exec, interp_ui_out, set_logging and
1090 pre_command_loop methods.
1091 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
1092 (mi_interpreter_init): Rename to ...
1093 (mi_interp::init): ... this. Remove the 'interp' parameter, use
1094 bool, return void and make extern. Adjust.
1095 (mi_interpreter_resume): ... Rename to ...
1096 (mi_interp::resume): ... this. Remove the 'data' parameter,
1097 return void and make extern. Adjust.
1098 (mi_interpreter_suspend): ... Rename to ...
1099 (mi_interp::suspend): ... this. Remove the 'data' parameter,
1100 return void and make extern. Adjust.
1101 (mi_interpreter_exec): ... Rename to ...
1102 (mi_interp::exec): ... this. Remove the 'data' parameter and make
1104 (mi_interpreter_pre_command_loop): ... Rename to ...
1105 (mi_interp::pre_command_loop): ... this. Remove the 'self'
1106 parameter and make extern.
1107 (mi_on_normal_stop_1): Adjust.
1108 (mi_ui_out): Rename to ...
1109 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
1110 parameter and make extern. Adjust.
1111 (mi_set_logging): Rename to ...
1112 (mi_interp::set_logging): ... this. Remove the 'interp'
1113 parameter and make extern. Adjust.
1114 (mi_interp_procs): Delete.
1115 (mi_interp_factory): Adjust to use 'new'.
1116 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
1117 (mi_print_exception, mi_execute_command, mi_load_progress):
1119 * tui/tui-interp.c (tui_interp): New class.
1120 (as_tui_interp): Return a tui_interp pointer.
1121 (tui_on_normal_stop, tui_on_signal_received)
1122 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
1123 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
1124 to use interp::interp_ui_out.
1125 (tui_init): Rename to ...
1126 (tui_interp::init): ... this. Remove the 'self' parameter, use
1127 bool, return void and make extern. Adjust.
1128 (tui_resume): Rename to ...
1129 (tui_interp::resume): ... this. Remove the 'data' parameter,
1130 return void and make extern. Adjust.
1131 (tui_suspend): Rename to ...
1132 (tui_interp::suspend): ... this. Remove the 'data' parameter,
1133 return void and make extern. Adjust.
1134 (tui_ui_out): Rename to ...
1135 (tui_interp::interp_ui_out): ... this. Remove the 'self'
1136 parameter, and make extern. Adjust.
1137 (tui_exec): Rename to ...
1138 (tui_interp::exec): ... this. Remove the 'data' parameter and
1140 (tui_interp_procs): Delete.
1141 (tui_interp_factory): Use "new".
1143 2017-02-02 Tom Tromey <tom@tromey.com>
1145 * rust-exp.y (ends_raw_string, space_then_number)
1146 (rust_identifier_start_p): Return bool.
1147 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
1148 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
1149 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
1150 (rust_chartype_p): Return bool.
1151 (val_print_struct, rust_print_struct_def, rust_print_type):
1153 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
1156 2017-02-02 Tom Tromey <tom@tromey.com>
1158 * rust-lang.c: Reindent.
1160 2017-02-02 Tom Tromey <tom@tromey.com>
1162 * rust-lang.h (rust_crate_for_block): Update.
1163 * rust-lang.c (rust_crate_for_block): Return std::string.
1164 (rust_get_disr_info): Use std:;string, not
1165 gdb::unique_xmalloc_ptr.
1166 * rust-exp.y (crate_name): Update.
1168 2017-02-02 Pedro Alves <palves@redhat.com>
1170 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
1171 field out of gdb_disassembler_test and make it static.
1173 2017-02-02 Pedro Alves <palves@redhat.com>
1175 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
1176 mi1_interp and mi_interp fields.
1178 2017-02-02 Pedro Alves <palves@redhat.com>
1180 * cli/cli-interp.c (struct saved_output_files, saved_output):
1181 Moved from cli/cli-logging.c.
1182 (cli_set_logging): New function.
1183 (cli_interp_procs): Install cli_set_logging.
1184 * cli/cli-interp.h (make_logging_output, cli_set_logging):
1186 * cli/cli-logging.c (struct saved_output_files, saved_output):
1187 Moved to cli/cli-interp.c.
1188 (pop_output_files): Don't save outputs here.
1189 (make_logging_output): New function.
1190 (handle_redirections): Don't build tee nor save previous outputs
1192 * interps.c (current_interp_set_logging): Change prototype.
1193 Assume there's always a set_logging_proc method installed.
1194 * interps.h (interp_set_logging_ftype): Change prototype.
1195 (current_interp_set_logging): Change prototype and adjust comment.
1196 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
1197 use make_logging_output.
1198 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
1199 2017-02-02 Pedro Alves <palves@redhat.com>
1201 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
1203 (set_logging_overwrite): ... here.
1204 (logging_no_redirect_file): Delete.
1205 (set_logging_redirect): Don't handle redirection on the fly.
1206 Instead warn that "logging off" / "logging on" is necessary.
1207 (pop_output_files): Delete references to logging_no_redirect_file.
1208 (show_logging_command): Always speak in terms of what will happen
1209 once logging is reenabled.
1211 2017-02-02 Pedro Alves <palves@redhat.com>
1213 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
1215 2017-02-02 Pedro Alves <palves@redhat.com>
1217 * disasm.c (gdb_pretty_print_insn): Rename to ...
1218 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
1219 Remove gdbarch parameter. Adapt to clear the object's buffers
1220 instead of allocating new buffers, and to print using the object's
1221 gdb_disassembler instead of calling gdb_print_insn.
1222 (dump_insns): Use gdb_pretty_print_disassembler.
1223 * disasm.h (gdb_pretty_print_insn): Delete declaration.
1224 (gdb_pretty_print_disassembler): New class.
1225 * record-btrace.c (btrace_insn_history): Use
1226 gdb_pretty_print_disassembler.
1228 2017-02-02 Pedro Alves <palves@redhat.com>
1230 * ada-lang.c (type_as_string): Use string_file.
1231 * ada-valprint.c (ada_print_floating): Use string_file.
1232 * ada-varobj.c (ada_varobj_scalar_image)
1233 (ada_varobj_get_value_image): Use string_file.
1234 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
1235 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
1236 * breakpoint.c (update_inserted_breakpoint_locations)
1237 (insert_breakpoint_locations, reattach_breakpoints)
1238 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
1239 (print_it_watchpoint): Use string_file.
1240 (save_breakpoints): Use stdio_file.
1241 * c-exp.y (oper): Use string_file.
1242 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
1244 (pop_output_files): Use delete.
1245 (handle_redirections): Use stdio_file and tee_file.
1246 * cli/cli-setshow.c (do_show_command): Use string_file.
1247 * compile/compile-c-support.c (c_compute_program): Use
1249 * compile/compile-c-symbols.c (generate_vla_size): Take a
1250 'string_file &' instead of a 'ui_file *'.
1251 (generate_c_for_for_one_variable): Take a 'string_file &' instead
1252 of a 'ui_file *'. Use string_file.
1253 (generate_c_for_variable_locations): Take a 'string_file &'
1254 instead of a 'ui_file *'.
1255 * compile/compile-internal.h (generate_c_for_for_one_variable):
1256 Take a 'string_file &' instead of a 'ui_file *'.
1257 * compile/compile-loc2c.c (push, pushf, unary, binary)
1258 (print_label, pushf_register_address, pushf_register)
1259 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
1260 'ui_file *'. Adjust.
1261 * compile/compile.c (compile_to_object): Use string_file.
1262 * compile/compile.h (compile_dwarf_expr_to_c)
1263 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
1265 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
1266 (replace_typedefs_qualified_name): Use string_file and
1268 * disasm.c (gdb_pretty_print_insn): Use string_file.
1269 (gdb_disassembly): Adjust reference the null_stream global.
1270 (do_ui_file_delete): Delete.
1271 (gdb_insn_length): Use null_stream.
1272 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
1273 * dwarf2loc.c (dwarf2_compile_property_to_c)
1274 (locexpr_generate_c_location, loclist_generate_c_location): Take a
1275 'string_file &' instead of a 'ui_file *'.
1276 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
1277 * dwarf2read.c (do_ui_file_peek_last): Delete.
1278 (dwarf2_compute_name): Use string_file.
1279 * event-top.c (gdb_setup_readline): Use stdio_file.
1280 * gdbarch.sh (verify_gdbarch): Use string_file.
1281 * gdbtypes.c (safe_parse_type): Use null_stream.
1282 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
1284 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
1285 'string_file *' instead of a 'ui_file *'.
1286 (gdbscm_arch_disassemble): Use string_file.
1287 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
1288 * guile/scm-ports.c (class ioscm_file_port): Now a class that
1289 inherits from ui_file.
1290 (ioscm_file_port_delete, ioscm_file_port_rewind)
1291 (ioscm_file_port_put): Delete.
1292 (ioscm_file_port_write): Rename to ...
1293 (ioscm_file_port::write): ... this. Remove file_port_magic
1295 (ioscm_file_port_new): Delete.
1296 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
1298 * guile/scm-type.c (tyscm_type_name): Use string_file.
1299 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
1301 * infcmd.c (print_return_value_1): Use string_file.
1302 * infrun.c (print_target_wait_results): Use string_file.
1303 * language.c (add_language): Use string_file.
1304 * location.c (explicit_to_string_internal): Use string_file.
1305 * main.c (captured_main_1): Use null_file.
1306 * maint.c (maintenance_print_architecture): Use stdio_file.
1307 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
1308 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
1309 event_channel>: Change type to mi_console_file pointer.
1310 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
1311 (mi_console_file_delete): Delete.
1312 (struct mi_console_file): Delete.
1313 (mi_console_file_magic): Delete.
1314 (mi_console_file_new): Delete.
1315 (mi_console_file::mi_console_file): New.
1316 (mi_console_file_delete): Delete.
1317 (mi_console_file_fputs): Delete.
1318 (mi_console_file::write): New.
1319 (mi_console_raw_packet): Delete.
1320 (mi_console_file::flush): New.
1321 (mi_console_file_flush): Delete.
1322 (mi_console_set_raw): Rename to ...
1323 (mi_console_file::set_raw): ... this.
1324 * mi/mi-console.h (class mi_console_file): New class.
1325 (mi_console_file_new, mi_console_set_raw): Delete.
1326 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
1327 (mi_set_logging): Use delete and tee_file. Adjust.
1328 * mi/mi-main.c (output_register): Use string_file.
1329 (mi_cmd_data_evaluate_expression): Use string_file.
1330 (mi_cmd_data_read_memory): Use string_file.
1331 (mi_cmd_execute, print_variable_or_computed): Use string_file.
1332 * mi/mi-out.c (mi_ui_out::main_stream): New.
1333 (mi_ui_out::rewind): Use main_stream and
1335 (mi_ui_out::put): Use main_stream and string_file.
1336 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
1337 Allocate a 'string_file' instead.
1338 (mi_out_new): Don't allocate a mem_fileopen stream here.
1339 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
1340 (mi_ui_out::main_stream): Declare method.
1341 * printcmd.c (eval_command): Use string_file.
1342 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
1343 * python/py-arch.c (archpy_disassemble): Use string_file.
1344 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
1345 * python/py-frame.c (frapy_str): Use string_file.
1346 * python/py-framefilter.c (py_print_type, py_print_single_arg):
1348 * python/py-type.c (typy_str): Use string_file.
1349 * python/py-unwind.c (unwind_infopy_str): Use string_file.
1350 * python/py-value.c (valpy_str): Use string_file.
1351 * record-btrace.c (btrace_insn_history): Use string_file.
1352 * regcache.c (regcache_print): Use stdio_file.
1353 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
1354 * remote.c (escape_buffer): Use string_file.
1355 * rust-lang.c (rust_get_disr_info): Use string_file.
1356 * serial.c (serial_open_ops_1): Use stdio_file.
1357 (do_serial_close): Use delete.
1358 * stack.c (print_frame_arg): Use string_file.
1359 (print_frame_args): Remove local mem_fileopen stream, not used.
1360 (print_frame): Use string_file.
1361 * symmisc.c (maintenance_print_symbols): Use stdio_file.
1362 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1363 Take a 'string_file *' instead of a 'ui_file *'.
1364 * top.c (new_ui): Use stdio_file and stderr_file.
1365 (free_ui): Use delete.
1366 (execute_command_to_string): Use string_file.
1367 (quit_confirm): Use string_file.
1368 * tracepoint.c (collection_list::append_exp): Use string_file.
1369 * tui/tui-disasm.c (tui_disassemble): Use string_file.
1370 * tui/tui-file.c: Don't include "ui-file.h".
1371 (enum streamtype, struct tui_stream): Delete.
1372 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
1373 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
1374 (tui_file::tui_file): New method.
1375 (tui_file_fputs): Delete.
1376 (tui_file_get_strbuf): Delete.
1377 (tui_file::puts): New method.
1378 (tui_file_adjust_strbuf): Delete.
1379 (tui_file_flush): Delete.
1380 (tui_file::flush): New method.
1381 * tui/tui-file.h: Tweak intro comment.
1383 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
1384 (tui_file_adjust_strbuf): Delete declarations.
1385 (class tui_file): New class.
1386 * tui/tui-io.c (tui_initialize_io): Use tui_file.
1387 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
1388 (tui_register_format): Use string_stream.
1389 * tui/tui-stack.c (tui_make_status_line): Use string_file.
1390 (tui_get_function_from_frame): Use string_file.
1391 * typeprint.c (type_to_string): Use string_file.
1392 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
1393 (null_stream): New global.
1394 (ui_file_delete): Delete.
1395 (ui_file::ui_file): New.
1396 (null_file_isatty): Delete.
1397 (ui_file::~ui_file): New.
1398 (null_file_rewind): Delete.
1399 (ui_file::printf): New.
1400 (null_file_put): Delete.
1401 (null_file_flush): Delete.
1402 (ui_file::putstr): New.
1403 (null_file_write): Delete.
1404 (ui_file::putstrn): New.
1405 (null_file_read): Delete.
1406 (ui_file::putc): New.
1407 (null_file_fputs): Delete.
1408 (null_file_write_async_safe): Delete.
1409 (ui_file::vprintf): New.
1410 (null_file_delete): Delete.
1411 (null_file::write): New.
1412 (null_file_fseek): Delete.
1413 (null_file::puts): New.
1414 (ui_file_data): Delete.
1415 (null_file::write_async_safe): New.
1416 (gdb_flush, ui_file_isatty): Adjust.
1417 (ui_file_put, ui_file_rewind): Delete.
1418 (ui_file_write): Adjust.
1419 (ui_file_write_for_put): Delete.
1420 (ui_file_write_async_safe, ui_file_read): Adjust.
1421 (ui_file_fseek): Delete.
1422 (fputs_unfiltered): Adjust.
1423 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
1424 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
1425 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
1426 (set_ui_file_data): Delete.
1427 (string_file::~string_file, string_file::write)
1428 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
1429 (do_ui_file_as_string, ui_file_as_string): Delete.
1430 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
1431 (struct mem_file): Delete.
1432 (mem_file_new): Delete.
1433 (stdio_file::stdio_file): New.
1434 (mem_file_delete): Delete.
1435 (stdio_file::stdio_file): New.
1436 (mem_fileopen): Delete.
1437 (stdio_file::~stdio_file): New.
1438 (mem_file_rewind): Delete.
1439 (stdio_file::set_stream): New.
1440 (mem_file_put): Delete.
1441 (stdio_file::open): New.
1442 (mem_file_write): Delete.
1443 (stdio_file_magic, struct stdio_file): Delete.
1444 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
1445 (stdio_file::flush): New.
1446 (stdio_file_read): Rename to ...
1447 (stdio_file::read): ... this. Adjust.
1448 (stdio_file_write): Rename to ...
1449 (stdio_file::write): ... this. Adjust.
1450 (stdio_file_write_async_safe): Rename to ...
1451 (stdio_file::write_async_safe) ... this. Adjust.
1452 (stdio_file_fputs): Rename to ...
1453 (stdio_file::puts) ... this. Adjust.
1454 (stdio_file_isatty): Delete.
1455 (stdio_file_fseek): Delete.
1456 (stdio_file::isatty): New.
1457 (stderr_file_write): Rename to ...
1458 (stderr_file::write) ... this. Adjust.
1459 (stderr_file_fputs): Rename to ...
1460 (stderr_file::puts) ... this. Adjust.
1461 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
1462 (stderr_file::stderr_file): New.
1463 (tee_file_magic): Delete.
1464 (struct tee_file): Delete.
1465 (tee_file::tee_file): New.
1466 (tee_file_new): Delete.
1467 (tee_file::~tee_file): New.
1468 (tee_file_delete): Delete.
1469 (tee_file_flush): Rename to ...
1470 (tee_file::flush): ... this. Adjust.
1471 (tee_file_write): Rename to ...
1472 (tee_file::write): ... this. Adjust.
1473 (tee_file::write_async_safe): New.
1474 (tee_file_fputs): Rename to ...
1475 (tee_file::puts): ... this. Adjust.
1476 (tee_file_isatty): Rename to ...
1477 (tee_file::isatty): ... this. Adjust.
1478 * ui-file.h (struct obstack, struct ui_file): Don't
1480 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
1481 (ui_file_write_ftype)
1482 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
1483 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
1484 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
1485 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
1486 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
1487 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
1488 (set_ui_file_fseek): Delete.
1489 (ui_file_data, ui_file_delete, ui_file_rewind)
1490 (struct ui_file): New.
1492 (class null_file): New.
1493 (null_stream): Declare.
1494 (ui_file_write_for_put, ui_file_put): Delete.
1495 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
1497 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
1498 (gdb_fopen, tee_file_new): Delete.
1499 (struct string_file): New.
1500 (struct stdio_file): New.
1501 (stdio_file_up): New.
1502 (struct stderr_file): New.
1503 (class tee_file): New.
1504 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
1505 of a 'ui_file *'. Adjust.
1506 * ui-out.h (class ui_out) <field_stream>: Likewise.
1507 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
1508 (null_stream): Delete.
1509 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
1511 * utils.h (struct ui_file): Delete forward declaration..
1512 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
1513 (error_stream): Take a 'string_file &' instead of a
1515 * varobj.c (varobj_value_get_print_value): Use string_file.
1516 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
1517 * gdbarch.c: Regenerate.
1519 2017-02-02 Pedro Alves <palves@redhat.com>
1521 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
1522 (gdb_pretty_print_insn): ... this. Now a free function. Add back
1523 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
1524 Adjust to call gdb_print_insn instead of
1525 gdb_disassembler::print_insn.
1526 (dump_insns, do_mixed_source_and_assembly_deprecated)
1527 (do_mixed_source_and_assembly, do_assembly_only): Add back a
1528 'gdbarch' parameter. Remove gdb_disassembler parameter.
1529 (gdb_disassembly): Don't allocate a gdb_disassembler here.
1530 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
1532 (gdb_pretty_print_insn): Re-add declaration.
1533 * record-btrace.c (btrace_insn_history): Don't allocate a
1534 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
1536 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
1538 * disasm.h (gdb_disassembly): Remove file_string parameter.
1539 * disasm.c (gdb_disassembly): Likewise.
1540 * cli/cli-cmds.c (print_disassembly): Adapt.
1541 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
1542 * stack.c (do_gdb_disassembly): Likewise.
1544 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
1546 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
1547 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
1548 targets. And if the implicit value is longer than needed, extract
1549 the first bytes instead of the "least significant" ones.
1551 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
1553 * btrace.c (btrace_enable): Do not call btrace_add_pc for
1554 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
1555 (btrace_fetch): Assert can_access_registers_ptid.
1556 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
1557 validate_registers_access.
1559 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
1561 * gdbthread.h (can_access_registers_ptid): New.
1562 * thread.c (can_access_registers_ptid): New.
1564 2017-02-01 Pedro Alves <palves@redhat.com>
1566 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
1568 2017-01-31 Pedro Alves <palves@redhat.com>
1570 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
1573 2017-01-31 Pedro Alves <palves@redhat.com>
1575 * stack.c (print_frame_args): Remove local mem_fileopen stream,
1578 2017-01-31 Pedro Alves <palves@redhat.com>
1580 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
1582 2017-01-31 Pedro Alves <palves@redhat.com>
1584 * common/scoped_restore.h
1585 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
1586 change the value's parameter type to T2.
1587 (make_scoped_restore): Likewise.
1589 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1590 Richard Henderson <rth@redhat.com>
1592 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
1593 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
1594 GS_BASE for older kernels.
1595 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
1596 GS_BASE for older kernels.
1597 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
1598 and GS_BASE to the offset table.
1599 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
1600 system register group.
1601 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
1603 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
1605 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
1606 AMD64_GSBASE_REGNUM.
1607 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
1608 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
1609 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
1610 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
1611 i386/64bit-segments.xml in those rules.
1612 * features/i386/64bit-segments.xml: New file.
1613 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
1614 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
1615 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
1616 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
1617 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
1618 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
1619 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
1620 * features/i386/amd64-avx-linux.c: Regenerated.
1621 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
1622 * features/i386/amd64-avx-mpx.c: Regenerated.
1623 * features/i386/amd64-avx512-linux.c: Regenerated.
1624 * features/i386/amd64-linux.c: Regenerated.
1625 * features/i386/amd64-mpx-linux.c: Regenerated.
1626 * features/i386/i386-avx-mpx-linux.c: Regenerated.
1627 * features/i386/i386-avx-mpx.c: Regenerated.
1628 * features/i386/x32-avx-linux.c: Regenerated.
1629 * features/i386/x32-avx512-linux.c: Regenerated.
1630 * regformats/i386/amd64-avx-linux.dat: Regenerated.
1631 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
1632 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
1633 * regformats/i386/amd64-linux.dat: Regenerated.
1634 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
1635 * regformats/i386/x32-avx-linux.dat: Regenerated.
1636 * regformats/i386/x32-avx512-linux.dat: Regenerated.
1637 * regformats/i386/x32-linux.dat: Regenerated.
1639 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1641 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
1642 Set to AMD64_NUM_REGS.
1644 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1646 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
1647 that checks validity of a register number.
1649 2017-01-27 Kees Cook <keescook@google.com>
1651 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
1652 fetch_fpregs if target has fpa registers.
1653 (arm_linux_store_inferior_registers): Call store_fpregs if target
1656 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
1658 * cris-tdep.c (cris_gdbarch_init): Remove check for
1659 info.byte_order and force it to BFD_ENDIAN_LITTLE.
1661 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
1663 * corelow.c (get_core_register_section): Check for regset
1664 existence before checking for REGSET_VARIABLE_SIZE.
1666 2017-01-26 Yao Qi <yao.qi@linaro.org>
1667 Pedro Alves <palves@redhat.com>
1670 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
1671 call memory_error, save memaddr instead.
1672 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
1673 negative, cal memory_error.
1674 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
1676 2017-01-26 Yao Qi <yao.qi@linaro.org>
1678 * disasm-selftests.c (memory_error_test): New function.
1679 (_initialize_disasm_selftests): Register memory_error_test.
1681 2017-01-26 Yao Qi <yao.qi@linaro.org>
1683 * Makefile.in (SFILES): Add disasm-selftests.c and
1685 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
1686 * disasm-selftests.c: New file.
1687 * selftest-arch.c: New file.
1688 * selftest-arch.h: New file.
1690 2017-01-26 Yao Qi <yao.qi@linaro.org>
1692 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
1693 to bfd_arch_mep. Don't return 0 if section is not
1694 found. Call print_insn_mep.
1696 2017-01-26 Pedro Alves <palves@redhat.com>
1697 Yao Qi <yao.qi@linaro.org>
1699 * arm-tdep.c: Include "disasm.h".
1700 (gdb_print_insn_arm): Update code to get gdbarch.
1701 * disasm.c (dis_asm_read_memory): Change it to
1702 gdb_disassembler::dis_asm_read_memory.
1703 (dis_asm_memory_error): Likewise.
1704 (dis_asm_print_address): Likewise.
1705 (gdb_pretty_print_insn): Change it to
1706 gdb_disassembler::pretty_print_insn.
1707 (dump_insns): Add one argument gdb_disassemlber. All
1709 (do_mixed_source_and_assembly_deprecated): Likewise.
1710 (do_mixed_source_and_assembly): Likewise.
1711 (do_assembly_only): Likewise.
1712 (gdb_disassembler::gdb_disassembler): New.
1713 (gdb_disassembler::print_insn): New.
1714 * disasm.h (class gdb_disassembler): New.
1715 (gdb_pretty_print_insn): Remove declaration.
1716 (gdb_disassemble_info): Likewise.
1717 * guile/scm-disasm.c (class gdbscm_disassembler): New.
1718 (gdbscm_disasm_read_memory_worker): Update.
1719 (gdbscm_disasm_read_memory): Update.
1720 (gdbscm_disasm_memory_error): Remove.
1721 (gdbscm_disasm_print_address): Remove.
1722 (gdbscm_disassembler::gdbscm_disassembler): New.
1723 (gdbscm_print_insn_from_port): Update.
1724 * mips-tdep.c: Include disasm.h.
1725 (gdb_print_insn_mips): Update code to get gdbarch.
1726 * record-btrace.c (btrace_insn_history): Update.
1727 * spu-tdep.c: Include disasm.h.
1728 (struct spu_dis_asm_data): Remove.
1729 (struct spu_dis_asm_info): New.
1730 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
1732 (gdb_print_insn_spu): Cast disassemble_info to
1735 2017-01-26 Yao Qi <yao.qi@linaro.org>
1737 * disasm.c (do_ui_file_delete): Delete.
1738 (gdb_insn_length): Move code creating stream to ...
1739 * utils.c (null_stream): ... here. New function.
1740 * utils.h (null_stream): Declare.
1742 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
1744 * python/py-inferior.c (find_thread_object): Return directly
1745 from the loop. Remove "found" variable.
1747 2017-01-21 Joel Brobecker <brobecker@adacore.com>
1749 GDB 7.12.1 released.
1751 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
1753 * python/py-function.c (fnpy_call): Reorder declarations to have
1754 the gdbpy_enter object declared first.
1755 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
1757 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
1760 * python/python-internal.h (PyMem_RawMalloc): Define for
1762 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
1763 PyMem_RawMalloc instead of PyMem_Malloc.
1765 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
1766 Luis Machado <lgustavo@codesourcery.com>
1768 * NEWS (New commands): Mention flash-erase.
1769 (New MI commands): Mention target-flash-erase.
1770 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
1772 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
1773 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
1774 * target.c (flash_erase_command): New function.
1775 (initialize_targets): Add new flash-erase command.
1776 * target.h (flash_erase_command): New declaration.
1778 2017-01-20 Joel Brobecker <brobecker@adacore.com>
1780 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
1781 HAVE_SYS_PROCFS_H is defined.
1783 2017-01-18 Alan Hayward <alan.hayward@arm.com>
1785 * remote.c (struct cached_reg): Change data into a pointer.
1786 * (stop_reply_dtr): Free data pointers before deleting vector.
1787 (process_stop_reply): Likewise.
1788 (remote_parse_stop_reply): Allocate space for data
1790 2017-01-18 Alan Hayward <alan.hayward@arm.com>
1792 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
1794 (amd64_pseudo_register_read_value): Likewise.
1795 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
1796 (store_register_using_P): Likewise.
1797 * regcache.c (regcache_xfer_part): Likewise.
1799 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
1801 Split real and pseudo registers.
1802 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
1803 (sparc32_pseudo_regnum): New enum.
1804 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
1805 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
1806 (SPARC32_CP0_REGISTERS): New macro.
1807 (sparc32_pseudo_register_name): New function.
1808 (sparc32_register_name): Use sparc32_pseudo_register_name.
1809 (sparc32_pseudo_register_type): New function.
1810 (sparc32_register_type): Use sparc32_pseudo_register_type.
1811 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
1812 pseudo register numbers.
1813 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
1814 (SPARC64_CP0_REGISTERS): New macro.
1815 (sparc64_pseudo_register_name): New function.
1816 (sparc64_register_name): Use sparc64_pseudo_register_name.
1817 (sparc64_pseudo_register_type): New function.
1818 (sparc64_register_type): Use sparc64_pseudo_register_type.
1819 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
1820 pseudo register numbers.
1821 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
1822 sparc64_store_arguments): Handle pseudo register numbers.
1824 2017-01-13 Yao Qi <yao.qi@linaro.org>
1826 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
1827 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
1829 (getpkt_or_notif_sane_1): Likewise.
1831 2017-01-13 Yao Qi <yao.qi@linaro.org>
1833 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
1834 of CC. Pass "-x c++-header" instead of "-x c".
1836 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
1838 * remote.c (remote_can_async_p): Update comment.
1840 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
1842 * linux-nat.c (linux_nat_can_async_p): Update comment.
1844 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
1846 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
1848 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
1850 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
1852 2017-01-10 Tom Tromey <tom@tromey.com>
1854 * python/py-type.c (typy_legacy_template_argument): Update.
1855 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
1856 ~demangle_parse_info): Declare new members.
1857 (cp_demangled_name_to_comp): Return unique_ptr.
1858 (cp_demangled_name_parse_free)
1859 (make_cleanup_cp_demangled_name_parse_free)
1860 (cp_new_demangle_parse_info): Remove.
1861 * cp-support.c (do_demangled_name_parse_free_cleanup)
1862 (make_cleanup_cp_demangled_name_parse_free): Remove.
1863 (inspect_type, cp_canonicalize_string_full)
1864 (cp_canonicalize_string): Update.
1865 (mangled_name_to_comp): Change return type.
1866 (cp_class_name_from_physname, method_name_from_physname)
1867 (cp_func_name, cp_remove_params): Update.
1868 * cp-name-parser.y (demangle_parse_info): New constructor, from
1869 cp_new_demangle_parse_info.
1870 (~demangle_parse_info): New destructor, from
1871 cp_demangled_name_parse_free.
1872 (cp_merge_demangle_parse_infos): Update.
1873 (cp_demangled_name_to_comp): Change return type.
1875 2017-01-10 Tom Tromey <tom@tromey.com>
1877 * top.c (prevent_dont_repeat): Change return type.
1878 * python/python.c (execute_gdb_command): Use std::string.
1880 * guile/guile.c (gdbscm_execute_gdb_command): Update.
1881 * command.h (prevent_dont_repeat): Change return type.
1882 * breakpoint.c (bpstat_do_actions_1): Update.
1884 2017-01-10 Tom Tromey <tom@tromey.com>
1886 * value.h (scoped_value_mark::~scoped_value_mark): Call
1888 (scoped_value_mark::free_to_mark): New method.
1889 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
1892 2017-01-10 Tom Tromey <tom@tromey.com>
1894 * python/py-value.c (valpy_dereference, valpy_referenced_value)
1895 (valpy_reference_value, valpy_const_value, valpy_get_address)
1896 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
1897 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
1898 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
1899 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
1901 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
1902 * value.h (scoped_value_mark): New class.
1904 2017-01-10 Tom Tromey <tom@tromey.com>
1906 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
1907 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
1908 * psymtab.c (discard_psymtabs_upto): Remove.
1909 (make_cleanup_discard_psymtabs): Remove.
1910 (struct psymtab_state): Remove.
1912 2017-01-10 Tom Tromey <tom@tromey.com>
1914 * record-full.c (record_full_save_cleanups): Remove.
1915 (record_full_save): Use gdb::unlinker.
1916 * gcore.c (do_bfd_delete_cleanup): Remove.
1917 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
1919 * dwarf2read.c (unlink_if_set): Remove.
1920 (write_psymtabs_to_index): Use gdb::unlinker.
1921 * common/gdb_unlinker.h: New file.
1923 2017-01-10 Tom Tromey <tom@tromey.com>
1925 * windows-tdep.c (windows_xfer_shared_library): Update.
1926 * windows-nat.c (windows_make_so): Update.
1927 * utils.h (make_cleanup_bfd_unref): Remove.
1928 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
1929 * symfile.h (symfile_bfd_open)
1930 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
1931 * symfile.c (read_symbols, symbol_file_add)
1932 (separate_debug_file_exists): Update.
1933 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
1934 (generic_load, reread_symbols): Update.
1935 * symfile-mem.c (symbol_file_add_from_memory): Update.
1936 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
1937 (spu_symbol_file_add_from_memory): Update.
1938 * solist.h (struct target_so_ops) <bfd_open>: Return
1940 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
1941 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
1943 (solib_map_sections, reload_shared_libraries_1): Update.
1944 * solib-svr4.c (enable_break): Update.
1945 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
1946 * solib-frv.c (enable_break2): Update.
1947 * solib-dsbt.c (enable_break): Update.
1948 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
1950 (darwin_solib_get_all_image_info_addr_at_init): Update.
1951 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
1952 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
1953 * record-full.c (record_full_save): Update.
1954 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
1955 * procfs.c (insert_dbx_link_bpt_in_file): Update.
1956 * minidebug.c (find_separate_debug_file_in_section): Return
1958 * machoread.c (macho_add_oso_symfile): Change abfd to
1960 (macho_symfile_read_all_oso): Update.
1961 (macho_check_dsym): Return gdb_bfd_ref_ptr.
1962 (macho_symfile_read): Update.
1963 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
1964 (jit_bfd_try_read_symtab): Update.
1965 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1966 (gdb_bfd_openw, gdb_bfd_openr_iovec)
1967 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
1969 (gdb_bfd_ref_policy): New struct.
1970 (gdb_bfd_ref_ptr): New typedef.
1971 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1972 (gdb_bfd_openw, gdb_bfd_openr_iovec)
1973 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
1975 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
1976 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
1977 (gcore_command): Update.
1978 * exec.c (exec_file_attach): Update.
1979 * elfread.c (elf_symfile_read): Update.
1980 * dwarf2read.c (dwarf2_get_dwz_file): Update.
1981 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
1982 (open_and_init_dwo_file): Update.
1983 (open_dwp_file): Return gdb_bfd_ref_ptr.
1984 (open_and_init_dwp_file): Update.
1985 * corelow.c (core_open): Update.
1986 * compile/compile-object-load.c (compile_object_load): Update.
1987 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
1988 * coffread.c (coff_symfile_read): Update.
1989 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
1990 gdb_bfd_ref_ptr. Rename.
1991 (dump_bfd_file, restore_command): Update.
1992 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
1993 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
1994 (find_separate_debug_file_by_buildid): Update.
1996 2017-01-10 Tom Tromey <tom@tromey.com>
1998 * common/gdb_ref_ptr.h: New file.
1999 * python/py-ref.h (struct gdbpy_ref_policy): New.
2000 (gdbpy_ref): Now a typedef.
2002 2017-01-10 Tom Tromey <tom@tromey.com>
2004 * utils.h (make_cleanup_htab_delete): Don't declare.
2005 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
2007 * linespec.c (decode_compound_collector): Add constructor,
2009 (lookup_prefix_sym): Remove cleanup.
2010 (symtab_collector): Add constructor, destructor.
2011 (collect_symtabs_from_filename): Remove cleanup.
2012 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
2013 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2015 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
2016 * dwarf2read.c (dw2_expand_symtabs_matching)
2017 (dw2_map_symbol_filenames, dwarf_decode_macros)
2018 (write_psymtabs_to_index): Use htab_up.
2019 * dwarf2loc.c (func_verify_no_selftailcall)
2020 (call_site_find_chain_1, func_verify_no_selftailcall)
2021 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
2022 std::vector, gdb::unique_xmalloc_ptr.
2023 (call_sitep): Remove typedef.
2024 (dwarf2_locexpr_baton_eval): Remove unused variable.
2026 2017-01-10 Tom Tromey <tom@tromey.com>
2028 * python/python-internal.h (make_cleanup_py_decref)
2029 (make_cleanup_py_xdecref): Don't declare.
2030 * python/py-utils.c (py_decref, make_cleanup_py_decref)
2031 (py_xdecref, make_cleanup_py_xdecref): Remove.
2033 2017-01-10 Tom Tromey <tom@tromey.com>
2035 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
2036 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
2038 2017-01-10 Tom Tromey <tom@tromey.com>
2040 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
2042 2017-01-10 Tom Tromey <tom@tromey.com>
2044 * python/py-utils.c (unicode_to_encoded_string)
2045 (python_string_to_target_string)
2046 (python_string_to_target_python_string)
2047 (python_string_to_host_string, gdbpy_obj_to_string)
2048 (get_addr_from_python): Use gdbpy_ref.
2050 2017-01-10 Tom Tromey <tom@tromey.com>
2052 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
2055 2017-01-10 Tom Tromey <tom@tromey.com>
2057 * python/python.c (eval_python_command, gdbpy_decode_line)
2058 (gdbpy_run_events, gdbpy_start_type_printers)
2059 (gdbpy_apply_type_printers): Use gdbpy_ref.
2061 2017-01-10 Tom Tromey <tom@tromey.com>
2063 * python/py-param.c (get_doc_string, compute_enum_values): Use
2066 2017-01-10 Tom Tromey <tom@tromey.com>
2068 * python/py-inferior.c (find_thread_object, build_inferior_list):
2071 2017-01-10 Tom Tromey <tom@tromey.com>
2073 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
2075 2017-01-10 Tom Tromey <tom@tromey.com>
2077 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
2080 2017-01-10 Tom Tromey <tom@tromey.com>
2082 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
2084 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
2087 2017-01-10 Tom Tromey <tom@tromey.com>
2089 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
2092 2017-01-10 Tom Tromey <tom@tromey.com>
2094 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
2095 decref results of PyArg_ParseTupleAndKeywords.
2097 2017-01-10 Tom Tromey <tom@tromey.com>
2099 * python/python.c (python_run_simple_file): Use
2100 unique_xmalloc_ptr, gdbpy_ref.
2102 2017-01-10 Tom Tromey <tom@tromey.com>
2104 * python/py-prettyprint.c (print_stack_unless_memory_error)
2105 (print_string_repr, print_children): Use gdbpy_ref.
2106 (dummy_python_frame): New class.
2107 (dummy_python_frame::dummy_python_frame): Rename from
2108 push_dummy_python_frame.
2109 (py_restore_tstate): Remove.
2111 2017-01-10 Tom Tromey <tom@tromey.com>
2113 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
2115 2017-01-10 Tom Tromey <tom@tromey.com>
2117 * python/python.c (ensure_python_env, restore_python_env):
2119 * python/python-internal.h (ensure_python_env): Don't declare.
2120 * varobj.h (varobj_ensure_python_env): Don't declare.
2121 * varobj.c (varobj_ensure_python_env): Remove.
2123 2017-01-10 Tom Tromey <tom@tromey.com>
2125 * varobj.c (varobj_value_get_print_value): Use
2128 2017-01-10 Tom Tromey <tom@tromey.com>
2130 * python/py-prettyprint.c (print_string_repr, print_children):
2132 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
2134 * varobj.c (varobj_value_get_print_value): Update.
2135 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
2137 2017-01-10 Tom Tromey <tom@tromey.com>
2139 * varobj.c (varobj_get_display_hint)
2140 (dynamic_varobj_has_child_method, install_new_value_visualizer)
2141 (varobj_set_visualizer, free_variable): Use
2144 2017-01-10 Tom Tromey <tom@tromey.com>
2146 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
2147 (do_finish_initialization): New function. Use gdbpy_ref.
2148 (gdbpy_finish_initialization): Use gdbpy_enter. Call
2149 do_finish_initialization.
2151 2017-01-10 Tom Tromey <tom@tromey.com>
2153 * python/py-param.c (get_set_value, get_show_value): Use
2154 gdbpy_enter, gdbpy_ref.
2156 2017-01-10 Tom Tromey <tom@tromey.com>
2158 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
2160 2017-01-10 Tom Tromey <tom@tromey.com>
2162 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
2164 2017-01-10 Tom Tromey <tom@tromey.com>
2166 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
2167 Use gdbpy_enter_varobj.
2169 2017-01-10 Tom Tromey <tom@tromey.com>
2171 * varobj.c (gdbpy_enter_varobj): New constructor.
2172 * python/python-internal.h (gdbpy_enter_varobj): New class.
2173 * python/py-varobj.c (py_varobj_get_iterator): Use
2176 2017-01-10 Tom Tromey <tom@tromey.com>
2178 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
2179 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
2180 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
2181 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
2183 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
2185 2017-01-10 Tom Tromey <tom@tromey.com>
2187 * python/py-xmethods.c (invoke_match_method): Use
2190 2017-01-10 Tom Tromey <tom@tromey.com>
2192 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
2193 gdbpy_enter, gdbpy_ref.
2195 2017-01-10 Tom Tromey <tom@tromey.com>
2197 * python/python.c (python_interactive_command): Use gdbpy_enter.
2199 2017-01-10 Tom Tromey <tom@tromey.com>
2201 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
2204 2017-01-10 Tom Tromey <tom@tromey.com>
2206 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
2207 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
2209 2017-01-10 Tom Tromey <tom@tromey.com>
2211 * utils.h (htab_deleter): New struct.
2212 (htab_up): New typedef.
2213 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
2214 gdbpy_enter, gdbpy_ref, htab_up.
2216 2017-01-10 Tom Tromey <tom@tromey.com>
2218 * python/py-unwind.c (pending_frame_invalidate): Remove.
2219 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
2221 2017-01-10 Tom Tromey <tom@tromey.com>
2223 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
2224 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
2226 2017-01-10 Tom Tromey <tom@tromey.com>
2228 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
2230 2017-01-10 Tom Tromey <tom@tromey.com>
2232 * python/python.c (gdbpy_eval_from_control_command)
2233 (gdbpy_source_script, gdbpy_run_events)
2234 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
2235 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
2238 2017-01-10 Tom Tromey <tom@tromey.com>
2240 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
2242 2017-01-10 Tom Tromey <tom@tromey.com>
2244 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
2246 2017-01-10 Tom Tromey <tom@tromey.com>
2248 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
2249 (python_on_inferior_call_pre, python_on_inferior_call_post)
2250 (python_on_memory_change, python_on_register_change)
2251 (python_inferior_exit, python_new_objfile, add_thread_object)
2252 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
2254 2017-01-10 Tom Tromey <tom@tromey.com>
2256 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
2257 (bpfinishpy_handle_exit): Use gdbpy_enter.
2259 2017-01-10 Tom Tromey <tom@tromey.com>
2261 * python/py-cmd.c (cmdpy_destroyer)
2262 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
2265 2017-01-10 Tom Tromey <tom@tromey.com>
2267 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
2269 (gdbpy_breakpoint_has_cond): Likewise.
2271 2017-01-10 Tom Tromey <tom@tromey.com>
2273 * python/python.c (gdbpy_enter): New constructor.
2274 (~gdbpy_enter): New destructor.
2275 (restore_python_env, ensure_python_env): Rewrite.
2276 * python/python-internal.h (gdbpy_enter): New class.
2278 2017-01-10 Tom Tromey <tom@tromey.com>
2280 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
2282 2017-01-10 Tom Tromey <tom@tromey.com>
2284 * python/py-value.c (value_has_field, get_field_flag)
2285 (get_field_type, valpy_getitem, convert_value_from_python): Use
2288 2017-01-10 Tom Tromey <tom@tromey.com>
2290 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
2293 2017-01-10 Tom Tromey <tom@tromey.com>
2295 * python/py-prettyprint.c (search_pp_list)
2296 (find_pretty_printer_from_objfiles)
2297 (find_pretty_printer_from_progspace)
2298 (find_pretty_printer_from_gdb, find_pretty_printer)
2299 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
2302 2017-01-10 Tom Tromey <tom@tromey.com>
2304 * python/py-param.c (call_doc_function): Use gdbpy_ref.
2306 2017-01-10 Tom Tromey <tom@tromey.com>
2308 * python/py-linetable.c (build_line_table_tuple_from_pcs)
2309 (ltpy_get_all_source_lines): Use gdbpy_ref.
2311 2017-01-10 Tom Tromey <tom@tromey.com>
2313 * python/py-framefilter.c (extract_sym, extract_value)
2314 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
2317 2017-01-10 Tom Tromey <tom@tromey.com>
2319 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
2321 2017-01-10 Tom Tromey <tom@tromey.com>
2323 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
2325 2017-01-10 Tom Tromey <tom@tromey.com>
2327 * python/py-function.c (convert_values_to_python, fnpy_init): Use
2330 2017-01-10 Tom Tromey <tom@tromey.com>
2332 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
2334 2017-01-10 Tom Tromey <tom@tromey.com>
2336 * python/py-type.c (convert_field, make_fielditem, typy_fields)
2337 (typy_range): Use gdbpy_ref.
2339 2017-01-10 Tom Tromey <tom@tromey.com>
2341 * python/py-threadevent.c (create_thread_event_object): Use
2343 * python/py-stopevent.c (create_stop_event_object): Simplify.
2344 (emit_stop_event): Use gdbpy_ref.
2345 * python/py-signalevent.c (create_signal_event_object): Use
2347 * python/py-newobjfileevent.c (create_new_objfile_event_object)
2348 (emit_new_objfile_event, create_clear_objfiles_event_object)
2349 (emit_clear_objfiles_event): Use gdbpy_ref.
2350 * python/py-infevents.c (create_inferior_call_event_object)
2351 (create_register_changed_event_object)
2352 (create_memory_changed_event_object, emit_inferior_call_event)
2353 (emit_memory_changed_event, emit_register_changed_event): Use
2355 * python/py-exitedevent.c (create_exited_event_object)
2356 (emit_exited_event): Use gdbpy_ref.
2357 * python/py-event.h (evpy_emit_event): Remove
2358 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
2359 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
2360 * python/py-continueevent.c (emit_continue_event): Use
2362 * python/py-breakpoint.c (gdbpy_breakpoint_created)
2363 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
2365 * python/py-bpevent.c (create_breakpoint_event_object): Use
2368 2017-01-10 Tom Tromey <tom@tromey.com>
2370 * python/py-ref.h: New file.
2372 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
2374 * cli-out.c (cli_ui_out::do_redirect): Change return type to
2376 * cli-out.h (cli_ui_out::do_redirect): Likewise.
2377 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
2378 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
2379 * ui-out.c (ui_out::redirect): Likewise.
2380 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
2381 * cli/cli-logging.c (set_logging_redirect): Update call site of
2383 (handle_redirections): Likewise.
2384 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
2385 * top.c (execute_command_to_string): Likewise.
2386 * utils.c (do_ui_out_redirect_pop): Likewise.
2388 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
2390 * stack.c (_initialize_stack): Update "frame" command help message.
2392 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
2394 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
2396 2017-01-06 Yao Qi <yao.qi@linaro.org>
2398 * x86-linux-nat.h: Include gdb_proc_service.h.
2400 2017-01-06 Yao Qi <yao.qi@linaro.org>
2402 * ser-base.h: Include serial.h.
2404 2017-01-06 Yao Qi <yao.qi@linaro.org>
2406 * ppc-linux-tdep.h: Include ppc-tdep.h.
2408 2017-01-06 Yao Qi <yao.qi@linaro.org>
2410 * nat/amd64-linux-siginfo.h: Include signal.h.
2412 2017-01-06 Yao Qi <yao.qi@linaro.org>
2414 * nat/aarch64-linux-hw-point.h: Include break-common.h.
2416 2017-01-06 Yao Qi <yao.qi@linaro.org>
2418 * mi/mi-parse.h: Include mi-cmds.h.
2420 2017-01-06 Yao Qi <yao.qi@linaro.org>
2422 * inf-loop.c: Don't include "target.h".
2423 * inf-loop.h: Include it here.
2425 2017-01-06 Yao Qi <yao.qi@linaro.org>
2427 * dfp.h: Include "dboulest.h" and "expression.h".
2429 2017-01-06 Yao Qi <yao.qi@linaro.org>
2431 * ax-gdb.h: Include "ax.h".
2433 2017-01-06 Yao Qi <yao.qi@linaro.org>
2435 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
2436 with nat/gdb_ptrace.h.
2438 2017-01-05 Yao Qi <yao.qi@linaro.org>
2440 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
2442 (mips64_fbsd_sigframe_init): Likewise.
2444 2017-01-04 John Baldwin <jhb@FreeBSD.org>
2446 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
2447 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
2449 2017-01-04 John Baldwin <jhb@FreeBSD.org>
2451 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2452 * NEWS: Mention new FreeBSD/mips native configuration.
2453 * config/mips/fbsd.mh: New file.
2454 * configure.host: Add mips*-*-freebsd*.
2455 * mips-fbsd-nat.c: New file.
2457 2017-01-04 John Baldwin <jhb@FreeBSD.org>
2459 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
2460 (ALLDEPFILES): Add mips-fbsd-tdep.c.
2461 * NEWS: Mention new FreeBSD/mips target.
2462 * configure.tgt: Add mips*-*-freebsd*.
2463 * mips-fbsd-tdep.c: New file.
2464 * mips-fbsd-tdep.h: New file.
2466 2017-01-04 Yao Qi <yao.qi@linaro.org>
2468 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
2469 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
2471 2017-01-01 Joel Brobecker <brobecker@adacore.com>
2473 Update copyright year range in all GDB files.
2475 2017-01-01 Joel Brobecker <brobecker@adacore.com>
2477 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
2479 For older changes see ChangeLog-2016.
2485 version-control: never