1 2017-09-05 Yao Qi <yao.qi@linaro.org>
3 * regformats/regdat.sh: Update generated code.
5 2017-09-05 Yao Qi <yao.qi@linaro.org>
7 * regformats/regdat.sh: Adjust code order.
9 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
11 * expprint.c (dump_subexp_body_standard): Use constant format
12 string in fprintf_filtered call.
14 2017-09-04 John Baldwin <jhb@FreeBSD.org>
16 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
18 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
20 2017-09-04 John Baldwin <jhb@FreeBSD.org>
22 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
24 2017-09-04 John Baldwin <jhb@FreeBSD.org>
26 * bsd-kvm.o: Define _KMEMUSER.
27 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
28 * configure: Regenerate.
30 2017-09-04 John Baldwin <jhb@FreeBSD.org>
32 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
33 * i386-fbsd-nat.c: Likewise.
35 2017-09-04 John Baldwin <jhb@FreeBSD.org>
37 * unittests/array-view-selftests.c: Add include of <array>.
39 2017-09-04 John Baldwin <jhb@FreeBSD.org>
41 * spu-tdep.c (flush_ea_cache): Add missing argument to
42 call_function_by_hand.
44 2017-09-04 Pedro Alves <palves@redhat.com>
46 * NEWS (Safer support for debugging with no debug info): New.
48 2017-09-04 Pedro Alves <palves@redhat.com>
50 * c-exp.y (function_method, function_method_void): Add current
51 instance flags to TYPE_INSTANCE.
52 * dwarf2read.c (check_modifier): New.
53 (compute_delayed_physnames): Assert that only C++ adds delayed
54 physnames. Mark fn_fields as const/volatile depending on
56 * eval.c (make_params): New type_instance_flags parameter. Use
57 it as the new type's instance flags.
58 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
59 flags element and pass it to make_params.
60 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
61 instance flags element.
62 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
63 * gdbtypes.h: Include "enum-flags.h".
64 (type_instance_flags): New enum-flags type.
65 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
66 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
67 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
68 (follow_type_instance_flags): New function.
69 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
70 * parser-defs.h (follow_type_instance_flags): Declare.
71 * valops.c (value_struct_elt_for_reference): const/volatile must
74 2017-09-04 Pedro Alves <palves@redhat.com>
76 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
77 function/method scopes; lookup the nested name as a function local
80 2017-09-04 Pedro Alves <palves@redhat.com>
82 (%type <voidval>): Add function_method.
83 * c-exp.y (exp): New production for calls with no arguments.
84 (function_method, function_method_void_or_typelist): New
86 (exp): New production for "method()::static_var".
87 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
88 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
89 Handle OP_FUNC_STATIC_VAR.
90 * parse.c (operator_length_standard):
91 Handle OP_FUNC_STATIC_VAR.
93 2017-09-04 Pedro Alves <palves@redhat.com>
95 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
97 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
99 * parse.c (operator_length_standard, operator_check_standard):
101 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
103 2017-09-04 Pedro Alves <palves@redhat.com>
105 * ax-gdb.c: Include "typeprint.h".
106 (gen_expr_for_cast): New function.
107 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
108 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
110 * dwarf2read.c (new_symbol_full): Fallback to int instead of
112 * eval.c: Include "typeprint.h".
113 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
114 Error out if symbol has unknown type.
115 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
116 evaluate_subexp_for_cast.
117 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
119 (evaluate_subexp_for_cast): New function.
120 * gdbtypes.c (init_nodebug_var_type): New function.
121 (objfile_type): Use it to initialize types of variables with no
123 * typeprint.c (error_unknown_type): New.
124 * typeprint.h (error_unknown_type): New declaration.
125 * compile/compile-c-types.c (convert_type_basic): Handle
126 TYPE_CODE_ERROR; warn and fallback to int for variables with
129 2017-09-04 Pedro Alves <palves@redhat.com>
131 * eval.c (evaluate_var_value): New function, factored out from ...
132 (evaluate_subexp_standard): ... here.
134 2017-09-04 Pedro Alves <palves@redhat.com>
136 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
137 Remove useless assignments to 'op'.
139 2017-09-04 Pedro Alves <palves@redhat.com>
141 * eval.c (eval_skip_value): New function.
142 (evaluate_subexp_standard): Use it.
144 2017-09-04 Pedro Alves <palves@redhat.com>
146 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
147 function name from symbol/minsym and pass it to
148 error_call_unknown_return_type.
150 2017-09-04 Pedro Alves <palves@redhat.com>
152 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
153 * ax-gdb.c (gen_msym_var_ref): New function.
154 (gen_expr): Handle OP_VAR_MSYM_VALUE.
155 * eval.c (evaluate_var_msym_value): New function.
156 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
157 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
158 to call_function_by_hand.
159 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
160 Handle OP_VAR_MSYM_VALUE.
161 (union exp_element) <msymbol>: New field.
162 * minsyms.h (struct type): Forward declare.
163 (find_minsym_type_and_address): Declare.
164 * parse.c (write_exp_elt_msym): New function.
165 (write_exp_msymbol): Delete, refactored as ...
166 (find_minsym_type_and_address): ... this new function.
167 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
168 (operator_length_standard, operator_check_standard): Handle
170 * std-operator.def (OP_VAR_MSYM_VALUE): New.
172 2017-09-04 Pedro Alves <palves@redhat.com>
174 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
175 TYPE_GNU_IFUNC specially here. Throw error if return type is
177 * ada-typeprint.c (print_func_type): Handle functions with unknown
179 * c-typeprint.c (c_type_print_base): Handle functions and methods
180 with unknown return type.
181 * compile/compile-c-symbols.c (convert_symbol_bmsym)
182 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
183 * compile/compile-c-types.c: Include "objfiles.h".
184 (convert_func): For functions with unknown return type, warn and
186 * compile/compile-object-run.c (compile_object_run): Adjust call
187 to call_function_by_hand_dummy.
188 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
189 call_function_by_hand.
190 * eval.c (evaluate_subexp_standard): Adjust calls to
191 call_function_by_hand. Handle functions and methods with unknown
192 return type. Pass expect_type to call_function_by_hand.
193 * f-typeprint.c (f_type_print_base): Handle functions with unknown
195 * gcore.c (call_target_sbrk): Adjust call to
196 call_function_by_hand.
197 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
198 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
199 an integer address type instead of nodebug.
200 * guile/scm-value.c (gdbscm_value_call): Adjust call to
201 call_function_by_hand.
202 * infcall.c (error_call_unknown_return_type): New function.
203 (call_function_by_hand): New "default_return_type" parameter.
205 (call_function_by_hand_dummy): New "default_return_type"
206 parameter. Use it instead of defaulting to int. If there's no
207 default and the return type is unknown, throw an error. If
208 there's a default return type, and the called function has no
209 debug info, then assume the function is prototyped.
210 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
211 New "default_return_type" parameter.
212 (error_call_unknown_return_type): New declaration.
213 * linux-fork.c (call_lseek): Cast return type of lseek.
214 (inferior_call_waitpid, checkpoint_command): Adjust calls to
215 call_function_by_hand.
216 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
217 calls to call_function_by_hand.
218 * m2-typeprint.c (m2_procedure): Handle functions with unknown
220 * objc-lang.c (lookup_objc_class, lookup_child_selector)
221 (value_nsstring, print_object_command): Adjust calls to
222 call_function_by_hand.
223 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
224 functions with unknown return type.
225 (pascal_type_print_func_varspec_suffix): New function.
226 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
227 TYPE_CODE_METHOD>: Use it.
228 * python/py-value.c (valpy_call): Adjust call to
229 call_function_by_hand.
230 * rust-lang.c (rust_evaluate_funcall): Adjust call to
231 call_function_by_hand.
232 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
233 call_function_by_hand.
234 * valops.c (value_allocate_space_in_inferior): Adjust call to
235 call_function_by_hand.
236 * typeprint.c (type_print_unknown_return_type): New function.
237 * typeprint.h (type_print_unknown_return_type): New declaration.
239 2017-09-04 Pedro Alves <palves@redhat.com>
241 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
242 types with more than one parameter as prototyped.
244 2017-09-04 Pedro Alves <palves@redhat.com>
246 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
247 (disassemble_command): Use gdb_disassembly_flags instead of bare
249 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
250 (dump_insns, do_mixed_source_and_assembly_deprecated)
251 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
252 Use gdb_disassembly_flags instead of bare int.
253 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
254 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
255 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
256 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
257 (enum gdb_disassembly_flag): ... values of this new enumeration.
258 (gdb_disassembly_flags): Define.
260 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
261 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
262 gdb_disassembly_flags instead of bare int.
263 * record-btrace.c (btrace_insn_history)
264 (record_btrace_insn_history, record_btrace_insn_history_range)
265 (record_btrace_insn_history_from): Use gdb_disassembly_flags
267 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
268 Use gdb_disassembly_flags instead of bare int.
269 * target-debug.h (target_debug_print_gdb_disassembly_flags):
271 * target-delegates.c: Regenerate.
272 * target.c (target_insn_history, target_insn_history_from)
273 (target_insn_history_range): Use gdb_disassembly_flags instead of
275 * target.h: Include "disasm.h".
276 (struct target_ops) <to_insn_history, to_insn_history_from,
277 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
279 (target_insn_history, target_insn_history_from)
280 (target_insn_history_range): Use gdb_disassembly_flags instead of
283 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
285 * cli/cli-script.c (build_command_line): For if/while commands,
286 check whether args is empty.
288 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
290 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
291 (enum command_control_type): Likewise.
292 (struct command_line): Likewise.
293 (free_command_lines): Likewise.
294 (struct command_lines_deleter): Likewise.
295 (command_line_up): Likewise.
296 (read_command_lines): Likewise.
297 (read_command_lines_1): Likewise.
298 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
299 (enum command_control_type): Likewise.
300 (struct command_line): Likewise.
301 (free_command_lines): Likewise.
302 (struct command_lines_deleter): Likewise.
303 (command_line_up): Likewise.
304 (read_command_lines): Likewise.
305 (read_command_lines_1): Likewise.
306 * breakpoint.h: Include cli/cli-script.h.
307 * extension-priv.h: Likewise.
308 * gdbcmd.h: Likewise.
310 2017-09-04 Pedro Alves <palves@redhat.com>
312 * ada-lang.c (is_known_support_routine): Move sal declaration to
313 where it is initialized.
314 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
315 (parse_breakpoint_sals, decode_static_tracepoint_spec)
316 (clear_command, update_static_tracepoint): Remove init_sal
317 references. Move declarations closer to initializations.
318 * cli/cli-cmds.c (list_command): Move sal declarations closer to
320 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
321 references. Move sal declarations closer to initializations.
322 * frame.c (find_frame_sal): Return a symtab_and_line via function
323 return instead of output parameter. Remove init_sal references.
324 * frame.h (find_frame_sal): Return a symtab_and_line via function
325 return instead of output parameter.
326 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
327 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
329 (gdbscm_find_pc_line): Remove init_sal reference.
330 * infcall.c (call_function_by_hand_dummy): Remove init_sal
331 references. Move declarations closer to initializations.
332 * infcmd.c (set_step_frame): Update. Move declarations closer to
334 (finish_backward): Remove init_sal references. Move declarations
335 closer to initializations.
336 * infrun.c (process_event_stop_test, handle_step_into_function)
337 (insert_hp_step_resume_breakpoint_at_frame)
338 (insert_step_resume_breakpoint_at_caller): Likewise.
339 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
340 (symbol_to_sal): Likewise.
341 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
342 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
343 to its initialization.
344 * reverse.c (save_bookmark_command): Use new/delete. Remove
345 init_sal references. Move declarations closer to initializations.
346 * source.c (get_current_source_symtab_and_line): Remove brace
348 (set_current_source_symtab_and_line): Now takes the sal by const
349 reference. Remove brace initialization.
350 (line_info): Remove init_sal reference.
351 * source.h (set_current_source_symtab_and_line): Now takes a
352 symtab_and_line via const reference.
353 * stack.c (set_current_sal_from_frame): Adjust.
354 (print_frame_info): Adjust.
355 (get_last_displayed_sal): Return the sal via function return
356 instead of via output parameter. Simplify.
357 (frame_info): Adjust.
358 * stack.h (get_last_displayed_sal): Return the sal via function
359 return instead of via output parameter.
360 * symtab.c (init_sal): Delete.
361 (find_pc_sect_line): Remove init_sal references. Move
362 declarations closer to initializations.
363 (find_function_start_sal): Remove init_sal references. Move
364 declarations closer to initializations.
365 * symtab.h (struct symtab_and_line): In-class initialize all
367 * tracepoint.c (set_traceframe_context)
368 (print_one_static_tracepoint_marker): Remove init_sal references.
369 Move declarations closer to initializations.
370 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
371 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
372 declarations closer to initializations.
373 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
374 init_sal references. Adjust.
376 2017-09-04 Pedro Alves <palves@redhat.com>
378 * ax-gdb.c (agent_command_1): Use range-for.
379 * break-catch-throw.c (re_set_exception_catchpoint): Update.
380 * breakpoint.c: Include "common/array-view.h".
381 (init_breakpoint_sal, create_breakpoint_sal): Change sals
382 parameter from struct symtabs_and_lines to
383 array_view<symtab_and_line>. Adjust. Use range-for. Update.
384 (breakpoint_sals_to_pc): Change sals parameter from struct
385 symtabs_and_lines to std::vector reference.
386 (check_fast_tracepoint_sals): Change sals parameter from struct
387 symtabs_and_lines to std::array_view. Use range-for.
388 (decode_static_tracepoint_spec): Return a std::vector instead of
389 symtabs_and_lines. Update.
390 (create_breakpoint): Update.
391 (break_range_command, until_break_command, clear_command): Update.
392 (base_breakpoint_decode_location, bkpt_decode_location)
393 (bkpt_probe_create_sals_from_location)
394 (bkpt_probe_decode_location, tracepoint_decode_location)
395 (tracepoint_probe_decode_location)
396 (strace_marker_create_sals_from_location): Return a std::vector
397 instead of symtabs_and_lines.
398 (strace_marker_create_breakpoints_sal): Update.
399 (strace_marker_decode_location): Return a std::vector instead of
400 symtabs_and_lines. Update.
401 (update_breakpoint_locations): Change struct symtabs_and_lines
402 parameters to gdb::array_view. Adjust.
403 (location_to_sals): Return a std::vector instead of
404 symtabs_and_lines. Update.
405 (breakpoint_re_set_default): Use std::vector instead of struct
407 (decode_location_default): Return a std::vector instead of
408 symtabs_and_lines. Update.
409 * breakpoint.h: Include "common/array-view.h".
410 (struct breakpoint_ops) <decode_location>: Now returns a
411 std::vector instead of returning a symtabs_and_lines via output
413 (update_breakpoint_locations): Change sals parameters to use
415 * cli/cli-cmds.c (edit_command, list_command): Update to use
416 std::vector and gdb::array_view.
417 (ambiguous_line_spec): Adjust to use gdb::array_view and
419 (compare_symtabs): Rename to ...
420 (cmp_symtabs): ... this. Change parameters to symtab_and_line
421 const reference and adjust.
422 (filter_sals): Rewrite using std::vector and standard algorithms.
423 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
424 (jump_command): Update to use std::vector.
425 * linespec.c (struct linespec_state) <canonical_names>: Update
427 (add_sal_to_sals_basic): Delete.
428 (add_sal_to_sals, filter_results, convert_results_to_lsals)
429 (decode_line_2, create_sals_line_offset)
430 (convert_address_location_to_sals, convert_linespec_to_sals)
431 (convert_explicit_location_to_sals, parse_linespec)
432 (event_location_to_sals, decode_line_full, decode_line_1)
433 (decode_line_with_current_source)
434 (decode_line_with_last_displayed, decode_objc)
435 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
436 (linespec_result::~linespec_result): Adjust to use std::vector
437 instead of symtabs_and_lines.
438 * linespec.h (linespec_sals::sals): Now a std::vector.
439 (struct linespec_result): Use std::vector, bool, and in-class
441 (decode_line_1, decode_line_with_current_source)
442 (decode_line_with_last_displayed): Return std::vector.
443 * macrocmd.c (info_macros_command): Use std::vector.
444 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
445 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
447 * probe.h (parse_probes): Return a std::vector.
448 * python/python.c (gdbpy_decode_line): Use std::vector and
450 * source.c (select_source_symtab, line_info): Use std::vector.
451 * stack.c (func_command): Use std::vector.
452 * symtab.h (struct symtabs_and_lines): Delete.
453 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
455 2017-09-04 Pedro Alves <palves@redhat.com>
457 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
458 unittests/array-view-selftests.c.
459 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
460 * common/array-view.h: New file.
461 * unittests/array-view-selftests.c: New file.
463 2017-09-04 Pedro Alves <palves@redhat.com>
465 * cli/cli-cmds.c (edit_command): Pass message to
467 (list_command): Pass message to ambiguous_line_spec. Say
468 "first"/"last" instead of "start" and "end" to be consistent with
470 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
471 them to print formatted message.
473 2017-09-04 Pedro Alves <palves@redhat.com>
475 * btrace.c (ftrace_add_pt): Pass btrace_insn to
476 ftrace_update_insns by reference instead of pointer.
478 2017-09-04 Yao Qi <yao.qi@linaro.org>
480 * i386-go32-tdep.c: Include x86-xstate.h.
481 (i386_go32_init_abi): Call i386_target_description.
482 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
483 if xcr0 is X86_XSTATE_X87_MASK.
484 * i386-tdep.h (tdesc_i386): Remove the declaration.
485 (tdesc_i386_mmx): Likewise.
487 2017-09-04 Yao Qi <yao.qi@linaro.org>
489 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
490 X86_XSTATE_SSE_MASK instead of 0.
492 2017-09-04 Yao Qi <yao.qi@linaro.org>
494 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
495 i386_target_description.
496 * i386-fbsd-nat.c (i386fbsd_read_description): Call
497 i386_target_description.
498 * i386-tdep.c (i386_gdbarch_init): Likewise.
500 2017-09-04 Yao Qi <yao.qi@linaro.org>
502 * amd64-darwin-tdep.c: Include "x86-xstate.h".
503 (x86_darwin_init_abi_64): Call amd64_target_description.
504 * amd64-dicos-tdep.c: Likewise.
505 * amd64-fbsd-nat.c: Likewise.
506 * amd64-fbsd-tdep.c: Likewise.
507 * amd64-nbsd-tdep.c: Likewise.
508 * amd64-obsd-tdep.c: Likewise.
509 * amd64-sol2-tdep.c: Likewise.
510 * amd64-windows-tdep.c: Likewise.
511 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
513 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
515 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
516 (btrace_function) <insn>: Change type to use std::vector.
517 * btrace.c (ftrace_debug, ftrace_call_num_insn,
518 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
519 ftrace_update_insns, ftrace_compute_global_level_offset,
520 btrace_stitch_bts, btrace_clear, btrace_insn_get,
521 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
522 change to std::vector.
523 (ftrace_update_insns): Adjust to change to std::vector, change
524 type of INSN parameter.
525 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
526 * record-btrace.c (btrace_call_history_insn_range,
527 btrace_compute_src_line_range,
528 record_btrace_frame_prev_register): Adjust to change to
530 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
531 to change to std::vector.
533 2017-09-03 Tom Tromey <tom@tromey.com>
535 * corefile.c (reopen_exec_file): Use std::string.
537 2017-09-03 Tom Tromey <tom@tromey.com>
539 * compile/compile.c (compile_register_name_mangled): Return
541 * compile/compile-loc2c.c (pushf_register_address): Update.
542 (pushf_register): Update.
543 * compile/compile-c-types.c (convert_array): Update.
544 * compile/compile-c-symbols.c (generate_vla_size): Update.
545 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
546 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
547 (convert_one_symbol): Update.
548 (generate_c_for_for_one_variable): Update.
549 * compile/compile-c-support.c (c_get_range_decl_name): Return a
551 (generate_register_struct): Update.
552 * compile/compile-internal.h (c_get_range_decl_name): Return a
554 (compile_register_name_mangled): Return std::string.
556 2017-09-03 Tom Tromey <tom@tromey.com>
558 * utils.c (perror_string): Return a std::string.
559 (throw_perror_with_name, perror_warning_with_name): Update.
561 2017-09-03 Tom Tromey <tom@tromey.com>
563 * demangle.c (demangle_command): Use std::string,
566 2017-09-03 Tom Tromey <tom@tromey.com>
568 * cli/cli-setshow.c (do_set_command): Use std::string.
570 2017-09-03 Tom Tromey <tom@tromey.com>
572 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
574 2017-09-03 Tom Tromey <tom@tromey.com>
576 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
578 2017-09-03 Tom Tromey <tom@tromey.com>
580 * mi/mi-cmd-env.c (env_execute_cli_command): Use
581 gdb::unique_xmalloc_ptr.
583 2017-09-03 Tom Tromey <tom@tromey.com>
585 * thread.c (print_thread_info_1): Use string_printf.
586 (thread_apply_command, thread_apply_all_command): Use
589 2017-09-03 Tom Tromey <tom@tromey.com>
591 * valprint.c (val_print_string): Update.
592 * gdbcore.h (memory_error_message): Return std::string.
593 * corefile.c (memory_error_message): Return std::string.
594 (memory_error): Update.
595 * breakpoint.c (insert_bp_location): Update.
597 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
599 * target/waitstatus.h (target_waitstatus_to_string): Change
600 return type to std::string.
601 * target/waitstatus.c (target_waitstatus_to_string): Return
603 * target.h (target_waitstatus_to_string): Remove declaration.
604 * infrun.c (resume, clear_proceed_status_thread,
605 print_target_wait_results, do_target_wait, save_waitstatus,
606 stop_all_threads): Adjust.
607 * record-btrace.c (record_btrace_wait): Adjust.
609 (target_debug_print_struct_target_waitstatus_p): Adjust.
611 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
614 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
617 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
619 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
620 for setting/unsetting environment variables on the remote target.
621 (New remote packets): Add entries for QEnvironmentHexEncoded,
622 QEnvironmentUnset and QEnvironmentReset.
623 * common/environ.c (gdb_environ::operator=): Extend method to
624 handle m_user_set_env_list and m_user_unset_env_list.
625 (gdb_environ::clear): Likewise.
626 (match_var_in_string): Change type of first parameter from 'char
627 *' to 'const char *'.
628 (gdb_environ::set): Extend method to handle
629 m_user_set_env_list and m_user_unset_env_list.
630 (gdb_environ::unset): Likewise.
631 (gdb_environ::clear_user_set_env): New method.
632 (gdb_environ::user_set_envp): Likewise.
633 (gdb_environ::user_unset_envp): Likewise.
634 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
635 m_user_unset_env_list on move constructor/assignment.
636 (unset): Add new default parameter 'update_unset_list = true'.
637 (clear_user_set_env): New method.
638 (user_set_envp): Likewise.
639 (user_unset_envp): Likewise.
640 (m_user_set_env_list): New std::set.
641 (m_user_unset_env_list): Likewise.
642 * common/rsp-low.c (hex2str): New function.
643 (bin2hex): New overload for bin2hex function.
644 * common/rsp-low.c (hex2str): New prototype.
645 (str2hex): New overload prototype.
646 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
647 QEnvironmentUnset and QEnvironmentReset.
648 (remote_protocol_features): Add QEnvironmentHexEncoded,
649 QEnvironmentUnset and QEnvironmentReset packets.
650 (send_environment_packet): New function.
651 (extended_remote_environment_support): Likewise.
652 (extended_remote_create_inferior): Call
653 extended_remote_environment_support.
654 (_initialize_remote): Add QEnvironmentHexEncoded,
655 QEnvironmentUnset and QEnvironmentReset packet configs.
656 * unittests/environ-selftests.c (gdb_selftest_env_var):
658 (test_vector_initialization): New function.
659 (test_init_from_host_environ): Likewise.
660 (test_reinit_from_host_environ): Likewise.
661 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
663 (test_unset_set_empty_vector): Likewise.
664 (test_vector_clear): Likewise.
665 (test_std_move): Likewise.
666 (test_move_constructor):
667 (test_self_move): Likewise.
668 (test_set_unset_reset): Likewise.
669 (run_tests): Rewrite in terms of the functions above.
671 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
673 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
674 (adi_available): Use a temp variable of type CORE_ADDR as argument
675 3 when calling target_auxv_search.
676 (adi_normalize_address): Use masks and xor operators to calculate
678 (adi_read_versions, adi_write_versions, adi_print_versions)
679 (do_examine, do_assign): Use paddress.
681 2017-08-29 John Baldwin <jhb@FreeBSD.org>
683 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
684 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
685 out of loop and add supply of FIR.
686 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
689 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
692 * cli/cli-script.c (define_command): Don't convert command name
695 2017-08-25 Joel Brobecker <brobecker@adacore.com>
697 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
698 Update all callers accordingly. Remove all code blocks handling
699 the case where DISPP is not NULL.
701 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
704 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
705 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
706 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
708 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
710 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
711 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
712 (read_comp_units_from_section): New parameter abbrev_section, use
713 read_and_check_comp_unit_head, allocate signatured_type if needed.
714 (create_all_comp_units): Update read_comp_units_from_section caller.
716 2017-08-23 Pedro Alves <palves@redhat.com>
719 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
720 to null_ptid and switch to thread without reading the registers
721 after adding the inferior.
723 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
725 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
727 * compile/compile.c (compile_gcc, show_compile_gcc): New.
728 (compile_to_object): Implement compile_gcc.
729 (_initialize_compile): Install "set compile-gcc". Initialize
732 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
734 * compile/compile.c (compile_to_object): Conditionally call
735 set_verbose. Conditionally call compile or compile_v0.
737 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
739 * sparc64-tdep.h: (adi_normalize_address): New export.
740 * sparc-nat.h: (open_adi_tag_fd): New export.
741 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
742 * sparc64-linux-tdep.c:
743 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
744 (sparc64_linux_handle_segmentation_fault): New function.
745 (sparc64_linux_init_abi): Register
746 sparc64_linux_handle_segmentation_fault
747 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
748 (sparc64_addr_bits_remove): New function.
749 (sparc64_init_abi): Register sparc64_addr_bits_remove.
750 (MAX_PROC_NAME_SIZE): New macro.
751 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
752 (sparc64adilist): New variable.
753 (adi_proc_list): New variable.
754 (find_adi_info): New function.
755 (add_adi_info): New function.
756 (get_adi_info_proc): New function.
757 (get_adi_info): New function.
758 (info_adi_command): New function.
759 (read_maps_entry): New function.
760 (adi_available): New function.
761 (adi_normalize_address): New function.
762 (adi_align_address): New function.
763 (adi_convert_byte_count): New function.
764 (adi_tag_fd): New function.
765 (adi_is_addr_mapped): New function.
766 (adi_read_versions): New function.
767 (adi_write_versions): New function.
768 (adi_print_versions): New function.
769 (do_examine): New function.
770 (do_assign): New function.
771 (adi_examine_command): New function.
772 (adi_assign_command): New function.
773 (_initialize_sparc64_adi_tdep): New function.
775 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
777 * breakpoint.c (breakpoints_info): Rename to ...
778 (info_breakpoints_command): ... this.
779 (watchpoints_info): Rename to ...
780 (info_watchpoints_command): ... this.
781 (tracepoints_info): Rename to ...
782 (info_tracepoints_command): ... this.
783 (_initialize_breakpoint): Adjust.
784 * dcache.c (dcache_info): Rename to ...
785 (info_display_command): ... this.
786 (_initialize_dcache): Adjust.
787 * frame.h (args_info): Rename to ...
788 (info_args_command): ... this.
789 (locals_info): Rename to ...
790 (info_locals_command): ... this.
791 * infcmd.c (nofp_registers_info): Rename to ...
792 (info_registers_command): ... this.
793 (float_info): Rename to ...
794 (info_float_command): ... this.
795 (program_info): Rename to ...
796 (info_program_command): ... this.
797 (all_registers_info): Rename to ...
798 (info_all_registers_command): ... this.
799 (vector_info): Rename to ...
800 (info_vector_command): ... this.
801 (float_info): Rename to ...
802 (info_float_command): ... this.
803 (_initialize_infcmd): Adjust.
804 * inferior.h (term_info): Rename to ...
805 (info_terminal_command): ... this.
806 * inflow.c (term_info): Rename to ...
807 (info_terminal_command): ... this.
808 (_initialize_inflow): Adjust.
809 * infrun.c (signals_info): Rename to ...
810 (info_signals_command): ... this.
811 (_initialize_infrun): Adjust.
812 * objc-lang.c (classes_info): Rename to ...
813 (info_classes_command): ... this.
814 (selectors_info): Rename to ...
815 (info_selectors_command): ... this.
816 (_initialize_objc_language): Adjust.
817 * printcmd.c (sym_info): Rename to ...
818 (info_symbol_command): ... this.
819 (address_info): Rename to ...
820 (info_address_command): ... this.
821 (display_info): Rename to ...
822 (info_display_command): ... this.
823 (_initialize_printcmd): Adjust.
824 * reverse.c (bookmarks_info): Rename to ...
825 (info_breakpoints_command): ... this.
826 (_initialize_reverse): Adjust.
827 * ser-go32.c (dos_info): Rename to ...
828 (info_serial_command): ... this.
829 (_initialize_ser_dos): Adjust.
830 * skip.c (skip_info): Rename to ...
831 (info_skip_command): ... this.
832 (_initialize_step_skip): Adjust.
833 * source.c (line_info): Rename to ...
834 (info_line_command): ... this.
835 (source_info): Rename to ...
836 (info_source_command)
837 * stack.c (frame_info): Rename to ...
838 (info_frame_command): ... this.
839 (locals_info): Rename to ...
840 (info_locals_command): ... this.
841 (args_info): Rename to ...
842 (info_args_command): ... this.
843 (_initialize_stack): Adjust.
844 * symtab.c (sources_info): Rename to ...
845 (info_sources_command): ... this.
846 (variables_info): Rename to ...
847 (info_variables_command): ... this.
848 (functions_info): Rename to ...
849 (info_functions_command): ... this.
850 (types_info): Rename to ...
851 (info_types_command): ... this.
852 (_initialize_symtab): Adjust.
853 * target.c (target_info): Rename to ...
854 (info_target_command): ... this.
855 (initialize_targets): Adjust.
856 * tracepoint.c (tvariables_info): Rename to ...
857 (info_tvariables_command): ... this.
858 (scope_info): Rename to ...
859 (info_scope_command): ... this.
860 (trace_dump_actions): Adjust.
861 (_initialize_tracepoint): Adjust.
863 2017-08-22 Tom Tromey <tom@tromey.com>
865 * breakpoint.h (install_breakpoint): Update.
866 * breakpoint.c (add_solib_catchpoint): Update.
867 (install_breakpoint): Change argument to a std::unique_ptr.
868 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
869 (create_breakpoint_sal, create_breakpoint): Update.
870 (watch_command_1, catch_exec_command_1)
871 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
872 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
873 Return the breakpoint.
874 (set_raw_breakpoint_without_location, set_raw_breakpoint)
875 (new_single_step_breakpoint): Update.
876 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
878 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
880 * break-catch-sig.c (create_signal_catchpoint): Use
882 * ada-lang.c (create_ada_exception_catchpoint): Use
885 2017-08-22 Tom Tromey <tom@tromey.com>
887 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
889 2017-08-22 Tom Tromey <tom@tromey.com>
891 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
892 (lookup_partial_symbol): Update.
894 2017-08-22 Tom Tromey <tom@tromey.com>
896 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
897 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
898 (find_and_open_source, symtab_to_fullname): Update.
899 * psymtab.c (psymtab_to_fullname): Update.
901 2017-08-22 Tom Tromey <tom@tromey.com>
903 * exec.c (exec_file_attach): Update.
904 * linux-thread-db.c (try_thread_db_load): Update.
905 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
906 * utils.c (gdb_realpath): Change return type.
907 (gdb_realpath_keepfile): Update.
908 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
909 (_initialize_utils): Register the new self test.
910 * source.c (openp): Update.
911 (find_and_open_source): Update.
912 * nto-tdep.c (nto_find_and_open_solib): Update.
913 * main.c (set_gdb_data_directory): Update.
914 (captured_main_1): Update.
915 * dwarf2read.c (dwarf2_get_dwz_file): Update
916 (dw2_map_symbol_filenames): Update.
917 * auto-load.c (auto_load_safe_path_vec_update): Update.
918 (filename_is_in_auto_load_safe_path_vec): Change type of
920 (auto_load_objfile_script): Update.
921 (file_is_auto_load_safe): Update. Use std::string.
922 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
924 2017-08-22 Tom Tromey <tom@tromey.com>
926 * utils.c (gdb_realpath_keepfile): Return a
927 gdb::unique_xmalloc_ptr.
928 * exec.c (exec_file_attach): Update.
929 * utils.h (gdb_realpath_keepfile): Return a
930 gdb::unique_xmalloc_ptr.
932 2017-08-22 Tom Tromey <tom@tromey.com>
934 * compile/compile.c (compile_file_command): Use
935 gdb::unique_xmalloc_ptr, std::string.
936 * utils.c (gdb_abspath): Change return type.
937 * source.c (openp): Update.
938 * objfiles.c (allocate_objfile): Update.
939 * main.c (set_gdb_data_directory): Update.
940 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
942 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
944 * cli-cmds.c (list_commands): List actual code around more than
947 2017-08-21 John Baldwin <jhb@FreeBSD.org>
949 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
951 2017-08-21 Pedro Alves <palves@redhat.com>
954 * c-exp.y (variable production): Handle function aliases.
955 * minsyms.c (msymbol_is_text): New function.
956 * minsyms.h (msymbol_is_text): Declare.
957 * symtab.c (find_function_alias_target): New function.
958 * symtab.h (find_function_alias_target): Declare.
960 2017-08-21 Pedro Alves <palves@redhat.com>
962 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
964 * typeprint.c (whatis_exp): If handling "whatis", and expression
965 is OP_TYPE, strip one typedef level. Otherwise don't strip
967 * valops.c (value_cast): Save "to" type before resolving
968 stubs/typedefs. Use that type as resulting value's type.
970 2017-08-18 Tom Tromey <tom@tromey.com>
971 Pedro Alves <palves@redhat.com>
973 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
974 * sol-thread.c (sol_thread_resume, sol_thread_wait)
975 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
976 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
977 * proc-service.c (ps_xfer_memory): Use scoped_restore.
978 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
979 (linux_get_siginfo_data): Add "thread" argument. Use
981 * linux-nat.c (linux_child_follow_fork)
982 (check_stopped_by_watchpoint): Use scoped_restore.
983 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
984 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
985 (restore_inferior_ptid, save_inferior_ptid): Remove.
986 * btrace.c (btrace_fetch): Use scoped_restore.
987 * bsd-uthread.c (bsd_uthread_fetch_registers)
988 (bsd_uthread_store_registers): Use scoped_restore.
989 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
991 * aix-thread.c (aix_thread_resume, aix_thread_wait)
992 (aix_thread_xfer_partial): Use scoped_restore.
993 * inferior.h (save_inferior_ptid): Remove.
995 2017-08-18 Yao Qi <yao.qi@linaro.org>
998 * arm-tdep.c (gdb_print_insn_arm): Mark
999 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
1001 2017-08-18 Yao Qi <yao.qi@linaro.org>
1003 * NEWS: Mention GDBserver's new option "--selftest".
1004 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
1005 * selftest.c: Move it to common/selftest.c.
1006 * selftest.h: Move it to common/selftest.h.
1007 * selftest-arch.c (reset): New function.
1008 (tests_with_arch): Call reset.
1010 2017-08-18 Yao Qi <yao.qi@linaro.org>
1012 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
1013 instead of exception_fprintf and printf_filtered.
1015 2017-08-18 Yao Qi <yao.qi@linaro.org>
1017 * selftest.c (register_self_test): Rename it to
1018 selftests::register_test.
1019 (run_self_tests): selftest::run_tests.
1020 * selftest.h: Update declarations.
1021 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
1022 selftests::register_test_foreach_arch.
1023 * selftest-arch.h: Update declaration.
1024 * aarch64-tdep.c: Update.
1025 * arm-tdep.c: Likewise.
1026 * disasm-selftests.c: Likewise.
1027 * dwarf2loc.c: Likewise.
1028 * dwarf2-frame.c: Likewise.
1029 * findvar.c: Likewise.
1030 * gdbarch-selftests.c: Likewise.
1031 * maint.c (maintenance_selftest): Likewise.
1032 * regcache.c: Likewise.
1033 * rust-exp.y: Likewise.
1034 * selftest-arch.c: Likewise.
1035 * unittests/environ-selftests.c: Likewise.
1036 * unittests/function-view-selftests.c: Likewise.
1037 * unittests/offset-type-selftests.c: Likewise.
1038 * unittests/optional-selftests.c: Likewise.
1039 * unittests/scoped_restore-selftests.c: Likewise.
1040 * utils-selftests.c: Likewise.
1042 2017-08-17 Pedro Alves <palves@redhat.com>
1044 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
1047 2017-08-17 Pedro Alves <palves@redhat.com>
1049 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
1051 (reset_die_in_process): Delete, replaced by ...
1052 (process_die_scope): ... this new class. Make it responsible for
1053 freeing cu->line_header too.
1054 (process_die): Use process_die_scope.
1055 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
1056 cu->line_header_die_owner. Don't release the line header if it's
1058 (setup_type_unit_groups): Make the CU/DIE own the line header.
1059 Don't release the line header here.
1061 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
1063 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
1065 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
1067 * NEWS: Mention new shortcuts for nexti and stepi in TUI
1070 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
1072 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
1075 2017-08-15 Stafford Horne <shorne@gmail.com>
1077 * MAINTAINERS (Write After Approval): Add Stafford Horne.
1079 2017-08-15 Stafford Horne <shorne@gmail.com>
1081 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
1083 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
1086 * infcmd.c (unset_environment_command): Use the 'clear' method on
1087 the environment instead of resetting it.
1089 2017-08-15 John Baldwin <jhb@FreeBSD.org>
1091 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
1094 2017-08-14 Tom Tromey <tom@tromey.com>
1096 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
1097 (print_binary_chars): Likewise.
1098 (BITS_IN_BYTES): Remove.
1100 2017-08-14 Tom Tromey <tom@tromey.com>
1103 * valprint.c (LOW_ZERO): Change value to 034.
1104 (print_octal_chars): Add static_asserts for octal constants.
1105 * printcmd.c (print_scalar_formatted): Add 'd' case.
1107 2017-08-11 Tom Tromey <tom@tromey.com>
1109 * symfile.c (add_symbol_file_command): Use std::vector.
1111 2017-08-14 Tom Tromey <tom@tromey.com>
1113 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
1114 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
1116 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
1118 2017-08-11 Pedro Alves <palves@redhat.com>
1120 * infrun.c (process_event_stop_test): Adjust
1121 function_name_is_marked_for_skip call.
1122 * skip.c: Include <list>.
1123 (skiplist_entry): Make it a class with private fields, and
1125 (skiplist_entry_chain): Delete.
1126 (skiplist_entries): New.
1127 (skiplist_entry_count): Delete.
1128 (highest_skiplist_entry_num): New.
1129 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
1130 (add_skiplist_entry): Delete.
1131 (skiplist_entry::skiplist_entry): New.
1132 (skiplist_entry::add_entry): New.
1133 (skip_file_command, skip_function): Adjust.
1134 (compile_skip_regexp): Delete.
1135 (skip_command): Don't compile regexp here. Adjust to use
1136 skiplist_entry::add_entry.
1137 (skip_info): Adjust to use range-for and getters.
1138 (skip_enable_command, skip_disable_command): Adjust to use
1139 range-for and setters.
1140 (skip_delete_command): Adjust to use std::list.
1141 (add_skiplist_entry): Delete.
1142 (skip_file_p): Delete, refactored as ...
1143 (skiplist_entry::do_skip_file_p): ... this new method.
1144 (skip_gfile_p): Delete, refactored as ...
1145 (skiplist_entry::do_gskip_file_p): ... this new method.
1146 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
1147 (skiplist_entry::skip_function_p): ... this new method.
1148 (function_name_is_marked_for_skip): Now returns bool, and takes
1149 the function sal by const reference. Adjust to use range-for and
1150 skiplist_entry methods.
1151 (_initialize_step_skip): Remove references to
1152 skiplist_entry_chain, skiplist_entry_count.
1153 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
1154 takes the function sal by const reference.
1156 2017-08-11 Yao Qi <yao.qi@linaro.org>
1158 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
1159 (dwarf2_frame_cache): Remove reset_cache_cleanup.
1160 (dwarf2_frame_cache):
1161 * frame-unwind.c (frame_unwind_try_unwinder): Catch
1162 RETURN_MASK_ALL and set *this_case to NULL.
1163 * frame-unwind.h: Update comments.
1165 2017-08-11 Yao Qi <yao.qi@linaro.org>
1167 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
1168 (dwarf2_frame_state_copy_regs): Remove.
1169 (dwarf2_frame_state_free_regs): Remove.
1170 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
1171 (dwarf2_restore_rule): Call method .alloc_regs instead of
1172 dwarf2_frame_state_alloc_regs.
1173 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
1174 constructor. Call std::move.
1175 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
1176 (dwarf2_frame_cache): Likewise.
1178 [GDB_SELF_TEST]: Include selftest.h and
1180 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
1181 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
1182 execute_cfa_program_test.
1184 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
1185 copy ctor, assignment operator, move assignment.
1186 <alloc_regs>: New method.
1188 (struct dwarf2_frame_state): Delete dtor.
1189 (dwarf2_frame_state_alloc_regs): Remove declaration.
1190 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
1191 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
1193 2017-08-11 Yao Qi <yao.qi@linaro.org>
1195 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
1196 (dwarf2_frame_state::dwarf2_frame_state): New.
1197 (dwarf2_frame_state::~dwarf2_frame_state): New.
1198 (dwarf2_fetch_cfa_info): Update.
1199 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
1200 rather than a pointer. Update code.
1201 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
1203 <data_align, code_align, retaddr_column>: Change them to const.
1204 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
1207 2017-08-11 Yao Qi <yao.qi@linaro.org>
1209 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
1210 <loc.exp>: New field.
1211 * dwarf2-frame.c (execute_cfa_program): Update.
1212 (dwarf2_frame_prev_register): Update.
1214 2017-08-10 Pedro Alves <palves@redhat.com>
1216 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
1218 2017-08-09 John Baldwin <jhb@FreeBSD.org>
1220 * fbsd-nat.c (struct fbsd_fork_info): Remove.
1221 (fbsd_pending_children): Use std::list.
1222 (fbsd_remember_child): Likewise.
1223 (fbsd_is_child_pending): Likewise.
1224 (fbsd_pending_vfork_done): Use std::forward_list.
1225 (fbsd_add_vfork_done): Likewise.
1226 (fbsd_is_vfork_done_pending): Likewise.
1227 (fbsd_next_vfork_done): Likewise.
1229 2017-08-09 John Baldwin <jhb@FreeBSD.org>
1231 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
1232 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
1233 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
1235 (fbsd_xfer_partial): Use gdb::byte_vector.
1236 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
1238 2017-08-09 John Baldwin <jhb@FreeBSD.org>
1240 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
1242 (fbsd_find_memory_regions): Fix `mapfile' initialization.
1244 2017-08-09 Tom Tromey <tom@tromey.com>
1246 * skip.c (skiplist_entry): New constructor.
1247 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
1248 (skiplist_entry::file_is_glob): Now bool.
1249 (skiplist_entry::file, skiplist_entry::function): Now
1251 (make_skip_entry): Return a unique_ptr. Use new.
1252 (free_skiplist_entry, free_skiplist_entry_cleanup)
1253 (make_free_skiplist_entry_cleanup): Remove.
1254 (skip_command, skip_disable_command, add_skiplist_entry)
1255 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
1256 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
1257 (function_name_is_marked_for_skip): Update.
1258 (skip_delete_command): Update. Use delete.
1260 2017-08-09 Jiong Wang <jiong.wang@arm.com>
1262 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
1263 (aarch64_linux_core_read_description): New function.
1264 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
1266 2017-08-09 Pedro Alves <palves@redhat.com>
1268 * cp-name-parser.y (cp_comp_to_string): Return a
1269 gdb::unique_xmalloc_ptr<char>.
1270 * cp-support.c (replace_typedefs_qualified_name)
1271 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
1272 (cp_canonicalize_string_full): Use op= instead of explicit
1274 (cp_class_name_from_physname, method_name_from_physname)
1275 (cp_func_name, cp_remove_params): Adjust to use
1276 gdb::unique_xmalloc_ptr<char>.
1277 * cp-support.h (cp_comp_to_string): Return a
1278 gdb::unique_xmalloc_ptr<char>.
1279 * python/py-type.c (typy_lookup_type): Adjust to use
1280 gdb::unique_xmalloc_ptr<char>.
1282 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
1284 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
1286 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
1287 Yao Qi <yao.qi@linaro.org>
1289 * cp-support.c (cp_canonicalize_string_full): Use
1290 gdb::unique_xmalloc_ptr<char>.
1291 (cp_canonicalize_string): Likewise.
1293 2017-08-09 Yao Qi <yao.qi@linaro.org>
1295 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
1296 * regformats/i386/amd64-avx-avx512.dat: Remove.
1297 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
1298 * regformats/i386/amd64-avx-mpx.dat:Remove.
1299 * regformats/i386/amd64-avx.dat: Remove.
1300 * regformats/i386/amd64-mpx.dat: Remove.
1301 * regformats/i386/i386-avx-avx512.dat: Remove.
1302 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
1303 * regformats/i386/i386-avx-mpx.dat: Remove.
1304 * regformats/i386/i386-mmx.dat: Remove.
1305 * regformats/i386/i386-mpx.dat: Remove.
1307 2017-08-09 Yao Qi <yao.qi@linaro.org>
1309 * amd64-tdep.h (tdesc_x32): Remove the declaration.
1310 * amd64-tdep.c: Don't include features/i386/x32*.c.
1311 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
1313 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
1314 and i386/x32-avx-avx512.
1315 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
1317 * features/i386/x32-avx-avx512.c: Removed.
1318 * features/i386/x32-avx-avx512.xml: Removed.
1319 * features/i386/x32-avx.c: Removed.
1320 * features/i386/x32-avx.xml: Removed.
1321 * features/i386/x32.c: Removed.
1322 * features/i386/x32.xml: Removed.
1323 * regformats/i386/x32-avx-avx512.dat: Removed.
1324 * regformats/i386/x32-avx.dat: Removed.
1325 * regformats/i386/x32.dat: Removed.
1327 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
1329 PR breakpoints/21886
1330 * mem-break.c (default_memory_insert_breakpoint): Use
1331 `->placed_address' rather than `->reqstd_address' for the
1332 breakpoint location.
1334 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
1336 * arch-utils.c (default_print_insn): Remove arch/mach/endian
1339 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
1341 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
1342 a union of `tdep_info', `tdesc_data' and `id'.
1343 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
1344 rather than `info.tdep_info'.
1345 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
1346 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
1347 * i386-tdep.c (i386_gdbarch_init): Likewise.
1348 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
1349 * mips-tdep.c (mips_gdbarch_init): Likewise.
1350 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1351 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
1352 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
1354 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
1356 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
1357 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
1359 * spu-tdep.c (spu_gdbarch_init): Likewise.
1360 * gdbarch.h: Regenerate.
1362 2017-08-07 Leszek Swirski <leszeks@google.com>
1365 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
1367 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
1369 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
1370 (gdbsim_open): Rename gdb_argv args object to argv.
1372 2017-08-05 Tom Tromey <tom@tromey.com>
1374 * compile/compile-object-load.c (compile_object_load): Use
1375 gdb::unique_xmalloc_ptr.
1376 * cli/cli-dump.c (scan_filename): Rename from
1377 scan_filename_with_cleanup. Change return type.
1378 (scan_expression): Rename from scan_expression_with_cleanup.
1380 (dump_memory_to_file, dump_value_to_file, restore_command):
1381 Use gdb::unique_xmalloc_ptr. Update.
1382 * cli/cli-cmds.c (find_and_open_script): Use
1383 gdb::unique_xmalloc_ptr.
1384 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
1385 * symmisc.c (maintenance_print_symbols)
1386 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
1387 * symfile.c (symfile_bfd_open, generic_load)
1388 (add_symbol_file_command, remove_symbol_file_command): Use
1389 gdb::unique_xmalloc_ptr.
1390 * source.c (openp): Use gdb::unique_xmalloc_ptr.
1391 * psymtab.c (maintenance_print_psymbols): Use
1392 gdb::unique_xmalloc_ptr.
1393 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
1394 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
1395 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
1396 (reload_shared_libraries_1): Likewise.
1398 2017-08-05 Tom Tromey <tom@tromey.com>
1400 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
1401 (rust_op_vector, rust_set_vector): New typedefs.
1402 (current_parser): New global.
1403 (work_obstack): Change to pointer type. Update all users.
1404 (rust_ast, pstate): Remove globals.
1405 (struct rust_parser): New.
1406 (%union) <params, field_inits>: Change type.
1407 (start, tuple_expr, unit_expr, struct_expr_list, literal)
1408 (field_expr, expr_list, maybe_expr_list, type_list): Update.
1409 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
1410 (convert_params_to_types, convert_params_to_expression): Change
1412 (ast_string): Change type of "fields".
1413 (rust_parse): Make a rust_parser. Remove cleanups.
1414 (rust_lex_tests): Make and install an auto_obstack.
1416 2017-08-04 Yao Qi <yao.qi@linaro.org>
1418 * configure.srv (ipa_x32_linux_regobj): New.
1419 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
1420 instead of X86_TDESC_AVX512.
1421 (initialize_low_tracepoint): Call
1422 init_registers_x32_avx_avx512_linux.
1424 2017-08-04 Yao Qi <yao.qi@linaro.org>
1426 * utils.h (gdb_argv): Add namespace std for nullptr_t.
1428 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
1430 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
1432 2017-08-03 Tom Tromey <tom@tromey.com>
1434 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
1436 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
1438 2017-08-03 Tom Tromey <tom@tromey.com>
1440 * python/py-param.c (compute_enum_values): Use gdb_argv.
1442 2017-08-03 Tom Tromey <tom@tromey.com>
1444 * utils.h (struct gdb_argv_deleter): New.
1445 (gdb_argv): New class.
1446 * utils.c (gdb_argv::reset): New method.
1447 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
1448 * tracefile.c (tsave_command): Use gdb_argv.
1449 * top.c (new_ui_command): Use gdb_argv.
1450 * symmisc.c (maintenance_print_symbols)
1451 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
1452 * symfile.c (symbol_file_command, generic_load)
1453 (remove_symbol_file_command): Use gdb_argv.
1454 * stack.c (backtrace_command): Use gdb_argv.
1455 * source.c (add_path, show_substitute_path_command)
1456 (unset_substitute_path_command, set_substitute_path_command):
1458 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
1459 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
1460 * remote.c (extended_remote_run, remote_put_command)
1461 (remote_get_command, remote_delete_command): Use gdb_argv.
1462 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
1463 (gdbsim_open): Use gdb_argv.
1464 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
1465 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
1466 * procfs.c (procfs_info_proc): Use gdb_argv.
1467 * interps.c (interpreter_exec_cmd): Use gdb_argv.
1468 * infrun.c (handle_command): Use gdb_argv.
1469 * inferior.c (add_inferior_command, clone_inferior_command):
1471 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
1472 * exec.c (exec_file_command): Use gdb_argv.
1473 * cli/cli-cmds.c (alias_command): Use gdb_argv.
1474 * compile/compile.c (build_argc_argv): Use gdb_argv.
1476 2017-08-03 Tom Tromey <tom@tromey.com>
1478 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
1480 2017-08-03 Tom Tromey <tom@tromey.com>
1482 * python/python.c (compute_python_string): Return std::string.
1483 (gdbpy_eval_from_control_command): Update.
1484 (do_start_initialization): Use std::string.
1485 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
1487 * python/py-breakpoint.c (local_setattro): Use string_printf, not
1490 2017-08-03 Tom Tromey <tom@tromey.com>
1492 * top.h (do_restore_instream_cleanup): Remove.
1493 * top.c (do_restore_instream_cleanup): Remove.
1494 (read_command_file): Use scoped_restore.
1495 * cli/cli-script.c (execute_user_command): Use scoped_restore.
1497 2017-08-03 Tom Tromey <tom@tromey.com>
1499 * cli/cli-script.c (execute_user_command)
1500 (execute_control_command): Use scoped_restore.
1502 2017-08-03 Tom Tromey <tom@tromey.com>
1504 * cli/cli-script.c (do_restore_user_call_depth): Remove.
1505 (execute_user_command): Remove user_call_depth; use
1506 user_args_stack's size instead.
1508 2017-08-03 Tom Tromey <tom@tromey.com>
1510 * top.h (in_user_command): Remove.
1511 * top.c (in_user_command): Remove.
1512 * cli/cli-script.c (do_restore_user_call_depth)
1513 (execute_user_command): Update.
1515 2017-08-03 Tom Tromey <tom@tromey.com>
1517 * valops.c (search_struct_method): Use gdb::byte_vector.
1518 * valarith.c (value_concat): Use std::vector.
1519 * target.c (memory_xfer_partial): Use gdb::byte_vector.
1520 (simple_search_memory): Likewise.
1521 * printcmd.c (find_string_backward): Use gdb::byte_vector.
1522 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
1523 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
1524 * elfread.c (elf_rel_plt_read): Use std::string.
1525 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
1526 * cli/cli-dump.c (restore_section_callback): Use
1529 2017-08-03 Tom Tromey <tom@tromey.com>
1531 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
1533 2017-08-03 Tom Tromey <tom@tromey.com>
1535 * tui/tui-regs.c (tui_restore_gdbout): Remove.
1536 (tui_register_format): Use scoped_restore.
1538 2017-08-03 Tom Tromey <tom@tromey.com>
1540 * reverse.c (exec_direction_default): Remove.
1541 (exec_reverse_once): Use scoped_restore.
1542 * remote.c (restore_remote_timeout): Remove.
1543 (remote_flash_erase, remote_flash_write, remote_flash_done)
1544 (readchar, remote_serial_write): Use scoped_restore.
1545 * cli/cli-script.c (struct source_cleanup_lines_args)
1546 (source_cleanup_lines): Remove.
1547 (script_from_file): Use scoped_restore.
1548 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
1549 (source_command): Use scoped_restore.
1551 2017-08-03 Tom Tromey <tom@tromey.com>
1553 * utils.h (make_cleanup_free_so): Remove.
1554 * utils.c (do_free_so, make_cleanup_free_so): Remove.
1555 * solist.h (struct so_deleter): New.
1556 (so_list_up): New typedef.
1557 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
1559 2017-08-03 Tom Tromey <tom@tromey.com>
1561 * utils.h (make_cleanup_restore_current_language): Remove.
1562 * utils.c (do_restore_current_language)
1563 (make_cleanup_restore_current_language): Remove.
1564 * parse.c (parse_exp_in_context_1)
1565 (parse_expression_with_language): Use
1566 scoped_restore_current_language.
1567 * mi/mi-main.c (mi_cmd_execute): Use
1568 scoped_restore_current_language.
1569 * language.h (scoped_restore_current_language): New class.
1571 2017-08-03 Tom Tromey <tom@tromey.com>
1573 * compile/compile.c (cleanup_unlink_file): Remove.
1574 (compile_to_object): Use gdb::unlinker.
1575 (eval_compile_command): Likewise.
1577 2017-08-03 Tom Tromey <tom@tromey.com>
1579 * utils.h (make_cleanup_fclose): Remove.
1580 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
1582 2017-08-03 Tom Tromey <tom@tromey.com>
1584 * top.c (open_terminal_stream): Return gdb_file_up.
1585 (new_ui_command): Update.
1587 2017-08-03 Tom Tromey <tom@tromey.com>
1589 * source.c (print_source_lines_base, forward_search_command)
1590 (reverse_search_command): Use gdb_file_up.
1592 2017-08-03 Tom Tromey <tom@tromey.com>
1594 * fbsd-nat.c (fbsd_find_memory_regions): Update.
1596 2017-08-03 Tom Tromey <tom@tromey.com>
1598 * cli/cli-cmds.c (find_and_open_script): Change return type.
1599 Remove "streamp" and "full_path" parameters.
1600 (source_script_with_search): Update.
1601 * auto-load.c (source_script_file): Update.
1602 * cli/cli-cmds.h (find_and_open_script): Change type.
1603 (open_script): New struct.
1605 2017-08-03 Tom Tromey <tom@tromey.com>
1607 * xml-support.c (xml_fetch_content_from_file): Update.
1608 * ui-file.c (stdio_file::open): Update.
1609 * tracefile-tfile.c (tfile_start): Update.
1610 * remote.c (remote_file_put, remote_file_get): Update.
1611 * nat/linux-procfs.c (linux_proc_get_int)
1612 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
1613 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
1614 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
1615 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
1616 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
1617 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
1618 * linux-nat.c (linux_proc_pending_signals): Update.
1619 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
1620 (file_closer): Remove.
1621 * compile/compile.c (compile_to_object): Update.
1622 * common/filestuff.h (struct gdb_file_deleter): New.
1623 (gdb_file_up): New typedef.
1624 (gdb_fopen_cloexec): Change return type.
1625 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
1626 * cli/cli-dump.c (fopen_with_cleanup): Remove.
1627 (dump_binary_file, restore_binary_file): Update.
1628 * auto-load.c (auto_load_objfile_script_1): Update.
1630 2017-08-03 Tom Tromey <tom@tromey.com>
1632 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
1633 (info_static_tracepoint_markers_command): Likewise.
1634 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
1635 * skip.c (skip_info): Use ui_out_emit_table.
1636 * progspace.c (print_program_space): Use ui_out_emit_table.
1637 * osdata.c (info_osdata): Use ui_out_emit_table.
1638 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
1640 * linux-thread-db.c (info_auto_load_libthread_db): Use
1642 * inferior.c (print_inferior): Use ui_out_emit_table.
1643 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
1644 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
1645 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
1646 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
1647 * ui-out.h (class ui_out_emit_table): New.
1649 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
1651 * mips-tdep.c (mips_fpu_type_str): New function.
1652 (mips_dump_tdep): Call it.
1654 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
1656 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
1659 2017-07-31 Xavier Roirand <roirand@adacore.com>
1661 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
1663 2017-07-27 Xavier Roirand <roirand@adacore.com>
1665 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
1667 2017-07-26 Yao Qi <yao.qi@linaro.org>
1669 * cli/cli-cmds.c (maintenancechecklist): New variable.
1670 * gdbcmd.h (maintenancechecklist): Declare it.
1671 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
1672 Call i386_linux_read_description with different masks.
1673 * maint.c (maintenance_check_command): New function.
1674 (_initialize_maint_cmds): Call add_prefix_cmd.
1675 * target-descriptions.c (tdesc_reg): override operator != and ==.
1676 (tdesc_type): Likewise.
1677 (tdesc_feature): Likewise.
1678 (target_desc): Likewise.
1679 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
1680 (maintenance_check_xml_descriptions): New function.
1681 (_initialize_target_descriptions) Add command "xml-descriptions".
1682 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
1684 2017-07-26 Yao Qi <yao.qi@linaro.org>
1686 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
1687 Include features/i386/32bit-*.c.
1688 (i386_linux_read_description): Generate target description if it
1690 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
1692 * features/i386/32bit-linux.c: Re-generated.
1693 * features/i386/32bit-sse.c: Likewise.
1694 * target-descriptions.c (print_c_feature::visit): Print code to
1695 set register number if needed.
1696 (print_c_feature) <m_next_regnum>: New field.
1698 2017-07-26 Yao Qi <yao.qi@linaro.org>
1700 * features/Makefile (CFILES): Rename with TDESC_CFILES.
1701 (FEATURE_XMLFILES): New.
1702 (FEATURE_CFILES): New.
1704 (clean-cfiles): Remove generated c files.
1705 * features/i386/32bit-avx.c: Generated.
1706 * features/i386/32bit-avx512.c: Generated.
1707 * features/i386/32bit-core.c: Generated.
1708 * features/i386/32bit-linux.c: Generated.
1709 * features/i386/32bit-mpx.c: Generated.
1710 * features/i386/32bit-pkeys.c: Generated.
1711 * features/i386/32bit-sse.c: Generated.
1712 * target-descriptions.c: Include algorithm.
1713 (tdesc_element_visitor): Add method visit_end.
1714 (print_c_tdesc): Implement visit_end.
1715 (print_c_tdesc:: m_filename_after_features): Move it to
1717 (print_c_feature): New class.
1718 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
1719 name starts with "i386/32bit-".
1721 2017-07-26 Yao Qi <yao.qi@linaro.org>
1723 * target-descriptions.c (tdesc_element_visitor): New class.
1724 (tdesc_element): New class.
1725 (tdesc_reg): Inherit from tdesc_element.
1726 (tdesc_reg::accept): New function.
1727 (tdesc_type): Inherit from tdesc_element.
1728 (tdesc_type::accept): New function.
1729 (tdesc_feature): Inherit from tdesc_element.
1730 (tdesc_feature::accept): New function.
1731 (target_desc): Inherit from tdesc_element.
1732 (target_desc::target_desc): New.
1733 (target_desc::~target_desc): New.
1734 (target_desc::accept): New.
1735 (allocate_target_description): Use new.
1736 (free_target_description): Use delete.
1737 (print_c_tdesc): New class.
1738 (maint_print_c_tdesc_cmd): Adjust.
1740 * features/aarch64.c: Re-generated.
1741 * features/arc-arcompact.c: Re-generated.
1742 * features/arc-v2.c: Re-generated.
1743 * features/arm/arm-with-iwmmxt.c: Re-generated.
1744 * features/arm/arm-with-m.c: Re-generated.
1745 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
1746 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
1747 * features/arm/arm-with-neon.c: Re-generated.
1748 * features/arm/arm-with-vfpv2.c: Re-generated.
1749 * features/arm/arm-with-vfpv3.c: Re-generated.
1750 * features/i386/amd64-avx-avx512.c: Re-generated.
1751 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
1752 * features/i386/amd64-avx.c: Re-generated.
1753 * features/i386/amd64-avx-linux.c: Re-generated.
1754 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
1755 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
1756 * features/i386/amd64-avx-mpx.c: Re-generated.
1757 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
1758 * features/i386/amd64.c: Re-generated.
1759 * features/i386/amd64-linux.c: Re-generated.
1760 * features/i386/amd64-mpx.c: Re-generated.
1761 * features/i386/amd64-mpx-linux.c: Re-generated.
1762 * features/i386/i386-avx-avx512.c: Re-generated.
1763 * features/i386/i386-avx-avx512-linux.c: Re-generated.
1764 * features/i386/i386-avx.c: Re-generated.
1765 * features/i386/i386-avx-linux.c: Re-generated.
1766 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
1767 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
1768 * features/i386/i386-avx-mpx.c: Re-generated.
1769 * features/i386/i386-avx-mpx-linux.c: Re-generated.
1770 * features/i386/i386.c: Re-generated.
1771 * features/i386/i386-linux.c: Re-generated.
1772 * features/i386/i386-mmx.c: Re-generated.
1773 * features/i386/i386-mmx-linux.c: Re-generated.
1774 * features/i386/i386-mpx.c: Re-generated.
1775 * features/i386/i386-mpx-linux.c: Re-generated.
1776 * features/i386/x32-avx-avx512.c: Re-generated.
1777 * features/i386/x32-avx-avx512-linux.c: Re-generated.
1778 * features/i386/x32-avx.c: Re-generated.
1779 * features/i386/x32-avx-linux.c: Re-generated.
1780 * features/i386/x32.c: Re-generated.
1781 * features/i386/x32-linux.c: Re-generated.
1782 * features/microblaze.c: Re-generated.
1783 * features/microblaze-with-stack-protect.c: Re-generated.
1784 * features/mips64-dsp-linux.c: Re-generated.
1785 * features/mips64-linux.c: Re-generated.
1786 * features/mips-dsp-linux.c: Re-generated.
1787 * features/mips-linux.c: Re-generated.
1788 * features/nds32.c: Re-generated.
1789 * features/nios2.c: Re-generated.
1790 * features/nios2-linux.c: Re-generated.
1791 * features/rs6000/powerpc-32.c: Re-generated.
1792 * features/rs6000/powerpc-32l.c: Re-generated.
1793 * features/rs6000/powerpc-403.c: Re-generated.
1794 * features/rs6000/powerpc-403gc.c : Re-generated.
1795 * features/rs6000/powerpc-405.c: Re-generated.
1796 * features/rs6000/powerpc-505.c: Re-generated.
1797 * features/rs6000/powerpc-601.c: Re-generated.
1798 * features/rs6000/powerpc-602.c: Re-generated.
1799 * features/rs6000/powerpc-603.c: Re-generated.
1800 * features/rs6000/powerpc-604.c: Re-generated.
1801 * features/rs6000/powerpc-64.c: Re-generated.
1802 * features/rs6000/powerpc-64l.c: Re-generated.
1803 * features/rs6000/powerpc-7400.c: Re-generated.
1804 * features/rs6000/powerpc-750.c: Re-generated.
1805 * features/rs6000/powerpc-860.c: Re-generated.
1806 * features/rs6000/powerpc-altivec32.c: Re-generated.
1807 * features/rs6000/powerpc-altivec32l.c: Re-generated.
1808 * features/rs6000/powerpc-altivec64.c: Re-generated.
1809 * features/rs6000/powerpc-altivec64l.c: Re-generated.
1810 * features/rs6000/powerpc-cell32l.c: Re-generated.
1811 * features/rs6000/powerpc-cell64l.c: Re-generated.
1812 * features/rs6000/powerpc-e500.c: Re-generated.
1813 * features/rs6000/powerpc-e500l.c: Re-generated.
1814 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
1815 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
1816 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
1817 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
1818 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
1819 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
1820 * features/rs6000/powerpc-vsx32.c: Re-generated.
1821 * features/rs6000/powerpc-vsx32l.c: Re-generated.
1822 * features/rs6000/powerpc-vsx64.c: Re-generated.
1823 * features/rs6000/powerpc-vsx64l.c: Re-generated.
1824 * features/rs6000/rs6000.c: Re-generated.
1825 * features/s390-linux32.c: Re-generated.
1826 * features/s390-linux32v1.c: Re-generated.
1827 * features/s390-linux32v2.c: Re-generated.
1828 * features/s390-linux64.c: Re-generated.
1829 * features/s390-linux64v1.c: Re-generated.
1830 * features/s390-linux64v2.c: Re-generated.
1831 * features/s390-te-linux64.c: Re-generated.
1832 * features/s390-tevx-linux64.c: Re-generated.
1833 * features/s390-vx-linux64.c: Re-generated.
1834 * features/s390x-linux64.c: Re-generated.
1835 * features/s390x-linux64v1.c: Re-generated.
1836 * features/s390x-linux64v2.c: Re-generated.
1837 * features/s390x-te-linux64.c: Re-generated.
1838 * features/s390x-tevx-linux64.c: Re-generated.
1839 * features/s390x-vx-linux64.c: Re-generated.
1840 * features/sparc/sparc32-solaris.c: Re-generated.
1841 * features/sparc/sparc64-solaris.c: Re-generated.
1842 * features/tic6x-c62x.c: Re-generated.
1843 * features/tic6x-c62x-linux.c: Re-generated.
1844 * features/tic6x-c64x.c: Re-generated.
1845 * features/tic6x-c64x-linux.c: Re-generated.
1846 * features/tic6x-c64xp.c: Re-generated.
1847 * features/tic6x-c64xp-linux.c: Re-generated.
1849 2017-07-26 Yao Qi <yao.qi@linaro.org>
1851 * i386-linux-tdep.c (i386_linux_read_description): New function.
1852 (i386_linux_core_read_description): Call
1853 i386_linux_read_description.
1854 * i386-linux-tdep.h (i386_linux_read_description): Declare.
1855 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
1856 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
1857 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
1858 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
1859 * x86-linux-nat.c (x86_linux_read_description): Call
1860 i386_linux_read_description.
1862 2017-07-26 Yao Qi <yao.qi@linaro.org>
1865 * features/Makefile (%.c: %.xml): Pass the xml file name to
1866 command "maint print c-tdesc".
1867 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
1870 2017-07-26 Yao Qi <yao.qi@linaro.org>
1872 * target-descriptions.c (target_desc): Add ctor and dtor. Do
1873 in-class initialization.
1874 (tdesc_create_feature): Call new instead of XCNEW.
1875 (free_target_description): Ue delete.
1877 2017-07-25 John Baldwin <jhb@FreeBSD.org>
1879 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
1881 2017-07-25 Yao Qi <yao.qi@linaro.org>
1883 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
1885 (amd64_x32_init_abi): Likewise.
1886 * amd64-tdep.h (amd64_init_abi): Update declaration.
1887 (amd64_x32_init_abi): Likewise.
1889 2017-07-25 Yao Qi <yao.qi@linaro.org>
1892 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
1893 condition for FPSCR.
1894 (arm_linux_store_inferior_registers): Likewise.
1896 2017-07-22 Tom Tromey <tom@tromey.com>
1898 * break-catch-syscall.c (struct catch_syscall_inferior_data)
1899 <syscalls_counts>: Now a std::vector.
1900 (get_catch_syscall_inferior_data): Use "new".
1901 (catch_syscall_inferior_data_cleanup): Use "delete".
1902 (insert_catch_syscall, remove_catch_syscall)
1903 (clear_syscall_counts): Update.
1905 2017-07-22 Tom Tromey <tom@tromey.com>
1907 * break-catch-syscall.c (syscall_catchpoint)
1908 <syscalls_to_be_caught>: Now a std::vector<int>
1909 (~syscall_catchpoint): Remove.
1910 (insert_catch_syscall, remove_catch_syscall)
1911 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
1912 (print_mention_catch_syscall, print_recreate_catch_syscall):
1914 (create_syscall_event_catchpoint): Change type of "filter"
1916 (catch_syscall_split_args): Return a std::vector.
1917 (catch_syscall_command_1, catching_syscall_number_1): Update.
1919 2017-07-22 Tom Tromey <tom@tromey.com>
1921 * break-catch-throw.c (struct exception_catchpoint)
1922 <exception_rx>: Now a std::string.
1923 (~exception_catchpoint): Remove.
1924 (print_one_detail_exception_catchpoint): Update.
1925 (handle_gnu_v3_exceptions): Change type of except_rx.
1926 (extract_exception_regexp): Return a std::string.
1927 (catch_exception_command_1): Update.
1929 2017-07-22 Tom Tromey <tom@tromey.com>
1931 * break-catch-sig.c (gdb_signal_type): Remove typedef.
1932 (struct signal_catchpoint) <signals_to_be_caught>: Now a
1934 <catch_all>: Now a bool.
1935 (~signal_catchpoint): Remove.
1936 (signal_catchpoint_insert_location)
1937 (signal_catchpoint_remove_location)
1938 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
1939 (signal_catchpoint_print_mention)
1940 (signal_catchpoint_print_recreate)
1941 (signal_catchpoint_explains_signal): Update.
1942 (create_signal_catchpoint): Change type of "filter" and
1944 (catch_signal_split_args): Return a std::vector. Change type of
1946 (catch_signal_command): Update.
1948 2017-07-20 Pedro Alves <palves@redhat.com>
1950 * ada-lang.c (ada_language_defn): Make extern.
1951 (_initialize_ada_language): Remove add_language call.
1952 * c-lang.c (c_language_defn, cplus_language_defn)
1953 (asm_language_defn, minimal_language_defn): Make extern.
1954 (_initialize_c_language): Delete.
1955 * completer.c (compare_cstrings): Delete, moved to utils.h.
1956 * d-lang.c (d_language_defn): Make extern.
1957 (_initialize_d_language): Remove add_language calls.
1958 * defs.h (enum language): Add comment.
1959 * f-lang.c (f_language_defn): Make extern.
1960 (_initialize_f_language): Remove add_language call.
1961 * go-lang.c (go_language_defn): Make extern.
1962 (_initialize_go_language): Remove add_language call.
1963 * language.c: Include <algorithm>.
1964 (languages): Redefine as const array.
1965 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
1966 (set_language_command): Handle "local". Use for-range loop.
1967 (set_language): Remove loop.
1968 (language_enum): Rewrite.
1969 (language_def, language_str): Remove loops.
1970 (add_language): Delete.
1971 (add_set_language_command): New, based on add_languages.
1972 (skip_language_trampoline): Adjust.
1973 (local_language_defn): Delete.
1974 (language_gdbarch_post_init): Adjust.
1975 (_initialize_language): Remove add_language calls. Call
1976 add_set_language_command.
1977 * language.h (add_language): Delete.
1978 (auto_language_defn)
1979 (unknown_language_defn, minimal_language_defn, ada_language_defn)
1980 (asm_language_defn, c_language_defn, cplus_language_defn)
1981 (d_language_defn, f_language_defn, go_language_defn)
1982 (m2_language_defn, objc_language_defn, opencl_language_defn)
1983 (pascal_language_defn, rust_language_defn): Declare.
1984 * m2-lang.c (m2_language_defn): Make extern.
1985 (_initialize_m2_language): Remove add_language call.
1986 * objc-lang.c (objc_language_defn): Make extern.
1987 (_initialize_objc_language): Remove add_language call.
1988 * opencl-lang.c (opencl_language_defn): Make extern.
1989 (_initialize_opencl_language): Remove add_language call.
1990 * p-lang.c (pascal_language_defn): Make extern.
1991 (_initialize_pascal_language): Delete.
1992 * rust-lang.c (rust_language_defn): Make extern.
1993 (_initialize_rust_language): Delete.
1994 * utils.h (compare_cstrings): New static inline function.
1996 2017-07-20 Pedro Alves <palves@redhat.com>
1998 * ada-lang.c (ada_to_fixed_type_1): Adjust.
1999 (get_var_value): Constify parameters.
2000 (get_int_var_value): Change prototype.
2001 (to_fixed_range_type): Adjust.
2002 * ada-lang.h (get_int_var_value): Change prototype.
2004 2017-07-20 Pedro Alves <palves@redhat.com>
2006 * dwarf2read.c (dw2_lookup_symbol): Use
2007 SYMBOL_MATCHES_SEARCH_NAME.
2008 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
2010 2017-07-20 Pedro Alves <palves@redhat.com>
2012 * block.c (block_iter_name_step, block_iter_name_first)
2013 (block_iter_name_next): Delete.
2014 (block_lookup_symbol_primary): Adjust to use
2015 dict_iter_match_first/dict_iter_match_next.
2016 * block.h (block_iter_name_first, block_iter_name_next): Delete
2018 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
2019 dict_iter_match_first/dict_iter_match_next.
2021 2017-07-20 Pedro Alves <palves@redhat.com>
2023 * cp-support.c (cp_find_first_component_aux): Add missing case for
2026 2017-07-18 David Blaikie <dblaikie@gmail.com>
2028 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
2029 of dwo_cu's dwo_file.
2031 2017-07-18 Yao Qi <yao.qi@linaro.org>
2033 * remote.c (store_registers_using_G): Remove one line comment.
2035 2017-07-18 Yao Qi <yao.qi@linaro.org>
2037 * regcache.c (regcache_cpy): Simplify it.
2038 (regcache::cpy_no_passthrough): Remove it.
2039 * regcache.h (cpy_no_passthrough): Remove it.
2040 (regcache_dup, regcache_cpy): Update comments.
2042 2017-07-18 Pedro Alves <palves@redhat.com>
2044 * remote-sim.c (sim_command_completer): Adjust to work with a
2045 completion_tracker instead of a VEC.
2047 2017-07-17 Pedro Alves <palves@redhat.com>
2049 * completer.c (complete_source_filenames): New function.
2050 (complete_address_and_linespec_locations): New function.
2051 (location_completer): Use complete_address_and_linespec_locations.
2052 (completion_tracker::build_completion_result): Honor the tracker's
2053 request to suppress append.
2054 * completer.h (completion_tracker::suppress_append_ws)
2055 (completion_tracker::set_suppress_append_ws): New methods.
2056 (completion_tracker::m_suppress_append_ws): New field.
2057 (complete_source_filenames): New declaration.
2058 * linespec.c (linespec_complete_what): New.
2059 (struct ls_parser) <complete_what, completion_word,
2060 completion_quote_char, completion_quote_end, completion_tracker>:
2062 (string_find_incomplete_keyword_at_end): New.
2063 (linespec_lexer_lex_string): Record quote char. If in completion
2065 (linespec_lexer_consume_token): Advance the completion word point.
2066 (linespec_lexer_peek_token): Save/restore completion info.
2067 (save_stream_and_consume_token): New.
2068 (set_completion_after_number): New.
2069 (linespec_parse_basic): Set what to complete next depending on
2070 token. Handle function and label completions specially.
2071 (parse_linespec): Disable objc shortcut in completion mode. Set
2072 what to complete next depending on token type. Skip keyword if in
2074 (complete_linespec_component, linespec_complete): New.
2075 * linespec.h (linespec_complete): Declare.
2077 2017-07-17 Pedro Alves <palves@redhat.com>
2079 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
2080 Handle 'operator<' / 'operator<<'.
2082 2017-07-17 Pedro Alves <palves@redhat.com>
2084 * completer.c (collect_explicit_location_matches): Handle
2086 (convert_explicit_location_to_linespec): New, factored out from
2088 (convert_explicit_location_to_sals): ... this.
2089 (complete_label): New.
2090 (linespec_complete_label, find_label_symbols_in_block): New.
2091 (find_label_symbols): Add completion_mode parameter and adjust to
2092 call find_label_symbols_in_block.
2093 * linespec.h (linespec_complete_label): Declare.
2095 2017-07-17 Pedro Alves <palves@redhat.com>
2097 * ada-lang.c (ada_collect_symbol_completion_matches): Add
2098 complete_symbol_mode parameter.
2099 * cli/cli-cmds.c (complete_command): Get the completion result out
2100 of the handle_brkchars tracker if used a custom word point.
2101 * completer.c: Include "linespec.h".
2102 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
2103 (advance_to_expression_complete_word_point): New.
2104 (completion_tracker::completes_to_completion_word): New.
2105 (complete_files_symbols): Pass down
2106 complete_symbol_mode::EXPRESSION.
2107 (explicit_options, probe_options): New.
2108 (collect_explicit_location_matches): Complete on the
2109 explictit_loc->foo instead of word. Use
2110 linespec_complete_function. Handle MATCH_LINE. Handle offering
2111 keyword and options completions.
2112 (backup_text_ptr): Delete.
2113 (skip_keyword): New.
2114 (complete_explicit_location): Remove 'word' parameter. Add
2115 language, quoted_arg_start and quoted_arg_end parameters.
2116 Rewrite, parsing left to right.
2117 (location_completer): Rewrite.
2118 (location_completer_handle_brkchars): New function.
2119 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
2120 (enum complete_line_internal_reason): Adjust comments.
2121 (completion_tracker::discard_completions): New.
2122 (completer_handle_brkchars_func_for_completer): Handle
2124 (gdb_custom_word_point_brkchars)
2125 (gdb_org_rl_basic_quote_characters): New.
2126 (gdb_completion_word_break_characters_throw)
2127 (completion_find_completion_word): Handle trackers that use a
2129 (completion_tracker::advance_custom_word_point_by): New.
2130 (completion_tracker::build_completion_result): Don't rely on
2131 readline appending the quote char.
2132 (gdb_rl_attempted_completion_function_throw): Handle trackers that
2133 use a custom word point.
2134 (gdb_rl_attempted_completion_function): Restore
2135 rl_basic_quote_characters.
2136 * completer.h (class completion_tracker): Extend intro comment.
2137 (completion_tracker::set_quote_char)
2138 (completion_tracker::quote_char)
2139 (completion_tracker::set_use_custom_word_point)
2140 (completion_tracker::use_custom_word_point)
2141 (completion_tracker::custom_word_point)
2142 (completion_tracker::set_custom_word_point)
2143 (completion_tracker::advance_custom_word_point_by)
2144 (completion_tracker::completes_to_completion_word)
2145 (completion_tracker::discard_completions): New methods.
2146 (completion_tracker::m_quote_char)
2147 (completion_tracker::m_use_custom_word_point)
2148 (completion_tracker::m_custom_word_point): New fields.
2149 (advance_to_expression_complete_word_point): Declare.
2150 * f-lang.c (f_collect_symbol_completion_matches): Add
2151 complete_symbol_mode parameter.
2152 * language.h (struct language_defn)
2153 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
2155 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
2156 (linespec_complete_function): New function.
2157 (linespec_lexer_lex_keyword): Adjust.
2158 * linespec.h (linespec_keywords, linespec_complete_function): New
2160 * location.c (find_end_quote): New function.
2161 (explicit_location_lex_one): Add explicit_completion_info
2162 parameter. Save quoting info. Don't throw if being called for
2163 completion. Don't handle Ada operators here.
2164 (is_cp_operator, skip_op_false_positives, first_of)
2165 (explicit_location_lex_one_function): New function.
2166 (string_to_explicit_location): Replace 'dont_throw' parameter with
2167 an explicit_completion_info pointer parameter. Handle it. Don't
2168 use explicit_location_lex_one to lex function names. Use
2169 explicit_location_lex_one_function instead.
2170 * location.h (struct explicit_completion_info): New.
2171 (string_to_explicit_location): Replace 'dont_throw' parameter with
2172 an explicit_completion_info pointer parameter.
2173 * symtab.c (default_collect_symbol_completion_matches_break_on):
2174 Add complete_symbol_mode parameter. Handle LINESPEC mode.
2175 (default_collect_symbol_completion_matches)
2176 (collect_symbol_completion_matches): Add complete_symbol_mode
2178 (collect_symbol_completion_matches_type): Pass down
2179 complete_symbol_mode::EXPRESSION.
2180 (collect_file_symbol_completion_matches): Add complete_symbol_mode
2181 parameter. Handle LINESPEC mode.
2182 * symtab.h (complete_symbol_mode): New.
2183 (default_collect_symbol_completion_matches_break_on)
2184 (default_collect_symbol_completion_matches)
2185 (collect_symbol_completion_matches)
2186 (collect_file_symbol_completion_matches): Add complete_symbol_mode
2189 2017-07-17 Pedro Alves <palves@redhat.com>
2191 * utils.c (enum class strncmp_iw_mode): New.
2192 (strcmp_iw): Rename to ...
2193 (strncmp_iw_with_mode): ... this. Add string2_len and mode
2194 parameters. Handle them.
2196 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
2197 * utils.h (strncmp_iw): Declare.
2198 (strcmp_iw): Move describing comments here.
2200 2017-07-17 Pedro Alves <palves@redhat.com>
2202 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
2204 * c-typeprint.c (is_type_conversion_operator): Use
2206 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
2207 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
2209 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
2210 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
2211 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
2212 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
2214 * location.c: Include "cp-support.h".
2215 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
2217 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
2220 2017-07-17 Pedro Alves <palves@redhat.com>
2222 * cli/cli-cmds.c (complete_command): Use a completion tracker
2223 along with completion_find_completion_word for handle_brkchars
2225 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
2226 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
2227 (struct gdb_rl_completion_word_info): New.
2228 (gdb_rl_find_completion_word): New.
2229 (completion_find_completion_word): New.
2230 * completer.h (completion_find_completion_word): Declare.
2232 2017-07-17 Pedro Alves <palves@redhat.com>
2234 * ada-lang.c (symbol_completion_match): Adjust comments.
2235 (symbol_completion_add): Replace vector parameter with
2236 completion_tracker parameter. Use it.
2237 (ada_make_symbol_completion_list): Rename to...
2238 (ada_collect_symbol_completion_matches): ... this. Add
2239 completion_tracker parameter and use it.
2240 (ada_language_defn): Adjust.
2241 * break-catch-syscall.c (catch_syscall_completer): Adjust
2242 prototype and work with completion_tracker instead of VEC.
2243 * breakpoint.c (condition_completer): Adjust prototype and work
2244 with completion_tracker instead of VEC.
2245 * c-lang.c (c_language_defn, cplus_language_defn)
2246 (asm_language_defn, minimal_language_defn): Adjust to renames.
2247 * cli/cli-cmds.c (complete_command): Rework using
2248 completion_tracker. Catch exceptions when completing.
2249 * cli/cli-decode.c (integer_unlimited_completer)
2250 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
2251 with completion_tracker instead of VEC.
2252 * command.h (struct completion_tracker): Forward declare.
2253 (completer_ftype, completer_handle_brkchars_ftype): Change
2255 (complete_on_cmdlist, complete_on_enum): Adjust.
2256 * completer.c: Include <algorithm>.
2257 (struct gdb_completer_state): New.
2258 (current_completion): New global.
2259 (readline_line_completion_function): Delete.
2260 (noop_completer, filename_completer)
2261 (filename_completer_handle_brkchars, complete_files_symbols)
2262 (linespec_location_completer): Adjust to work with a
2263 completion_tracker instead of a VEC.
2264 (string_or_empty): New.
2265 (collect_explicit_location_matches): Adjust to work with a
2266 completion_tracker instead of a VEC.
2267 (explicit_location_completer): Rename to ...
2268 (complete_explicit_location): ... this and adjust to work with a
2269 completion_tracker instead of a VEC.
2270 (location_completer): Adjust to work with a completion_tracker
2272 (add_struct_fields): Adjust to work with a completion_list instead
2274 (expression_completer): Rename to ...
2275 (complete_expression): ... this and adjust to work with a
2276 completion_tracker instead of a VEC. Use complete_files_symbols.
2277 (expression_completer): Reimplement on top of complete_expression.
2278 (symbol_completer): Adjust to work with a completion_tracker
2280 (enum complete_line_internal_reason): Add describing comments.
2281 (complete_line_internal_normal_command): Adjust to work with a
2282 completion_tracker instead of a VEC.
2283 (complete_line_internal): Rename to ...
2284 (complete_line_internal_1): ... this and adjust to work with a
2285 completion_tracker instead of a VEC. Assert TEXT is NULL in the
2286 handle_brkchars phase.
2287 (new_completion_tracker): Delete.
2288 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
2289 complete_line_internal_1.
2290 (free_completion_tracker): Delete.
2291 (INITIAL_COMPLETION_HTAB_SIZE): New.
2292 (completion_tracker::completion_tracker)
2293 (completion_tracker::~completion_tracker): New.
2294 (maybe_add_completion): Delete.
2295 (completion_tracker::maybe_add_completion)
2296 (completion_tracker::add_completion)
2297 (completion_tracker::add_completions): New.
2298 (throw_max_completions_reached_error): Delete.
2299 (complete_line): Adjust to work with a completion_tracker instead
2300 of a VEC. Don't create a completion_tracker_t or check for max
2302 (command_completer, command_completer_handle_brkchars)
2303 (signal_completer, reg_or_group_completer_1)
2304 (reg_or_group_completer, default_completer_handle_brkchars):
2305 Adjust to work with a completion_tracker.
2306 (gdb_completion_word_break_characters_throw): New.
2307 (gdb_completion_word_break_characters): Reimplement.
2308 (line_completion_function): Delete.
2309 (completion_tracker::recompute_lowest_common_denominator)
2310 (expand_preserving_ws)
2311 (completion_tracker::build_completion_result)
2312 (completion_result::completion_result)
2313 (completion_result::completion_result)
2314 (completion_result::~completion_result)
2315 (completion_result::completion_result)
2316 (completion_result::release_match_list, compare_cstrings)
2317 (completion_result::sort_match_list)
2318 (completion_result::reset_match_list)
2319 (gdb_rl_attempted_completion_function_throw)
2320 (gdb_rl_attempted_completion_function): New.
2321 * completer.h (completion_list, struct completion_result)
2322 (class completion_tracker): New.
2323 (complete_line): Add completion_tracker parameter.
2324 (readline_line_completion_function): Delete.
2325 (gdb_rl_attempted_completion_function): New.
2326 (noop_completer, filename_completer, expression_completer)
2327 (location_completer, symbol_completer, command_completer)
2328 (signal_completer, reg_or_group_completer): Update prototypes.
2329 (completion_tracker_t, new_completion_tracker)
2330 (make_cleanup_free_completion_tracker): Delete.
2331 (enum maybe_add_completion_enum): Delete.
2332 (maybe_add_completion): Delete.
2333 (throw_max_completions_reached_error): Delete.
2334 * corefile.c (complete_set_gnutarget): Adjust to work with a
2335 completion_tracker instead of a VEC.
2336 * cp-abi.c (cp_abi_completer): Adjust to work with a
2337 completion_tracker instead of a VEC.
2338 * d-lang.c (d_language_defn): Adjust.
2339 * disasm.c (disassembler_options_completer): Adjust to work with a
2340 completion_tracker instead of a VEC.
2341 * f-lang.c (f_make_symbol_completion_list): Rename to ...
2342 (f_collect_symbol_completion_matches): ... this. Adjust to work
2343 with a completion_tracker instead of a VEC.
2344 (f_language_defn): Adjust.
2345 * go-lang.c (go_language_defn): Adjust.
2346 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
2347 Adjust to work with a completion_tracker instead of a VEC.
2348 * infrun.c (handle_completer): Likewise.
2349 * interps.c (interpreter_completer): Likewise.
2350 * interps.h (interpreter_completer): Likewise.
2351 * language.c (unknown_language_defn, auto_language_defn)
2352 (local_language_defn): Adjust.
2353 * language.h (language_defn::la_make_symbol_completion_list):
2355 (language_defn::la_collect_symbol_completion_matches): ... this
2356 and adjust to work with a completion_tracker instead of a VEC.
2357 * m2-lang.c (m2_language_defn): Adjust.
2358 * objc-lang.c (objc_language_defn): Adjust.
2359 * opencl-lang.c (opencl_language_defn): Adjust.
2360 * p-lang.c (pascal_language_defn): Adjust.
2361 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
2362 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
2363 with a completion_tracker.
2364 * rust-lang.c (rust_language_defn): Adjust.
2365 * symtab.c (free_completion_list, do_free_completion_list)
2366 (return_val, completion_tracker): Delete.
2367 (completion_list_add_name, completion_list_add_symbol)
2368 (completion_list_add_msymbol, completion_list_objc_symbol)
2369 (completion_list_add_fields, add_symtab_completions): Add
2370 completion_tracker parameter and use it.
2371 (default_make_symbol_completion_list_break_on_1): Rename to...
2372 (default_collect_symbol_completion_matches_break_on): ... this.
2373 Add completion_tracker parameter and use it instead of allocating
2374 a completion tracker here.
2375 (default_make_symbol_completion_list_break_on): Delete old
2377 (default_make_symbol_completion_list): Delete.
2378 (default_collect_symbol_completion_matches): New.
2379 (make_symbol_completion_list): Delete.
2380 (collect_symbol_completion_matches): New.
2381 (make_symbol_completion_type): Rename to ...
2382 (collect_symbol_completion_matches_type): ... this. Add
2383 completion_tracker parameter and use it instead of VEC.
2384 (make_file_symbol_completion_list_1): Rename to...
2385 (collect_file_symbol_completion_matches): ... this. Add
2386 completion_tracker parameter and use it instead of VEC.
2387 (make_file_symbol_completion_list): Delete.
2388 (add_filename_to_list): Use completion_list instead of a VEC.
2389 (add_partial_filename_data::list): Now a completion_list.
2390 (make_source_files_completion_list): Work with a completion_list
2392 * symtab.h: Include "completer.h".
2393 (default_make_symbol_completion_list_break_on)
2394 (default_make_symbol_completion_list, make_symbol_completion_list)
2395 (make_symbol_completion_type, make_file_symbol_completion_list)
2396 (make_source_files_completion_list): Delete.
2397 (default_collect_symbol_completion_matches_break_on)
2398 (default_collect_symbol_completion_matches)
2399 (collect_symbol_completion_matches)
2400 (collect_symbol_completion_matches_type)
2401 (collect_file_symbol_completion_matches)
2402 (make_source_files_completion_list): New.
2403 * top.c (init_main): Don't install a rl_completion_entry_function
2404 hook. Install a rl_attempted_completion_function hook instead.
2405 * tui/tui-layout.c (layout_completer): Adjust to work with a
2407 * tui/tui-regs.c (tui_reggroup_completer):
2408 * tui/tui-win.c (window_name_completer, focus_completer)
2409 (winheight_completer): Adjust to work with a completion_tracker.
2410 * value.c: Include "completer.h".
2411 (complete_internalvar): Adjust to work with a completion_tracker.
2412 * value.h (complete_internalvar): Likewise.
2414 2017-07-17 Pedro Alves <palves@redhat.com>
2416 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
2418 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
2419 comments to completer_ftype's declaration.
2420 <completer_handle_brkchars>: Change type to
2421 completer_handle_brkchars_ftype.
2422 * command.h (completer_ftype): Add describing comment and give
2423 names to parameters.
2424 (completer_ftype_void): Rename to ...
2425 (completer_handle_brkchars_ftype) ... this. Add describing comment.
2426 (set_cmd_completer_handle_brkchars): Adjust.
2427 * completer.c (filename_completer_handle_brkchars): New function.
2428 (complete_line_internal_normal_command): New function, factored
2430 (complete_line_internal): ... here.
2431 (command_completer_handle_brkchars)
2432 (default_completer_handle_brkchars)
2433 (completer_handle_brkchars_func_for_completer): New functions.
2434 * completer.h (set_gdb_completion_word_break_characters): Delete
2436 (completer_handle_brkchars_func_for_completer): New declaration.
2437 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
2438 completer_handle_brkchars_func_for_completer.
2440 2017-07-17 Pedro Alves <palves@redhat.com>
2442 * completer.c (symbol_completer): New function, based on
2443 make_symbol_completion_list_fn.
2444 * completer.h (symbol_completer): New declaration.
2445 * guile/scm-cmd.c (cmdscm_completers): Adjust.
2446 * python/py-cmd.c (completers): Adjust.
2447 * symtab.c (make_symbol_completion_list_fn): Delete.
2448 * symtab.h (make_symbol_completion_list_fn): Delete.
2449 * cli/cli-decode.c (add_cmd): Adjust.
2451 2017-07-17 Pedro Alves <palves@redhat.com>
2453 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
2454 * dwarf2read.c: Include "filename-seen-cache.h".
2455 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
2456 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
2457 * filename-seen-cache.c: New file.
2458 * filename-seen-cache.h: New file.
2459 * symtab.c: Include "filename-seen-cache.h".
2460 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
2461 (create_filename_seen_cache, clear_filename_seen_cache)
2462 (delete_filename_seen_cache, filename_seen): Delete, parts moved
2463 to filename-seen-cache.h/filename-seen-cache.c.
2464 (output_source_filename, sources_info)
2465 (maybe_add_partial_symtab_filename)
2466 (make_source_files_completion_list): Adjust to use
2467 filename_seen_cache.
2469 2017-07-17 Pedro Alves <palves@redhat.com>
2471 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
2473 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
2474 dwarf2_debug_sections*)): New.
2475 (dwarf2_per_objfile::dwarf2_per_objfile(const
2476 dwarf2_per_objfile&)): Declare as deleted.
2477 (dwarf2_per_objfile::operator=): Declare as deleted.
2478 (dwarf2_per_objfile::dwarf2_per_objfile)
2479 (dwarf2_per_objfile::~dwarf2_per_objfile)
2480 (dwarf2_per_objfile::free_cached_comp_units): New.
2481 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
2482 ctor. Call dwarf2_per_objfile's ctor manually.
2483 (dwarf2_locate_sections): Deleted/refactored as ...
2484 (dwarf2_per_objfile::locate_sections): ... this new method.
2485 (free_cached_comp_units): Defer to
2486 dwarf2_per_objfile::free_cached_comp_units.
2487 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
2489 2017-07-14 Tom Tromey <tom@tromey.com>
2492 * rust-exp.y (convert_ast_to_expression): Add "want_type"
2494 <UNOP_SIZEOF>: Split into separate case.
2495 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
2497 2017-07-14 Tom Tromey <tom@tromey.com>
2500 * symtab.c (symbol_matches_domain): Add language_rust to special
2502 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
2503 treat LOC_TYPEDEF symbols as variables.
2505 2017-07-14 Pedro Alves <palves@redhat.com>
2507 * symtab.c (make_file_symbol_completion_list_1): Iterate over
2508 symtabs matching all symtabs with SRCFILE as file name instead of
2509 only considering the first hit, with lookup_symtab.
2511 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2513 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
2514 operator_name parameters.
2515 (gen_expr): Update function call.
2517 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2519 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
2521 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
2523 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
2524 parameter, use agent_expr::gdbarch instead, update function
2526 (locexpr_tracepoint_var_ref): Likewise.
2527 (loclist_tracepoint_var_ref): Likewise.
2528 * ax-gdb.c (gen_trace_static_fields): Likewise.
2529 (gen_traced_pop): Likewise.
2530 (gen_frame_args_address): Likewise.
2531 (gen_frame_locals_address): Likewise.
2532 (gen_var_ref): Likewise.
2533 (gen_struct_ref_recursive): Likewise.
2534 (gen_static_field): Likewise.
2535 (gen_maybe_namespace_elt): Likewise.
2536 (gen_expr): Likewise.
2537 (gen_trace_for_var): Likewise.
2538 (gen_trace_for_expr): Likewise.
2539 (gen_trace_for_return_address): Likewise.
2541 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2543 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
2545 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
2547 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2549 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
2550 from ax, update calls.
2551 (gen_usual_arithmetic): Likewise.
2552 (gen_integral_promotions): Likewise.
2553 (gen_bitfield_ref): Likewise.
2554 (gen_primitive_field): Likewise.
2555 (gen_struct_ref_recursive): Likewise.
2556 (gen_struct_ref): Likewise.
2557 (gen_maybe_namespace_elt): Likewise.
2558 (gen_struct_elt_for_reference): Likewise.
2559 (gen_namespace_elt): Likewise.
2560 (gen_aggregate_elt_ref): Likewise.
2561 (gen_expr): Get gdbarch from ax, update calls.
2562 (gen_expr_binop_rest): Likewise.
2564 2017-07-13 Pedro Alves <palves@redhat.com>
2566 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
2568 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
2569 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
2570 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
2571 tdesc_amd64_linux as default tdesc. Get final tdesc from the
2573 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
2574 Get final tdesc from the tdep.
2575 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
2577 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2578 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2579 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
2580 Use it as default tdesc.
2581 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
2582 down to amd_init_abi. No longer handle fallback tdesc here.
2583 * amd64-tdep.h (tdesc_x32): Declare.
2584 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
2586 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
2589 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2591 * s390-linux-tdep.c (s390_process_record): Add support for
2592 instructions new in arch12.
2594 2017-07-11 John Baldwin <jhb@FreeBSD.org>
2596 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
2597 PT_GETFSBASE and PT_GETGSBASE.
2598 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
2601 2017-07-11 John Baldwin <jhb@FreeBSD.org>
2603 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
2604 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
2605 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
2607 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
2608 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
2609 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
2610 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
2611 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
2612 * features/i386/amd64.xml: Add 64bit-segments.xml.
2613 * features/i386/amd64-avx-avx512.c: Regenerated.
2614 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
2615 * features/i386/amd64-avx-mpx.c: Regenerated.
2616 * features/i386/amd64-avx.c: Regenerated.
2617 * features/i386/amd64-mpx.c: Regenerated.
2618 * features/i386/amd64.c: Regenerated.
2619 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
2620 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2621 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
2622 * regformats/i386/amd64-avx.dat: Regenerated.
2623 * regformats/i386/amd64-mpx.dat: Regenerated.
2624 * regformats/i386/amd64.dat: Regenerated.
2626 2017-07-10 Yao Qi <yao.qi@linaro.org>
2628 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
2629 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
2631 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
2633 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
2635 * gnulib/aclocal.m4: Regenerate.
2636 * gnulib/config.in: Regenerate.
2637 * gnulib/configure: Regenerate.
2638 * gnulib/import/Makefile.am: Regenerate.
2639 * gnulib/import/Makefile.in: Regenerate.
2640 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2641 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2642 * gnulib/import/m4/environ.m4: New file.
2643 * gnulib/import/m4/setenv.m4: New file.
2644 * gnulib/import/setenv.c: New file.
2645 * gnulib/import/unsetenv.c: New file.
2647 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
2649 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
2650 address when op is DW_OP_addr.
2652 2017-07-09 Tom Tromey <tom@tromey.com>
2654 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
2655 check and apply to outer type.
2657 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2659 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
2660 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
2661 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
2662 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
2664 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2666 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
2668 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2670 * corelow.c (get_core_siginfo): Remove.
2671 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
2672 instead of get_core_siginfo.
2673 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
2674 * gdbarch.h: Re-generate.
2675 * gdbarch.c: Re-generate.
2676 * linux-tdep.c (linux_core_xfer_siginfo): New.
2677 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
2679 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2681 * corelow.c (thread_section_name): Move to ...
2682 * gdbcore.h (thread_section_name): ... here.
2684 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2686 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
2687 (struct siginfo32): New.
2688 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
2689 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
2690 via ptrace(PT_LWPINFO).
2692 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2694 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
2695 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
2696 (fbsd_get_siginfo_type): New.
2697 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
2698 (_initialize_fbsd_tdep): New.
2700 2017-07-06 David Blaikie <dblaikie@gmail.com>
2702 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
2703 a singular dwo_unit*) to support multiple CUs in the same way that
2704 multiple TUs are supported.
2705 (create_cus_hash_table): Replace create_dwo_cu with a function for
2706 parsing multiple CUs from a DWO file.
2707 (open_and_init_dwo_file): Use create_cus_hash_table rather than
2709 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
2710 htab_find, rather than comparing the signature to a singleton CU in
2713 2017-07-06 Pedro Alves <palves@redhat.com>
2715 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
2717 2017-07-04 Pedro Alves <palves@redhat.com>
2719 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
2720 * gdbtypes.h (TYPE_STATIC): Delete.
2721 (struct fn_field) <is_public, is_abstract, is_static, is_final,
2722 is_synchronized, is_native>: Delete.
2724 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
2725 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
2726 (TYPE_FN_FIELD_ABSTRACT): Delete.
2728 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
2730 * buffer.h (buffer_finish): Fix spelling mistakes.
2732 2017-07-01 Eli Zaretskii <eliz@gnu.org>
2734 * .dir-locals.el: Automatically switch to C-style comments in
2735 versions of Emacs that support the feature.
2737 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
2738 Pedro Alves <palves@redhat.com>
2741 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
2742 (process_next_line): New variable 'inline_cmd'.
2743 Adjust 'if' clauses for "python", "compile" and "guile" to use
2744 'command_name_equals' and check for '!inline_cmd'.
2746 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
2749 * cli/cli-script.c (command_name_equals_not_inline): New function.
2750 (process_next_line): Adjust 'if' clauses for "python", "compile"
2751 and "guile" to use command_name_equals_not_inline.
2753 2017-06-29 Pedro Alves <palves@redhat.com>
2755 * completer.c (expression_completer): Call
2756 linespec_location_completer instead of location_completer.
2758 2017-06-29 Pedro Alves <palves@redhat.com>
2760 * completer.c (expression_completer): Remove code that recomputes
2763 2017-06-29 Yao Qi <yao.qi@linaro.org>
2765 * regformats/regdat.sh: Generate code with
2766 "ifndef IN_PROCESS_AGENT".
2768 2017-06-28 Pedro Alves <palves@redhat.com>
2770 * command.h: Include "common/scoped_restore.h".
2772 2017-06-28 Yao Qi <yao.qi@linaro.org>
2774 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
2775 instead of obstack_grow.
2777 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
2780 * symfile.c (reread_symbols): Call objfiles_changed just before
2783 2017-06-27 Pedro Alves <palves@redhat.com>
2785 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
2786 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
2787 (completion_list_add_symbol, completion_list_add_msymbol):
2788 ... these new functions.
2789 (add_symtab_completions)
2790 (default_make_symbol_completion_list_break_on_1): Adjust.
2792 2017-06-27 Pedro Alves <palves@redhat.com>
2794 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
2795 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
2796 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
2798 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
2799 'storage_obstack' field an auto_obstack. In-class initialize all
2800 non-bitfield fields. Make minsyms_read bool.
2801 * symfile.c (read_symbols): Adjust.
2803 2017-06-27 Alan Hayward <alan.hayward@arm.com>
2805 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
2806 (gdbsim_store_register): Likewise.
2808 2017-06-27 Pedro Alves <palves@redhat.com>
2810 * c-exp.y (name_obstack): Now an auto_obstack.
2811 (yylex): Use auto_obstack::clear.
2812 (c_parse): Use auto_obstack::clear instead of reinitializing and
2813 freeing the obstack.
2814 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
2815 * d-exp.y (name_obstack): Now an auto_obstack.
2816 (yylex): Use auto_obstack::clear.
2817 (d_parse): Use auto_obstack::clear instead of reinitializing and
2818 freeing the obstack.
2819 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
2821 * dwarf2read.c (create_addrmap_from_index)
2822 (dwarf2_build_psymtabs_hard)
2823 (update_enumeration_type_from_children): Likewise.
2824 * gdb_obstack.h (auto_obstack): New type.
2825 * go-exp.y (name_obstack): Now an auto_obstack.
2826 (build_packaged_name): Use auto_obstack::clear.
2827 (go_parse): Use auto_obstack::clear instead of reinitializing and
2828 freeing the obstack.
2829 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
2831 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
2832 * rust-exp.y (work_obstack): Now an auto_obstack.
2833 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
2834 reinitializing and freeing the obstack.
2835 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
2836 (host_char_to_target): Use auto_obstack.
2837 * utils.h (make_cleanup_obstack_free): Delete declaration.
2838 * valprint.c (generic_emit_char, generic_printstr): Use
2841 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
2843 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
2845 (darwin_init_thread_list): Don't update dummy thread.
2846 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
2848 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
2850 * record-full.c (netorder16): Remove.
2852 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
2854 * common/diagnostics.h: Define macros for GCC.
2855 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
2856 * common/vec.h: Include diagnostics.h.
2857 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
2858 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
2861 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
2863 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
2865 * ada-lex.l: Ignore deprecated register warnings.
2867 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
2869 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
2870 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
2872 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
2874 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
2877 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
2879 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
2881 2017-06-23 Alan Hayward <alan.hayward@arm.com>
2883 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
2884 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
2885 (xtensa_register_read_masked): Likewise.
2887 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
2889 * common/environ.c (gdb_environ::unset): Update comment.
2891 2017-06-22 Alan Hayward <alan.hayward@arm.com>
2893 * python/py-unwind.c (pyuw_sniffer): Allocate space for
2896 2017-06-22 Alan Hayward <alan.hayward@arm.com>
2898 * record-full.c (record_full_exec_insn): Use byte_vector.
2900 2017-06-22 Yao Qi <yao.qi@linaro.org>
2902 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
2903 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2905 2017-06-22 Alan Hayward <alan.hayward@arm.com>
2907 * remote.c (cached_reg): Move from here...
2908 * regcache.h (cached_reg): ...to here.
2909 * python/py-unwind.c (struct reg_info): Remove.
2910 (cached_frame_info): Use cached_reg_t.
2911 (pyuw_prev_register): Likewise.
2912 (pyuw_sniffer): Use cached_reg_t and allocate registers.
2913 (pyuw_dealloc_cache): Free all registers.
2915 2017-06-22 Pedro Alves <palves@redhat.com>
2916 Simon Marchi <simon.marchi@ericsson.com>
2918 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
2920 * common/diagnostics.h: New file.
2922 2017-06-22 Pedro Alves <palves@redhat.com>
2924 * common/agent.h: Add include guards.
2926 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
2928 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
2929 talk about addressable units instead of bytes.
2931 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2933 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
2934 of '::const_iterator'.
2936 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2938 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2939 'unittests/environ-selftests.c'.
2940 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
2941 * charset.c (find_charset_names): Declare object 'iconv_env'.
2942 Update code to use 'iconv_env' object. Remove call to
2944 * common/environ.c: Include <utility>.
2945 (make_environ): Delete function.
2946 (free_environ): Delete function.
2947 (gdb_environ::clear): New function.
2948 (gdb_environ::operator=): New function.
2949 (gdb_environ::get): Likewise.
2950 (environ_vector): Delete function.
2951 (set_in_environ): Delete function.
2952 (gdb_environ::set): New function.
2953 (unset_in_environ): Delete function.
2954 (gdb_environ::unset): New function.
2955 (gdb_environ::envp): Likewise.
2956 * common/environ.h: Include <vector>.
2957 (struct gdb_environ): Delete; transform into...
2958 (class gdb_environ): ... this class.
2959 (free_environ): Delete prototype.
2960 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
2961 environ_vector): Likewise.
2962 * infcmd.c (run_command_1): Update code to call
2963 'envp' from 'gdb_environ' class.
2964 (environment_info): Update code to call methods from 'gdb_environ'
2966 (unset_environment_command): Likewise.
2967 (path_info): Likewise.
2968 (path_command): Likewise.
2969 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
2970 (inferior::inferior): Initialize 'environment' using the host's
2972 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
2973 Include "environ.h".
2974 (class inferior) <environment>: Change type from 'struct
2975 gdb_environ' to 'gdb_environ'.
2976 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
2977 methods from 'gdb_environ' class.
2978 * solib.c (solib_find_1): Likewise
2979 * unittests/environ-selftests.c: New file.
2981 2017-06-20 Yao Qi <yao.qi@linaro.org>
2983 * features/i386/i386-linux.xml: Exchange the order of including
2984 32bit-linux.xml and 32bit-sse.xml.
2985 * features/i386/i386-linux.c: Regenerated.
2987 2017-06-20 Yao Qi <yao.qi@linaro.org>
2989 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
2990 Delete copy ctor and assignment operator.
2991 (tdesc_type): Likewise.
2992 (tdesc_feature): Likewise.
2993 (tdesc_free_reg): Remove.
2994 (tdesc_create_reg): Use new.
2995 (tdesc_free_type): Remove.
2996 (tdesc_create_vector): Use new.
2997 (tdesc_create_union): Likewise.
2998 (tdesc_create_flags): Likewise.
2999 (tdesc_create_enum): Likewise.
3000 (tdesc_free_feature): Delete.
3001 (free_target_description): Use delete.
3003 2017-06-19 John Baldwin <jhb@FreeBSD.org>
3005 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
3008 2017-06-19 Pedro Alves <palves@redhat.com>
3010 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
3011 after gdb::unlinker.
3013 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
3015 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
3016 gdb_environ to access an environment variable.
3018 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3020 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
3023 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3025 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
3027 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3029 * configure: Re-generate.
3030 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
3032 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3034 * configure: Re-generate.
3035 * warning.m4: Pass -Werror to compiler when checking for
3036 supported warning flags.
3038 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3040 * Makefile.in (COMPILE.pre): Add "-x c++".
3042 2017-06-16 Alan Hayward <alan.hayward@arm.com>
3043 Pedro Alves <palves@redhat.com>
3044 Yao Qi <yao.qi@linaro.org>
3046 * defs.h (RequireLongest): New.
3047 (extract_integer): Declare function template.
3048 (extract_signed_integer): Remove the declaration, but define it
3050 (extract_unsigned_integer): Likewise.
3051 (store_integer): Declare function template.
3052 (store_signed_integer): Remove the declaration, but define it
3054 (store_unsigned_integer): Likewise.
3055 * findvar.c (extract_integer): New function template.
3056 (extract_signed_integer): Remove.
3057 (extract_unsigned_integer): Remove.
3058 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
3060 (store_integer): New function template.
3061 (store_signed_integer): Remove.
3062 (store_unsigned_integer): Remove.
3063 (store_integer): Explicit instantiations.
3064 * regcache.c (regcache_raw_read_signed): Update.
3065 (regcache::raw_read): New function.
3066 (regcache::raw_read_signed): Remove.
3067 (regcache::raw_read_unsigned): Remove.
3068 (regcache_raw_read_unsigned): Update.
3069 (regcache_raw_write_unsigned): Update.
3070 (regcache::raw_write_signed): Remove.
3071 (regcache::raw_write): New function.
3072 (regcache_cooked_read_signed): Update.
3073 (regcache::raw_write_unsigned): Remove.
3074 (regcache::cooked_read_signed): Remove.
3075 (regcache_cooked_read_unsigned): Update.
3076 (regcache::cooked_read_unsigned): Remove.
3077 (regcache_cooked_write_signed): Update.
3078 (regcache_cooked_write_unsigned): Update.
3079 * regcache.h (regcache) <raw_read_signed>: Remove.
3080 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
3081 <raw_read, raw_write>: New.
3082 <cooked_read_signed, cooked_write_signed>: Remove.
3083 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
3084 <cooked_read, cooked_write>: New.
3085 * sh64-tdep.c (sh64_pseudo_register_read): Update.
3086 (sh64_pseudo_register_write): Update.
3088 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
3090 * arc-tdep.c (arc_disassembler_options): New variable.
3091 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
3092 of default_print_insn.
3093 (arc_delayed_print_insn): Set info->section when needed,
3094 use default_print_insn to retrieve a disassembler.
3096 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
3099 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
3100 to mention $SHELL and startup-with-shell.
3102 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3104 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
3106 2017-06-14 Yao Qi <yao.qi@linaro.org>
3108 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
3109 default_print_insn instead of print_insn_aarch64.
3110 * arm-tdep.c (gdb_print_insn_arm): Call
3111 default_print_insn instead of print_insn_big_arm
3112 and print_insn_little_arm.
3113 * i386-tdep.c (i386_print_insn): Call default_print_insn
3114 instead of print_insn_i386.
3115 * ia64-tdep.c (ia64_print_insn): Call
3116 default_print_insn instead of print_insn_ia64.
3117 * mips-tdep.c (gdb_print_insn_mips): Call
3118 default_print_insn instead of print_insn_big_mips
3119 and print_insn_little_mips.
3120 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
3121 instead of print_insn_spu.
3123 2017-06-14 Pedro Alves <palves@redhat.com>
3125 * ada-lang.c: Include "common/byte-vector.h".
3126 (ada_value_primitive_packed_val): Use gdb::byte_vector.
3127 * charset.c (wchar_iterator::iterate): Resize the vector instead
3129 * common/byte-vector.h: Include "common/def-vector.h".
3130 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
3131 * cli/cli-dump.c: Include "common/byte-vector.h".
3132 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
3133 * common/byte-vector.h: New file.
3134 * common/def-vector.h: New file.
3135 * common/default-init-alloc.h: New file.
3136 * dwarf2loc.c: Include "common/byte-vector.h".
3137 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
3138 instead of reserving it.
3139 * dwarf2read.c: Include "common/byte-vector.h".
3140 (data_buf::m_vec): Now a gdb::byte_vector.
3141 * gdb_regex.c: Include "common/def-vector.h".
3142 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
3143 * mi/mi-main.c: Include "common/byte-vector.h".
3144 (mi_cmd_data_read_memory): Use gdb::byte_vector.
3145 * printcmd.c: Include "common/byte-vector.h".
3146 (print_scalar_formatted): Use gdb::byte_vector.
3147 * valprint.c: Include "common/byte-vector.h".
3148 (maybe_negate_by_bytes, print_decimal_chars): Use
3151 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
3153 * darwin-nat.c: Include "nat/fork-inferior.h".
3155 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
3157 * configure.nat: Factor out Darwin bits that are not
3158 architecture-specific. Add fork-inferior.o.
3160 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
3162 * configure.nat: Factor out AIX bits that are not
3163 architecture-specific. Add fork-inferior.o.
3165 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3167 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
3168 (read_pieced_value, write_pieced_value): ...here. Reduce to
3169 wrappers that just call rw_pieced_value.
3171 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3173 * dwarf2loc.c (write_pieced_value): When writing the data for a
3174 memory piece, use write_memory_with_notification instead of
3177 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3179 * valops.c (read_value_memory): Change embedded_offset to
3180 represent a bit offset instead of a byte offset.
3181 * value.h (read_value_memory): Adjust comment.
3183 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3185 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
3186 dest_offset_bits and source_offset_bits.
3187 (write_pieced_value): Likewise.
3189 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3191 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
3192 given by DW_OP_bit_piece.
3193 (write_pieced_value): Likewise.
3195 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3197 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
3198 some other preparations to the places where sufficient information
3200 (write_pieced_value): Likewise.
3202 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3204 * dwarf2loc.c (bits_to_bytes): New function.
3205 (read_pieced_value): Fix offset calculations for register pieces
3206 on big-endian targets.
3207 (write_pieced_value): Likewise.
3209 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3211 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
3212 (write_pieced_value): Likewise.
3214 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3216 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
3217 transfer the source value's least significant bits, instead of its
3218 lowest-addressed ones. Rename type_len to max_offset.
3219 (read_pieced_value): Mirror above changes to write_pieced_value as
3222 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3224 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
3225 truncate full bytes from dest_offset_bits before using it as an
3226 offset into the buffer.
3228 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3230 * dwarf2loc.c (write_pieced_value): Include transfer size in
3233 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3235 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
3236 calculation of this_size.
3238 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3240 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
3241 when targeting a bit-field.
3242 (write_pieced_value): Likewise.
3244 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3246 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
3247 (allocate_piece_closure): Drop addr_size parameter.
3248 (dwarf2_evaluate_loc_desc_full): Adjust call to
3249 allocate_piece_closure.
3251 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3254 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
3255 the LSB end, independent of endianness.
3257 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3259 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
3262 2017-06-13 Yao Qi <yao.qi@linaro.org>
3264 * mips-linux-nat.c: Move include features/mips*-linux.c to
3266 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
3267 to mips-linux-tdep.c.
3268 * mips-linux-tdep.c: Include features/mips*-linux.c
3269 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
3271 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
3272 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
3273 (tdesc_mips64_dsp_linux): Declare.
3275 2017-06-12 Tom Tromey <tom@tromey.com>
3277 * valprint.h (val_print_type_code_int): Remove.
3278 * valprint.c (generic_val_print_int): Always call
3279 val_print_scalar_formatted.
3280 (val_print_type_code_int): Remove.
3281 * printcmd.c (print_scalar_formatted): Handle options->format==0.
3282 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
3283 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
3284 * ada-valprint.c (ada_val_print_num): Use
3285 val_print_scalar_formatted.
3287 2017-06-12 Tom Tromey <tom@tromey.com>
3289 * printcmd.c (print_scalar_formatted): Unify the two switches.
3290 Don't convert scalars to LONGEST.
3292 2017-06-12 Tom Tromey <tom@tromey.com>
3295 * valprint.h (print_decimal_chars): Update.
3296 * valprint.c (maybe_negate_by_bytes): New function.
3297 (print_decimal_chars): Add "is_signed" argument.
3298 * printcmd.c (print_scalar_formatted): Update.
3300 2017-06-12 Tom Tromey <tom@tromey.com>
3303 * valprint.h (print_binary_chars, print_hex_chars): Update.
3304 * valprint.c (val_print_type_code_int): Update.
3305 (print_binary_chars): Add "zero_pad" argument.
3306 (emit_octal_digit): New function.
3307 (print_octal_chars): Don't zero-pad.
3308 (print_decimal_chars): Likewise.
3309 (print_hex_chars): Add "zero_pad" argument.
3310 * sh64-tdep.c (sh64_do_fp_register): Update.
3311 * regcache.c (regcache::dump): Update.
3312 * printcmd.c (print_scalar_formatted): Update.
3313 * infcmd.c (default_print_one_register_info): Update.
3315 2017-06-12 Pedro Alves <palves@redhat.com>
3316 Alan Hayward <alan.hayward@arm.com>
3318 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
3319 (mips_eabi_push_dummy_call): Rename local 'regsize' to
3320 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
3321 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
3322 Assert that abi_regsize bytes fit in 'ref_valbuf'.
3324 2017-06-12 Pedro Alves <palves@redhat.com>
3326 * dwarf2read.c (mapped_symtab::data): Now a vector of
3327 symtab_index_entry instead of vector of
3328 std::unique_ptr<symtab_index_entry>. All users adjusted to check
3329 whether an element's name is NULL instead of checking whether the
3330 element itself is NULL.
3331 (find_slot): Change return type. Adjust.
3332 (hash_expand, , add_index_entry, uniquify_cu_indices)
3333 (write_hash_table): Adjust.
3335 2017-06-12 Pedro Alves <palves@redhat.com>
3337 * dwarf2read.c (recursively_count_psymbols): New function.
3338 (write_psymtabs_to_index): Call it to compute number of psyms and
3339 pass estimate size of psyms_seen to unordered_set's ctor.
3341 2017-06-12 Pedro Alves <palves@redhat.com>
3343 * dwarf2read.c (write_hash_table): Check if key already exists
3346 2017-06-12 Pedro Alves <palves@redhat.com>
3348 * dwarf2read.c (data_buf::append_space): Rename to...
3349 (data_buf::grow): ... this, and make private. Adjust all callers.
3350 (data_buf::append_uint): New method.
3351 (add_address_entry, write_one_signatured_type)
3352 (write_psymtabs_to_index): Use it.
3354 2017-06-12 Pedro Alves <palves@redhat.com>
3356 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
3357 (file_write (FILE *, const std::vector<Elem>&)): Delete.
3358 (data_buf::file_write): Call ::fwrite directly.
3360 2017-06-12 Pedro Alves <palves@redhat.com>
3362 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
3365 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
3367 Code cleanup: C++ify .gdb_index producer.
3368 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
3369 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
3370 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
3371 (create_strtab, add_string): Remove.
3372 (file_write, data_buf): New.
3373 (struct symtab_index_entry): Use std::vector for cu_indices.
3374 (struct mapped_symtab): Use std::vector for data.
3375 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
3376 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
3378 (find_slot): Change return type. Update it to the new data structures.
3379 (hash_expand, add_index_entry): Update it to the new data structures.
3380 (offset_type_compare): Remove.
3381 (uniquify_cu_indices): Update it to the new data structures.
3382 (c_str_view, c_str_view_hasher, vector_hasher): New.
3383 (add_indices_to_cpool): Remove.
3384 (write_hash_table): Update it to the new data structures.
3385 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
3386 (eq_psymtab_cu_index): Remove.
3387 (psym_index_map): New typedef.
3388 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
3389 reference and std::unordered_map for cu_index_htab.
3390 (add_address_entry, add_address_entry_worker, write_address_map)
3391 (write_psymbols): Update it to the new data structures.
3392 (write_obstack): Remove.
3393 (struct signatured_type_index_data): Change types_list to a data_buf
3394 reference and psyms_seen to a std::unordered_set reference.
3395 (write_one_signatured_type, recursively_write_psymbols)
3396 (write_psymtabs_to_index): Update it to the new data structures.
3398 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
3400 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
3401 separate-debug-file commands.
3402 * symfile.h (separate_debug_file_debug): New global.
3403 * symfile.c (separate_debug_file_debug): New global.
3404 (separate_debug_file_exists, find_separate_debug_file): Add
3406 (_initialize_symfile): Add "set debug separate-debug-file"
3408 * build-id.c (build_id_to_debug_bfd,
3409 find_separate_debug_file_by_buildid): Add debug output.
3411 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3413 * gdbarch.sh (displaced_step_free_closure): Remove.
3414 * gdbarch.h, gdbarch.c: Re-generate.
3415 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
3416 displaced_step_free_closure.
3417 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
3418 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
3419 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3420 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
3421 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3422 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
3423 * arch-utils.h (simple_displaced_step_free_closure): Remove.
3424 * arch-utils.c (simple_displaced_step_free_closure): Remove.
3425 * infrun.c (displaced_step_clear): Call xfree instead of
3426 gdbarch_displaced_step_free_closure.
3428 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
3430 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
3433 2017-06-08 Alan Hayward <alan.hayward@arm.com>
3435 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
3436 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
3437 (mn10300_push_dummy_call): Likewise.
3439 2017-06-08 Alan Hayward <alan.hayward@arm.com>
3441 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
3443 2017-06-08 Alan Hayward <alan.hayward@arm.com>
3445 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
3447 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3449 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
3450 able to start inferiors using a shell.
3451 (New remote packets): Announce new packet "QStartupWithShell".
3452 * remote.c: Add PACKET_QStartupWithShell.
3453 (extended_remote_create_inferior): Handle new
3454 PACKET_QStartupWithShell.
3455 (remote_protocol_features) <QStartupWithShell>: New entry for
3456 PACKET_QStartupWithShell.
3457 (_initialize_remote): Call "add_packet_config_cmd" for
3460 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3461 Pedro Alves <palves@redhat.com>
3463 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
3464 and "nat/fork-inferior.h".
3465 * common/common-inferior.h: New file, with contents from
3467 * commom/common-utils.c: Include "common-utils.h".
3468 (stringify_argv): New function.
3469 * common/common-utils.h (stringify_argv): New prototype.
3470 * configure.nat: Add "fork-inferior.o" as a dependency for
3471 "*linux*", "fbsd*" and "nbsd*" hosts.
3472 * corefile.c (get_exec_file): Update comment.
3473 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
3474 instead of "startup_inferior".
3475 (darwin_create_inferior): Call "add_thread_silent" after
3477 * fork-child.c: Cleanup unnecessary includes.
3478 (SHELL_FILE): Move to "common/common-fork-child.c".
3479 (environ): Likewise.
3480 (exec_wrapper): Initialize.
3481 (get_exec_wrapper): New function.
3482 (breakup_args): Move to "common/common-fork-child.c"; rename to
3483 "breakup_args_for_exec".
3484 (escape_bang_in_quoted_argument): Move to
3485 "common/common-fork-child.c".
3486 (saved_ui): New variable.
3487 (prefork_hook): New function.
3488 (postfork_hook): Likewise.
3489 (postfork_child_hook): Likewise.
3490 (gdb_startup_inferior): Likewise.
3491 (fork_inferior): Move to "common/common-fork-child.c". Update
3492 function to support gdbserver.
3493 (startup_inferior): Likewise.
3494 * gdbcore.h (get_exec_file): Remove declaration.
3495 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
3496 instead of "startup_inferior". Call "add_thread_silent" after
3498 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
3499 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
3500 instead of "startup_inferior". Call "add_thread_silent" after
3502 * inferior.h: Include "common-inferior.h".
3503 (trace_start_error): Move to "common/common-utils.h".
3504 (trace_start_error_with_name): Likewise.
3505 (fork_inferior): Move prototype to "nat/fork-inferior.h".
3506 (startup_inferior): Likewise.
3507 (gdb_startup_inferior): New prototype.
3508 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
3509 * nat/fork-inferior.h: New file.
3510 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
3511 instead of "startup_inferior". Call "add_thread_silent" after
3513 * target.h (target_terminal_init): Move prototype to
3515 (target_terminal_inferior): Likewise.
3516 (target_terminal_ours): Likewise.
3517 * target/target.h (target_terminal_init): New prototype, moved
3519 (target_terminal_inferior): Likewise.
3520 (target_terminal_ours): Likewise.
3521 * utils.c (gdb_flush_out_err): New function.
3523 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3525 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
3526 * common/common-gdbthread.h: New file, with parts from
3528 * gdbthread.h: Include "common-gdbthread.h".
3529 (switch_to_thread): Moved to "common/common-gdbthread.h".
3531 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3533 * Makefile.in (SFILES): Add "common/job-control.c".
3534 (HFILES_NO_SRCDIR): Add "common/job-control.h".
3535 (COMMON_OBS): Add "job-control.o".
3536 * common/job-control.c: New file, with contents from
3538 * common/job-control.h: New file, with contents from "terminal.h".
3539 * fork-child.c: Include "job-control.h".
3540 * inflow.c: Include "job-control.h".
3541 (gdb_setpgid): Move to "common/common-inflow.c".
3542 (_initialize_inflow): Move setting of "job_control" to
3543 "handle_job_control".
3544 * terminal.h (job_control): Moved to "common/common-terminal.h".
3545 (gdb_setpgid): Likewise.
3546 * top.c: Include "job_control.h".
3547 * utils.c: Likewise.
3548 (job_control): Moved to "job-control.c".
3550 2017-06-07 Pedro Alves <palves@redhat.com>
3552 * Makefile.in (SFILES): Add gdb_regex.c.
3553 (COMMON_OBS): Add gdb_regex.o.
3554 * ada-lang.c (ada_add_standard_exceptions)
3555 (ada_add_exceptions_from_frame, name_matches_regex)
3556 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
3557 parameter type to compiled_regex. Adjust.
3558 (ada_exceptions_list): Use compiled_regex.
3559 * break-catch-throw.c (exception_catchpoint::pattern): Now a
3560 std::unique_ptr<compiled_regex>.
3561 (exception_catchpoint::~exception_catchpoint): Remove regfree
3563 (check_status_exception_catchpoint): Adjust to use compiled_regex.
3564 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
3565 * breakpoint.c (solib_catchpoint::compiled): Now a
3566 std::unique_ptr<compiled_regex>.
3567 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
3568 (check_status_catch_solib): Adjust to use compiled_regex.
3569 (add_solib_catchpoint): Adjust to use compiled_regex.
3570 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
3571 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
3572 compiled_regex reference. Adjust to use it.
3573 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
3574 declaration. Include "gdb_regex.h".
3575 (apropos_cmd): Change regex parameter to compiled_regex reference.
3576 * gdb_regex.c: New file.
3577 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
3579 (class compiled_regex): New.
3580 * linux-tdep.c: Include "common/gdb_optional.h".
3581 (struct mapping_regexes): New, factored out from
3582 mapping_is_anonymous_p, and adjusted to use compiled_regex.
3583 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
3584 gdb::optional and remove cleanups. Adjust to compiled_regex.
3585 * probe.c: Include "common/gdb_optional.h".
3586 (collect_probes): Use compiled_regex and gdb::optional and remove
3588 * skip.c: Include "common/gdb_optional.h".
3589 (skiplist_entry::compiled_function_regexp): Now a
3590 gdb::optional<compiled_regex>.
3591 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
3592 (free_skiplist_entry): Remove regfree call.
3593 (compile_skip_regexp, skip_rfunction_p): Adjust to use
3594 compiled_regex and gdb::optional.
3595 * symtab.c: Include "common/gdb_optional.h".
3596 (search_symbols): Use compiled_regex and gdb::optional.
3597 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
3598 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
3601 2017-06-07 Alan Hayward <alan.hayward@arm.com>
3603 * regcache.c (regcache::save): Avoid buffer use.
3604 (regcache::dump): Likewise.
3606 2017-06-07 Alan Hayward <alan.hayward@arm.com>
3608 * sh-tdep.c (sh_pseudo_register_read): Remove
3610 (sh_pseudo_register_write): Likewise.
3611 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
3612 (sh64_pseudo_register_write): Likewise
3614 2017-06-07 Alan Hayward <alan.hayward@arm.com>
3616 * aarch64-tdep.c (aarch64_store_return_value): Use
3618 (aarch64_pseudo_read_value): Likewise.
3619 (aarch64_pseudo_write): Likewise.
3621 2017-06-06 Yao Qi <yao.qi@linaro.org>
3623 * regformats/regdef.h (set_register_cache): Remove the
3626 2017-06-06 Alan Hayward <alan.hayward@arm.com>
3628 * frame.c (frame_unwind_register_signed): Use
3629 frame_unwind_register_value.
3631 2017-06-06 Pedro Alves <palves@redhat.com>
3633 PR breakpoints/21553
3634 * breakpoint.c (create_breakpoints_sal_default)
3635 (init_breakpoint_sal, create_breakpoint_sal): Use
3636 gdb::unique_xmalloc_ptr for string parameters.
3637 (create_breakpoint): Constify 'extra_string' and 'cond_string'
3638 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
3639 (base_breakpoint_create_breakpoints_sal)
3640 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
3641 (strace_marker_create_breakpoints_sal)
3642 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
3644 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
3645 gdb::unique_xmalloc_ptr for string parameters.
3646 (create_breakpoint): Constify 'extra_string' and 'cond_string'
3649 2017-06-06 Alan Hayward <alan.hayward@arm.com>
3651 * alpha-tdep.c (alpha_register_to_value): Use
3652 get_frame_register_value.
3653 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
3655 2017-06-06 Alan Hayward <alan.hayward@arm.com>
3657 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
3658 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
3659 (ia64_value_to_register): Likewise.
3660 (ia64_extract_return_value): Likewise.
3661 (ia64_store_return_value): Likewise.
3662 (ia64_push_dummy_call): Likewise.
3664 2017-06-04 Joel Brobecker <brobecker@adacore.com>
3668 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
3670 * x86-linux-nat.c (struct arch_lwp_info): Remove.
3672 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
3674 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
3676 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
3678 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
3680 * event-loop.c (poll_timers): Unallocate timer using delete
3683 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3685 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
3686 (struct breakpoint) <~breakpoint>: New.
3687 (struct watchpoint): Inherit from breakpoint.
3690 (struct tracepoint): Inherit from breakpoint.
3692 * breakpoint.c (longjmp_breakpoint_ops): Remove.
3693 (struct longjmp_breakpoint): Inherit from breakpoint.
3694 <~longjmp_breakpoint>: New.
3696 (new_breakpoint_from_type): Remove casts.
3697 (watchpoint_in_thread_scope): Remove reference to base field.
3698 (watchpoint_del_at_next_stop): Likewise.
3699 (update_watchpoint): Likewise.
3700 (watchpoint_check): Likewise.
3701 (bpstat_check_watchpoint): Likewise.
3702 (set_longjmp_breakpoint): Likewise.
3703 (struct fork_catchpoint): Inherit from breakpoint.
3705 (struct solib_catchpoint): Inherit from breakpoint.
3706 <~solib_catchpoint>: New.
3708 (dtor_catch_solib): Change to ...
3709 (solib_catchpoint::~solib_catchpoint): ... this.
3710 (breakpoint_hit_catch_solib): Remove reference to base field.
3711 (add_solib_catchpoint): Likewise.
3712 (create_fork_vfork_event_catchpoint): Likewise.
3713 (struct exec_catchpoint): Inherit from breakpoint.
3714 <~exec_catchpoint>: New.
3716 (dtor_catch_exec): Change to ...
3717 (exec_catchpoint::~exec_catchpoint): ... this.
3718 (dtor_watchpoint): Change to ...
3719 (watchpoint::~watchpoint): ... this.
3720 (watch_command_1): Remove reference to base field.
3721 (catch_exec_command_1): Likewise.
3722 (base_breakpoint_dtor): Change to ...
3723 (breakpoint::~breakpoint): ... this.
3724 (base_breakpoint_ops): Remove dtor field value.
3725 (longjmp_bkpt_dtor): Change to ...
3726 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
3727 (strace_marker_create_breakpoints_sal): Remove reference to base
3729 (delete_breakpoint): Don't manually call breakpoint destructor.
3730 (create_tracepoint_from_upload): Remove reference to base field.
3731 (trace_pass_set_count): Likewise.
3732 (initialize_breakpoint_ops): Don't initialize
3733 momentary_breakpoint_ops, don't set dtors.
3734 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
3735 <~ada_catchpoint>: New.
3737 (create_excep_cond_exprs): Remove reference to base field.
3738 (dtor_exception): Change to ...
3739 (ada_catchpoint::~ada_catchpoint): ... this.
3740 (dtor_catch_exception): Remove.
3741 (dtor_catch_exception_unhandled): Remove.
3742 (dtor_catch_assert): Remove.
3743 (create_ada_exception_catchpoint): Remove reference to base
3745 (initialize_ada_catchpoint_ops): Don't set dtors.
3746 * break-catch-sig.c (struct signal_catchpoint): Inherit from
3748 <~signal_catchpoint>: New.
3750 (signal_catchpoint_dtor): Change to ...
3751 (signal_catchpoint::~signal_catchpoint): ... this.
3752 (create_signal_catchpoint): Remove reference to base field.
3753 (initialize_signal_catchpoint_ops): Don't set dtor.
3754 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
3756 <~syscall_catchpoint>: New.
3758 (dtor_catch_syscall): Change to ...
3759 (syscall_catchpoint::~syscall_catchpoint): ... this.
3760 (create_syscall_event_catchpoint): Remove reference to base
3762 (initialize_syscall_catchpoint_ops): Don't set dtor.
3763 * break-catch-throw.c (struct exception_catchpoint): Inherit
3765 <~exception_catchpoint>: New.
3767 (dtor_exception_catchpoint): Change to ...
3768 (exception_catchpoint::~exception_catchpoint): ... this.
3769 (handle_gnu_v3_exceptions): Remove reference to base field.
3770 (initialize_throw_catchpoint_ops): Don't set dtor.
3771 * ctf.c (ctf_get_traceframe_address): Remove reference to base
3773 * remote.c (remote_get_tracepoint_status): Likewise.
3774 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
3775 * tracefile.c (tracefile_fetch_registers): Likewise.
3776 * tracepoint.c (actions_command): Likewise.
3777 (validate_actionline): Likewise.
3778 (tfind_1): Likewise.
3779 (get_traceframe_location): Likewise.
3780 (find_matching_tracepoint_location): Likewise.
3781 (parse_tracepoint_status): Likewise.
3782 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
3784 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3786 * breakpoint.c (struct longjmp_breakpoint): New struct.
3787 (is_tracepoint_type): Change return type to bool.
3788 (is_longjmp_type): New function.
3789 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
3790 (set_raw_breakpoint_without_location): Use
3791 new_breakpoint_from_type.
3792 (set_raw_breakpoint): Likewise.
3794 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3796 * breakpoint.c (new_breakpoint_from_type): New function.
3797 (create_breakpoint_sal): Use new_breakpoint_from_type and
3799 (create_breakpoint): Likewise.
3801 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
3803 * memattr.c (mem_info_command): Rename to ...
3804 (info_mem_command): ... this.
3805 (mem_enable_command): Rename to ...
3806 (enable_mem_command): ... this.
3807 (mem_disable_command): Rename to ...
3808 (disable_mem_command): ... this.
3809 (mem_delete_command): Rename to ...
3810 (delete_mem_command): ... this.
3811 (_initialize_mem): Adjust function names.
3813 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
3815 * btrace.c (handle_pt_insn_events): New.
3816 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
3817 STATUS. Split into this and ...
3818 (handle_pt_insn_event_flags): ... this.
3820 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
3822 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
3823 and struct pt_insn.resynced.
3824 * configure: Regenerated.
3825 * config.in: Regenerated.
3827 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3829 * btrace.c (ftrace_find_call_by_number): New function.
3830 (ftrace_new_function): Store objects, not pointers.
3831 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
3832 ftrace_new_gap, ftrace_update_function,
3833 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
3834 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
3835 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
3836 btrace_ends_with_single_insn, btrace_call_get): Account for
3837 btrace_thread_info::functions now storing objects.
3838 * btrace.h (struct btrace_thread_info): Add constructor.
3839 (struct btrace_thread_info) <functions>: Make std::vector.
3840 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
3841 Initialize with default values.
3842 * record-btrace.c (record_btrace_frame_sniffer): Account for
3843 btrace_thread_info::functions now storing objects.
3845 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3847 * btrace.c: Remove typedef bfun_s.
3848 (ftrace_new_gap): Directly add gaps to the list of gaps.
3849 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
3850 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
3851 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
3854 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3856 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
3857 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
3858 with btrace_thread_info::next_segment and
3859 btrace_thread_info::prev_segment.
3860 * btrace.h: Remove struct btrace_func_link.
3861 (struct btrace_function): Replace pair of function segment pointers
3862 with pair of indices.
3863 * python/py-record-btrace.c (btpy_call_prev_sibling,
3864 btpy_call_next_sibling): Replace references to
3865 btrace_thread_info::segment with btrace_thread_info::next_segment and
3866 btrace_thread_info::prev_segment.
3867 * record-btrace.c (record_btrace_frame_this_id): Use
3868 btrace_find_call_by_number.
3870 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3872 * btrace.c (ftrace_new_function, ftrace_fixup_level,
3873 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
3874 btrace_insn_next, btrace_insn_prev): Remove references to
3875 btrace_thread_info::flow.
3876 * btrace.h (struct btrace_function): Remove FLOW.
3878 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3880 * btrace.c (ftrace_find_call_by_number): New function.
3881 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
3882 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
3883 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
3884 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
3886 * btrace.h (struct btrace_function): Turn UP into an index.
3887 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
3889 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
3890 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
3891 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
3893 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3895 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
3896 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
3897 ftrace_update_function, ftrace_compute_global_level_offset,
3898 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
3899 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
3900 btrace_insn_end, btrace_is_empty): Remove references to
3901 btrace_thread_info::begin and btrace_thread_info::end.
3902 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
3903 (struct btrace_thread_info) <functions>: Adjust comment.
3904 * record-btrace.c (record_btrace_start_replaying): Remove reference to
3905 btrace_thread_info::begin.
3907 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3909 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
3910 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
3911 ftrace_update_function): Remove arguments that implicitly were always
3913 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
3914 Don't pass BTINFO->END.
3916 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3918 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
3919 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
3920 btrace_find_insn_by_number): Replace function segment pointer with
3922 (btrace_insn_cmp): Simplify.
3923 * btrace.h: (struct btrace_insn_iterator) Rename index to
3924 insn_index. Replace function segment pointer with index into function
3926 * record-btrace.c (record_btrace_call_history): Replace function
3927 segment pointer use with index.
3928 (record_btrace_frame_sniffer): Retrieve function call segment through
3930 (record_btrace_set_replay): Remove defunc't safety check.
3932 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3934 * btrace.c (btrace_ends_with_single_insn): New function.
3935 (btrace_call_get, btrace_call_number, btrace_call_begin,
3936 btrace_call_end, btrace_call_next, btrace_call_prev,
3937 btrace_find_call_by_number): Use index into call segment vector
3939 (btrace_call_cmp): Simplify.
3940 * btrace.h (struct btrace_call_iterator): Replace function call segment
3941 pointer with index into vector.
3942 * record-btrace.c (record_btrace_call_history): Use index instead of
3945 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3947 * btrace.c (btrace_insn_begin, btrace_insn_end,
3948 btrace_find_insn_by_number): Add btinfo to iterator.
3949 * btrace.h (struct btrace_insn_iterator): Add btinfo.
3951 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3953 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
3954 and save pointers directly.
3955 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
3956 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
3957 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
3958 changed signature of functions.
3959 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
3960 (btrace_fetch): Remove code that adds btrace_function pointers to
3961 vector of btrace_functions.
3962 (btrace_clear): Simplify freeing vector of btrace_functions.
3964 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3966 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
3967 Replace VEC_* with std::vector functions.
3968 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
3969 (struct btrace_thread_info)<functions>: Change type to std::vector.
3971 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
3973 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
3974 "Removed targets and native configurations" up. Merge duplicate
3975 "New commands" sub-sections. Add "New options" sub-sections.
3977 2017-05-26 Alan Hayward <alan.hayward@arm.com>
3979 * defs.h (copy_integer_to_size): New declaration.
3980 * findvar.c (copy_integer_to_size): New function.
3981 (do_cint_test): New selftest function.
3982 (copy_integer_to_size_test): Likewise.
3983 (_initialize_findvar): Likewise.
3984 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
3985 (mips_fbsd_collect_reg): Use raw_collect_integer.
3986 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
3987 (mips64_fill_gregset): Use raw_collect_integer
3988 (mips64_fill_fpregset): Use raw_supply_integer.
3989 * regcache.c (regcache::raw_supply_integer): New function.
3990 (regcache::raw_collect_integer): Likewise.
3991 * regcache.h: (regcache::raw_supply_integer): New declaration.
3992 (regcache::raw_collect_integer): Likewise.
3994 2017-05-24 Yao Qi <yao.qi@linaro.org>
3996 * Makefile.in (SFILES): Add gdbarch-selftests.c.
3997 (COMMON_OBS): Add gdbarch-selftests.o.
3998 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
3999 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
4000 * gdbarch-selftests.c: New file.
4001 * regcache.h (regcache) <~regcache>: Mark it virtual if
4003 <raw_write>: Likewise.
4005 2017-05-24 Yao Qi <yao.qi@linaro.org>
4007 * regcache.c (current_regcache): Change it to
4008 regcache::current_regcache.
4009 (regcache_observer_target_changed): Update.
4010 (regcache_thread_ptid_changed): Make it a regcache static
4012 (regcache_thread_ptid_changed): Update.
4013 (class regcache_access): New.
4014 (current_regcache_test): Update.
4015 (_initialize_regcache): Update.
4016 * regcache.h: Include forward_list.
4017 (regcache): Declare regcache_thread_ptid_changed and declare
4018 registers_changed_ptid as friend.
4020 2017-05-24 Yao Qi <yao.qi@linaro.org>
4022 * i387-tdep.c (i387_register_to_value): Use register_size
4023 instead of TYPE_LENGTH.
4024 * m68k-tdep.c (m68k_register_to_value): Likewise.
4026 2017-05-24 Yao Qi <yao.qi@linaro.org>
4028 * i387-tdep.c (i387_convert_register_p): Return false if type
4029 code isn't TYPE_CODE_FLT.
4031 2017-05-24 Yao Qi <yao.qi@linaro.org>
4033 * alpha-tdep.c (alpha_convert_register_p): Return true if type
4035 (alpha_register_to_value): Remove type length check.
4036 (alpha_value_to_register): Likewise.
4038 2017-05-24 Yao Qi <yao.qi@linaro.org>
4040 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
4043 2017-05-24 Yao Qi <yao.qi@linaro.org>
4045 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
4046 TYPE_CODE_FLT or not.
4048 2017-05-24 Yao Qi <yao.qi@linaro.org>
4050 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
4051 * avr-tdep.c (avr_gdbarch_init): Likewise.
4052 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
4053 * cris-tdep.c (cris_gdbarch_init): Likewise.
4054 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4055 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
4056 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4057 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
4058 * mep-tdep.c (mep_gdbarch_init): Likewise.
4059 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
4060 * mips-tdep.c (mips_gdbarch_init): Likewise.
4061 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
4062 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4063 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
4064 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
4065 * v850-tdep.c (v850_gdbarch_init): Likewise.
4067 2017-05-24 Yao Qi <yao.qi@linaro.org>
4069 * selftest-arch.c (tests_with_arch): Call registers_changed
4070 and reinit_frame_cache.
4071 * selftest.c (run_self_tests): Likewise.
4073 2017-05-24 Yao Qi <yao.qi@linaro.org>
4075 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
4076 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
4078 2017-05-24 Yao Qi <yao.qi@linaro.org>
4080 * rl78-tdep.c (rl78_gdbarch_init): Don't call
4081 set_gdbarch_print_insn.
4083 2017-05-24 Yao Qi <yao.qi@linaro.org>
4085 * h8300-tdep.c (h8300_gdbarch_init): Don't call
4086 set_gdbarch_print_insn.
4088 2017-05-24 Yao Qi <yao.qi@linaro.org>
4090 * alpha-tdep.c (alpha_gdbarch_init): Don't call
4091 set_gdbarch_print_insn.
4092 * arc-tdep.c (arc_gdbarch_init): Likewise.
4093 * arch-utils.c: include dis-asm.h.
4094 (default_print_insn): New function.
4095 * arch-utils.h (default_print_insn): Declare.
4096 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
4097 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
4098 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
4099 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
4100 * frv-tdep.c (frv_gdbarch_init): Likewise.
4101 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4102 * gdbarch.sh (print_insn): Use default_print_insn.
4103 * gdbarch.c: Regenerated.
4104 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
4105 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
4106 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
4107 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
4108 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4109 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
4110 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
4111 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
4112 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
4113 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
4114 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
4115 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4116 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
4117 * mt-tdep.c (mt_gdbarch_init): Likewise.
4118 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4119 * nios2-tdep.c (nios2_print_insn): Remove.
4120 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
4121 * rx-tdep.c (rx_gdbarch_init): Likewise.
4122 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
4123 * score-tdep.c (score_print_insn): Remove.
4124 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
4125 * sh-tdep.c (sh_gdbarch_init): Likewise.
4126 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
4127 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4128 * tic6x-tdep.c (tic6x_print_insn): Remove.
4129 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
4130 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
4131 * v850-tdep.c (v850_gdbarch_init): Likewise.
4132 * vax-tdep.c (vax_gdbarch_init): Likewise.
4133 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
4134 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
4136 2017-05-23 John Baldwin <jhb@FreeBSD.org>
4138 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
4139 (MIPS_FP0_REGNUM): Remove.
4140 (MIPS_FSR_REGNUM): Remove.
4141 (mips_fbsd_supply_fpregs): Use mips_regnum.
4142 (mips_fbsd_supply_gregs): Likewise.
4143 (mips_fbsd_collect_fpregs): Likewise.
4144 (mips_fbsd_collect_gregs): Likewise.
4146 2017-05-23 John Baldwin <jhb@FreeBSD.org>
4148 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
4149 (getpfpregs_supplies): New function.
4150 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
4152 (mips_fbsd_store_inferior_registers): Likewise.
4154 2017-05-22 Pedro Alves <palves@redhat.com>
4156 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
4159 2017-05-22 Alan Hayward <alan.hayward@arm.com>
4161 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
4162 (store_register): Likewise.
4163 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
4164 (get_decimal_float_return_value): Likewise.
4165 (do_ppc_sysv_return_value): Likewise.
4166 (ppc64_sysv_abi_push_integer): Likewise.
4167 (ppc64_sysv_abi_push_freg): Likewise.
4168 (ppc64_sysv_abi_return_value_base): Likewise.
4169 (ppc64_sysv_abi_return_value): Likewise.
4170 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
4171 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
4172 * rs6000-nat.c: Likewise.
4173 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
4174 (rs6000_value_to_register): Likewise.
4175 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
4177 2017-05-21 Tom Tromey <tom@tromey.com>
4180 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
4181 arrays as "[T]", not "[T; ]".
4183 2017-05-19 Tom Tromey <tom@tromey.com>
4186 * rust-lang.c (exp_descriptor_rust): New function.
4187 (rust_language_defn): Use it.
4188 * p-lang.c (pascal_language_defn): Update.
4189 * opencl-lang.c (opencl_language_defn): Update.
4190 * objc-lang.c (objc_language_defn): Update.
4191 * m2-lang.c (m2_language_defn): Update.
4192 * language.h (struct language_defn)
4193 <la_watch_location_expression>: New member.
4194 * language.c (unknown_language_defn, auto_language_defn)
4195 (local_language_defn): Update.
4196 * go-lang.c (go_language_defn): Update.
4197 * f-lang.c (f_language_defn): Update.
4198 * d-lang.c (d_language_defn): Update.
4199 * c-lang.h (c_watch_location_expression): Declare.
4200 * c-lang.c (c_watch_location_expression): New function.
4201 (c_language_defn, cplus_language_defn, asm_language_defn)
4202 (minimal_language_defn): Use it.
4203 * breakpoint.c (watch_command_1): Call
4204 la_watch_location_expression.
4205 * ada-lang.c (ada_language_defn): Update.
4207 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4210 * gdb_curses.h (NOMACROS): Define.
4211 (NCURSES_NOMACROS): Define.
4213 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4216 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
4218 * tui/tui-wingeneral.c (box_win): Likewise.
4219 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
4220 (tui_show_source_line): Likewise.
4221 (tui_show_exec_info_content): Likewise.
4223 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
4225 * sparc-tdep.c (sparc_structure_return_p)
4226 (sparc_arg_on_registers_p): New functions.
4227 (sparc32_store_arguments): Use them.
4228 * sparc64-tdep.c (sparc64_16_byte_align_p)
4229 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
4230 Handle TYPE_CODE_ARRAY.
4232 2017-05-17 Yao Qi <yao.qi@linaro.org>
4234 * cli/cli-decode.c (add_alias_cmd): New function.
4235 * command.h (add_alias_cmd): Declare.
4236 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
4237 instead call add_alias_cmd.
4239 2017-05-17 Pedro Alves <palves@redhat.com>
4241 * Makefile.in (nat_extra_makefile_frag): Rename to ...
4242 (nat_makefile_frag): ... this. All references updated.
4243 * configure.ac: Likewise.
4244 * configure.nat: Likewise. Enhance comments.
4245 * configure: Regenerate.
4247 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4249 * procfs.c (procfs_create_inferior): Change prototype to match
4252 2017-05-13 Eli Zaretskii <eliz@gnu.org>
4254 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
4255 C++ compiler warning.
4257 2017-05-12 Tom Tromey <tom@tromey.com>
4260 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
4261 recurse, just call value_struct_elt directly.
4263 2017-05-12 Tom Tromey <tom@tromey.com>
4265 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
4266 OP_RUST_ARRAY>: Fix.
4268 2017-05-12 Tom Tromey <tom@tromey.com>
4270 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
4272 2017-05-09 Yao Qi <yao.qi@linaro.org>
4274 * regcache.c: Include <forward_list>.
4275 (struct regcache_list): Remove.
4276 (current_regcache): Update.
4277 (get_thread_arch_aspace_regcache): Update for std::forward_list.
4278 (regcache_thread_ptid_changed): Likewise.
4279 (registers_changed_ptid): Likewise.
4280 (current_regcache_size): Likewise.
4282 2017-05-09 Yao Qi <yao.qi@linaro.org>
4284 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
4285 (current_regcache_size): New function.
4286 (current_regcache_test): New function.
4287 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
4289 2017-05-08 Alan Hayward <alan.hayward@arm.com>
4291 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
4292 (print_gp_register_row): Use get_frame_register_value.
4294 2017-05-08 Alan Hayward <alan.hayward@arm.com>
4296 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
4297 (mips_supply_fpregset): Likewise.
4298 (mips64_supply_gregset): Likewise.
4300 2017-05-08 Alan Hayward <alan.hayward@arm.com>
4302 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
4303 regcache->raw_supply_zeroed.
4305 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4307 * configure.nat: Rearrange 'case' statements to match
4310 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4312 * Makefile.in: Remove "@host_makefile_frag@". Add variables
4313 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
4314 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
4315 "@nat_extra_makefile_frag@".
4316 (Makefile): Remove dependency on "@frags@".
4317 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
4318 (data-directory/Makefile): Likewise.
4319 * config/aarch64/linux.mh: Deleted; moved contents to
4320 "gdb/configure.nat".
4321 * config/alpha/alpha-linux.mh: Likewise.
4322 * config/alpha/nbsd.mh: Likewise.
4323 * config/arm/linux.mh: Likewise.
4324 * config/arm/nbsdelf.mh: Likewise.
4325 * config/i386/cygwin.mh: Likewise.
4326 * config/i386/cygwin64.mh: Likewise.
4327 * config/i386/darwin.mh: Likewise.
4328 * config/i386/fbsd.mh: Likewise.
4329 * config/i386/fbsd64.mh: Likewise.
4330 * config/i386/go32.mh: Likewise.
4331 * config/i386/i386gnu.mh: Likewise.
4332 * config/i386/i386sol2.mh: Likewise.
4333 * config/i386/linux.mh: Likewise.
4334 * config/i386/linux64.mh: Likewise.
4335 * config/i386/mingw.mh: Likewise.
4336 * config/i386/mingw64.mh: Likewise.
4337 * config/i386/nbsd64.mh: Likewise.
4338 * config/i386/nbsdelf.mh: Likewise.
4339 * config/i386/nto.mh: Likewise.
4340 * config/i386/obsd.mh: Likewise.
4341 * config/i386/obsd64.mh: Likewise.
4342 * config/i386/sol2-64.mh: Likewise.
4343 * config/ia64/linux.mh: Likewise.
4344 * config/m32r/linux.mh: Likewise.
4345 * config/m68k/linux.mh: Likewise.
4346 * config/m68k/nbsdelf.mh: Likewise.
4347 * config/m68k/obsd.mh: Likewise.
4348 * config/m88k/obsd.mh: Likewise.
4349 * config/mips/fbsd.mh: Likewise.
4350 * config/mips/linux.mh: Likewise.
4351 * config/mips/nbsd.mh: Likewise.
4352 * config/mips/obsd64.mh: Likewise.
4353 * config/pa/linux.mh: Likewise.
4354 * config/pa/nbsd.mh: Likewise.
4355 * config/pa/obsd.mh: Likewise.
4356 * config/powerpc/aix.mh: Likewise.
4357 * config/powerpc/fbsd.mh: Likewise.
4358 * config/powerpc/linux.mh: Likewise.
4359 * config/powerpc/nbsd.mh: Likewise.
4360 * config/powerpc/obsd.mh: Likewise.
4361 * config/powerpc/ppc64-linux.mh: Likewise.
4362 * config/powerpc/spu-linux.mh: Likewise.
4363 * config/s390/linux.mh: Likewise.
4364 * config/sh/nbsd.mh: Likewise.
4365 * config/sparc/fbsd.mh: Likewise.
4366 * config/sparc/linux.mh: Likewise.
4367 * config/sparc/linux64.mh: Likewise.
4368 * config/sparc/nbsd64.mh: Likewise.
4369 * config/sparc/nbsdelf.mh: Likewise.
4370 * config/sparc/obsd64.mh: Likewise.
4371 * config/sparc/sol2.mh: Likewise.
4372 * config/tilegx/linux.mh: Likewise.
4373 * config/vax/nbsdelf.mh: Likewise.
4374 * config/vax/obsd.mh: Likewise.
4375 * config/xtensa/linux.mh: Likewise.
4376 * config/i386/i386gnu.mn: New file, with excerpts from
4377 "config/i386/i386gnu.mh".
4378 * configure: Regenerate.
4379 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
4380 *.mh files under "gdb/config".
4381 * configure.nat: New file, with contents from the
4382 "gdb/config/*/*.mh" files.
4384 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
4386 * btrace.c (btrace_clear): Free insn vector.
4388 2017-05-05 Pedro Alves <palves@redhat.com>
4390 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
4391 * configure: Regenerate.
4393 2017-05-04 Pedro Alves <palves@redhat.com>
4395 * Makefile.in (SFILES): Add progspace-and-thread.c.
4396 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
4397 (COMMON_OBS): Add progspace-and-thread.o.
4398 * breakpoint.c: Include "progspace-and-thread.h".
4399 (update_inserted_breakpoint_locations)
4400 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
4401 Use scoped_restore_current_pspace_and_thread.
4402 (create_std_terminate_master_breakpoint): Use
4403 scoped_restore_current_program_space.
4404 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
4405 (print_breakpoint_location): Use
4406 scoped_restore_current_program_space.
4407 (bp_loc_is_permanent): Use
4408 scoped_restore_current_pspace_and_thread.
4409 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
4410 (download_tracepoint_locations): Use
4411 scoped_restore_current_pspace_and_thread.
4412 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
4413 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
4414 (enum step_over_calls_kind): Moved from inferior.h.
4415 (class scoped_restore_current_thread): New class.
4416 * gdbthread.h (make_cleanup_restore_current_thread): Delete
4418 (scoped_restore_current_thread): New class.
4419 * infcmd.c: Include "common/gdb_optional.h".
4420 (continue_1, proceed_after_attach): Use
4421 scoped_restore_current_thread.
4422 (notice_new_inferior): Use scoped_restore_current_thread.
4423 * inferior.c: Include "progspace-and-thread.h".
4424 (restore_inferior, save_current_inferior): Delete.
4425 (add_inferior_command, clone_inferior_command): Use
4426 scoped_restore_current_pspace_and_thread.
4427 * inferior.h (scoped_restore_current_inferior): New class.
4428 * infrun.c: Include "progspace-and-thread.h" and
4429 "common/gdb_optional.h".
4430 (follow_fork_inferior): Use
4431 scoped_restore_current_pspace_and_thread.
4432 (scoped_restore_exited_inferior): New class.
4433 (handle_vfork_child_exec_or_exit): Use
4434 scoped_restore_exited_inferior,
4435 scoped_restore_current_pspace_and_thread,
4436 scoped_restore_current_thread and scoped_restore.
4437 (fetch_inferior_event): Use scoped_restore_current_thread.
4438 * linespec.c (decode_line_full, decode_line_1): Use
4439 scoped_restore_current_program_space.
4440 * mi/mi-main.c: Include "progspace-and-thread.h".
4441 (exec_continue): Use scoped_restore_current_thread.
4442 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
4443 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
4444 * proc-service.c (ps_pglobal_lookup): Use
4445 scoped_restore_current_program_space.
4446 * progspace-and-thread.c: New file.
4447 * progspace-and-thread.h: New file.
4448 * progspace.c (release_program_space, clone_program_space): Use
4449 scoped_restore_current_program_space.
4450 (restore_program_space, save_current_program_space)
4451 (save_current_space_and_thread): Delete.
4452 (switch_to_program_space_and_thread): Moved to
4453 progspace-and-thread.c.
4454 * progspace.h (save_current_program_space)
4455 (save_current_space_and_thread): Delete declarations.
4456 (scoped_restore_current_program_space): New class.
4457 * remote.c (remote_btrace_maybe_reopen): Use
4458 scoped_restore_current_thread.
4459 * symtab.c: Include "progspace-and-thread.h".
4460 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
4461 * thread.c (print_thread_info_1): Use
4462 scoped_restore_current_thread.
4463 (struct current_thread_cleanup): Delete.
4464 (do_restore_current_thread_cleanup)
4465 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
4466 (scoped_restore_current_thread::~scoped_restore_current_thread):
4468 (make_cleanup_restore_current_thread): Rename/convert to ...
4469 (scoped_restore_current_thread::scoped_restore_current_thread):
4471 (thread_apply_all_command): Use scoped_restore_current_thread.
4472 (thread_apply_command): Use scoped_restore_current_thread.
4473 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
4474 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
4476 2017-05-04 Pedro Alves <palves@redhat.com>
4478 * thread.c (make_cleanup_restore_current_thread): Move
4479 find_thread_ptid call before the is_stopped call. Assert that the
4480 thread is found. Replace is_stopped call by checking the thread's
4481 state directly. Remove unnecessary NULL-thread check.
4483 2017-05-04 Pedro Alves <palves@redhat.com>
4485 * corelow.c (thread_section_name): New class.
4486 (get_core_register_section, get_core_siginfo): Use it.
4488 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
4490 * corelow.c (sniff_core_bfd): Remove extra semicolon.
4491 (get_core_register_section): Remove xfree of NULL pointer.
4493 2017-05-03 Alan Hayward <alan.hayward@arm.com>
4495 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
4496 * regcache.c (regcache::raw_supply_zeroed): New function.
4497 * regcache.h (regcache::raw_supply_zeroed): New declaration.
4499 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
4501 * gdbarch.sh: Remove commented out definition of
4503 * gdbarch.h: Re-generate.
4505 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4507 * configure: Regenerate.
4509 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
4511 * solib-target.c (solib_target_relocate_section_addresses):
4512 Remove num_section_bases, num_bases, segment_bases variables.
4514 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4516 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
4518 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4520 * solib-target.c: Include <vector>
4521 (struct lm_info_target) <~lm_info_target>: Remove.
4522 <segment_bases, section_bases>: Change type to
4523 std::vector<CORE_ADDR>.
4524 (library_list_start_segment, library_list_start_section,
4525 library_list_end_library,
4526 solib_target_relocate_section_addresses): Adjust.
4528 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4530 * gdbarch.sh (software_single_step): Change return type to
4531 std::vector<CORE_ADDR>.
4532 * gdbarch.c, gdbarch.h: Re-generate.
4533 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
4535 (arm_deal_with_atomic_sequence_raw): Adjust.
4536 (thumb_get_next_pcs_raw): Adjust.
4537 (arm_get_next_pcs_raw): Adjust.
4538 (arm_get_next_pcs): Adjust.
4539 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
4540 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
4541 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
4542 (alpha_software_single_step): Adjust.
4543 * alpha-tdep.h (alpha_software_single_step): Adjust.
4544 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
4545 * arm-tdep.c (arm_software_single_step): Adjust.
4546 (arm_breakpoint_kind_from_current_state): Adjust.
4547 * arm-tdep.h (arm_software_single_step): Adjust.
4548 * breakpoint.c (insert_single_step_breakpoint): Adjust.
4549 * cris-tdep.c (cris_software_single_step): Adjust.
4550 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
4551 (micromips_deal_with_atomic_sequence): Adjust.
4552 (deal_with_atomic_sequence): Adjust.
4553 (mips_software_single_step): Adjust.
4554 * mips-tdep.h (mips_software_single_step): Adjust.
4555 * moxie-tdep.c (moxie_software_single_step): Adjust.
4556 * nios2-tdep.c (nios2_software_single_step): Adjust.
4557 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
4558 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
4559 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
4560 * s390-linux-tdep.c (s390_software_single_step): Adjust.
4561 * sparc-tdep.c (sparc_software_single_step): Adjust.
4562 * spu-tdep.c (spu_software_single_step): Adjust.
4563 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
4565 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4567 * gdbarch.sh: Use semi-colon as field separator instead of colon.
4568 * gdbarch.h: Re-generate.
4570 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4572 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
4573 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
4574 * python/py-instruction.c, python/py-instruction.h: New file.
4575 * python/py-record.c: Add py-instruction.h include.
4576 (gdbpy_initialize_record): Make gdb.Instruction a super class of
4577 gdb.RecordInstruction.
4578 * python/python-internal.h: Add gdbpy_initialize_instruction
4580 * python/python.c (do_start_initialization): Add
4581 gdbpy_initialize_instruction.
4583 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4585 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
4587 (btrace_func_from_recpy_func): New function.
4588 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
4589 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
4590 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
4591 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
4592 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
4593 Also, use new helper functions.
4594 (btpy_list_item): Use new helper functions.
4595 (recpy_bt_function_call_history): Use new type name.
4596 (btpy_call_getset): Remove.
4597 (gdbpy_initialize_btrace): Remove code to initialize
4598 gdb.BtraceFunctionCall.
4599 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
4600 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
4601 recpy_bt_func_prev, recpy_bt_func_next): New export.
4602 * python/py-record.c (recpy_func_type): New static object.
4603 (recpy_func_new, recpy_func_level, recpy_func_symbol,
4604 recpy_func_instructions, recpy_func_up, recpy_func_prev,
4605 recpy_func_next): New function.
4606 (recpy_element_hash, recpy_element_richcompare): Updated comment.
4607 (recpy_func_getset): New static object.
4608 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
4609 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
4611 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4613 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
4614 (btpy_object, btpy_insn_type, btpy_new): Remove.
4615 (btpy_list_object): Use gdb.RecordInstruction type instead of
4616 gdb.BtraceInstruction type.
4617 (btrace_insn_from_recpy_insn): New function.
4618 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
4620 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
4621 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
4622 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
4623 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
4624 instead of btpy_object.
4625 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4626 btpy_insn_data, btpy_insn_decode): Rename to ...
4627 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
4628 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
4629 recpy_bt_insn_decode): This. Also, use new helper functions.
4630 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
4632 (btpy_insn_getset): Remove.
4633 (gdbpy_initialize_btrace): Remove code to initialize
4634 gdb.BtraceInstruction. Use recpy_element_object.
4635 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
4636 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
4637 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
4638 * python/py-record.c (recpy_insn_type): New static object.
4639 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
4640 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
4641 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
4643 (recpy_insn_getset): New static object.
4644 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
4645 * python/py-record.h (recpy_element_object): New typedef.
4646 (recpy_insn_type, recpy_insn_new): New export.
4648 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4650 * py-record-btrace.c (btpy_insn_new): Removed.
4651 (btpy_insn_or_gap_new): New function.
4652 (btpy_insn_error): Removed.
4653 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4654 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
4655 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
4656 btpy_insn_or_gap_new instead of btpy_insn_new.
4657 (btpy_insn_getset): Remove btpy_insn_error.
4658 * py-record.c (recpy_gap_type): New static object.
4659 (recpy_gap_object): New typedef.
4660 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
4661 recpy_gap_reason_string): New function.
4662 (recpy_gap_getset): New static object.
4663 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
4664 * py-record.h (recpy_gap_new): New export.
4666 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4668 * python/py-record.c (recpy_ptid): Remove.
4669 (recpy_record_getset): Remove recpy_ptid.
4671 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4673 * btrace.c (btrace_fetch): Set inferior_ptid.
4674 * python/py-record-btrace.c: Add "py-record.h" include.
4675 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
4676 recpy_bt_end, recpy_bt_instruction_history,
4677 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
4678 in gdb.Record object instead of current ptid.
4679 * python/py-record.c: Include new "py-record.h" file.
4680 (recpy_record_object): Moved to py-record.h.
4681 * python/py-record.h: New file.
4683 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4685 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
4686 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
4689 2017-05-01 Joel Brobecker <brobecker@adacore.com>
4691 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
4692 the past maintainers section.
4694 2017-04-28 Yao Qi <yao.qi@linaro.org>
4696 * infcmd.c (get_return_value): Use regcache ctor, and remove
4699 2017-04-28 Yao Qi <yao.qi@linaro.org>
4700 Pedro Alves <palves@redhat.com>
4702 * regcache.c (regcache::regcache): New tag dispatch ctor.
4703 (do_cooked_read): Moved above.
4704 (regcache_dup): Use the tag dispatch ctor..
4705 * regcache.h (regcache): Declare ctor, delete copy ctor and
4706 assignment operator, remove friend regcache_dup.
4708 2017-04-28 Yao Qi <yao.qi@linaro.org>
4710 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
4711 call method save instead of regcache_cpy.
4712 * regcache.h (struct regcache): Make regcache_dup a friend.
4714 2017-04-28 Yao Qi <yao.qi@linaro.org>
4716 * regcache.c (struct regcache): Move to regcache.h
4717 (regcache::arch): New method.
4718 (regcache_get_ptid): Update.
4719 (get_regcache_arch): Call arch method.
4720 (get_regcache_aspace): Call method aspace.
4721 (register_buffer): Change it to method.
4722 (regcache_save): Change it to regcache::save.
4723 (regcache_restore): Likewise.
4724 (regcache_cpy_no_passthrough): Remove the declaration.
4725 (regcache_cpy): Call methods restore and cpy_no_passthrough.
4726 (regcache_cpy_no_passthrough): Change it to method
4728 (regcache_register_status): Change it to method
4729 get_register_status.
4730 (regcache_invalidate): Change it to method invalidate.
4731 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
4732 (regcache_raw_update): Change it to method raw_update.
4733 (regcache_raw_read): Likewise.
4734 (regcache_raw_read_signed): Likewise.
4735 (regcache_raw_read_unsigned): Likewise.
4736 (regcache_raw_write_signed): Likewise.
4737 (regcache_raw_write_unsigned): Likewise.
4738 (regcache_cooked_read): Likewise.
4739 (regcache_cooked_read_value): Likewise.
4740 (regcache_cooked_read_signed): Likewise.
4741 (regcache_cooked_read_unsigned): Likewise.
4742 (regcache_cooked_write_signed): Likewise.
4743 (regcache_cooked_write_unsigned): Likewise.
4744 (regcache_raw_set_cached_value): Likewise.
4745 (regcache_raw_write): Likewise.
4746 (regcache_cooked_write): Likewise.
4747 (regcache_xfer_part): Likewise.
4748 (regcache_raw_read_part): Likewise.
4749 (regcache_raw_write_part): Likewise.
4750 (regcache_cooked_read_part): Likewise.
4751 (regcache_cooked_write_part): Likewise.
4752 (regcache_raw_supply): Likewise.
4753 (regcache_raw_collect): Likewise.
4754 (regcache_transfer_regset): Likewise.
4755 (regcache_supply_regset): Likewise.
4756 (regcache_collect_regset): Likewise.
4757 (regcache_debug_print_register): Likewise.
4758 (enum regcache_dump_what): Move it to regcache.h.
4759 (regcache_dump): Change it to method dump.
4760 * regcache.h (enum regcache_dump_what): New.
4761 (class regcache): New.
4762 * target.c (target_fetch_registers): Call method
4763 debug_print_register.
4764 (target_store_registers): Likewise.
4766 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4768 * windows-nat.c (struct lm_info_windows): Initialize field.
4769 (windows_make_so): Allocate lm_info_windows with new.
4770 (windows_free_so): Free lm_info_windows with delete.
4772 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4774 * solib-darwin.c (struct lm_info_darwin): Initialize field.
4775 (darwin_current_sos): Allocate lm_info_darwin with new, remove
4777 (darwin_free_so): Free lm_info_darwin with delete.
4779 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4781 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
4782 <l_addr_p>: Change type to bool.
4783 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
4784 (svr4_free_so): Free lm_info_svr4 with delete.
4785 (svr4_copy_library_list): Replace memcpy with call to copy
4787 (library_list_start_library, svr4_default_sos): Allocate
4788 lm_info_svr4 with new.
4790 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4792 * solib-target.c (struct lm_info_target): Add destructor,
4794 <name>: Change type to std::string.
4795 (library_list_start_library): Allocate lm_info_target with new.
4796 (solib_target_free_library_list): Free lm_info_target with
4798 (solib_target_current_sos): Adapt to std::string.
4799 (solib_target_free_so): Free lm_info_target with delete.
4801 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4803 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
4805 (frv_current_sos): Allocate lm_info_frv with new.
4806 (frv_relocate_main_executable): Free lm_info_frv with delete,
4808 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
4810 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4812 * solib-frv.c (struct lm_info_frv): Fix indentation.
4814 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4816 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
4818 (dsbt_current_sos): Allocate lm_info_dsbt with new.
4819 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
4820 and allocate with new.
4821 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
4823 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4825 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
4826 <filename, member_name>: Change type to std::string.
4827 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
4828 (library_list_start_library): Allocate lm_info_aix with new.
4829 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
4830 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
4831 with copy constructor.
4833 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4835 * solist.h (struct lm_info): Remove.
4836 (struct lm_info_base): New class.
4837 (struct so_list) <lm_info>: Change type to lm_info_base *.
4838 * nto-tdep.c (struct lm_info): Remove.
4840 * solib-aix.c (struct lm_info): Rename to ...
4841 (struct lm_info_aix): ... this. Extend lm_info_base.
4842 (lm_info_p): Rename to ...
4843 (lm_info_aix_p): ... this, and adjust.
4844 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
4845 solib_aix_parse_libraries, library_list_start_library,
4846 solib_aix_free_library_list, solib_aix_parse_libraries,
4847 solib_aix_get_library_list,
4848 solib_aix_relocate_section_addresses, solib_aix_free_so,
4849 solib_aix_get_section_offsets,
4850 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
4852 (struct solib_aix_inferior_data) <library_list>: Adjust.
4853 * solib-darwin.c (struct lm_info): Rename to ...
4854 (struct lm_info_darwin): ... this. Extend lm_info_base.
4855 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
4856 * solib-dsbt.c (struct lm_info): Rename to ...
4857 (struct lm_info_dsbt): ... this. Extend lm_info_base.
4858 (struct dsbt_info) <main_executable_lm_info): Adjust.
4859 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
4860 dsbt_relocate_section_addresses): Adjust.
4861 * solib-frv.c (struct lm_info): Rename to ...
4862 (struct lm_info_frv): ... this. Extend lm_info_base.
4863 (main_executable_lm_info): Adjust.
4864 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
4865 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
4866 find_canonical_descriptor_in_load_object,
4867 frv_fdpic_find_canonical_descriptor): Adjust.
4868 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
4870 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
4871 svr4_clear_so, svr4_copy_library_list,
4872 library_list_start_library, svr4_default_sos, svr4_read_so_list,
4873 svr4_current_sos, svr4_fetch_objfile_link_map,
4874 solist_update_incremental): Adjust.
4875 * solib-svr4.h (struct lm_info_svr4): Move here from
4877 * solib-target.c (struct lm_info): Rename to ...
4878 (struct lm_info_target): ... this. Extend lm_info_base.
4879 (lm_info_p): Rename to ...
4880 (lm_info_target_p): ... this.
4881 (solib_target_parse_libraries, library_list_start_segment,
4882 library_list_start_section, library_list_start_library,
4883 library_list_end_library, solib_target_free_library_list,
4884 solib_target_current_sos, solib_target_free_so,
4885 solib_target_relocate_section_addresses): Adjust.
4886 * windows-nat.c (struct lm_info): Rename to ...
4887 (struct lm_info_windows): ... this. Extend lm_info_base.
4888 (windows_make_so, handle_load_dll, handle_unload_dll,
4889 windows_xfer_shared_libraries): Adjust.
4891 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4893 * solib-darwin.c (struct darwin_so_list): Remove.
4894 (darwin_current_sos): Allocate an so_list object instead of a
4895 darwin_so_list, separately allocate an lm_info object.
4896 (darwin_free_so): Free lm_info.
4898 2017-04-28 John Baldwin <jhb@FreeBSD.org>
4900 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
4901 with fprintf_filtered.
4903 2017-04-28 Yao Qi <yao.qi@linaro.org>
4905 * regcache.c (regcache::regcache): New function.
4906 (regcache::~regcache): New function.
4907 (regcache_xmalloc_1): Remove.
4908 (regcache_xmalloc): Call new regcache.
4909 (regcache_xfree): Call delete regcache.
4910 (get_thread_arch_aspace_regcache): Call new regcache.
4912 2017-04-28 Yao Qi <yao.qi@linaro.org>
4914 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
4915 lwp instead of ptid_get_lwp.
4917 2017-04-28 Yao Qi <yao.qi@linaro.org>
4919 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
4920 lwp_info instead of getting from inferior_ptid.
4922 2017-04-27 Keith Seitz <keiths@redhat.com>
4924 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
4925 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
4926 (CV_CONVERSION_BADNESS): Define.
4927 (rank_one_type): Remove overly restrictive rvalue reference
4929 Add cv-qualifier checks and subranks for type equality.
4930 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
4931 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
4932 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
4934 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
4936 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
4937 count when creating the object.
4939 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
4940 Ulrich Weigand <uweigand@de.ibm.com>
4942 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
4943 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
4945 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
4946 (process_xcoff_symbol): Likewise.
4947 (scan_xcoff_symtab): Likewise.
4949 2017-04-26 Alan Hayward <alan.hayward@arm.com>
4951 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
4952 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
4953 (ia64_access_reg): Use get_frame_register_unsigned.
4954 (ia64_access_rse_reg): Likewise.
4955 (ia64_libunwind_frame_prev_register): Likewise.
4957 2017-04-26 Jiong Wang <jiong.wang@arm.com>
4959 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
4960 * gdbarch.c: Regenerated.
4961 * gdbarch.h: Regenerated.
4962 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
4963 visibility external.
4964 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
4965 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
4966 (enum cfa_how_kind): Move to ...
4967 (struct dwarf2_frame_state_reg_info): Likewise.
4968 (struct dwarf2_frame_state): Likewise.
4969 * dwarf2-frame.h: ... here.
4970 (dwarf2_frame_state_alloc_regs): New declaration.
4971 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
4972 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
4974 2017-04-26 Alan Hayward <alan.hayward@arm.com>
4976 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
4977 regcache_raw_read_unsigned.
4978 (xtensa_pseudo_register_write): Likewise.
4980 2017-04-26 Alan Hayward <alan.hayward@arm.com>
4982 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
4983 (nds32_pseudo_register_write): Likewise.
4985 2017-04-25 Yao Qi <yao.qi@linaro.org>
4987 * regcache.c (struct regcache) <readonly_p>: Change its type
4989 (regcache_xmalloc_1): Update parameter type and callers update.
4991 2017-04-25 Yao Qi <yao.qi@linaro.org>
4993 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
4994 set_gdbarch_wchar_bit.
4995 * arm-tdep.c (arm_gdbarch_init): Likewise.
4997 2017-04-25 Pedro Alves <palves@redhat.com>
4999 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
5000 (BothAreRelocatable, memcopy, memmove): Don't define.
5001 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
5004 2017-04-25 Pedro Alves <palves@redhat.com>
5006 * common/common-defs.h: Include "common/poison.h".
5007 * common/function-view.h: (Not, Or, Requires): Move to traits.h
5009 * common/poison.h: New file.
5010 * common/traits.h: Include <type_traits>.
5011 (Not, Or, Requires): New, moved from common/function-view.h.
5013 2017-04-25 Pedro Alves <palves@redhat.com>
5015 * breakpoint.h (struct breakpoint): In-class initialize all
5016 fields. Make boolean fields "bool".
5017 * breakpoint.c (init_raw_breakpoint_without_location): Remove
5018 memset call and initializations no longer necessary.
5020 2017-04-25 Pedro Alves <palves@redhat.com>
5022 * btrace.c (pt_btrace_insn_flags): Change parameter type to
5024 (pt_btrace_insn): New function.
5025 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
5027 2017-04-25 Pedro Alves <palves@redhat.com>
5029 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
5030 "base" field and inherit from "bp_location" instead. Add
5032 (allocate_location_exception): Use new non-default ctor.
5033 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
5034 (init_bp_location): Convert to ...
5035 (bp_location::bp_location): ... this new ctor, and remove memset
5037 (base_breakpoint_allocate_location): Use the new non-default ctor.
5038 * breakpoint.h (bp_location): Now a class. Declare default and
5039 non-default ctors. In-class initialize all members.
5040 (init_bp_location): Remove declaration.
5042 2017-04-25 Pedro Alves <palves@redhat.com>
5044 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
5045 assignment operator.
5047 2017-04-24 Yao Qi <yao.qi@linaro.org>
5049 * doublest.c (convert_doublest_to_floatformat): Call
5050 floatformat_totalsize_bytes.
5052 2017-04-22 Tom Tromey <tom@tromey.com>
5054 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5056 * stack.c (print_frame): Use ui_out_emit_list.
5057 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
5059 * mi/mi-main.c (print_one_inferior)
5060 (mi_cmd_data_list_register_names)
5061 (mi_cmd_data_list_register_values, mi_cmd_list_features)
5062 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
5064 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
5065 (mi_output_solib_attribs): Use ui_out_emit_list,
5067 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
5068 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
5069 (mi_cmd_stack_list_args, list_args_or_locals): Use
5071 * disasm.c (do_assembly_only): Use ui_out_emit_list.
5072 * breakpoint.c (print_solib_event, output_thread_groups): Use
5075 2017-04-22 Tom Tromey <tom@tromey.com>
5077 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
5078 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
5079 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
5081 2017-04-22 Tom Tromey <tom@tromey.com>
5083 * tracepoint.c (tvariables_info_1)
5084 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
5086 2017-04-22 Tom Tromey <tom@tromey.com>
5088 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
5089 annotate_arg_emitter.
5090 * breakpoint.c (print_mention_watchpoint)
5091 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
5092 * annotate.h (struct annotate_arg_emitter): New.
5094 2017-04-22 Tom Tromey <tom@tromey.com>
5096 * record-btrace.c (record_btrace_insn_history)
5097 (record_btrace_insn_history_range, record_btrace_call_history)
5098 (record_btrace_call_history_range): Use ui_out_emit_tuple.
5099 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
5101 * stack.c (print_frame_info): Use ui_out_emit_tuple.
5102 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
5103 * skip.c (skip_info): Use ui_out_emit_tuple.
5104 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
5105 * progspace.c (print_program_space): Use ui_out_emit_tuple.
5106 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
5107 * osdata.c (info_osdata): Use ui_out_emit_tuple.
5108 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
5110 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
5111 (output_register, mi_cmd_data_read_memory)
5112 (mi_cmd_data_read_memory_bytes, mi_load_progress)
5113 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
5114 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
5115 Use ui_out_emit_tuple.
5116 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
5118 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
5119 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
5120 * linux-thread-db.c (info_auto_load_libthread_db): Use
5122 * inferior.c (print_inferior): Use ui_out_emit_tuple.
5123 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
5124 * disasm.c (do_mixed_source_and_assembly_deprecated)
5125 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
5126 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
5127 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
5128 * breakpoint.c (print_one_breakpoint_location)
5129 (print_one_breakpoint): Use ui_out_emit_tuple.
5130 * auto-load.c (print_script, info_auto_load_cmd): Use
5132 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
5134 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
5136 * thread.c (print_thread_info_1): Remove dead code.
5138 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5140 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
5142 * arm-tdep.c (selftests::arm_record_test): Likewise.
5144 2017-04-21 Yao Qi <yao.qi@linaro.org>
5146 * regcache.c (regcache_restore): Remove argument 2. Replace
5147 argument 3 with regcache. Get register status from
5148 src->register_status and get register contents from
5149 register_buffer (src, regnum).
5150 (regcache_cpy): Update.
5152 2017-04-19 Pedro Alves <palves@redhat.com>
5154 * gdbthread.h (thread): Add missing closing parenthesis in
5157 2017-04-19 Pedro Alves <palves@redhat.com>
5159 * common/refcounted-object.h: New file.
5160 * gdbthread.h: Include "common/refcounted-object.h".
5161 (thread_info): Inherit from refcounted_object and add comments.
5162 (thread_info::incref, thread_info::decref)
5163 (thread_info::m_refcount): Delete.
5164 (thread_info::deletable): Use the refcounted_object::refcount()
5166 * inferior.c (current_inferior_): Add comment.
5167 (set_current_inferior): Increment/decrement refcounts.
5168 (prune_inferiors, remove_inferior_command): Skip inferiors marked
5169 not-deletable instead of comparing with the current inferior.
5170 (initialize_inferiors): Increment the initial inferior's refcount.
5171 * inferior.h (struct inferior): Forward declare.
5172 Include "common/refcounted-object.h".
5173 (current_inferior, set_current_inferior): Move declaration to
5174 before struct inferior's definition, and fix comment.
5175 (inferior): Inherit from refcounted_object. Add comments.
5176 * thread.c (switch_to_thread_no_regs): Reference the thread's
5177 inferior pointer directly instead of doing a ptid lookup.
5178 (switch_to_no_thread): New function.
5179 (switch_to_thread(thread_info *)): New function, factored out
5181 (switch_to_thread(ptid_t)): ... this.
5182 (restore_current_thread): Delete.
5183 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
5184 fields, and add 'inf' field.
5185 (do_restore_current_thread_cleanup): Check whether old->inf is
5186 alive instead of looking up an inferior by ptid. Use
5187 switch_to_thread and switch_to_no_thread.
5188 (restore_current_thread_cleanup_dtor): Use old->inf directly
5189 instead of lookup up an inferior by id. Decref the inferior.
5190 Don't restore 'removable'.
5191 (make_cleanup_restore_current_thread): Same the inferior pointer
5192 in old, instead of the inferior number. Incref the inferior.
5193 Don't save/clear 'removable'.
5195 2017-04-19 Pedro Alves <palves@redhat.com>
5197 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5198 unittests/scoped_restore-selftests.c.
5199 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
5200 * common/scoped_restore.h (scoped_restore_base): Make "class".
5201 (scoped_restore_base::release): New public method.
5202 (scoped_restore_base::scoped_restore_base): New protected ctor.
5203 (scoped_restore_base::m_saved_var): New protected field.
5204 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
5205 scoped_restore_base base class instead of m_saved_var directly.
5206 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
5207 (scoped_restore_tmpl::scoped_restore_tmpl(const
5208 scoped_restore_tmpl<T>&)): Likewise.
5209 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
5211 (scoped_restore_tmpl::saved_var): New method.
5212 (scoped_restore_tmpl::m_saved_var): Delete.
5213 * inferior.h (inferior::detaching): Now a bool.
5214 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
5216 * unittests/scoped_restore-selftests.c: New file.
5218 2017-04-19 Pedro Alves <palves@redhat.com>
5220 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
5221 Re-sort in alphabetic order.
5223 2017-04-18 Pedro Alves <palves@redhat.com>
5225 * xml-support.c (obstack_xml_printf): Delete.
5226 * xml-support.h (obstack_xml_printf): Delete.
5228 2017-04-18 Pedro Alves <palves@redhat.com>
5230 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
5231 vdebug, verror, body_text, start_element, end_element, name,
5232 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
5233 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
5234 is_xinclude>: Make private and add m_ prefix.
5235 (gdb_xml_parser::body_text): New method, based on ...
5236 (gdb_xml_body_text): ... this. Adjust.
5237 (gdb_xml_parser::vdebug): New method, based on ...
5238 (gdb_xml_debug): ... this. Adjust.
5239 (gdb_xml_parser::verror): New method, based on ...
5240 (gdb_xml_error): ... this. Adjust.
5241 (gdb_xml_parser::start_element): New method, based on ...
5242 (gdb_xml_start_element): ... this. Adjust.
5243 (gdb_xml_start_element_wrapper): Defer to
5244 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
5245 (gdb_xml_parser::end_element): New method, based on ...
5246 (gdb_xml_end_element_wrapper): ... this. Adjust.
5247 (gdb_xml_parser::~gdb_xml_parser): Adjust.
5248 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
5249 (gdb_xml_parser::use_dtd): New method, based on ...
5250 (gdb_xml_use_dtd): ... this. Adjust.
5251 (gdb_xml_parser::parse): New method, based on ...
5252 (gdb_xml_parse): ... this. Adjust.
5253 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
5254 (xinclude_start_include): Adjust to call the parser's name method.
5255 (xml_xinclude_default, xml_xinclude_start_doctype)
5256 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
5258 (xml_process_xincludes): Adjust to call parser methods.
5259 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
5262 2017-04-18 Pedro Alves <palves@redhat.com>
5264 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
5265 gdb::optional<std::string>.
5266 * xml-support.c: Include <string>.
5267 (scope_level::scope_level(scope_level &&))
5268 (scope_level::~scope_level): Delete.
5269 (scope_level::body): Now a std::string.
5270 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
5271 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
5273 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
5274 (xinclude_parsing_data::output): Now a std::string reference.
5275 (xinclude_start_include): Adjust.
5276 (xml_xinclude_default): Adjust.
5277 (xml_process_xincludes): Add 'output' parameter, and return bool.
5278 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
5280 * xml-tdesc.c: Include <unordered_map> and <string>.
5281 (tdesc_xml_cache): Delete.
5282 (tdesc_xml_cache_s): Delete.
5283 (xml_cache): Now an std::unordered_map.
5284 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
5285 (target_fetch_description_xml): Change return type to
5286 gdb::optional<std::string>, and adjust.
5287 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
5288 (target_fetch_description_xml): Change return type to
5289 gdb::optional<std::string>.
5291 2017-04-18 Pedro Alves <palves@redhat.com>
5293 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5294 unittests/optional-selftests.c.
5295 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
5296 * unittests/optional-selftests.c: New file.
5297 * unittests/optional/assignment/1.cc: New file.
5298 * unittests/optional/assignment/2.cc: New file.
5299 * unittests/optional/assignment/3.cc: New file.
5300 * unittests/optional/assignment/4.cc: New file.
5301 * unittests/optional/assignment/5.cc: New file.
5302 * unittests/optional/assignment/6.cc: New file.
5303 * unittests/optional/assignment/7.cc: New file.
5304 * unittests/optional/cons/copy.cc: New file.
5305 * unittests/optional/cons/default.cc: New file.
5306 * unittests/optional/cons/move.cc: New file.
5307 * unittests/optional/cons/value.cc: New file.
5308 * unittests/optional/in_place.cc: New file.
5309 * unittests/optional/observers/1.cc: New file.
5310 * unittests/optional/observers/2.cc: New file.
5312 2017-04-18 Pedro Alves <palves@redhat.com>
5314 * common/gdb_optional.h: Include common/traits.h.
5315 (in_place_t): New type.
5316 (in_place): New constexpr variable.
5317 (optional::optional): Remove member initialization of
5319 (optional::optional(in_place_t...)): New constructor.
5320 (optional::~optional): Use reset.
5321 (optional::optional(const optional&)): New.
5322 (optional::optional(const optional&&)): New.
5323 (optional::optional(T &)): New.
5324 (optional::optional(T &&)): New.
5325 (operator::operator=(const optional &)): New.
5326 (operator::operator=(optional &&)): New.
5327 (operator::operator= (const T &))
5328 (operator::operator= (T &&))
5329 (operator::emplace (Args &&... args)): Return a T&. Use reset.
5330 (operator::reset): New.
5331 (operator::m_instantiated):: Add in-class initializer.
5332 * common/traits.h: Include <type_traits>.
5333 (struct And): New types.
5335 2017-04-18 Pedro Alves <palves@redhat.com>
5337 * xml-support.c: Include <vector>.
5338 (scope_level::scope_level(const gdb_xml_element *))
5339 (scope_level::scope_level(scope_level&&)): New.
5340 (scope_level::~scope_level): New.
5341 (scope_level_s): Delete.
5342 (gdb_xml_parser::scopes): Now a std::vector.
5343 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
5345 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
5347 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
5348 of the scopes member. Use std::vector::emplace_back.
5350 2017-04-18 Pedro Alves <palves@redhat.com>
5352 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
5354 (gdb_xml_end_element): Change type of first parameter.
5355 (gdb_xml_cleanup): Rename to ...
5356 (gdb_xml_parser::~gdb_xml_parser): ... this.
5357 (gdb_xml_create_parser_and_cleanup): Delete with ...
5358 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
5360 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
5361 using gdb_xml_create_parser_and_cleanup.
5362 (xinclude_parsing_data): Add ctor/dtor.
5363 (xml_xinclude_cleanup): Delete.
5364 (xml_process_xincludes): Create a local xinclude_parsing_data
5365 instead of heap-allocating one. Create a local gdb_xml_parser
5366 instead of heap-allocating one with
5367 gdb_xml_create_parser_and_cleanup.
5369 2017-04-18 John Baldwin <jhb@FreeBSD.org>
5372 * fbsd-nat.c (resume_one_thread_cb): Remove.
5373 (resume_all_threads_cb): Remove.
5374 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
5375 iterate_over_threads.
5377 2017-04-17 Joel Brobecker <brobecker@adacore.com>
5379 * NEWS: Create a new section for the next release branch.
5380 Rename the section of the current branch, now that it has
5383 2017-04-17 Joel Brobecker <brobecker@adacore.com>
5385 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
5386 * version.in: Bump version to 8.0.50.DATE-git.
5388 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
5391 * windows-nat.c (windows_create_inferior): Declare 'allargs'
5392 independently of the host, and fix build breakage on Cygwin.
5394 2017-04-13 Pedro Alves <palves@redhat.com>
5396 * inferior.c (free_inferior): Convert to ...
5397 (inferior::~inferior): ... this dtor.
5398 (inferior::inferior): New ctor, factored out from ...
5399 (add_inferior_silent): ... here. Allocate the inferior with a new
5401 (delete_inferior): Call delete instead of free_inferior.
5402 * inferior.h (gdb_environ, continuation): Forward declare.
5403 (inferior): Now a class. Add in-class initialization to all
5404 members. Make boolean fields bool, except 'detaching'.
5405 (inferior::inferior): New explicit ctor.
5406 (inferior::~inferior): New.
5408 2017-04-13 Pedro Alves <palves@redhat.com>
5410 * inferior.c (init_inferior_list): Delete.
5411 * inferior.h (init_inferior_list): Delete.
5413 2017-04-13 Pedro Alves <palves@redhat.com>
5416 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
5417 (top level): Call it twice, with different thread sets.
5419 2017-04-13 Pedro Alves <palves@redhat.com>
5421 * thread.c: Include <algorithm>.
5422 (thread_array_cleanup): Delete.
5423 (scoped_inc_dec_ref): New class.
5424 (live_threads_count): New function.
5425 (set_thread_refcount): Delete.
5426 (tp_array_compar_ascending): Now a bool.
5427 (tp_array_compar): Convert to a std::sort comparison function.
5428 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
5429 and live_threads_count.
5431 2017-04-13 Pedro Alves <palves@redhat.com>
5433 * infrun.c (follow_fork_inferior): Also switch the current
5436 2017-04-13 Pedro Alves <palves@redhat.com>
5438 * breakpoint.c (watch_command_1): Save watchpoint-frame info
5439 before calling create_internal_breakpoint.
5441 2017-04-13 Pedro Alves <palves@redhat.com>
5443 * fork-child.c (execv_argv): New class.
5444 (breakup_args): Refactored as ...
5445 (execv_argv::init_for_no_shell): .. this method of execv_argv.
5446 Copy arguments to storage and replace separators with NULL
5447 terminators in place.
5448 (escape_bang_in_quoted_argument): Adjust to return bool.
5449 (execv_argv::execv_argv): New ctor.
5450 (execv_argv::init_for_shell): New method, factored out from
5451 fork_inferior. Don't strdup strings into the vector.
5452 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
5453 Remove free_vector_argv call.
5455 2017-04-13 Yao Qi <yao.qi@linaro.org>
5457 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
5460 2017-04-13 Yao Qi <yao.qi@linaro.org>
5462 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
5463 * rx-tdep.c (rx_gdbarch_init): Likewise.
5465 2017-04-13 Pedro Alves <palves@redhat.com>
5467 * breakpoint.h (struct breakpoint): Reindent.
5469 2017-04-13 Pedro Alves <palves@redhat.com>
5471 * breakpoint.c (bp_location): Rename to ...
5472 (bp_locations): ... this. All references updated.
5473 (bp_location_count): Rename to ...
5474 (bp_locations_count): ... this. All references updated.
5475 (bp_location_placed_address_before_address_max): Rename to ...
5476 (bp_locations_placed_address_before_address_max): ... this. All
5478 (bp_location_shadow_len_after_address_max): Rename to ...
5479 (bp_locations_shadow_len_after_address_max): ... this. All
5481 (bp_location_compare_addrs): Rename to ...
5482 (bp_locations_compare_addrs): ... this. All references updated.
5483 (bp_location_compare):Rename to ...
5484 (bp_locations_compare): ... this. All references updated.
5485 (bp_location_target_extensions_update): Rename to ...
5486 (bp_locations_target_extensions_update): ... this. All references
5489 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5491 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
5492 * common/common.m4: Check headers 'termios.h', 'termio.h' and
5494 * common/gdb_termios.h: New file, with parts of "terminal.h".
5495 * inflow.c: Include "gdb_termios.h".
5496 * ser-unix.c: Include "gdb_termios.h".
5497 * terminal.h: Move terminal-related defines to
5498 "common/gdb_termios.h".
5500 2017-04-12 Tom Tromey <tom@tromey.com>
5502 * probe.c (parse_probes): Update.
5503 * location.h (delete_event_location): Don't declare.
5504 (event_location_deleter::operator()): Update.
5505 * location.c (event_location_deleter::operator()): Rename from
5506 delete_event_location.
5507 * linespec.h (linespec_result) <location>: Change type to
5509 * linespec.c (canonicalize_linespec, event_location_to_sals)
5510 (decode_objc): Update.
5511 (linespec_result): Don't call delete_event_location.
5512 * breakpoint.c (create_breakpoints_sal)
5513 (bkpt_probe_create_sals_from_location)
5514 (strace_marker_create_sals_from_location): Update.
5516 2017-04-12 Tom Tromey <tom@tromey.com>
5518 * linespec.h (struct linespec_result): Add constructor and
5520 (init_linespec_result, destroy_linespec_result)
5521 (make_cleanup_destroy_linespec_result): Don't declare.
5522 * linespec.c (init_linespec_result): Remove.
5523 (linespec_result::~linespec_result): Rename from
5524 destroy_linespec_result. Update.
5525 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
5527 * breakpoint.c (create_breakpoint, break_range_command)
5528 (decode_location_default): Update.
5529 * ax-gdb.c (agent_command_1): Update.
5531 2017-04-12 Tom Tromey <tom@tromey.com>
5533 * remote.c (remote_download_tracepoint): Update.
5534 * python/py-breakpoint.c (bppy_get_location): Update.
5535 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
5536 (gdbscm_breakpoint_location): Update.
5537 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
5538 * breakpoint.h (struct breakpoint) <location, location_range_end>:
5539 Change type to event_location_up.
5540 * breakpoint.c (create_overlay_event_breakpoint)
5541 (create_longjmp_master_breakpoint)
5542 (create_std_terminate_master_breakpoint)
5543 (create_exception_master_breakpoint)
5544 (breakpoint_event_location_empty_p, print_breakpoint_location)
5545 (print_one_breakpoint_location, create_thread_event_breakpoint)
5546 (init_breakpoint_sal, create_breakpoint)
5547 (print_recreate_ranged_breakpoint, break_range_command)
5548 (init_ada_exception_breakpoint, say_where): Update.
5549 (base_breakpoint_dtor): Don't call delete_event_location.
5550 (bkpt_print_recreate, tracepoint_print_recreate)
5551 (dprintf_print_recreate, update_static_tracepoint)
5552 (breakpoint_re_set_default): Update.
5554 2017-04-12 Tom Tromey <tom@tromey.com>
5556 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
5557 type of "to_do". Update.
5558 (compute_stack_depth): Use std::vector.
5560 2017-04-12 Tom Tromey <tom@tromey.com>
5562 * printcmd.c (find_instruction_backward): Use std::vector.
5564 2017-04-12 Tom Tromey <tom@tromey.com>
5566 * symfile.c (objfilep): Remove typedef.
5567 (reread_symbols): Use a std::vector.
5569 2017-04-12 Tom Tromey <tom@tromey.com>
5571 * mi/mi-main.c (exec_direction_forward): Remove.
5572 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
5573 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5575 * guile/guile.c (guile_repl_command, guile_command)
5576 (gdbscm_execute_gdb_command): Use scoped_restore.
5577 * go-exp.y (go_parse): Use scoped_restore.
5578 * d-exp.y (d_parse): Use scoped_restore.
5579 * cli/cli-decode.c (cmd_func): Use scoped_restore.
5580 * c-exp.y (c_parse): Use scoped_restore.
5582 2017-04-12 Tom Tromey <tom@tromey.com>
5584 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
5585 (mi_parse): Update return type.
5586 (mi_parse_free): Remove.
5587 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
5588 (mi_parse::~mi_parse): Rename from mi_parse_free.
5589 (mi_parse_cleanup): Remove.
5590 (mi_parse): Return a unique_ptr. Use new.
5591 * mi/mi-main.c (mi_execute_command): Update.
5593 2017-04-12 Tom Tromey <tom@tromey.com>
5595 * location.c (explicit_location_lex_one): Return a
5597 (string_to_explicit_location): Update. Remove cleanups.
5599 2017-04-12 Tom Tromey <tom@tromey.com>
5601 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
5602 (compare_value_and_voffset): Change type. Update.
5603 (compute_vtable_size): Change type of "offset_vec".
5604 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
5605 (gnuv3_get_typeid): Remove extraneous declaration.
5607 2017-04-12 Tom Tromey <tom@tromey.com>
5609 * charset.h (wchar_iterator): Fix comment.
5611 2017-04-12 Tom Tromey <tom@tromey.com>
5613 * charset.c (iconv_wrapper): New class.
5614 (cleanup_iconv): Remove.
5615 (convert_between_encodings): Use it.
5617 2017-04-12 Tom Tromey <tom@tromey.com>
5619 * symfile.h (increment_reading_symtab): Update type.
5620 * symfile.c (decrement_reading_symtab): Remove.
5621 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
5622 * psymtab.c (psymtab_to_symtab): Update.
5623 * dwarf2read.c (dw2_instantiate_symtab): Update.
5625 2017-04-12 Tom Tromey <tom@tromey.com>
5627 * jit.c (struct jit_reader): Declare separately. Add constructor
5628 and destructor. Change type of "handle".
5629 (loaded_jit_reader): Define separately.
5630 (jit_reader_load): Update. New "new".
5631 (jit_reader_unload_command): Use "delete".
5632 * gdb-dlfcn.h (struct dlclose_deleter): New.
5633 (gdb_dlhandle_up): New typedef.
5634 (gdb_dlopen, gdb_dlsym): Update types.
5635 (gdb_dlclose): Remove.
5636 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
5637 (gdb_dlsym): Change type of "handle".
5638 (make_cleanup_dlclose): Remove.
5639 (dlclose_deleter::operator()): Rename from gdb_dlclose.
5640 * compile/compile-c-support.c (load_libcc): Update.
5642 2017-04-12 Tom Tromey <tom@tromey.com>
5644 * symtab.h (find_pcs_for_symtab_line): Change return type.
5645 * symtab.c (find_pcs_for_symtab_line): Change return type.
5646 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
5647 type of "vec". Update.
5648 (ltpy_get_pcs_for_line): Update.
5649 * linespec.c (decode_digits_ordinary): Update.
5651 2017-04-12 Tom Tromey <tom@tromey.com>
5653 * tracepoint.c (actions_command): Update.
5654 * python/python.c (python_command, python_interactive_command):
5656 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5657 * guile/guile.c (guile_command): Update.
5658 * defs.h (read_command_lines, read_command_lines_1): Return
5660 (command_lines_deleter): New struct.
5661 (command_line_up): New typedef.
5662 * compile/compile.c (compile_code_command)
5663 (compile_print_command): Update.
5664 * cli/cli-script.h (get_command_line, copy_command_lines): Return
5666 (make_cleanup_free_command_lines): Remove.
5667 * cli/cli-script.c (get_command_line, read_command_lines_1)
5668 (copy_command_lines): Return command_line_up.
5669 (while_command, if_command, read_command_lines, define_command)
5670 (document_command): Update.
5671 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
5673 * breakpoint.h (breakpoint_set_commands): Change type of
5675 * breakpoint.c (breakpoint_set_commands): Change type of
5677 (do_map_commands_command, update_dprintf_command_list)
5678 (create_tracepoint_from_upload): Update.
5680 2017-04-12 Tom Tromey <tom@tromey.com>
5682 * tracepoint.c (scope_info): Update.
5683 * spu-tdep.c (spu_catch_start): Update.
5684 * python/python.c (gdbpy_decode_line): Update.
5685 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
5686 * python/py-breakpoint.c (bppy_init): Update.
5687 * probe.c (parse_probes): Update.
5688 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
5689 * location.h (event_location_deleter): New struct.
5690 (event_location_up): New typedef.
5691 (new_linespec_location, new_address_location, new_probe_location)
5692 (new_explicit_location, copy_event_location)
5693 (string_to_event_location, string_to_event_location_basic)
5694 (string_to_explicit_location): Update return type.
5695 (make_cleanup_delete_event_location): Remove.
5696 * location.c (new_linespec_location, new_address_location)
5697 (new_probe_location, new_explicit_location, copy_event_location):
5698 Return event_location_up.
5699 (delete_event_location_cleanup)
5700 (make_cleanup_delete_event_location): Remove.
5701 (string_to_explicit_location, string_to_event_location_basic)
5702 (string_to_event_location): Return event_location_up.
5703 * linespec.c (canonicalize_linespec, event_location_to_sals)
5704 (decode_line_with_current_source)
5705 (decode_line_with_last_displayed, decode_objc): Update.
5706 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
5707 * completer.c (location_completer): Update.
5708 * cli/cli-cmds.c (edit_command, list_command): Update.
5709 * breakpoint.c (create_overlay_event_breakpoint)
5710 (create_longjmp_master_breakpoint)
5711 (create_std_terminate_master_breakpoint)
5712 (create_exception_master_breakpoint)
5713 (create_thread_event_breakpoint): Update.
5714 (init_breakpoint_sal): Update. Remove some dead code.
5715 (create_breakpoint_sal): Change type of "location". Update.
5716 (create_breakpoints_sal, create_breakpoint, break_command_1)
5717 (dprintf_command, break_range_command, until_break_command)
5718 (init_ada_exception_breakpoint)
5719 (strace_marker_create_sals_from_location)
5720 (update_static_tracepoint, trace_command, ftrace_command)
5721 (strace_command, create_tracepoint_from_upload): Update.
5722 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5723 * ax-gdb.c (agent_command_1): Update.
5725 2017-04-12 Pedro Alves <palves@redhat.com>
5727 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
5728 * configure.tgt: Handle i[34567]86-*-go32* and
5729 i[34567]86-*-msdosdjgpp*.
5730 * i386-tdep.c (i386_svr4_reg_to_regnum):
5732 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
5734 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
5735 * i386-go32-tdep.c: New file.
5736 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
5739 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
5741 * aix-thread.c (pd_status2str): Change return type to const char *.
5743 2017-04-12 Pedro Alves <palves@redhat.com>
5745 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
5746 calls to set_gdbarch_gnu_triplet_regexp.
5748 2017-04-12 Pedro Alves <palves@redhat.com>
5751 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
5753 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
5754 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
5755 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
5756 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
5757 * gdbarch.h, gdbarch.c: Regenerate.
5758 * aarch64-tdep.c (aarch64_gdbarch_init): Override
5759 gdbarch_wchar_bit and gdbarch_wchar_signed.
5760 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
5761 * arm-tdep.c (arm_gdbarch_init): Likewise.
5762 * avr-tdep.c (avr_gdbarch_init): Likewise.
5763 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
5764 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
5765 * i386-tdep.c (i386_go32_init_abi): Likewise.
5766 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5767 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5768 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5769 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5770 * sh-tdep.c (sh_gdbarch_init): Likewise.
5771 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5772 * sparc64-tdep.c (sparc64_init_abi): Likewise.
5773 * windows-tdep.c (windows_init_abi): Likewise.
5774 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5776 2017-04-12 Pedro Alves <palves@redhat.com>
5779 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
5780 cplus_primitive_type_char32_t>: New enum values.
5781 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
5782 and cplus_primitive_type_char32_t.
5783 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
5784 32, use the archtecture's built-in type for char16_t and char32_t,
5785 respectively. Otherwise, fallback to init_integer_type as before,
5786 but make the type unsigned, and issue a complaint.
5787 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
5789 2017-04-12 Alan Hayward <alan.hayward@arm.com>
5791 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
5792 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
5794 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5796 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
5799 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5801 * common/common-utils.c (free_vector_argv): New function.
5802 * common/common-utils.h: Include <vector>.
5803 (free_vector_argv): New prototype.
5804 * darwin-nat.c (darwin_create_inferior): Rewrite function
5805 prototype in order to constify "exec_file" and accept a
5806 "std::string" for "allargs".
5807 * fork-child.c: Include <vector>.
5808 (breakup_args): Rewrite function, using C++.
5809 (fork_inferior): Rewrite function header, constify "exec_file_arg"
5810 and accept "std::string" for "allargs". Update the code to
5811 calculate "argv" based on "allargs". Update calls to "exec_fun"
5813 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
5814 order to constify "exec_file" and accept a "std::string" for
5816 * go32-nat.c (go32_create_inferior): Likewise.
5817 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
5818 * infcmd.c (run_command_1): Constify "exec_file". Use
5819 "std::string" for inferior arguments.
5820 * inferior.h (fork_inferior): Update prototype.
5821 * linux-nat.c (linux_nat_create_inferior): Rewrite function
5822 prototype in order to constify "exec_file" and accept a
5823 "std::string" for "allargs".
5824 * nto-procfs.c (procfs_create_inferior): Likewise.
5825 * procfs.c (procfs_create_inferior): Likewise.
5826 * remote-sim.c (gdbsim_create_inferior): Likewise.
5827 * remote.c (extended_remote_run): Update code to accept
5828 "std::string" as argument.
5829 (extended_remote_create_inferior): Rewrite function prototype in
5830 order to constify "exec_file" and accept a "std::string" for
5832 * rs6000-nat.c (super_create_inferior): Likewise.
5833 (rs6000_create_inferior): Likewise.
5834 * target.h (struct target_ops) <to_create_inferior>: Likewise.
5835 * windows-nat.c (windows_create_inferior): Likewise.
5837 2017-04-11 Pedro Alves <palves@redhat.com>
5839 * thread.c: Fix whitespace throughout.
5841 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
5843 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
5845 2017-04-11 Alan Hayward <alan.hayward@arm.com>
5847 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
5849 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
5852 * osdata.c (info_osdata): Check if 'type' is an empty string
5855 2017-04-10 Pedro Alves <palves@redhat.com>
5857 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
5858 (ptid_to_global_thread_id, in_thread_list)
5859 (do_captured_list_thread_ids, set_resumed, set_running)
5860 (set_executing, set_stop_requested, finish_thread_state)
5861 (validate_registers_access, can_access_registers_ptid)
5862 (print_thread_info_1, switch_to_thread)
5863 (do_restore_current_thread_cleanup)
5864 (make_cleanup_restore_current_thread, thread_command)
5865 (thread_name_command): Use operator== instead of ptid_equal.
5867 2017-04-10 Pedro Alves <palves@redhat.com>
5869 * thread.c (struct current_thread_cleanup) <next>: Delete field.
5870 (current_thread_cleanup_chain): Delete.
5871 (restore_current_thread_cleanup_dtor)
5872 (make_cleanup_restore_current_thread): Remove references to
5873 current_thread_cleanup_chain.
5875 2017-04-10 Alan Hayward <alan.hayward@arm.com>
5877 * msp430-tdep.c (msp430_pseudo_register_read): Never return
5880 2017-04-10 Yao Qi <yao.qi@linaro.org>
5883 * gdbthread.h (thread_info::deletable): New method.
5884 (thread_info::incref): New method.
5885 (thread_info::decref): New method.
5886 (thread_info::refcount): Move it to private.
5887 * infrun.c (save_stop_context): Call inc_refcount.
5888 (release_stop_context_cleanup): Likewise.
5889 * thread.c (set_thread_exited): New function.
5890 (init_thread_list): Delete "tp" only it is deletable, otherwise
5891 call set_thread_exited.
5892 (delete_thread_1): Call set_thread_exited.
5893 (current_thread_cleanup) <inferior_pid>: Remove.
5894 <thread>: New field.
5895 (restore_current_thread_ptid_changed): Removed.
5896 (do_restore_current_thread_cleanup): Adjust.
5897 (restore_current_thread_cleanup_dtor): Don't call
5899 (set_thread_refcount): Use dec_refcount.
5900 (make_cleanup_restore_current_thread): Adjust.
5901 (thread_apply_all_command): Call inc_refcount.
5902 (_initialize_thread): Don't call
5903 observer_attach_thread_ptid_changed.
5905 2017-04-10 Yao Qi <yao.qi@linaro.org>
5907 * thread.c (delete_thread_1): Hoist code on marking thread as
5910 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5912 * windows-nat.c (windows_detach): Initialize ptid with
5915 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
5917 * unittests/ptid-selftests.c: Fix erroneous assert messages.
5919 2017-04-07 Alan Hayward <alan.hayward@arm.com>
5921 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
5922 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
5923 (bfin_pseudo_register_write): Likewise
5925 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
5927 * common/ptid.h (struct ptid): Change to...
5928 (class ptid_t): ... this.
5929 <ptid_t>: New constructors.
5930 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
5931 matches>: New methods.
5932 <make_null, make_minus_one>: New static methods.
5939 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
5940 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
5941 as references, move comment to class ptid_t.
5942 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
5943 ptid_t static methods.
5944 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
5945 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
5946 Take ptid arguments as references, implement using ptid_t methods.
5947 * unittests/ptid-selftests.c: New file.
5948 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5949 unittests/ptid-selftests.c.
5950 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
5952 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
5954 * python/python.c (python_run_simple_file): Cast mode literal to
5955 non-const char pointer as expected by PyFile_FromString.
5957 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
5959 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
5960 minus_one_ptid and null_ptid.
5962 2017-04-05 Pedro Alves <palves@redhat.com>
5964 * warning.m4 (build_warnings): Remove -Wno-write-strings.
5965 * configure: Regenerate.
5967 2017-04-05 Pedro Alves <palves@redhat.com>
5969 * ada-exp.y (yyerror): Constify.
5970 * ada-lang.c (bound_name, get_selections)
5971 (ada_variant_discrim_type)
5972 (ada_variant_discrim_name, ada_value_struct_elt)
5973 (ada_lookup_struct_elt_type, is_unchecked_variant)
5974 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
5975 (catch_ada_exception_command_split)
5976 (catch_ada_assert_command_split, catch_assert_command)
5977 (ada_op_name): Constify.
5978 * ada-lang.h (ada_yyerror, get_selections)
5979 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
5980 * arc-tdep.c (arc_print_frame_cache): Constify.
5981 * arm-tdep.c (arm_skip_stub): Constify.
5982 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
5983 (gen_aggregate_elt_ref): Constify.
5984 * bcache.c (print_bcache_statistics): Constify.
5985 * bcache.h (print_bcache_statistics): Constify.
5986 * break-catch-throw.c (catch_exception_command_1):
5987 * breakpoint.c (struct ep_type_description::description):
5989 (add_solib_catchpoint): Constify.
5990 (catch_fork_command_1): Add cast.
5991 (add_catch_command): Constify.
5992 * breakpoint.h (add_catch_command, add_solib_catchpoint):
5994 * bsd-uthread.c (bsd_uthread_state): Constify.
5995 * buildsym.c (patch_subfile_names): Constify.
5996 * buildsym.h (next_symbol_text_func, patch_subfile_names):
5998 * c-exp.y (yyerror): Constify.
5999 (token::oper): Constify.
6000 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
6001 * c-varobj.c (cplus_describe_child): Constify.
6002 * charset.c (find_charset_names): Add cast.
6003 (find_charset_names): Constify array and add const_cast.
6004 * cli/cli-cmds.c (complete_command, cd_command): Constify.
6005 (edit_command): Constify.
6006 * cli/cli-decode.c (lookup_cmd): Constify.
6007 * cli/cli-dump.c (dump_memory_command, dump_value_command):
6009 (struct dump_context): Constify.
6010 (add_dump_command, restore_command): Constify.
6011 * cli/cli-script.c (get_command_line): Constify.
6012 * cli/cli-script.h (get_command_line): Constify.
6013 * cli/cli-utils.c (check_for_argument): Constify.
6014 * cli/cli-utils.h (check_for_argument): Constify.
6015 * coff-pe-read.c (struct read_pe_section_data): Constify.
6016 * command.h (lookup_cmd): Constify.
6017 * common/print-utils.c (decimal2str): Constify.
6018 * completer.c (gdb_print_filename): Constify.
6019 * corefile.c (set_gnutarget): Constify.
6020 * cp-name-parser.y (yyerror): Constify.
6021 * cp-valprint.c (cp_print_class_member): Constify.
6022 * cris-tdep.c (cris_register_name, crisv32_register_name):
6024 * d-exp.y (yyerror): Constify.
6025 (struct token::oper): Constify.
6026 * d-lang.h (d_yyerror): Constify.
6027 * dbxread.c (struct header_file_location::name): Constify.
6028 (add_old_header_file, add_new_header_file, last_function_name)
6029 (dbx_next_symbol_text, add_bincl_to_list)
6030 (find_corresponding_bincl_psymtab, set_namestring)
6031 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
6032 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
6033 * defs.h (command_line_input, print_address_symbolic)
6034 (deprecated_readline_begin_hook): Constify.
6035 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
6037 * event-top.c (handle_line_of_input): Constify and add cast.
6038 * exceptions.c (catch_errors): Constify.
6039 * exceptions.h (catch_errors): Constify.
6040 * expprint.c (print_subexp_standard, op_string, op_name)
6041 (op_name_standard, dump_raw_expression, dump_raw_expression):
6042 * expression.h (op_name, op_string, dump_raw_expression):
6044 * f-exp.y (yyerror): Constify.
6045 (struct token::oper): Constify.
6046 (struct f77_boolean_val::name): Constify.
6047 * f-lang.c (f_word_break_characters): Constify.
6048 * f-lang.h (f_yyerror): Constify.
6049 * fork-child.c (fork_inferior): Add cast.
6050 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
6051 (new_variant): Constify.
6052 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
6053 * gdbarch.c: Regenerate.
6054 * gdbcore.h (set_gnutarget): Constify.
6055 * go-exp.y (yyerror): Constify.
6056 (token::oper): Constify.
6057 * go-lang.h (go_yyerror): Constify.
6058 * go32-nat.c (go32_sysinfo): Constify.
6059 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
6060 * guile/scm-cmd.c (cmdscm_function): Constify.
6061 * guile/scm-param.c (pascm_param_value): Constify.
6062 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
6063 (h8300sx_register_name): Constify.
6064 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
6066 * ia64-tdep.c (ia64_register_names): Constify.
6067 * infcmd.c (construct_inferior_arguments): Constify.
6068 (path_command, attach_post_wait): Constify.
6069 * language.c (show_range_command, show_case_command)
6070 (unk_lang_error): Constify.
6071 * language.h (language_defn::la_error)
6072 (language_defn::la_name_of_this): Constify.
6073 * linespec.c (decode_line_2): Constify.
6074 * linux-thread-db.c (thread_db_err_str): Constify.
6075 * lm32-tdep.c (lm32_register_name): Constify.
6076 * m2-exp.y (yyerror): Constify.
6077 * m2-lang.h (m2_yyerror): Constify.
6078 * m32r-tdep.c (m32r_register_names): Constify and make static.
6079 * m68hc11-tdep.c (m68hc11_register_names): Constify.
6080 * m88k-tdep.c (m88k_register_name): Constify.
6081 * macroexp.c (appendmem): Constify.
6082 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
6083 (upgrade_type, parse_external, parse_partial_symbols)
6084 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
6085 (new_symbol): Constify.
6086 * memattr.c (mem_info_command): Constify.
6087 * mep-tdep.c (register_name_from_keyword): Constify.
6088 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
6090 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
6091 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
6092 * mi/mi-main.c (captured_mi_execute_command): Constify and add
6094 (mi_execute_async_cli_command): Constify.
6095 * mips-tdep.c (mips_register_name): Constify.
6096 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
6097 (am33_register_name, am33_2_register_name)
6098 * moxie-tdep.c (moxie_register_names): Constify.
6099 * nat/linux-osdata.c (osdata_type): Constify fields.
6100 * nto-tdep.c (nto_parse_redirection): Constify.
6101 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
6102 (lookup_child_selector): Constify.
6103 (objc_methcall::name): Constify.
6104 * objc-lang.h (lookup_objc_class, lookup_child_selector)
6105 (lookup_struct_typedef): Constify.
6106 * objfiles.c (pc_in_section): Constify.
6107 * objfiles.h (pc_in_section): Constify.
6108 * p-exp.y (struct token::oper): Constify.
6109 (yyerror): Constify.
6110 * p-lang.h (pascal_yyerror): Constify.
6111 * parser-defs.h (op_name_standard): Constify.
6112 (op_print::string): Constify.
6113 (exp_descriptor::op_name): Constify.
6114 * printcmd.c (print_address_symbolic): Constify.
6115 * psymtab.c (print_partial_symbols): Constify.
6116 * python/py-breakpoint.c (stop_func): Constify.
6117 (bppy_get_expression): Constify.
6118 * python/py-cmd.c (cmdpy_completer::name): Constify.
6119 (cmdpy_function): Constify.
6120 * python/py-event.c (evpy_add_attribute)
6121 (gdbpy_initialize_event_generic): Constify.
6122 * python/py-event.h (evpy_add_attribute)
6123 (gdbpy_initialize_event_generic): Constify.
6124 * python/py-evts.c (add_new_registry): Constify.
6125 * python/py-finishbreakpoint.c (outofscope_func): Constify.
6126 * python/py-framefilter.c (get_py_iter_from_func): Constify.
6127 * python/py-inferior.c (get_buffer): Add cast.
6128 * python/py-param.c (parm_constant::name): Constify.
6129 * python/py-unwind.c (fprint_frame_id): Constify.
6130 * python/python.c (gdbpy_parameter_value): Constify.
6131 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
6132 * remote.c (memory_packet_config::name): Constify.
6133 (show_packet_config_cmd, remote_write_bytes)
6134 (remote_buffer_add_string):
6135 * reverse.c (exec_reverse_once): Constify.
6136 * rs6000-tdep.c (variant::name, variant::description): Constify.
6137 * rust-exp.y (rustyyerror): Constify.
6138 * rust-lang.c (rust_op_name): Constify.
6139 * rust-lang.h (rustyyerror): Constify.
6140 * serial.h (serial_ops::name): Constify.
6141 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
6142 (sh_sh3e_register_name, sh_sh2e_register_name)
6143 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
6144 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
6145 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
6146 (sh_sh4al_dsp_register_name): Constify.
6147 * sh64-tdep.c (sh64_register_name): Constify.
6148 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
6149 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
6150 * stabsread.c (patch_block_stabs, read_type_number)
6151 (ref_map::stabs, ref_add, process_reference)
6152 (symbol_reference_defined, define_symbol, define_symbol)
6153 (error_type, read_type, read_member_functions, read_cpp_abbrev)
6154 (read_one_struct_field, read_struct_fields, read_baseclasses)
6155 (read_tilde_fields, read_struct_type, read_array_type)
6156 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
6157 (read_huge_number, read_range_type, read_args, common_block_start)
6158 (find_name_end): Constify.
6159 * stabsread.h (common_block_start, define_symbol)
6160 (process_one_symbol, symbol_reference_defined, ref_add):
6161 * symfile.c (get_section_index, add_symbol_file_command):
6162 * symfile.h (get_section_index): Constify.
6163 * target-descriptions.c (tdesc_type::name): Constify.
6164 (tdesc_free_type): Add cast.
6165 * target.c (find_default_run_target):
6166 (add_deprecated_target_alias, find_default_run_target)
6167 (target_announce_detach): Constify.
6168 (do_option): Constify.
6169 * target.h (add_deprecated_target_alias): Constify.
6170 * thread.c (print_thread_info_1): Constify.
6171 * top.c (deprecated_readline_begin_hook, command_line_input):
6173 (init_main): Add casts.
6174 * top.h (handle_line_of_input): Constify.
6175 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
6176 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
6177 (tfind_command): Rename to ...
6178 (tfind_command_1): ... this and constify.
6179 (tfind_command): New function.
6180 (tfind_end_command, tfind_start_command): Adjust.
6181 (encode_source_string): Constify.
6182 * tracepoint.h (encode_source_string): Constify.
6183 * tui/tui-data.c (tui_partial_win_by_name): Constify.
6184 * tui/tui-data.h (tui_partial_win_by_name): Constify.
6185 * tui/tui-source.c (tui_set_source_content_nil): Constify.
6186 * tui/tui-source.h (tui_set_source_content_nil): Constify.
6187 * tui/tui-win.c (parse_scrolling_args): Constify.
6188 * tui/tui-windata.c (tui_erase_data_content): Constify.
6189 * tui/tui-windata.h (tui_erase_data_content): Constify.
6190 * tui/tui-winsource.c (tui_erase_source_content): Constify.
6191 * tui/tui.c (tui_enable): Add cast.
6192 * utils.c (defaulted_query): Constify.
6193 (init_page_info): Add cast.
6194 (puts_debug, subset_compare): Constify.
6195 * utils.h (subset_compare): Constify.
6196 * varobj.c (varobj_format_string): Constify.
6197 * varobj.h (varobj_format_string): Constify.
6198 * vax-tdep.c (vax_register_name): Constify.
6199 * windows-nat.c (windows_detach): Constify.
6200 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
6201 * xml-support.c (gdb_xml_end_element): Constify.
6202 * xml-tdesc.c (tdesc_start_reg): Constify.
6203 * xstormy16-tdep.c (xstormy16_register_name): Constify.
6204 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
6205 * xtensa-tdep.h (xtensa_register_t::name): Constify.
6207 2017-04-05 Pedro Alves <palves@redhat.com>
6209 * proc-api.c (struct trans): Constify.
6210 (procfs_note): Constify.
6211 * proc-events.c (struct trans, syscall_table):
6212 * proc-flags.c (struct trans): Constify.
6213 * proc-utils.h (procfs_note): Constify.
6214 * proc-why.c (struct trans): Constify.
6215 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
6216 (procfs_detach): Constify.
6217 * sol-thread.c (struct string_map): Constify.
6218 (td_err_string, td_state_string): Constify.
6220 2017-04-05 Pedro Alves <palves@redhat.com>
6222 * proc-api.c (procfs_filename): Don't initialize
6224 (prepare_to_trace): Assume procfs_filename is non-NULL.
6225 (_initialize_proc_api): Give procfs_filename a default value here.
6227 2017-04-05 Pedro Alves <palves@redhat.com>
6229 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
6230 'cond_string' parameter.
6231 (extract_exception_regexp): Constify 'string' parameter.
6232 (catch_exception_command_1): Constify.
6233 * breakpoint.c (init_catchpoint)
6234 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
6236 (ep_parse_optional_if_clause, catch_fork_command_1)
6237 (catch_exec_command_1): Constify.
6238 * breakpoint.h (init_catchpoint): Constify 'cond_string'
6240 (ep_parse_optional_if_clause): Constify.
6241 * cli/cli-utils.c (remove_trailing_whitespace)
6242 (check_for_argument): Constify.
6243 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
6245 (check_for_argument): Likewise.
6247 2017-04-05 Pedro Alves <palves@redhat.com>
6249 * event-top.c (command_line_handler): Add cast to execute_command
6251 * record-btrace.c (cmd_record_btrace_bts_start)
6252 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
6253 (cmd_record_btrace_start): Add cast to execute_command call.
6254 * record-full.c (record_full_goto_insn):
6255 * record.c (record_start, record_stop): Add cast to
6256 execute_command_to_string calls.
6257 (cmd_record_start): Add cast to execute_command calls.
6259 2017-04-05 Pedro Alves <palves@redhat.com>
6261 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
6262 static inline function.
6263 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
6264 array and use gdb_PyArg_ParseTupleAndKeywords.
6265 * python/py-cmd.c (cmdpy_init): Likewise.
6266 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
6267 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
6268 (infpy_search_memory): Likewise.
6269 * python/py-objfile.c (objfpy_add_separate_debug_file)
6270 (gdbpy_lookup_objfile): Likewise.
6271 * python/py-symbol.c (gdbpy_lookup_symbol)
6272 (gdbpy_lookup_global_symbol): Likewise.
6273 * python/py-type.c (gdbpy_lookup_type): Likewise.
6274 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
6275 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
6278 2017-04-05 Pedro Alves <palves@redhat.com>
6280 * python/python-internal.h (gdb_PyGetSetDef): New type.
6281 * python/py-block.c (block_object_getset)
6282 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
6283 * python/py-event.c (event_object_getset)
6284 (finish_breakpoint_object_getset): Likewise.
6285 * python/py-inferior.c (inferior_object_getset): Likewise.
6286 * python/py-infthread.c (thread_object_getset): Likewise.
6287 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
6288 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
6289 * python/py-objfile.c (objfile_getset): Likewise.
6290 * python/py-progspace.c (pspace_getset): Likewise.
6291 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
6293 * python/py-record.c (recpy_record_getset): Likewise.
6294 * python/py-symbol.c (symbol_object_getset): Likewise.
6295 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
6297 * python/py-type.c (type_object_getset, field_object_getset):
6299 * python/py-value.c (value_object_getset): Likewise.
6301 2017-04-05 Pedro Alves <palves@redhat.com>
6303 * python/python-internal.h (gdb_PyObject_CallMethod)
6304 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
6306 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
6307 (PySys_GetObject, PySys_SetPath): New macros.
6309 2017-04-05 Pedro Alves <palves@redhat.com>
6311 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
6312 info_osdata_command.
6313 * osdata.c (info_osdata_command): Rename to ...
6314 (info_osdata): ... this. Constify 'type' parameter, and remove
6315 the 'from_tty' parameter. Accept NULL TYPE.
6316 (info_osdata_command): New function.
6317 * osdata.h (info_osdata_command): Remove declaration.
6318 (info_osdata): New declaration.
6320 2017-04-05 Pedro Alves <palves@redhat.com>
6322 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
6323 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
6324 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
6326 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
6327 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
6328 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
6330 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
6331 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
6332 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
6333 (mi_cmd_file_list_exec_source_files)
6334 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
6335 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6336 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
6338 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
6339 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
6340 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
6341 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
6342 (mi_cmd_stack_info_frame): Constify 'command' parameter.
6343 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
6344 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
6345 'command' parameter.
6346 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
6347 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
6348 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
6349 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
6350 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
6351 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
6352 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
6353 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
6354 (mi_cmd_var_set_update_range): Constify 'command' parameter.
6355 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
6356 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
6358 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
6359 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
6360 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
6361 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
6362 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
6363 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
6364 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
6365 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
6366 (mi_cmd_data_list_changed_registers)
6367 (mi_cmd_data_write_register_values)
6368 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
6369 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
6370 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
6371 (mi_cmd_list_features, mi_cmd_list_target_features)
6372 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
6373 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
6374 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
6375 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
6376 (mi_cmd_trace_frame_collected): Constify 'command'
6378 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
6379 'command' parameter.
6381 2017-04-05 Pedro Alves <palves@redhat.com>
6383 * ada-lang.c (ada_completer_word_break_characters): Now a const
6385 (ada_get_gdb_completer_word_break_characters): Constify.
6386 * completer.c (gdb_completer_command_word_break_characters)
6387 (gdb_completer_file_name_break_characters)
6388 (gdb_completer_quote_characters): Now const arrays.
6389 (get_gdb_completer_quote_characters): Constify.
6390 (set_rl_completer_word_break_characters): New function.
6391 (set_gdb_completion_word_break_characters)
6392 (complete_line_internal): Use it.
6393 * completer.h (get_gdb_completer_quote_characters): Constify.
6394 (set_rl_completer_word_break_characters): Declare.
6395 * f-lang.c (f_word_break_characters): Constify.
6396 * language.c (default_word_break_characters): Constify.
6397 * language.h (language_defn::la_word_break_characters): Constify.
6398 (default_word_break_characters): Constify.
6399 * top.c (init_main): Use set_rl_completer_word_break_characters.
6401 2017-04-05 Pedro Alves <palves@redhat.com>
6403 * aix-thread.c (aix_thread_pid_to_str)
6404 (aix_thread_extra_thread_info): Constify.
6405 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
6406 * bsd-uthread.c (bsd_uthread_extra_thread_info)
6407 (bsd_uthread_pid_to_str): Constify.
6408 * corelow.c (core_pid_to_str): Constify.
6409 * darwin-nat.c (darwin_pid_to_str): Constify.
6410 * fbsd-nat.c (fbsd_pid_to_str): Constify.
6411 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
6413 * gnu-nat.c (gnu_pid_to_str): Constify.
6414 * go32-nat.c (go32_pid_to_str): Constify.
6415 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
6416 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
6417 * inferior.c (inferior_pid_to_str): Constify.
6418 * linux-nat.c (linux_nat_pid_to_str): Constify.
6419 * linux-tdep.c (linux_core_pid_to_str): Constify.
6420 * linux-thread-db.c (thread_db_pid_to_str)
6421 (thread_db_extra_thread_info): Constify.
6422 * nto-tdep.c (nto_extra_thread_info): Constify.
6423 * nto-tdep.h (nto_extra_thread_info): Constify.
6424 * obsd-nat.c (obsd_pid_to_str): Constify.
6425 * procfs.c (procfs_pid_to_str): Constify.
6426 * ravenscar-thread.c (ravenscar_extra_thread_info)
6427 (ravenscar_pid_to_str): Constify.
6428 * remote-sim.c (gdbsim_pid_to_str): Constify.
6429 * remote.c (remote_threads_extra_info, remote_pid_to_str):
6431 * sol-thread.c (solaris_pid_to_str): Constify.
6432 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
6433 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
6434 * target.c (default_pid_to_str, target_pid_to_str)
6435 (normal_pid_to_str, default_pid_to_str): Constify.
6436 * target.h (target_ops::to_pid_to_str)
6437 (target_ops::to_extra_thread_info): Constify.
6438 (target_pid_to_str, normal_pid_to_str): Constify.
6439 * windows-nat.c (windows_pid_to_str): Constify.
6440 * gdbarch.sh (core_pid_to_str): Constify.
6441 * target-delegates.c: Regenerate.
6442 * gdbarch.h, gdbarch.c: Regenerate.
6444 2017-04-05 Pedro Alves <palves@redhat.com>
6446 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
6447 the memory of the temporary warning_pre_print override.
6448 * utils.c (warning_pre_print): Constify.
6449 * utils.h (warning_pre_print): Constify.
6451 2017-04-05 Pedro Alves <palves@redhat.com>
6453 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
6454 (shell_command): New function.
6455 (make_command): Use std::string.
6456 (init_cli_cmds): Register shell_command instead of shell_escape.
6458 2017-04-05 Pedro Alves <palves@redhat.com>
6460 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
6461 * tracepoint.c (default_collect): Don't initialize.
6463 2017-04-05 Pedro Alves <palves@redhat.com>
6465 * macroexp.c (macro_buffer::shared): Now a bool.
6466 (init_buffer): Update.
6467 (init_shared_buffer): Constify 'addr' parameter.
6468 (substitute_args, expand, macro_expand, macro_expand_next): Remove
6471 2017-04-05 Pedro Alves <palves@redhat.com>
6473 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
6474 * disasm.c (set_disassembler_options): Constify local.
6475 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
6477 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
6480 * tracefile.c (tsave_command): Fix argument parsing for '-r'
6483 2017-04-05 Yao Qi <yao.qi@linaro.org>
6485 * frame.c (frame_unwind_register_unsigned): Call
6486 frame_unwind_register_value.
6488 2017-04-05 Yao Qi <yao.qi@linaro.org>
6490 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
6491 Use gdb_test_multiple, and don't match anchor.
6493 2017-04-05 Pedro Alves <palves@redhat.com>
6495 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
6496 (Write After Approval): Remove Simon Marchi.
6498 2017-04-05 Pedro Alves <palves@redhat.com>
6500 * common/gdb_optional.h (optional::optional): Make constexpr and
6503 2017-04-04 John Baldwin <jhb@FreeBSD.org>
6505 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6506 (amd64fbsd_jmp_buf_reg_offset): Remove.
6507 (amd64fbsd_supply_uthread): Remove function.
6508 (amd64fbsd_collect_uthread): Remove function.
6509 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
6510 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
6511 (x86_64-*-freebsd*): Remove bsd-uthread.o.
6512 (fbsd-nat.c): Update comment.
6513 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6514 (i386fbsd_jmp_buf_reg_offset): Remove.
6515 (i386fbsd_supply_uthread): Remove function.
6516 (i386fbsd_collect_uthread): Remove function.
6517 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
6519 2017-04-04 John Baldwin <jhb@FreeBSD.org>
6521 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
6522 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
6523 * NEWS: Mention that support for FreeBSD/alpha was removed.
6524 * alpha-fbsd-tdep.c: Delete file.
6525 * config/alpha/fbsd.mh: Delete file.
6526 * configure.host: Delete alpha*-*-freebsd* and
6527 alpha*-*-kfreebsd*-gnu.
6528 * configure.tgt: Delete alpha*-*-freebsd* and
6529 alpha*-*-kfreebsd*-gnu.
6531 2017-04-04 John Baldwin <jhb@FreeBSD.org>
6533 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
6534 amd64bsd_store_inferior_registers): Use ptid from regcache.
6536 2017-04-04 Pedro Alves <palves@redhat.com>
6538 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
6539 data fields, make them private and add "m_" prefixes.
6540 (lnp_state_machine::lnp_state_machine): New ctor.
6541 (record_line, check_line_address, handle_set_discriminator)
6542 (handle_set_address, handle_advance_pc, handle_special_opcode)
6543 (handle_advance_line, handle_set_file, handle_negate_stmt)
6544 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
6545 (end_sequence, advance_line): New methods.
6546 (m_gdbarch, m_record_lines_p): New fields.
6547 (lnp_reader_state): Delete.
6548 (dwarf_record_line): Rename to ...
6549 (lnp_state_machine::record_line): ... adjust.
6550 (init_lnp_state_machine): Delete.
6551 (lnp_state_machine::lnp_state_machine): New.
6552 (check_line_address): Rename to ...
6553 (lnp_state_machine::check_line_address): This.
6554 (dwarf_decode_lines_1): Remove reference to "reader_state".
6555 Adjust lnp_state_machine having a non-default ctor. Use bool.
6556 State machine internal state manipulation moved to
6557 lnp_state_machine methods.
6559 2017-04-04 Pedro Alves <palves@redhat.com>
6561 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6562 unittests/offset-type-selftests.c.
6563 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
6564 * common/offset-type.h: New file.
6565 * common/preprocessor.h: New file.
6566 * common/traits.h: New file.
6567 * common/valid-expr.h: New file.
6568 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
6569 sect_offset and cu_offset strong typedefs throughout.
6570 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
6571 typedefs throughout.
6572 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
6573 sect_offset and cu_offset strong typedefs throughout.
6574 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
6575 typedefs throughout.
6576 * gdbtypes.h: Include "common/offset-type.h".
6577 (cu_offset): Now an offset type (strong typedef) instead of a
6579 (sect_offset): Likewise.
6580 (union call_site_parameter_u): Rename "param_offset" field to
6582 * unittests/offset-type-selftests.c: New file.
6584 2017-04-04 Pedro Alves <palves@redhat.com>
6586 * common/underlying.h: New file.
6587 * dwarf2read.c: Include "common/gdb_optional.h" and
6588 "common/underlying.h".
6589 (dir_index, file_name_index): New types.
6590 (file_entry): Use them.
6591 (file_entry::include): Use to_underlying.
6592 (line_header::add_file_name): Use dir_index.
6593 (read_formatted_entries): Use gdb::optional. Read form before
6594 writting to file_entry.
6595 (dwarf_decode_line_header): Use dir_index.
6596 (lnp_state_machine::current_file): Use to_underlying.
6597 (lnp_state_machine::file): Change type to file_name_index.
6598 (dwarf_record_line): Use to_underlying.
6599 (init_lnp_state_machine): Use file_name_index.
6600 (dwarf_decode_lines_1): Use dir_index and file_name_index.
6602 2017-04-04 Pedro Alves <palves@redhat.com>
6604 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
6605 operator bool, has_value and get methods.
6607 2017-04-04 Pedro Alves <palves@redhat.com>
6609 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
6611 (line_header): Initialize all data fields. Change type of
6612 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
6613 Change type of include_dirs to std::vector<const char *>. Remove
6614 num_include_dirs, include_dirs_size. Change type of file_names to
6615 std::vector<file_entry>. Remove num_file_names, file_names_size.
6616 (line_header::line_header): New.
6617 (line_header::add_include_dir, line_header::add_file_name): New
6619 (line_header::include_dir_at): Remove NULL check.
6620 (line_header::file_name_at): Add const overload.
6621 (line_header_up): New unique_ptr typedef.
6622 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
6623 std::vector. Remove free_line_header call.
6624 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
6625 free_line_header call.
6626 (free_cu_line_header): Delete.
6627 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
6628 (setup_type_unit_groups): Use line_header_up instead of cleanups.
6629 Adjust to use std::vector.
6630 (free_line_header): Delete.
6631 (free_line_header_voidp): Use delete.
6632 (add_include_dir): Replace with ...
6633 (line_header::add_include_dir): ... this method. Use std::vector.
6634 (add_file_name): Replace with ...
6635 (line_header::add_file_name): ... this method. Use std::vector.
6636 (add_include_dir_stub): Delete.
6637 (read_formatted_entries): Remove memset.
6638 (dwarf_decode_line_header): Return a line_header_up instead of a
6639 raw pointer. Remove cleanup handling. Pass lambdas to
6640 read_formatted_entries. Adjust to use line_header methods.
6641 (dwarf_decode_lines_1): Adjust to use line_header methods.
6642 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
6645 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
6647 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
6648 instead of struct ptid.
6650 2017-05-04 Alan Hayward <alan.hayward@arm.com>
6652 * frame.c (get_frame_register_bytes): Unwind using value.
6653 (put_frame_register_bytes): Likewise.
6655 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
6657 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
6660 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
6662 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
6664 2017-03-29 Yao Qi <yao.qi@linaro.org>
6666 * gdbthread.h (struct thread_info): Declare constructor and
6667 destructor. Add some in-class member initializers.
6668 * thread.c (free_thread): Remove.
6669 (init_thread_list): Call delete instead of free_thread.
6670 (new_thread): Call thread_info constructor.
6671 (thread_info::thread_info): New function.
6672 (thread_info::~thread_info): New function.
6673 (delete_thread_1): Call delete instead of free_thread.
6674 (make_cleanup_restore_current_thread): Move tp and frame to
6677 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6679 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
6680 (arc_skip_prologue): Likewise.
6681 (arc_make_frame_cache): Likewise.
6682 (arc_pv_get_operand): New function.
6683 (arc_is_in_prologue): Likewise.
6684 (arc_analyze_prologue): Likewise.
6685 (arc_print_frame_cache): Likewise.
6686 (MAX_PROLOGUE_LENGTH): New constant.
6688 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6690 * configure.tgt: Add arc-insn.o.
6691 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
6692 (dump_arc_instruction_command): New function.
6693 (arc_fprintf_disasm): Likewise.
6694 (arc_disassemble_info): Likewise.
6695 (arc_insn_get_operand_value): Likewise.
6696 (arc_insn_get_operand_value_signed): Likewise.
6697 (arc_insn_get_memory_base_reg): Likewise.
6698 (arc_insn_get_memory_offset): Likewise.
6699 (arc_insn_get_branch_target): Likewise.
6700 (arc_insn_dump): Likewise.
6701 (arc_insn_get_linear_next_pc): Likewise.
6702 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
6703 (arc_disassemble_info): Likewise.
6704 (arc_insn_get_branch_target): Likewise.
6705 (arc_insn_get_linear_next_pc): Likewise.
6706 * NEWS: Mention new "maint print arc arc-instruction".
6708 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6710 * arc-tdep (maintenance_print_arc_list): New variable.
6711 (maintenance_print_arc_command): New function.
6713 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6715 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
6716 Add "limm" and "reserved".
6717 (arc_cannot_fetch_register, arc_cannot_store_register): Add
6718 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
6719 * arc-tdep.h (arc_regnum): Likewise.
6721 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6723 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6724 for THREADPTR register.
6725 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
6727 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
6728 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
6729 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
6731 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6733 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
6734 registers above gdbarch_num_regs (gdbarch) as privileged in
6737 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6739 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6740 for a single specified register or for all registers in
6741 a0_base..a0_base + C0_NREGS range.
6742 (supply_gregset_reg): Call regcache_raw_supply for a single
6743 specified register or for all registers in a0_base..a0_base +
6746 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6748 * arch/xtensa.h (C0_NREGS): Add definition.
6749 * xtensa-tdep.c (C0_NREGS): Remove definition.
6751 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6753 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
6754 Drop xtensa_default_isa initialization.
6755 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
6757 2017-03-27 Pedro Alves <palves@redhat.com>
6759 * dwarf2read.c (file_entry) <dir_index>: Add comment.
6760 (file_entry::include_dir): New method.
6761 (line_header::include_dir_at, line_header::file_name_at): New
6763 (setup_type_unit_groups, setup_type_unit_groups)
6764 (psymtab_include_file_name): Simplify using the new methods.
6765 (lnp_state_machine) <the_line_header>: New field.
6766 <file>: Add comment.
6767 (lnp_state_machine::current_file): New method.
6768 (dwarf_record_line): Simplify using the new methods.
6769 (init_lnp_state_machine): Initialize the "the_line_header" field.
6770 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
6771 Simplify using the new methods.
6773 2017-03-27 Pedro Alves <palves@redhat.com>
6775 * cp-name-parser.y (make_empty): Delete.
6776 (demangler_special, nested_name, ptr_operator, array_indicator)
6777 (direct_declarator, declarator_1): Use fill_comp instead of
6780 2017-03-27 Pedro Alves <palves@redhat.com>
6782 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
6783 to ATTRIBUTE_PRINTF.
6784 * solib-target.c (library_list_start_list): Print "string" not
6786 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
6789 2017-03-27 Pedro Alves <palves@redhat.com>
6791 * dwarf2read.c (struct file_and_directory): New.
6792 (dwarf2_get_dwz_file): Adjust to use std::string.
6793 (dw2_get_file_names_reader): Adjust to use file_and_directory.
6794 (find_file_and_directory): Adjust to return a file_and_directory
6796 (read_file_scope): Adjust to use file_and_directory. Remove
6797 make_cleanup/do_cleanups calls.
6798 (open_and_init_dwp_file): Adjust to use std::string. Remove
6799 make_cleanup/do_cleanups calls.
6800 * python/python.c (do_start_initialization): Adjust to ldirname
6801 returning a std::string.
6802 * utils.c (ldirname): Now returns a std::string.
6803 * utils.h (ldirname): Change return type to std::string.
6804 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
6805 returning a std::string.
6806 * xml-tdesc.c (file_read_description_xml): Likewise.
6808 2017-03-24 Alan Hayward <alan.hayward@arm.com>
6810 * regcache.c (regcache_debug_print_register): New function.
6811 * regcache.h (regcache_debug_print_register): New declaration.
6812 * target.c (debug_print_register): Remove.
6813 (target_fetch_registers): Call regcache_debug_print_register.
6814 (target_store_registers): Likewise.
6816 2017-03-24 Pádraig Brady <pbrady@fb.com>
6818 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
6819 reference beyond the 'lh->include_dirs' array before accessing to
6821 (psymtab_include_file_name): Likewise.
6822 (dwarf_decode_lines_1): Likewise.
6823 (dwarf_decode_lines): Likewise.
6824 (file_file_name): Likewise.
6826 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
6828 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
6830 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
6831 ps_lsetfpregs): Likewise.
6832 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
6833 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
6834 ps_lsetfpregs): Likewise.
6835 * target.c (target_fetch_registers, target_store_registers):
6838 2017-03-23 Alan Hayward <alan.hayward@arm.com>
6840 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
6842 2017-03-23 Yao Qi <yao.qi@linaro.org>
6844 * aarch64-tdep.c (aarch64_process_record_test): Declare.
6845 (_initialize_aarch64_tdep): Register it.
6846 (aarch64_record_load_store): Handle PRFM instruction.
6847 (aarch64_process_record_test): New function.
6849 2017-03-23 Yao Qi <yao.qi@linaro.org>
6851 * aarch64-tdep.c (aarch64_record_load_store): Fix code
6854 2017-03-23 Yao Qi <yao.qi@linaro.org>
6856 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
6858 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6860 python/python.c (do_start_initialization): Fix memory leak.
6862 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6864 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
6865 using get_ptrace_pid.
6866 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
6868 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
6869 inferior_ptid instead of pid.
6871 2017-03-22 Yao Qi <yao.qi@linaro.org>
6873 * aarch64-tdep.c: Wrap locally used classes in anonymous
6875 * arm-tdep.c: Likewise.
6876 * linespec.c: Likewise.
6877 * ui-out.c: Likewise.
6879 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
6882 * python/lib/gdb/printer/bound_registers.py: Import sys.
6884 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
6886 * windows-nat.c (do_windows_fetch_inferior_registers): Add
6887 windows_thread_info parameter and use it instead of
6889 (windows_fetch_inferior_registers): Don't set current_thread,
6890 pass the thread to do_windows_fetch_inferior_registers. Use
6891 ptid from regcache instead of inferior_ptid.
6892 (do_windows_store_inferior_registers): Add windows_thread_info
6893 parameter and use it instead of current_thread.
6894 (windows_store_inferior_registers): Don't set current_thread,
6895 pass the thread to do_windows_store_inferior_registers. Use
6896 ptid from regcache instead of inferior_ptid.
6898 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
6900 * ser-mingw.c (ser_windows_raw): Remove reference to
6901 struct serial::current_timeout.
6903 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
6906 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
6907 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
6908 (sparc64_fsr_type): Fix %fsr decoding.
6910 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
6912 * python/py-record-btrace.c (btpy_insn_data): Change return type
6915 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
6917 * spu-linux-nat.c (spu_fetch_inferior_registers,
6918 spu_store_inferior_registers): Use ptid from regcache, set and
6919 restore inferior_ptid.
6920 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
6923 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
6925 * i386-linux-nat.c (fetch_register, store_register,
6926 i386_linux_fetch_inferior_registers,
6927 i386_linux_store_inferior_registers): Use ptid from regcache.
6928 * ia64-linux-nat.c (ia64_linux_fetch_register,
6929 ia64_linux_store_register): Likewise.
6930 * inf-ptrace.c (inf_ptrace_fetch_register,
6931 inf_ptrace_store_register): Likewise.
6932 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
6933 m32r_linux_store_inferior_registers): Likewise.
6934 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
6935 m68kbsd_store_inferior_registers): Likewise.
6936 * m68k-linux-nat.c (fetch_register, store_register,
6937 m68k_linux_fetch_inferior_registers,
6938 m68k_linux_store_inferior_registers): Likewise.
6939 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
6940 m88kbsd_store_inferior_registers): Likewise.
6941 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
6942 mips_fbsd_store_inferior_registers): Likewise.
6943 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
6944 mips64_linux_regsets_store_registers): Likewise.
6945 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
6946 mipsnbsd_store_inferior_registers): Likewise.
6947 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
6948 mips64obsd_store_inferior_registers): Likewise.
6949 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
6951 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
6952 ppcfbsd_store_inferior_registers): Likewise.
6953 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
6954 ppc_linux_store_inferior_registers): Likewise.
6955 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
6956 ppcnbsd_store_inferior_registers): Likewise.
6957 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
6958 ppcobsd_store_registers): Likewise.
6959 * procfs.c (procfs_fetch_registers, procfs_store_registers):
6961 * ravenscar-thread.c (ravenscar_fetch_registers,
6962 ravenscar_store_registers, ravenscar_prepare_to_store):
6964 * record-btrace.c (record_btrace_fetch_registers,
6965 record_btrace_store_registers, record_btrace_prepare_to_store):
6967 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
6968 Lookup inferior using ptid from regcache, instead of
6970 * remote.c (remote_fetch_registers, remote_store_registers): Use
6972 * rs6000-nat.c (fetch_register, store_register): Likewise.
6973 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
6974 s390_linux_store_inferior_registers): Likewise.
6975 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
6976 shnbsd_store_inferior_registers): Likewise.
6977 * sol-thread.c (sol_thread_fetch_registers,
6978 sol_thread_store_registers): Likewise.
6979 * sparc-nat.c (sparc_fetch_inferior_registers,
6980 sparc_store_inferior_registers): Likewise.
6981 * tilegx-linux-nat.c (fetch_inferior_registers,
6982 store_inferior_registers): Likewise.
6983 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
6984 vaxbsd_store_inferior_registers): Likewise.
6985 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
6986 store_xtregs): Likewise.
6988 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
6991 * NEWS: Mention support for rvalue references in GDB and python.
6992 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
6993 supports both lvalue and rvalue references.
6995 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
6998 * gdbtypes.c (rank_one_type): Implement overloading
6999 resolution rules regarding rvalue references.
7001 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7004 * aarch64-tdep.c (aarch64_type_align)
7005 (aarch64_extract_return_value, aarch64_store_return_value): Change
7006 lvalue reference type checks to general reference type checks.
7007 * amd64-tdep.c (amd64_classify): Likewise.
7008 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
7010 * arm-tdep.c (arm_type_align, arm_extract_return_value)
7011 (arm_store_return_value): Likewise.
7012 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
7013 * c-typeprint.c (c_print_type): Likewise.
7014 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
7015 (cplus_number_of_children, cplus_describe_child): Likewise.
7016 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
7017 * completer.c (expression_completer): Likewise.
7018 * cp-support.c (make_symbol_overload_list_adl_namespace):
7020 * darwin-nat-info.c (info_mach_region_command): Likewise.
7021 * dwarf2loc.c (entry_data_value_coerce_ref)
7022 (value_of_dwarf_reg_entry): Likewise.
7023 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
7024 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
7026 * findvar.c (extract_typed_address, store_typed_address):
7028 * gdbtypes.c (rank_one_type): Likewise.
7029 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
7030 * infcall.c (value_arg_coerce): Likewise.
7031 * language.c (pointer_type): Likewise.
7032 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
7034 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
7035 * mn10300-tdep.c (mn10300_type_align): Likewise.
7036 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
7037 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
7038 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
7040 * printcmd.c (print_formatted, x_command): Likewise.
7041 * python/py-type.c (typy_get_composite, typy_template_argument):
7043 * python/py-value.c (valpy_referenced_value)
7044 (valpy_get_dynamic_type, value_has_field): Likewise.
7045 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
7046 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
7047 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
7048 * spu-tdep.c (spu_scalar_value_p): Likewise.
7049 * symtab.c (lookup_symbol_aux): Likewise.
7050 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
7051 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
7053 * valops.c (value_cast_pointers, value_cast)
7054 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
7055 (value_struct_elt, value_struct_elt_bitpos)
7056 (value_find_oload_method_list, find_overload_match)
7057 (value_rtti_indirect_type): Likewise.
7058 * valprint.c (val_print_scalar_type_p, generic_val_print):
7060 * value.c (value_actual_type, value_as_address, unpack_long)
7061 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
7062 (coerce_ref): Likewise.
7063 * varobj.c (varobj_get_value_type): Likewise.
7065 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7068 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
7070 * python/lib/gdb/command/explore.py: Support exploring values
7071 of rvalue reference types.
7072 * python/lib/gdb/types.py: Implement get_basic_type() for
7073 rvalue reference types.
7074 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
7076 * python/py-value.c (valpy_getitem): Add an rvalue reference
7078 (valpy_reference_value): Add new parameter "refcode".
7079 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
7080 New wrappers for valpy_reference_value().
7081 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
7082 (gdbpy_invoke_xmethod): Likewise.
7084 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7087 * dwarf2read.c (process_die, read_type_die_1): Handle the
7088 DW_TAG_rvalue_reference_type DIE.
7089 (read_tag_reference_type): Add new parameter "refcode".
7091 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7094 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
7095 (c_type_print_modifier, c_type_print_varspec_suffix)
7096 (c_type_print_base): Support printing rvalue reference types.
7097 * c-valprint.c (c_val_print, c_value_print): Support printing
7098 rvalue reference values.
7100 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7103 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
7105 * cp-support.c (replace_typedefs): Handle
7106 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
7107 * python/py-type.c (typy_lookup_type): Likewise.
7109 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7112 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
7113 * parse.c (insert_type): Change assert statement.
7114 (follow_types): Handle rvalue reference types.
7115 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
7118 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7121 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
7122 value_ref() interface.
7123 * c-valprint.c (c_value_print): Likewise.
7124 * infcall.c (value_arg_coerce): Likewise.
7125 * python/py-value.c (valpy_reference_value): Likewise.
7126 * valops.c (value_cast, value_reinterpret_cast)
7127 (value_dynamic_cast, typecmp): Likewise.
7128 (value_ref): Parameterize by kind of return value reference type.
7129 * value.h (value_ref): Add new parameter "refcode".
7131 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7134 * dwarf2read.c (read_tag_reference_type): Use
7135 lookup_lvalue_reference_type() instead of lookup_reference_type().
7136 * eval.c (evaluate_subexp_standard): Likewise.
7137 * f-exp.y: Likewise.
7138 * gdbtypes.c (make_reference_type, lookup_reference_type):
7139 Generalize with rvalue reference types.
7140 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
7141 convenience wrappers for lookup_reference_type().
7142 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
7143 reference kind parameter.
7144 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
7145 wrappers for lookup_reference_type().
7146 * guile/scm-type.c (gdbscm_type_reference): Use
7147 lookup_lvalue_reference_type() instead of lookup_reference_type().
7148 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
7149 * parse.c (follow_types): Likewise.
7150 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
7151 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
7153 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
7154 (gdbpy_invoke_xmethod): Likewise.
7155 * stabsread.c: Provide extra argument to make_reference_type()
7157 * valops.c (value_ref, value_rtti_indirect_type): Use
7158 lookup_lvalue_reference_type() instead of lookup_reference_type().
7160 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7163 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
7164 (TYPE_IS_REFERENCE): New macro.
7165 (struct type): Add rvalue_reference_type field.
7166 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
7168 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
7170 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
7171 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
7172 New function definition.
7173 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
7174 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
7175 New function declaration.
7176 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
7177 * mi/mi-interp.h: New file.
7178 * solib.c (info_sharedlibrary_command): Replace for loop with
7180 * solib.h (update_solib_list): New function declaration.
7181 (so_list_head): Move macro.
7182 * solist.h (ALL_SO_LIBS): New macro.
7184 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
7186 * infcmd.c (post_create_inferior): Remove unused argument in
7188 * remote.c (remote_start_remote): Likewise.
7189 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
7190 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
7191 (enable_break): Likewise.
7192 * solib.c (update_solib_list): Remove unused target argument
7193 and its documentation.
7194 (solib_add): Remove unused target argument. Remove unused
7195 argument in call to update_solib_list.
7196 (info_sharedlibrary_command): Remove unused argument in call
7197 to update_solib_list.
7198 (sharedlibrary_command): Remove unused argument in call to
7200 (handle_solib_event): Likewise.
7201 (reload_shared_libraries): Likewise.
7202 * solib.h (solib_add): Remove unused target argument.
7204 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
7206 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
7207 (s390_displaced_step_fixup): Cover relative branches with the
7208 default fixup handling. This fixes lack of support for some
7209 relative branch instructions.
7211 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7213 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
7216 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7218 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
7219 i386_darwin_store_inferior_registers): Use ptid from regcache.
7221 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7223 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
7224 i386bsd_store_inferior_registers): Use ptid from regcache.
7226 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7228 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
7229 hppaobsd_store_registers): Use ptid from regcache.
7231 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7233 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
7234 hppanbsd_store_registers): Use ptid from regcache.
7236 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7238 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
7239 from regcache. Use get_ptrace_pid.
7241 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7243 * corelow.c (get_core_register_section): Use ptid from regcache,
7246 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7248 * bsd-uthread.c (bsd_uthread_fetch_registers,
7249 bsd_uthread_store_registers): Use ptid from regcache, set and
7250 restore inferior_ptid.
7252 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7254 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
7255 fetch_fp_regs, store_register, store_regs, store_fp_register,
7256 store_fp_regs): Use ptid from regcache.
7258 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7260 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
7261 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
7262 store_vfp_regs): Use ptid from regcache.
7264 2017-03-17 Pedro Alves <palves@redhat.com>
7267 * ser-base.c (ser_base_wait_for): Add comment.
7268 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
7270 * ser-unix.c (hardwire_raw): Remove reference to
7271 scb->current_timeout.
7272 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
7273 (hardwire_ops): Install ser_base_readchar instead of
7275 * serial.h (struct serial) <current_timeout, timeout_remaining>:
7278 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
7281 * python/lib/gdb/printer/bound_registers.py: Add support for
7284 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7286 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
7287 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
7288 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
7289 byte_offset to subobj_byte_offset. Fix the handling of
7290 DWARF_VALUE_STACK on big-endian targets when coming via an
7292 (dwarf2_evaluate_loc_desc): Adjust call to
7293 dwarf2_evaluate_loc_desc_full.
7294 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
7295 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
7297 2017-03-16 Yao Qi <yao.qi@linaro.org>
7299 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
7300 and REVSH instructions.
7302 2017-03-16 Yao Qi <yao.qi@linaro.org>
7304 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
7305 (arm_record_test): Declare.
7306 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
7307 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
7308 align with the manual.
7309 (thumb_record_misc): Adjust the code order to align with the
7311 (thumb2_record_decode_insn_handler): Fix instruction matching.
7312 (instruction_reader_thumb): New class.
7313 (arm_record_test): New function.
7315 2017-03-16 Yao Qi <yao.qi@linaro.org>
7317 * arm-tdep.c (abstract_memory_reader): New class.
7318 (instruction_reader): New class.
7319 (extract_arm_insn): Add argument 'reader'. Callers updated.
7320 (decode_insn): Likewise.
7322 2017-03-16 Doug Evans <dje@google.com>
7324 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
7325 member. Change type of TYPE member to SCM. All uses updated.
7326 (lsscm_make_lazy_string_smob): Add assert.
7327 (lsscm_make_lazy_string): Flag bad length values.
7328 (lsscm_elt_type): New function.
7329 (gdbscm_lazy_string_to_value): Rewrite to use
7330 lsscm_safe_lazy_string_to_value.
7331 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
7332 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
7333 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
7335 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
7336 * guile/scm-type.c (tyscm_scm_to_type): New function.
7338 2017-03-15 Doug Evans <dje@google.com>
7340 PR python/17728, python/18439, python/18779
7341 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
7342 member. Change type of TYPE member to PyObject *. All uses updated.
7343 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
7344 (gdbpy_create_lazy_string_object): Flag bad length values.
7345 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
7346 Handle typedefs in incoming type.
7347 (stpy_lazy_string_elt_type): New function.
7348 (gdbpy_extract_lazy_string): Call it.
7349 * python/py-value.c (valpy_lazy_string): Flag bad length values.
7350 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
7351 typedefs in incoming type.
7353 2017-03-16 Doug Evans <dje@google.com>
7355 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
7356 * guile/scm-type.c (tyscm_scm_to_type): New function.
7358 2017-03-16 Jiong Wang <jiong.wang@arm.com>
7360 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
7361 "ULONGEST" for "skip".
7363 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
7366 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
7367 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
7368 (inf_ptrace_peek_poke): ...here. New function. Now also loop
7369 over ptrace peek/poke until end of buffer or error.
7371 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
7373 * parse.c (length_of_subexp): Make static.
7374 * parser-defs.h (length_of_subexp): Remove.
7376 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
7378 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
7381 2017-03-14 Pedro Alves <palves@redhat.com>
7383 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
7384 (main): Use std::unique_ptr. Remove calls to
7385 cp_demangled_name_parse_free.
7387 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7389 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
7390 alphabsd_store_inferior_registers): Use regcache->ptid instead
7393 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7395 * aix-thread.c (aix_thread_fetch_registers,
7396 aix_thread_store_registers): Use regcache->ptid instead of
7399 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7401 * aarch64-linux-nat.c (fetch_gregs_from_thread,
7402 store_gregs_to_thread, fetch_fpregs_from_thread,
7403 store_fpregs_to_thread): Use regcache->ptid instead of
7406 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7408 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
7409 amd64_linux_fetch_inferior_registers): Use regcache->ptid
7410 instead of inferior_ptid.
7412 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7414 * target.c (target_fetch_registers, target_store_registers): Add
7417 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7419 * regcache.h (regcache_get_ptid): New function.
7420 * regcache.c (regcache_get_ptid): New function.
7422 2017-03-13 Mark Wielaard <mark@klomp.org>
7424 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
7426 2017-03-10 Keith Seitz <keiths@redhat.com>
7429 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
7431 2017-03-08 Pedro Alves <palves@redhat.com>
7434 * infrun.c (start_step_over, do_target_resume, resume)
7435 (restart_threads): Assert we're not resuming a thread that is
7436 meant to be stopped.
7437 (infrun_thread_stop_requested_callback): Delete.
7438 (infrun_thread_stop_requested): If the thread is internally
7439 stopped, queue a pending stop event and clear the thread's
7441 (handle_stop_requested): New function.
7442 (handle_syscall_event, handle_inferior_event_1): Use
7443 handle_stop_requested.
7444 (handle_stop_requested): New function.
7445 (handle_signal_stop): Set the thread's stop_signal here instead of
7447 (finish_step_over): Clear step over info unconditionally.
7448 (handle_signal_stop): If the user had interrupted the event
7449 thread, consider the stop a random signal.
7450 (handle_signal_stop) <signal arrived while stepping over
7451 breakpoint>: Don't restart threads here.
7452 (stop_waiting): Don't clear step-over info here.
7454 2017-03-08 Pedro Alves <palves@redhat.com>
7457 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
7458 goes to argument 2, not 1.
7460 2017-03-08 Pedro Alves <palves@redhat.com>
7463 * top.c (gdb_readline_wrapper): Avoid passing NULL to
7465 (command_line_input): Add comment.
7467 2017-03-08 Pedro Alves <palves@redhat.com>
7470 * tui/tui-file.c (tui_file::write): New.
7471 * tui/tui-file.h (tui_file): Override "write".
7472 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
7473 factored out from ...
7474 (tui_puts): ... here.
7475 (tui_putc): Use them.
7476 (tui_write): New function.
7477 * tui/tui-io.h (tui_write): Declare.
7479 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7481 * Makefile.in (SFILES): Replace "environ.c" with
7483 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
7484 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
7486 * common/environ.c: ... here.
7487 * environ.h: Moved to...
7488 * common/environ.h: ... here.
7490 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
7492 * gdbarch.sh (pstring_ptr): New static function.
7493 (gdbarch_disassembler_options): Use it.
7494 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
7495 not valid_disassembler_option->name.
7496 * gdbarch.c: Regenerate.
7498 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
7500 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
7502 2017-03-07 Pedro Alves <palves@redhat.com>
7504 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
7506 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
7508 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
7509 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
7510 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
7511 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
7513 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
7515 * xtensa-linux-nat.c (fetch_gregs): Remove const.
7517 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
7519 * remote.c (remote_add_target_side_commands): Use range-based
7522 2017-03-03 Yao Qi <yao.qi@linaro.org>
7525 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
7527 * valprint.c (common_val_print): Likewise.
7529 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
7531 * NEWS: Mention new set/show disassembler-options commands.
7532 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
7533 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
7534 (prospective_options): New static variable.
7535 (gdb_disassembler::gdb_disassembler): Initialize
7536 m_di.disassembler_options.
7537 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
7538 (get_disassembler_options): New function.
7539 (set_disassembler_options): Likewise.
7540 (set_disassembler_options_sfunc): Likewise.
7541 (show_disassembler_options_sfunc): Likewise.
7542 (disassembler_options_completer): Likewise.
7543 (_initialize_disasm): Likewise.
7544 * disasm.h (get_disassembler_options): New prototype.
7545 (set_disassembler_options): Likewise.
7546 * gdbarch.sh (gdbarch_disassembler_options): New variable.
7547 (gdbarch_verify_disassembler_options): Likewise.
7548 * gdbarch.c: Regenerate.
7549 * gdbarch.h: Likewise.
7550 * arm-tdep.c (num_disassembly_options): Delete.
7551 (set_disassembly_style): Likewise.
7552 (arm_disassembler_options): New static variable.
7553 (set_disassembly_style_sfunc): Convert short style name into long
7554 option name. Call set_disassembler_options.
7555 (show_disassembly_style_sfunc): New function.
7556 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
7557 set_gdbarch_verify_disassembler_options.
7558 (_initialize_arm_tdep): Delete regnames variable and update callers.
7559 (arm_disassembler_options): Initialize.
7560 (disasm_options): New variable.
7561 (num_disassembly_options): Rename from this...
7562 (num_disassembly_styles): ...to this. Compute by scanning through
7564 (valid_disassembly_styles): Initialize using disasm_options.
7565 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
7566 set_arm_regname_option.
7567 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
7568 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
7569 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
7570 set_gdbarch_verify_disassembler_options.
7571 * s390-tdep.c (s390_disassembler_options): New static variable.
7572 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
7573 set_gdbarch_verify_disassembler_options.
7575 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
7577 * remote.c (remote_add_target_side_condition): Remove "struct"
7578 keyword from range-based for loop.
7580 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
7582 * remote.c (remote_add_target_side_condition): Use range-based
7583 for loop. Update comment.
7585 2017-02-27 Yao Qi <yao.qi@linaro.org>
7587 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
7589 2017-02-26 Alan Hayward <alan.hayward@arm.com>
7591 * regcache.c (regcache_raw_update): New function.
7592 (regcache_raw_read): Move code to regcache_raw_update.
7593 * regcache.h (regcache_raw_update): New declaration.
7594 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
7596 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
7598 * dwarf2read.c (create_debug_type_hash_table): Initialize
7599 header.signature and header.type_offset_in_tu.
7601 2017-02-24 Pedro Alves <palves@redhat.com>
7603 * symtab.c (make_file_symbol_completion_list_1): Use
7604 add_symtab_completions.
7606 2017-02-24 Alan Hayward <alan.hayward@arm.com>
7608 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
7610 2017-02-24 Alan Hayward <alan.hayward@arm.com>
7612 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
7613 I386_MAX_REGISTER_SIZE.
7614 (i386_pseudo_register_write): Likewise.
7615 (i386_process_record): Likewise.
7616 * i387-tdep.c (i387_supply_xsave): Likewise.
7617 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
7618 (store_register): Likewise.
7620 2017-02-23 Pedro Alves <palves@redhat.com>
7622 * ada-lang.c: Include "common/function-view.h".
7623 (ada_iterate_over_symbols): Adjust to use function_view as
7625 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
7626 (ada_make_symbol_completion_list): Use a lambda.
7627 (ada_exc_search_name_matches): Delete.
7628 (name_matches_regex): New.
7629 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
7630 * compile/compile-c-support.c: Include "common/function-view.h".
7631 (print_one_macro): Change prototype to accept a ui_file pointer.
7632 (write_macro_definitions): Use a lambda.
7633 * dwarf2read.c: Include "common/function-view.h".
7634 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
7635 (dw2_expand_symtabs_matching): Adjust to use function_view as
7637 * language.h: Include "common/function-view.h".
7638 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
7639 function_view as callback type.
7640 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
7641 * linespec.c: Include "common/function-view.h".
7642 (collect_info::add_symbol): New method.
7643 (struct symbol_and_data_callback, iterate_inline_only, struct
7644 symbol_matcher_data, iterate_name_matcher): Delete.
7645 (iterate_over_all_matching_symtabs): Adjust to use function_view
7646 as callback type and lambdas.
7647 (iterate_over_file_blocks): Adjust to use function_view as
7649 (decode_compound_collector): Now a class with private fields.
7650 (decode_compound_collector::release_symbols): New method.
7651 (collect_one_symbol): Rename to...
7652 (decode_compound_collector::operator()): ... this and adjust.
7653 (lookup_prefix_sym): decode_compound_collector construction bits
7654 move to decode_compound_collector ctor. Pass the
7655 decode_compound_collector object directly as callback. Remove
7656 cleanups and use decode_compound_collector::release_symbols
7658 (symtab_collector): Now a class with private fields.
7659 (symtab_collector::release_symtabs): New method.
7660 (add_symtabs_to_list): Rename to...
7661 (symtab_collector::operator()): ... this and adjust.
7662 (collect_symtabs_from_filename): symtab_collector construction
7663 bits move to symtab_collector ctor. Pass the symtab_collector
7664 object directly as callback. Remove cleanups and use
7665 symtab_collector::release_symtabs instead.
7666 (collect_symbols): Delete.
7667 (add_matching_symbols_to_info): Use lambdas.
7668 * macrocmd.c (print_macro_callback): Delete.
7669 (info_macro_command): Use a lambda.
7670 (info_macros_command): Pass print_macro_definition as callable
7672 (print_one_macro): Remove 'ignore' parameter.
7673 (macro_list_command): Adjust.
7674 * macrotab.c (macro_for_each_data::fn): Now a function_view.
7675 (macro_for_each_data::user_data): Delete field.
7676 (foreach_macro): Adjust to call the function_view.
7677 (macro_for_each): Adjust to use function_view as callback type.
7678 (foreach_macro_in_scope): Adjust to call the function_view.
7679 (macro_for_each_in_scope): Adjust to use function_view as callback
7681 * macrotab.h: Include "common/function-view.h".
7682 (macro_callback_fn): Declare a prototype instead of a pointer.
7683 Remove "user_data" parameter.
7684 (macro_for_each, macro_for_each_in_scope): Adjust to use
7685 function_view as callback type.
7686 * psymtab.c (partial_map_expand_apply)
7687 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
7688 Adjust to use function_view as callback type and to return bool.
7689 (psym_expand_symtabs_matching): Adjust to use function_view as
7691 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
7692 to use function_view as callback type and to return bool.
7693 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
7695 * symfile.c (expand_symtabs_matching): Adjust to use function_view
7697 * symfile.h: Include "common/function-view.h".
7698 (expand_symtabs_file_matcher_ftype)
7699 (expand_symtabs_symbol_matcher_ftype)
7700 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
7702 (quick_symbol_functions::map_symtabs_matching_filename)
7703 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
7704 function_view as callback type and return bool.
7705 (expand_symtabs_matching): Adjust to use function_view as callback
7707 (maintenance_expand_name_matcher)
7708 (maintenance_expand_file_matcher): Delete.
7709 (maintenance_expand_symtabs): Use lambdas.
7710 * symtab.c (iterate_over_some_symtabs): Adjust to use
7711 function_view as callback types and return bool.
7712 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
7714 (lookup_symtab_callback): Delete.
7715 (lookup_symtab): Use a lambda.
7716 (iterate_over_symbols): Adjust to use function_view as callback
7718 (struct search_symbols_data, search_symbols_file_matches)
7719 (search_symbols_name_matches): Delete.
7720 (search_symbols): Use a pair of lambdas.
7721 (struct add_name_data, add_macro_name, symbol_completion_matcher)
7722 (symtab_expansion_callback): Delete.
7723 (default_make_symbol_completion_list_break_on_1): Use lambdas.
7724 * symtab.h: Include "common/function-view.h".
7725 (iterate_over_some_symtabs): Adjust to use function_view as
7726 callback type and return bool.
7727 (iterate_over_symtabs): Adjust to use function_view as callback
7729 (symbol_found_callback_ftype): Remove 'data' parameter and return
7731 (iterate_over_symbols): Adjust to use function_view as callback
7734 2017-02-23 Pedro Alves <palves@redhat.com>
7736 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
7737 (%.o) <unittests/%.c>: New pattern.
7738 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
7739 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
7740 * common/function-view.h: New file.
7741 * unittests/function-view-selftests.c: New file.
7742 * configure: Regenerate.
7744 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
7746 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
7748 * go32-nat.c (go32_thread_alive): Likewise.
7750 2017-02-23 Yao Qi <yao.qi@linaro.org>
7752 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
7755 2017-02-23 Yao Qi <yao.qi@linaro.org>
7757 * varobj.c (varobj_clear_saved_item): Use delete instead of
7759 (update_dynamic_varobj_children): Likewise.
7761 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7763 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
7765 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
7767 * common/enum-flags.h (enum_flags::enum_flags): Initialize
7768 m_enum_value to 0 in default constructor.
7770 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7772 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
7773 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
7774 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
7775 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
7776 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
7777 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
7778 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
7779 IS_STORE_CONDITIONAL_INSN.
7781 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7783 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
7785 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7787 * NEWS (Changes since GDB 7.12): Add DWARF-5.
7789 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7791 * dwarf2read.c (skip_one_die, read_attribute_value)
7792 (dwarf2_const_value_attr, dump_die_shallow)
7793 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7794 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
7796 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7798 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
7799 (dwarf_parse_macro_header): Accept DWARF version 5.
7800 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
7802 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7804 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
7806 * common/common-exceptions.h (enum errors): Likewise.
7807 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
7808 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
7809 (dwarf_expr_context::execute_stack_op): Likewise.
7810 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
7812 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
7813 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
7814 (show_entry_values_debug, call_site_to_target_addr)
7815 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
7816 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
7817 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
7818 (value_of_dwarf_block_entry, indirect_pieced_value)
7819 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
7820 (disassemble_dwarf_expression): Likewise.
7821 * dwarf2read.c (process_die, inherit_abstract_dies)
7822 (read_call_site_scope): Likewise.
7823 * gdbtypes.h (struct func_type, struct call_site_parameter)
7824 (struct call_site): Likewise.
7825 * stack.c (read_frame_arg): Likewise.
7826 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
7828 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7830 * defs.h (read_unsigned_leb128): New declaration.
7831 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
7832 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
7833 (dwarf2_find_location_expression): Call also
7834 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
7835 * dwarf2loc.h (dwarf2_version): New declaration.
7836 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
7838 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
7840 (struct dwop_section_names): Add loclists_dwo.
7841 (dwop_section_names): Add .debug_loclists.dwo.
7842 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
7843 (struct dwarf2_per_cu_data): Add dwarf_version.
7844 (struct dwo_sections): Add loclists.
7845 (struct attr_abbrev): Add implicit_const.
7846 (read_indirect_line_string): New declaration.
7847 (read_unsigned_leb128): Delete declaration.
7848 (rcuh_kind): New definition.
7849 (read_and_check_comp_unit_head): Change parameter
7850 is_debug_types_section to section_kind.
7851 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
7852 (read_comp_unit_head): Change parameter abfd to section, add parameter
7853 section_kind. Handle DWARF-5.
7854 (error_check_comp_unit_head): Accept also DWARF version 5.
7855 (read_and_check_comp_unit_head): Change parameter
7856 is_debug_types_section to section_kind.
7857 (read_and_check_type_unit_head): Delete function.
7858 (read_abbrev_offset): Handle DWARF-5.
7859 (create_debug_type_hash_table): Add parameter section_kind. Process
7860 only DW_UT_type. Use signature and type_offset_in_tu from struct
7862 (create_debug_types_hash_table): Update create_debug_type_hash_table
7864 (create_all_type_units): Call create_debug_type_hash_table.
7865 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
7866 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
7868 (skip_one_die): Handle DW_FORM_implicit_const.
7869 (dwarf2_rnglists_process): New function.
7870 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
7871 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
7872 (read_attribute_value): Handle DW_FORM_implicit_const,
7874 (read_attribute): Handle DW_FORM_implicit_const.
7875 (read_indirect_string_at_offset_from): New function from
7876 read_indirect_string_at_offset.
7877 (read_indirect_string_at_offset): Call
7878 read_indirect_string_at_offset_from.
7879 (read_indirect_line_string_at_offset): New function.
7880 (read_indirect_string): New function comment.
7881 (read_indirect_line_string): New function.
7882 (read_unsigned_leb128): Make it global.
7883 (dwarf2_string_attr): Handle DWARF-5.
7884 (add_include_dir_stub, read_formatted_entries): New functions.
7885 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
7887 (per_cu_header_read_in): Update read_comp_unit_head caller.
7888 (dwarf2_version): New function.
7889 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
7891 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
7894 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7896 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
7898 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7900 * dwarf2read.c (dwarf2_ranges_process): New function from
7902 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
7903 dwarf2_ranges_process.
7905 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7907 * dwarf2read.c (create_debug_type_hash_table): New function from
7908 create_debug_types_hash_table.
7909 (create_debug_types_hash_table): Call create_debug_type_hash_table.
7910 (create_all_type_units, open_and_init_dwo_file): Update
7911 create_debug_types_hash_table callers.
7913 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
7916 * fork-child.c (trace_start_error): Fix thinko. va_end should
7917 refer to 'ap', not 'args'.
7919 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
7920 Pedro Alves <palves@redhat.com>
7923 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
7925 * fork-child.c (trace_start_error): New function.
7926 (trace_start_error_with_name): Likewise.
7927 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
7928 * inf-ptrace.c (inf_ptrace_me): Likewise.
7929 * inferior.h (trace_start_error): New prototype.
7930 (trace_start_error_with_name): Likewise.
7932 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
7935 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
7936 NULL before using it.
7937 * symmisc.c (maintenance_print_symbols): Likewise.
7938 (maintenance_print_msymbols): Likewise.
7940 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7942 * NEWS: Add record Python bindings entry.
7944 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7946 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
7948 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
7949 * python/py-record-btrace.c, python/py-record-btrace.h,
7950 python/py-record-full.c, python/py-record-full.h: New file.
7951 * python/py-record.c: Add include for py-record-btrace.h and
7953 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
7954 recpy_instruction_history, recpy_function_call_history, recpy_begin,
7955 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
7956 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
7958 (gdbpy_initialize_btrace): New export.
7959 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
7961 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7963 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
7964 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
7965 * python/py-record.c: New file.
7966 * python/python-internal.h (gdbpy_start_recording,
7967 gdbpy_current_recording, gdpy_stop_recording,
7968 gdbpy_initialize_record): New export.
7969 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
7970 (python_GdbMethods): Add gdbpy_start_recording,
7971 gdbpy_current_recording and gdbpy_stop_recording.
7973 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7975 * record-btrace.c (record_btrace_record_method): New function.
7976 (init_record_btrace_ops): Initialize to_record_method.
7977 * record-full.c (record_full_record_method): New function.
7978 (init_record_full_ops, init_record_full_core_ops): Add
7979 record_full_record_method.
7980 * record.h (enum record_method): New enum.
7981 * target-debug.h (target_debug_print_enum_record_method: New define.
7982 * target-delegates.c: Regenerate.
7983 * target.c (target_record_method): New function.
7984 * target.h: Include record.h.
7985 (struct target_ops) <to_record_method>: New field.
7986 (target_record_method): New export.
7988 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7990 * record.h (record_start, record_stop): New export.
7991 * record.c (record_start, record_stop): New function.
7993 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7995 * btrace.c (btrace_fetch): Copy function call segments pointer
7997 (btrace_clear): Clear the vector.
7998 (btrace_find_insn_by_number): Use binary search to find the correct
7999 function call segment.
8000 * btrace.h (brace_fun_p): New typedef.
8001 (struct btrace_thread_info) <functions>: New field.
8003 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8005 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
8006 * btrace.c (btrace_decode_error): ... here. New function.
8007 * btrace.h (btrace_decode_error): New export.
8009 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8011 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
8012 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
8013 btrace_find_insn_by_number): Remove special case for gaps.
8014 * btrace.h (btrace_insn_get_error): New export.
8015 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
8016 * record-btrace.c (btrace_insn_history): Print number for gaps.
8017 (record_btrace_info, record_btrace_goto): Handle gaps.
8019 2017-02-14 Tom Tromey <tom@tromey.com>
8022 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
8024 * python/py-evts.c (gdbpy_initialize_py_events): Add
8025 before_prompt registry.
8026 * python/py-events.h (events_object) <before_prompt>: New field.
8028 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
8030 * btrace.c (ftrace_new_switch): Preserve up link and flags.
8032 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
8034 * symfile (_initialize_symfile): Add usage text to the load command's
8037 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
8039 * utils.c (defaulted_query): Don't query on secondary UIs.
8041 2017-02-10 Tom Tromey <tom@tromey.com>
8043 * rust-lang.c (rust_get_disr_info): Remove unused variable.
8045 2017-02-10 Tom Tromey <tom@tromey.com>
8047 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
8049 * python/py-type.c (typy_legacy_template_argument): Remove
8050 unnecessary "cleanup" local.
8052 2017-02-10 Tom Tromey <tom@tromey.com>
8054 * python/python.c (do_start_initialization): New function, from
8056 (_initialize_python): Call do_start_initialization.
8057 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
8060 2017-02-10 Tom Tromey <tom@tromey.com>
8062 * python/py-prettyprint.c (pretty_print_one_value): Use
8065 2017-02-10 Tom Tromey <tom@tromey.com>
8067 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
8068 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
8070 * python/py-type.c (field_new): Use gdbpy_ref.
8071 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
8073 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
8074 (py_free_pspace): Likewise.
8075 (pspace_to_pspace_object): Likewise.
8076 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
8077 (py_free_objfile): Likewise.
8078 (objfile_to_objfile_object): Likewise.
8079 * python/py-inferior.c (delete_thread_object): Use
8081 (infpy_read_memory): Likewise.
8082 (py_free_inferior): Likewise.
8083 * python/py-evtregistry.c (create_eventregistry_object): Use
8085 * python/py-event.c (create_event_object): Use gdbpy_ref.
8087 2017-02-10 Tom Tromey <tom@tromey.com>
8089 * python/py-ref.h (gdbpy_ref_policy): Now a template.
8090 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
8092 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
8093 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
8094 python/py-exitedevent.c, python/py-finishbreakpoint.c,
8095 python/py-framefilter.c, python/py-function.c,
8096 python/py-inferior.c, python/py-infevents.c,
8097 python/py-linetable.c, python/py-newobjfileevent.c,
8098 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
8099 python/py-signalevent.c, python/py-stopevent.c,
8100 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
8101 python/py-unwind.c, python/py-utils.c, python/py-value.c,
8102 python/py-varobj.c, python/py-xmethods.c, python/python.c,
8103 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
8105 2017-02-10 Tom Tromey <tom@tromey.com>
8107 * ui-out.h (ui_out_emit_type): New class.
8108 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
8109 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
8110 and ui_out_emit_tuple.
8111 (enumerate_locals): Likewise.
8112 (py_mi_print_variables, py_print_locals, py_print_args): Use
8114 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
8116 * common/gdb_optional.h: New file.
8118 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
8120 * MAINTAINERS (Write After Approval): Update my e-mail address.
8122 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
8125 * breakpoint.c (_initialize_breakpoint): Update the help description
8126 of the 'commands' command to indicate that it takes a list argument.
8128 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
8130 * interps.c (current_interp_set_logging): Remove "return".
8132 2017-02-09 Gary Benson <gbenson@redhat.com>
8134 * symtab.c (add_symtab_completions): Prevent NULL pointer
8137 2017-02-08 Pedro Alves <palves@redhat.com>
8139 * interps.c (interp::interp): Remove reference to quiet_p.
8140 (interp_set): Make static. Remove dead "Switching to" output
8142 (interp_quiet_p, interp_set_quiet): Delete.
8143 (interpreter_exec_cmd): Don't set the interpreter quiet.
8144 * interps.h (interp_quiet_p): Make static.
8145 (class interp) <quiet_p>: Remove field
8147 2017-02-08 Jerome Guitton <guitton@adacore.com>
8149 * cli/cli-decode.c (find_command_name_length): Make it extern.
8150 * cli/cli-decode.h (find_command_name_length): Declare.
8151 * cli/cli-script.c (command_name_equals, line_first_arg):
8153 (process_next_line): Use cli-decode to parse command names.
8154 (build_command_line): Make args a constant pointer.
8156 2017-02-08 Jerome Guitton <guitton@adacore.com>
8158 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
8159 Remove case-insensitive search.
8161 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
8163 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
8164 at the end of the line. Avoids an ARI warning.
8166 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
8168 * NEWS: Mention support for record/replay of Intel 64 rdrand and
8169 rdseed instructions.
8170 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
8172 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
8175 Provide and use sparc32 and sparc64 target description XML files.
8176 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
8177 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
8178 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
8179 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
8180 * features/sparc/sparc32-solaris.xml: New file.
8181 * features/sparc/sparc64-solaris.xml: New file.
8182 * features/sparc/sparc32-solaris.c: Generated.
8183 * features/sparc/sparc64-solaris.c: Generated.
8184 * sparc-tdep.h: Account for differences in target descriptions.
8185 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
8186 (sparc32_register_type): Use target provided registers.
8187 (validate_tdesc_registers): New function.
8188 (sparc32_gdbarch_init): Use tdesc_has_registers.
8189 Set pseudoregister functions.
8190 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
8191 (sparc64_register_type): Use target provided registers.
8192 (sparc64_init_abi): Set pseudoregister functions.
8194 2017-02-03 Tom Tromey <tom@tromey.com>
8197 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
8198 with a single member.
8200 2017-02-03 Pedro Alves <palves@redhat.com>
8202 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
8203 (cli_interp_base::~cli_interp_base): New.
8204 (cli_interp): New struct.
8205 (as_cli_interp): Cast the interp itself to cli_interp.
8206 (cli_interpreter_pre_command_loop): Rename to ...
8207 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
8209 (cli_interpreter_init): Rename to ...
8210 (cli_interp::init): ... this. Remove 'self' parameter. Use
8211 boolean. Make extern.
8212 (cli_interpreter_resume): Rename to ...
8213 (cli_interp::resume): ... this. Remove 'data' parameter. Make
8215 (cli_interpreter_suspend): Rename to ...
8216 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
8218 (cli_interpreter_exec): Rename to ...
8219 (cli_interp::exec): ... this. Remove 'data' parameter. Make
8221 (cli_interpreter_supports_command_editing): Rename to ...
8222 (cli_interp_base::supports_command_editing): ... this. Remove
8223 'interp' parameter. Make extern.
8224 (cli_ui_out): Rename to ...
8225 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
8227 (cli_set_logging): Rename to ...
8228 (cli_interp_base::set_logging): ... this. Remove 'interp'
8229 parameter. Make extern.
8230 (cli_interp_procs): Delete.
8231 (cli_interp_factory): Adjust to use "new".
8232 * cli/cli-interp.h: Include "interps.h".
8233 (struct cli_interp_base): New struct.
8234 * interps.c (struct interp): Delete. Fields moved to interps.h.
8235 (interp_new): Delete.
8236 (interp::interp, interp::~interp): New.
8237 (interp_set): Use bool, and return void. Assume the interpreter
8238 has suspend, init and resume methods, and that the all return
8240 (set_top_level_interpreter): interp_set returns void.
8241 (interp_ui_out): Adapt.
8242 (current_interp_set_logging): Adapt.
8243 (interp_data): Delete.
8244 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
8245 (interp_exec): Adapt.
8246 (top_level_interpreter_data): Delete.
8247 * interps.h (interp_init_ftype, interp_resume_ftype)
8248 (interp_suspend_ftype, interp_exec_ftype)
8249 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
8250 (class interp): New.
8251 (interp_new): Delete.
8252 (interp_set): Now returns void. Use bool.
8253 (interp_data, top_level_interpreter_data): Delete.
8254 * mi/mi-common.h: Include interps.h.
8255 (class mi_interp): Inherit from interp. Define a ctor. Declare
8256 init, resume, suspect, exec, interp_ui_out, set_logging and
8257 pre_command_loop methods.
8258 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
8259 (mi_interpreter_init): Rename to ...
8260 (mi_interp::init): ... this. Remove the 'interp' parameter, use
8261 bool, return void and make extern. Adjust.
8262 (mi_interpreter_resume): ... Rename to ...
8263 (mi_interp::resume): ... this. Remove the 'data' parameter,
8264 return void and make extern. Adjust.
8265 (mi_interpreter_suspend): ... Rename to ...
8266 (mi_interp::suspend): ... this. Remove the 'data' parameter,
8267 return void and make extern. Adjust.
8268 (mi_interpreter_exec): ... Rename to ...
8269 (mi_interp::exec): ... this. Remove the 'data' parameter and make
8271 (mi_interpreter_pre_command_loop): ... Rename to ...
8272 (mi_interp::pre_command_loop): ... this. Remove the 'self'
8273 parameter and make extern.
8274 (mi_on_normal_stop_1): Adjust.
8275 (mi_ui_out): Rename to ...
8276 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
8277 parameter and make extern. Adjust.
8278 (mi_set_logging): Rename to ...
8279 (mi_interp::set_logging): ... this. Remove the 'interp'
8280 parameter and make extern. Adjust.
8281 (mi_interp_procs): Delete.
8282 (mi_interp_factory): Adjust to use 'new'.
8283 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
8284 (mi_print_exception, mi_execute_command, mi_load_progress):
8286 * tui/tui-interp.c (tui_interp): New class.
8287 (as_tui_interp): Return a tui_interp pointer.
8288 (tui_on_normal_stop, tui_on_signal_received)
8289 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
8290 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
8291 to use interp::interp_ui_out.
8292 (tui_init): Rename to ...
8293 (tui_interp::init): ... this. Remove the 'self' parameter, use
8294 bool, return void and make extern. Adjust.
8295 (tui_resume): Rename to ...
8296 (tui_interp::resume): ... this. Remove the 'data' parameter,
8297 return void and make extern. Adjust.
8298 (tui_suspend): Rename to ...
8299 (tui_interp::suspend): ... this. Remove the 'data' parameter,
8300 return void and make extern. Adjust.
8301 (tui_ui_out): Rename to ...
8302 (tui_interp::interp_ui_out): ... this. Remove the 'self'
8303 parameter, and make extern. Adjust.
8304 (tui_exec): Rename to ...
8305 (tui_interp::exec): ... this. Remove the 'data' parameter and
8307 (tui_interp_procs): Delete.
8308 (tui_interp_factory): Use "new".
8310 2017-02-02 Tom Tromey <tom@tromey.com>
8312 * rust-exp.y (ends_raw_string, space_then_number)
8313 (rust_identifier_start_p): Return bool.
8314 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
8315 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
8316 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
8317 (rust_chartype_p): Return bool.
8318 (val_print_struct, rust_print_struct_def, rust_print_type):
8320 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
8323 2017-02-02 Tom Tromey <tom@tromey.com>
8325 * rust-lang.c: Reindent.
8327 2017-02-02 Tom Tromey <tom@tromey.com>
8329 * rust-lang.h (rust_crate_for_block): Update.
8330 * rust-lang.c (rust_crate_for_block): Return std::string.
8331 (rust_get_disr_info): Use std:;string, not
8332 gdb::unique_xmalloc_ptr.
8333 * rust-exp.y (crate_name): Update.
8335 2017-02-02 Pedro Alves <palves@redhat.com>
8337 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
8338 field out of gdb_disassembler_test and make it static.
8340 2017-02-02 Pedro Alves <palves@redhat.com>
8342 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
8343 mi1_interp and mi_interp fields.
8345 2017-02-02 Pedro Alves <palves@redhat.com>
8347 * cli/cli-interp.c (struct saved_output_files, saved_output):
8348 Moved from cli/cli-logging.c.
8349 (cli_set_logging): New function.
8350 (cli_interp_procs): Install cli_set_logging.
8351 * cli/cli-interp.h (make_logging_output, cli_set_logging):
8353 * cli/cli-logging.c (struct saved_output_files, saved_output):
8354 Moved to cli/cli-interp.c.
8355 (pop_output_files): Don't save outputs here.
8356 (make_logging_output): New function.
8357 (handle_redirections): Don't build tee nor save previous outputs
8359 * interps.c (current_interp_set_logging): Change prototype.
8360 Assume there's always a set_logging_proc method installed.
8361 * interps.h (interp_set_logging_ftype): Change prototype.
8362 (current_interp_set_logging): Change prototype and adjust comment.
8363 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
8364 use make_logging_output.
8365 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
8366 2017-02-02 Pedro Alves <palves@redhat.com>
8368 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
8370 (set_logging_overwrite): ... here.
8371 (logging_no_redirect_file): Delete.
8372 (set_logging_redirect): Don't handle redirection on the fly.
8373 Instead warn that "logging off" / "logging on" is necessary.
8374 (pop_output_files): Delete references to logging_no_redirect_file.
8375 (show_logging_command): Always speak in terms of what will happen
8376 once logging is reenabled.
8378 2017-02-02 Pedro Alves <palves@redhat.com>
8380 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
8382 2017-02-02 Pedro Alves <palves@redhat.com>
8384 * disasm.c (gdb_pretty_print_insn): Rename to ...
8385 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
8386 Remove gdbarch parameter. Adapt to clear the object's buffers
8387 instead of allocating new buffers, and to print using the object's
8388 gdb_disassembler instead of calling gdb_print_insn.
8389 (dump_insns): Use gdb_pretty_print_disassembler.
8390 * disasm.h (gdb_pretty_print_insn): Delete declaration.
8391 (gdb_pretty_print_disassembler): New class.
8392 * record-btrace.c (btrace_insn_history): Use
8393 gdb_pretty_print_disassembler.
8395 2017-02-02 Pedro Alves <palves@redhat.com>
8397 * ada-lang.c (type_as_string): Use string_file.
8398 * ada-valprint.c (ada_print_floating): Use string_file.
8399 * ada-varobj.c (ada_varobj_scalar_image)
8400 (ada_varobj_get_value_image): Use string_file.
8401 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
8402 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
8403 * breakpoint.c (update_inserted_breakpoint_locations)
8404 (insert_breakpoint_locations, reattach_breakpoints)
8405 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
8406 (print_it_watchpoint): Use string_file.
8407 (save_breakpoints): Use stdio_file.
8408 * c-exp.y (oper): Use string_file.
8409 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
8411 (pop_output_files): Use delete.
8412 (handle_redirections): Use stdio_file and tee_file.
8413 * cli/cli-setshow.c (do_show_command): Use string_file.
8414 * compile/compile-c-support.c (c_compute_program): Use
8416 * compile/compile-c-symbols.c (generate_vla_size): Take a
8417 'string_file &' instead of a 'ui_file *'.
8418 (generate_c_for_for_one_variable): Take a 'string_file &' instead
8419 of a 'ui_file *'. Use string_file.
8420 (generate_c_for_variable_locations): Take a 'string_file &'
8421 instead of a 'ui_file *'.
8422 * compile/compile-internal.h (generate_c_for_for_one_variable):
8423 Take a 'string_file &' instead of a 'ui_file *'.
8424 * compile/compile-loc2c.c (push, pushf, unary, binary)
8425 (print_label, pushf_register_address, pushf_register)
8426 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
8427 'ui_file *'. Adjust.
8428 * compile/compile.c (compile_to_object): Use string_file.
8429 * compile/compile.h (compile_dwarf_expr_to_c)
8430 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
8432 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
8433 (replace_typedefs_qualified_name): Use string_file and
8435 * disasm.c (gdb_pretty_print_insn): Use string_file.
8436 (gdb_disassembly): Adjust reference the null_stream global.
8437 (do_ui_file_delete): Delete.
8438 (gdb_insn_length): Use null_stream.
8439 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
8440 * dwarf2loc.c (dwarf2_compile_property_to_c)
8441 (locexpr_generate_c_location, loclist_generate_c_location): Take a
8442 'string_file &' instead of a 'ui_file *'.
8443 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
8444 * dwarf2read.c (do_ui_file_peek_last): Delete.
8445 (dwarf2_compute_name): Use string_file.
8446 * event-top.c (gdb_setup_readline): Use stdio_file.
8447 * gdbarch.sh (verify_gdbarch): Use string_file.
8448 * gdbtypes.c (safe_parse_type): Use null_stream.
8449 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
8451 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
8452 'string_file *' instead of a 'ui_file *'.
8453 (gdbscm_arch_disassemble): Use string_file.
8454 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
8455 * guile/scm-ports.c (class ioscm_file_port): Now a class that
8456 inherits from ui_file.
8457 (ioscm_file_port_delete, ioscm_file_port_rewind)
8458 (ioscm_file_port_put): Delete.
8459 (ioscm_file_port_write): Rename to ...
8460 (ioscm_file_port::write): ... this. Remove file_port_magic
8462 (ioscm_file_port_new): Delete.
8463 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
8465 * guile/scm-type.c (tyscm_type_name): Use string_file.
8466 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
8468 * infcmd.c (print_return_value_1): Use string_file.
8469 * infrun.c (print_target_wait_results): Use string_file.
8470 * language.c (add_language): Use string_file.
8471 * location.c (explicit_to_string_internal): Use string_file.
8472 * main.c (captured_main_1): Use null_file.
8473 * maint.c (maintenance_print_architecture): Use stdio_file.
8474 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
8475 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
8476 event_channel>: Change type to mi_console_file pointer.
8477 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
8478 (mi_console_file_delete): Delete.
8479 (struct mi_console_file): Delete.
8480 (mi_console_file_magic): Delete.
8481 (mi_console_file_new): Delete.
8482 (mi_console_file::mi_console_file): New.
8483 (mi_console_file_delete): Delete.
8484 (mi_console_file_fputs): Delete.
8485 (mi_console_file::write): New.
8486 (mi_console_raw_packet): Delete.
8487 (mi_console_file::flush): New.
8488 (mi_console_file_flush): Delete.
8489 (mi_console_set_raw): Rename to ...
8490 (mi_console_file::set_raw): ... this.
8491 * mi/mi-console.h (class mi_console_file): New class.
8492 (mi_console_file_new, mi_console_set_raw): Delete.
8493 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
8494 (mi_set_logging): Use delete and tee_file. Adjust.
8495 * mi/mi-main.c (output_register): Use string_file.
8496 (mi_cmd_data_evaluate_expression): Use string_file.
8497 (mi_cmd_data_read_memory): Use string_file.
8498 (mi_cmd_execute, print_variable_or_computed): Use string_file.
8499 * mi/mi-out.c (mi_ui_out::main_stream): New.
8500 (mi_ui_out::rewind): Use main_stream and
8502 (mi_ui_out::put): Use main_stream and string_file.
8503 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8504 Allocate a 'string_file' instead.
8505 (mi_out_new): Don't allocate a mem_fileopen stream here.
8506 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8507 (mi_ui_out::main_stream): Declare method.
8508 * printcmd.c (eval_command): Use string_file.
8509 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
8510 * python/py-arch.c (archpy_disassemble): Use string_file.
8511 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
8512 * python/py-frame.c (frapy_str): Use string_file.
8513 * python/py-framefilter.c (py_print_type, py_print_single_arg):
8515 * python/py-type.c (typy_str): Use string_file.
8516 * python/py-unwind.c (unwind_infopy_str): Use string_file.
8517 * python/py-value.c (valpy_str): Use string_file.
8518 * record-btrace.c (btrace_insn_history): Use string_file.
8519 * regcache.c (regcache_print): Use stdio_file.
8520 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
8521 * remote.c (escape_buffer): Use string_file.
8522 * rust-lang.c (rust_get_disr_info): Use string_file.
8523 * serial.c (serial_open_ops_1): Use stdio_file.
8524 (do_serial_close): Use delete.
8525 * stack.c (print_frame_arg): Use string_file.
8526 (print_frame_args): Remove local mem_fileopen stream, not used.
8527 (print_frame): Use string_file.
8528 * symmisc.c (maintenance_print_symbols): Use stdio_file.
8529 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
8530 Take a 'string_file *' instead of a 'ui_file *'.
8531 * top.c (new_ui): Use stdio_file and stderr_file.
8532 (free_ui): Use delete.
8533 (execute_command_to_string): Use string_file.
8534 (quit_confirm): Use string_file.
8535 * tracepoint.c (collection_list::append_exp): Use string_file.
8536 * tui/tui-disasm.c (tui_disassemble): Use string_file.
8537 * tui/tui-file.c: Don't include "ui-file.h".
8538 (enum streamtype, struct tui_stream): Delete.
8539 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
8540 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
8541 (tui_file::tui_file): New method.
8542 (tui_file_fputs): Delete.
8543 (tui_file_get_strbuf): Delete.
8544 (tui_file::puts): New method.
8545 (tui_file_adjust_strbuf): Delete.
8546 (tui_file_flush): Delete.
8547 (tui_file::flush): New method.
8548 * tui/tui-file.h: Tweak intro comment.
8550 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
8551 (tui_file_adjust_strbuf): Delete declarations.
8552 (class tui_file): New class.
8553 * tui/tui-io.c (tui_initialize_io): Use tui_file.
8554 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
8555 (tui_register_format): Use string_stream.
8556 * tui/tui-stack.c (tui_make_status_line): Use string_file.
8557 (tui_get_function_from_frame): Use string_file.
8558 * typeprint.c (type_to_string): Use string_file.
8559 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
8560 (null_stream): New global.
8561 (ui_file_delete): Delete.
8562 (ui_file::ui_file): New.
8563 (null_file_isatty): Delete.
8564 (ui_file::~ui_file): New.
8565 (null_file_rewind): Delete.
8566 (ui_file::printf): New.
8567 (null_file_put): Delete.
8568 (null_file_flush): Delete.
8569 (ui_file::putstr): New.
8570 (null_file_write): Delete.
8571 (ui_file::putstrn): New.
8572 (null_file_read): Delete.
8573 (ui_file::putc): New.
8574 (null_file_fputs): Delete.
8575 (null_file_write_async_safe): Delete.
8576 (ui_file::vprintf): New.
8577 (null_file_delete): Delete.
8578 (null_file::write): New.
8579 (null_file_fseek): Delete.
8580 (null_file::puts): New.
8581 (ui_file_data): Delete.
8582 (null_file::write_async_safe): New.
8583 (gdb_flush, ui_file_isatty): Adjust.
8584 (ui_file_put, ui_file_rewind): Delete.
8585 (ui_file_write): Adjust.
8586 (ui_file_write_for_put): Delete.
8587 (ui_file_write_async_safe, ui_file_read): Adjust.
8588 (ui_file_fseek): Delete.
8589 (fputs_unfiltered): Adjust.
8590 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
8591 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
8592 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
8593 (set_ui_file_data): Delete.
8594 (string_file::~string_file, string_file::write)
8595 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
8596 (do_ui_file_as_string, ui_file_as_string): Delete.
8597 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
8598 (struct mem_file): Delete.
8599 (mem_file_new): Delete.
8600 (stdio_file::stdio_file): New.
8601 (mem_file_delete): Delete.
8602 (stdio_file::stdio_file): New.
8603 (mem_fileopen): Delete.
8604 (stdio_file::~stdio_file): New.
8605 (mem_file_rewind): Delete.
8606 (stdio_file::set_stream): New.
8607 (mem_file_put): Delete.
8608 (stdio_file::open): New.
8609 (mem_file_write): Delete.
8610 (stdio_file_magic, struct stdio_file): Delete.
8611 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
8612 (stdio_file::flush): New.
8613 (stdio_file_read): Rename to ...
8614 (stdio_file::read): ... this. Adjust.
8615 (stdio_file_write): Rename to ...
8616 (stdio_file::write): ... this. Adjust.
8617 (stdio_file_write_async_safe): Rename to ...
8618 (stdio_file::write_async_safe) ... this. Adjust.
8619 (stdio_file_fputs): Rename to ...
8620 (stdio_file::puts) ... this. Adjust.
8621 (stdio_file_isatty): Delete.
8622 (stdio_file_fseek): Delete.
8623 (stdio_file::isatty): New.
8624 (stderr_file_write): Rename to ...
8625 (stderr_file::write) ... this. Adjust.
8626 (stderr_file_fputs): Rename to ...
8627 (stderr_file::puts) ... this. Adjust.
8628 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
8629 (stderr_file::stderr_file): New.
8630 (tee_file_magic): Delete.
8631 (struct tee_file): Delete.
8632 (tee_file::tee_file): New.
8633 (tee_file_new): Delete.
8634 (tee_file::~tee_file): New.
8635 (tee_file_delete): Delete.
8636 (tee_file_flush): Rename to ...
8637 (tee_file::flush): ... this. Adjust.
8638 (tee_file_write): Rename to ...
8639 (tee_file::write): ... this. Adjust.
8640 (tee_file::write_async_safe): New.
8641 (tee_file_fputs): Rename to ...
8642 (tee_file::puts): ... this. Adjust.
8643 (tee_file_isatty): Rename to ...
8644 (tee_file::isatty): ... this. Adjust.
8645 * ui-file.h (struct obstack, struct ui_file): Don't
8647 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
8648 (ui_file_write_ftype)
8649 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
8650 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
8651 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
8652 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
8653 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
8654 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
8655 (set_ui_file_fseek): Delete.
8656 (ui_file_data, ui_file_delete, ui_file_rewind)
8657 (struct ui_file): New.
8659 (class null_file): New.
8660 (null_stream): Declare.
8661 (ui_file_write_for_put, ui_file_put): Delete.
8662 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
8664 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
8665 (gdb_fopen, tee_file_new): Delete.
8666 (struct string_file): New.
8667 (struct stdio_file): New.
8668 (stdio_file_up): New.
8669 (struct stderr_file): New.
8670 (class tee_file): New.
8671 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
8672 of a 'ui_file *'. Adjust.
8673 * ui-out.h (class ui_out) <field_stream>: Likewise.
8674 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
8675 (null_stream): Delete.
8676 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
8678 * utils.h (struct ui_file): Delete forward declaration..
8679 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
8680 (error_stream): Take a 'string_file &' instead of a
8682 * varobj.c (varobj_value_get_print_value): Use string_file.
8683 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
8684 * gdbarch.c: Regenerate.
8686 2017-02-02 Pedro Alves <palves@redhat.com>
8688 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
8689 (gdb_pretty_print_insn): ... this. Now a free function. Add back
8690 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
8691 Adjust to call gdb_print_insn instead of
8692 gdb_disassembler::print_insn.
8693 (dump_insns, do_mixed_source_and_assembly_deprecated)
8694 (do_mixed_source_and_assembly, do_assembly_only): Add back a
8695 'gdbarch' parameter. Remove gdb_disassembler parameter.
8696 (gdb_disassembly): Don't allocate a gdb_disassembler here.
8697 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
8699 (gdb_pretty_print_insn): Re-add declaration.
8700 * record-btrace.c (btrace_insn_history): Don't allocate a
8701 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
8703 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
8705 * disasm.h (gdb_disassembly): Remove file_string parameter.
8706 * disasm.c (gdb_disassembly): Likewise.
8707 * cli/cli-cmds.c (print_disassembly): Adapt.
8708 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
8709 * stack.c (do_gdb_disassembly): Likewise.
8711 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
8713 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
8714 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
8715 targets. And if the implicit value is longer than needed, extract
8716 the first bytes instead of the "least significant" ones.
8718 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
8720 * btrace.c (btrace_enable): Do not call btrace_add_pc for
8721 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
8722 (btrace_fetch): Assert can_access_registers_ptid.
8723 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
8724 validate_registers_access.
8726 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
8728 * gdbthread.h (can_access_registers_ptid): New.
8729 * thread.c (can_access_registers_ptid): New.
8731 2017-02-01 Pedro Alves <palves@redhat.com>
8733 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
8735 2017-01-31 Pedro Alves <palves@redhat.com>
8737 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
8740 2017-01-31 Pedro Alves <palves@redhat.com>
8742 * stack.c (print_frame_args): Remove local mem_fileopen stream,
8745 2017-01-31 Pedro Alves <palves@redhat.com>
8747 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
8749 2017-01-31 Pedro Alves <palves@redhat.com>
8751 * common/scoped_restore.h
8752 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
8753 change the value's parameter type to T2.
8754 (make_scoped_restore): Likewise.
8756 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8757 Richard Henderson <rth@redhat.com>
8759 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
8760 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
8761 GS_BASE for older kernels.
8762 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
8763 GS_BASE for older kernels.
8764 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
8765 and GS_BASE to the offset table.
8766 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
8767 system register group.
8768 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
8770 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
8772 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
8773 AMD64_GSBASE_REGNUM.
8774 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
8775 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
8776 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
8777 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
8778 i386/64bit-segments.xml in those rules.
8779 * features/i386/64bit-segments.xml: New file.
8780 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
8781 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
8782 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
8783 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
8784 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
8785 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
8786 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
8787 * features/i386/amd64-avx-linux.c: Regenerated.
8788 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
8789 * features/i386/amd64-avx-mpx.c: Regenerated.
8790 * features/i386/amd64-avx512-linux.c: Regenerated.
8791 * features/i386/amd64-linux.c: Regenerated.
8792 * features/i386/amd64-mpx-linux.c: Regenerated.
8793 * features/i386/i386-avx-mpx-linux.c: Regenerated.
8794 * features/i386/i386-avx-mpx.c: Regenerated.
8795 * features/i386/x32-avx-linux.c: Regenerated.
8796 * features/i386/x32-avx512-linux.c: Regenerated.
8797 * regformats/i386/amd64-avx-linux.dat: Regenerated.
8798 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
8799 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
8800 * regformats/i386/amd64-linux.dat: Regenerated.
8801 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
8802 * regformats/i386/x32-avx-linux.dat: Regenerated.
8803 * regformats/i386/x32-avx512-linux.dat: Regenerated.
8804 * regformats/i386/x32-linux.dat: Regenerated.
8806 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8808 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
8809 Set to AMD64_NUM_REGS.
8811 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8813 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
8814 that checks validity of a register number.
8816 2017-01-27 Kees Cook <keescook@google.com>
8818 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
8819 fetch_fpregs if target has fpa registers.
8820 (arm_linux_store_inferior_registers): Call store_fpregs if target
8823 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
8825 * cris-tdep.c (cris_gdbarch_init): Remove check for
8826 info.byte_order and force it to BFD_ENDIAN_LITTLE.
8828 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
8830 * corelow.c (get_core_register_section): Check for regset
8831 existence before checking for REGSET_VARIABLE_SIZE.
8833 2017-01-26 Yao Qi <yao.qi@linaro.org>
8834 Pedro Alves <palves@redhat.com>
8837 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
8838 call memory_error, save memaddr instead.
8839 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
8840 negative, cal memory_error.
8841 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
8843 2017-01-26 Yao Qi <yao.qi@linaro.org>
8845 * disasm-selftests.c (memory_error_test): New function.
8846 (_initialize_disasm_selftests): Register memory_error_test.
8848 2017-01-26 Yao Qi <yao.qi@linaro.org>
8850 * Makefile.in (SFILES): Add disasm-selftests.c and
8852 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
8853 * disasm-selftests.c: New file.
8854 * selftest-arch.c: New file.
8855 * selftest-arch.h: New file.
8857 2017-01-26 Yao Qi <yao.qi@linaro.org>
8859 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
8860 to bfd_arch_mep. Don't return 0 if section is not
8861 found. Call print_insn_mep.
8863 2017-01-26 Pedro Alves <palves@redhat.com>
8864 Yao Qi <yao.qi@linaro.org>
8866 * arm-tdep.c: Include "disasm.h".
8867 (gdb_print_insn_arm): Update code to get gdbarch.
8868 * disasm.c (dis_asm_read_memory): Change it to
8869 gdb_disassembler::dis_asm_read_memory.
8870 (dis_asm_memory_error): Likewise.
8871 (dis_asm_print_address): Likewise.
8872 (gdb_pretty_print_insn): Change it to
8873 gdb_disassembler::pretty_print_insn.
8874 (dump_insns): Add one argument gdb_disassemlber. All
8876 (do_mixed_source_and_assembly_deprecated): Likewise.
8877 (do_mixed_source_and_assembly): Likewise.
8878 (do_assembly_only): Likewise.
8879 (gdb_disassembler::gdb_disassembler): New.
8880 (gdb_disassembler::print_insn): New.
8881 * disasm.h (class gdb_disassembler): New.
8882 (gdb_pretty_print_insn): Remove declaration.
8883 (gdb_disassemble_info): Likewise.
8884 * guile/scm-disasm.c (class gdbscm_disassembler): New.
8885 (gdbscm_disasm_read_memory_worker): Update.
8886 (gdbscm_disasm_read_memory): Update.
8887 (gdbscm_disasm_memory_error): Remove.
8888 (gdbscm_disasm_print_address): Remove.
8889 (gdbscm_disassembler::gdbscm_disassembler): New.
8890 (gdbscm_print_insn_from_port): Update.
8891 * mips-tdep.c: Include disasm.h.
8892 (gdb_print_insn_mips): Update code to get gdbarch.
8893 * record-btrace.c (btrace_insn_history): Update.
8894 * spu-tdep.c: Include disasm.h.
8895 (struct spu_dis_asm_data): Remove.
8896 (struct spu_dis_asm_info): New.
8897 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
8899 (gdb_print_insn_spu): Cast disassemble_info to
8902 2017-01-26 Yao Qi <yao.qi@linaro.org>
8904 * disasm.c (do_ui_file_delete): Delete.
8905 (gdb_insn_length): Move code creating stream to ...
8906 * utils.c (null_stream): ... here. New function.
8907 * utils.h (null_stream): Declare.
8909 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
8911 * python/py-inferior.c (find_thread_object): Return directly
8912 from the loop. Remove "found" variable.
8914 2017-01-21 Joel Brobecker <brobecker@adacore.com>
8916 GDB 7.12.1 released.
8918 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
8920 * python/py-function.c (fnpy_call): Reorder declarations to have
8921 the gdbpy_enter object declared first.
8922 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
8924 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
8927 * python/python-internal.h (PyMem_RawMalloc): Define for
8929 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
8930 PyMem_RawMalloc instead of PyMem_Malloc.
8932 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
8933 Luis Machado <lgustavo@codesourcery.com>
8935 * NEWS (New commands): Mention flash-erase.
8936 (New MI commands): Mention target-flash-erase.
8937 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
8939 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
8940 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
8941 * target.c (flash_erase_command): New function.
8942 (initialize_targets): Add new flash-erase command.
8943 * target.h (flash_erase_command): New declaration.
8945 2017-01-20 Joel Brobecker <brobecker@adacore.com>
8947 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
8948 HAVE_SYS_PROCFS_H is defined.
8950 2017-01-18 Alan Hayward <alan.hayward@arm.com>
8952 * remote.c (struct cached_reg): Change data into a pointer.
8953 * (stop_reply_dtr): Free data pointers before deleting vector.
8954 (process_stop_reply): Likewise.
8955 (remote_parse_stop_reply): Allocate space for data
8957 2017-01-18 Alan Hayward <alan.hayward@arm.com>
8959 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
8961 (amd64_pseudo_register_read_value): Likewise.
8962 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
8963 (store_register_using_P): Likewise.
8964 * regcache.c (regcache_xfer_part): Likewise.
8966 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
8968 Split real and pseudo registers.
8969 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
8970 (sparc32_pseudo_regnum): New enum.
8971 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
8972 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
8973 (SPARC32_CP0_REGISTERS): New macro.
8974 (sparc32_pseudo_register_name): New function.
8975 (sparc32_register_name): Use sparc32_pseudo_register_name.
8976 (sparc32_pseudo_register_type): New function.
8977 (sparc32_register_type): Use sparc32_pseudo_register_type.
8978 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
8979 pseudo register numbers.
8980 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
8981 (SPARC64_CP0_REGISTERS): New macro.
8982 (sparc64_pseudo_register_name): New function.
8983 (sparc64_register_name): Use sparc64_pseudo_register_name.
8984 (sparc64_pseudo_register_type): New function.
8985 (sparc64_register_type): Use sparc64_pseudo_register_type.
8986 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
8987 pseudo register numbers.
8988 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
8989 sparc64_store_arguments): Handle pseudo register numbers.
8991 2017-01-13 Yao Qi <yao.qi@linaro.org>
8993 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
8994 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
8996 (getpkt_or_notif_sane_1): Likewise.
8998 2017-01-13 Yao Qi <yao.qi@linaro.org>
9000 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
9001 of CC. Pass "-x c++-header" instead of "-x c".
9003 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
9005 * remote.c (remote_can_async_p): Update comment.
9007 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
9009 * linux-nat.c (linux_nat_can_async_p): Update comment.
9011 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
9013 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
9015 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
9017 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
9019 2017-01-10 Tom Tromey <tom@tromey.com>
9021 * python/py-type.c (typy_legacy_template_argument): Update.
9022 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
9023 ~demangle_parse_info): Declare new members.
9024 (cp_demangled_name_to_comp): Return unique_ptr.
9025 (cp_demangled_name_parse_free)
9026 (make_cleanup_cp_demangled_name_parse_free)
9027 (cp_new_demangle_parse_info): Remove.
9028 * cp-support.c (do_demangled_name_parse_free_cleanup)
9029 (make_cleanup_cp_demangled_name_parse_free): Remove.
9030 (inspect_type, cp_canonicalize_string_full)
9031 (cp_canonicalize_string): Update.
9032 (mangled_name_to_comp): Change return type.
9033 (cp_class_name_from_physname, method_name_from_physname)
9034 (cp_func_name, cp_remove_params): Update.
9035 * cp-name-parser.y (demangle_parse_info): New constructor, from
9036 cp_new_demangle_parse_info.
9037 (~demangle_parse_info): New destructor, from
9038 cp_demangled_name_parse_free.
9039 (cp_merge_demangle_parse_infos): Update.
9040 (cp_demangled_name_to_comp): Change return type.
9042 2017-01-10 Tom Tromey <tom@tromey.com>
9044 * top.c (prevent_dont_repeat): Change return type.
9045 * python/python.c (execute_gdb_command): Use std::string.
9047 * guile/guile.c (gdbscm_execute_gdb_command): Update.
9048 * command.h (prevent_dont_repeat): Change return type.
9049 * breakpoint.c (bpstat_do_actions_1): Update.
9051 2017-01-10 Tom Tromey <tom@tromey.com>
9053 * value.h (scoped_value_mark::~scoped_value_mark): Call
9055 (scoped_value_mark::free_to_mark): New method.
9056 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
9059 2017-01-10 Tom Tromey <tom@tromey.com>
9061 * python/py-value.c (valpy_dereference, valpy_referenced_value)
9062 (valpy_reference_value, valpy_const_value, valpy_get_address)
9063 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
9064 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
9065 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
9066 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
9068 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
9069 * value.h (scoped_value_mark): New class.
9071 2017-01-10 Tom Tromey <tom@tromey.com>
9073 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
9074 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
9075 * psymtab.c (discard_psymtabs_upto): Remove.
9076 (make_cleanup_discard_psymtabs): Remove.
9077 (struct psymtab_state): Remove.
9079 2017-01-10 Tom Tromey <tom@tromey.com>
9081 * record-full.c (record_full_save_cleanups): Remove.
9082 (record_full_save): Use gdb::unlinker.
9083 * gcore.c (do_bfd_delete_cleanup): Remove.
9084 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
9086 * dwarf2read.c (unlink_if_set): Remove.
9087 (write_psymtabs_to_index): Use gdb::unlinker.
9088 * common/gdb_unlinker.h: New file.
9090 2017-01-10 Tom Tromey <tom@tromey.com>
9092 * windows-tdep.c (windows_xfer_shared_library): Update.
9093 * windows-nat.c (windows_make_so): Update.
9094 * utils.h (make_cleanup_bfd_unref): Remove.
9095 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
9096 * symfile.h (symfile_bfd_open)
9097 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
9098 * symfile.c (read_symbols, symbol_file_add)
9099 (separate_debug_file_exists): Update.
9100 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
9101 (generic_load, reread_symbols): Update.
9102 * symfile-mem.c (symbol_file_add_from_memory): Update.
9103 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
9104 (spu_symbol_file_add_from_memory): Update.
9105 * solist.h (struct target_so_ops) <bfd_open>: Return
9107 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
9108 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
9110 (solib_map_sections, reload_shared_libraries_1): Update.
9111 * solib-svr4.c (enable_break): Update.
9112 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
9113 * solib-frv.c (enable_break2): Update.
9114 * solib-dsbt.c (enable_break): Update.
9115 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
9117 (darwin_solib_get_all_image_info_addr_at_init): Update.
9118 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
9119 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
9120 * record-full.c (record_full_save): Update.
9121 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
9122 * procfs.c (insert_dbx_link_bpt_in_file): Update.
9123 * minidebug.c (find_separate_debug_file_in_section): Return
9125 * machoread.c (macho_add_oso_symfile): Change abfd to
9127 (macho_symfile_read_all_oso): Update.
9128 (macho_check_dsym): Return gdb_bfd_ref_ptr.
9129 (macho_symfile_read): Update.
9130 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
9131 (jit_bfd_try_read_symtab): Update.
9132 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9133 (gdb_bfd_openw, gdb_bfd_openr_iovec)
9134 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
9136 (gdb_bfd_ref_policy): New struct.
9137 (gdb_bfd_ref_ptr): New typedef.
9138 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9139 (gdb_bfd_openw, gdb_bfd_openr_iovec)
9140 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
9142 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
9143 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
9144 (gcore_command): Update.
9145 * exec.c (exec_file_attach): Update.
9146 * elfread.c (elf_symfile_read): Update.
9147 * dwarf2read.c (dwarf2_get_dwz_file): Update.
9148 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
9149 (open_and_init_dwo_file): Update.
9150 (open_dwp_file): Return gdb_bfd_ref_ptr.
9151 (open_and_init_dwp_file): Update.
9152 * corelow.c (core_open): Update.
9153 * compile/compile-object-load.c (compile_object_load): Update.
9154 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
9155 * coffread.c (coff_symfile_read): Update.
9156 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
9157 gdb_bfd_ref_ptr. Rename.
9158 (dump_bfd_file, restore_command): Update.
9159 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
9160 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
9161 (find_separate_debug_file_by_buildid): Update.
9163 2017-01-10 Tom Tromey <tom@tromey.com>
9165 * common/gdb_ref_ptr.h: New file.
9166 * python/py-ref.h (struct gdbpy_ref_policy): New.
9167 (gdbpy_ref): Now a typedef.
9169 2017-01-10 Tom Tromey <tom@tromey.com>
9171 * utils.h (make_cleanup_htab_delete): Don't declare.
9172 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
9174 * linespec.c (decode_compound_collector): Add constructor,
9176 (lookup_prefix_sym): Remove cleanup.
9177 (symtab_collector): Add constructor, destructor.
9178 (collect_symtabs_from_filename): Remove cleanup.
9179 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
9180 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
9182 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
9183 * dwarf2read.c (dw2_expand_symtabs_matching)
9184 (dw2_map_symbol_filenames, dwarf_decode_macros)
9185 (write_psymtabs_to_index): Use htab_up.
9186 * dwarf2loc.c (func_verify_no_selftailcall)
9187 (call_site_find_chain_1, func_verify_no_selftailcall)
9188 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
9189 std::vector, gdb::unique_xmalloc_ptr.
9190 (call_sitep): Remove typedef.
9191 (dwarf2_locexpr_baton_eval): Remove unused variable.
9193 2017-01-10 Tom Tromey <tom@tromey.com>
9195 * python/python-internal.h (make_cleanup_py_decref)
9196 (make_cleanup_py_xdecref): Don't declare.
9197 * python/py-utils.c (py_decref, make_cleanup_py_decref)
9198 (py_xdecref, make_cleanup_py_xdecref): Remove.
9200 2017-01-10 Tom Tromey <tom@tromey.com>
9202 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
9203 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
9205 2017-01-10 Tom Tromey <tom@tromey.com>
9207 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
9209 2017-01-10 Tom Tromey <tom@tromey.com>
9211 * python/py-utils.c (unicode_to_encoded_string)
9212 (python_string_to_target_string)
9213 (python_string_to_target_python_string)
9214 (python_string_to_host_string, gdbpy_obj_to_string)
9215 (get_addr_from_python): Use gdbpy_ref.
9217 2017-01-10 Tom Tromey <tom@tromey.com>
9219 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
9222 2017-01-10 Tom Tromey <tom@tromey.com>
9224 * python/python.c (eval_python_command, gdbpy_decode_line)
9225 (gdbpy_run_events, gdbpy_start_type_printers)
9226 (gdbpy_apply_type_printers): Use gdbpy_ref.
9228 2017-01-10 Tom Tromey <tom@tromey.com>
9230 * python/py-param.c (get_doc_string, compute_enum_values): Use
9233 2017-01-10 Tom Tromey <tom@tromey.com>
9235 * python/py-inferior.c (find_thread_object, build_inferior_list):
9238 2017-01-10 Tom Tromey <tom@tromey.com>
9240 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
9242 2017-01-10 Tom Tromey <tom@tromey.com>
9244 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
9247 2017-01-10 Tom Tromey <tom@tromey.com>
9249 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
9251 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
9254 2017-01-10 Tom Tromey <tom@tromey.com>
9256 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
9259 2017-01-10 Tom Tromey <tom@tromey.com>
9261 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
9262 decref results of PyArg_ParseTupleAndKeywords.
9264 2017-01-10 Tom Tromey <tom@tromey.com>
9266 * python/python.c (python_run_simple_file): Use
9267 unique_xmalloc_ptr, gdbpy_ref.
9269 2017-01-10 Tom Tromey <tom@tromey.com>
9271 * python/py-prettyprint.c (print_stack_unless_memory_error)
9272 (print_string_repr, print_children): Use gdbpy_ref.
9273 (dummy_python_frame): New class.
9274 (dummy_python_frame::dummy_python_frame): Rename from
9275 push_dummy_python_frame.
9276 (py_restore_tstate): Remove.
9278 2017-01-10 Tom Tromey <tom@tromey.com>
9280 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
9282 2017-01-10 Tom Tromey <tom@tromey.com>
9284 * python/python.c (ensure_python_env, restore_python_env):
9286 * python/python-internal.h (ensure_python_env): Don't declare.
9287 * varobj.h (varobj_ensure_python_env): Don't declare.
9288 * varobj.c (varobj_ensure_python_env): Remove.
9290 2017-01-10 Tom Tromey <tom@tromey.com>
9292 * varobj.c (varobj_value_get_print_value): Use
9295 2017-01-10 Tom Tromey <tom@tromey.com>
9297 * python/py-prettyprint.c (print_string_repr, print_children):
9299 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
9301 * varobj.c (varobj_value_get_print_value): Update.
9302 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
9304 2017-01-10 Tom Tromey <tom@tromey.com>
9306 * varobj.c (varobj_get_display_hint)
9307 (dynamic_varobj_has_child_method, install_new_value_visualizer)
9308 (varobj_set_visualizer, free_variable): Use
9311 2017-01-10 Tom Tromey <tom@tromey.com>
9313 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
9314 (do_finish_initialization): New function. Use gdbpy_ref.
9315 (gdbpy_finish_initialization): Use gdbpy_enter. Call
9316 do_finish_initialization.
9318 2017-01-10 Tom Tromey <tom@tromey.com>
9320 * python/py-param.c (get_set_value, get_show_value): Use
9321 gdbpy_enter, gdbpy_ref.
9323 2017-01-10 Tom Tromey <tom@tromey.com>
9325 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
9327 2017-01-10 Tom Tromey <tom@tromey.com>
9329 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
9331 2017-01-10 Tom Tromey <tom@tromey.com>
9333 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
9334 Use gdbpy_enter_varobj.
9336 2017-01-10 Tom Tromey <tom@tromey.com>
9338 * varobj.c (gdbpy_enter_varobj): New constructor.
9339 * python/python-internal.h (gdbpy_enter_varobj): New class.
9340 * python/py-varobj.c (py_varobj_get_iterator): Use
9343 2017-01-10 Tom Tromey <tom@tromey.com>
9345 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
9346 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
9347 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
9348 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
9350 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
9352 2017-01-10 Tom Tromey <tom@tromey.com>
9354 * python/py-xmethods.c (invoke_match_method): Use
9357 2017-01-10 Tom Tromey <tom@tromey.com>
9359 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
9360 gdbpy_enter, gdbpy_ref.
9362 2017-01-10 Tom Tromey <tom@tromey.com>
9364 * python/python.c (python_interactive_command): Use gdbpy_enter.
9366 2017-01-10 Tom Tromey <tom@tromey.com>
9368 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
9371 2017-01-10 Tom Tromey <tom@tromey.com>
9373 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
9374 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
9376 2017-01-10 Tom Tromey <tom@tromey.com>
9378 * utils.h (htab_deleter): New struct.
9379 (htab_up): New typedef.
9380 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
9381 gdbpy_enter, gdbpy_ref, htab_up.
9383 2017-01-10 Tom Tromey <tom@tromey.com>
9385 * python/py-unwind.c (pending_frame_invalidate): Remove.
9386 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
9388 2017-01-10 Tom Tromey <tom@tromey.com>
9390 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
9391 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
9393 2017-01-10 Tom Tromey <tom@tromey.com>
9395 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
9397 2017-01-10 Tom Tromey <tom@tromey.com>
9399 * python/python.c (gdbpy_eval_from_control_command)
9400 (gdbpy_source_script, gdbpy_run_events)
9401 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
9402 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
9405 2017-01-10 Tom Tromey <tom@tromey.com>
9407 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
9409 2017-01-10 Tom Tromey <tom@tromey.com>
9411 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
9413 2017-01-10 Tom Tromey <tom@tromey.com>
9415 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
9416 (python_on_inferior_call_pre, python_on_inferior_call_post)
9417 (python_on_memory_change, python_on_register_change)
9418 (python_inferior_exit, python_new_objfile, add_thread_object)
9419 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
9421 2017-01-10 Tom Tromey <tom@tromey.com>
9423 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
9424 (bpfinishpy_handle_exit): Use gdbpy_enter.
9426 2017-01-10 Tom Tromey <tom@tromey.com>
9428 * python/py-cmd.c (cmdpy_destroyer)
9429 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
9432 2017-01-10 Tom Tromey <tom@tromey.com>
9434 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
9436 (gdbpy_breakpoint_has_cond): Likewise.
9438 2017-01-10 Tom Tromey <tom@tromey.com>
9440 * python/python.c (gdbpy_enter): New constructor.
9441 (~gdbpy_enter): New destructor.
9442 (restore_python_env, ensure_python_env): Rewrite.
9443 * python/python-internal.h (gdbpy_enter): New class.
9445 2017-01-10 Tom Tromey <tom@tromey.com>
9447 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
9449 2017-01-10 Tom Tromey <tom@tromey.com>
9451 * python/py-value.c (value_has_field, get_field_flag)
9452 (get_field_type, valpy_getitem, convert_value_from_python): Use
9455 2017-01-10 Tom Tromey <tom@tromey.com>
9457 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
9460 2017-01-10 Tom Tromey <tom@tromey.com>
9462 * python/py-prettyprint.c (search_pp_list)
9463 (find_pretty_printer_from_objfiles)
9464 (find_pretty_printer_from_progspace)
9465 (find_pretty_printer_from_gdb, find_pretty_printer)
9466 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
9469 2017-01-10 Tom Tromey <tom@tromey.com>
9471 * python/py-param.c (call_doc_function): Use gdbpy_ref.
9473 2017-01-10 Tom Tromey <tom@tromey.com>
9475 * python/py-linetable.c (build_line_table_tuple_from_pcs)
9476 (ltpy_get_all_source_lines): Use gdbpy_ref.
9478 2017-01-10 Tom Tromey <tom@tromey.com>
9480 * python/py-framefilter.c (extract_sym, extract_value)
9481 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
9484 2017-01-10 Tom Tromey <tom@tromey.com>
9486 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
9488 2017-01-10 Tom Tromey <tom@tromey.com>
9490 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
9492 2017-01-10 Tom Tromey <tom@tromey.com>
9494 * python/py-function.c (convert_values_to_python, fnpy_init): Use
9497 2017-01-10 Tom Tromey <tom@tromey.com>
9499 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
9501 2017-01-10 Tom Tromey <tom@tromey.com>
9503 * python/py-type.c (convert_field, make_fielditem, typy_fields)
9504 (typy_range): Use gdbpy_ref.
9506 2017-01-10 Tom Tromey <tom@tromey.com>
9508 * python/py-threadevent.c (create_thread_event_object): Use
9510 * python/py-stopevent.c (create_stop_event_object): Simplify.
9511 (emit_stop_event): Use gdbpy_ref.
9512 * python/py-signalevent.c (create_signal_event_object): Use
9514 * python/py-newobjfileevent.c (create_new_objfile_event_object)
9515 (emit_new_objfile_event, create_clear_objfiles_event_object)
9516 (emit_clear_objfiles_event): Use gdbpy_ref.
9517 * python/py-infevents.c (create_inferior_call_event_object)
9518 (create_register_changed_event_object)
9519 (create_memory_changed_event_object, emit_inferior_call_event)
9520 (emit_memory_changed_event, emit_register_changed_event): Use
9522 * python/py-exitedevent.c (create_exited_event_object)
9523 (emit_exited_event): Use gdbpy_ref.
9524 * python/py-event.h (evpy_emit_event): Remove
9525 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
9526 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
9527 * python/py-continueevent.c (emit_continue_event): Use
9529 * python/py-breakpoint.c (gdbpy_breakpoint_created)
9530 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
9532 * python/py-bpevent.c (create_breakpoint_event_object): Use
9535 2017-01-10 Tom Tromey <tom@tromey.com>
9537 * python/py-ref.h: New file.
9539 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
9541 * cli-out.c (cli_ui_out::do_redirect): Change return type to
9543 * cli-out.h (cli_ui_out::do_redirect): Likewise.
9544 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
9545 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
9546 * ui-out.c (ui_out::redirect): Likewise.
9547 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
9548 * cli/cli-logging.c (set_logging_redirect): Update call site of
9550 (handle_redirections): Likewise.
9551 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
9552 * top.c (execute_command_to_string): Likewise.
9553 * utils.c (do_ui_out_redirect_pop): Likewise.
9555 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
9557 * stack.c (_initialize_stack): Update "frame" command help message.
9559 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
9561 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
9563 2017-01-06 Yao Qi <yao.qi@linaro.org>
9565 * x86-linux-nat.h: Include gdb_proc_service.h.
9567 2017-01-06 Yao Qi <yao.qi@linaro.org>
9569 * ser-base.h: Include serial.h.
9571 2017-01-06 Yao Qi <yao.qi@linaro.org>
9573 * ppc-linux-tdep.h: Include ppc-tdep.h.
9575 2017-01-06 Yao Qi <yao.qi@linaro.org>
9577 * nat/amd64-linux-siginfo.h: Include signal.h.
9579 2017-01-06 Yao Qi <yao.qi@linaro.org>
9581 * nat/aarch64-linux-hw-point.h: Include break-common.h.
9583 2017-01-06 Yao Qi <yao.qi@linaro.org>
9585 * mi/mi-parse.h: Include mi-cmds.h.
9587 2017-01-06 Yao Qi <yao.qi@linaro.org>
9589 * inf-loop.c: Don't include "target.h".
9590 * inf-loop.h: Include it here.
9592 2017-01-06 Yao Qi <yao.qi@linaro.org>
9594 * dfp.h: Include "dboulest.h" and "expression.h".
9596 2017-01-06 Yao Qi <yao.qi@linaro.org>
9598 * ax-gdb.h: Include "ax.h".
9600 2017-01-06 Yao Qi <yao.qi@linaro.org>
9602 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
9603 with nat/gdb_ptrace.h.
9605 2017-01-05 Yao Qi <yao.qi@linaro.org>
9607 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
9609 (mips64_fbsd_sigframe_init): Likewise.
9611 2017-01-04 John Baldwin <jhb@FreeBSD.org>
9613 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
9614 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
9616 2017-01-04 John Baldwin <jhb@FreeBSD.org>
9618 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
9619 * NEWS: Mention new FreeBSD/mips native configuration.
9620 * config/mips/fbsd.mh: New file.
9621 * configure.host: Add mips*-*-freebsd*.
9622 * mips-fbsd-nat.c: New file.
9624 2017-01-04 John Baldwin <jhb@FreeBSD.org>
9626 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
9627 (ALLDEPFILES): Add mips-fbsd-tdep.c.
9628 * NEWS: Mention new FreeBSD/mips target.
9629 * configure.tgt: Add mips*-*-freebsd*.
9630 * mips-fbsd-tdep.c: New file.
9631 * mips-fbsd-tdep.h: New file.
9633 2017-01-04 Yao Qi <yao.qi@linaro.org>
9635 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
9636 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
9638 2017-01-01 Joel Brobecker <brobecker@adacore.com>
9640 Update copyright year range in all GDB files.
9642 2017-01-01 Joel Brobecker <brobecker@adacore.com>
9644 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
9646 For older changes see ChangeLog-2016.
9652 version-control: never