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