1 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
11 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
13 * infrun.c (follow_exec): Call add_thread after
14 target_find_description.
16 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
18 * infrun.c (handle_inferior_event_1): When exec'ing, read
19 stop_pc after follow_exec.
21 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
23 * remote.c (process_g_packet): Update error message.
25 2017-09-05 Yao Qi <yao.qi@linaro.org>
27 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
30 2017-09-05 Pedro Alves <palves@redhat.com>
32 * eval.c (eval_call, evaluate_funcall): New functions, factored
34 (evaluate_subexp_standard): ... this.
36 2017-09-05 Yao Qi <yao.qi@linaro.org>
38 * amd64-tdep.c (amd64_target_description): Create target
40 (_initialize_amd64_tdep): Don't call functions
41 initialize_tdesc_amd64_*. Add self tests.
42 * arch/amd64.c (amd64_create_target_description): Add parameter
43 is_linux. Call set_tdesc_osabi if is_linux is true.
44 * arch/amd64.h (amd64_create_target_description): Update the
46 * arch/i386.c (i386_create_target_description): Add parameter
47 is_linux. Call set_tdesc_osabi if is_linux is true.
48 * arch/i386.h (i386_create_target_description): Update
50 * configure.tgt: Add i386.o to gdb_target_obs.
51 * features/Makefile (XMLTOC): Remove i386/*.xml.
52 * features/i386/amd64-avx-avx512.c: Remove.
53 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
54 * features/i386/amd64-avx-mpx.c: Remove.
55 * features/i386/amd64-avx.c: Remove.
56 * features/i386/amd64-mpx.c: Remove.
57 * features/i386/amd64.c: Remove.
58 * features/i386/i386-avx-avx512.c: Remove.
59 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
60 * features/i386/i386-avx-mpx.c: Remove.
61 * features/i386/i386-avx.c: Remove.
62 * features/i386/i386-mmx.c: Remove.
63 * features/i386/i386-mpx.c: Remove.
64 * features/i386/i386.c: Remove.
65 * i386-tdep.c: Don't include features/i386/i386*.c., include
66 target-descriptions.h and arch/i386.h.
67 (i386_target_description): Create target descriptions.
68 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
69 functions. Do self tests.
71 2017-09-05 Yao Qi <yao.qi@linaro.org>
73 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
74 * features/i386/amd64-avx-avx512-linux.c: Removed.
75 * features/i386/amd64-avx-linux.c: Removed.
76 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
77 * features/i386/amd64-avx-mpx-linux.c: Removed.
78 * features/i386/amd64-linux.c: Removed.
79 * features/i386/amd64-mpx-linux.c: Removed.
80 * features/i386/x32-avx-avx512-linux.c: Removed.
81 * features/i386/x32-avx-linux.c: Removed.
82 * features/i386/x32-linux.c: Removed.
84 2017-09-05 Yao Qi <yao.qi@linaro.org>
86 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
88 (amd64_linux_read_description): Call
89 amd64_create_target_description.
90 * arch/amd64.c: New file.
91 * arch/amd64.h: New file.
92 * configure.tgt (x86_64-*-linux*): Append amd64.o.
93 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
95 2017-09-05 Yao Qi <yao.qi@linaro.org>
97 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
98 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
99 (amd64_linux_read_description): Create target descriptions.
100 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
101 functions. Add unit tests.
102 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
104 * features/i386/64bit-avx.c: Generated.
105 * features/i386/64bit-avx512.c: Generated.
106 * features/i386/64bit-core.c: Generated.
107 * features/i386/64bit-linux.c: Generated.
108 * features/i386/64bit-mpx.c: Generated.
109 * features/i386/64bit-pkeys.c: Generated.
110 * features/i386/64bit-segments.c: Generated.
111 * features/i386/64bit-sse.c: Generated.
112 * features/i386/x32-core.c: Generated.
113 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
114 c files for amd64-linux and x32-linux.
116 2017-09-05 Yao Qi <yao.qi@linaro.org>
118 * amd64-linux-tdep.c (amd64_linux_read_description): New
120 (amd64_linux_core_read_description): Call
121 amd64_linux_read_description.
122 (amd64_linux_init_abi): Likewise.
123 (amd64_x32_linux_init_abi): Likewise.
124 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
125 * x86-linux-nat.c (x86_linux_read_description): Call
126 amd64_linux_read_description.
128 2017-09-05 Yao Qi <yao.qi@linaro.org>
130 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
133 2017-09-05 Yao Qi <yao.qi@linaro.org>
135 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
136 * features/i386/i386-avx-avx512-linux.c: Remove.
137 * features/i386/i386-avx-linux.c: Remove.
138 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
139 * features/i386/i386-avx-mpx-linux.c: Remove.
140 * features/i386/i386-linux.c: Remove.
141 * features/i386/i386-mmx-linux.c: Remove.
142 * features/i386/i386-mpx-linux.c: Remove.
144 2017-09-05 Yao Qi <yao.qi@linaro.org>
146 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
147 (SFILES): Add arch/i386.c.
148 (HFILES_NO_SRCDIR): Add arch/i386.h.
149 * arch/i386.c: New file.
150 * arch/i386.h: New file.
151 * arch/tdesc.h (allocate_target_description): Declare.
152 (set_tdesc_architecture): Declare.
153 (set_tdesc_osabi): Declare.
154 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
155 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
157 (i386_linux_read_description): Remove code and call
158 i386_create_target_description.
159 (set_tdesc_architecture): New function.
160 (set_tdesc_osabi): New function.
161 * target-descriptions.h (allocate_target_description): Remove.
163 2017-09-05 Yao Qi <yao.qi@linaro.org>
165 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
166 * target-descriptions.c (tdesc_create_feature): Likewise, and
168 * features/i386/32bit-avx.c: Re-generated.
169 * features/i386/32bit-avx512.c: Re-generated.
170 * features/i386/32bit-core.c: Re-generated.
171 * features/i386/32bit-linux.c: Re-generated.
172 * features/i386/32bit-mpx.c: Re-generated.
173 * features/i386/32bit-pkeys.c: Re-generated.
174 * features/i386/32bit-sse.c: Re-generated.
176 2017-09-05 Yao Qi <yao.qi@linaro.org>
178 * regformats/regdef.h (struct reg): Override operator == and !=.
180 2017-09-05 Yao Qi <yao.qi@linaro.org>
182 * arch/tdesc.h: New file.
183 * regformats/regdat.sh: Generate code using tdesc_create_reg.
184 * target-descriptions.c: Update comments.
185 * target-descriptions.h: Include "arch/tdesc.h". Remove the
187 * features/i386/32bit-avx.c: Re-generated.
188 * features/i386/32bit-avx512.c: Re-generated.
189 * features/i386/32bit-core.c: Re-generated.
190 * features/i386/32bit-linux.c: Re-generated.
191 * features/i386/32bit-mpx.c: Re-generated.
192 * features/i386/32bit-pkeys.c: Re-generated.
193 * features/i386/32bit-sse.c: Re-generated.
195 2017-09-05 Yao Qi <yao.qi@linaro.org>
197 * regformats/regdat.sh: Update generated code.
199 2017-09-05 Yao Qi <yao.qi@linaro.org>
201 * regformats/regdat.sh: Adjust code order.
203 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
205 * expprint.c (dump_subexp_body_standard): Use constant format
206 string in fprintf_filtered call.
208 2017-09-04 John Baldwin <jhb@FreeBSD.org>
210 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
212 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
214 2017-09-04 John Baldwin <jhb@FreeBSD.org>
216 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
218 2017-09-04 John Baldwin <jhb@FreeBSD.org>
220 * bsd-kvm.o: Define _KMEMUSER.
221 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
222 * configure: Regenerate.
224 2017-09-04 John Baldwin <jhb@FreeBSD.org>
226 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
227 * i386-fbsd-nat.c: Likewise.
229 2017-09-04 John Baldwin <jhb@FreeBSD.org>
231 * unittests/array-view-selftests.c: Add include of <array>.
233 2017-09-04 John Baldwin <jhb@FreeBSD.org>
235 * spu-tdep.c (flush_ea_cache): Add missing argument to
236 call_function_by_hand.
238 2017-09-04 Pedro Alves <palves@redhat.com>
240 * NEWS (Safer support for debugging with no debug info): New.
242 2017-09-04 Pedro Alves <palves@redhat.com>
244 * c-exp.y (function_method, function_method_void): Add current
245 instance flags to TYPE_INSTANCE.
246 * dwarf2read.c (check_modifier): New.
247 (compute_delayed_physnames): Assert that only C++ adds delayed
248 physnames. Mark fn_fields as const/volatile depending on
250 * eval.c (make_params): New type_instance_flags parameter. Use
251 it as the new type's instance flags.
252 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
253 flags element and pass it to make_params.
254 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
255 instance flags element.
256 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
257 * gdbtypes.h: Include "enum-flags.h".
258 (type_instance_flags): New enum-flags type.
259 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
260 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
261 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
262 (follow_type_instance_flags): New function.
263 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
264 * parser-defs.h (follow_type_instance_flags): Declare.
265 * valops.c (value_struct_elt_for_reference): const/volatile must
268 2017-09-04 Pedro Alves <palves@redhat.com>
270 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
271 function/method scopes; lookup the nested name as a function local
274 2017-09-04 Pedro Alves <palves@redhat.com>
276 (%type <voidval>): Add function_method.
277 * c-exp.y (exp): New production for calls with no arguments.
278 (function_method, function_method_void_or_typelist): New
280 (exp): New production for "method()::static_var".
281 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
282 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
283 Handle OP_FUNC_STATIC_VAR.
284 * parse.c (operator_length_standard):
285 Handle OP_FUNC_STATIC_VAR.
287 2017-09-04 Pedro Alves <palves@redhat.com>
289 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
291 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
293 * parse.c (operator_length_standard, operator_check_standard):
295 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
297 2017-09-04 Pedro Alves <palves@redhat.com>
299 * ax-gdb.c: Include "typeprint.h".
300 (gen_expr_for_cast): New function.
301 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
302 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
304 * dwarf2read.c (new_symbol_full): Fallback to int instead of
306 * eval.c: Include "typeprint.h".
307 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
308 Error out if symbol has unknown type.
309 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
310 evaluate_subexp_for_cast.
311 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
313 (evaluate_subexp_for_cast): New function.
314 * gdbtypes.c (init_nodebug_var_type): New function.
315 (objfile_type): Use it to initialize types of variables with no
317 * typeprint.c (error_unknown_type): New.
318 * typeprint.h (error_unknown_type): New declaration.
319 * compile/compile-c-types.c (convert_type_basic): Handle
320 TYPE_CODE_ERROR; warn and fallback to int for variables with
323 2017-09-04 Pedro Alves <palves@redhat.com>
325 * eval.c (evaluate_var_value): New function, factored out from ...
326 (evaluate_subexp_standard): ... here.
328 2017-09-04 Pedro Alves <palves@redhat.com>
330 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
331 Remove useless assignments to 'op'.
333 2017-09-04 Pedro Alves <palves@redhat.com>
335 * eval.c (eval_skip_value): New function.
336 (evaluate_subexp_standard): Use it.
338 2017-09-04 Pedro Alves <palves@redhat.com>
340 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
341 function name from symbol/minsym and pass it to
342 error_call_unknown_return_type.
344 2017-09-04 Pedro Alves <palves@redhat.com>
346 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
347 * ax-gdb.c (gen_msym_var_ref): New function.
348 (gen_expr): Handle OP_VAR_MSYM_VALUE.
349 * eval.c (evaluate_var_msym_value): New function.
350 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
351 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
352 to call_function_by_hand.
353 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
354 Handle OP_VAR_MSYM_VALUE.
355 (union exp_element) <msymbol>: New field.
356 * minsyms.h (struct type): Forward declare.
357 (find_minsym_type_and_address): Declare.
358 * parse.c (write_exp_elt_msym): New function.
359 (write_exp_msymbol): Delete, refactored as ...
360 (find_minsym_type_and_address): ... this new function.
361 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
362 (operator_length_standard, operator_check_standard): Handle
364 * std-operator.def (OP_VAR_MSYM_VALUE): New.
366 2017-09-04 Pedro Alves <palves@redhat.com>
368 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
369 TYPE_GNU_IFUNC specially here. Throw error if return type is
371 * ada-typeprint.c (print_func_type): Handle functions with unknown
373 * c-typeprint.c (c_type_print_base): Handle functions and methods
374 with unknown return type.
375 * compile/compile-c-symbols.c (convert_symbol_bmsym)
376 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
377 * compile/compile-c-types.c: Include "objfiles.h".
378 (convert_func): For functions with unknown return type, warn and
380 * compile/compile-object-run.c (compile_object_run): Adjust call
381 to call_function_by_hand_dummy.
382 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
383 call_function_by_hand.
384 * eval.c (evaluate_subexp_standard): Adjust calls to
385 call_function_by_hand. Handle functions and methods with unknown
386 return type. Pass expect_type to call_function_by_hand.
387 * f-typeprint.c (f_type_print_base): Handle functions with unknown
389 * gcore.c (call_target_sbrk): Adjust call to
390 call_function_by_hand.
391 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
392 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
393 an integer address type instead of nodebug.
394 * guile/scm-value.c (gdbscm_value_call): Adjust call to
395 call_function_by_hand.
396 * infcall.c (error_call_unknown_return_type): New function.
397 (call_function_by_hand): New "default_return_type" parameter.
399 (call_function_by_hand_dummy): New "default_return_type"
400 parameter. Use it instead of defaulting to int. If there's no
401 default and the return type is unknown, throw an error. If
402 there's a default return type, and the called function has no
403 debug info, then assume the function is prototyped.
404 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
405 New "default_return_type" parameter.
406 (error_call_unknown_return_type): New declaration.
407 * linux-fork.c (call_lseek): Cast return type of lseek.
408 (inferior_call_waitpid, checkpoint_command): Adjust calls to
409 call_function_by_hand.
410 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
411 calls to call_function_by_hand.
412 * m2-typeprint.c (m2_procedure): Handle functions with unknown
414 * objc-lang.c (lookup_objc_class, lookup_child_selector)
415 (value_nsstring, print_object_command): Adjust calls to
416 call_function_by_hand.
417 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
418 functions with unknown return type.
419 (pascal_type_print_func_varspec_suffix): New function.
420 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
421 TYPE_CODE_METHOD>: Use it.
422 * python/py-value.c (valpy_call): Adjust call to
423 call_function_by_hand.
424 * rust-lang.c (rust_evaluate_funcall): Adjust call to
425 call_function_by_hand.
426 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
427 call_function_by_hand.
428 * valops.c (value_allocate_space_in_inferior): Adjust call to
429 call_function_by_hand.
430 * typeprint.c (type_print_unknown_return_type): New function.
431 * typeprint.h (type_print_unknown_return_type): New declaration.
433 2017-09-04 Pedro Alves <palves@redhat.com>
435 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
436 types with more than one parameter as prototyped.
438 2017-09-04 Pedro Alves <palves@redhat.com>
440 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
441 (disassemble_command): Use gdb_disassembly_flags instead of bare
443 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
444 (dump_insns, do_mixed_source_and_assembly_deprecated)
445 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
446 Use gdb_disassembly_flags instead of bare int.
447 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
448 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
449 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
450 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
451 (enum gdb_disassembly_flag): ... values of this new enumeration.
452 (gdb_disassembly_flags): Define.
454 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
455 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
456 gdb_disassembly_flags instead of bare int.
457 * record-btrace.c (btrace_insn_history)
458 (record_btrace_insn_history, record_btrace_insn_history_range)
459 (record_btrace_insn_history_from): Use gdb_disassembly_flags
461 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
462 Use gdb_disassembly_flags instead of bare int.
463 * target-debug.h (target_debug_print_gdb_disassembly_flags):
465 * target-delegates.c: Regenerate.
466 * target.c (target_insn_history, target_insn_history_from)
467 (target_insn_history_range): Use gdb_disassembly_flags instead of
469 * target.h: Include "disasm.h".
470 (struct target_ops) <to_insn_history, to_insn_history_from,
471 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
473 (target_insn_history, target_insn_history_from)
474 (target_insn_history_range): Use gdb_disassembly_flags instead of
477 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
479 * cli/cli-script.c (build_command_line): For if/while commands,
480 check whether args is empty.
482 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
484 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
485 (enum command_control_type): Likewise.
486 (struct command_line): Likewise.
487 (free_command_lines): Likewise.
488 (struct command_lines_deleter): Likewise.
489 (command_line_up): Likewise.
490 (read_command_lines): Likewise.
491 (read_command_lines_1): Likewise.
492 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
493 (enum command_control_type): Likewise.
494 (struct command_line): Likewise.
495 (free_command_lines): Likewise.
496 (struct command_lines_deleter): Likewise.
497 (command_line_up): Likewise.
498 (read_command_lines): Likewise.
499 (read_command_lines_1): Likewise.
500 * breakpoint.h: Include cli/cli-script.h.
501 * extension-priv.h: Likewise.
502 * gdbcmd.h: Likewise.
504 2017-09-04 Pedro Alves <palves@redhat.com>
506 * ada-lang.c (is_known_support_routine): Move sal declaration to
507 where it is initialized.
508 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
509 (parse_breakpoint_sals, decode_static_tracepoint_spec)
510 (clear_command, update_static_tracepoint): Remove init_sal
511 references. Move declarations closer to initializations.
512 * cli/cli-cmds.c (list_command): Move sal declarations closer to
514 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
515 references. Move sal declarations closer to initializations.
516 * frame.c (find_frame_sal): Return a symtab_and_line via function
517 return instead of output parameter. Remove init_sal references.
518 * frame.h (find_frame_sal): Return a symtab_and_line via function
519 return instead of output parameter.
520 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
521 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
523 (gdbscm_find_pc_line): Remove init_sal reference.
524 * infcall.c (call_function_by_hand_dummy): Remove init_sal
525 references. Move declarations closer to initializations.
526 * infcmd.c (set_step_frame): Update. Move declarations closer to
528 (finish_backward): Remove init_sal references. Move declarations
529 closer to initializations.
530 * infrun.c (process_event_stop_test, handle_step_into_function)
531 (insert_hp_step_resume_breakpoint_at_frame)
532 (insert_step_resume_breakpoint_at_caller): Likewise.
533 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
534 (symbol_to_sal): Likewise.
535 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
536 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
537 to its initialization.
538 * reverse.c (save_bookmark_command): Use new/delete. Remove
539 init_sal references. Move declarations closer to initializations.
540 * source.c (get_current_source_symtab_and_line): Remove brace
542 (set_current_source_symtab_and_line): Now takes the sal by const
543 reference. Remove brace initialization.
544 (line_info): Remove init_sal reference.
545 * source.h (set_current_source_symtab_and_line): Now takes a
546 symtab_and_line via const reference.
547 * stack.c (set_current_sal_from_frame): Adjust.
548 (print_frame_info): Adjust.
549 (get_last_displayed_sal): Return the sal via function return
550 instead of via output parameter. Simplify.
551 (frame_info): Adjust.
552 * stack.h (get_last_displayed_sal): Return the sal via function
553 return instead of via output parameter.
554 * symtab.c (init_sal): Delete.
555 (find_pc_sect_line): Remove init_sal references. Move
556 declarations closer to initializations.
557 (find_function_start_sal): Remove init_sal references. Move
558 declarations closer to initializations.
559 * symtab.h (struct symtab_and_line): In-class initialize all
561 * tracepoint.c (set_traceframe_context)
562 (print_one_static_tracepoint_marker): Remove init_sal references.
563 Move declarations closer to initializations.
564 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
565 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
566 declarations closer to initializations.
567 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
568 init_sal references. Adjust.
570 2017-09-04 Pedro Alves <palves@redhat.com>
572 * ax-gdb.c (agent_command_1): Use range-for.
573 * break-catch-throw.c (re_set_exception_catchpoint): Update.
574 * breakpoint.c: Include "common/array-view.h".
575 (init_breakpoint_sal, create_breakpoint_sal): Change sals
576 parameter from struct symtabs_and_lines to
577 array_view<symtab_and_line>. Adjust. Use range-for. Update.
578 (breakpoint_sals_to_pc): Change sals parameter from struct
579 symtabs_and_lines to std::vector reference.
580 (check_fast_tracepoint_sals): Change sals parameter from struct
581 symtabs_and_lines to std::array_view. Use range-for.
582 (decode_static_tracepoint_spec): Return a std::vector instead of
583 symtabs_and_lines. Update.
584 (create_breakpoint): Update.
585 (break_range_command, until_break_command, clear_command): Update.
586 (base_breakpoint_decode_location, bkpt_decode_location)
587 (bkpt_probe_create_sals_from_location)
588 (bkpt_probe_decode_location, tracepoint_decode_location)
589 (tracepoint_probe_decode_location)
590 (strace_marker_create_sals_from_location): Return a std::vector
591 instead of symtabs_and_lines.
592 (strace_marker_create_breakpoints_sal): Update.
593 (strace_marker_decode_location): Return a std::vector instead of
594 symtabs_and_lines. Update.
595 (update_breakpoint_locations): Change struct symtabs_and_lines
596 parameters to gdb::array_view. Adjust.
597 (location_to_sals): Return a std::vector instead of
598 symtabs_and_lines. Update.
599 (breakpoint_re_set_default): Use std::vector instead of struct
601 (decode_location_default): Return a std::vector instead of
602 symtabs_and_lines. Update.
603 * breakpoint.h: Include "common/array-view.h".
604 (struct breakpoint_ops) <decode_location>: Now returns a
605 std::vector instead of returning a symtabs_and_lines via output
607 (update_breakpoint_locations): Change sals parameters to use
609 * cli/cli-cmds.c (edit_command, list_command): Update to use
610 std::vector and gdb::array_view.
611 (ambiguous_line_spec): Adjust to use gdb::array_view and
613 (compare_symtabs): Rename to ...
614 (cmp_symtabs): ... this. Change parameters to symtab_and_line
615 const reference and adjust.
616 (filter_sals): Rewrite using std::vector and standard algorithms.
617 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
618 (jump_command): Update to use std::vector.
619 * linespec.c (struct linespec_state) <canonical_names>: Update
621 (add_sal_to_sals_basic): Delete.
622 (add_sal_to_sals, filter_results, convert_results_to_lsals)
623 (decode_line_2, create_sals_line_offset)
624 (convert_address_location_to_sals, convert_linespec_to_sals)
625 (convert_explicit_location_to_sals, parse_linespec)
626 (event_location_to_sals, decode_line_full, decode_line_1)
627 (decode_line_with_current_source)
628 (decode_line_with_last_displayed, decode_objc)
629 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
630 (linespec_result::~linespec_result): Adjust to use std::vector
631 instead of symtabs_and_lines.
632 * linespec.h (linespec_sals::sals): Now a std::vector.
633 (struct linespec_result): Use std::vector, bool, and in-class
635 (decode_line_1, decode_line_with_current_source)
636 (decode_line_with_last_displayed): Return std::vector.
637 * macrocmd.c (info_macros_command): Use std::vector.
638 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
639 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
641 * probe.h (parse_probes): Return a std::vector.
642 * python/python.c (gdbpy_decode_line): Use std::vector and
644 * source.c (select_source_symtab, line_info): Use std::vector.
645 * stack.c (func_command): Use std::vector.
646 * symtab.h (struct symtabs_and_lines): Delete.
647 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
649 2017-09-04 Pedro Alves <palves@redhat.com>
651 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
652 unittests/array-view-selftests.c.
653 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
654 * common/array-view.h: New file.
655 * unittests/array-view-selftests.c: New file.
657 2017-09-04 Pedro Alves <palves@redhat.com>
659 * cli/cli-cmds.c (edit_command): Pass message to
661 (list_command): Pass message to ambiguous_line_spec. Say
662 "first"/"last" instead of "start" and "end" to be consistent with
664 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
665 them to print formatted message.
667 2017-09-04 Pedro Alves <palves@redhat.com>
669 * btrace.c (ftrace_add_pt): Pass btrace_insn to
670 ftrace_update_insns by reference instead of pointer.
672 2017-09-04 Yao Qi <yao.qi@linaro.org>
674 * i386-go32-tdep.c: Include x86-xstate.h.
675 (i386_go32_init_abi): Call i386_target_description.
676 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
677 if xcr0 is X86_XSTATE_X87_MASK.
678 * i386-tdep.h (tdesc_i386): Remove the declaration.
679 (tdesc_i386_mmx): Likewise.
681 2017-09-04 Yao Qi <yao.qi@linaro.org>
683 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
684 X86_XSTATE_SSE_MASK instead of 0.
686 2017-09-04 Yao Qi <yao.qi@linaro.org>
688 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
689 i386_target_description.
690 * i386-fbsd-nat.c (i386fbsd_read_description): Call
691 i386_target_description.
692 * i386-tdep.c (i386_gdbarch_init): Likewise.
694 2017-09-04 Yao Qi <yao.qi@linaro.org>
696 * amd64-darwin-tdep.c: Include "x86-xstate.h".
697 (x86_darwin_init_abi_64): Call amd64_target_description.
698 * amd64-dicos-tdep.c: Likewise.
699 * amd64-fbsd-nat.c: Likewise.
700 * amd64-fbsd-tdep.c: Likewise.
701 * amd64-nbsd-tdep.c: Likewise.
702 * amd64-obsd-tdep.c: Likewise.
703 * amd64-sol2-tdep.c: Likewise.
704 * amd64-windows-tdep.c: Likewise.
705 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
707 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
709 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
710 (btrace_function) <insn>: Change type to use std::vector.
711 * btrace.c (ftrace_debug, ftrace_call_num_insn,
712 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
713 ftrace_update_insns, ftrace_compute_global_level_offset,
714 btrace_stitch_bts, btrace_clear, btrace_insn_get,
715 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
716 change to std::vector.
717 (ftrace_update_insns): Adjust to change to std::vector, change
718 type of INSN parameter.
719 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
720 * record-btrace.c (btrace_call_history_insn_range,
721 btrace_compute_src_line_range,
722 record_btrace_frame_prev_register): Adjust to change to
724 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
725 to change to std::vector.
727 2017-09-03 Tom Tromey <tom@tromey.com>
729 * corefile.c (reopen_exec_file): Use std::string.
731 2017-09-03 Tom Tromey <tom@tromey.com>
733 * compile/compile.c (compile_register_name_mangled): Return
735 * compile/compile-loc2c.c (pushf_register_address): Update.
736 (pushf_register): Update.
737 * compile/compile-c-types.c (convert_array): Update.
738 * compile/compile-c-symbols.c (generate_vla_size): Update.
739 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
740 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
741 (convert_one_symbol): Update.
742 (generate_c_for_for_one_variable): Update.
743 * compile/compile-c-support.c (c_get_range_decl_name): Return a
745 (generate_register_struct): Update.
746 * compile/compile-internal.h (c_get_range_decl_name): Return a
748 (compile_register_name_mangled): Return std::string.
750 2017-09-03 Tom Tromey <tom@tromey.com>
752 * utils.c (perror_string): Return a std::string.
753 (throw_perror_with_name, perror_warning_with_name): Update.
755 2017-09-03 Tom Tromey <tom@tromey.com>
757 * demangle.c (demangle_command): Use std::string,
760 2017-09-03 Tom Tromey <tom@tromey.com>
762 * cli/cli-setshow.c (do_set_command): Use std::string.
764 2017-09-03 Tom Tromey <tom@tromey.com>
766 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
768 2017-09-03 Tom Tromey <tom@tromey.com>
770 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
772 2017-09-03 Tom Tromey <tom@tromey.com>
774 * mi/mi-cmd-env.c (env_execute_cli_command): Use
775 gdb::unique_xmalloc_ptr.
777 2017-09-03 Tom Tromey <tom@tromey.com>
779 * thread.c (print_thread_info_1): Use string_printf.
780 (thread_apply_command, thread_apply_all_command): Use
783 2017-09-03 Tom Tromey <tom@tromey.com>
785 * valprint.c (val_print_string): Update.
786 * gdbcore.h (memory_error_message): Return std::string.
787 * corefile.c (memory_error_message): Return std::string.
788 (memory_error): Update.
789 * breakpoint.c (insert_bp_location): Update.
791 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
793 * target/waitstatus.h (target_waitstatus_to_string): Change
794 return type to std::string.
795 * target/waitstatus.c (target_waitstatus_to_string): Return
797 * target.h (target_waitstatus_to_string): Remove declaration.
798 * infrun.c (resume, clear_proceed_status_thread,
799 print_target_wait_results, do_target_wait, save_waitstatus,
800 stop_all_threads): Adjust.
801 * record-btrace.c (record_btrace_wait): Adjust.
803 (target_debug_print_struct_target_waitstatus_p): Adjust.
805 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
808 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
811 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
813 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
814 for setting/unsetting environment variables on the remote target.
815 (New remote packets): Add entries for QEnvironmentHexEncoded,
816 QEnvironmentUnset and QEnvironmentReset.
817 * common/environ.c (gdb_environ::operator=): Extend method to
818 handle m_user_set_env_list and m_user_unset_env_list.
819 (gdb_environ::clear): Likewise.
820 (match_var_in_string): Change type of first parameter from 'char
821 *' to 'const char *'.
822 (gdb_environ::set): Extend method to handle
823 m_user_set_env_list and m_user_unset_env_list.
824 (gdb_environ::unset): Likewise.
825 (gdb_environ::clear_user_set_env): New method.
826 (gdb_environ::user_set_envp): Likewise.
827 (gdb_environ::user_unset_envp): Likewise.
828 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
829 m_user_unset_env_list on move constructor/assignment.
830 (unset): Add new default parameter 'update_unset_list = true'.
831 (clear_user_set_env): New method.
832 (user_set_envp): Likewise.
833 (user_unset_envp): Likewise.
834 (m_user_set_env_list): New std::set.
835 (m_user_unset_env_list): Likewise.
836 * common/rsp-low.c (hex2str): New function.
837 (bin2hex): New overload for bin2hex function.
838 * common/rsp-low.c (hex2str): New prototype.
839 (str2hex): New overload prototype.
840 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
841 QEnvironmentUnset and QEnvironmentReset.
842 (remote_protocol_features): Add QEnvironmentHexEncoded,
843 QEnvironmentUnset and QEnvironmentReset packets.
844 (send_environment_packet): New function.
845 (extended_remote_environment_support): Likewise.
846 (extended_remote_create_inferior): Call
847 extended_remote_environment_support.
848 (_initialize_remote): Add QEnvironmentHexEncoded,
849 QEnvironmentUnset and QEnvironmentReset packet configs.
850 * unittests/environ-selftests.c (gdb_selftest_env_var):
852 (test_vector_initialization): New function.
853 (test_init_from_host_environ): Likewise.
854 (test_reinit_from_host_environ): Likewise.
855 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
857 (test_unset_set_empty_vector): Likewise.
858 (test_vector_clear): Likewise.
859 (test_std_move): Likewise.
860 (test_move_constructor):
861 (test_self_move): Likewise.
862 (test_set_unset_reset): Likewise.
863 (run_tests): Rewrite in terms of the functions above.
865 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
867 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
868 (adi_available): Use a temp variable of type CORE_ADDR as argument
869 3 when calling target_auxv_search.
870 (adi_normalize_address): Use masks and xor operators to calculate
872 (adi_read_versions, adi_write_versions, adi_print_versions)
873 (do_examine, do_assign): Use paddress.
875 2017-08-29 John Baldwin <jhb@FreeBSD.org>
877 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
878 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
879 out of loop and add supply of FIR.
880 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
883 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
886 * cli/cli-script.c (define_command): Don't convert command name
889 2017-08-25 Joel Brobecker <brobecker@adacore.com>
891 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
892 Update all callers accordingly. Remove all code blocks handling
893 the case where DISPP is not NULL.
895 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
898 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
899 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
900 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
902 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
904 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
905 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
906 (read_comp_units_from_section): New parameter abbrev_section, use
907 read_and_check_comp_unit_head, allocate signatured_type if needed.
908 (create_all_comp_units): Update read_comp_units_from_section caller.
910 2017-08-23 Pedro Alves <palves@redhat.com>
913 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
914 to null_ptid and switch to thread without reading the registers
915 after adding the inferior.
917 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
919 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
921 * compile/compile.c (compile_gcc, show_compile_gcc): New.
922 (compile_to_object): Implement compile_gcc.
923 (_initialize_compile): Install "set compile-gcc". Initialize
926 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
928 * compile/compile.c (compile_to_object): Conditionally call
929 set_verbose. Conditionally call compile or compile_v0.
931 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
933 * sparc64-tdep.h: (adi_normalize_address): New export.
934 * sparc-nat.h: (open_adi_tag_fd): New export.
935 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
936 * sparc64-linux-tdep.c:
937 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
938 (sparc64_linux_handle_segmentation_fault): New function.
939 (sparc64_linux_init_abi): Register
940 sparc64_linux_handle_segmentation_fault
941 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
942 (sparc64_addr_bits_remove): New function.
943 (sparc64_init_abi): Register sparc64_addr_bits_remove.
944 (MAX_PROC_NAME_SIZE): New macro.
945 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
946 (sparc64adilist): New variable.
947 (adi_proc_list): New variable.
948 (find_adi_info): New function.
949 (add_adi_info): New function.
950 (get_adi_info_proc): New function.
951 (get_adi_info): New function.
952 (info_adi_command): New function.
953 (read_maps_entry): New function.
954 (adi_available): New function.
955 (adi_normalize_address): New function.
956 (adi_align_address): New function.
957 (adi_convert_byte_count): New function.
958 (adi_tag_fd): New function.
959 (adi_is_addr_mapped): New function.
960 (adi_read_versions): New function.
961 (adi_write_versions): New function.
962 (adi_print_versions): New function.
963 (do_examine): New function.
964 (do_assign): New function.
965 (adi_examine_command): New function.
966 (adi_assign_command): New function.
967 (_initialize_sparc64_adi_tdep): New function.
969 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
971 * breakpoint.c (breakpoints_info): Rename to ...
972 (info_breakpoints_command): ... this.
973 (watchpoints_info): Rename to ...
974 (info_watchpoints_command): ... this.
975 (tracepoints_info): Rename to ...
976 (info_tracepoints_command): ... this.
977 (_initialize_breakpoint): Adjust.
978 * dcache.c (dcache_info): Rename to ...
979 (info_display_command): ... this.
980 (_initialize_dcache): Adjust.
981 * frame.h (args_info): Rename to ...
982 (info_args_command): ... this.
983 (locals_info): Rename to ...
984 (info_locals_command): ... this.
985 * infcmd.c (nofp_registers_info): Rename to ...
986 (info_registers_command): ... this.
987 (float_info): Rename to ...
988 (info_float_command): ... this.
989 (program_info): Rename to ...
990 (info_program_command): ... this.
991 (all_registers_info): Rename to ...
992 (info_all_registers_command): ... this.
993 (vector_info): Rename to ...
994 (info_vector_command): ... this.
995 (float_info): Rename to ...
996 (info_float_command): ... this.
997 (_initialize_infcmd): Adjust.
998 * inferior.h (term_info): Rename to ...
999 (info_terminal_command): ... this.
1000 * inflow.c (term_info): Rename to ...
1001 (info_terminal_command): ... this.
1002 (_initialize_inflow): Adjust.
1003 * infrun.c (signals_info): Rename to ...
1004 (info_signals_command): ... this.
1005 (_initialize_infrun): Adjust.
1006 * objc-lang.c (classes_info): Rename to ...
1007 (info_classes_command): ... this.
1008 (selectors_info): Rename to ...
1009 (info_selectors_command): ... this.
1010 (_initialize_objc_language): Adjust.
1011 * printcmd.c (sym_info): Rename to ...
1012 (info_symbol_command): ... this.
1013 (address_info): Rename to ...
1014 (info_address_command): ... this.
1015 (display_info): Rename to ...
1016 (info_display_command): ... this.
1017 (_initialize_printcmd): Adjust.
1018 * reverse.c (bookmarks_info): Rename to ...
1019 (info_breakpoints_command): ... this.
1020 (_initialize_reverse): Adjust.
1021 * ser-go32.c (dos_info): Rename to ...
1022 (info_serial_command): ... this.
1023 (_initialize_ser_dos): Adjust.
1024 * skip.c (skip_info): Rename to ...
1025 (info_skip_command): ... this.
1026 (_initialize_step_skip): Adjust.
1027 * source.c (line_info): Rename to ...
1028 (info_line_command): ... this.
1029 (source_info): Rename to ...
1030 (info_source_command)
1031 * stack.c (frame_info): Rename to ...
1032 (info_frame_command): ... this.
1033 (locals_info): Rename to ...
1034 (info_locals_command): ... this.
1035 (args_info): Rename to ...
1036 (info_args_command): ... this.
1037 (_initialize_stack): Adjust.
1038 * symtab.c (sources_info): Rename to ...
1039 (info_sources_command): ... this.
1040 (variables_info): Rename to ...
1041 (info_variables_command): ... this.
1042 (functions_info): Rename to ...
1043 (info_functions_command): ... this.
1044 (types_info): Rename to ...
1045 (info_types_command): ... this.
1046 (_initialize_symtab): Adjust.
1047 * target.c (target_info): Rename to ...
1048 (info_target_command): ... this.
1049 (initialize_targets): Adjust.
1050 * tracepoint.c (tvariables_info): Rename to ...
1051 (info_tvariables_command): ... this.
1052 (scope_info): Rename to ...
1053 (info_scope_command): ... this.
1054 (trace_dump_actions): Adjust.
1055 (_initialize_tracepoint): Adjust.
1057 2017-08-22 Tom Tromey <tom@tromey.com>
1059 * breakpoint.h (install_breakpoint): Update.
1060 * breakpoint.c (add_solib_catchpoint): Update.
1061 (install_breakpoint): Change argument to a std::unique_ptr.
1062 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
1063 (create_breakpoint_sal, create_breakpoint): Update.
1064 (watch_command_1, catch_exec_command_1)
1065 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
1066 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
1067 Return the breakpoint.
1068 (set_raw_breakpoint_without_location, set_raw_breakpoint)
1069 (new_single_step_breakpoint): Update.
1070 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
1072 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
1074 * break-catch-sig.c (create_signal_catchpoint): Use
1076 * ada-lang.c (create_ada_exception_catchpoint): Use
1079 2017-08-22 Tom Tromey <tom@tromey.com>
1081 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
1083 2017-08-22 Tom Tromey <tom@tromey.com>
1085 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
1086 (lookup_partial_symbol): Update.
1088 2017-08-22 Tom Tromey <tom@tromey.com>
1090 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
1091 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
1092 (find_and_open_source, symtab_to_fullname): Update.
1093 * psymtab.c (psymtab_to_fullname): Update.
1095 2017-08-22 Tom Tromey <tom@tromey.com>
1097 * exec.c (exec_file_attach): Update.
1098 * linux-thread-db.c (try_thread_db_load): Update.
1099 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
1100 * utils.c (gdb_realpath): Change return type.
1101 (gdb_realpath_keepfile): Update.
1102 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
1103 (_initialize_utils): Register the new self test.
1104 * source.c (openp): Update.
1105 (find_and_open_source): Update.
1106 * nto-tdep.c (nto_find_and_open_solib): Update.
1107 * main.c (set_gdb_data_directory): Update.
1108 (captured_main_1): Update.
1109 * dwarf2read.c (dwarf2_get_dwz_file): Update
1110 (dw2_map_symbol_filenames): Update.
1111 * auto-load.c (auto_load_safe_path_vec_update): Update.
1112 (filename_is_in_auto_load_safe_path_vec): Change type of
1114 (auto_load_objfile_script): Update.
1115 (file_is_auto_load_safe): Update. Use std::string.
1116 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
1118 2017-08-22 Tom Tromey <tom@tromey.com>
1120 * utils.c (gdb_realpath_keepfile): Return a
1121 gdb::unique_xmalloc_ptr.
1122 * exec.c (exec_file_attach): Update.
1123 * utils.h (gdb_realpath_keepfile): Return a
1124 gdb::unique_xmalloc_ptr.
1126 2017-08-22 Tom Tromey <tom@tromey.com>
1128 * compile/compile.c (compile_file_command): Use
1129 gdb::unique_xmalloc_ptr, std::string.
1130 * utils.c (gdb_abspath): Change return type.
1131 * source.c (openp): Update.
1132 * objfiles.c (allocate_objfile): Update.
1133 * main.c (set_gdb_data_directory): Update.
1134 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
1136 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
1138 * cli-cmds.c (list_commands): List actual code around more than
1141 2017-08-21 John Baldwin <jhb@FreeBSD.org>
1143 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
1145 2017-08-21 Pedro Alves <palves@redhat.com>
1148 * c-exp.y (variable production): Handle function aliases.
1149 * minsyms.c (msymbol_is_text): New function.
1150 * minsyms.h (msymbol_is_text): Declare.
1151 * symtab.c (find_function_alias_target): New function.
1152 * symtab.h (find_function_alias_target): Declare.
1154 2017-08-21 Pedro Alves <palves@redhat.com>
1156 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
1158 * typeprint.c (whatis_exp): If handling "whatis", and expression
1159 is OP_TYPE, strip one typedef level. Otherwise don't strip
1161 * valops.c (value_cast): Save "to" type before resolving
1162 stubs/typedefs. Use that type as resulting value's type.
1164 2017-08-18 Tom Tromey <tom@tromey.com>
1165 Pedro Alves <palves@redhat.com>
1167 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
1168 * sol-thread.c (sol_thread_resume, sol_thread_wait)
1169 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
1170 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
1171 * proc-service.c (ps_xfer_memory): Use scoped_restore.
1172 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
1173 (linux_get_siginfo_data): Add "thread" argument. Use
1175 * linux-nat.c (linux_child_follow_fork)
1176 (check_stopped_by_watchpoint): Use scoped_restore.
1177 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
1178 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
1179 (restore_inferior_ptid, save_inferior_ptid): Remove.
1180 * btrace.c (btrace_fetch): Use scoped_restore.
1181 * bsd-uthread.c (bsd_uthread_fetch_registers)
1182 (bsd_uthread_store_registers): Use scoped_restore.
1183 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
1185 * aix-thread.c (aix_thread_resume, aix_thread_wait)
1186 (aix_thread_xfer_partial): Use scoped_restore.
1187 * inferior.h (save_inferior_ptid): Remove.
1189 2017-08-18 Yao Qi <yao.qi@linaro.org>
1192 * arm-tdep.c (gdb_print_insn_arm): Mark
1193 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
1195 2017-08-18 Yao Qi <yao.qi@linaro.org>
1197 * NEWS: Mention GDBserver's new option "--selftest".
1198 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
1199 * selftest.c: Move it to common/selftest.c.
1200 * selftest.h: Move it to common/selftest.h.
1201 * selftest-arch.c (reset): New function.
1202 (tests_with_arch): Call reset.
1204 2017-08-18 Yao Qi <yao.qi@linaro.org>
1206 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
1207 instead of exception_fprintf and printf_filtered.
1209 2017-08-18 Yao Qi <yao.qi@linaro.org>
1211 * selftest.c (register_self_test): Rename it to
1212 selftests::register_test.
1213 (run_self_tests): selftest::run_tests.
1214 * selftest.h: Update declarations.
1215 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
1216 selftests::register_test_foreach_arch.
1217 * selftest-arch.h: Update declaration.
1218 * aarch64-tdep.c: Update.
1219 * arm-tdep.c: Likewise.
1220 * disasm-selftests.c: Likewise.
1221 * dwarf2loc.c: Likewise.
1222 * dwarf2-frame.c: Likewise.
1223 * findvar.c: Likewise.
1224 * gdbarch-selftests.c: Likewise.
1225 * maint.c (maintenance_selftest): Likewise.
1226 * regcache.c: Likewise.
1227 * rust-exp.y: Likewise.
1228 * selftest-arch.c: Likewise.
1229 * unittests/environ-selftests.c: Likewise.
1230 * unittests/function-view-selftests.c: Likewise.
1231 * unittests/offset-type-selftests.c: Likewise.
1232 * unittests/optional-selftests.c: Likewise.
1233 * unittests/scoped_restore-selftests.c: Likewise.
1234 * utils-selftests.c: Likewise.
1236 2017-08-17 Pedro Alves <palves@redhat.com>
1238 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
1241 2017-08-17 Pedro Alves <palves@redhat.com>
1243 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
1245 (reset_die_in_process): Delete, replaced by ...
1246 (process_die_scope): ... this new class. Make it responsible for
1247 freeing cu->line_header too.
1248 (process_die): Use process_die_scope.
1249 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
1250 cu->line_header_die_owner. Don't release the line header if it's
1252 (setup_type_unit_groups): Make the CU/DIE own the line header.
1253 Don't release the line header here.
1255 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
1257 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
1259 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
1261 * NEWS: Mention new shortcuts for nexti and stepi in TUI
1264 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
1266 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
1269 2017-08-15 Stafford Horne <shorne@gmail.com>
1271 * MAINTAINERS (Write After Approval): Add Stafford Horne.
1273 2017-08-15 Stafford Horne <shorne@gmail.com>
1275 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
1277 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
1280 * infcmd.c (unset_environment_command): Use the 'clear' method on
1281 the environment instead of resetting it.
1283 2017-08-15 John Baldwin <jhb@FreeBSD.org>
1285 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
1288 2017-08-14 Tom Tromey <tom@tromey.com>
1290 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
1291 (print_binary_chars): Likewise.
1292 (BITS_IN_BYTES): Remove.
1294 2017-08-14 Tom Tromey <tom@tromey.com>
1297 * valprint.c (LOW_ZERO): Change value to 034.
1298 (print_octal_chars): Add static_asserts for octal constants.
1299 * printcmd.c (print_scalar_formatted): Add 'd' case.
1301 2017-08-11 Tom Tromey <tom@tromey.com>
1303 * symfile.c (add_symbol_file_command): Use std::vector.
1305 2017-08-14 Tom Tromey <tom@tromey.com>
1307 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
1308 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
1310 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
1312 2017-08-11 Pedro Alves <palves@redhat.com>
1314 * infrun.c (process_event_stop_test): Adjust
1315 function_name_is_marked_for_skip call.
1316 * skip.c: Include <list>.
1317 (skiplist_entry): Make it a class with private fields, and
1319 (skiplist_entry_chain): Delete.
1320 (skiplist_entries): New.
1321 (skiplist_entry_count): Delete.
1322 (highest_skiplist_entry_num): New.
1323 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
1324 (add_skiplist_entry): Delete.
1325 (skiplist_entry::skiplist_entry): New.
1326 (skiplist_entry::add_entry): New.
1327 (skip_file_command, skip_function): Adjust.
1328 (compile_skip_regexp): Delete.
1329 (skip_command): Don't compile regexp here. Adjust to use
1330 skiplist_entry::add_entry.
1331 (skip_info): Adjust to use range-for and getters.
1332 (skip_enable_command, skip_disable_command): Adjust to use
1333 range-for and setters.
1334 (skip_delete_command): Adjust to use std::list.
1335 (add_skiplist_entry): Delete.
1336 (skip_file_p): Delete, refactored as ...
1337 (skiplist_entry::do_skip_file_p): ... this new method.
1338 (skip_gfile_p): Delete, refactored as ...
1339 (skiplist_entry::do_gskip_file_p): ... this new method.
1340 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
1341 (skiplist_entry::skip_function_p): ... this new method.
1342 (function_name_is_marked_for_skip): Now returns bool, and takes
1343 the function sal by const reference. Adjust to use range-for and
1344 skiplist_entry methods.
1345 (_initialize_step_skip): Remove references to
1346 skiplist_entry_chain, skiplist_entry_count.
1347 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
1348 takes the function sal by const reference.
1350 2017-08-11 Yao Qi <yao.qi@linaro.org>
1352 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
1353 (dwarf2_frame_cache): Remove reset_cache_cleanup.
1354 (dwarf2_frame_cache):
1355 * frame-unwind.c (frame_unwind_try_unwinder): Catch
1356 RETURN_MASK_ALL and set *this_case to NULL.
1357 * frame-unwind.h: Update comments.
1359 2017-08-11 Yao Qi <yao.qi@linaro.org>
1361 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
1362 (dwarf2_frame_state_copy_regs): Remove.
1363 (dwarf2_frame_state_free_regs): Remove.
1364 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
1365 (dwarf2_restore_rule): Call method .alloc_regs instead of
1366 dwarf2_frame_state_alloc_regs.
1367 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
1368 constructor. Call std::move.
1369 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
1370 (dwarf2_frame_cache): Likewise.
1372 [GDB_SELF_TEST]: Include selftest.h and
1374 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
1375 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
1376 execute_cfa_program_test.
1378 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
1379 copy ctor, assignment operator, move assignment.
1380 <alloc_regs>: New method.
1382 (struct dwarf2_frame_state): Delete dtor.
1383 (dwarf2_frame_state_alloc_regs): Remove declaration.
1384 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
1385 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
1387 2017-08-11 Yao Qi <yao.qi@linaro.org>
1389 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
1390 (dwarf2_frame_state::dwarf2_frame_state): New.
1391 (dwarf2_frame_state::~dwarf2_frame_state): New.
1392 (dwarf2_fetch_cfa_info): Update.
1393 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
1394 rather than a pointer. Update code.
1395 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
1397 <data_align, code_align, retaddr_column>: Change them to const.
1398 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
1401 2017-08-11 Yao Qi <yao.qi@linaro.org>
1403 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
1404 <loc.exp>: New field.
1405 * dwarf2-frame.c (execute_cfa_program): Update.
1406 (dwarf2_frame_prev_register): Update.
1408 2017-08-10 Pedro Alves <palves@redhat.com>
1410 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
1412 2017-08-09 John Baldwin <jhb@FreeBSD.org>
1414 * fbsd-nat.c (struct fbsd_fork_info): Remove.
1415 (fbsd_pending_children): Use std::list.
1416 (fbsd_remember_child): Likewise.
1417 (fbsd_is_child_pending): Likewise.
1418 (fbsd_pending_vfork_done): Use std::forward_list.
1419 (fbsd_add_vfork_done): Likewise.
1420 (fbsd_is_vfork_done_pending): Likewise.
1421 (fbsd_next_vfork_done): Likewise.
1423 2017-08-09 John Baldwin <jhb@FreeBSD.org>
1425 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
1426 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
1427 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
1429 (fbsd_xfer_partial): Use gdb::byte_vector.
1430 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
1432 2017-08-09 John Baldwin <jhb@FreeBSD.org>
1434 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
1436 (fbsd_find_memory_regions): Fix `mapfile' initialization.
1438 2017-08-09 Tom Tromey <tom@tromey.com>
1440 * skip.c (skiplist_entry): New constructor.
1441 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
1442 (skiplist_entry::file_is_glob): Now bool.
1443 (skiplist_entry::file, skiplist_entry::function): Now
1445 (make_skip_entry): Return a unique_ptr. Use new.
1446 (free_skiplist_entry, free_skiplist_entry_cleanup)
1447 (make_free_skiplist_entry_cleanup): Remove.
1448 (skip_command, skip_disable_command, add_skiplist_entry)
1449 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
1450 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
1451 (function_name_is_marked_for_skip): Update.
1452 (skip_delete_command): Update. Use delete.
1454 2017-08-09 Jiong Wang <jiong.wang@arm.com>
1456 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
1457 (aarch64_linux_core_read_description): New function.
1458 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
1460 2017-08-09 Pedro Alves <palves@redhat.com>
1462 * cp-name-parser.y (cp_comp_to_string): Return a
1463 gdb::unique_xmalloc_ptr<char>.
1464 * cp-support.c (replace_typedefs_qualified_name)
1465 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
1466 (cp_canonicalize_string_full): Use op= instead of explicit
1468 (cp_class_name_from_physname, method_name_from_physname)
1469 (cp_func_name, cp_remove_params): Adjust to use
1470 gdb::unique_xmalloc_ptr<char>.
1471 * cp-support.h (cp_comp_to_string): Return a
1472 gdb::unique_xmalloc_ptr<char>.
1473 * python/py-type.c (typy_lookup_type): Adjust to use
1474 gdb::unique_xmalloc_ptr<char>.
1476 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
1478 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
1480 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
1481 Yao Qi <yao.qi@linaro.org>
1483 * cp-support.c (cp_canonicalize_string_full): Use
1484 gdb::unique_xmalloc_ptr<char>.
1485 (cp_canonicalize_string): Likewise.
1487 2017-08-09 Yao Qi <yao.qi@linaro.org>
1489 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
1490 * regformats/i386/amd64-avx-avx512.dat: Remove.
1491 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
1492 * regformats/i386/amd64-avx-mpx.dat:Remove.
1493 * regformats/i386/amd64-avx.dat: Remove.
1494 * regformats/i386/amd64-mpx.dat: Remove.
1495 * regformats/i386/i386-avx-avx512.dat: Remove.
1496 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
1497 * regformats/i386/i386-avx-mpx.dat: Remove.
1498 * regformats/i386/i386-mmx.dat: Remove.
1499 * regformats/i386/i386-mpx.dat: Remove.
1501 2017-08-09 Yao Qi <yao.qi@linaro.org>
1503 * amd64-tdep.h (tdesc_x32): Remove the declaration.
1504 * amd64-tdep.c: Don't include features/i386/x32*.c.
1505 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
1507 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
1508 and i386/x32-avx-avx512.
1509 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
1511 * features/i386/x32-avx-avx512.c: Removed.
1512 * features/i386/x32-avx-avx512.xml: Removed.
1513 * features/i386/x32-avx.c: Removed.
1514 * features/i386/x32-avx.xml: Removed.
1515 * features/i386/x32.c: Removed.
1516 * features/i386/x32.xml: Removed.
1517 * regformats/i386/x32-avx-avx512.dat: Removed.
1518 * regformats/i386/x32-avx.dat: Removed.
1519 * regformats/i386/x32.dat: Removed.
1521 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
1523 PR breakpoints/21886
1524 * mem-break.c (default_memory_insert_breakpoint): Use
1525 `->placed_address' rather than `->reqstd_address' for the
1526 breakpoint location.
1528 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
1530 * arch-utils.c (default_print_insn): Remove arch/mach/endian
1533 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
1535 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
1536 a union of `tdep_info', `tdesc_data' and `id'.
1537 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
1538 rather than `info.tdep_info'.
1539 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
1540 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
1541 * i386-tdep.c (i386_gdbarch_init): Likewise.
1542 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
1543 * mips-tdep.c (mips_gdbarch_init): Likewise.
1544 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1545 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
1546 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
1548 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
1550 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
1551 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
1553 * spu-tdep.c (spu_gdbarch_init): Likewise.
1554 * gdbarch.h: Regenerate.
1556 2017-08-07 Leszek Swirski <leszeks@google.com>
1559 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
1561 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
1563 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
1564 (gdbsim_open): Rename gdb_argv args object to argv.
1566 2017-08-05 Tom Tromey <tom@tromey.com>
1568 * compile/compile-object-load.c (compile_object_load): Use
1569 gdb::unique_xmalloc_ptr.
1570 * cli/cli-dump.c (scan_filename): Rename from
1571 scan_filename_with_cleanup. Change return type.
1572 (scan_expression): Rename from scan_expression_with_cleanup.
1574 (dump_memory_to_file, dump_value_to_file, restore_command):
1575 Use gdb::unique_xmalloc_ptr. Update.
1576 * cli/cli-cmds.c (find_and_open_script): Use
1577 gdb::unique_xmalloc_ptr.
1578 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
1579 * symmisc.c (maintenance_print_symbols)
1580 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
1581 * symfile.c (symfile_bfd_open, generic_load)
1582 (add_symbol_file_command, remove_symbol_file_command): Use
1583 gdb::unique_xmalloc_ptr.
1584 * source.c (openp): Use gdb::unique_xmalloc_ptr.
1585 * psymtab.c (maintenance_print_psymbols): Use
1586 gdb::unique_xmalloc_ptr.
1587 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
1588 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
1589 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
1590 (reload_shared_libraries_1): Likewise.
1592 2017-08-05 Tom Tromey <tom@tromey.com>
1594 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
1595 (rust_op_vector, rust_set_vector): New typedefs.
1596 (current_parser): New global.
1597 (work_obstack): Change to pointer type. Update all users.
1598 (rust_ast, pstate): Remove globals.
1599 (struct rust_parser): New.
1600 (%union) <params, field_inits>: Change type.
1601 (start, tuple_expr, unit_expr, struct_expr_list, literal)
1602 (field_expr, expr_list, maybe_expr_list, type_list): Update.
1603 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
1604 (convert_params_to_types, convert_params_to_expression): Change
1606 (ast_string): Change type of "fields".
1607 (rust_parse): Make a rust_parser. Remove cleanups.
1608 (rust_lex_tests): Make and install an auto_obstack.
1610 2017-08-04 Yao Qi <yao.qi@linaro.org>
1612 * configure.srv (ipa_x32_linux_regobj): New.
1613 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
1614 instead of X86_TDESC_AVX512.
1615 (initialize_low_tracepoint): Call
1616 init_registers_x32_avx_avx512_linux.
1618 2017-08-04 Yao Qi <yao.qi@linaro.org>
1620 * utils.h (gdb_argv): Add namespace std for nullptr_t.
1622 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
1624 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
1626 2017-08-03 Tom Tromey <tom@tromey.com>
1628 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
1630 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
1632 2017-08-03 Tom Tromey <tom@tromey.com>
1634 * python/py-param.c (compute_enum_values): Use gdb_argv.
1636 2017-08-03 Tom Tromey <tom@tromey.com>
1638 * utils.h (struct gdb_argv_deleter): New.
1639 (gdb_argv): New class.
1640 * utils.c (gdb_argv::reset): New method.
1641 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
1642 * tracefile.c (tsave_command): Use gdb_argv.
1643 * top.c (new_ui_command): Use gdb_argv.
1644 * symmisc.c (maintenance_print_symbols)
1645 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
1646 * symfile.c (symbol_file_command, generic_load)
1647 (remove_symbol_file_command): Use gdb_argv.
1648 * stack.c (backtrace_command): Use gdb_argv.
1649 * source.c (add_path, show_substitute_path_command)
1650 (unset_substitute_path_command, set_substitute_path_command):
1652 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
1653 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
1654 * remote.c (extended_remote_run, remote_put_command)
1655 (remote_get_command, remote_delete_command): Use gdb_argv.
1656 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
1657 (gdbsim_open): Use gdb_argv.
1658 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
1659 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
1660 * procfs.c (procfs_info_proc): Use gdb_argv.
1661 * interps.c (interpreter_exec_cmd): Use gdb_argv.
1662 * infrun.c (handle_command): Use gdb_argv.
1663 * inferior.c (add_inferior_command, clone_inferior_command):
1665 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
1666 * exec.c (exec_file_command): Use gdb_argv.
1667 * cli/cli-cmds.c (alias_command): Use gdb_argv.
1668 * compile/compile.c (build_argc_argv): Use gdb_argv.
1670 2017-08-03 Tom Tromey <tom@tromey.com>
1672 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
1674 2017-08-03 Tom Tromey <tom@tromey.com>
1676 * python/python.c (compute_python_string): Return std::string.
1677 (gdbpy_eval_from_control_command): Update.
1678 (do_start_initialization): Use std::string.
1679 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
1681 * python/py-breakpoint.c (local_setattro): Use string_printf, not
1684 2017-08-03 Tom Tromey <tom@tromey.com>
1686 * top.h (do_restore_instream_cleanup): Remove.
1687 * top.c (do_restore_instream_cleanup): Remove.
1688 (read_command_file): Use scoped_restore.
1689 * cli/cli-script.c (execute_user_command): Use scoped_restore.
1691 2017-08-03 Tom Tromey <tom@tromey.com>
1693 * cli/cli-script.c (execute_user_command)
1694 (execute_control_command): Use scoped_restore.
1696 2017-08-03 Tom Tromey <tom@tromey.com>
1698 * cli/cli-script.c (do_restore_user_call_depth): Remove.
1699 (execute_user_command): Remove user_call_depth; use
1700 user_args_stack's size instead.
1702 2017-08-03 Tom Tromey <tom@tromey.com>
1704 * top.h (in_user_command): Remove.
1705 * top.c (in_user_command): Remove.
1706 * cli/cli-script.c (do_restore_user_call_depth)
1707 (execute_user_command): Update.
1709 2017-08-03 Tom Tromey <tom@tromey.com>
1711 * valops.c (search_struct_method): Use gdb::byte_vector.
1712 * valarith.c (value_concat): Use std::vector.
1713 * target.c (memory_xfer_partial): Use gdb::byte_vector.
1714 (simple_search_memory): Likewise.
1715 * printcmd.c (find_string_backward): Use gdb::byte_vector.
1716 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
1717 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
1718 * elfread.c (elf_rel_plt_read): Use std::string.
1719 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
1720 * cli/cli-dump.c (restore_section_callback): Use
1723 2017-08-03 Tom Tromey <tom@tromey.com>
1725 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
1727 2017-08-03 Tom Tromey <tom@tromey.com>
1729 * tui/tui-regs.c (tui_restore_gdbout): Remove.
1730 (tui_register_format): Use scoped_restore.
1732 2017-08-03 Tom Tromey <tom@tromey.com>
1734 * reverse.c (exec_direction_default): Remove.
1735 (exec_reverse_once): Use scoped_restore.
1736 * remote.c (restore_remote_timeout): Remove.
1737 (remote_flash_erase, remote_flash_write, remote_flash_done)
1738 (readchar, remote_serial_write): Use scoped_restore.
1739 * cli/cli-script.c (struct source_cleanup_lines_args)
1740 (source_cleanup_lines): Remove.
1741 (script_from_file): Use scoped_restore.
1742 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
1743 (source_command): Use scoped_restore.
1745 2017-08-03 Tom Tromey <tom@tromey.com>
1747 * utils.h (make_cleanup_free_so): Remove.
1748 * utils.c (do_free_so, make_cleanup_free_so): Remove.
1749 * solist.h (struct so_deleter): New.
1750 (so_list_up): New typedef.
1751 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
1753 2017-08-03 Tom Tromey <tom@tromey.com>
1755 * utils.h (make_cleanup_restore_current_language): Remove.
1756 * utils.c (do_restore_current_language)
1757 (make_cleanup_restore_current_language): Remove.
1758 * parse.c (parse_exp_in_context_1)
1759 (parse_expression_with_language): Use
1760 scoped_restore_current_language.
1761 * mi/mi-main.c (mi_cmd_execute): Use
1762 scoped_restore_current_language.
1763 * language.h (scoped_restore_current_language): New class.
1765 2017-08-03 Tom Tromey <tom@tromey.com>
1767 * compile/compile.c (cleanup_unlink_file): Remove.
1768 (compile_to_object): Use gdb::unlinker.
1769 (eval_compile_command): Likewise.
1771 2017-08-03 Tom Tromey <tom@tromey.com>
1773 * utils.h (make_cleanup_fclose): Remove.
1774 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
1776 2017-08-03 Tom Tromey <tom@tromey.com>
1778 * top.c (open_terminal_stream): Return gdb_file_up.
1779 (new_ui_command): Update.
1781 2017-08-03 Tom Tromey <tom@tromey.com>
1783 * source.c (print_source_lines_base, forward_search_command)
1784 (reverse_search_command): Use gdb_file_up.
1786 2017-08-03 Tom Tromey <tom@tromey.com>
1788 * fbsd-nat.c (fbsd_find_memory_regions): Update.
1790 2017-08-03 Tom Tromey <tom@tromey.com>
1792 * cli/cli-cmds.c (find_and_open_script): Change return type.
1793 Remove "streamp" and "full_path" parameters.
1794 (source_script_with_search): Update.
1795 * auto-load.c (source_script_file): Update.
1796 * cli/cli-cmds.h (find_and_open_script): Change type.
1797 (open_script): New struct.
1799 2017-08-03 Tom Tromey <tom@tromey.com>
1801 * xml-support.c (xml_fetch_content_from_file): Update.
1802 * ui-file.c (stdio_file::open): Update.
1803 * tracefile-tfile.c (tfile_start): Update.
1804 * remote.c (remote_file_put, remote_file_get): Update.
1805 * nat/linux-procfs.c (linux_proc_get_int)
1806 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
1807 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
1808 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
1809 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
1810 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
1811 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
1812 * linux-nat.c (linux_proc_pending_signals): Update.
1813 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
1814 (file_closer): Remove.
1815 * compile/compile.c (compile_to_object): Update.
1816 * common/filestuff.h (struct gdb_file_deleter): New.
1817 (gdb_file_up): New typedef.
1818 (gdb_fopen_cloexec): Change return type.
1819 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
1820 * cli/cli-dump.c (fopen_with_cleanup): Remove.
1821 (dump_binary_file, restore_binary_file): Update.
1822 * auto-load.c (auto_load_objfile_script_1): Update.
1824 2017-08-03 Tom Tromey <tom@tromey.com>
1826 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
1827 (info_static_tracepoint_markers_command): Likewise.
1828 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
1829 * skip.c (skip_info): Use ui_out_emit_table.
1830 * progspace.c (print_program_space): Use ui_out_emit_table.
1831 * osdata.c (info_osdata): Use ui_out_emit_table.
1832 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
1834 * linux-thread-db.c (info_auto_load_libthread_db): Use
1836 * inferior.c (print_inferior): Use ui_out_emit_table.
1837 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
1838 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
1839 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
1840 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
1841 * ui-out.h (class ui_out_emit_table): New.
1843 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
1845 * mips-tdep.c (mips_fpu_type_str): New function.
1846 (mips_dump_tdep): Call it.
1848 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
1850 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
1853 2017-07-31 Xavier Roirand <roirand@adacore.com>
1855 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
1857 2017-07-27 Xavier Roirand <roirand@adacore.com>
1859 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
1861 2017-07-26 Yao Qi <yao.qi@linaro.org>
1863 * cli/cli-cmds.c (maintenancechecklist): New variable.
1864 * gdbcmd.h (maintenancechecklist): Declare it.
1865 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
1866 Call i386_linux_read_description with different masks.
1867 * maint.c (maintenance_check_command): New function.
1868 (_initialize_maint_cmds): Call add_prefix_cmd.
1869 * target-descriptions.c (tdesc_reg): override operator != and ==.
1870 (tdesc_type): Likewise.
1871 (tdesc_feature): Likewise.
1872 (target_desc): Likewise.
1873 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
1874 (maintenance_check_xml_descriptions): New function.
1875 (_initialize_target_descriptions) Add command "xml-descriptions".
1876 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
1878 2017-07-26 Yao Qi <yao.qi@linaro.org>
1880 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
1881 Include features/i386/32bit-*.c.
1882 (i386_linux_read_description): Generate target description if it
1884 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
1886 * features/i386/32bit-linux.c: Re-generated.
1887 * features/i386/32bit-sse.c: Likewise.
1888 * target-descriptions.c (print_c_feature::visit): Print code to
1889 set register number if needed.
1890 (print_c_feature) <m_next_regnum>: New field.
1892 2017-07-26 Yao Qi <yao.qi@linaro.org>
1894 * features/Makefile (CFILES): Rename with TDESC_CFILES.
1895 (FEATURE_XMLFILES): New.
1896 (FEATURE_CFILES): New.
1898 (clean-cfiles): Remove generated c files.
1899 * features/i386/32bit-avx.c: Generated.
1900 * features/i386/32bit-avx512.c: Generated.
1901 * features/i386/32bit-core.c: Generated.
1902 * features/i386/32bit-linux.c: Generated.
1903 * features/i386/32bit-mpx.c: Generated.
1904 * features/i386/32bit-pkeys.c: Generated.
1905 * features/i386/32bit-sse.c: Generated.
1906 * target-descriptions.c: Include algorithm.
1907 (tdesc_element_visitor): Add method visit_end.
1908 (print_c_tdesc): Implement visit_end.
1909 (print_c_tdesc:: m_filename_after_features): Move it to
1911 (print_c_feature): New class.
1912 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
1913 name starts with "i386/32bit-".
1915 2017-07-26 Yao Qi <yao.qi@linaro.org>
1917 * target-descriptions.c (tdesc_element_visitor): New class.
1918 (tdesc_element): New class.
1919 (tdesc_reg): Inherit from tdesc_element.
1920 (tdesc_reg::accept): New function.
1921 (tdesc_type): Inherit from tdesc_element.
1922 (tdesc_type::accept): New function.
1923 (tdesc_feature): Inherit from tdesc_element.
1924 (tdesc_feature::accept): New function.
1925 (target_desc): Inherit from tdesc_element.
1926 (target_desc::target_desc): New.
1927 (target_desc::~target_desc): New.
1928 (target_desc::accept): New.
1929 (allocate_target_description): Use new.
1930 (free_target_description): Use delete.
1931 (print_c_tdesc): New class.
1932 (maint_print_c_tdesc_cmd): Adjust.
1934 * features/aarch64.c: Re-generated.
1935 * features/arc-arcompact.c: Re-generated.
1936 * features/arc-v2.c: Re-generated.
1937 * features/arm/arm-with-iwmmxt.c: Re-generated.
1938 * features/arm/arm-with-m.c: Re-generated.
1939 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
1940 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
1941 * features/arm/arm-with-neon.c: Re-generated.
1942 * features/arm/arm-with-vfpv2.c: Re-generated.
1943 * features/arm/arm-with-vfpv3.c: Re-generated.
1944 * features/i386/amd64-avx-avx512.c: Re-generated.
1945 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
1946 * features/i386/amd64-avx.c: Re-generated.
1947 * features/i386/amd64-avx-linux.c: Re-generated.
1948 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
1949 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
1950 * features/i386/amd64-avx-mpx.c: Re-generated.
1951 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
1952 * features/i386/amd64.c: Re-generated.
1953 * features/i386/amd64-linux.c: Re-generated.
1954 * features/i386/amd64-mpx.c: Re-generated.
1955 * features/i386/amd64-mpx-linux.c: Re-generated.
1956 * features/i386/i386-avx-avx512.c: Re-generated.
1957 * features/i386/i386-avx-avx512-linux.c: Re-generated.
1958 * features/i386/i386-avx.c: Re-generated.
1959 * features/i386/i386-avx-linux.c: Re-generated.
1960 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
1961 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
1962 * features/i386/i386-avx-mpx.c: Re-generated.
1963 * features/i386/i386-avx-mpx-linux.c: Re-generated.
1964 * features/i386/i386.c: Re-generated.
1965 * features/i386/i386-linux.c: Re-generated.
1966 * features/i386/i386-mmx.c: Re-generated.
1967 * features/i386/i386-mmx-linux.c: Re-generated.
1968 * features/i386/i386-mpx.c: Re-generated.
1969 * features/i386/i386-mpx-linux.c: Re-generated.
1970 * features/i386/x32-avx-avx512.c: Re-generated.
1971 * features/i386/x32-avx-avx512-linux.c: Re-generated.
1972 * features/i386/x32-avx.c: Re-generated.
1973 * features/i386/x32-avx-linux.c: Re-generated.
1974 * features/i386/x32.c: Re-generated.
1975 * features/i386/x32-linux.c: Re-generated.
1976 * features/microblaze.c: Re-generated.
1977 * features/microblaze-with-stack-protect.c: Re-generated.
1978 * features/mips64-dsp-linux.c: Re-generated.
1979 * features/mips64-linux.c: Re-generated.
1980 * features/mips-dsp-linux.c: Re-generated.
1981 * features/mips-linux.c: Re-generated.
1982 * features/nds32.c: Re-generated.
1983 * features/nios2.c: Re-generated.
1984 * features/nios2-linux.c: Re-generated.
1985 * features/rs6000/powerpc-32.c: Re-generated.
1986 * features/rs6000/powerpc-32l.c: Re-generated.
1987 * features/rs6000/powerpc-403.c: Re-generated.
1988 * features/rs6000/powerpc-403gc.c : Re-generated.
1989 * features/rs6000/powerpc-405.c: Re-generated.
1990 * features/rs6000/powerpc-505.c: Re-generated.
1991 * features/rs6000/powerpc-601.c: Re-generated.
1992 * features/rs6000/powerpc-602.c: Re-generated.
1993 * features/rs6000/powerpc-603.c: Re-generated.
1994 * features/rs6000/powerpc-604.c: Re-generated.
1995 * features/rs6000/powerpc-64.c: Re-generated.
1996 * features/rs6000/powerpc-64l.c: Re-generated.
1997 * features/rs6000/powerpc-7400.c: Re-generated.
1998 * features/rs6000/powerpc-750.c: Re-generated.
1999 * features/rs6000/powerpc-860.c: Re-generated.
2000 * features/rs6000/powerpc-altivec32.c: Re-generated.
2001 * features/rs6000/powerpc-altivec32l.c: Re-generated.
2002 * features/rs6000/powerpc-altivec64.c: Re-generated.
2003 * features/rs6000/powerpc-altivec64l.c: Re-generated.
2004 * features/rs6000/powerpc-cell32l.c: Re-generated.
2005 * features/rs6000/powerpc-cell64l.c: Re-generated.
2006 * features/rs6000/powerpc-e500.c: Re-generated.
2007 * features/rs6000/powerpc-e500l.c: Re-generated.
2008 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
2009 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
2010 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
2011 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
2012 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
2013 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
2014 * features/rs6000/powerpc-vsx32.c: Re-generated.
2015 * features/rs6000/powerpc-vsx32l.c: Re-generated.
2016 * features/rs6000/powerpc-vsx64.c: Re-generated.
2017 * features/rs6000/powerpc-vsx64l.c: Re-generated.
2018 * features/rs6000/rs6000.c: Re-generated.
2019 * features/s390-linux32.c: Re-generated.
2020 * features/s390-linux32v1.c: Re-generated.
2021 * features/s390-linux32v2.c: Re-generated.
2022 * features/s390-linux64.c: Re-generated.
2023 * features/s390-linux64v1.c: Re-generated.
2024 * features/s390-linux64v2.c: Re-generated.
2025 * features/s390-te-linux64.c: Re-generated.
2026 * features/s390-tevx-linux64.c: Re-generated.
2027 * features/s390-vx-linux64.c: Re-generated.
2028 * features/s390x-linux64.c: Re-generated.
2029 * features/s390x-linux64v1.c: Re-generated.
2030 * features/s390x-linux64v2.c: Re-generated.
2031 * features/s390x-te-linux64.c: Re-generated.
2032 * features/s390x-tevx-linux64.c: Re-generated.
2033 * features/s390x-vx-linux64.c: Re-generated.
2034 * features/sparc/sparc32-solaris.c: Re-generated.
2035 * features/sparc/sparc64-solaris.c: Re-generated.
2036 * features/tic6x-c62x.c: Re-generated.
2037 * features/tic6x-c62x-linux.c: Re-generated.
2038 * features/tic6x-c64x.c: Re-generated.
2039 * features/tic6x-c64x-linux.c: Re-generated.
2040 * features/tic6x-c64xp.c: Re-generated.
2041 * features/tic6x-c64xp-linux.c: Re-generated.
2043 2017-07-26 Yao Qi <yao.qi@linaro.org>
2045 * i386-linux-tdep.c (i386_linux_read_description): New function.
2046 (i386_linux_core_read_description): Call
2047 i386_linux_read_description.
2048 * i386-linux-tdep.h (i386_linux_read_description): Declare.
2049 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
2050 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
2051 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
2052 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
2053 * x86-linux-nat.c (x86_linux_read_description): Call
2054 i386_linux_read_description.
2056 2017-07-26 Yao Qi <yao.qi@linaro.org>
2059 * features/Makefile (%.c: %.xml): Pass the xml file name to
2060 command "maint print c-tdesc".
2061 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
2064 2017-07-26 Yao Qi <yao.qi@linaro.org>
2066 * target-descriptions.c (target_desc): Add ctor and dtor. Do
2067 in-class initialization.
2068 (tdesc_create_feature): Call new instead of XCNEW.
2069 (free_target_description): Ue delete.
2071 2017-07-25 John Baldwin <jhb@FreeBSD.org>
2073 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
2075 2017-07-25 Yao Qi <yao.qi@linaro.org>
2077 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
2079 (amd64_x32_init_abi): Likewise.
2080 * amd64-tdep.h (amd64_init_abi): Update declaration.
2081 (amd64_x32_init_abi): Likewise.
2083 2017-07-25 Yao Qi <yao.qi@linaro.org>
2086 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
2087 condition for FPSCR.
2088 (arm_linux_store_inferior_registers): Likewise.
2090 2017-07-22 Tom Tromey <tom@tromey.com>
2092 * break-catch-syscall.c (struct catch_syscall_inferior_data)
2093 <syscalls_counts>: Now a std::vector.
2094 (get_catch_syscall_inferior_data): Use "new".
2095 (catch_syscall_inferior_data_cleanup): Use "delete".
2096 (insert_catch_syscall, remove_catch_syscall)
2097 (clear_syscall_counts): Update.
2099 2017-07-22 Tom Tromey <tom@tromey.com>
2101 * break-catch-syscall.c (syscall_catchpoint)
2102 <syscalls_to_be_caught>: Now a std::vector<int>
2103 (~syscall_catchpoint): Remove.
2104 (insert_catch_syscall, remove_catch_syscall)
2105 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
2106 (print_mention_catch_syscall, print_recreate_catch_syscall):
2108 (create_syscall_event_catchpoint): Change type of "filter"
2110 (catch_syscall_split_args): Return a std::vector.
2111 (catch_syscall_command_1, catching_syscall_number_1): Update.
2113 2017-07-22 Tom Tromey <tom@tromey.com>
2115 * break-catch-throw.c (struct exception_catchpoint)
2116 <exception_rx>: Now a std::string.
2117 (~exception_catchpoint): Remove.
2118 (print_one_detail_exception_catchpoint): Update.
2119 (handle_gnu_v3_exceptions): Change type of except_rx.
2120 (extract_exception_regexp): Return a std::string.
2121 (catch_exception_command_1): Update.
2123 2017-07-22 Tom Tromey <tom@tromey.com>
2125 * break-catch-sig.c (gdb_signal_type): Remove typedef.
2126 (struct signal_catchpoint) <signals_to_be_caught>: Now a
2128 <catch_all>: Now a bool.
2129 (~signal_catchpoint): Remove.
2130 (signal_catchpoint_insert_location)
2131 (signal_catchpoint_remove_location)
2132 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
2133 (signal_catchpoint_print_mention)
2134 (signal_catchpoint_print_recreate)
2135 (signal_catchpoint_explains_signal): Update.
2136 (create_signal_catchpoint): Change type of "filter" and
2138 (catch_signal_split_args): Return a std::vector. Change type of
2140 (catch_signal_command): Update.
2142 2017-07-20 Pedro Alves <palves@redhat.com>
2144 * ada-lang.c (ada_language_defn): Make extern.
2145 (_initialize_ada_language): Remove add_language call.
2146 * c-lang.c (c_language_defn, cplus_language_defn)
2147 (asm_language_defn, minimal_language_defn): Make extern.
2148 (_initialize_c_language): Delete.
2149 * completer.c (compare_cstrings): Delete, moved to utils.h.
2150 * d-lang.c (d_language_defn): Make extern.
2151 (_initialize_d_language): Remove add_language calls.
2152 * defs.h (enum language): Add comment.
2153 * f-lang.c (f_language_defn): Make extern.
2154 (_initialize_f_language): Remove add_language call.
2155 * go-lang.c (go_language_defn): Make extern.
2156 (_initialize_go_language): Remove add_language call.
2157 * language.c: Include <algorithm>.
2158 (languages): Redefine as const array.
2159 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
2160 (set_language_command): Handle "local". Use for-range loop.
2161 (set_language): Remove loop.
2162 (language_enum): Rewrite.
2163 (language_def, language_str): Remove loops.
2164 (add_language): Delete.
2165 (add_set_language_command): New, based on add_languages.
2166 (skip_language_trampoline): Adjust.
2167 (local_language_defn): Delete.
2168 (language_gdbarch_post_init): Adjust.
2169 (_initialize_language): Remove add_language calls. Call
2170 add_set_language_command.
2171 * language.h (add_language): Delete.
2172 (auto_language_defn)
2173 (unknown_language_defn, minimal_language_defn, ada_language_defn)
2174 (asm_language_defn, c_language_defn, cplus_language_defn)
2175 (d_language_defn, f_language_defn, go_language_defn)
2176 (m2_language_defn, objc_language_defn, opencl_language_defn)
2177 (pascal_language_defn, rust_language_defn): Declare.
2178 * m2-lang.c (m2_language_defn): Make extern.
2179 (_initialize_m2_language): Remove add_language call.
2180 * objc-lang.c (objc_language_defn): Make extern.
2181 (_initialize_objc_language): Remove add_language call.
2182 * opencl-lang.c (opencl_language_defn): Make extern.
2183 (_initialize_opencl_language): Remove add_language call.
2184 * p-lang.c (pascal_language_defn): Make extern.
2185 (_initialize_pascal_language): Delete.
2186 * rust-lang.c (rust_language_defn): Make extern.
2187 (_initialize_rust_language): Delete.
2188 * utils.h (compare_cstrings): New static inline function.
2190 2017-07-20 Pedro Alves <palves@redhat.com>
2192 * ada-lang.c (ada_to_fixed_type_1): Adjust.
2193 (get_var_value): Constify parameters.
2194 (get_int_var_value): Change prototype.
2195 (to_fixed_range_type): Adjust.
2196 * ada-lang.h (get_int_var_value): Change prototype.
2198 2017-07-20 Pedro Alves <palves@redhat.com>
2200 * dwarf2read.c (dw2_lookup_symbol): Use
2201 SYMBOL_MATCHES_SEARCH_NAME.
2202 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
2204 2017-07-20 Pedro Alves <palves@redhat.com>
2206 * block.c (block_iter_name_step, block_iter_name_first)
2207 (block_iter_name_next): Delete.
2208 (block_lookup_symbol_primary): Adjust to use
2209 dict_iter_match_first/dict_iter_match_next.
2210 * block.h (block_iter_name_first, block_iter_name_next): Delete
2212 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
2213 dict_iter_match_first/dict_iter_match_next.
2215 2017-07-20 Pedro Alves <palves@redhat.com>
2217 * cp-support.c (cp_find_first_component_aux): Add missing case for
2220 2017-07-18 David Blaikie <dblaikie@gmail.com>
2222 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
2223 of dwo_cu's dwo_file.
2225 2017-07-18 Yao Qi <yao.qi@linaro.org>
2227 * remote.c (store_registers_using_G): Remove one line comment.
2229 2017-07-18 Yao Qi <yao.qi@linaro.org>
2231 * regcache.c (regcache_cpy): Simplify it.
2232 (regcache::cpy_no_passthrough): Remove it.
2233 * regcache.h (cpy_no_passthrough): Remove it.
2234 (regcache_dup, regcache_cpy): Update comments.
2236 2017-07-18 Pedro Alves <palves@redhat.com>
2238 * remote-sim.c (sim_command_completer): Adjust to work with a
2239 completion_tracker instead of a VEC.
2241 2017-07-17 Pedro Alves <palves@redhat.com>
2243 * completer.c (complete_source_filenames): New function.
2244 (complete_address_and_linespec_locations): New function.
2245 (location_completer): Use complete_address_and_linespec_locations.
2246 (completion_tracker::build_completion_result): Honor the tracker's
2247 request to suppress append.
2248 * completer.h (completion_tracker::suppress_append_ws)
2249 (completion_tracker::set_suppress_append_ws): New methods.
2250 (completion_tracker::m_suppress_append_ws): New field.
2251 (complete_source_filenames): New declaration.
2252 * linespec.c (linespec_complete_what): New.
2253 (struct ls_parser) <complete_what, completion_word,
2254 completion_quote_char, completion_quote_end, completion_tracker>:
2256 (string_find_incomplete_keyword_at_end): New.
2257 (linespec_lexer_lex_string): Record quote char. If in completion
2259 (linespec_lexer_consume_token): Advance the completion word point.
2260 (linespec_lexer_peek_token): Save/restore completion info.
2261 (save_stream_and_consume_token): New.
2262 (set_completion_after_number): New.
2263 (linespec_parse_basic): Set what to complete next depending on
2264 token. Handle function and label completions specially.
2265 (parse_linespec): Disable objc shortcut in completion mode. Set
2266 what to complete next depending on token type. Skip keyword if in
2268 (complete_linespec_component, linespec_complete): New.
2269 * linespec.h (linespec_complete): Declare.
2271 2017-07-17 Pedro Alves <palves@redhat.com>
2273 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
2274 Handle 'operator<' / 'operator<<'.
2276 2017-07-17 Pedro Alves <palves@redhat.com>
2278 * completer.c (collect_explicit_location_matches): Handle
2280 (convert_explicit_location_to_linespec): New, factored out from
2282 (convert_explicit_location_to_sals): ... this.
2283 (complete_label): New.
2284 (linespec_complete_label, find_label_symbols_in_block): New.
2285 (find_label_symbols): Add completion_mode parameter and adjust to
2286 call find_label_symbols_in_block.
2287 * linespec.h (linespec_complete_label): Declare.
2289 2017-07-17 Pedro Alves <palves@redhat.com>
2291 * ada-lang.c (ada_collect_symbol_completion_matches): Add
2292 complete_symbol_mode parameter.
2293 * cli/cli-cmds.c (complete_command): Get the completion result out
2294 of the handle_brkchars tracker if used a custom word point.
2295 * completer.c: Include "linespec.h".
2296 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
2297 (advance_to_expression_complete_word_point): New.
2298 (completion_tracker::completes_to_completion_word): New.
2299 (complete_files_symbols): Pass down
2300 complete_symbol_mode::EXPRESSION.
2301 (explicit_options, probe_options): New.
2302 (collect_explicit_location_matches): Complete on the
2303 explictit_loc->foo instead of word. Use
2304 linespec_complete_function. Handle MATCH_LINE. Handle offering
2305 keyword and options completions.
2306 (backup_text_ptr): Delete.
2307 (skip_keyword): New.
2308 (complete_explicit_location): Remove 'word' parameter. Add
2309 language, quoted_arg_start and quoted_arg_end parameters.
2310 Rewrite, parsing left to right.
2311 (location_completer): Rewrite.
2312 (location_completer_handle_brkchars): New function.
2313 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
2314 (enum complete_line_internal_reason): Adjust comments.
2315 (completion_tracker::discard_completions): New.
2316 (completer_handle_brkchars_func_for_completer): Handle
2318 (gdb_custom_word_point_brkchars)
2319 (gdb_org_rl_basic_quote_characters): New.
2320 (gdb_completion_word_break_characters_throw)
2321 (completion_find_completion_word): Handle trackers that use a
2323 (completion_tracker::advance_custom_word_point_by): New.
2324 (completion_tracker::build_completion_result): Don't rely on
2325 readline appending the quote char.
2326 (gdb_rl_attempted_completion_function_throw): Handle trackers that
2327 use a custom word point.
2328 (gdb_rl_attempted_completion_function): Restore
2329 rl_basic_quote_characters.
2330 * completer.h (class completion_tracker): Extend intro comment.
2331 (completion_tracker::set_quote_char)
2332 (completion_tracker::quote_char)
2333 (completion_tracker::set_use_custom_word_point)
2334 (completion_tracker::use_custom_word_point)
2335 (completion_tracker::custom_word_point)
2336 (completion_tracker::set_custom_word_point)
2337 (completion_tracker::advance_custom_word_point_by)
2338 (completion_tracker::completes_to_completion_word)
2339 (completion_tracker::discard_completions): New methods.
2340 (completion_tracker::m_quote_char)
2341 (completion_tracker::m_use_custom_word_point)
2342 (completion_tracker::m_custom_word_point): New fields.
2343 (advance_to_expression_complete_word_point): Declare.
2344 * f-lang.c (f_collect_symbol_completion_matches): Add
2345 complete_symbol_mode parameter.
2346 * language.h (struct language_defn)
2347 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
2349 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
2350 (linespec_complete_function): New function.
2351 (linespec_lexer_lex_keyword): Adjust.
2352 * linespec.h (linespec_keywords, linespec_complete_function): New
2354 * location.c (find_end_quote): New function.
2355 (explicit_location_lex_one): Add explicit_completion_info
2356 parameter. Save quoting info. Don't throw if being called for
2357 completion. Don't handle Ada operators here.
2358 (is_cp_operator, skip_op_false_positives, first_of)
2359 (explicit_location_lex_one_function): New function.
2360 (string_to_explicit_location): Replace 'dont_throw' parameter with
2361 an explicit_completion_info pointer parameter. Handle it. Don't
2362 use explicit_location_lex_one to lex function names. Use
2363 explicit_location_lex_one_function instead.
2364 * location.h (struct explicit_completion_info): New.
2365 (string_to_explicit_location): Replace 'dont_throw' parameter with
2366 an explicit_completion_info pointer parameter.
2367 * symtab.c (default_collect_symbol_completion_matches_break_on):
2368 Add complete_symbol_mode parameter. Handle LINESPEC mode.
2369 (default_collect_symbol_completion_matches)
2370 (collect_symbol_completion_matches): Add complete_symbol_mode
2372 (collect_symbol_completion_matches_type): Pass down
2373 complete_symbol_mode::EXPRESSION.
2374 (collect_file_symbol_completion_matches): Add complete_symbol_mode
2375 parameter. Handle LINESPEC mode.
2376 * symtab.h (complete_symbol_mode): New.
2377 (default_collect_symbol_completion_matches_break_on)
2378 (default_collect_symbol_completion_matches)
2379 (collect_symbol_completion_matches)
2380 (collect_file_symbol_completion_matches): Add complete_symbol_mode
2383 2017-07-17 Pedro Alves <palves@redhat.com>
2385 * utils.c (enum class strncmp_iw_mode): New.
2386 (strcmp_iw): Rename to ...
2387 (strncmp_iw_with_mode): ... this. Add string2_len and mode
2388 parameters. Handle them.
2390 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
2391 * utils.h (strncmp_iw): Declare.
2392 (strcmp_iw): Move describing comments here.
2394 2017-07-17 Pedro Alves <palves@redhat.com>
2396 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
2398 * c-typeprint.c (is_type_conversion_operator): Use
2400 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
2401 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
2403 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
2404 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
2405 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
2406 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
2408 * location.c: Include "cp-support.h".
2409 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
2411 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
2414 2017-07-17 Pedro Alves <palves@redhat.com>
2416 * cli/cli-cmds.c (complete_command): Use a completion tracker
2417 along with completion_find_completion_word for handle_brkchars
2419 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
2420 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
2421 (struct gdb_rl_completion_word_info): New.
2422 (gdb_rl_find_completion_word): New.
2423 (completion_find_completion_word): New.
2424 * completer.h (completion_find_completion_word): Declare.
2426 2017-07-17 Pedro Alves <palves@redhat.com>
2428 * ada-lang.c (symbol_completion_match): Adjust comments.
2429 (symbol_completion_add): Replace vector parameter with
2430 completion_tracker parameter. Use it.
2431 (ada_make_symbol_completion_list): Rename to...
2432 (ada_collect_symbol_completion_matches): ... this. Add
2433 completion_tracker parameter and use it.
2434 (ada_language_defn): Adjust.
2435 * break-catch-syscall.c (catch_syscall_completer): Adjust
2436 prototype and work with completion_tracker instead of VEC.
2437 * breakpoint.c (condition_completer): Adjust prototype and work
2438 with completion_tracker instead of VEC.
2439 * c-lang.c (c_language_defn, cplus_language_defn)
2440 (asm_language_defn, minimal_language_defn): Adjust to renames.
2441 * cli/cli-cmds.c (complete_command): Rework using
2442 completion_tracker. Catch exceptions when completing.
2443 * cli/cli-decode.c (integer_unlimited_completer)
2444 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
2445 with completion_tracker instead of VEC.
2446 * command.h (struct completion_tracker): Forward declare.
2447 (completer_ftype, completer_handle_brkchars_ftype): Change
2449 (complete_on_cmdlist, complete_on_enum): Adjust.
2450 * completer.c: Include <algorithm>.
2451 (struct gdb_completer_state): New.
2452 (current_completion): New global.
2453 (readline_line_completion_function): Delete.
2454 (noop_completer, filename_completer)
2455 (filename_completer_handle_brkchars, complete_files_symbols)
2456 (linespec_location_completer): Adjust to work with a
2457 completion_tracker instead of a VEC.
2458 (string_or_empty): New.
2459 (collect_explicit_location_matches): Adjust to work with a
2460 completion_tracker instead of a VEC.
2461 (explicit_location_completer): Rename to ...
2462 (complete_explicit_location): ... this and adjust to work with a
2463 completion_tracker instead of a VEC.
2464 (location_completer): Adjust to work with a completion_tracker
2466 (add_struct_fields): Adjust to work with a completion_list instead
2468 (expression_completer): Rename to ...
2469 (complete_expression): ... this and adjust to work with a
2470 completion_tracker instead of a VEC. Use complete_files_symbols.
2471 (expression_completer): Reimplement on top of complete_expression.
2472 (symbol_completer): Adjust to work with a completion_tracker
2474 (enum complete_line_internal_reason): Add describing comments.
2475 (complete_line_internal_normal_command): Adjust to work with a
2476 completion_tracker instead of a VEC.
2477 (complete_line_internal): Rename to ...
2478 (complete_line_internal_1): ... this and adjust to work with a
2479 completion_tracker instead of a VEC. Assert TEXT is NULL in the
2480 handle_brkchars phase.
2481 (new_completion_tracker): Delete.
2482 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
2483 complete_line_internal_1.
2484 (free_completion_tracker): Delete.
2485 (INITIAL_COMPLETION_HTAB_SIZE): New.
2486 (completion_tracker::completion_tracker)
2487 (completion_tracker::~completion_tracker): New.
2488 (maybe_add_completion): Delete.
2489 (completion_tracker::maybe_add_completion)
2490 (completion_tracker::add_completion)
2491 (completion_tracker::add_completions): New.
2492 (throw_max_completions_reached_error): Delete.
2493 (complete_line): Adjust to work with a completion_tracker instead
2494 of a VEC. Don't create a completion_tracker_t or check for max
2496 (command_completer, command_completer_handle_brkchars)
2497 (signal_completer, reg_or_group_completer_1)
2498 (reg_or_group_completer, default_completer_handle_brkchars):
2499 Adjust to work with a completion_tracker.
2500 (gdb_completion_word_break_characters_throw): New.
2501 (gdb_completion_word_break_characters): Reimplement.
2502 (line_completion_function): Delete.
2503 (completion_tracker::recompute_lowest_common_denominator)
2504 (expand_preserving_ws)
2505 (completion_tracker::build_completion_result)
2506 (completion_result::completion_result)
2507 (completion_result::completion_result)
2508 (completion_result::~completion_result)
2509 (completion_result::completion_result)
2510 (completion_result::release_match_list, compare_cstrings)
2511 (completion_result::sort_match_list)
2512 (completion_result::reset_match_list)
2513 (gdb_rl_attempted_completion_function_throw)
2514 (gdb_rl_attempted_completion_function): New.
2515 * completer.h (completion_list, struct completion_result)
2516 (class completion_tracker): New.
2517 (complete_line): Add completion_tracker parameter.
2518 (readline_line_completion_function): Delete.
2519 (gdb_rl_attempted_completion_function): New.
2520 (noop_completer, filename_completer, expression_completer)
2521 (location_completer, symbol_completer, command_completer)
2522 (signal_completer, reg_or_group_completer): Update prototypes.
2523 (completion_tracker_t, new_completion_tracker)
2524 (make_cleanup_free_completion_tracker): Delete.
2525 (enum maybe_add_completion_enum): Delete.
2526 (maybe_add_completion): Delete.
2527 (throw_max_completions_reached_error): Delete.
2528 * corefile.c (complete_set_gnutarget): Adjust to work with a
2529 completion_tracker instead of a VEC.
2530 * cp-abi.c (cp_abi_completer): Adjust to work with a
2531 completion_tracker instead of a VEC.
2532 * d-lang.c (d_language_defn): Adjust.
2533 * disasm.c (disassembler_options_completer): Adjust to work with a
2534 completion_tracker instead of a VEC.
2535 * f-lang.c (f_make_symbol_completion_list): Rename to ...
2536 (f_collect_symbol_completion_matches): ... this. Adjust to work
2537 with a completion_tracker instead of a VEC.
2538 (f_language_defn): Adjust.
2539 * go-lang.c (go_language_defn): Adjust.
2540 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
2541 Adjust to work with a completion_tracker instead of a VEC.
2542 * infrun.c (handle_completer): Likewise.
2543 * interps.c (interpreter_completer): Likewise.
2544 * interps.h (interpreter_completer): Likewise.
2545 * language.c (unknown_language_defn, auto_language_defn)
2546 (local_language_defn): Adjust.
2547 * language.h (language_defn::la_make_symbol_completion_list):
2549 (language_defn::la_collect_symbol_completion_matches): ... this
2550 and adjust to work with a completion_tracker instead of a VEC.
2551 * m2-lang.c (m2_language_defn): Adjust.
2552 * objc-lang.c (objc_language_defn): Adjust.
2553 * opencl-lang.c (opencl_language_defn): Adjust.
2554 * p-lang.c (pascal_language_defn): Adjust.
2555 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
2556 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
2557 with a completion_tracker.
2558 * rust-lang.c (rust_language_defn): Adjust.
2559 * symtab.c (free_completion_list, do_free_completion_list)
2560 (return_val, completion_tracker): Delete.
2561 (completion_list_add_name, completion_list_add_symbol)
2562 (completion_list_add_msymbol, completion_list_objc_symbol)
2563 (completion_list_add_fields, add_symtab_completions): Add
2564 completion_tracker parameter and use it.
2565 (default_make_symbol_completion_list_break_on_1): Rename to...
2566 (default_collect_symbol_completion_matches_break_on): ... this.
2567 Add completion_tracker parameter and use it instead of allocating
2568 a completion tracker here.
2569 (default_make_symbol_completion_list_break_on): Delete old
2571 (default_make_symbol_completion_list): Delete.
2572 (default_collect_symbol_completion_matches): New.
2573 (make_symbol_completion_list): Delete.
2574 (collect_symbol_completion_matches): New.
2575 (make_symbol_completion_type): Rename to ...
2576 (collect_symbol_completion_matches_type): ... this. Add
2577 completion_tracker parameter and use it instead of VEC.
2578 (make_file_symbol_completion_list_1): Rename to...
2579 (collect_file_symbol_completion_matches): ... this. Add
2580 completion_tracker parameter and use it instead of VEC.
2581 (make_file_symbol_completion_list): Delete.
2582 (add_filename_to_list): Use completion_list instead of a VEC.
2583 (add_partial_filename_data::list): Now a completion_list.
2584 (make_source_files_completion_list): Work with a completion_list
2586 * symtab.h: Include "completer.h".
2587 (default_make_symbol_completion_list_break_on)
2588 (default_make_symbol_completion_list, make_symbol_completion_list)
2589 (make_symbol_completion_type, make_file_symbol_completion_list)
2590 (make_source_files_completion_list): Delete.
2591 (default_collect_symbol_completion_matches_break_on)
2592 (default_collect_symbol_completion_matches)
2593 (collect_symbol_completion_matches)
2594 (collect_symbol_completion_matches_type)
2595 (collect_file_symbol_completion_matches)
2596 (make_source_files_completion_list): New.
2597 * top.c (init_main): Don't install a rl_completion_entry_function
2598 hook. Install a rl_attempted_completion_function hook instead.
2599 * tui/tui-layout.c (layout_completer): Adjust to work with a
2601 * tui/tui-regs.c (tui_reggroup_completer):
2602 * tui/tui-win.c (window_name_completer, focus_completer)
2603 (winheight_completer): Adjust to work with a completion_tracker.
2604 * value.c: Include "completer.h".
2605 (complete_internalvar): Adjust to work with a completion_tracker.
2606 * value.h (complete_internalvar): Likewise.
2608 2017-07-17 Pedro Alves <palves@redhat.com>
2610 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
2612 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
2613 comments to completer_ftype's declaration.
2614 <completer_handle_brkchars>: Change type to
2615 completer_handle_brkchars_ftype.
2616 * command.h (completer_ftype): Add describing comment and give
2617 names to parameters.
2618 (completer_ftype_void): Rename to ...
2619 (completer_handle_brkchars_ftype) ... this. Add describing comment.
2620 (set_cmd_completer_handle_brkchars): Adjust.
2621 * completer.c (filename_completer_handle_brkchars): New function.
2622 (complete_line_internal_normal_command): New function, factored
2624 (complete_line_internal): ... here.
2625 (command_completer_handle_brkchars)
2626 (default_completer_handle_brkchars)
2627 (completer_handle_brkchars_func_for_completer): New functions.
2628 * completer.h (set_gdb_completion_word_break_characters): Delete
2630 (completer_handle_brkchars_func_for_completer): New declaration.
2631 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
2632 completer_handle_brkchars_func_for_completer.
2634 2017-07-17 Pedro Alves <palves@redhat.com>
2636 * completer.c (symbol_completer): New function, based on
2637 make_symbol_completion_list_fn.
2638 * completer.h (symbol_completer): New declaration.
2639 * guile/scm-cmd.c (cmdscm_completers): Adjust.
2640 * python/py-cmd.c (completers): Adjust.
2641 * symtab.c (make_symbol_completion_list_fn): Delete.
2642 * symtab.h (make_symbol_completion_list_fn): Delete.
2643 * cli/cli-decode.c (add_cmd): Adjust.
2645 2017-07-17 Pedro Alves <palves@redhat.com>
2647 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
2648 * dwarf2read.c: Include "filename-seen-cache.h".
2649 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
2650 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
2651 * filename-seen-cache.c: New file.
2652 * filename-seen-cache.h: New file.
2653 * symtab.c: Include "filename-seen-cache.h".
2654 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
2655 (create_filename_seen_cache, clear_filename_seen_cache)
2656 (delete_filename_seen_cache, filename_seen): Delete, parts moved
2657 to filename-seen-cache.h/filename-seen-cache.c.
2658 (output_source_filename, sources_info)
2659 (maybe_add_partial_symtab_filename)
2660 (make_source_files_completion_list): Adjust to use
2661 filename_seen_cache.
2663 2017-07-17 Pedro Alves <palves@redhat.com>
2665 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
2667 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
2668 dwarf2_debug_sections*)): New.
2669 (dwarf2_per_objfile::dwarf2_per_objfile(const
2670 dwarf2_per_objfile&)): Declare as deleted.
2671 (dwarf2_per_objfile::operator=): Declare as deleted.
2672 (dwarf2_per_objfile::dwarf2_per_objfile)
2673 (dwarf2_per_objfile::~dwarf2_per_objfile)
2674 (dwarf2_per_objfile::free_cached_comp_units): New.
2675 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
2676 ctor. Call dwarf2_per_objfile's ctor manually.
2677 (dwarf2_locate_sections): Deleted/refactored as ...
2678 (dwarf2_per_objfile::locate_sections): ... this new method.
2679 (free_cached_comp_units): Defer to
2680 dwarf2_per_objfile::free_cached_comp_units.
2681 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
2683 2017-07-14 Tom Tromey <tom@tromey.com>
2686 * rust-exp.y (convert_ast_to_expression): Add "want_type"
2688 <UNOP_SIZEOF>: Split into separate case.
2689 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
2691 2017-07-14 Tom Tromey <tom@tromey.com>
2694 * symtab.c (symbol_matches_domain): Add language_rust to special
2696 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
2697 treat LOC_TYPEDEF symbols as variables.
2699 2017-07-14 Pedro Alves <palves@redhat.com>
2701 * symtab.c (make_file_symbol_completion_list_1): Iterate over
2702 symtabs matching all symtabs with SRCFILE as file name instead of
2703 only considering the first hit, with lookup_symtab.
2705 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2707 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
2708 operator_name parameters.
2709 (gen_expr): Update function call.
2711 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2713 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
2715 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
2717 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
2718 parameter, use agent_expr::gdbarch instead, update function
2720 (locexpr_tracepoint_var_ref): Likewise.
2721 (loclist_tracepoint_var_ref): Likewise.
2722 * ax-gdb.c (gen_trace_static_fields): Likewise.
2723 (gen_traced_pop): Likewise.
2724 (gen_frame_args_address): Likewise.
2725 (gen_frame_locals_address): Likewise.
2726 (gen_var_ref): Likewise.
2727 (gen_struct_ref_recursive): Likewise.
2728 (gen_static_field): Likewise.
2729 (gen_maybe_namespace_elt): Likewise.
2730 (gen_expr): Likewise.
2731 (gen_trace_for_var): Likewise.
2732 (gen_trace_for_expr): Likewise.
2733 (gen_trace_for_return_address): Likewise.
2735 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2737 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
2739 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
2741 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2743 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
2744 from ax, update calls.
2745 (gen_usual_arithmetic): Likewise.
2746 (gen_integral_promotions): Likewise.
2747 (gen_bitfield_ref): Likewise.
2748 (gen_primitive_field): Likewise.
2749 (gen_struct_ref_recursive): Likewise.
2750 (gen_struct_ref): Likewise.
2751 (gen_maybe_namespace_elt): Likewise.
2752 (gen_struct_elt_for_reference): Likewise.
2753 (gen_namespace_elt): Likewise.
2754 (gen_aggregate_elt_ref): Likewise.
2755 (gen_expr): Get gdbarch from ax, update calls.
2756 (gen_expr_binop_rest): Likewise.
2758 2017-07-13 Pedro Alves <palves@redhat.com>
2760 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
2762 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
2763 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
2764 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
2765 tdesc_amd64_linux as default tdesc. Get final tdesc from the
2767 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
2768 Get final tdesc from the tdep.
2769 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
2771 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2772 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2773 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
2774 Use it as default tdesc.
2775 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
2776 down to amd_init_abi. No longer handle fallback tdesc here.
2777 * amd64-tdep.h (tdesc_x32): Declare.
2778 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
2780 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
2783 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2785 * s390-linux-tdep.c (s390_process_record): Add support for
2786 instructions new in arch12.
2788 2017-07-11 John Baldwin <jhb@FreeBSD.org>
2790 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
2791 PT_GETFSBASE and PT_GETGSBASE.
2792 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
2795 2017-07-11 John Baldwin <jhb@FreeBSD.org>
2797 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
2798 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
2799 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
2801 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
2802 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
2803 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
2804 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
2805 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
2806 * features/i386/amd64.xml: Add 64bit-segments.xml.
2807 * features/i386/amd64-avx-avx512.c: Regenerated.
2808 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
2809 * features/i386/amd64-avx-mpx.c: Regenerated.
2810 * features/i386/amd64-avx.c: Regenerated.
2811 * features/i386/amd64-mpx.c: Regenerated.
2812 * features/i386/amd64.c: Regenerated.
2813 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
2814 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2815 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
2816 * regformats/i386/amd64-avx.dat: Regenerated.
2817 * regformats/i386/amd64-mpx.dat: Regenerated.
2818 * regformats/i386/amd64.dat: Regenerated.
2820 2017-07-10 Yao Qi <yao.qi@linaro.org>
2822 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
2823 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
2825 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
2827 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
2829 * gnulib/aclocal.m4: Regenerate.
2830 * gnulib/config.in: Regenerate.
2831 * gnulib/configure: Regenerate.
2832 * gnulib/import/Makefile.am: Regenerate.
2833 * gnulib/import/Makefile.in: Regenerate.
2834 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2835 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2836 * gnulib/import/m4/environ.m4: New file.
2837 * gnulib/import/m4/setenv.m4: New file.
2838 * gnulib/import/setenv.c: New file.
2839 * gnulib/import/unsetenv.c: New file.
2841 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
2843 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
2844 address when op is DW_OP_addr.
2846 2017-07-09 Tom Tromey <tom@tromey.com>
2848 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
2849 check and apply to outer type.
2851 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2853 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
2854 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
2855 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
2856 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
2858 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2860 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
2862 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2864 * corelow.c (get_core_siginfo): Remove.
2865 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
2866 instead of get_core_siginfo.
2867 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
2868 * gdbarch.h: Re-generate.
2869 * gdbarch.c: Re-generate.
2870 * linux-tdep.c (linux_core_xfer_siginfo): New.
2871 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
2873 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2875 * corelow.c (thread_section_name): Move to ...
2876 * gdbcore.h (thread_section_name): ... here.
2878 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2880 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
2881 (struct siginfo32): New.
2882 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
2883 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
2884 via ptrace(PT_LWPINFO).
2886 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2888 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
2889 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
2890 (fbsd_get_siginfo_type): New.
2891 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
2892 (_initialize_fbsd_tdep): New.
2894 2017-07-06 David Blaikie <dblaikie@gmail.com>
2896 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
2897 a singular dwo_unit*) to support multiple CUs in the same way that
2898 multiple TUs are supported.
2899 (create_cus_hash_table): Replace create_dwo_cu with a function for
2900 parsing multiple CUs from a DWO file.
2901 (open_and_init_dwo_file): Use create_cus_hash_table rather than
2903 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
2904 htab_find, rather than comparing the signature to a singleton CU in
2907 2017-07-06 Pedro Alves <palves@redhat.com>
2909 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
2911 2017-07-04 Pedro Alves <palves@redhat.com>
2913 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
2914 * gdbtypes.h (TYPE_STATIC): Delete.
2915 (struct fn_field) <is_public, is_abstract, is_static, is_final,
2916 is_synchronized, is_native>: Delete.
2918 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
2919 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
2920 (TYPE_FN_FIELD_ABSTRACT): Delete.
2922 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
2924 * buffer.h (buffer_finish): Fix spelling mistakes.
2926 2017-07-01 Eli Zaretskii <eliz@gnu.org>
2928 * .dir-locals.el: Automatically switch to C-style comments in
2929 versions of Emacs that support the feature.
2931 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
2932 Pedro Alves <palves@redhat.com>
2935 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
2936 (process_next_line): New variable 'inline_cmd'.
2937 Adjust 'if' clauses for "python", "compile" and "guile" to use
2938 'command_name_equals' and check for '!inline_cmd'.
2940 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
2943 * cli/cli-script.c (command_name_equals_not_inline): New function.
2944 (process_next_line): Adjust 'if' clauses for "python", "compile"
2945 and "guile" to use command_name_equals_not_inline.
2947 2017-06-29 Pedro Alves <palves@redhat.com>
2949 * completer.c (expression_completer): Call
2950 linespec_location_completer instead of location_completer.
2952 2017-06-29 Pedro Alves <palves@redhat.com>
2954 * completer.c (expression_completer): Remove code that recomputes
2957 2017-06-29 Yao Qi <yao.qi@linaro.org>
2959 * regformats/regdat.sh: Generate code with
2960 "ifndef IN_PROCESS_AGENT".
2962 2017-06-28 Pedro Alves <palves@redhat.com>
2964 * command.h: Include "common/scoped_restore.h".
2966 2017-06-28 Yao Qi <yao.qi@linaro.org>
2968 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
2969 instead of obstack_grow.
2971 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
2974 * symfile.c (reread_symbols): Call objfiles_changed just before
2977 2017-06-27 Pedro Alves <palves@redhat.com>
2979 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
2980 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
2981 (completion_list_add_symbol, completion_list_add_msymbol):
2982 ... these new functions.
2983 (add_symtab_completions)
2984 (default_make_symbol_completion_list_break_on_1): Adjust.
2986 2017-06-27 Pedro Alves <palves@redhat.com>
2988 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
2989 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
2990 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
2992 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
2993 'storage_obstack' field an auto_obstack. In-class initialize all
2994 non-bitfield fields. Make minsyms_read bool.
2995 * symfile.c (read_symbols): Adjust.
2997 2017-06-27 Alan Hayward <alan.hayward@arm.com>
2999 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
3000 (gdbsim_store_register): Likewise.
3002 2017-06-27 Pedro Alves <palves@redhat.com>
3004 * c-exp.y (name_obstack): Now an auto_obstack.
3005 (yylex): Use auto_obstack::clear.
3006 (c_parse): Use auto_obstack::clear instead of reinitializing and
3007 freeing the obstack.
3008 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
3009 * d-exp.y (name_obstack): Now an auto_obstack.
3010 (yylex): Use auto_obstack::clear.
3011 (d_parse): Use auto_obstack::clear instead of reinitializing and
3012 freeing the obstack.
3013 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
3015 * dwarf2read.c (create_addrmap_from_index)
3016 (dwarf2_build_psymtabs_hard)
3017 (update_enumeration_type_from_children): Likewise.
3018 * gdb_obstack.h (auto_obstack): New type.
3019 * go-exp.y (name_obstack): Now an auto_obstack.
3020 (build_packaged_name): Use auto_obstack::clear.
3021 (go_parse): Use auto_obstack::clear instead of reinitializing and
3022 freeing the obstack.
3023 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
3025 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
3026 * rust-exp.y (work_obstack): Now an auto_obstack.
3027 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
3028 reinitializing and freeing the obstack.
3029 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
3030 (host_char_to_target): Use auto_obstack.
3031 * utils.h (make_cleanup_obstack_free): Delete declaration.
3032 * valprint.c (generic_emit_char, generic_printstr): Use
3035 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
3037 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
3039 (darwin_init_thread_list): Don't update dummy thread.
3040 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
3042 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
3044 * record-full.c (netorder16): Remove.
3046 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
3048 * common/diagnostics.h: Define macros for GCC.
3049 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
3050 * common/vec.h: Include diagnostics.h.
3051 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
3052 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
3055 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
3057 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
3059 * ada-lex.l: Ignore deprecated register warnings.
3061 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
3063 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
3064 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
3066 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
3068 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
3071 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
3073 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
3075 2017-06-23 Alan Hayward <alan.hayward@arm.com>
3077 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
3078 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
3079 (xtensa_register_read_masked): Likewise.
3081 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
3083 * common/environ.c (gdb_environ::unset): Update comment.
3085 2017-06-22 Alan Hayward <alan.hayward@arm.com>
3087 * python/py-unwind.c (pyuw_sniffer): Allocate space for
3090 2017-06-22 Alan Hayward <alan.hayward@arm.com>
3092 * record-full.c (record_full_exec_insn): Use byte_vector.
3094 2017-06-22 Yao Qi <yao.qi@linaro.org>
3096 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
3097 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
3099 2017-06-22 Alan Hayward <alan.hayward@arm.com>
3101 * remote.c (cached_reg): Move from here...
3102 * regcache.h (cached_reg): ...to here.
3103 * python/py-unwind.c (struct reg_info): Remove.
3104 (cached_frame_info): Use cached_reg_t.
3105 (pyuw_prev_register): Likewise.
3106 (pyuw_sniffer): Use cached_reg_t and allocate registers.
3107 (pyuw_dealloc_cache): Free all registers.
3109 2017-06-22 Pedro Alves <palves@redhat.com>
3110 Simon Marchi <simon.marchi@ericsson.com>
3112 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
3114 * common/diagnostics.h: New file.
3116 2017-06-22 Pedro Alves <palves@redhat.com>
3118 * common/agent.h: Add include guards.
3120 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
3122 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
3123 talk about addressable units instead of bytes.
3125 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3127 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
3128 of '::const_iterator'.
3130 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3132 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3133 'unittests/environ-selftests.c'.
3134 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
3135 * charset.c (find_charset_names): Declare object 'iconv_env'.
3136 Update code to use 'iconv_env' object. Remove call to
3138 * common/environ.c: Include <utility>.
3139 (make_environ): Delete function.
3140 (free_environ): Delete function.
3141 (gdb_environ::clear): New function.
3142 (gdb_environ::operator=): New function.
3143 (gdb_environ::get): Likewise.
3144 (environ_vector): Delete function.
3145 (set_in_environ): Delete function.
3146 (gdb_environ::set): New function.
3147 (unset_in_environ): Delete function.
3148 (gdb_environ::unset): New function.
3149 (gdb_environ::envp): Likewise.
3150 * common/environ.h: Include <vector>.
3151 (struct gdb_environ): Delete; transform into...
3152 (class gdb_environ): ... this class.
3153 (free_environ): Delete prototype.
3154 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
3155 environ_vector): Likewise.
3156 * infcmd.c (run_command_1): Update code to call
3157 'envp' from 'gdb_environ' class.
3158 (environment_info): Update code to call methods from 'gdb_environ'
3160 (unset_environment_command): Likewise.
3161 (path_info): Likewise.
3162 (path_command): Likewise.
3163 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
3164 (inferior::inferior): Initialize 'environment' using the host's
3166 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
3167 Include "environ.h".
3168 (class inferior) <environment>: Change type from 'struct
3169 gdb_environ' to 'gdb_environ'.
3170 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
3171 methods from 'gdb_environ' class.
3172 * solib.c (solib_find_1): Likewise
3173 * unittests/environ-selftests.c: New file.
3175 2017-06-20 Yao Qi <yao.qi@linaro.org>
3177 * features/i386/i386-linux.xml: Exchange the order of including
3178 32bit-linux.xml and 32bit-sse.xml.
3179 * features/i386/i386-linux.c: Regenerated.
3181 2017-06-20 Yao Qi <yao.qi@linaro.org>
3183 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
3184 Delete copy ctor and assignment operator.
3185 (tdesc_type): Likewise.
3186 (tdesc_feature): Likewise.
3187 (tdesc_free_reg): Remove.
3188 (tdesc_create_reg): Use new.
3189 (tdesc_free_type): Remove.
3190 (tdesc_create_vector): Use new.
3191 (tdesc_create_union): Likewise.
3192 (tdesc_create_flags): Likewise.
3193 (tdesc_create_enum): Likewise.
3194 (tdesc_free_feature): Delete.
3195 (free_target_description): Use delete.
3197 2017-06-19 John Baldwin <jhb@FreeBSD.org>
3199 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
3202 2017-06-19 Pedro Alves <palves@redhat.com>
3204 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
3205 after gdb::unlinker.
3207 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
3209 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
3210 gdb_environ to access an environment variable.
3212 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3214 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
3217 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3219 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
3221 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3223 * configure: Re-generate.
3224 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
3226 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3228 * configure: Re-generate.
3229 * warning.m4: Pass -Werror to compiler when checking for
3230 supported warning flags.
3232 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3234 * Makefile.in (COMPILE.pre): Add "-x c++".
3236 2017-06-16 Alan Hayward <alan.hayward@arm.com>
3237 Pedro Alves <palves@redhat.com>
3238 Yao Qi <yao.qi@linaro.org>
3240 * defs.h (RequireLongest): New.
3241 (extract_integer): Declare function template.
3242 (extract_signed_integer): Remove the declaration, but define it
3244 (extract_unsigned_integer): Likewise.
3245 (store_integer): Declare function template.
3246 (store_signed_integer): Remove the declaration, but define it
3248 (store_unsigned_integer): Likewise.
3249 * findvar.c (extract_integer): New function template.
3250 (extract_signed_integer): Remove.
3251 (extract_unsigned_integer): Remove.
3252 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
3254 (store_integer): New function template.
3255 (store_signed_integer): Remove.
3256 (store_unsigned_integer): Remove.
3257 (store_integer): Explicit instantiations.
3258 * regcache.c (regcache_raw_read_signed): Update.
3259 (regcache::raw_read): New function.
3260 (regcache::raw_read_signed): Remove.
3261 (regcache::raw_read_unsigned): Remove.
3262 (regcache_raw_read_unsigned): Update.
3263 (regcache_raw_write_unsigned): Update.
3264 (regcache::raw_write_signed): Remove.
3265 (regcache::raw_write): New function.
3266 (regcache_cooked_read_signed): Update.
3267 (regcache::raw_write_unsigned): Remove.
3268 (regcache::cooked_read_signed): Remove.
3269 (regcache_cooked_read_unsigned): Update.
3270 (regcache::cooked_read_unsigned): Remove.
3271 (regcache_cooked_write_signed): Update.
3272 (regcache_cooked_write_unsigned): Update.
3273 * regcache.h (regcache) <raw_read_signed>: Remove.
3274 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
3275 <raw_read, raw_write>: New.
3276 <cooked_read_signed, cooked_write_signed>: Remove.
3277 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
3278 <cooked_read, cooked_write>: New.
3279 * sh64-tdep.c (sh64_pseudo_register_read): Update.
3280 (sh64_pseudo_register_write): Update.
3282 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
3284 * arc-tdep.c (arc_disassembler_options): New variable.
3285 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
3286 of default_print_insn.
3287 (arc_delayed_print_insn): Set info->section when needed,
3288 use default_print_insn to retrieve a disassembler.
3290 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
3293 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
3294 to mention $SHELL and startup-with-shell.
3296 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3298 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
3300 2017-06-14 Yao Qi <yao.qi@linaro.org>
3302 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
3303 default_print_insn instead of print_insn_aarch64.
3304 * arm-tdep.c (gdb_print_insn_arm): Call
3305 default_print_insn instead of print_insn_big_arm
3306 and print_insn_little_arm.
3307 * i386-tdep.c (i386_print_insn): Call default_print_insn
3308 instead of print_insn_i386.
3309 * ia64-tdep.c (ia64_print_insn): Call
3310 default_print_insn instead of print_insn_ia64.
3311 * mips-tdep.c (gdb_print_insn_mips): Call
3312 default_print_insn instead of print_insn_big_mips
3313 and print_insn_little_mips.
3314 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
3315 instead of print_insn_spu.
3317 2017-06-14 Pedro Alves <palves@redhat.com>
3319 * ada-lang.c: Include "common/byte-vector.h".
3320 (ada_value_primitive_packed_val): Use gdb::byte_vector.
3321 * charset.c (wchar_iterator::iterate): Resize the vector instead
3323 * common/byte-vector.h: Include "common/def-vector.h".
3324 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
3325 * cli/cli-dump.c: Include "common/byte-vector.h".
3326 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
3327 * common/byte-vector.h: New file.
3328 * common/def-vector.h: New file.
3329 * common/default-init-alloc.h: New file.
3330 * dwarf2loc.c: Include "common/byte-vector.h".
3331 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
3332 instead of reserving it.
3333 * dwarf2read.c: Include "common/byte-vector.h".
3334 (data_buf::m_vec): Now a gdb::byte_vector.
3335 * gdb_regex.c: Include "common/def-vector.h".
3336 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
3337 * mi/mi-main.c: Include "common/byte-vector.h".
3338 (mi_cmd_data_read_memory): Use gdb::byte_vector.
3339 * printcmd.c: Include "common/byte-vector.h".
3340 (print_scalar_formatted): Use gdb::byte_vector.
3341 * valprint.c: Include "common/byte-vector.h".
3342 (maybe_negate_by_bytes, print_decimal_chars): Use
3345 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
3347 * darwin-nat.c: Include "nat/fork-inferior.h".
3349 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
3351 * configure.nat: Factor out Darwin bits that are not
3352 architecture-specific. Add fork-inferior.o.
3354 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
3356 * configure.nat: Factor out AIX bits that are not
3357 architecture-specific. Add fork-inferior.o.
3359 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3361 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
3362 (read_pieced_value, write_pieced_value): ...here. Reduce to
3363 wrappers that just call rw_pieced_value.
3365 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3367 * dwarf2loc.c (write_pieced_value): When writing the data for a
3368 memory piece, use write_memory_with_notification instead of
3371 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3373 * valops.c (read_value_memory): Change embedded_offset to
3374 represent a bit offset instead of a byte offset.
3375 * value.h (read_value_memory): Adjust comment.
3377 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3379 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
3380 dest_offset_bits and source_offset_bits.
3381 (write_pieced_value): Likewise.
3383 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3385 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
3386 given by DW_OP_bit_piece.
3387 (write_pieced_value): Likewise.
3389 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3391 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
3392 some other preparations to the places where sufficient information
3394 (write_pieced_value): Likewise.
3396 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3398 * dwarf2loc.c (bits_to_bytes): New function.
3399 (read_pieced_value): Fix offset calculations for register pieces
3400 on big-endian targets.
3401 (write_pieced_value): Likewise.
3403 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3405 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
3406 (write_pieced_value): Likewise.
3408 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3410 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
3411 transfer the source value's least significant bits, instead of its
3412 lowest-addressed ones. Rename type_len to max_offset.
3413 (read_pieced_value): Mirror above changes to write_pieced_value as
3416 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3418 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
3419 truncate full bytes from dest_offset_bits before using it as an
3420 offset into the buffer.
3422 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3424 * dwarf2loc.c (write_pieced_value): Include transfer size in
3427 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3429 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
3430 calculation of this_size.
3432 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3434 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
3435 when targeting a bit-field.
3436 (write_pieced_value): Likewise.
3438 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3440 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
3441 (allocate_piece_closure): Drop addr_size parameter.
3442 (dwarf2_evaluate_loc_desc_full): Adjust call to
3443 allocate_piece_closure.
3445 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3448 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
3449 the LSB end, independent of endianness.
3451 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3453 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
3456 2017-06-13 Yao Qi <yao.qi@linaro.org>
3458 * mips-linux-nat.c: Move include features/mips*-linux.c to
3460 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
3461 to mips-linux-tdep.c.
3462 * mips-linux-tdep.c: Include features/mips*-linux.c
3463 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
3465 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
3466 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
3467 (tdesc_mips64_dsp_linux): Declare.
3469 2017-06-12 Tom Tromey <tom@tromey.com>
3471 * valprint.h (val_print_type_code_int): Remove.
3472 * valprint.c (generic_val_print_int): Always call
3473 val_print_scalar_formatted.
3474 (val_print_type_code_int): Remove.
3475 * printcmd.c (print_scalar_formatted): Handle options->format==0.
3476 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
3477 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
3478 * ada-valprint.c (ada_val_print_num): Use
3479 val_print_scalar_formatted.
3481 2017-06-12 Tom Tromey <tom@tromey.com>
3483 * printcmd.c (print_scalar_formatted): Unify the two switches.
3484 Don't convert scalars to LONGEST.
3486 2017-06-12 Tom Tromey <tom@tromey.com>
3489 * valprint.h (print_decimal_chars): Update.
3490 * valprint.c (maybe_negate_by_bytes): New function.
3491 (print_decimal_chars): Add "is_signed" argument.
3492 * printcmd.c (print_scalar_formatted): Update.
3494 2017-06-12 Tom Tromey <tom@tromey.com>
3497 * valprint.h (print_binary_chars, print_hex_chars): Update.
3498 * valprint.c (val_print_type_code_int): Update.
3499 (print_binary_chars): Add "zero_pad" argument.
3500 (emit_octal_digit): New function.
3501 (print_octal_chars): Don't zero-pad.
3502 (print_decimal_chars): Likewise.
3503 (print_hex_chars): Add "zero_pad" argument.
3504 * sh64-tdep.c (sh64_do_fp_register): Update.
3505 * regcache.c (regcache::dump): Update.
3506 * printcmd.c (print_scalar_formatted): Update.
3507 * infcmd.c (default_print_one_register_info): Update.
3509 2017-06-12 Pedro Alves <palves@redhat.com>
3510 Alan Hayward <alan.hayward@arm.com>
3512 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
3513 (mips_eabi_push_dummy_call): Rename local 'regsize' to
3514 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
3515 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
3516 Assert that abi_regsize bytes fit in 'ref_valbuf'.
3518 2017-06-12 Pedro Alves <palves@redhat.com>
3520 * dwarf2read.c (mapped_symtab::data): Now a vector of
3521 symtab_index_entry instead of vector of
3522 std::unique_ptr<symtab_index_entry>. All users adjusted to check
3523 whether an element's name is NULL instead of checking whether the
3524 element itself is NULL.
3525 (find_slot): Change return type. Adjust.
3526 (hash_expand, , add_index_entry, uniquify_cu_indices)
3527 (write_hash_table): Adjust.
3529 2017-06-12 Pedro Alves <palves@redhat.com>
3531 * dwarf2read.c (recursively_count_psymbols): New function.
3532 (write_psymtabs_to_index): Call it to compute number of psyms and
3533 pass estimate size of psyms_seen to unordered_set's ctor.
3535 2017-06-12 Pedro Alves <palves@redhat.com>
3537 * dwarf2read.c (write_hash_table): Check if key already exists
3540 2017-06-12 Pedro Alves <palves@redhat.com>
3542 * dwarf2read.c (data_buf::append_space): Rename to...
3543 (data_buf::grow): ... this, and make private. Adjust all callers.
3544 (data_buf::append_uint): New method.
3545 (add_address_entry, write_one_signatured_type)
3546 (write_psymtabs_to_index): Use it.
3548 2017-06-12 Pedro Alves <palves@redhat.com>
3550 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
3551 (file_write (FILE *, const std::vector<Elem>&)): Delete.
3552 (data_buf::file_write): Call ::fwrite directly.
3554 2017-06-12 Pedro Alves <palves@redhat.com>
3556 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
3559 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
3561 Code cleanup: C++ify .gdb_index producer.
3562 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
3563 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
3564 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
3565 (create_strtab, add_string): Remove.
3566 (file_write, data_buf): New.
3567 (struct symtab_index_entry): Use std::vector for cu_indices.
3568 (struct mapped_symtab): Use std::vector for data.
3569 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
3570 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
3572 (find_slot): Change return type. Update it to the new data structures.
3573 (hash_expand, add_index_entry): Update it to the new data structures.
3574 (offset_type_compare): Remove.
3575 (uniquify_cu_indices): Update it to the new data structures.
3576 (c_str_view, c_str_view_hasher, vector_hasher): New.
3577 (add_indices_to_cpool): Remove.
3578 (write_hash_table): Update it to the new data structures.
3579 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
3580 (eq_psymtab_cu_index): Remove.
3581 (psym_index_map): New typedef.
3582 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
3583 reference and std::unordered_map for cu_index_htab.
3584 (add_address_entry, add_address_entry_worker, write_address_map)
3585 (write_psymbols): Update it to the new data structures.
3586 (write_obstack): Remove.
3587 (struct signatured_type_index_data): Change types_list to a data_buf
3588 reference and psyms_seen to a std::unordered_set reference.
3589 (write_one_signatured_type, recursively_write_psymbols)
3590 (write_psymtabs_to_index): Update it to the new data structures.
3592 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
3594 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
3595 separate-debug-file commands.
3596 * symfile.h (separate_debug_file_debug): New global.
3597 * symfile.c (separate_debug_file_debug): New global.
3598 (separate_debug_file_exists, find_separate_debug_file): Add
3600 (_initialize_symfile): Add "set debug separate-debug-file"
3602 * build-id.c (build_id_to_debug_bfd,
3603 find_separate_debug_file_by_buildid): Add debug output.
3605 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3607 * gdbarch.sh (displaced_step_free_closure): Remove.
3608 * gdbarch.h, gdbarch.c: Re-generate.
3609 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
3610 displaced_step_free_closure.
3611 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
3612 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
3613 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3614 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
3615 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3616 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
3617 * arch-utils.h (simple_displaced_step_free_closure): Remove.
3618 * arch-utils.c (simple_displaced_step_free_closure): Remove.
3619 * infrun.c (displaced_step_clear): Call xfree instead of
3620 gdbarch_displaced_step_free_closure.
3622 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
3624 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
3627 2017-06-08 Alan Hayward <alan.hayward@arm.com>
3629 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
3630 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
3631 (mn10300_push_dummy_call): Likewise.
3633 2017-06-08 Alan Hayward <alan.hayward@arm.com>
3635 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
3637 2017-06-08 Alan Hayward <alan.hayward@arm.com>
3639 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
3641 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3643 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
3644 able to start inferiors using a shell.
3645 (New remote packets): Announce new packet "QStartupWithShell".
3646 * remote.c: Add PACKET_QStartupWithShell.
3647 (extended_remote_create_inferior): Handle new
3648 PACKET_QStartupWithShell.
3649 (remote_protocol_features) <QStartupWithShell>: New entry for
3650 PACKET_QStartupWithShell.
3651 (_initialize_remote): Call "add_packet_config_cmd" for
3654 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3655 Pedro Alves <palves@redhat.com>
3657 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
3658 and "nat/fork-inferior.h".
3659 * common/common-inferior.h: New file, with contents from
3661 * commom/common-utils.c: Include "common-utils.h".
3662 (stringify_argv): New function.
3663 * common/common-utils.h (stringify_argv): New prototype.
3664 * configure.nat: Add "fork-inferior.o" as a dependency for
3665 "*linux*", "fbsd*" and "nbsd*" hosts.
3666 * corefile.c (get_exec_file): Update comment.
3667 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
3668 instead of "startup_inferior".
3669 (darwin_create_inferior): Call "add_thread_silent" after
3671 * fork-child.c: Cleanup unnecessary includes.
3672 (SHELL_FILE): Move to "common/common-fork-child.c".
3673 (environ): Likewise.
3674 (exec_wrapper): Initialize.
3675 (get_exec_wrapper): New function.
3676 (breakup_args): Move to "common/common-fork-child.c"; rename to
3677 "breakup_args_for_exec".
3678 (escape_bang_in_quoted_argument): Move to
3679 "common/common-fork-child.c".
3680 (saved_ui): New variable.
3681 (prefork_hook): New function.
3682 (postfork_hook): Likewise.
3683 (postfork_child_hook): Likewise.
3684 (gdb_startup_inferior): Likewise.
3685 (fork_inferior): Move to "common/common-fork-child.c". Update
3686 function to support gdbserver.
3687 (startup_inferior): Likewise.
3688 * gdbcore.h (get_exec_file): Remove declaration.
3689 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
3690 instead of "startup_inferior". Call "add_thread_silent" after
3692 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
3693 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
3694 instead of "startup_inferior". Call "add_thread_silent" after
3696 * inferior.h: Include "common-inferior.h".
3697 (trace_start_error): Move to "common/common-utils.h".
3698 (trace_start_error_with_name): Likewise.
3699 (fork_inferior): Move prototype to "nat/fork-inferior.h".
3700 (startup_inferior): Likewise.
3701 (gdb_startup_inferior): New prototype.
3702 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
3703 * nat/fork-inferior.h: New file.
3704 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
3705 instead of "startup_inferior". Call "add_thread_silent" after
3707 * target.h (target_terminal_init): Move prototype to
3709 (target_terminal_inferior): Likewise.
3710 (target_terminal_ours): Likewise.
3711 * target/target.h (target_terminal_init): New prototype, moved
3713 (target_terminal_inferior): Likewise.
3714 (target_terminal_ours): Likewise.
3715 * utils.c (gdb_flush_out_err): New function.
3717 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3719 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
3720 * common/common-gdbthread.h: New file, with parts from
3722 * gdbthread.h: Include "common-gdbthread.h".
3723 (switch_to_thread): Moved to "common/common-gdbthread.h".
3725 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3727 * Makefile.in (SFILES): Add "common/job-control.c".
3728 (HFILES_NO_SRCDIR): Add "common/job-control.h".
3729 (COMMON_OBS): Add "job-control.o".
3730 * common/job-control.c: New file, with contents from
3732 * common/job-control.h: New file, with contents from "terminal.h".
3733 * fork-child.c: Include "job-control.h".
3734 * inflow.c: Include "job-control.h".
3735 (gdb_setpgid): Move to "common/common-inflow.c".
3736 (_initialize_inflow): Move setting of "job_control" to
3737 "handle_job_control".
3738 * terminal.h (job_control): Moved to "common/common-terminal.h".
3739 (gdb_setpgid): Likewise.
3740 * top.c: Include "job_control.h".
3741 * utils.c: Likewise.
3742 (job_control): Moved to "job-control.c".
3744 2017-06-07 Pedro Alves <palves@redhat.com>
3746 * Makefile.in (SFILES): Add gdb_regex.c.
3747 (COMMON_OBS): Add gdb_regex.o.
3748 * ada-lang.c (ada_add_standard_exceptions)
3749 (ada_add_exceptions_from_frame, name_matches_regex)
3750 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
3751 parameter type to compiled_regex. Adjust.
3752 (ada_exceptions_list): Use compiled_regex.
3753 * break-catch-throw.c (exception_catchpoint::pattern): Now a
3754 std::unique_ptr<compiled_regex>.
3755 (exception_catchpoint::~exception_catchpoint): Remove regfree
3757 (check_status_exception_catchpoint): Adjust to use compiled_regex.
3758 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
3759 * breakpoint.c (solib_catchpoint::compiled): Now a
3760 std::unique_ptr<compiled_regex>.
3761 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
3762 (check_status_catch_solib): Adjust to use compiled_regex.
3763 (add_solib_catchpoint): Adjust to use compiled_regex.
3764 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
3765 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
3766 compiled_regex reference. Adjust to use it.
3767 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
3768 declaration. Include "gdb_regex.h".
3769 (apropos_cmd): Change regex parameter to compiled_regex reference.
3770 * gdb_regex.c: New file.
3771 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
3773 (class compiled_regex): New.
3774 * linux-tdep.c: Include "common/gdb_optional.h".
3775 (struct mapping_regexes): New, factored out from
3776 mapping_is_anonymous_p, and adjusted to use compiled_regex.
3777 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
3778 gdb::optional and remove cleanups. Adjust to compiled_regex.
3779 * probe.c: Include "common/gdb_optional.h".
3780 (collect_probes): Use compiled_regex and gdb::optional and remove
3782 * skip.c: Include "common/gdb_optional.h".
3783 (skiplist_entry::compiled_function_regexp): Now a
3784 gdb::optional<compiled_regex>.
3785 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
3786 (free_skiplist_entry): Remove regfree call.
3787 (compile_skip_regexp, skip_rfunction_p): Adjust to use
3788 compiled_regex and gdb::optional.
3789 * symtab.c: Include "common/gdb_optional.h".
3790 (search_symbols): Use compiled_regex and gdb::optional.
3791 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
3792 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
3795 2017-06-07 Alan Hayward <alan.hayward@arm.com>
3797 * regcache.c (regcache::save): Avoid buffer use.
3798 (regcache::dump): Likewise.
3800 2017-06-07 Alan Hayward <alan.hayward@arm.com>
3802 * sh-tdep.c (sh_pseudo_register_read): Remove
3804 (sh_pseudo_register_write): Likewise.
3805 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
3806 (sh64_pseudo_register_write): Likewise
3808 2017-06-07 Alan Hayward <alan.hayward@arm.com>
3810 * aarch64-tdep.c (aarch64_store_return_value): Use
3812 (aarch64_pseudo_read_value): Likewise.
3813 (aarch64_pseudo_write): Likewise.
3815 2017-06-06 Yao Qi <yao.qi@linaro.org>
3817 * regformats/regdef.h (set_register_cache): Remove the
3820 2017-06-06 Alan Hayward <alan.hayward@arm.com>
3822 * frame.c (frame_unwind_register_signed): Use
3823 frame_unwind_register_value.
3825 2017-06-06 Pedro Alves <palves@redhat.com>
3827 PR breakpoints/21553
3828 * breakpoint.c (create_breakpoints_sal_default)
3829 (init_breakpoint_sal, create_breakpoint_sal): Use
3830 gdb::unique_xmalloc_ptr for string parameters.
3831 (create_breakpoint): Constify 'extra_string' and 'cond_string'
3832 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
3833 (base_breakpoint_create_breakpoints_sal)
3834 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
3835 (strace_marker_create_breakpoints_sal)
3836 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
3838 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
3839 gdb::unique_xmalloc_ptr for string parameters.
3840 (create_breakpoint): Constify 'extra_string' and 'cond_string'
3843 2017-06-06 Alan Hayward <alan.hayward@arm.com>
3845 * alpha-tdep.c (alpha_register_to_value): Use
3846 get_frame_register_value.
3847 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
3849 2017-06-06 Alan Hayward <alan.hayward@arm.com>
3851 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
3852 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
3853 (ia64_value_to_register): Likewise.
3854 (ia64_extract_return_value): Likewise.
3855 (ia64_store_return_value): Likewise.
3856 (ia64_push_dummy_call): Likewise.
3858 2017-06-04 Joel Brobecker <brobecker@adacore.com>
3862 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
3864 * x86-linux-nat.c (struct arch_lwp_info): Remove.
3866 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
3868 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
3870 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
3872 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
3874 * event-loop.c (poll_timers): Unallocate timer using delete
3877 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3879 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
3880 (struct breakpoint) <~breakpoint>: New.
3881 (struct watchpoint): Inherit from breakpoint.
3884 (struct tracepoint): Inherit from breakpoint.
3886 * breakpoint.c (longjmp_breakpoint_ops): Remove.
3887 (struct longjmp_breakpoint): Inherit from breakpoint.
3888 <~longjmp_breakpoint>: New.
3890 (new_breakpoint_from_type): Remove casts.
3891 (watchpoint_in_thread_scope): Remove reference to base field.
3892 (watchpoint_del_at_next_stop): Likewise.
3893 (update_watchpoint): Likewise.
3894 (watchpoint_check): Likewise.
3895 (bpstat_check_watchpoint): Likewise.
3896 (set_longjmp_breakpoint): Likewise.
3897 (struct fork_catchpoint): Inherit from breakpoint.
3899 (struct solib_catchpoint): Inherit from breakpoint.
3900 <~solib_catchpoint>: New.
3902 (dtor_catch_solib): Change to ...
3903 (solib_catchpoint::~solib_catchpoint): ... this.
3904 (breakpoint_hit_catch_solib): Remove reference to base field.
3905 (add_solib_catchpoint): Likewise.
3906 (create_fork_vfork_event_catchpoint): Likewise.
3907 (struct exec_catchpoint): Inherit from breakpoint.
3908 <~exec_catchpoint>: New.
3910 (dtor_catch_exec): Change to ...
3911 (exec_catchpoint::~exec_catchpoint): ... this.
3912 (dtor_watchpoint): Change to ...
3913 (watchpoint::~watchpoint): ... this.
3914 (watch_command_1): Remove reference to base field.
3915 (catch_exec_command_1): Likewise.
3916 (base_breakpoint_dtor): Change to ...
3917 (breakpoint::~breakpoint): ... this.
3918 (base_breakpoint_ops): Remove dtor field value.
3919 (longjmp_bkpt_dtor): Change to ...
3920 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
3921 (strace_marker_create_breakpoints_sal): Remove reference to base
3923 (delete_breakpoint): Don't manually call breakpoint destructor.
3924 (create_tracepoint_from_upload): Remove reference to base field.
3925 (trace_pass_set_count): Likewise.
3926 (initialize_breakpoint_ops): Don't initialize
3927 momentary_breakpoint_ops, don't set dtors.
3928 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
3929 <~ada_catchpoint>: New.
3931 (create_excep_cond_exprs): Remove reference to base field.
3932 (dtor_exception): Change to ...
3933 (ada_catchpoint::~ada_catchpoint): ... this.
3934 (dtor_catch_exception): Remove.
3935 (dtor_catch_exception_unhandled): Remove.
3936 (dtor_catch_assert): Remove.
3937 (create_ada_exception_catchpoint): Remove reference to base
3939 (initialize_ada_catchpoint_ops): Don't set dtors.
3940 * break-catch-sig.c (struct signal_catchpoint): Inherit from
3942 <~signal_catchpoint>: New.
3944 (signal_catchpoint_dtor): Change to ...
3945 (signal_catchpoint::~signal_catchpoint): ... this.
3946 (create_signal_catchpoint): Remove reference to base field.
3947 (initialize_signal_catchpoint_ops): Don't set dtor.
3948 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
3950 <~syscall_catchpoint>: New.
3952 (dtor_catch_syscall): Change to ...
3953 (syscall_catchpoint::~syscall_catchpoint): ... this.
3954 (create_syscall_event_catchpoint): Remove reference to base
3956 (initialize_syscall_catchpoint_ops): Don't set dtor.
3957 * break-catch-throw.c (struct exception_catchpoint): Inherit
3959 <~exception_catchpoint>: New.
3961 (dtor_exception_catchpoint): Change to ...
3962 (exception_catchpoint::~exception_catchpoint): ... this.
3963 (handle_gnu_v3_exceptions): Remove reference to base field.
3964 (initialize_throw_catchpoint_ops): Don't set dtor.
3965 * ctf.c (ctf_get_traceframe_address): Remove reference to base
3967 * remote.c (remote_get_tracepoint_status): Likewise.
3968 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
3969 * tracefile.c (tracefile_fetch_registers): Likewise.
3970 * tracepoint.c (actions_command): Likewise.
3971 (validate_actionline): Likewise.
3972 (tfind_1): Likewise.
3973 (get_traceframe_location): Likewise.
3974 (find_matching_tracepoint_location): Likewise.
3975 (parse_tracepoint_status): Likewise.
3976 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
3978 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3980 * breakpoint.c (struct longjmp_breakpoint): New struct.
3981 (is_tracepoint_type): Change return type to bool.
3982 (is_longjmp_type): New function.
3983 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
3984 (set_raw_breakpoint_without_location): Use
3985 new_breakpoint_from_type.
3986 (set_raw_breakpoint): Likewise.
3988 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3990 * breakpoint.c (new_breakpoint_from_type): New function.
3991 (create_breakpoint_sal): Use new_breakpoint_from_type and
3993 (create_breakpoint): Likewise.
3995 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
3997 * memattr.c (mem_info_command): Rename to ...
3998 (info_mem_command): ... this.
3999 (mem_enable_command): Rename to ...
4000 (enable_mem_command): ... this.
4001 (mem_disable_command): Rename to ...
4002 (disable_mem_command): ... this.
4003 (mem_delete_command): Rename to ...
4004 (delete_mem_command): ... this.
4005 (_initialize_mem): Adjust function names.
4007 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
4009 * btrace.c (handle_pt_insn_events): New.
4010 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
4011 STATUS. Split into this and ...
4012 (handle_pt_insn_event_flags): ... this.
4014 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
4016 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
4017 and struct pt_insn.resynced.
4018 * configure: Regenerated.
4019 * config.in: Regenerated.
4021 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4023 * btrace.c (ftrace_find_call_by_number): New function.
4024 (ftrace_new_function): Store objects, not pointers.
4025 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
4026 ftrace_new_gap, ftrace_update_function,
4027 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
4028 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
4029 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
4030 btrace_ends_with_single_insn, btrace_call_get): Account for
4031 btrace_thread_info::functions now storing objects.
4032 * btrace.h (struct btrace_thread_info): Add constructor.
4033 (struct btrace_thread_info) <functions>: Make std::vector.
4034 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
4035 Initialize with default values.
4036 * record-btrace.c (record_btrace_frame_sniffer): Account for
4037 btrace_thread_info::functions now storing objects.
4039 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4041 * btrace.c: Remove typedef bfun_s.
4042 (ftrace_new_gap): Directly add gaps to the list of gaps.
4043 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
4044 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
4045 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
4048 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4050 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
4051 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
4052 with btrace_thread_info::next_segment and
4053 btrace_thread_info::prev_segment.
4054 * btrace.h: Remove struct btrace_func_link.
4055 (struct btrace_function): Replace pair of function segment pointers
4056 with pair of indices.
4057 * python/py-record-btrace.c (btpy_call_prev_sibling,
4058 btpy_call_next_sibling): Replace references to
4059 btrace_thread_info::segment with btrace_thread_info::next_segment and
4060 btrace_thread_info::prev_segment.
4061 * record-btrace.c (record_btrace_frame_this_id): Use
4062 btrace_find_call_by_number.
4064 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4066 * btrace.c (ftrace_new_function, ftrace_fixup_level,
4067 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
4068 btrace_insn_next, btrace_insn_prev): Remove references to
4069 btrace_thread_info::flow.
4070 * btrace.h (struct btrace_function): Remove FLOW.
4072 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4074 * btrace.c (ftrace_find_call_by_number): New function.
4075 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
4076 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
4077 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
4078 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
4080 * btrace.h (struct btrace_function): Turn UP into an index.
4081 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
4083 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
4084 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
4085 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
4087 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4089 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
4090 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
4091 ftrace_update_function, ftrace_compute_global_level_offset,
4092 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
4093 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
4094 btrace_insn_end, btrace_is_empty): Remove references to
4095 btrace_thread_info::begin and btrace_thread_info::end.
4096 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
4097 (struct btrace_thread_info) <functions>: Adjust comment.
4098 * record-btrace.c (record_btrace_start_replaying): Remove reference to
4099 btrace_thread_info::begin.
4101 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4103 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
4104 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
4105 ftrace_update_function): Remove arguments that implicitly were always
4107 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
4108 Don't pass BTINFO->END.
4110 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4112 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
4113 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
4114 btrace_find_insn_by_number): Replace function segment pointer with
4116 (btrace_insn_cmp): Simplify.
4117 * btrace.h: (struct btrace_insn_iterator) Rename index to
4118 insn_index. Replace function segment pointer with index into function
4120 * record-btrace.c (record_btrace_call_history): Replace function
4121 segment pointer use with index.
4122 (record_btrace_frame_sniffer): Retrieve function call segment through
4124 (record_btrace_set_replay): Remove defunc't safety check.
4126 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4128 * btrace.c (btrace_ends_with_single_insn): New function.
4129 (btrace_call_get, btrace_call_number, btrace_call_begin,
4130 btrace_call_end, btrace_call_next, btrace_call_prev,
4131 btrace_find_call_by_number): Use index into call segment vector
4133 (btrace_call_cmp): Simplify.
4134 * btrace.h (struct btrace_call_iterator): Replace function call segment
4135 pointer with index into vector.
4136 * record-btrace.c (record_btrace_call_history): Use index instead of
4139 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4141 * btrace.c (btrace_insn_begin, btrace_insn_end,
4142 btrace_find_insn_by_number): Add btinfo to iterator.
4143 * btrace.h (struct btrace_insn_iterator): Add btinfo.
4145 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4147 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
4148 and save pointers directly.
4149 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
4150 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
4151 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
4152 changed signature of functions.
4153 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
4154 (btrace_fetch): Remove code that adds btrace_function pointers to
4155 vector of btrace_functions.
4156 (btrace_clear): Simplify freeing vector of btrace_functions.
4158 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4160 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
4161 Replace VEC_* with std::vector functions.
4162 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
4163 (struct btrace_thread_info)<functions>: Change type to std::vector.
4165 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
4167 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
4168 "Removed targets and native configurations" up. Merge duplicate
4169 "New commands" sub-sections. Add "New options" sub-sections.
4171 2017-05-26 Alan Hayward <alan.hayward@arm.com>
4173 * defs.h (copy_integer_to_size): New declaration.
4174 * findvar.c (copy_integer_to_size): New function.
4175 (do_cint_test): New selftest function.
4176 (copy_integer_to_size_test): Likewise.
4177 (_initialize_findvar): Likewise.
4178 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
4179 (mips_fbsd_collect_reg): Use raw_collect_integer.
4180 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
4181 (mips64_fill_gregset): Use raw_collect_integer
4182 (mips64_fill_fpregset): Use raw_supply_integer.
4183 * regcache.c (regcache::raw_supply_integer): New function.
4184 (regcache::raw_collect_integer): Likewise.
4185 * regcache.h: (regcache::raw_supply_integer): New declaration.
4186 (regcache::raw_collect_integer): Likewise.
4188 2017-05-24 Yao Qi <yao.qi@linaro.org>
4190 * Makefile.in (SFILES): Add gdbarch-selftests.c.
4191 (COMMON_OBS): Add gdbarch-selftests.o.
4192 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
4193 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
4194 * gdbarch-selftests.c: New file.
4195 * regcache.h (regcache) <~regcache>: Mark it virtual if
4197 <raw_write>: Likewise.
4199 2017-05-24 Yao Qi <yao.qi@linaro.org>
4201 * regcache.c (current_regcache): Change it to
4202 regcache::current_regcache.
4203 (regcache_observer_target_changed): Update.
4204 (regcache_thread_ptid_changed): Make it a regcache static
4206 (regcache_thread_ptid_changed): Update.
4207 (class regcache_access): New.
4208 (current_regcache_test): Update.
4209 (_initialize_regcache): Update.
4210 * regcache.h: Include forward_list.
4211 (regcache): Declare regcache_thread_ptid_changed and declare
4212 registers_changed_ptid as friend.
4214 2017-05-24 Yao Qi <yao.qi@linaro.org>
4216 * i387-tdep.c (i387_register_to_value): Use register_size
4217 instead of TYPE_LENGTH.
4218 * m68k-tdep.c (m68k_register_to_value): Likewise.
4220 2017-05-24 Yao Qi <yao.qi@linaro.org>
4222 * i387-tdep.c (i387_convert_register_p): Return false if type
4223 code isn't TYPE_CODE_FLT.
4225 2017-05-24 Yao Qi <yao.qi@linaro.org>
4227 * alpha-tdep.c (alpha_convert_register_p): Return true if type
4229 (alpha_register_to_value): Remove type length check.
4230 (alpha_value_to_register): Likewise.
4232 2017-05-24 Yao Qi <yao.qi@linaro.org>
4234 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
4237 2017-05-24 Yao Qi <yao.qi@linaro.org>
4239 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
4240 TYPE_CODE_FLT or not.
4242 2017-05-24 Yao Qi <yao.qi@linaro.org>
4244 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
4245 * avr-tdep.c (avr_gdbarch_init): Likewise.
4246 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
4247 * cris-tdep.c (cris_gdbarch_init): Likewise.
4248 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4249 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
4250 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4251 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
4252 * mep-tdep.c (mep_gdbarch_init): Likewise.
4253 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
4254 * mips-tdep.c (mips_gdbarch_init): Likewise.
4255 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
4256 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4257 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
4258 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
4259 * v850-tdep.c (v850_gdbarch_init): Likewise.
4261 2017-05-24 Yao Qi <yao.qi@linaro.org>
4263 * selftest-arch.c (tests_with_arch): Call registers_changed
4264 and reinit_frame_cache.
4265 * selftest.c (run_self_tests): Likewise.
4267 2017-05-24 Yao Qi <yao.qi@linaro.org>
4269 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
4270 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
4272 2017-05-24 Yao Qi <yao.qi@linaro.org>
4274 * rl78-tdep.c (rl78_gdbarch_init): Don't call
4275 set_gdbarch_print_insn.
4277 2017-05-24 Yao Qi <yao.qi@linaro.org>
4279 * h8300-tdep.c (h8300_gdbarch_init): Don't call
4280 set_gdbarch_print_insn.
4282 2017-05-24 Yao Qi <yao.qi@linaro.org>
4284 * alpha-tdep.c (alpha_gdbarch_init): Don't call
4285 set_gdbarch_print_insn.
4286 * arc-tdep.c (arc_gdbarch_init): Likewise.
4287 * arch-utils.c: include dis-asm.h.
4288 (default_print_insn): New function.
4289 * arch-utils.h (default_print_insn): Declare.
4290 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
4291 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
4292 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
4293 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
4294 * frv-tdep.c (frv_gdbarch_init): Likewise.
4295 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4296 * gdbarch.sh (print_insn): Use default_print_insn.
4297 * gdbarch.c: Regenerated.
4298 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
4299 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
4300 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
4301 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
4302 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4303 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
4304 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
4305 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
4306 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
4307 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
4308 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
4309 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4310 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
4311 * mt-tdep.c (mt_gdbarch_init): Likewise.
4312 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4313 * nios2-tdep.c (nios2_print_insn): Remove.
4314 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
4315 * rx-tdep.c (rx_gdbarch_init): Likewise.
4316 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
4317 * score-tdep.c (score_print_insn): Remove.
4318 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
4319 * sh-tdep.c (sh_gdbarch_init): Likewise.
4320 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
4321 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4322 * tic6x-tdep.c (tic6x_print_insn): Remove.
4323 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
4324 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
4325 * v850-tdep.c (v850_gdbarch_init): Likewise.
4326 * vax-tdep.c (vax_gdbarch_init): Likewise.
4327 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
4328 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
4330 2017-05-23 John Baldwin <jhb@FreeBSD.org>
4332 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
4333 (MIPS_FP0_REGNUM): Remove.
4334 (MIPS_FSR_REGNUM): Remove.
4335 (mips_fbsd_supply_fpregs): Use mips_regnum.
4336 (mips_fbsd_supply_gregs): Likewise.
4337 (mips_fbsd_collect_fpregs): Likewise.
4338 (mips_fbsd_collect_gregs): Likewise.
4340 2017-05-23 John Baldwin <jhb@FreeBSD.org>
4342 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
4343 (getpfpregs_supplies): New function.
4344 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
4346 (mips_fbsd_store_inferior_registers): Likewise.
4348 2017-05-22 Pedro Alves <palves@redhat.com>
4350 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
4353 2017-05-22 Alan Hayward <alan.hayward@arm.com>
4355 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
4356 (store_register): Likewise.
4357 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
4358 (get_decimal_float_return_value): Likewise.
4359 (do_ppc_sysv_return_value): Likewise.
4360 (ppc64_sysv_abi_push_integer): Likewise.
4361 (ppc64_sysv_abi_push_freg): Likewise.
4362 (ppc64_sysv_abi_return_value_base): Likewise.
4363 (ppc64_sysv_abi_return_value): Likewise.
4364 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
4365 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
4366 * rs6000-nat.c: Likewise.
4367 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
4368 (rs6000_value_to_register): Likewise.
4369 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
4371 2017-05-21 Tom Tromey <tom@tromey.com>
4374 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
4375 arrays as "[T]", not "[T; ]".
4377 2017-05-19 Tom Tromey <tom@tromey.com>
4380 * rust-lang.c (exp_descriptor_rust): New function.
4381 (rust_language_defn): Use it.
4382 * p-lang.c (pascal_language_defn): Update.
4383 * opencl-lang.c (opencl_language_defn): Update.
4384 * objc-lang.c (objc_language_defn): Update.
4385 * m2-lang.c (m2_language_defn): Update.
4386 * language.h (struct language_defn)
4387 <la_watch_location_expression>: New member.
4388 * language.c (unknown_language_defn, auto_language_defn)
4389 (local_language_defn): Update.
4390 * go-lang.c (go_language_defn): Update.
4391 * f-lang.c (f_language_defn): Update.
4392 * d-lang.c (d_language_defn): Update.
4393 * c-lang.h (c_watch_location_expression): Declare.
4394 * c-lang.c (c_watch_location_expression): New function.
4395 (c_language_defn, cplus_language_defn, asm_language_defn)
4396 (minimal_language_defn): Use it.
4397 * breakpoint.c (watch_command_1): Call
4398 la_watch_location_expression.
4399 * ada-lang.c (ada_language_defn): Update.
4401 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4404 * gdb_curses.h (NOMACROS): Define.
4405 (NCURSES_NOMACROS): Define.
4407 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4410 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
4412 * tui/tui-wingeneral.c (box_win): Likewise.
4413 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
4414 (tui_show_source_line): Likewise.
4415 (tui_show_exec_info_content): Likewise.
4417 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
4419 * sparc-tdep.c (sparc_structure_return_p)
4420 (sparc_arg_on_registers_p): New functions.
4421 (sparc32_store_arguments): Use them.
4422 * sparc64-tdep.c (sparc64_16_byte_align_p)
4423 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
4424 Handle TYPE_CODE_ARRAY.
4426 2017-05-17 Yao Qi <yao.qi@linaro.org>
4428 * cli/cli-decode.c (add_alias_cmd): New function.
4429 * command.h (add_alias_cmd): Declare.
4430 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
4431 instead call add_alias_cmd.
4433 2017-05-17 Pedro Alves <palves@redhat.com>
4435 * Makefile.in (nat_extra_makefile_frag): Rename to ...
4436 (nat_makefile_frag): ... this. All references updated.
4437 * configure.ac: Likewise.
4438 * configure.nat: Likewise. Enhance comments.
4439 * configure: Regenerate.
4441 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4443 * procfs.c (procfs_create_inferior): Change prototype to match
4446 2017-05-13 Eli Zaretskii <eliz@gnu.org>
4448 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
4449 C++ compiler warning.
4451 2017-05-12 Tom Tromey <tom@tromey.com>
4454 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
4455 recurse, just call value_struct_elt directly.
4457 2017-05-12 Tom Tromey <tom@tromey.com>
4459 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
4460 OP_RUST_ARRAY>: Fix.
4462 2017-05-12 Tom Tromey <tom@tromey.com>
4464 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
4466 2017-05-09 Yao Qi <yao.qi@linaro.org>
4468 * regcache.c: Include <forward_list>.
4469 (struct regcache_list): Remove.
4470 (current_regcache): Update.
4471 (get_thread_arch_aspace_regcache): Update for std::forward_list.
4472 (regcache_thread_ptid_changed): Likewise.
4473 (registers_changed_ptid): Likewise.
4474 (current_regcache_size): Likewise.
4476 2017-05-09 Yao Qi <yao.qi@linaro.org>
4478 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
4479 (current_regcache_size): New function.
4480 (current_regcache_test): New function.
4481 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
4483 2017-05-08 Alan Hayward <alan.hayward@arm.com>
4485 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
4486 (print_gp_register_row): Use get_frame_register_value.
4488 2017-05-08 Alan Hayward <alan.hayward@arm.com>
4490 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
4491 (mips_supply_fpregset): Likewise.
4492 (mips64_supply_gregset): Likewise.
4494 2017-05-08 Alan Hayward <alan.hayward@arm.com>
4496 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
4497 regcache->raw_supply_zeroed.
4499 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4501 * configure.nat: Rearrange 'case' statements to match
4504 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4506 * Makefile.in: Remove "@host_makefile_frag@". Add variables
4507 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
4508 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
4509 "@nat_extra_makefile_frag@".
4510 (Makefile): Remove dependency on "@frags@".
4511 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
4512 (data-directory/Makefile): Likewise.
4513 * config/aarch64/linux.mh: Deleted; moved contents to
4514 "gdb/configure.nat".
4515 * config/alpha/alpha-linux.mh: Likewise.
4516 * config/alpha/nbsd.mh: Likewise.
4517 * config/arm/linux.mh: Likewise.
4518 * config/arm/nbsdelf.mh: Likewise.
4519 * config/i386/cygwin.mh: Likewise.
4520 * config/i386/cygwin64.mh: Likewise.
4521 * config/i386/darwin.mh: Likewise.
4522 * config/i386/fbsd.mh: Likewise.
4523 * config/i386/fbsd64.mh: Likewise.
4524 * config/i386/go32.mh: Likewise.
4525 * config/i386/i386gnu.mh: Likewise.
4526 * config/i386/i386sol2.mh: Likewise.
4527 * config/i386/linux.mh: Likewise.
4528 * config/i386/linux64.mh: Likewise.
4529 * config/i386/mingw.mh: Likewise.
4530 * config/i386/mingw64.mh: Likewise.
4531 * config/i386/nbsd64.mh: Likewise.
4532 * config/i386/nbsdelf.mh: Likewise.
4533 * config/i386/nto.mh: Likewise.
4534 * config/i386/obsd.mh: Likewise.
4535 * config/i386/obsd64.mh: Likewise.
4536 * config/i386/sol2-64.mh: Likewise.
4537 * config/ia64/linux.mh: Likewise.
4538 * config/m32r/linux.mh: Likewise.
4539 * config/m68k/linux.mh: Likewise.
4540 * config/m68k/nbsdelf.mh: Likewise.
4541 * config/m68k/obsd.mh: Likewise.
4542 * config/m88k/obsd.mh: Likewise.
4543 * config/mips/fbsd.mh: Likewise.
4544 * config/mips/linux.mh: Likewise.
4545 * config/mips/nbsd.mh: Likewise.
4546 * config/mips/obsd64.mh: Likewise.
4547 * config/pa/linux.mh: Likewise.
4548 * config/pa/nbsd.mh: Likewise.
4549 * config/pa/obsd.mh: Likewise.
4550 * config/powerpc/aix.mh: Likewise.
4551 * config/powerpc/fbsd.mh: Likewise.
4552 * config/powerpc/linux.mh: Likewise.
4553 * config/powerpc/nbsd.mh: Likewise.
4554 * config/powerpc/obsd.mh: Likewise.
4555 * config/powerpc/ppc64-linux.mh: Likewise.
4556 * config/powerpc/spu-linux.mh: Likewise.
4557 * config/s390/linux.mh: Likewise.
4558 * config/sh/nbsd.mh: Likewise.
4559 * config/sparc/fbsd.mh: Likewise.
4560 * config/sparc/linux.mh: Likewise.
4561 * config/sparc/linux64.mh: Likewise.
4562 * config/sparc/nbsd64.mh: Likewise.
4563 * config/sparc/nbsdelf.mh: Likewise.
4564 * config/sparc/obsd64.mh: Likewise.
4565 * config/sparc/sol2.mh: Likewise.
4566 * config/tilegx/linux.mh: Likewise.
4567 * config/vax/nbsdelf.mh: Likewise.
4568 * config/vax/obsd.mh: Likewise.
4569 * config/xtensa/linux.mh: Likewise.
4570 * config/i386/i386gnu.mn: New file, with excerpts from
4571 "config/i386/i386gnu.mh".
4572 * configure: Regenerate.
4573 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
4574 *.mh files under "gdb/config".
4575 * configure.nat: New file, with contents from the
4576 "gdb/config/*/*.mh" files.
4578 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
4580 * btrace.c (btrace_clear): Free insn vector.
4582 2017-05-05 Pedro Alves <palves@redhat.com>
4584 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
4585 * configure: Regenerate.
4587 2017-05-04 Pedro Alves <palves@redhat.com>
4589 * Makefile.in (SFILES): Add progspace-and-thread.c.
4590 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
4591 (COMMON_OBS): Add progspace-and-thread.o.
4592 * breakpoint.c: Include "progspace-and-thread.h".
4593 (update_inserted_breakpoint_locations)
4594 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
4595 Use scoped_restore_current_pspace_and_thread.
4596 (create_std_terminate_master_breakpoint): Use
4597 scoped_restore_current_program_space.
4598 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
4599 (print_breakpoint_location): Use
4600 scoped_restore_current_program_space.
4601 (bp_loc_is_permanent): Use
4602 scoped_restore_current_pspace_and_thread.
4603 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
4604 (download_tracepoint_locations): Use
4605 scoped_restore_current_pspace_and_thread.
4606 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
4607 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
4608 (enum step_over_calls_kind): Moved from inferior.h.
4609 (class scoped_restore_current_thread): New class.
4610 * gdbthread.h (make_cleanup_restore_current_thread): Delete
4612 (scoped_restore_current_thread): New class.
4613 * infcmd.c: Include "common/gdb_optional.h".
4614 (continue_1, proceed_after_attach): Use
4615 scoped_restore_current_thread.
4616 (notice_new_inferior): Use scoped_restore_current_thread.
4617 * inferior.c: Include "progspace-and-thread.h".
4618 (restore_inferior, save_current_inferior): Delete.
4619 (add_inferior_command, clone_inferior_command): Use
4620 scoped_restore_current_pspace_and_thread.
4621 * inferior.h (scoped_restore_current_inferior): New class.
4622 * infrun.c: Include "progspace-and-thread.h" and
4623 "common/gdb_optional.h".
4624 (follow_fork_inferior): Use
4625 scoped_restore_current_pspace_and_thread.
4626 (scoped_restore_exited_inferior): New class.
4627 (handle_vfork_child_exec_or_exit): Use
4628 scoped_restore_exited_inferior,
4629 scoped_restore_current_pspace_and_thread,
4630 scoped_restore_current_thread and scoped_restore.
4631 (fetch_inferior_event): Use scoped_restore_current_thread.
4632 * linespec.c (decode_line_full, decode_line_1): Use
4633 scoped_restore_current_program_space.
4634 * mi/mi-main.c: Include "progspace-and-thread.h".
4635 (exec_continue): Use scoped_restore_current_thread.
4636 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
4637 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
4638 * proc-service.c (ps_pglobal_lookup): Use
4639 scoped_restore_current_program_space.
4640 * progspace-and-thread.c: New file.
4641 * progspace-and-thread.h: New file.
4642 * progspace.c (release_program_space, clone_program_space): Use
4643 scoped_restore_current_program_space.
4644 (restore_program_space, save_current_program_space)
4645 (save_current_space_and_thread): Delete.
4646 (switch_to_program_space_and_thread): Moved to
4647 progspace-and-thread.c.
4648 * progspace.h (save_current_program_space)
4649 (save_current_space_and_thread): Delete declarations.
4650 (scoped_restore_current_program_space): New class.
4651 * remote.c (remote_btrace_maybe_reopen): Use
4652 scoped_restore_current_thread.
4653 * symtab.c: Include "progspace-and-thread.h".
4654 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
4655 * thread.c (print_thread_info_1): Use
4656 scoped_restore_current_thread.
4657 (struct current_thread_cleanup): Delete.
4658 (do_restore_current_thread_cleanup)
4659 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
4660 (scoped_restore_current_thread::~scoped_restore_current_thread):
4662 (make_cleanup_restore_current_thread): Rename/convert to ...
4663 (scoped_restore_current_thread::scoped_restore_current_thread):
4665 (thread_apply_all_command): Use scoped_restore_current_thread.
4666 (thread_apply_command): Use scoped_restore_current_thread.
4667 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
4668 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
4670 2017-05-04 Pedro Alves <palves@redhat.com>
4672 * thread.c (make_cleanup_restore_current_thread): Move
4673 find_thread_ptid call before the is_stopped call. Assert that the
4674 thread is found. Replace is_stopped call by checking the thread's
4675 state directly. Remove unnecessary NULL-thread check.
4677 2017-05-04 Pedro Alves <palves@redhat.com>
4679 * corelow.c (thread_section_name): New class.
4680 (get_core_register_section, get_core_siginfo): Use it.
4682 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
4684 * corelow.c (sniff_core_bfd): Remove extra semicolon.
4685 (get_core_register_section): Remove xfree of NULL pointer.
4687 2017-05-03 Alan Hayward <alan.hayward@arm.com>
4689 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
4690 * regcache.c (regcache::raw_supply_zeroed): New function.
4691 * regcache.h (regcache::raw_supply_zeroed): New declaration.
4693 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
4695 * gdbarch.sh: Remove commented out definition of
4697 * gdbarch.h: Re-generate.
4699 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4701 * configure: Regenerate.
4703 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
4705 * solib-target.c (solib_target_relocate_section_addresses):
4706 Remove num_section_bases, num_bases, segment_bases variables.
4708 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4710 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
4712 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4714 * solib-target.c: Include <vector>
4715 (struct lm_info_target) <~lm_info_target>: Remove.
4716 <segment_bases, section_bases>: Change type to
4717 std::vector<CORE_ADDR>.
4718 (library_list_start_segment, library_list_start_section,
4719 library_list_end_library,
4720 solib_target_relocate_section_addresses): Adjust.
4722 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4724 * gdbarch.sh (software_single_step): Change return type to
4725 std::vector<CORE_ADDR>.
4726 * gdbarch.c, gdbarch.h: Re-generate.
4727 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
4729 (arm_deal_with_atomic_sequence_raw): Adjust.
4730 (thumb_get_next_pcs_raw): Adjust.
4731 (arm_get_next_pcs_raw): Adjust.
4732 (arm_get_next_pcs): Adjust.
4733 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
4734 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
4735 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
4736 (alpha_software_single_step): Adjust.
4737 * alpha-tdep.h (alpha_software_single_step): Adjust.
4738 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
4739 * arm-tdep.c (arm_software_single_step): Adjust.
4740 (arm_breakpoint_kind_from_current_state): Adjust.
4741 * arm-tdep.h (arm_software_single_step): Adjust.
4742 * breakpoint.c (insert_single_step_breakpoint): Adjust.
4743 * cris-tdep.c (cris_software_single_step): Adjust.
4744 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
4745 (micromips_deal_with_atomic_sequence): Adjust.
4746 (deal_with_atomic_sequence): Adjust.
4747 (mips_software_single_step): Adjust.
4748 * mips-tdep.h (mips_software_single_step): Adjust.
4749 * moxie-tdep.c (moxie_software_single_step): Adjust.
4750 * nios2-tdep.c (nios2_software_single_step): Adjust.
4751 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
4752 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
4753 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
4754 * s390-linux-tdep.c (s390_software_single_step): Adjust.
4755 * sparc-tdep.c (sparc_software_single_step): Adjust.
4756 * spu-tdep.c (spu_software_single_step): Adjust.
4757 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
4759 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4761 * gdbarch.sh: Use semi-colon as field separator instead of colon.
4762 * gdbarch.h: Re-generate.
4764 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4766 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
4767 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
4768 * python/py-instruction.c, python/py-instruction.h: New file.
4769 * python/py-record.c: Add py-instruction.h include.
4770 (gdbpy_initialize_record): Make gdb.Instruction a super class of
4771 gdb.RecordInstruction.
4772 * python/python-internal.h: Add gdbpy_initialize_instruction
4774 * python/python.c (do_start_initialization): Add
4775 gdbpy_initialize_instruction.
4777 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4779 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
4781 (btrace_func_from_recpy_func): New function.
4782 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
4783 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
4784 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
4785 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
4786 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
4787 Also, use new helper functions.
4788 (btpy_list_item): Use new helper functions.
4789 (recpy_bt_function_call_history): Use new type name.
4790 (btpy_call_getset): Remove.
4791 (gdbpy_initialize_btrace): Remove code to initialize
4792 gdb.BtraceFunctionCall.
4793 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
4794 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
4795 recpy_bt_func_prev, recpy_bt_func_next): New export.
4796 * python/py-record.c (recpy_func_type): New static object.
4797 (recpy_func_new, recpy_func_level, recpy_func_symbol,
4798 recpy_func_instructions, recpy_func_up, recpy_func_prev,
4799 recpy_func_next): New function.
4800 (recpy_element_hash, recpy_element_richcompare): Updated comment.
4801 (recpy_func_getset): New static object.
4802 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
4803 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
4805 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4807 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
4808 (btpy_object, btpy_insn_type, btpy_new): Remove.
4809 (btpy_list_object): Use gdb.RecordInstruction type instead of
4810 gdb.BtraceInstruction type.
4811 (btrace_insn_from_recpy_insn): New function.
4812 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
4814 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
4815 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
4816 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
4817 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
4818 instead of btpy_object.
4819 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4820 btpy_insn_data, btpy_insn_decode): Rename to ...
4821 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
4822 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
4823 recpy_bt_insn_decode): This. Also, use new helper functions.
4824 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
4826 (btpy_insn_getset): Remove.
4827 (gdbpy_initialize_btrace): Remove code to initialize
4828 gdb.BtraceInstruction. Use recpy_element_object.
4829 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
4830 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
4831 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
4832 * python/py-record.c (recpy_insn_type): New static object.
4833 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
4834 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
4835 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
4837 (recpy_insn_getset): New static object.
4838 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
4839 * python/py-record.h (recpy_element_object): New typedef.
4840 (recpy_insn_type, recpy_insn_new): New export.
4842 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4844 * py-record-btrace.c (btpy_insn_new): Removed.
4845 (btpy_insn_or_gap_new): New function.
4846 (btpy_insn_error): Removed.
4847 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4848 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
4849 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
4850 btpy_insn_or_gap_new instead of btpy_insn_new.
4851 (btpy_insn_getset): Remove btpy_insn_error.
4852 * py-record.c (recpy_gap_type): New static object.
4853 (recpy_gap_object): New typedef.
4854 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
4855 recpy_gap_reason_string): New function.
4856 (recpy_gap_getset): New static object.
4857 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
4858 * py-record.h (recpy_gap_new): New export.
4860 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4862 * python/py-record.c (recpy_ptid): Remove.
4863 (recpy_record_getset): Remove recpy_ptid.
4865 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4867 * btrace.c (btrace_fetch): Set inferior_ptid.
4868 * python/py-record-btrace.c: Add "py-record.h" include.
4869 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
4870 recpy_bt_end, recpy_bt_instruction_history,
4871 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
4872 in gdb.Record object instead of current ptid.
4873 * python/py-record.c: Include new "py-record.h" file.
4874 (recpy_record_object): Moved to py-record.h.
4875 * python/py-record.h: New file.
4877 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4879 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
4880 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
4883 2017-05-01 Joel Brobecker <brobecker@adacore.com>
4885 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
4886 the past maintainers section.
4888 2017-04-28 Yao Qi <yao.qi@linaro.org>
4890 * infcmd.c (get_return_value): Use regcache ctor, and remove
4893 2017-04-28 Yao Qi <yao.qi@linaro.org>
4894 Pedro Alves <palves@redhat.com>
4896 * regcache.c (regcache::regcache): New tag dispatch ctor.
4897 (do_cooked_read): Moved above.
4898 (regcache_dup): Use the tag dispatch ctor..
4899 * regcache.h (regcache): Declare ctor, delete copy ctor and
4900 assignment operator, remove friend regcache_dup.
4902 2017-04-28 Yao Qi <yao.qi@linaro.org>
4904 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
4905 call method save instead of regcache_cpy.
4906 * regcache.h (struct regcache): Make regcache_dup a friend.
4908 2017-04-28 Yao Qi <yao.qi@linaro.org>
4910 * regcache.c (struct regcache): Move to regcache.h
4911 (regcache::arch): New method.
4912 (regcache_get_ptid): Update.
4913 (get_regcache_arch): Call arch method.
4914 (get_regcache_aspace): Call method aspace.
4915 (register_buffer): Change it to method.
4916 (regcache_save): Change it to regcache::save.
4917 (regcache_restore): Likewise.
4918 (regcache_cpy_no_passthrough): Remove the declaration.
4919 (regcache_cpy): Call methods restore and cpy_no_passthrough.
4920 (regcache_cpy_no_passthrough): Change it to method
4922 (regcache_register_status): Change it to method
4923 get_register_status.
4924 (regcache_invalidate): Change it to method invalidate.
4925 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
4926 (regcache_raw_update): Change it to method raw_update.
4927 (regcache_raw_read): Likewise.
4928 (regcache_raw_read_signed): Likewise.
4929 (regcache_raw_read_unsigned): Likewise.
4930 (regcache_raw_write_signed): Likewise.
4931 (regcache_raw_write_unsigned): Likewise.
4932 (regcache_cooked_read): Likewise.
4933 (regcache_cooked_read_value): Likewise.
4934 (regcache_cooked_read_signed): Likewise.
4935 (regcache_cooked_read_unsigned): Likewise.
4936 (regcache_cooked_write_signed): Likewise.
4937 (regcache_cooked_write_unsigned): Likewise.
4938 (regcache_raw_set_cached_value): Likewise.
4939 (regcache_raw_write): Likewise.
4940 (regcache_cooked_write): Likewise.
4941 (regcache_xfer_part): Likewise.
4942 (regcache_raw_read_part): Likewise.
4943 (regcache_raw_write_part): Likewise.
4944 (regcache_cooked_read_part): Likewise.
4945 (regcache_cooked_write_part): Likewise.
4946 (regcache_raw_supply): Likewise.
4947 (regcache_raw_collect): Likewise.
4948 (regcache_transfer_regset): Likewise.
4949 (regcache_supply_regset): Likewise.
4950 (regcache_collect_regset): Likewise.
4951 (regcache_debug_print_register): Likewise.
4952 (enum regcache_dump_what): Move it to regcache.h.
4953 (regcache_dump): Change it to method dump.
4954 * regcache.h (enum regcache_dump_what): New.
4955 (class regcache): New.
4956 * target.c (target_fetch_registers): Call method
4957 debug_print_register.
4958 (target_store_registers): Likewise.
4960 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4962 * windows-nat.c (struct lm_info_windows): Initialize field.
4963 (windows_make_so): Allocate lm_info_windows with new.
4964 (windows_free_so): Free lm_info_windows with delete.
4966 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4968 * solib-darwin.c (struct lm_info_darwin): Initialize field.
4969 (darwin_current_sos): Allocate lm_info_darwin with new, remove
4971 (darwin_free_so): Free lm_info_darwin with delete.
4973 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4975 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
4976 <l_addr_p>: Change type to bool.
4977 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
4978 (svr4_free_so): Free lm_info_svr4 with delete.
4979 (svr4_copy_library_list): Replace memcpy with call to copy
4981 (library_list_start_library, svr4_default_sos): Allocate
4982 lm_info_svr4 with new.
4984 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4986 * solib-target.c (struct lm_info_target): Add destructor,
4988 <name>: Change type to std::string.
4989 (library_list_start_library): Allocate lm_info_target with new.
4990 (solib_target_free_library_list): Free lm_info_target with
4992 (solib_target_current_sos): Adapt to std::string.
4993 (solib_target_free_so): Free lm_info_target with delete.
4995 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4997 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
4999 (frv_current_sos): Allocate lm_info_frv with new.
5000 (frv_relocate_main_executable): Free lm_info_frv with delete,
5002 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
5004 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5006 * solib-frv.c (struct lm_info_frv): Fix indentation.
5008 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5010 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
5012 (dsbt_current_sos): Allocate lm_info_dsbt with new.
5013 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
5014 and allocate with new.
5015 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
5017 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5019 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
5020 <filename, member_name>: Change type to std::string.
5021 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
5022 (library_list_start_library): Allocate lm_info_aix with new.
5023 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
5024 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
5025 with copy constructor.
5027 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5029 * solist.h (struct lm_info): Remove.
5030 (struct lm_info_base): New class.
5031 (struct so_list) <lm_info>: Change type to lm_info_base *.
5032 * nto-tdep.c (struct lm_info): Remove.
5034 * solib-aix.c (struct lm_info): Rename to ...
5035 (struct lm_info_aix): ... this. Extend lm_info_base.
5036 (lm_info_p): Rename to ...
5037 (lm_info_aix_p): ... this, and adjust.
5038 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
5039 solib_aix_parse_libraries, library_list_start_library,
5040 solib_aix_free_library_list, solib_aix_parse_libraries,
5041 solib_aix_get_library_list,
5042 solib_aix_relocate_section_addresses, solib_aix_free_so,
5043 solib_aix_get_section_offsets,
5044 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
5046 (struct solib_aix_inferior_data) <library_list>: Adjust.
5047 * solib-darwin.c (struct lm_info): Rename to ...
5048 (struct lm_info_darwin): ... this. Extend lm_info_base.
5049 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
5050 * solib-dsbt.c (struct lm_info): Rename to ...
5051 (struct lm_info_dsbt): ... this. Extend lm_info_base.
5052 (struct dsbt_info) <main_executable_lm_info): Adjust.
5053 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
5054 dsbt_relocate_section_addresses): Adjust.
5055 * solib-frv.c (struct lm_info): Rename to ...
5056 (struct lm_info_frv): ... this. Extend lm_info_base.
5057 (main_executable_lm_info): Adjust.
5058 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
5059 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
5060 find_canonical_descriptor_in_load_object,
5061 frv_fdpic_find_canonical_descriptor): Adjust.
5062 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
5064 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
5065 svr4_clear_so, svr4_copy_library_list,
5066 library_list_start_library, svr4_default_sos, svr4_read_so_list,
5067 svr4_current_sos, svr4_fetch_objfile_link_map,
5068 solist_update_incremental): Adjust.
5069 * solib-svr4.h (struct lm_info_svr4): Move here from
5071 * solib-target.c (struct lm_info): Rename to ...
5072 (struct lm_info_target): ... this. Extend lm_info_base.
5073 (lm_info_p): Rename to ...
5074 (lm_info_target_p): ... this.
5075 (solib_target_parse_libraries, library_list_start_segment,
5076 library_list_start_section, library_list_start_library,
5077 library_list_end_library, solib_target_free_library_list,
5078 solib_target_current_sos, solib_target_free_so,
5079 solib_target_relocate_section_addresses): Adjust.
5080 * windows-nat.c (struct lm_info): Rename to ...
5081 (struct lm_info_windows): ... this. Extend lm_info_base.
5082 (windows_make_so, handle_load_dll, handle_unload_dll,
5083 windows_xfer_shared_libraries): Adjust.
5085 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5087 * solib-darwin.c (struct darwin_so_list): Remove.
5088 (darwin_current_sos): Allocate an so_list object instead of a
5089 darwin_so_list, separately allocate an lm_info object.
5090 (darwin_free_so): Free lm_info.
5092 2017-04-28 John Baldwin <jhb@FreeBSD.org>
5094 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
5095 with fprintf_filtered.
5097 2017-04-28 Yao Qi <yao.qi@linaro.org>
5099 * regcache.c (regcache::regcache): New function.
5100 (regcache::~regcache): New function.
5101 (regcache_xmalloc_1): Remove.
5102 (regcache_xmalloc): Call new regcache.
5103 (regcache_xfree): Call delete regcache.
5104 (get_thread_arch_aspace_regcache): Call new regcache.
5106 2017-04-28 Yao Qi <yao.qi@linaro.org>
5108 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
5109 lwp instead of ptid_get_lwp.
5111 2017-04-28 Yao Qi <yao.qi@linaro.org>
5113 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
5114 lwp_info instead of getting from inferior_ptid.
5116 2017-04-27 Keith Seitz <keiths@redhat.com>
5118 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
5119 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
5120 (CV_CONVERSION_BADNESS): Define.
5121 (rank_one_type): Remove overly restrictive rvalue reference
5123 Add cv-qualifier checks and subranks for type equality.
5124 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
5125 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
5126 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
5128 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
5130 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
5131 count when creating the object.
5133 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
5134 Ulrich Weigand <uweigand@de.ibm.com>
5136 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
5137 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
5139 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
5140 (process_xcoff_symbol): Likewise.
5141 (scan_xcoff_symtab): Likewise.
5143 2017-04-26 Alan Hayward <alan.hayward@arm.com>
5145 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
5146 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
5147 (ia64_access_reg): Use get_frame_register_unsigned.
5148 (ia64_access_rse_reg): Likewise.
5149 (ia64_libunwind_frame_prev_register): Likewise.
5151 2017-04-26 Jiong Wang <jiong.wang@arm.com>
5153 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
5154 * gdbarch.c: Regenerated.
5155 * gdbarch.h: Regenerated.
5156 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
5157 visibility external.
5158 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
5159 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
5160 (enum cfa_how_kind): Move to ...
5161 (struct dwarf2_frame_state_reg_info): Likewise.
5162 (struct dwarf2_frame_state): Likewise.
5163 * dwarf2-frame.h: ... here.
5164 (dwarf2_frame_state_alloc_regs): New declaration.
5165 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
5166 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
5168 2017-04-26 Alan Hayward <alan.hayward@arm.com>
5170 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
5171 regcache_raw_read_unsigned.
5172 (xtensa_pseudo_register_write): Likewise.
5174 2017-04-26 Alan Hayward <alan.hayward@arm.com>
5176 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
5177 (nds32_pseudo_register_write): Likewise.
5179 2017-04-25 Yao Qi <yao.qi@linaro.org>
5181 * regcache.c (struct regcache) <readonly_p>: Change its type
5183 (regcache_xmalloc_1): Update parameter type and callers update.
5185 2017-04-25 Yao Qi <yao.qi@linaro.org>
5187 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
5188 set_gdbarch_wchar_bit.
5189 * arm-tdep.c (arm_gdbarch_init): Likewise.
5191 2017-04-25 Pedro Alves <palves@redhat.com>
5193 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
5194 (BothAreRelocatable, memcopy, memmove): Don't define.
5195 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
5198 2017-04-25 Pedro Alves <palves@redhat.com>
5200 * common/common-defs.h: Include "common/poison.h".
5201 * common/function-view.h: (Not, Or, Requires): Move to traits.h
5203 * common/poison.h: New file.
5204 * common/traits.h: Include <type_traits>.
5205 (Not, Or, Requires): New, moved from common/function-view.h.
5207 2017-04-25 Pedro Alves <palves@redhat.com>
5209 * breakpoint.h (struct breakpoint): In-class initialize all
5210 fields. Make boolean fields "bool".
5211 * breakpoint.c (init_raw_breakpoint_without_location): Remove
5212 memset call and initializations no longer necessary.
5214 2017-04-25 Pedro Alves <palves@redhat.com>
5216 * btrace.c (pt_btrace_insn_flags): Change parameter type to
5218 (pt_btrace_insn): New function.
5219 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
5221 2017-04-25 Pedro Alves <palves@redhat.com>
5223 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
5224 "base" field and inherit from "bp_location" instead. Add
5226 (allocate_location_exception): Use new non-default ctor.
5227 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
5228 (init_bp_location): Convert to ...
5229 (bp_location::bp_location): ... this new ctor, and remove memset
5231 (base_breakpoint_allocate_location): Use the new non-default ctor.
5232 * breakpoint.h (bp_location): Now a class. Declare default and
5233 non-default ctors. In-class initialize all members.
5234 (init_bp_location): Remove declaration.
5236 2017-04-25 Pedro Alves <palves@redhat.com>
5238 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
5239 assignment operator.
5241 2017-04-24 Yao Qi <yao.qi@linaro.org>
5243 * doublest.c (convert_doublest_to_floatformat): Call
5244 floatformat_totalsize_bytes.
5246 2017-04-22 Tom Tromey <tom@tromey.com>
5248 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5250 * stack.c (print_frame): Use ui_out_emit_list.
5251 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
5253 * mi/mi-main.c (print_one_inferior)
5254 (mi_cmd_data_list_register_names)
5255 (mi_cmd_data_list_register_values, mi_cmd_list_features)
5256 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
5258 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
5259 (mi_output_solib_attribs): Use ui_out_emit_list,
5261 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
5262 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
5263 (mi_cmd_stack_list_args, list_args_or_locals): Use
5265 * disasm.c (do_assembly_only): Use ui_out_emit_list.
5266 * breakpoint.c (print_solib_event, output_thread_groups): Use
5269 2017-04-22 Tom Tromey <tom@tromey.com>
5271 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
5272 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
5273 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
5275 2017-04-22 Tom Tromey <tom@tromey.com>
5277 * tracepoint.c (tvariables_info_1)
5278 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
5280 2017-04-22 Tom Tromey <tom@tromey.com>
5282 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
5283 annotate_arg_emitter.
5284 * breakpoint.c (print_mention_watchpoint)
5285 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
5286 * annotate.h (struct annotate_arg_emitter): New.
5288 2017-04-22 Tom Tromey <tom@tromey.com>
5290 * record-btrace.c (record_btrace_insn_history)
5291 (record_btrace_insn_history_range, record_btrace_call_history)
5292 (record_btrace_call_history_range): Use ui_out_emit_tuple.
5293 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
5295 * stack.c (print_frame_info): Use ui_out_emit_tuple.
5296 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
5297 * skip.c (skip_info): Use ui_out_emit_tuple.
5298 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
5299 * progspace.c (print_program_space): Use ui_out_emit_tuple.
5300 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
5301 * osdata.c (info_osdata): Use ui_out_emit_tuple.
5302 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
5304 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
5305 (output_register, mi_cmd_data_read_memory)
5306 (mi_cmd_data_read_memory_bytes, mi_load_progress)
5307 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
5308 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
5309 Use ui_out_emit_tuple.
5310 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
5312 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
5313 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
5314 * linux-thread-db.c (info_auto_load_libthread_db): Use
5316 * inferior.c (print_inferior): Use ui_out_emit_tuple.
5317 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
5318 * disasm.c (do_mixed_source_and_assembly_deprecated)
5319 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
5320 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
5321 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
5322 * breakpoint.c (print_one_breakpoint_location)
5323 (print_one_breakpoint): Use ui_out_emit_tuple.
5324 * auto-load.c (print_script, info_auto_load_cmd): Use
5326 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
5328 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
5330 * thread.c (print_thread_info_1): Remove dead code.
5332 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5334 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
5336 * arm-tdep.c (selftests::arm_record_test): Likewise.
5338 2017-04-21 Yao Qi <yao.qi@linaro.org>
5340 * regcache.c (regcache_restore): Remove argument 2. Replace
5341 argument 3 with regcache. Get register status from
5342 src->register_status and get register contents from
5343 register_buffer (src, regnum).
5344 (regcache_cpy): Update.
5346 2017-04-19 Pedro Alves <palves@redhat.com>
5348 * gdbthread.h (thread): Add missing closing parenthesis in
5351 2017-04-19 Pedro Alves <palves@redhat.com>
5353 * common/refcounted-object.h: New file.
5354 * gdbthread.h: Include "common/refcounted-object.h".
5355 (thread_info): Inherit from refcounted_object and add comments.
5356 (thread_info::incref, thread_info::decref)
5357 (thread_info::m_refcount): Delete.
5358 (thread_info::deletable): Use the refcounted_object::refcount()
5360 * inferior.c (current_inferior_): Add comment.
5361 (set_current_inferior): Increment/decrement refcounts.
5362 (prune_inferiors, remove_inferior_command): Skip inferiors marked
5363 not-deletable instead of comparing with the current inferior.
5364 (initialize_inferiors): Increment the initial inferior's refcount.
5365 * inferior.h (struct inferior): Forward declare.
5366 Include "common/refcounted-object.h".
5367 (current_inferior, set_current_inferior): Move declaration to
5368 before struct inferior's definition, and fix comment.
5369 (inferior): Inherit from refcounted_object. Add comments.
5370 * thread.c (switch_to_thread_no_regs): Reference the thread's
5371 inferior pointer directly instead of doing a ptid lookup.
5372 (switch_to_no_thread): New function.
5373 (switch_to_thread(thread_info *)): New function, factored out
5375 (switch_to_thread(ptid_t)): ... this.
5376 (restore_current_thread): Delete.
5377 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
5378 fields, and add 'inf' field.
5379 (do_restore_current_thread_cleanup): Check whether old->inf is
5380 alive instead of looking up an inferior by ptid. Use
5381 switch_to_thread and switch_to_no_thread.
5382 (restore_current_thread_cleanup_dtor): Use old->inf directly
5383 instead of lookup up an inferior by id. Decref the inferior.
5384 Don't restore 'removable'.
5385 (make_cleanup_restore_current_thread): Same the inferior pointer
5386 in old, instead of the inferior number. Incref the inferior.
5387 Don't save/clear 'removable'.
5389 2017-04-19 Pedro Alves <palves@redhat.com>
5391 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5392 unittests/scoped_restore-selftests.c.
5393 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
5394 * common/scoped_restore.h (scoped_restore_base): Make "class".
5395 (scoped_restore_base::release): New public method.
5396 (scoped_restore_base::scoped_restore_base): New protected ctor.
5397 (scoped_restore_base::m_saved_var): New protected field.
5398 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
5399 scoped_restore_base base class instead of m_saved_var directly.
5400 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
5401 (scoped_restore_tmpl::scoped_restore_tmpl(const
5402 scoped_restore_tmpl<T>&)): Likewise.
5403 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
5405 (scoped_restore_tmpl::saved_var): New method.
5406 (scoped_restore_tmpl::m_saved_var): Delete.
5407 * inferior.h (inferior::detaching): Now a bool.
5408 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
5410 * unittests/scoped_restore-selftests.c: New file.
5412 2017-04-19 Pedro Alves <palves@redhat.com>
5414 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
5415 Re-sort in alphabetic order.
5417 2017-04-18 Pedro Alves <palves@redhat.com>
5419 * xml-support.c (obstack_xml_printf): Delete.
5420 * xml-support.h (obstack_xml_printf): Delete.
5422 2017-04-18 Pedro Alves <palves@redhat.com>
5424 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
5425 vdebug, verror, body_text, start_element, end_element, name,
5426 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
5427 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
5428 is_xinclude>: Make private and add m_ prefix.
5429 (gdb_xml_parser::body_text): New method, based on ...
5430 (gdb_xml_body_text): ... this. Adjust.
5431 (gdb_xml_parser::vdebug): New method, based on ...
5432 (gdb_xml_debug): ... this. Adjust.
5433 (gdb_xml_parser::verror): New method, based on ...
5434 (gdb_xml_error): ... this. Adjust.
5435 (gdb_xml_parser::start_element): New method, based on ...
5436 (gdb_xml_start_element): ... this. Adjust.
5437 (gdb_xml_start_element_wrapper): Defer to
5438 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
5439 (gdb_xml_parser::end_element): New method, based on ...
5440 (gdb_xml_end_element_wrapper): ... this. Adjust.
5441 (gdb_xml_parser::~gdb_xml_parser): Adjust.
5442 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
5443 (gdb_xml_parser::use_dtd): New method, based on ...
5444 (gdb_xml_use_dtd): ... this. Adjust.
5445 (gdb_xml_parser::parse): New method, based on ...
5446 (gdb_xml_parse): ... this. Adjust.
5447 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
5448 (xinclude_start_include): Adjust to call the parser's name method.
5449 (xml_xinclude_default, xml_xinclude_start_doctype)
5450 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
5452 (xml_process_xincludes): Adjust to call parser methods.
5453 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
5456 2017-04-18 Pedro Alves <palves@redhat.com>
5458 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
5459 gdb::optional<std::string>.
5460 * xml-support.c: Include <string>.
5461 (scope_level::scope_level(scope_level &&))
5462 (scope_level::~scope_level): Delete.
5463 (scope_level::body): Now a std::string.
5464 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
5465 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
5467 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
5468 (xinclude_parsing_data::output): Now a std::string reference.
5469 (xinclude_start_include): Adjust.
5470 (xml_xinclude_default): Adjust.
5471 (xml_process_xincludes): Add 'output' parameter, and return bool.
5472 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
5474 * xml-tdesc.c: Include <unordered_map> and <string>.
5475 (tdesc_xml_cache): Delete.
5476 (tdesc_xml_cache_s): Delete.
5477 (xml_cache): Now an std::unordered_map.
5478 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
5479 (target_fetch_description_xml): Change return type to
5480 gdb::optional<std::string>, and adjust.
5481 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
5482 (target_fetch_description_xml): Change return type to
5483 gdb::optional<std::string>.
5485 2017-04-18 Pedro Alves <palves@redhat.com>
5487 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5488 unittests/optional-selftests.c.
5489 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
5490 * unittests/optional-selftests.c: New file.
5491 * unittests/optional/assignment/1.cc: New file.
5492 * unittests/optional/assignment/2.cc: New file.
5493 * unittests/optional/assignment/3.cc: New file.
5494 * unittests/optional/assignment/4.cc: New file.
5495 * unittests/optional/assignment/5.cc: New file.
5496 * unittests/optional/assignment/6.cc: New file.
5497 * unittests/optional/assignment/7.cc: New file.
5498 * unittests/optional/cons/copy.cc: New file.
5499 * unittests/optional/cons/default.cc: New file.
5500 * unittests/optional/cons/move.cc: New file.
5501 * unittests/optional/cons/value.cc: New file.
5502 * unittests/optional/in_place.cc: New file.
5503 * unittests/optional/observers/1.cc: New file.
5504 * unittests/optional/observers/2.cc: New file.
5506 2017-04-18 Pedro Alves <palves@redhat.com>
5508 * common/gdb_optional.h: Include common/traits.h.
5509 (in_place_t): New type.
5510 (in_place): New constexpr variable.
5511 (optional::optional): Remove member initialization of
5513 (optional::optional(in_place_t...)): New constructor.
5514 (optional::~optional): Use reset.
5515 (optional::optional(const optional&)): New.
5516 (optional::optional(const optional&&)): New.
5517 (optional::optional(T &)): New.
5518 (optional::optional(T &&)): New.
5519 (operator::operator=(const optional &)): New.
5520 (operator::operator=(optional &&)): New.
5521 (operator::operator= (const T &))
5522 (operator::operator= (T &&))
5523 (operator::emplace (Args &&... args)): Return a T&. Use reset.
5524 (operator::reset): New.
5525 (operator::m_instantiated):: Add in-class initializer.
5526 * common/traits.h: Include <type_traits>.
5527 (struct And): New types.
5529 2017-04-18 Pedro Alves <palves@redhat.com>
5531 * xml-support.c: Include <vector>.
5532 (scope_level::scope_level(const gdb_xml_element *))
5533 (scope_level::scope_level(scope_level&&)): New.
5534 (scope_level::~scope_level): New.
5535 (scope_level_s): Delete.
5536 (gdb_xml_parser::scopes): Now a std::vector.
5537 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
5539 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
5541 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
5542 of the scopes member. Use std::vector::emplace_back.
5544 2017-04-18 Pedro Alves <palves@redhat.com>
5546 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
5548 (gdb_xml_end_element): Change type of first parameter.
5549 (gdb_xml_cleanup): Rename to ...
5550 (gdb_xml_parser::~gdb_xml_parser): ... this.
5551 (gdb_xml_create_parser_and_cleanup): Delete with ...
5552 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
5554 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
5555 using gdb_xml_create_parser_and_cleanup.
5556 (xinclude_parsing_data): Add ctor/dtor.
5557 (xml_xinclude_cleanup): Delete.
5558 (xml_process_xincludes): Create a local xinclude_parsing_data
5559 instead of heap-allocating one. Create a local gdb_xml_parser
5560 instead of heap-allocating one with
5561 gdb_xml_create_parser_and_cleanup.
5563 2017-04-18 John Baldwin <jhb@FreeBSD.org>
5566 * fbsd-nat.c (resume_one_thread_cb): Remove.
5567 (resume_all_threads_cb): Remove.
5568 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
5569 iterate_over_threads.
5571 2017-04-17 Joel Brobecker <brobecker@adacore.com>
5573 * NEWS: Create a new section for the next release branch.
5574 Rename the section of the current branch, now that it has
5577 2017-04-17 Joel Brobecker <brobecker@adacore.com>
5579 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
5580 * version.in: Bump version to 8.0.50.DATE-git.
5582 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
5585 * windows-nat.c (windows_create_inferior): Declare 'allargs'
5586 independently of the host, and fix build breakage on Cygwin.
5588 2017-04-13 Pedro Alves <palves@redhat.com>
5590 * inferior.c (free_inferior): Convert to ...
5591 (inferior::~inferior): ... this dtor.
5592 (inferior::inferior): New ctor, factored out from ...
5593 (add_inferior_silent): ... here. Allocate the inferior with a new
5595 (delete_inferior): Call delete instead of free_inferior.
5596 * inferior.h (gdb_environ, continuation): Forward declare.
5597 (inferior): Now a class. Add in-class initialization to all
5598 members. Make boolean fields bool, except 'detaching'.
5599 (inferior::inferior): New explicit ctor.
5600 (inferior::~inferior): New.
5602 2017-04-13 Pedro Alves <palves@redhat.com>
5604 * inferior.c (init_inferior_list): Delete.
5605 * inferior.h (init_inferior_list): Delete.
5607 2017-04-13 Pedro Alves <palves@redhat.com>
5610 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
5611 (top level): Call it twice, with different thread sets.
5613 2017-04-13 Pedro Alves <palves@redhat.com>
5615 * thread.c: Include <algorithm>.
5616 (thread_array_cleanup): Delete.
5617 (scoped_inc_dec_ref): New class.
5618 (live_threads_count): New function.
5619 (set_thread_refcount): Delete.
5620 (tp_array_compar_ascending): Now a bool.
5621 (tp_array_compar): Convert to a std::sort comparison function.
5622 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
5623 and live_threads_count.
5625 2017-04-13 Pedro Alves <palves@redhat.com>
5627 * infrun.c (follow_fork_inferior): Also switch the current
5630 2017-04-13 Pedro Alves <palves@redhat.com>
5632 * breakpoint.c (watch_command_1): Save watchpoint-frame info
5633 before calling create_internal_breakpoint.
5635 2017-04-13 Pedro Alves <palves@redhat.com>
5637 * fork-child.c (execv_argv): New class.
5638 (breakup_args): Refactored as ...
5639 (execv_argv::init_for_no_shell): .. this method of execv_argv.
5640 Copy arguments to storage and replace separators with NULL
5641 terminators in place.
5642 (escape_bang_in_quoted_argument): Adjust to return bool.
5643 (execv_argv::execv_argv): New ctor.
5644 (execv_argv::init_for_shell): New method, factored out from
5645 fork_inferior. Don't strdup strings into the vector.
5646 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
5647 Remove free_vector_argv call.
5649 2017-04-13 Yao Qi <yao.qi@linaro.org>
5651 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
5654 2017-04-13 Yao Qi <yao.qi@linaro.org>
5656 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
5657 * rx-tdep.c (rx_gdbarch_init): Likewise.
5659 2017-04-13 Pedro Alves <palves@redhat.com>
5661 * breakpoint.h (struct breakpoint): Reindent.
5663 2017-04-13 Pedro Alves <palves@redhat.com>
5665 * breakpoint.c (bp_location): Rename to ...
5666 (bp_locations): ... this. All references updated.
5667 (bp_location_count): Rename to ...
5668 (bp_locations_count): ... this. All references updated.
5669 (bp_location_placed_address_before_address_max): Rename to ...
5670 (bp_locations_placed_address_before_address_max): ... this. All
5672 (bp_location_shadow_len_after_address_max): Rename to ...
5673 (bp_locations_shadow_len_after_address_max): ... this. All
5675 (bp_location_compare_addrs): Rename to ...
5676 (bp_locations_compare_addrs): ... this. All references updated.
5677 (bp_location_compare):Rename to ...
5678 (bp_locations_compare): ... this. All references updated.
5679 (bp_location_target_extensions_update): Rename to ...
5680 (bp_locations_target_extensions_update): ... this. All references
5683 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5685 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
5686 * common/common.m4: Check headers 'termios.h', 'termio.h' and
5688 * common/gdb_termios.h: New file, with parts of "terminal.h".
5689 * inflow.c: Include "gdb_termios.h".
5690 * ser-unix.c: Include "gdb_termios.h".
5691 * terminal.h: Move terminal-related defines to
5692 "common/gdb_termios.h".
5694 2017-04-12 Tom Tromey <tom@tromey.com>
5696 * probe.c (parse_probes): Update.
5697 * location.h (delete_event_location): Don't declare.
5698 (event_location_deleter::operator()): Update.
5699 * location.c (event_location_deleter::operator()): Rename from
5700 delete_event_location.
5701 * linespec.h (linespec_result) <location>: Change type to
5703 * linespec.c (canonicalize_linespec, event_location_to_sals)
5704 (decode_objc): Update.
5705 (linespec_result): Don't call delete_event_location.
5706 * breakpoint.c (create_breakpoints_sal)
5707 (bkpt_probe_create_sals_from_location)
5708 (strace_marker_create_sals_from_location): Update.
5710 2017-04-12 Tom Tromey <tom@tromey.com>
5712 * linespec.h (struct linespec_result): Add constructor and
5714 (init_linespec_result, destroy_linespec_result)
5715 (make_cleanup_destroy_linespec_result): Don't declare.
5716 * linespec.c (init_linespec_result): Remove.
5717 (linespec_result::~linespec_result): Rename from
5718 destroy_linespec_result. Update.
5719 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
5721 * breakpoint.c (create_breakpoint, break_range_command)
5722 (decode_location_default): Update.
5723 * ax-gdb.c (agent_command_1): Update.
5725 2017-04-12 Tom Tromey <tom@tromey.com>
5727 * remote.c (remote_download_tracepoint): Update.
5728 * python/py-breakpoint.c (bppy_get_location): Update.
5729 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
5730 (gdbscm_breakpoint_location): Update.
5731 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
5732 * breakpoint.h (struct breakpoint) <location, location_range_end>:
5733 Change type to event_location_up.
5734 * breakpoint.c (create_overlay_event_breakpoint)
5735 (create_longjmp_master_breakpoint)
5736 (create_std_terminate_master_breakpoint)
5737 (create_exception_master_breakpoint)
5738 (breakpoint_event_location_empty_p, print_breakpoint_location)
5739 (print_one_breakpoint_location, create_thread_event_breakpoint)
5740 (init_breakpoint_sal, create_breakpoint)
5741 (print_recreate_ranged_breakpoint, break_range_command)
5742 (init_ada_exception_breakpoint, say_where): Update.
5743 (base_breakpoint_dtor): Don't call delete_event_location.
5744 (bkpt_print_recreate, tracepoint_print_recreate)
5745 (dprintf_print_recreate, update_static_tracepoint)
5746 (breakpoint_re_set_default): Update.
5748 2017-04-12 Tom Tromey <tom@tromey.com>
5750 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
5751 type of "to_do". Update.
5752 (compute_stack_depth): Use std::vector.
5754 2017-04-12 Tom Tromey <tom@tromey.com>
5756 * printcmd.c (find_instruction_backward): Use std::vector.
5758 2017-04-12 Tom Tromey <tom@tromey.com>
5760 * symfile.c (objfilep): Remove typedef.
5761 (reread_symbols): Use a std::vector.
5763 2017-04-12 Tom Tromey <tom@tromey.com>
5765 * mi/mi-main.c (exec_direction_forward): Remove.
5766 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
5767 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5769 * guile/guile.c (guile_repl_command, guile_command)
5770 (gdbscm_execute_gdb_command): Use scoped_restore.
5771 * go-exp.y (go_parse): Use scoped_restore.
5772 * d-exp.y (d_parse): Use scoped_restore.
5773 * cli/cli-decode.c (cmd_func): Use scoped_restore.
5774 * c-exp.y (c_parse): Use scoped_restore.
5776 2017-04-12 Tom Tromey <tom@tromey.com>
5778 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
5779 (mi_parse): Update return type.
5780 (mi_parse_free): Remove.
5781 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
5782 (mi_parse::~mi_parse): Rename from mi_parse_free.
5783 (mi_parse_cleanup): Remove.
5784 (mi_parse): Return a unique_ptr. Use new.
5785 * mi/mi-main.c (mi_execute_command): Update.
5787 2017-04-12 Tom Tromey <tom@tromey.com>
5789 * location.c (explicit_location_lex_one): Return a
5791 (string_to_explicit_location): Update. Remove cleanups.
5793 2017-04-12 Tom Tromey <tom@tromey.com>
5795 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
5796 (compare_value_and_voffset): Change type. Update.
5797 (compute_vtable_size): Change type of "offset_vec".
5798 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
5799 (gnuv3_get_typeid): Remove extraneous declaration.
5801 2017-04-12 Tom Tromey <tom@tromey.com>
5803 * charset.h (wchar_iterator): Fix comment.
5805 2017-04-12 Tom Tromey <tom@tromey.com>
5807 * charset.c (iconv_wrapper): New class.
5808 (cleanup_iconv): Remove.
5809 (convert_between_encodings): Use it.
5811 2017-04-12 Tom Tromey <tom@tromey.com>
5813 * symfile.h (increment_reading_symtab): Update type.
5814 * symfile.c (decrement_reading_symtab): Remove.
5815 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
5816 * psymtab.c (psymtab_to_symtab): Update.
5817 * dwarf2read.c (dw2_instantiate_symtab): Update.
5819 2017-04-12 Tom Tromey <tom@tromey.com>
5821 * jit.c (struct jit_reader): Declare separately. Add constructor
5822 and destructor. Change type of "handle".
5823 (loaded_jit_reader): Define separately.
5824 (jit_reader_load): Update. New "new".
5825 (jit_reader_unload_command): Use "delete".
5826 * gdb-dlfcn.h (struct dlclose_deleter): New.
5827 (gdb_dlhandle_up): New typedef.
5828 (gdb_dlopen, gdb_dlsym): Update types.
5829 (gdb_dlclose): Remove.
5830 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
5831 (gdb_dlsym): Change type of "handle".
5832 (make_cleanup_dlclose): Remove.
5833 (dlclose_deleter::operator()): Rename from gdb_dlclose.
5834 * compile/compile-c-support.c (load_libcc): Update.
5836 2017-04-12 Tom Tromey <tom@tromey.com>
5838 * symtab.h (find_pcs_for_symtab_line): Change return type.
5839 * symtab.c (find_pcs_for_symtab_line): Change return type.
5840 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
5841 type of "vec". Update.
5842 (ltpy_get_pcs_for_line): Update.
5843 * linespec.c (decode_digits_ordinary): Update.
5845 2017-04-12 Tom Tromey <tom@tromey.com>
5847 * tracepoint.c (actions_command): Update.
5848 * python/python.c (python_command, python_interactive_command):
5850 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5851 * guile/guile.c (guile_command): Update.
5852 * defs.h (read_command_lines, read_command_lines_1): Return
5854 (command_lines_deleter): New struct.
5855 (command_line_up): New typedef.
5856 * compile/compile.c (compile_code_command)
5857 (compile_print_command): Update.
5858 * cli/cli-script.h (get_command_line, copy_command_lines): Return
5860 (make_cleanup_free_command_lines): Remove.
5861 * cli/cli-script.c (get_command_line, read_command_lines_1)
5862 (copy_command_lines): Return command_line_up.
5863 (while_command, if_command, read_command_lines, define_command)
5864 (document_command): Update.
5865 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
5867 * breakpoint.h (breakpoint_set_commands): Change type of
5869 * breakpoint.c (breakpoint_set_commands): Change type of
5871 (do_map_commands_command, update_dprintf_command_list)
5872 (create_tracepoint_from_upload): Update.
5874 2017-04-12 Tom Tromey <tom@tromey.com>
5876 * tracepoint.c (scope_info): Update.
5877 * spu-tdep.c (spu_catch_start): Update.
5878 * python/python.c (gdbpy_decode_line): Update.
5879 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
5880 * python/py-breakpoint.c (bppy_init): Update.
5881 * probe.c (parse_probes): Update.
5882 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
5883 * location.h (event_location_deleter): New struct.
5884 (event_location_up): New typedef.
5885 (new_linespec_location, new_address_location, new_probe_location)
5886 (new_explicit_location, copy_event_location)
5887 (string_to_event_location, string_to_event_location_basic)
5888 (string_to_explicit_location): Update return type.
5889 (make_cleanup_delete_event_location): Remove.
5890 * location.c (new_linespec_location, new_address_location)
5891 (new_probe_location, new_explicit_location, copy_event_location):
5892 Return event_location_up.
5893 (delete_event_location_cleanup)
5894 (make_cleanup_delete_event_location): Remove.
5895 (string_to_explicit_location, string_to_event_location_basic)
5896 (string_to_event_location): Return event_location_up.
5897 * linespec.c (canonicalize_linespec, event_location_to_sals)
5898 (decode_line_with_current_source)
5899 (decode_line_with_last_displayed, decode_objc): Update.
5900 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
5901 * completer.c (location_completer): Update.
5902 * cli/cli-cmds.c (edit_command, list_command): Update.
5903 * breakpoint.c (create_overlay_event_breakpoint)
5904 (create_longjmp_master_breakpoint)
5905 (create_std_terminate_master_breakpoint)
5906 (create_exception_master_breakpoint)
5907 (create_thread_event_breakpoint): Update.
5908 (init_breakpoint_sal): Update. Remove some dead code.
5909 (create_breakpoint_sal): Change type of "location". Update.
5910 (create_breakpoints_sal, create_breakpoint, break_command_1)
5911 (dprintf_command, break_range_command, until_break_command)
5912 (init_ada_exception_breakpoint)
5913 (strace_marker_create_sals_from_location)
5914 (update_static_tracepoint, trace_command, ftrace_command)
5915 (strace_command, create_tracepoint_from_upload): Update.
5916 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5917 * ax-gdb.c (agent_command_1): Update.
5919 2017-04-12 Pedro Alves <palves@redhat.com>
5921 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
5922 * configure.tgt: Handle i[34567]86-*-go32* and
5923 i[34567]86-*-msdosdjgpp*.
5924 * i386-tdep.c (i386_svr4_reg_to_regnum):
5926 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
5928 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
5929 * i386-go32-tdep.c: New file.
5930 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
5933 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
5935 * aix-thread.c (pd_status2str): Change return type to const char *.
5937 2017-04-12 Pedro Alves <palves@redhat.com>
5939 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
5940 calls to set_gdbarch_gnu_triplet_regexp.
5942 2017-04-12 Pedro Alves <palves@redhat.com>
5945 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
5947 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
5948 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
5949 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
5950 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
5951 * gdbarch.h, gdbarch.c: Regenerate.
5952 * aarch64-tdep.c (aarch64_gdbarch_init): Override
5953 gdbarch_wchar_bit and gdbarch_wchar_signed.
5954 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
5955 * arm-tdep.c (arm_gdbarch_init): Likewise.
5956 * avr-tdep.c (avr_gdbarch_init): Likewise.
5957 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
5958 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
5959 * i386-tdep.c (i386_go32_init_abi): Likewise.
5960 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5961 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5962 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5963 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5964 * sh-tdep.c (sh_gdbarch_init): Likewise.
5965 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5966 * sparc64-tdep.c (sparc64_init_abi): Likewise.
5967 * windows-tdep.c (windows_init_abi): Likewise.
5968 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5970 2017-04-12 Pedro Alves <palves@redhat.com>
5973 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
5974 cplus_primitive_type_char32_t>: New enum values.
5975 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
5976 and cplus_primitive_type_char32_t.
5977 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
5978 32, use the archtecture's built-in type for char16_t and char32_t,
5979 respectively. Otherwise, fallback to init_integer_type as before,
5980 but make the type unsigned, and issue a complaint.
5981 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
5983 2017-04-12 Alan Hayward <alan.hayward@arm.com>
5985 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
5986 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
5988 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5990 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
5993 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5995 * common/common-utils.c (free_vector_argv): New function.
5996 * common/common-utils.h: Include <vector>.
5997 (free_vector_argv): New prototype.
5998 * darwin-nat.c (darwin_create_inferior): Rewrite function
5999 prototype in order to constify "exec_file" and accept a
6000 "std::string" for "allargs".
6001 * fork-child.c: Include <vector>.
6002 (breakup_args): Rewrite function, using C++.
6003 (fork_inferior): Rewrite function header, constify "exec_file_arg"
6004 and accept "std::string" for "allargs". Update the code to
6005 calculate "argv" based on "allargs". Update calls to "exec_fun"
6007 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
6008 order to constify "exec_file" and accept a "std::string" for
6010 * go32-nat.c (go32_create_inferior): Likewise.
6011 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
6012 * infcmd.c (run_command_1): Constify "exec_file". Use
6013 "std::string" for inferior arguments.
6014 * inferior.h (fork_inferior): Update prototype.
6015 * linux-nat.c (linux_nat_create_inferior): Rewrite function
6016 prototype in order to constify "exec_file" and accept a
6017 "std::string" for "allargs".
6018 * nto-procfs.c (procfs_create_inferior): Likewise.
6019 * procfs.c (procfs_create_inferior): Likewise.
6020 * remote-sim.c (gdbsim_create_inferior): Likewise.
6021 * remote.c (extended_remote_run): Update code to accept
6022 "std::string" as argument.
6023 (extended_remote_create_inferior): Rewrite function prototype in
6024 order to constify "exec_file" and accept a "std::string" for
6026 * rs6000-nat.c (super_create_inferior): Likewise.
6027 (rs6000_create_inferior): Likewise.
6028 * target.h (struct target_ops) <to_create_inferior>: Likewise.
6029 * windows-nat.c (windows_create_inferior): Likewise.
6031 2017-04-11 Pedro Alves <palves@redhat.com>
6033 * thread.c: Fix whitespace throughout.
6035 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
6037 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
6039 2017-04-11 Alan Hayward <alan.hayward@arm.com>
6041 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
6043 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
6046 * osdata.c (info_osdata): Check if 'type' is an empty string
6049 2017-04-10 Pedro Alves <palves@redhat.com>
6051 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
6052 (ptid_to_global_thread_id, in_thread_list)
6053 (do_captured_list_thread_ids, set_resumed, set_running)
6054 (set_executing, set_stop_requested, finish_thread_state)
6055 (validate_registers_access, can_access_registers_ptid)
6056 (print_thread_info_1, switch_to_thread)
6057 (do_restore_current_thread_cleanup)
6058 (make_cleanup_restore_current_thread, thread_command)
6059 (thread_name_command): Use operator== instead of ptid_equal.
6061 2017-04-10 Pedro Alves <palves@redhat.com>
6063 * thread.c (struct current_thread_cleanup) <next>: Delete field.
6064 (current_thread_cleanup_chain): Delete.
6065 (restore_current_thread_cleanup_dtor)
6066 (make_cleanup_restore_current_thread): Remove references to
6067 current_thread_cleanup_chain.
6069 2017-04-10 Alan Hayward <alan.hayward@arm.com>
6071 * msp430-tdep.c (msp430_pseudo_register_read): Never return
6074 2017-04-10 Yao Qi <yao.qi@linaro.org>
6077 * gdbthread.h (thread_info::deletable): New method.
6078 (thread_info::incref): New method.
6079 (thread_info::decref): New method.
6080 (thread_info::refcount): Move it to private.
6081 * infrun.c (save_stop_context): Call inc_refcount.
6082 (release_stop_context_cleanup): Likewise.
6083 * thread.c (set_thread_exited): New function.
6084 (init_thread_list): Delete "tp" only it is deletable, otherwise
6085 call set_thread_exited.
6086 (delete_thread_1): Call set_thread_exited.
6087 (current_thread_cleanup) <inferior_pid>: Remove.
6088 <thread>: New field.
6089 (restore_current_thread_ptid_changed): Removed.
6090 (do_restore_current_thread_cleanup): Adjust.
6091 (restore_current_thread_cleanup_dtor): Don't call
6093 (set_thread_refcount): Use dec_refcount.
6094 (make_cleanup_restore_current_thread): Adjust.
6095 (thread_apply_all_command): Call inc_refcount.
6096 (_initialize_thread): Don't call
6097 observer_attach_thread_ptid_changed.
6099 2017-04-10 Yao Qi <yao.qi@linaro.org>
6101 * thread.c (delete_thread_1): Hoist code on marking thread as
6104 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6106 * windows-nat.c (windows_detach): Initialize ptid with
6109 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
6111 * unittests/ptid-selftests.c: Fix erroneous assert messages.
6113 2017-04-07 Alan Hayward <alan.hayward@arm.com>
6115 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
6116 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
6117 (bfin_pseudo_register_write): Likewise
6119 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
6121 * common/ptid.h (struct ptid): Change to...
6122 (class ptid_t): ... this.
6123 <ptid_t>: New constructors.
6124 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
6125 matches>: New methods.
6126 <make_null, make_minus_one>: New static methods.
6133 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
6134 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
6135 as references, move comment to class ptid_t.
6136 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
6137 ptid_t static methods.
6138 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
6139 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
6140 Take ptid arguments as references, implement using ptid_t methods.
6141 * unittests/ptid-selftests.c: New file.
6142 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6143 unittests/ptid-selftests.c.
6144 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
6146 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
6148 * python/python.c (python_run_simple_file): Cast mode literal to
6149 non-const char pointer as expected by PyFile_FromString.
6151 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
6153 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
6154 minus_one_ptid and null_ptid.
6156 2017-04-05 Pedro Alves <palves@redhat.com>
6158 * warning.m4 (build_warnings): Remove -Wno-write-strings.
6159 * configure: Regenerate.
6161 2017-04-05 Pedro Alves <palves@redhat.com>
6163 * ada-exp.y (yyerror): Constify.
6164 * ada-lang.c (bound_name, get_selections)
6165 (ada_variant_discrim_type)
6166 (ada_variant_discrim_name, ada_value_struct_elt)
6167 (ada_lookup_struct_elt_type, is_unchecked_variant)
6168 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
6169 (catch_ada_exception_command_split)
6170 (catch_ada_assert_command_split, catch_assert_command)
6171 (ada_op_name): Constify.
6172 * ada-lang.h (ada_yyerror, get_selections)
6173 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
6174 * arc-tdep.c (arc_print_frame_cache): Constify.
6175 * arm-tdep.c (arm_skip_stub): Constify.
6176 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
6177 (gen_aggregate_elt_ref): Constify.
6178 * bcache.c (print_bcache_statistics): Constify.
6179 * bcache.h (print_bcache_statistics): Constify.
6180 * break-catch-throw.c (catch_exception_command_1):
6181 * breakpoint.c (struct ep_type_description::description):
6183 (add_solib_catchpoint): Constify.
6184 (catch_fork_command_1): Add cast.
6185 (add_catch_command): Constify.
6186 * breakpoint.h (add_catch_command, add_solib_catchpoint):
6188 * bsd-uthread.c (bsd_uthread_state): Constify.
6189 * buildsym.c (patch_subfile_names): Constify.
6190 * buildsym.h (next_symbol_text_func, patch_subfile_names):
6192 * c-exp.y (yyerror): Constify.
6193 (token::oper): Constify.
6194 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
6195 * c-varobj.c (cplus_describe_child): Constify.
6196 * charset.c (find_charset_names): Add cast.
6197 (find_charset_names): Constify array and add const_cast.
6198 * cli/cli-cmds.c (complete_command, cd_command): Constify.
6199 (edit_command): Constify.
6200 * cli/cli-decode.c (lookup_cmd): Constify.
6201 * cli/cli-dump.c (dump_memory_command, dump_value_command):
6203 (struct dump_context): Constify.
6204 (add_dump_command, restore_command): Constify.
6205 * cli/cli-script.c (get_command_line): Constify.
6206 * cli/cli-script.h (get_command_line): Constify.
6207 * cli/cli-utils.c (check_for_argument): Constify.
6208 * cli/cli-utils.h (check_for_argument): Constify.
6209 * coff-pe-read.c (struct read_pe_section_data): Constify.
6210 * command.h (lookup_cmd): Constify.
6211 * common/print-utils.c (decimal2str): Constify.
6212 * completer.c (gdb_print_filename): Constify.
6213 * corefile.c (set_gnutarget): Constify.
6214 * cp-name-parser.y (yyerror): Constify.
6215 * cp-valprint.c (cp_print_class_member): Constify.
6216 * cris-tdep.c (cris_register_name, crisv32_register_name):
6218 * d-exp.y (yyerror): Constify.
6219 (struct token::oper): Constify.
6220 * d-lang.h (d_yyerror): Constify.
6221 * dbxread.c (struct header_file_location::name): Constify.
6222 (add_old_header_file, add_new_header_file, last_function_name)
6223 (dbx_next_symbol_text, add_bincl_to_list)
6224 (find_corresponding_bincl_psymtab, set_namestring)
6225 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
6226 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
6227 * defs.h (command_line_input, print_address_symbolic)
6228 (deprecated_readline_begin_hook): Constify.
6229 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
6231 * event-top.c (handle_line_of_input): Constify and add cast.
6232 * exceptions.c (catch_errors): Constify.
6233 * exceptions.h (catch_errors): Constify.
6234 * expprint.c (print_subexp_standard, op_string, op_name)
6235 (op_name_standard, dump_raw_expression, dump_raw_expression):
6236 * expression.h (op_name, op_string, dump_raw_expression):
6238 * f-exp.y (yyerror): Constify.
6239 (struct token::oper): Constify.
6240 (struct f77_boolean_val::name): Constify.
6241 * f-lang.c (f_word_break_characters): Constify.
6242 * f-lang.h (f_yyerror): Constify.
6243 * fork-child.c (fork_inferior): Add cast.
6244 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
6245 (new_variant): Constify.
6246 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
6247 * gdbarch.c: Regenerate.
6248 * gdbcore.h (set_gnutarget): Constify.
6249 * go-exp.y (yyerror): Constify.
6250 (token::oper): Constify.
6251 * go-lang.h (go_yyerror): Constify.
6252 * go32-nat.c (go32_sysinfo): Constify.
6253 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
6254 * guile/scm-cmd.c (cmdscm_function): Constify.
6255 * guile/scm-param.c (pascm_param_value): Constify.
6256 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
6257 (h8300sx_register_name): Constify.
6258 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
6260 * ia64-tdep.c (ia64_register_names): Constify.
6261 * infcmd.c (construct_inferior_arguments): Constify.
6262 (path_command, attach_post_wait): Constify.
6263 * language.c (show_range_command, show_case_command)
6264 (unk_lang_error): Constify.
6265 * language.h (language_defn::la_error)
6266 (language_defn::la_name_of_this): Constify.
6267 * linespec.c (decode_line_2): Constify.
6268 * linux-thread-db.c (thread_db_err_str): Constify.
6269 * lm32-tdep.c (lm32_register_name): Constify.
6270 * m2-exp.y (yyerror): Constify.
6271 * m2-lang.h (m2_yyerror): Constify.
6272 * m32r-tdep.c (m32r_register_names): Constify and make static.
6273 * m68hc11-tdep.c (m68hc11_register_names): Constify.
6274 * m88k-tdep.c (m88k_register_name): Constify.
6275 * macroexp.c (appendmem): Constify.
6276 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
6277 (upgrade_type, parse_external, parse_partial_symbols)
6278 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
6279 (new_symbol): Constify.
6280 * memattr.c (mem_info_command): Constify.
6281 * mep-tdep.c (register_name_from_keyword): Constify.
6282 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
6284 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
6285 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
6286 * mi/mi-main.c (captured_mi_execute_command): Constify and add
6288 (mi_execute_async_cli_command): Constify.
6289 * mips-tdep.c (mips_register_name): Constify.
6290 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
6291 (am33_register_name, am33_2_register_name)
6292 * moxie-tdep.c (moxie_register_names): Constify.
6293 * nat/linux-osdata.c (osdata_type): Constify fields.
6294 * nto-tdep.c (nto_parse_redirection): Constify.
6295 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
6296 (lookup_child_selector): Constify.
6297 (objc_methcall::name): Constify.
6298 * objc-lang.h (lookup_objc_class, lookup_child_selector)
6299 (lookup_struct_typedef): Constify.
6300 * objfiles.c (pc_in_section): Constify.
6301 * objfiles.h (pc_in_section): Constify.
6302 * p-exp.y (struct token::oper): Constify.
6303 (yyerror): Constify.
6304 * p-lang.h (pascal_yyerror): Constify.
6305 * parser-defs.h (op_name_standard): Constify.
6306 (op_print::string): Constify.
6307 (exp_descriptor::op_name): Constify.
6308 * printcmd.c (print_address_symbolic): Constify.
6309 * psymtab.c (print_partial_symbols): Constify.
6310 * python/py-breakpoint.c (stop_func): Constify.
6311 (bppy_get_expression): Constify.
6312 * python/py-cmd.c (cmdpy_completer::name): Constify.
6313 (cmdpy_function): Constify.
6314 * python/py-event.c (evpy_add_attribute)
6315 (gdbpy_initialize_event_generic): Constify.
6316 * python/py-event.h (evpy_add_attribute)
6317 (gdbpy_initialize_event_generic): Constify.
6318 * python/py-evts.c (add_new_registry): Constify.
6319 * python/py-finishbreakpoint.c (outofscope_func): Constify.
6320 * python/py-framefilter.c (get_py_iter_from_func): Constify.
6321 * python/py-inferior.c (get_buffer): Add cast.
6322 * python/py-param.c (parm_constant::name): Constify.
6323 * python/py-unwind.c (fprint_frame_id): Constify.
6324 * python/python.c (gdbpy_parameter_value): Constify.
6325 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
6326 * remote.c (memory_packet_config::name): Constify.
6327 (show_packet_config_cmd, remote_write_bytes)
6328 (remote_buffer_add_string):
6329 * reverse.c (exec_reverse_once): Constify.
6330 * rs6000-tdep.c (variant::name, variant::description): Constify.
6331 * rust-exp.y (rustyyerror): Constify.
6332 * rust-lang.c (rust_op_name): Constify.
6333 * rust-lang.h (rustyyerror): Constify.
6334 * serial.h (serial_ops::name): Constify.
6335 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
6336 (sh_sh3e_register_name, sh_sh2e_register_name)
6337 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
6338 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
6339 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
6340 (sh_sh4al_dsp_register_name): Constify.
6341 * sh64-tdep.c (sh64_register_name): Constify.
6342 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
6343 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
6344 * stabsread.c (patch_block_stabs, read_type_number)
6345 (ref_map::stabs, ref_add, process_reference)
6346 (symbol_reference_defined, define_symbol, define_symbol)
6347 (error_type, read_type, read_member_functions, read_cpp_abbrev)
6348 (read_one_struct_field, read_struct_fields, read_baseclasses)
6349 (read_tilde_fields, read_struct_type, read_array_type)
6350 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
6351 (read_huge_number, read_range_type, read_args, common_block_start)
6352 (find_name_end): Constify.
6353 * stabsread.h (common_block_start, define_symbol)
6354 (process_one_symbol, symbol_reference_defined, ref_add):
6355 * symfile.c (get_section_index, add_symbol_file_command):
6356 * symfile.h (get_section_index): Constify.
6357 * target-descriptions.c (tdesc_type::name): Constify.
6358 (tdesc_free_type): Add cast.
6359 * target.c (find_default_run_target):
6360 (add_deprecated_target_alias, find_default_run_target)
6361 (target_announce_detach): Constify.
6362 (do_option): Constify.
6363 * target.h (add_deprecated_target_alias): Constify.
6364 * thread.c (print_thread_info_1): Constify.
6365 * top.c (deprecated_readline_begin_hook, command_line_input):
6367 (init_main): Add casts.
6368 * top.h (handle_line_of_input): Constify.
6369 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
6370 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
6371 (tfind_command): Rename to ...
6372 (tfind_command_1): ... this and constify.
6373 (tfind_command): New function.
6374 (tfind_end_command, tfind_start_command): Adjust.
6375 (encode_source_string): Constify.
6376 * tracepoint.h (encode_source_string): Constify.
6377 * tui/tui-data.c (tui_partial_win_by_name): Constify.
6378 * tui/tui-data.h (tui_partial_win_by_name): Constify.
6379 * tui/tui-source.c (tui_set_source_content_nil): Constify.
6380 * tui/tui-source.h (tui_set_source_content_nil): Constify.
6381 * tui/tui-win.c (parse_scrolling_args): Constify.
6382 * tui/tui-windata.c (tui_erase_data_content): Constify.
6383 * tui/tui-windata.h (tui_erase_data_content): Constify.
6384 * tui/tui-winsource.c (tui_erase_source_content): Constify.
6385 * tui/tui.c (tui_enable): Add cast.
6386 * utils.c (defaulted_query): Constify.
6387 (init_page_info): Add cast.
6388 (puts_debug, subset_compare): Constify.
6389 * utils.h (subset_compare): Constify.
6390 * varobj.c (varobj_format_string): Constify.
6391 * varobj.h (varobj_format_string): Constify.
6392 * vax-tdep.c (vax_register_name): Constify.
6393 * windows-nat.c (windows_detach): Constify.
6394 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
6395 * xml-support.c (gdb_xml_end_element): Constify.
6396 * xml-tdesc.c (tdesc_start_reg): Constify.
6397 * xstormy16-tdep.c (xstormy16_register_name): Constify.
6398 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
6399 * xtensa-tdep.h (xtensa_register_t::name): Constify.
6401 2017-04-05 Pedro Alves <palves@redhat.com>
6403 * proc-api.c (struct trans): Constify.
6404 (procfs_note): Constify.
6405 * proc-events.c (struct trans, syscall_table):
6406 * proc-flags.c (struct trans): Constify.
6407 * proc-utils.h (procfs_note): Constify.
6408 * proc-why.c (struct trans): Constify.
6409 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
6410 (procfs_detach): Constify.
6411 * sol-thread.c (struct string_map): Constify.
6412 (td_err_string, td_state_string): Constify.
6414 2017-04-05 Pedro Alves <palves@redhat.com>
6416 * proc-api.c (procfs_filename): Don't initialize
6418 (prepare_to_trace): Assume procfs_filename is non-NULL.
6419 (_initialize_proc_api): Give procfs_filename a default value here.
6421 2017-04-05 Pedro Alves <palves@redhat.com>
6423 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
6424 'cond_string' parameter.
6425 (extract_exception_regexp): Constify 'string' parameter.
6426 (catch_exception_command_1): Constify.
6427 * breakpoint.c (init_catchpoint)
6428 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
6430 (ep_parse_optional_if_clause, catch_fork_command_1)
6431 (catch_exec_command_1): Constify.
6432 * breakpoint.h (init_catchpoint): Constify 'cond_string'
6434 (ep_parse_optional_if_clause): Constify.
6435 * cli/cli-utils.c (remove_trailing_whitespace)
6436 (check_for_argument): Constify.
6437 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
6439 (check_for_argument): Likewise.
6441 2017-04-05 Pedro Alves <palves@redhat.com>
6443 * event-top.c (command_line_handler): Add cast to execute_command
6445 * record-btrace.c (cmd_record_btrace_bts_start)
6446 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
6447 (cmd_record_btrace_start): Add cast to execute_command call.
6448 * record-full.c (record_full_goto_insn):
6449 * record.c (record_start, record_stop): Add cast to
6450 execute_command_to_string calls.
6451 (cmd_record_start): Add cast to execute_command calls.
6453 2017-04-05 Pedro Alves <palves@redhat.com>
6455 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
6456 static inline function.
6457 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
6458 array and use gdb_PyArg_ParseTupleAndKeywords.
6459 * python/py-cmd.c (cmdpy_init): Likewise.
6460 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
6461 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
6462 (infpy_search_memory): Likewise.
6463 * python/py-objfile.c (objfpy_add_separate_debug_file)
6464 (gdbpy_lookup_objfile): Likewise.
6465 * python/py-symbol.c (gdbpy_lookup_symbol)
6466 (gdbpy_lookup_global_symbol): Likewise.
6467 * python/py-type.c (gdbpy_lookup_type): Likewise.
6468 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
6469 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
6472 2017-04-05 Pedro Alves <palves@redhat.com>
6474 * python/python-internal.h (gdb_PyGetSetDef): New type.
6475 * python/py-block.c (block_object_getset)
6476 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
6477 * python/py-event.c (event_object_getset)
6478 (finish_breakpoint_object_getset): Likewise.
6479 * python/py-inferior.c (inferior_object_getset): Likewise.
6480 * python/py-infthread.c (thread_object_getset): Likewise.
6481 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
6482 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
6483 * python/py-objfile.c (objfile_getset): Likewise.
6484 * python/py-progspace.c (pspace_getset): Likewise.
6485 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
6487 * python/py-record.c (recpy_record_getset): Likewise.
6488 * python/py-symbol.c (symbol_object_getset): Likewise.
6489 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
6491 * python/py-type.c (type_object_getset, field_object_getset):
6493 * python/py-value.c (value_object_getset): Likewise.
6495 2017-04-05 Pedro Alves <palves@redhat.com>
6497 * python/python-internal.h (gdb_PyObject_CallMethod)
6498 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
6500 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
6501 (PySys_GetObject, PySys_SetPath): New macros.
6503 2017-04-05 Pedro Alves <palves@redhat.com>
6505 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
6506 info_osdata_command.
6507 * osdata.c (info_osdata_command): Rename to ...
6508 (info_osdata): ... this. Constify 'type' parameter, and remove
6509 the 'from_tty' parameter. Accept NULL TYPE.
6510 (info_osdata_command): New function.
6511 * osdata.h (info_osdata_command): Remove declaration.
6512 (info_osdata): New declaration.
6514 2017-04-05 Pedro Alves <palves@redhat.com>
6516 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
6517 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
6518 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
6520 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
6521 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
6522 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
6524 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
6525 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
6526 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
6527 (mi_cmd_file_list_exec_source_files)
6528 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
6529 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6530 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
6532 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
6533 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
6534 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
6535 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
6536 (mi_cmd_stack_info_frame): Constify 'command' parameter.
6537 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
6538 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
6539 'command' parameter.
6540 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
6541 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
6542 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
6543 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
6544 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
6545 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
6546 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
6547 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
6548 (mi_cmd_var_set_update_range): Constify 'command' parameter.
6549 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
6550 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
6552 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
6553 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
6554 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
6555 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
6556 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
6557 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
6558 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
6559 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
6560 (mi_cmd_data_list_changed_registers)
6561 (mi_cmd_data_write_register_values)
6562 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
6563 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
6564 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
6565 (mi_cmd_list_features, mi_cmd_list_target_features)
6566 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
6567 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
6568 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
6569 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
6570 (mi_cmd_trace_frame_collected): Constify 'command'
6572 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
6573 'command' parameter.
6575 2017-04-05 Pedro Alves <palves@redhat.com>
6577 * ada-lang.c (ada_completer_word_break_characters): Now a const
6579 (ada_get_gdb_completer_word_break_characters): Constify.
6580 * completer.c (gdb_completer_command_word_break_characters)
6581 (gdb_completer_file_name_break_characters)
6582 (gdb_completer_quote_characters): Now const arrays.
6583 (get_gdb_completer_quote_characters): Constify.
6584 (set_rl_completer_word_break_characters): New function.
6585 (set_gdb_completion_word_break_characters)
6586 (complete_line_internal): Use it.
6587 * completer.h (get_gdb_completer_quote_characters): Constify.
6588 (set_rl_completer_word_break_characters): Declare.
6589 * f-lang.c (f_word_break_characters): Constify.
6590 * language.c (default_word_break_characters): Constify.
6591 * language.h (language_defn::la_word_break_characters): Constify.
6592 (default_word_break_characters): Constify.
6593 * top.c (init_main): Use set_rl_completer_word_break_characters.
6595 2017-04-05 Pedro Alves <palves@redhat.com>
6597 * aix-thread.c (aix_thread_pid_to_str)
6598 (aix_thread_extra_thread_info): Constify.
6599 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
6600 * bsd-uthread.c (bsd_uthread_extra_thread_info)
6601 (bsd_uthread_pid_to_str): Constify.
6602 * corelow.c (core_pid_to_str): Constify.
6603 * darwin-nat.c (darwin_pid_to_str): Constify.
6604 * fbsd-nat.c (fbsd_pid_to_str): Constify.
6605 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
6607 * gnu-nat.c (gnu_pid_to_str): Constify.
6608 * go32-nat.c (go32_pid_to_str): Constify.
6609 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
6610 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
6611 * inferior.c (inferior_pid_to_str): Constify.
6612 * linux-nat.c (linux_nat_pid_to_str): Constify.
6613 * linux-tdep.c (linux_core_pid_to_str): Constify.
6614 * linux-thread-db.c (thread_db_pid_to_str)
6615 (thread_db_extra_thread_info): Constify.
6616 * nto-tdep.c (nto_extra_thread_info): Constify.
6617 * nto-tdep.h (nto_extra_thread_info): Constify.
6618 * obsd-nat.c (obsd_pid_to_str): Constify.
6619 * procfs.c (procfs_pid_to_str): Constify.
6620 * ravenscar-thread.c (ravenscar_extra_thread_info)
6621 (ravenscar_pid_to_str): Constify.
6622 * remote-sim.c (gdbsim_pid_to_str): Constify.
6623 * remote.c (remote_threads_extra_info, remote_pid_to_str):
6625 * sol-thread.c (solaris_pid_to_str): Constify.
6626 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
6627 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
6628 * target.c (default_pid_to_str, target_pid_to_str)
6629 (normal_pid_to_str, default_pid_to_str): Constify.
6630 * target.h (target_ops::to_pid_to_str)
6631 (target_ops::to_extra_thread_info): Constify.
6632 (target_pid_to_str, normal_pid_to_str): Constify.
6633 * windows-nat.c (windows_pid_to_str): Constify.
6634 * gdbarch.sh (core_pid_to_str): Constify.
6635 * target-delegates.c: Regenerate.
6636 * gdbarch.h, gdbarch.c: Regenerate.
6638 2017-04-05 Pedro Alves <palves@redhat.com>
6640 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
6641 the memory of the temporary warning_pre_print override.
6642 * utils.c (warning_pre_print): Constify.
6643 * utils.h (warning_pre_print): Constify.
6645 2017-04-05 Pedro Alves <palves@redhat.com>
6647 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
6648 (shell_command): New function.
6649 (make_command): Use std::string.
6650 (init_cli_cmds): Register shell_command instead of shell_escape.
6652 2017-04-05 Pedro Alves <palves@redhat.com>
6654 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
6655 * tracepoint.c (default_collect): Don't initialize.
6657 2017-04-05 Pedro Alves <palves@redhat.com>
6659 * macroexp.c (macro_buffer::shared): Now a bool.
6660 (init_buffer): Update.
6661 (init_shared_buffer): Constify 'addr' parameter.
6662 (substitute_args, expand, macro_expand, macro_expand_next): Remove
6665 2017-04-05 Pedro Alves <palves@redhat.com>
6667 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
6668 * disasm.c (set_disassembler_options): Constify local.
6669 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
6671 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
6674 * tracefile.c (tsave_command): Fix argument parsing for '-r'
6677 2017-04-05 Yao Qi <yao.qi@linaro.org>
6679 * frame.c (frame_unwind_register_unsigned): Call
6680 frame_unwind_register_value.
6682 2017-04-05 Yao Qi <yao.qi@linaro.org>
6684 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
6685 Use gdb_test_multiple, and don't match anchor.
6687 2017-04-05 Pedro Alves <palves@redhat.com>
6689 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
6690 (Write After Approval): Remove Simon Marchi.
6692 2017-04-05 Pedro Alves <palves@redhat.com>
6694 * common/gdb_optional.h (optional::optional): Make constexpr and
6697 2017-04-04 John Baldwin <jhb@FreeBSD.org>
6699 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6700 (amd64fbsd_jmp_buf_reg_offset): Remove.
6701 (amd64fbsd_supply_uthread): Remove function.
6702 (amd64fbsd_collect_uthread): Remove function.
6703 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
6704 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
6705 (x86_64-*-freebsd*): Remove bsd-uthread.o.
6706 (fbsd-nat.c): Update comment.
6707 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6708 (i386fbsd_jmp_buf_reg_offset): Remove.
6709 (i386fbsd_supply_uthread): Remove function.
6710 (i386fbsd_collect_uthread): Remove function.
6711 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
6713 2017-04-04 John Baldwin <jhb@FreeBSD.org>
6715 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
6716 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
6717 * NEWS: Mention that support for FreeBSD/alpha was removed.
6718 * alpha-fbsd-tdep.c: Delete file.
6719 * config/alpha/fbsd.mh: Delete file.
6720 * configure.host: Delete alpha*-*-freebsd* and
6721 alpha*-*-kfreebsd*-gnu.
6722 * configure.tgt: Delete alpha*-*-freebsd* and
6723 alpha*-*-kfreebsd*-gnu.
6725 2017-04-04 John Baldwin <jhb@FreeBSD.org>
6727 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
6728 amd64bsd_store_inferior_registers): Use ptid from regcache.
6730 2017-04-04 Pedro Alves <palves@redhat.com>
6732 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
6733 data fields, make them private and add "m_" prefixes.
6734 (lnp_state_machine::lnp_state_machine): New ctor.
6735 (record_line, check_line_address, handle_set_discriminator)
6736 (handle_set_address, handle_advance_pc, handle_special_opcode)
6737 (handle_advance_line, handle_set_file, handle_negate_stmt)
6738 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
6739 (end_sequence, advance_line): New methods.
6740 (m_gdbarch, m_record_lines_p): New fields.
6741 (lnp_reader_state): Delete.
6742 (dwarf_record_line): Rename to ...
6743 (lnp_state_machine::record_line): ... adjust.
6744 (init_lnp_state_machine): Delete.
6745 (lnp_state_machine::lnp_state_machine): New.
6746 (check_line_address): Rename to ...
6747 (lnp_state_machine::check_line_address): This.
6748 (dwarf_decode_lines_1): Remove reference to "reader_state".
6749 Adjust lnp_state_machine having a non-default ctor. Use bool.
6750 State machine internal state manipulation moved to
6751 lnp_state_machine methods.
6753 2017-04-04 Pedro Alves <palves@redhat.com>
6755 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6756 unittests/offset-type-selftests.c.
6757 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
6758 * common/offset-type.h: New file.
6759 * common/preprocessor.h: New file.
6760 * common/traits.h: New file.
6761 * common/valid-expr.h: New file.
6762 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
6763 sect_offset and cu_offset strong typedefs throughout.
6764 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
6765 typedefs throughout.
6766 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
6767 sect_offset and cu_offset strong typedefs throughout.
6768 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
6769 typedefs throughout.
6770 * gdbtypes.h: Include "common/offset-type.h".
6771 (cu_offset): Now an offset type (strong typedef) instead of a
6773 (sect_offset): Likewise.
6774 (union call_site_parameter_u): Rename "param_offset" field to
6776 * unittests/offset-type-selftests.c: New file.
6778 2017-04-04 Pedro Alves <palves@redhat.com>
6780 * common/underlying.h: New file.
6781 * dwarf2read.c: Include "common/gdb_optional.h" and
6782 "common/underlying.h".
6783 (dir_index, file_name_index): New types.
6784 (file_entry): Use them.
6785 (file_entry::include): Use to_underlying.
6786 (line_header::add_file_name): Use dir_index.
6787 (read_formatted_entries): Use gdb::optional. Read form before
6788 writting to file_entry.
6789 (dwarf_decode_line_header): Use dir_index.
6790 (lnp_state_machine::current_file): Use to_underlying.
6791 (lnp_state_machine::file): Change type to file_name_index.
6792 (dwarf_record_line): Use to_underlying.
6793 (init_lnp_state_machine): Use file_name_index.
6794 (dwarf_decode_lines_1): Use dir_index and file_name_index.
6796 2017-04-04 Pedro Alves <palves@redhat.com>
6798 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
6799 operator bool, has_value and get methods.
6801 2017-04-04 Pedro Alves <palves@redhat.com>
6803 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
6805 (line_header): Initialize all data fields. Change type of
6806 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
6807 Change type of include_dirs to std::vector<const char *>. Remove
6808 num_include_dirs, include_dirs_size. Change type of file_names to
6809 std::vector<file_entry>. Remove num_file_names, file_names_size.
6810 (line_header::line_header): New.
6811 (line_header::add_include_dir, line_header::add_file_name): New
6813 (line_header::include_dir_at): Remove NULL check.
6814 (line_header::file_name_at): Add const overload.
6815 (line_header_up): New unique_ptr typedef.
6816 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
6817 std::vector. Remove free_line_header call.
6818 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
6819 free_line_header call.
6820 (free_cu_line_header): Delete.
6821 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
6822 (setup_type_unit_groups): Use line_header_up instead of cleanups.
6823 Adjust to use std::vector.
6824 (free_line_header): Delete.
6825 (free_line_header_voidp): Use delete.
6826 (add_include_dir): Replace with ...
6827 (line_header::add_include_dir): ... this method. Use std::vector.
6828 (add_file_name): Replace with ...
6829 (line_header::add_file_name): ... this method. Use std::vector.
6830 (add_include_dir_stub): Delete.
6831 (read_formatted_entries): Remove memset.
6832 (dwarf_decode_line_header): Return a line_header_up instead of a
6833 raw pointer. Remove cleanup handling. Pass lambdas to
6834 read_formatted_entries. Adjust to use line_header methods.
6835 (dwarf_decode_lines_1): Adjust to use line_header methods.
6836 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
6839 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
6841 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
6842 instead of struct ptid.
6844 2017-05-04 Alan Hayward <alan.hayward@arm.com>
6846 * frame.c (get_frame_register_bytes): Unwind using value.
6847 (put_frame_register_bytes): Likewise.
6849 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
6851 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
6854 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
6856 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
6858 2017-03-29 Yao Qi <yao.qi@linaro.org>
6860 * gdbthread.h (struct thread_info): Declare constructor and
6861 destructor. Add some in-class member initializers.
6862 * thread.c (free_thread): Remove.
6863 (init_thread_list): Call delete instead of free_thread.
6864 (new_thread): Call thread_info constructor.
6865 (thread_info::thread_info): New function.
6866 (thread_info::~thread_info): New function.
6867 (delete_thread_1): Call delete instead of free_thread.
6868 (make_cleanup_restore_current_thread): Move tp and frame to
6871 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6873 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
6874 (arc_skip_prologue): Likewise.
6875 (arc_make_frame_cache): Likewise.
6876 (arc_pv_get_operand): New function.
6877 (arc_is_in_prologue): Likewise.
6878 (arc_analyze_prologue): Likewise.
6879 (arc_print_frame_cache): Likewise.
6880 (MAX_PROLOGUE_LENGTH): New constant.
6882 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6884 * configure.tgt: Add arc-insn.o.
6885 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
6886 (dump_arc_instruction_command): New function.
6887 (arc_fprintf_disasm): Likewise.
6888 (arc_disassemble_info): Likewise.
6889 (arc_insn_get_operand_value): Likewise.
6890 (arc_insn_get_operand_value_signed): Likewise.
6891 (arc_insn_get_memory_base_reg): Likewise.
6892 (arc_insn_get_memory_offset): Likewise.
6893 (arc_insn_get_branch_target): Likewise.
6894 (arc_insn_dump): Likewise.
6895 (arc_insn_get_linear_next_pc): Likewise.
6896 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
6897 (arc_disassemble_info): Likewise.
6898 (arc_insn_get_branch_target): Likewise.
6899 (arc_insn_get_linear_next_pc): Likewise.
6900 * NEWS: Mention new "maint print arc arc-instruction".
6902 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6904 * arc-tdep (maintenance_print_arc_list): New variable.
6905 (maintenance_print_arc_command): New function.
6907 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6909 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
6910 Add "limm" and "reserved".
6911 (arc_cannot_fetch_register, arc_cannot_store_register): Add
6912 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
6913 * arc-tdep.h (arc_regnum): Likewise.
6915 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6917 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6918 for THREADPTR register.
6919 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
6921 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
6922 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
6923 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
6925 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6927 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
6928 registers above gdbarch_num_regs (gdbarch) as privileged in
6931 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6933 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6934 for a single specified register or for all registers in
6935 a0_base..a0_base + C0_NREGS range.
6936 (supply_gregset_reg): Call regcache_raw_supply for a single
6937 specified register or for all registers in a0_base..a0_base +
6940 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6942 * arch/xtensa.h (C0_NREGS): Add definition.
6943 * xtensa-tdep.c (C0_NREGS): Remove definition.
6945 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6947 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
6948 Drop xtensa_default_isa initialization.
6949 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
6951 2017-03-27 Pedro Alves <palves@redhat.com>
6953 * dwarf2read.c (file_entry) <dir_index>: Add comment.
6954 (file_entry::include_dir): New method.
6955 (line_header::include_dir_at, line_header::file_name_at): New
6957 (setup_type_unit_groups, setup_type_unit_groups)
6958 (psymtab_include_file_name): Simplify using the new methods.
6959 (lnp_state_machine) <the_line_header>: New field.
6960 <file>: Add comment.
6961 (lnp_state_machine::current_file): New method.
6962 (dwarf_record_line): Simplify using the new methods.
6963 (init_lnp_state_machine): Initialize the "the_line_header" field.
6964 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
6965 Simplify using the new methods.
6967 2017-03-27 Pedro Alves <palves@redhat.com>
6969 * cp-name-parser.y (make_empty): Delete.
6970 (demangler_special, nested_name, ptr_operator, array_indicator)
6971 (direct_declarator, declarator_1): Use fill_comp instead of
6974 2017-03-27 Pedro Alves <palves@redhat.com>
6976 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
6977 to ATTRIBUTE_PRINTF.
6978 * solib-target.c (library_list_start_list): Print "string" not
6980 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
6983 2017-03-27 Pedro Alves <palves@redhat.com>
6985 * dwarf2read.c (struct file_and_directory): New.
6986 (dwarf2_get_dwz_file): Adjust to use std::string.
6987 (dw2_get_file_names_reader): Adjust to use file_and_directory.
6988 (find_file_and_directory): Adjust to return a file_and_directory
6990 (read_file_scope): Adjust to use file_and_directory. Remove
6991 make_cleanup/do_cleanups calls.
6992 (open_and_init_dwp_file): Adjust to use std::string. Remove
6993 make_cleanup/do_cleanups calls.
6994 * python/python.c (do_start_initialization): Adjust to ldirname
6995 returning a std::string.
6996 * utils.c (ldirname): Now returns a std::string.
6997 * utils.h (ldirname): Change return type to std::string.
6998 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
6999 returning a std::string.
7000 * xml-tdesc.c (file_read_description_xml): Likewise.
7002 2017-03-24 Alan Hayward <alan.hayward@arm.com>
7004 * regcache.c (regcache_debug_print_register): New function.
7005 * regcache.h (regcache_debug_print_register): New declaration.
7006 * target.c (debug_print_register): Remove.
7007 (target_fetch_registers): Call regcache_debug_print_register.
7008 (target_store_registers): Likewise.
7010 2017-03-24 Pádraig Brady <pbrady@fb.com>
7012 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
7013 reference beyond the 'lh->include_dirs' array before accessing to
7015 (psymtab_include_file_name): Likewise.
7016 (dwarf_decode_lines_1): Likewise.
7017 (dwarf_decode_lines): Likewise.
7018 (file_file_name): Likewise.
7020 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
7022 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
7024 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
7025 ps_lsetfpregs): Likewise.
7026 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
7027 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
7028 ps_lsetfpregs): Likewise.
7029 * target.c (target_fetch_registers, target_store_registers):
7032 2017-03-23 Alan Hayward <alan.hayward@arm.com>
7034 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
7036 2017-03-23 Yao Qi <yao.qi@linaro.org>
7038 * aarch64-tdep.c (aarch64_process_record_test): Declare.
7039 (_initialize_aarch64_tdep): Register it.
7040 (aarch64_record_load_store): Handle PRFM instruction.
7041 (aarch64_process_record_test): New function.
7043 2017-03-23 Yao Qi <yao.qi@linaro.org>
7045 * aarch64-tdep.c (aarch64_record_load_store): Fix code
7048 2017-03-23 Yao Qi <yao.qi@linaro.org>
7050 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
7052 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7054 python/python.c (do_start_initialization): Fix memory leak.
7056 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7058 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
7059 using get_ptrace_pid.
7060 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
7062 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
7063 inferior_ptid instead of pid.
7065 2017-03-22 Yao Qi <yao.qi@linaro.org>
7067 * aarch64-tdep.c: Wrap locally used classes in anonymous
7069 * arm-tdep.c: Likewise.
7070 * linespec.c: Likewise.
7071 * ui-out.c: Likewise.
7073 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
7076 * python/lib/gdb/printer/bound_registers.py: Import sys.
7078 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
7080 * windows-nat.c (do_windows_fetch_inferior_registers): Add
7081 windows_thread_info parameter and use it instead of
7083 (windows_fetch_inferior_registers): Don't set current_thread,
7084 pass the thread to do_windows_fetch_inferior_registers. Use
7085 ptid from regcache instead of inferior_ptid.
7086 (do_windows_store_inferior_registers): Add windows_thread_info
7087 parameter and use it instead of current_thread.
7088 (windows_store_inferior_registers): Don't set current_thread,
7089 pass the thread to do_windows_store_inferior_registers. Use
7090 ptid from regcache instead of inferior_ptid.
7092 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
7094 * ser-mingw.c (ser_windows_raw): Remove reference to
7095 struct serial::current_timeout.
7097 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
7100 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
7101 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
7102 (sparc64_fsr_type): Fix %fsr decoding.
7104 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
7106 * python/py-record-btrace.c (btpy_insn_data): Change return type
7109 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
7111 * spu-linux-nat.c (spu_fetch_inferior_registers,
7112 spu_store_inferior_registers): Use ptid from regcache, set and
7113 restore inferior_ptid.
7114 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
7117 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
7119 * i386-linux-nat.c (fetch_register, store_register,
7120 i386_linux_fetch_inferior_registers,
7121 i386_linux_store_inferior_registers): Use ptid from regcache.
7122 * ia64-linux-nat.c (ia64_linux_fetch_register,
7123 ia64_linux_store_register): Likewise.
7124 * inf-ptrace.c (inf_ptrace_fetch_register,
7125 inf_ptrace_store_register): Likewise.
7126 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
7127 m32r_linux_store_inferior_registers): Likewise.
7128 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
7129 m68kbsd_store_inferior_registers): Likewise.
7130 * m68k-linux-nat.c (fetch_register, store_register,
7131 m68k_linux_fetch_inferior_registers,
7132 m68k_linux_store_inferior_registers): Likewise.
7133 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
7134 m88kbsd_store_inferior_registers): Likewise.
7135 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
7136 mips_fbsd_store_inferior_registers): Likewise.
7137 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
7138 mips64_linux_regsets_store_registers): Likewise.
7139 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
7140 mipsnbsd_store_inferior_registers): Likewise.
7141 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
7142 mips64obsd_store_inferior_registers): Likewise.
7143 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
7145 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
7146 ppcfbsd_store_inferior_registers): Likewise.
7147 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
7148 ppc_linux_store_inferior_registers): Likewise.
7149 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
7150 ppcnbsd_store_inferior_registers): Likewise.
7151 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
7152 ppcobsd_store_registers): Likewise.
7153 * procfs.c (procfs_fetch_registers, procfs_store_registers):
7155 * ravenscar-thread.c (ravenscar_fetch_registers,
7156 ravenscar_store_registers, ravenscar_prepare_to_store):
7158 * record-btrace.c (record_btrace_fetch_registers,
7159 record_btrace_store_registers, record_btrace_prepare_to_store):
7161 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
7162 Lookup inferior using ptid from regcache, instead of
7164 * remote.c (remote_fetch_registers, remote_store_registers): Use
7166 * rs6000-nat.c (fetch_register, store_register): Likewise.
7167 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
7168 s390_linux_store_inferior_registers): Likewise.
7169 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
7170 shnbsd_store_inferior_registers): Likewise.
7171 * sol-thread.c (sol_thread_fetch_registers,
7172 sol_thread_store_registers): Likewise.
7173 * sparc-nat.c (sparc_fetch_inferior_registers,
7174 sparc_store_inferior_registers): Likewise.
7175 * tilegx-linux-nat.c (fetch_inferior_registers,
7176 store_inferior_registers): Likewise.
7177 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
7178 vaxbsd_store_inferior_registers): Likewise.
7179 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
7180 store_xtregs): Likewise.
7182 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7185 * NEWS: Mention support for rvalue references in GDB and python.
7186 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
7187 supports both lvalue and rvalue references.
7189 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7192 * gdbtypes.c (rank_one_type): Implement overloading
7193 resolution rules regarding rvalue references.
7195 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7198 * aarch64-tdep.c (aarch64_type_align)
7199 (aarch64_extract_return_value, aarch64_store_return_value): Change
7200 lvalue reference type checks to general reference type checks.
7201 * amd64-tdep.c (amd64_classify): Likewise.
7202 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
7204 * arm-tdep.c (arm_type_align, arm_extract_return_value)
7205 (arm_store_return_value): Likewise.
7206 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
7207 * c-typeprint.c (c_print_type): Likewise.
7208 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
7209 (cplus_number_of_children, cplus_describe_child): Likewise.
7210 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
7211 * completer.c (expression_completer): Likewise.
7212 * cp-support.c (make_symbol_overload_list_adl_namespace):
7214 * darwin-nat-info.c (info_mach_region_command): Likewise.
7215 * dwarf2loc.c (entry_data_value_coerce_ref)
7216 (value_of_dwarf_reg_entry): Likewise.
7217 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
7218 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
7220 * findvar.c (extract_typed_address, store_typed_address):
7222 * gdbtypes.c (rank_one_type): Likewise.
7223 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
7224 * infcall.c (value_arg_coerce): Likewise.
7225 * language.c (pointer_type): Likewise.
7226 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
7228 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
7229 * mn10300-tdep.c (mn10300_type_align): Likewise.
7230 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
7231 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
7232 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
7234 * printcmd.c (print_formatted, x_command): Likewise.
7235 * python/py-type.c (typy_get_composite, typy_template_argument):
7237 * python/py-value.c (valpy_referenced_value)
7238 (valpy_get_dynamic_type, value_has_field): Likewise.
7239 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
7240 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
7241 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
7242 * spu-tdep.c (spu_scalar_value_p): Likewise.
7243 * symtab.c (lookup_symbol_aux): Likewise.
7244 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
7245 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
7247 * valops.c (value_cast_pointers, value_cast)
7248 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
7249 (value_struct_elt, value_struct_elt_bitpos)
7250 (value_find_oload_method_list, find_overload_match)
7251 (value_rtti_indirect_type): Likewise.
7252 * valprint.c (val_print_scalar_type_p, generic_val_print):
7254 * value.c (value_actual_type, value_as_address, unpack_long)
7255 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
7256 (coerce_ref): Likewise.
7257 * varobj.c (varobj_get_value_type): Likewise.
7259 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7262 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
7264 * python/lib/gdb/command/explore.py: Support exploring values
7265 of rvalue reference types.
7266 * python/lib/gdb/types.py: Implement get_basic_type() for
7267 rvalue reference types.
7268 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
7270 * python/py-value.c (valpy_getitem): Add an rvalue reference
7272 (valpy_reference_value): Add new parameter "refcode".
7273 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
7274 New wrappers for valpy_reference_value().
7275 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
7276 (gdbpy_invoke_xmethod): Likewise.
7278 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7281 * dwarf2read.c (process_die, read_type_die_1): Handle the
7282 DW_TAG_rvalue_reference_type DIE.
7283 (read_tag_reference_type): Add new parameter "refcode".
7285 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7288 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
7289 (c_type_print_modifier, c_type_print_varspec_suffix)
7290 (c_type_print_base): Support printing rvalue reference types.
7291 * c-valprint.c (c_val_print, c_value_print): Support printing
7292 rvalue reference values.
7294 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7297 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
7299 * cp-support.c (replace_typedefs): Handle
7300 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
7301 * python/py-type.c (typy_lookup_type): Likewise.
7303 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7306 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
7307 * parse.c (insert_type): Change assert statement.
7308 (follow_types): Handle rvalue reference types.
7309 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
7312 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7315 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
7316 value_ref() interface.
7317 * c-valprint.c (c_value_print): Likewise.
7318 * infcall.c (value_arg_coerce): Likewise.
7319 * python/py-value.c (valpy_reference_value): Likewise.
7320 * valops.c (value_cast, value_reinterpret_cast)
7321 (value_dynamic_cast, typecmp): Likewise.
7322 (value_ref): Parameterize by kind of return value reference type.
7323 * value.h (value_ref): Add new parameter "refcode".
7325 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7328 * dwarf2read.c (read_tag_reference_type): Use
7329 lookup_lvalue_reference_type() instead of lookup_reference_type().
7330 * eval.c (evaluate_subexp_standard): Likewise.
7331 * f-exp.y: Likewise.
7332 * gdbtypes.c (make_reference_type, lookup_reference_type):
7333 Generalize with rvalue reference types.
7334 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
7335 convenience wrappers for lookup_reference_type().
7336 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
7337 reference kind parameter.
7338 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
7339 wrappers for lookup_reference_type().
7340 * guile/scm-type.c (gdbscm_type_reference): Use
7341 lookup_lvalue_reference_type() instead of lookup_reference_type().
7342 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
7343 * parse.c (follow_types): Likewise.
7344 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
7345 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
7347 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
7348 (gdbpy_invoke_xmethod): Likewise.
7349 * stabsread.c: Provide extra argument to make_reference_type()
7351 * valops.c (value_ref, value_rtti_indirect_type): Use
7352 lookup_lvalue_reference_type() instead of lookup_reference_type().
7354 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7357 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
7358 (TYPE_IS_REFERENCE): New macro.
7359 (struct type): Add rvalue_reference_type field.
7360 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
7362 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
7364 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
7365 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
7366 New function definition.
7367 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
7368 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
7369 New function declaration.
7370 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
7371 * mi/mi-interp.h: New file.
7372 * solib.c (info_sharedlibrary_command): Replace for loop with
7374 * solib.h (update_solib_list): New function declaration.
7375 (so_list_head): Move macro.
7376 * solist.h (ALL_SO_LIBS): New macro.
7378 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
7380 * infcmd.c (post_create_inferior): Remove unused argument in
7382 * remote.c (remote_start_remote): Likewise.
7383 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
7384 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
7385 (enable_break): Likewise.
7386 * solib.c (update_solib_list): Remove unused target argument
7387 and its documentation.
7388 (solib_add): Remove unused target argument. Remove unused
7389 argument in call to update_solib_list.
7390 (info_sharedlibrary_command): Remove unused argument in call
7391 to update_solib_list.
7392 (sharedlibrary_command): Remove unused argument in call to
7394 (handle_solib_event): Likewise.
7395 (reload_shared_libraries): Likewise.
7396 * solib.h (solib_add): Remove unused target argument.
7398 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
7400 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
7401 (s390_displaced_step_fixup): Cover relative branches with the
7402 default fixup handling. This fixes lack of support for some
7403 relative branch instructions.
7405 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7407 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
7410 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7412 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
7413 i386_darwin_store_inferior_registers): Use ptid from regcache.
7415 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7417 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
7418 i386bsd_store_inferior_registers): Use ptid from regcache.
7420 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7422 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
7423 hppaobsd_store_registers): Use ptid from regcache.
7425 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7427 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
7428 hppanbsd_store_registers): Use ptid from regcache.
7430 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7432 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
7433 from regcache. Use get_ptrace_pid.
7435 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7437 * corelow.c (get_core_register_section): Use ptid from regcache,
7440 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7442 * bsd-uthread.c (bsd_uthread_fetch_registers,
7443 bsd_uthread_store_registers): Use ptid from regcache, set and
7444 restore inferior_ptid.
7446 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7448 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
7449 fetch_fp_regs, store_register, store_regs, store_fp_register,
7450 store_fp_regs): Use ptid from regcache.
7452 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7454 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
7455 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
7456 store_vfp_regs): Use ptid from regcache.
7458 2017-03-17 Pedro Alves <palves@redhat.com>
7461 * ser-base.c (ser_base_wait_for): Add comment.
7462 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
7464 * ser-unix.c (hardwire_raw): Remove reference to
7465 scb->current_timeout.
7466 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
7467 (hardwire_ops): Install ser_base_readchar instead of
7469 * serial.h (struct serial) <current_timeout, timeout_remaining>:
7472 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
7475 * python/lib/gdb/printer/bound_registers.py: Add support for
7478 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7480 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
7481 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
7482 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
7483 byte_offset to subobj_byte_offset. Fix the handling of
7484 DWARF_VALUE_STACK on big-endian targets when coming via an
7486 (dwarf2_evaluate_loc_desc): Adjust call to
7487 dwarf2_evaluate_loc_desc_full.
7488 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
7489 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
7491 2017-03-16 Yao Qi <yao.qi@linaro.org>
7493 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
7494 and REVSH instructions.
7496 2017-03-16 Yao Qi <yao.qi@linaro.org>
7498 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
7499 (arm_record_test): Declare.
7500 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
7501 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
7502 align with the manual.
7503 (thumb_record_misc): Adjust the code order to align with the
7505 (thumb2_record_decode_insn_handler): Fix instruction matching.
7506 (instruction_reader_thumb): New class.
7507 (arm_record_test): New function.
7509 2017-03-16 Yao Qi <yao.qi@linaro.org>
7511 * arm-tdep.c (abstract_memory_reader): New class.
7512 (instruction_reader): New class.
7513 (extract_arm_insn): Add argument 'reader'. Callers updated.
7514 (decode_insn): Likewise.
7516 2017-03-16 Doug Evans <dje@google.com>
7518 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
7519 member. Change type of TYPE member to SCM. All uses updated.
7520 (lsscm_make_lazy_string_smob): Add assert.
7521 (lsscm_make_lazy_string): Flag bad length values.
7522 (lsscm_elt_type): New function.
7523 (gdbscm_lazy_string_to_value): Rewrite to use
7524 lsscm_safe_lazy_string_to_value.
7525 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
7526 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
7527 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
7529 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
7530 * guile/scm-type.c (tyscm_scm_to_type): New function.
7532 2017-03-15 Doug Evans <dje@google.com>
7534 PR python/17728, python/18439, python/18779
7535 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
7536 member. Change type of TYPE member to PyObject *. All uses updated.
7537 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
7538 (gdbpy_create_lazy_string_object): Flag bad length values.
7539 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
7540 Handle typedefs in incoming type.
7541 (stpy_lazy_string_elt_type): New function.
7542 (gdbpy_extract_lazy_string): Call it.
7543 * python/py-value.c (valpy_lazy_string): Flag bad length values.
7544 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
7545 typedefs in incoming type.
7547 2017-03-16 Doug Evans <dje@google.com>
7549 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
7550 * guile/scm-type.c (tyscm_scm_to_type): New function.
7552 2017-03-16 Jiong Wang <jiong.wang@arm.com>
7554 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
7555 "ULONGEST" for "skip".
7557 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
7560 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
7561 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
7562 (inf_ptrace_peek_poke): ...here. New function. Now also loop
7563 over ptrace peek/poke until end of buffer or error.
7565 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
7567 * parse.c (length_of_subexp): Make static.
7568 * parser-defs.h (length_of_subexp): Remove.
7570 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
7572 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
7575 2017-03-14 Pedro Alves <palves@redhat.com>
7577 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
7578 (main): Use std::unique_ptr. Remove calls to
7579 cp_demangled_name_parse_free.
7581 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7583 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
7584 alphabsd_store_inferior_registers): Use regcache->ptid instead
7587 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7589 * aix-thread.c (aix_thread_fetch_registers,
7590 aix_thread_store_registers): Use regcache->ptid instead of
7593 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7595 * aarch64-linux-nat.c (fetch_gregs_from_thread,
7596 store_gregs_to_thread, fetch_fpregs_from_thread,
7597 store_fpregs_to_thread): Use regcache->ptid instead of
7600 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7602 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
7603 amd64_linux_fetch_inferior_registers): Use regcache->ptid
7604 instead of inferior_ptid.
7606 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7608 * target.c (target_fetch_registers, target_store_registers): Add
7611 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7613 * regcache.h (regcache_get_ptid): New function.
7614 * regcache.c (regcache_get_ptid): New function.
7616 2017-03-13 Mark Wielaard <mark@klomp.org>
7618 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
7620 2017-03-10 Keith Seitz <keiths@redhat.com>
7623 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
7625 2017-03-08 Pedro Alves <palves@redhat.com>
7628 * infrun.c (start_step_over, do_target_resume, resume)
7629 (restart_threads): Assert we're not resuming a thread that is
7630 meant to be stopped.
7631 (infrun_thread_stop_requested_callback): Delete.
7632 (infrun_thread_stop_requested): If the thread is internally
7633 stopped, queue a pending stop event and clear the thread's
7635 (handle_stop_requested): New function.
7636 (handle_syscall_event, handle_inferior_event_1): Use
7637 handle_stop_requested.
7638 (handle_stop_requested): New function.
7639 (handle_signal_stop): Set the thread's stop_signal here instead of
7641 (finish_step_over): Clear step over info unconditionally.
7642 (handle_signal_stop): If the user had interrupted the event
7643 thread, consider the stop a random signal.
7644 (handle_signal_stop) <signal arrived while stepping over
7645 breakpoint>: Don't restart threads here.
7646 (stop_waiting): Don't clear step-over info here.
7648 2017-03-08 Pedro Alves <palves@redhat.com>
7651 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
7652 goes to argument 2, not 1.
7654 2017-03-08 Pedro Alves <palves@redhat.com>
7657 * top.c (gdb_readline_wrapper): Avoid passing NULL to
7659 (command_line_input): Add comment.
7661 2017-03-08 Pedro Alves <palves@redhat.com>
7664 * tui/tui-file.c (tui_file::write): New.
7665 * tui/tui-file.h (tui_file): Override "write".
7666 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
7667 factored out from ...
7668 (tui_puts): ... here.
7669 (tui_putc): Use them.
7670 (tui_write): New function.
7671 * tui/tui-io.h (tui_write): Declare.
7673 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7675 * Makefile.in (SFILES): Replace "environ.c" with
7677 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
7678 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
7680 * common/environ.c: ... here.
7681 * environ.h: Moved to...
7682 * common/environ.h: ... here.
7684 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
7686 * gdbarch.sh (pstring_ptr): New static function.
7687 (gdbarch_disassembler_options): Use it.
7688 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
7689 not valid_disassembler_option->name.
7690 * gdbarch.c: Regenerate.
7692 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
7694 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
7696 2017-03-07 Pedro Alves <palves@redhat.com>
7698 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
7700 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
7702 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
7703 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
7704 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
7705 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
7707 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
7709 * xtensa-linux-nat.c (fetch_gregs): Remove const.
7711 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
7713 * remote.c (remote_add_target_side_commands): Use range-based
7716 2017-03-03 Yao Qi <yao.qi@linaro.org>
7719 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
7721 * valprint.c (common_val_print): Likewise.
7723 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
7725 * NEWS: Mention new set/show disassembler-options commands.
7726 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
7727 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
7728 (prospective_options): New static variable.
7729 (gdb_disassembler::gdb_disassembler): Initialize
7730 m_di.disassembler_options.
7731 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
7732 (get_disassembler_options): New function.
7733 (set_disassembler_options): Likewise.
7734 (set_disassembler_options_sfunc): Likewise.
7735 (show_disassembler_options_sfunc): Likewise.
7736 (disassembler_options_completer): Likewise.
7737 (_initialize_disasm): Likewise.
7738 * disasm.h (get_disassembler_options): New prototype.
7739 (set_disassembler_options): Likewise.
7740 * gdbarch.sh (gdbarch_disassembler_options): New variable.
7741 (gdbarch_verify_disassembler_options): Likewise.
7742 * gdbarch.c: Regenerate.
7743 * gdbarch.h: Likewise.
7744 * arm-tdep.c (num_disassembly_options): Delete.
7745 (set_disassembly_style): Likewise.
7746 (arm_disassembler_options): New static variable.
7747 (set_disassembly_style_sfunc): Convert short style name into long
7748 option name. Call set_disassembler_options.
7749 (show_disassembly_style_sfunc): New function.
7750 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
7751 set_gdbarch_verify_disassembler_options.
7752 (_initialize_arm_tdep): Delete regnames variable and update callers.
7753 (arm_disassembler_options): Initialize.
7754 (disasm_options): New variable.
7755 (num_disassembly_options): Rename from this...
7756 (num_disassembly_styles): ...to this. Compute by scanning through
7758 (valid_disassembly_styles): Initialize using disasm_options.
7759 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
7760 set_arm_regname_option.
7761 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
7762 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
7763 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
7764 set_gdbarch_verify_disassembler_options.
7765 * s390-tdep.c (s390_disassembler_options): New static variable.
7766 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
7767 set_gdbarch_verify_disassembler_options.
7769 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
7771 * remote.c (remote_add_target_side_condition): Remove "struct"
7772 keyword from range-based for loop.
7774 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
7776 * remote.c (remote_add_target_side_condition): Use range-based
7777 for loop. Update comment.
7779 2017-02-27 Yao Qi <yao.qi@linaro.org>
7781 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
7783 2017-02-26 Alan Hayward <alan.hayward@arm.com>
7785 * regcache.c (regcache_raw_update): New function.
7786 (regcache_raw_read): Move code to regcache_raw_update.
7787 * regcache.h (regcache_raw_update): New declaration.
7788 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
7790 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
7792 * dwarf2read.c (create_debug_type_hash_table): Initialize
7793 header.signature and header.type_offset_in_tu.
7795 2017-02-24 Pedro Alves <palves@redhat.com>
7797 * symtab.c (make_file_symbol_completion_list_1): Use
7798 add_symtab_completions.
7800 2017-02-24 Alan Hayward <alan.hayward@arm.com>
7802 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
7804 2017-02-24 Alan Hayward <alan.hayward@arm.com>
7806 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
7807 I386_MAX_REGISTER_SIZE.
7808 (i386_pseudo_register_write): Likewise.
7809 (i386_process_record): Likewise.
7810 * i387-tdep.c (i387_supply_xsave): Likewise.
7811 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
7812 (store_register): Likewise.
7814 2017-02-23 Pedro Alves <palves@redhat.com>
7816 * ada-lang.c: Include "common/function-view.h".
7817 (ada_iterate_over_symbols): Adjust to use function_view as
7819 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
7820 (ada_make_symbol_completion_list): Use a lambda.
7821 (ada_exc_search_name_matches): Delete.
7822 (name_matches_regex): New.
7823 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
7824 * compile/compile-c-support.c: Include "common/function-view.h".
7825 (print_one_macro): Change prototype to accept a ui_file pointer.
7826 (write_macro_definitions): Use a lambda.
7827 * dwarf2read.c: Include "common/function-view.h".
7828 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
7829 (dw2_expand_symtabs_matching): Adjust to use function_view as
7831 * language.h: Include "common/function-view.h".
7832 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
7833 function_view as callback type.
7834 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
7835 * linespec.c: Include "common/function-view.h".
7836 (collect_info::add_symbol): New method.
7837 (struct symbol_and_data_callback, iterate_inline_only, struct
7838 symbol_matcher_data, iterate_name_matcher): Delete.
7839 (iterate_over_all_matching_symtabs): Adjust to use function_view
7840 as callback type and lambdas.
7841 (iterate_over_file_blocks): Adjust to use function_view as
7843 (decode_compound_collector): Now a class with private fields.
7844 (decode_compound_collector::release_symbols): New method.
7845 (collect_one_symbol): Rename to...
7846 (decode_compound_collector::operator()): ... this and adjust.
7847 (lookup_prefix_sym): decode_compound_collector construction bits
7848 move to decode_compound_collector ctor. Pass the
7849 decode_compound_collector object directly as callback. Remove
7850 cleanups and use decode_compound_collector::release_symbols
7852 (symtab_collector): Now a class with private fields.
7853 (symtab_collector::release_symtabs): New method.
7854 (add_symtabs_to_list): Rename to...
7855 (symtab_collector::operator()): ... this and adjust.
7856 (collect_symtabs_from_filename): symtab_collector construction
7857 bits move to symtab_collector ctor. Pass the symtab_collector
7858 object directly as callback. Remove cleanups and use
7859 symtab_collector::release_symtabs instead.
7860 (collect_symbols): Delete.
7861 (add_matching_symbols_to_info): Use lambdas.
7862 * macrocmd.c (print_macro_callback): Delete.
7863 (info_macro_command): Use a lambda.
7864 (info_macros_command): Pass print_macro_definition as callable
7866 (print_one_macro): Remove 'ignore' parameter.
7867 (macro_list_command): Adjust.
7868 * macrotab.c (macro_for_each_data::fn): Now a function_view.
7869 (macro_for_each_data::user_data): Delete field.
7870 (foreach_macro): Adjust to call the function_view.
7871 (macro_for_each): Adjust to use function_view as callback type.
7872 (foreach_macro_in_scope): Adjust to call the function_view.
7873 (macro_for_each_in_scope): Adjust to use function_view as callback
7875 * macrotab.h: Include "common/function-view.h".
7876 (macro_callback_fn): Declare a prototype instead of a pointer.
7877 Remove "user_data" parameter.
7878 (macro_for_each, macro_for_each_in_scope): Adjust to use
7879 function_view as callback type.
7880 * psymtab.c (partial_map_expand_apply)
7881 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
7882 Adjust to use function_view as callback type and to return bool.
7883 (psym_expand_symtabs_matching): Adjust to use function_view as
7885 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
7886 to use function_view as callback type and to return bool.
7887 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
7889 * symfile.c (expand_symtabs_matching): Adjust to use function_view
7891 * symfile.h: Include "common/function-view.h".
7892 (expand_symtabs_file_matcher_ftype)
7893 (expand_symtabs_symbol_matcher_ftype)
7894 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
7896 (quick_symbol_functions::map_symtabs_matching_filename)
7897 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
7898 function_view as callback type and return bool.
7899 (expand_symtabs_matching): Adjust to use function_view as callback
7901 (maintenance_expand_name_matcher)
7902 (maintenance_expand_file_matcher): Delete.
7903 (maintenance_expand_symtabs): Use lambdas.
7904 * symtab.c (iterate_over_some_symtabs): Adjust to use
7905 function_view as callback types and return bool.
7906 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
7908 (lookup_symtab_callback): Delete.
7909 (lookup_symtab): Use a lambda.
7910 (iterate_over_symbols): Adjust to use function_view as callback
7912 (struct search_symbols_data, search_symbols_file_matches)
7913 (search_symbols_name_matches): Delete.
7914 (search_symbols): Use a pair of lambdas.
7915 (struct add_name_data, add_macro_name, symbol_completion_matcher)
7916 (symtab_expansion_callback): Delete.
7917 (default_make_symbol_completion_list_break_on_1): Use lambdas.
7918 * symtab.h: Include "common/function-view.h".
7919 (iterate_over_some_symtabs): Adjust to use function_view as
7920 callback type and return bool.
7921 (iterate_over_symtabs): Adjust to use function_view as callback
7923 (symbol_found_callback_ftype): Remove 'data' parameter and return
7925 (iterate_over_symbols): Adjust to use function_view as callback
7928 2017-02-23 Pedro Alves <palves@redhat.com>
7930 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
7931 (%.o) <unittests/%.c>: New pattern.
7932 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
7933 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
7934 * common/function-view.h: New file.
7935 * unittests/function-view-selftests.c: New file.
7936 * configure: Regenerate.
7938 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
7940 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
7942 * go32-nat.c (go32_thread_alive): Likewise.
7944 2017-02-23 Yao Qi <yao.qi@linaro.org>
7946 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
7949 2017-02-23 Yao Qi <yao.qi@linaro.org>
7951 * varobj.c (varobj_clear_saved_item): Use delete instead of
7953 (update_dynamic_varobj_children): Likewise.
7955 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7957 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
7959 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
7961 * common/enum-flags.h (enum_flags::enum_flags): Initialize
7962 m_enum_value to 0 in default constructor.
7964 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7966 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
7967 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
7968 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
7969 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
7970 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
7971 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
7972 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
7973 IS_STORE_CONDITIONAL_INSN.
7975 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7977 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
7979 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7981 * NEWS (Changes since GDB 7.12): Add DWARF-5.
7983 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7985 * dwarf2read.c (skip_one_die, read_attribute_value)
7986 (dwarf2_const_value_attr, dump_die_shallow)
7987 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7988 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
7990 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7992 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
7993 (dwarf_parse_macro_header): Accept DWARF version 5.
7994 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
7996 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7998 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
8000 * common/common-exceptions.h (enum errors): Likewise.
8001 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
8002 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
8003 (dwarf_expr_context::execute_stack_op): Likewise.
8004 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
8006 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
8007 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
8008 (show_entry_values_debug, call_site_to_target_addr)
8009 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
8010 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
8011 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
8012 (value_of_dwarf_block_entry, indirect_pieced_value)
8013 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
8014 (disassemble_dwarf_expression): Likewise.
8015 * dwarf2read.c (process_die, inherit_abstract_dies)
8016 (read_call_site_scope): Likewise.
8017 * gdbtypes.h (struct func_type, struct call_site_parameter)
8018 (struct call_site): Likewise.
8019 * stack.c (read_frame_arg): Likewise.
8020 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
8022 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8024 * defs.h (read_unsigned_leb128): New declaration.
8025 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
8026 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
8027 (dwarf2_find_location_expression): Call also
8028 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
8029 * dwarf2loc.h (dwarf2_version): New declaration.
8030 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
8032 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
8034 (struct dwop_section_names): Add loclists_dwo.
8035 (dwop_section_names): Add .debug_loclists.dwo.
8036 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
8037 (struct dwarf2_per_cu_data): Add dwarf_version.
8038 (struct dwo_sections): Add loclists.
8039 (struct attr_abbrev): Add implicit_const.
8040 (read_indirect_line_string): New declaration.
8041 (read_unsigned_leb128): Delete declaration.
8042 (rcuh_kind): New definition.
8043 (read_and_check_comp_unit_head): Change parameter
8044 is_debug_types_section to section_kind.
8045 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
8046 (read_comp_unit_head): Change parameter abfd to section, add parameter
8047 section_kind. Handle DWARF-5.
8048 (error_check_comp_unit_head): Accept also DWARF version 5.
8049 (read_and_check_comp_unit_head): Change parameter
8050 is_debug_types_section to section_kind.
8051 (read_and_check_type_unit_head): Delete function.
8052 (read_abbrev_offset): Handle DWARF-5.
8053 (create_debug_type_hash_table): Add parameter section_kind. Process
8054 only DW_UT_type. Use signature and type_offset_in_tu from struct
8056 (create_debug_types_hash_table): Update create_debug_type_hash_table
8058 (create_all_type_units): Call create_debug_type_hash_table.
8059 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
8060 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
8062 (skip_one_die): Handle DW_FORM_implicit_const.
8063 (dwarf2_rnglists_process): New function.
8064 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
8065 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
8066 (read_attribute_value): Handle DW_FORM_implicit_const,
8068 (read_attribute): Handle DW_FORM_implicit_const.
8069 (read_indirect_string_at_offset_from): New function from
8070 read_indirect_string_at_offset.
8071 (read_indirect_string_at_offset): Call
8072 read_indirect_string_at_offset_from.
8073 (read_indirect_line_string_at_offset): New function.
8074 (read_indirect_string): New function comment.
8075 (read_indirect_line_string): New function.
8076 (read_unsigned_leb128): Make it global.
8077 (dwarf2_string_attr): Handle DWARF-5.
8078 (add_include_dir_stub, read_formatted_entries): New functions.
8079 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
8081 (per_cu_header_read_in): Update read_comp_unit_head caller.
8082 (dwarf2_version): New function.
8083 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
8085 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
8088 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8090 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
8092 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8094 * dwarf2read.c (dwarf2_ranges_process): New function from
8096 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
8097 dwarf2_ranges_process.
8099 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8101 * dwarf2read.c (create_debug_type_hash_table): New function from
8102 create_debug_types_hash_table.
8103 (create_debug_types_hash_table): Call create_debug_type_hash_table.
8104 (create_all_type_units, open_and_init_dwo_file): Update
8105 create_debug_types_hash_table callers.
8107 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
8110 * fork-child.c (trace_start_error): Fix thinko. va_end should
8111 refer to 'ap', not 'args'.
8113 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
8114 Pedro Alves <palves@redhat.com>
8117 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
8119 * fork-child.c (trace_start_error): New function.
8120 (trace_start_error_with_name): Likewise.
8121 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
8122 * inf-ptrace.c (inf_ptrace_me): Likewise.
8123 * inferior.h (trace_start_error): New prototype.
8124 (trace_start_error_with_name): Likewise.
8126 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
8129 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
8130 NULL before using it.
8131 * symmisc.c (maintenance_print_symbols): Likewise.
8132 (maintenance_print_msymbols): Likewise.
8134 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8136 * NEWS: Add record Python bindings entry.
8138 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8140 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
8142 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
8143 * python/py-record-btrace.c, python/py-record-btrace.h,
8144 python/py-record-full.c, python/py-record-full.h: New file.
8145 * python/py-record.c: Add include for py-record-btrace.h and
8147 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
8148 recpy_instruction_history, recpy_function_call_history, recpy_begin,
8149 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
8150 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
8152 (gdbpy_initialize_btrace): New export.
8153 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
8155 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8157 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
8158 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
8159 * python/py-record.c: New file.
8160 * python/python-internal.h (gdbpy_start_recording,
8161 gdbpy_current_recording, gdpy_stop_recording,
8162 gdbpy_initialize_record): New export.
8163 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
8164 (python_GdbMethods): Add gdbpy_start_recording,
8165 gdbpy_current_recording and gdbpy_stop_recording.
8167 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8169 * record-btrace.c (record_btrace_record_method): New function.
8170 (init_record_btrace_ops): Initialize to_record_method.
8171 * record-full.c (record_full_record_method): New function.
8172 (init_record_full_ops, init_record_full_core_ops): Add
8173 record_full_record_method.
8174 * record.h (enum record_method): New enum.
8175 * target-debug.h (target_debug_print_enum_record_method: New define.
8176 * target-delegates.c: Regenerate.
8177 * target.c (target_record_method): New function.
8178 * target.h: Include record.h.
8179 (struct target_ops) <to_record_method>: New field.
8180 (target_record_method): New export.
8182 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8184 * record.h (record_start, record_stop): New export.
8185 * record.c (record_start, record_stop): New function.
8187 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8189 * btrace.c (btrace_fetch): Copy function call segments pointer
8191 (btrace_clear): Clear the vector.
8192 (btrace_find_insn_by_number): Use binary search to find the correct
8193 function call segment.
8194 * btrace.h (brace_fun_p): New typedef.
8195 (struct btrace_thread_info) <functions>: New field.
8197 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8199 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
8200 * btrace.c (btrace_decode_error): ... here. New function.
8201 * btrace.h (btrace_decode_error): New export.
8203 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8205 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
8206 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
8207 btrace_find_insn_by_number): Remove special case for gaps.
8208 * btrace.h (btrace_insn_get_error): New export.
8209 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
8210 * record-btrace.c (btrace_insn_history): Print number for gaps.
8211 (record_btrace_info, record_btrace_goto): Handle gaps.
8213 2017-02-14 Tom Tromey <tom@tromey.com>
8216 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
8218 * python/py-evts.c (gdbpy_initialize_py_events): Add
8219 before_prompt registry.
8220 * python/py-events.h (events_object) <before_prompt>: New field.
8222 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
8224 * btrace.c (ftrace_new_switch): Preserve up link and flags.
8226 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
8228 * symfile (_initialize_symfile): Add usage text to the load command's
8231 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
8233 * utils.c (defaulted_query): Don't query on secondary UIs.
8235 2017-02-10 Tom Tromey <tom@tromey.com>
8237 * rust-lang.c (rust_get_disr_info): Remove unused variable.
8239 2017-02-10 Tom Tromey <tom@tromey.com>
8241 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
8243 * python/py-type.c (typy_legacy_template_argument): Remove
8244 unnecessary "cleanup" local.
8246 2017-02-10 Tom Tromey <tom@tromey.com>
8248 * python/python.c (do_start_initialization): New function, from
8250 (_initialize_python): Call do_start_initialization.
8251 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
8254 2017-02-10 Tom Tromey <tom@tromey.com>
8256 * python/py-prettyprint.c (pretty_print_one_value): Use
8259 2017-02-10 Tom Tromey <tom@tromey.com>
8261 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
8262 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
8264 * python/py-type.c (field_new): Use gdbpy_ref.
8265 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
8267 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
8268 (py_free_pspace): Likewise.
8269 (pspace_to_pspace_object): Likewise.
8270 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
8271 (py_free_objfile): Likewise.
8272 (objfile_to_objfile_object): Likewise.
8273 * python/py-inferior.c (delete_thread_object): Use
8275 (infpy_read_memory): Likewise.
8276 (py_free_inferior): Likewise.
8277 * python/py-evtregistry.c (create_eventregistry_object): Use
8279 * python/py-event.c (create_event_object): Use gdbpy_ref.
8281 2017-02-10 Tom Tromey <tom@tromey.com>
8283 * python/py-ref.h (gdbpy_ref_policy): Now a template.
8284 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
8286 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
8287 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
8288 python/py-exitedevent.c, python/py-finishbreakpoint.c,
8289 python/py-framefilter.c, python/py-function.c,
8290 python/py-inferior.c, python/py-infevents.c,
8291 python/py-linetable.c, python/py-newobjfileevent.c,
8292 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
8293 python/py-signalevent.c, python/py-stopevent.c,
8294 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
8295 python/py-unwind.c, python/py-utils.c, python/py-value.c,
8296 python/py-varobj.c, python/py-xmethods.c, python/python.c,
8297 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
8299 2017-02-10 Tom Tromey <tom@tromey.com>
8301 * ui-out.h (ui_out_emit_type): New class.
8302 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
8303 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
8304 and ui_out_emit_tuple.
8305 (enumerate_locals): Likewise.
8306 (py_mi_print_variables, py_print_locals, py_print_args): Use
8308 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
8310 * common/gdb_optional.h: New file.
8312 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
8314 * MAINTAINERS (Write After Approval): Update my e-mail address.
8316 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
8319 * breakpoint.c (_initialize_breakpoint): Update the help description
8320 of the 'commands' command to indicate that it takes a list argument.
8322 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
8324 * interps.c (current_interp_set_logging): Remove "return".
8326 2017-02-09 Gary Benson <gbenson@redhat.com>
8328 * symtab.c (add_symtab_completions): Prevent NULL pointer
8331 2017-02-08 Pedro Alves <palves@redhat.com>
8333 * interps.c (interp::interp): Remove reference to quiet_p.
8334 (interp_set): Make static. Remove dead "Switching to" output
8336 (interp_quiet_p, interp_set_quiet): Delete.
8337 (interpreter_exec_cmd): Don't set the interpreter quiet.
8338 * interps.h (interp_quiet_p): Make static.
8339 (class interp) <quiet_p>: Remove field
8341 2017-02-08 Jerome Guitton <guitton@adacore.com>
8343 * cli/cli-decode.c (find_command_name_length): Make it extern.
8344 * cli/cli-decode.h (find_command_name_length): Declare.
8345 * cli/cli-script.c (command_name_equals, line_first_arg):
8347 (process_next_line): Use cli-decode to parse command names.
8348 (build_command_line): Make args a constant pointer.
8350 2017-02-08 Jerome Guitton <guitton@adacore.com>
8352 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
8353 Remove case-insensitive search.
8355 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
8357 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
8358 at the end of the line. Avoids an ARI warning.
8360 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
8362 * NEWS: Mention support for record/replay of Intel 64 rdrand and
8363 rdseed instructions.
8364 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
8366 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
8369 Provide and use sparc32 and sparc64 target description XML files.
8370 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
8371 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
8372 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
8373 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
8374 * features/sparc/sparc32-solaris.xml: New file.
8375 * features/sparc/sparc64-solaris.xml: New file.
8376 * features/sparc/sparc32-solaris.c: Generated.
8377 * features/sparc/sparc64-solaris.c: Generated.
8378 * sparc-tdep.h: Account for differences in target descriptions.
8379 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
8380 (sparc32_register_type): Use target provided registers.
8381 (validate_tdesc_registers): New function.
8382 (sparc32_gdbarch_init): Use tdesc_has_registers.
8383 Set pseudoregister functions.
8384 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
8385 (sparc64_register_type): Use target provided registers.
8386 (sparc64_init_abi): Set pseudoregister functions.
8388 2017-02-03 Tom Tromey <tom@tromey.com>
8391 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
8392 with a single member.
8394 2017-02-03 Pedro Alves <palves@redhat.com>
8396 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
8397 (cli_interp_base::~cli_interp_base): New.
8398 (cli_interp): New struct.
8399 (as_cli_interp): Cast the interp itself to cli_interp.
8400 (cli_interpreter_pre_command_loop): Rename to ...
8401 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
8403 (cli_interpreter_init): Rename to ...
8404 (cli_interp::init): ... this. Remove 'self' parameter. Use
8405 boolean. Make extern.
8406 (cli_interpreter_resume): Rename to ...
8407 (cli_interp::resume): ... this. Remove 'data' parameter. Make
8409 (cli_interpreter_suspend): Rename to ...
8410 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
8412 (cli_interpreter_exec): Rename to ...
8413 (cli_interp::exec): ... this. Remove 'data' parameter. Make
8415 (cli_interpreter_supports_command_editing): Rename to ...
8416 (cli_interp_base::supports_command_editing): ... this. Remove
8417 'interp' parameter. Make extern.
8418 (cli_ui_out): Rename to ...
8419 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
8421 (cli_set_logging): Rename to ...
8422 (cli_interp_base::set_logging): ... this. Remove 'interp'
8423 parameter. Make extern.
8424 (cli_interp_procs): Delete.
8425 (cli_interp_factory): Adjust to use "new".
8426 * cli/cli-interp.h: Include "interps.h".
8427 (struct cli_interp_base): New struct.
8428 * interps.c (struct interp): Delete. Fields moved to interps.h.
8429 (interp_new): Delete.
8430 (interp::interp, interp::~interp): New.
8431 (interp_set): Use bool, and return void. Assume the interpreter
8432 has suspend, init and resume methods, and that the all return
8434 (set_top_level_interpreter): interp_set returns void.
8435 (interp_ui_out): Adapt.
8436 (current_interp_set_logging): Adapt.
8437 (interp_data): Delete.
8438 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
8439 (interp_exec): Adapt.
8440 (top_level_interpreter_data): Delete.
8441 * interps.h (interp_init_ftype, interp_resume_ftype)
8442 (interp_suspend_ftype, interp_exec_ftype)
8443 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
8444 (class interp): New.
8445 (interp_new): Delete.
8446 (interp_set): Now returns void. Use bool.
8447 (interp_data, top_level_interpreter_data): Delete.
8448 * mi/mi-common.h: Include interps.h.
8449 (class mi_interp): Inherit from interp. Define a ctor. Declare
8450 init, resume, suspect, exec, interp_ui_out, set_logging and
8451 pre_command_loop methods.
8452 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
8453 (mi_interpreter_init): Rename to ...
8454 (mi_interp::init): ... this. Remove the 'interp' parameter, use
8455 bool, return void and make extern. Adjust.
8456 (mi_interpreter_resume): ... Rename to ...
8457 (mi_interp::resume): ... this. Remove the 'data' parameter,
8458 return void and make extern. Adjust.
8459 (mi_interpreter_suspend): ... Rename to ...
8460 (mi_interp::suspend): ... this. Remove the 'data' parameter,
8461 return void and make extern. Adjust.
8462 (mi_interpreter_exec): ... Rename to ...
8463 (mi_interp::exec): ... this. Remove the 'data' parameter and make
8465 (mi_interpreter_pre_command_loop): ... Rename to ...
8466 (mi_interp::pre_command_loop): ... this. Remove the 'self'
8467 parameter and make extern.
8468 (mi_on_normal_stop_1): Adjust.
8469 (mi_ui_out): Rename to ...
8470 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
8471 parameter and make extern. Adjust.
8472 (mi_set_logging): Rename to ...
8473 (mi_interp::set_logging): ... this. Remove the 'interp'
8474 parameter and make extern. Adjust.
8475 (mi_interp_procs): Delete.
8476 (mi_interp_factory): Adjust to use 'new'.
8477 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
8478 (mi_print_exception, mi_execute_command, mi_load_progress):
8480 * tui/tui-interp.c (tui_interp): New class.
8481 (as_tui_interp): Return a tui_interp pointer.
8482 (tui_on_normal_stop, tui_on_signal_received)
8483 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
8484 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
8485 to use interp::interp_ui_out.
8486 (tui_init): Rename to ...
8487 (tui_interp::init): ... this. Remove the 'self' parameter, use
8488 bool, return void and make extern. Adjust.
8489 (tui_resume): Rename to ...
8490 (tui_interp::resume): ... this. Remove the 'data' parameter,
8491 return void and make extern. Adjust.
8492 (tui_suspend): Rename to ...
8493 (tui_interp::suspend): ... this. Remove the 'data' parameter,
8494 return void and make extern. Adjust.
8495 (tui_ui_out): Rename to ...
8496 (tui_interp::interp_ui_out): ... this. Remove the 'self'
8497 parameter, and make extern. Adjust.
8498 (tui_exec): Rename to ...
8499 (tui_interp::exec): ... this. Remove the 'data' parameter and
8501 (tui_interp_procs): Delete.
8502 (tui_interp_factory): Use "new".
8504 2017-02-02 Tom Tromey <tom@tromey.com>
8506 * rust-exp.y (ends_raw_string, space_then_number)
8507 (rust_identifier_start_p): Return bool.
8508 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
8509 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
8510 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
8511 (rust_chartype_p): Return bool.
8512 (val_print_struct, rust_print_struct_def, rust_print_type):
8514 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
8517 2017-02-02 Tom Tromey <tom@tromey.com>
8519 * rust-lang.c: Reindent.
8521 2017-02-02 Tom Tromey <tom@tromey.com>
8523 * rust-lang.h (rust_crate_for_block): Update.
8524 * rust-lang.c (rust_crate_for_block): Return std::string.
8525 (rust_get_disr_info): Use std:;string, not
8526 gdb::unique_xmalloc_ptr.
8527 * rust-exp.y (crate_name): Update.
8529 2017-02-02 Pedro Alves <palves@redhat.com>
8531 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
8532 field out of gdb_disassembler_test and make it static.
8534 2017-02-02 Pedro Alves <palves@redhat.com>
8536 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
8537 mi1_interp and mi_interp fields.
8539 2017-02-02 Pedro Alves <palves@redhat.com>
8541 * cli/cli-interp.c (struct saved_output_files, saved_output):
8542 Moved from cli/cli-logging.c.
8543 (cli_set_logging): New function.
8544 (cli_interp_procs): Install cli_set_logging.
8545 * cli/cli-interp.h (make_logging_output, cli_set_logging):
8547 * cli/cli-logging.c (struct saved_output_files, saved_output):
8548 Moved to cli/cli-interp.c.
8549 (pop_output_files): Don't save outputs here.
8550 (make_logging_output): New function.
8551 (handle_redirections): Don't build tee nor save previous outputs
8553 * interps.c (current_interp_set_logging): Change prototype.
8554 Assume there's always a set_logging_proc method installed.
8555 * interps.h (interp_set_logging_ftype): Change prototype.
8556 (current_interp_set_logging): Change prototype and adjust comment.
8557 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
8558 use make_logging_output.
8559 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
8560 2017-02-02 Pedro Alves <palves@redhat.com>
8562 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
8564 (set_logging_overwrite): ... here.
8565 (logging_no_redirect_file): Delete.
8566 (set_logging_redirect): Don't handle redirection on the fly.
8567 Instead warn that "logging off" / "logging on" is necessary.
8568 (pop_output_files): Delete references to logging_no_redirect_file.
8569 (show_logging_command): Always speak in terms of what will happen
8570 once logging is reenabled.
8572 2017-02-02 Pedro Alves <palves@redhat.com>
8574 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
8576 2017-02-02 Pedro Alves <palves@redhat.com>
8578 * disasm.c (gdb_pretty_print_insn): Rename to ...
8579 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
8580 Remove gdbarch parameter. Adapt to clear the object's buffers
8581 instead of allocating new buffers, and to print using the object's
8582 gdb_disassembler instead of calling gdb_print_insn.
8583 (dump_insns): Use gdb_pretty_print_disassembler.
8584 * disasm.h (gdb_pretty_print_insn): Delete declaration.
8585 (gdb_pretty_print_disassembler): New class.
8586 * record-btrace.c (btrace_insn_history): Use
8587 gdb_pretty_print_disassembler.
8589 2017-02-02 Pedro Alves <palves@redhat.com>
8591 * ada-lang.c (type_as_string): Use string_file.
8592 * ada-valprint.c (ada_print_floating): Use string_file.
8593 * ada-varobj.c (ada_varobj_scalar_image)
8594 (ada_varobj_get_value_image): Use string_file.
8595 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
8596 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
8597 * breakpoint.c (update_inserted_breakpoint_locations)
8598 (insert_breakpoint_locations, reattach_breakpoints)
8599 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
8600 (print_it_watchpoint): Use string_file.
8601 (save_breakpoints): Use stdio_file.
8602 * c-exp.y (oper): Use string_file.
8603 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
8605 (pop_output_files): Use delete.
8606 (handle_redirections): Use stdio_file and tee_file.
8607 * cli/cli-setshow.c (do_show_command): Use string_file.
8608 * compile/compile-c-support.c (c_compute_program): Use
8610 * compile/compile-c-symbols.c (generate_vla_size): Take a
8611 'string_file &' instead of a 'ui_file *'.
8612 (generate_c_for_for_one_variable): Take a 'string_file &' instead
8613 of a 'ui_file *'. Use string_file.
8614 (generate_c_for_variable_locations): Take a 'string_file &'
8615 instead of a 'ui_file *'.
8616 * compile/compile-internal.h (generate_c_for_for_one_variable):
8617 Take a 'string_file &' instead of a 'ui_file *'.
8618 * compile/compile-loc2c.c (push, pushf, unary, binary)
8619 (print_label, pushf_register_address, pushf_register)
8620 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
8621 'ui_file *'. Adjust.
8622 * compile/compile.c (compile_to_object): Use string_file.
8623 * compile/compile.h (compile_dwarf_expr_to_c)
8624 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
8626 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
8627 (replace_typedefs_qualified_name): Use string_file and
8629 * disasm.c (gdb_pretty_print_insn): Use string_file.
8630 (gdb_disassembly): Adjust reference the null_stream global.
8631 (do_ui_file_delete): Delete.
8632 (gdb_insn_length): Use null_stream.
8633 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
8634 * dwarf2loc.c (dwarf2_compile_property_to_c)
8635 (locexpr_generate_c_location, loclist_generate_c_location): Take a
8636 'string_file &' instead of a 'ui_file *'.
8637 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
8638 * dwarf2read.c (do_ui_file_peek_last): Delete.
8639 (dwarf2_compute_name): Use string_file.
8640 * event-top.c (gdb_setup_readline): Use stdio_file.
8641 * gdbarch.sh (verify_gdbarch): Use string_file.
8642 * gdbtypes.c (safe_parse_type): Use null_stream.
8643 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
8645 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
8646 'string_file *' instead of a 'ui_file *'.
8647 (gdbscm_arch_disassemble): Use string_file.
8648 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
8649 * guile/scm-ports.c (class ioscm_file_port): Now a class that
8650 inherits from ui_file.
8651 (ioscm_file_port_delete, ioscm_file_port_rewind)
8652 (ioscm_file_port_put): Delete.
8653 (ioscm_file_port_write): Rename to ...
8654 (ioscm_file_port::write): ... this. Remove file_port_magic
8656 (ioscm_file_port_new): Delete.
8657 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
8659 * guile/scm-type.c (tyscm_type_name): Use string_file.
8660 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
8662 * infcmd.c (print_return_value_1): Use string_file.
8663 * infrun.c (print_target_wait_results): Use string_file.
8664 * language.c (add_language): Use string_file.
8665 * location.c (explicit_to_string_internal): Use string_file.
8666 * main.c (captured_main_1): Use null_file.
8667 * maint.c (maintenance_print_architecture): Use stdio_file.
8668 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
8669 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
8670 event_channel>: Change type to mi_console_file pointer.
8671 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
8672 (mi_console_file_delete): Delete.
8673 (struct mi_console_file): Delete.
8674 (mi_console_file_magic): Delete.
8675 (mi_console_file_new): Delete.
8676 (mi_console_file::mi_console_file): New.
8677 (mi_console_file_delete): Delete.
8678 (mi_console_file_fputs): Delete.
8679 (mi_console_file::write): New.
8680 (mi_console_raw_packet): Delete.
8681 (mi_console_file::flush): New.
8682 (mi_console_file_flush): Delete.
8683 (mi_console_set_raw): Rename to ...
8684 (mi_console_file::set_raw): ... this.
8685 * mi/mi-console.h (class mi_console_file): New class.
8686 (mi_console_file_new, mi_console_set_raw): Delete.
8687 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
8688 (mi_set_logging): Use delete and tee_file. Adjust.
8689 * mi/mi-main.c (output_register): Use string_file.
8690 (mi_cmd_data_evaluate_expression): Use string_file.
8691 (mi_cmd_data_read_memory): Use string_file.
8692 (mi_cmd_execute, print_variable_or_computed): Use string_file.
8693 * mi/mi-out.c (mi_ui_out::main_stream): New.
8694 (mi_ui_out::rewind): Use main_stream and
8696 (mi_ui_out::put): Use main_stream and string_file.
8697 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8698 Allocate a 'string_file' instead.
8699 (mi_out_new): Don't allocate a mem_fileopen stream here.
8700 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8701 (mi_ui_out::main_stream): Declare method.
8702 * printcmd.c (eval_command): Use string_file.
8703 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
8704 * python/py-arch.c (archpy_disassemble): Use string_file.
8705 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
8706 * python/py-frame.c (frapy_str): Use string_file.
8707 * python/py-framefilter.c (py_print_type, py_print_single_arg):
8709 * python/py-type.c (typy_str): Use string_file.
8710 * python/py-unwind.c (unwind_infopy_str): Use string_file.
8711 * python/py-value.c (valpy_str): Use string_file.
8712 * record-btrace.c (btrace_insn_history): Use string_file.
8713 * regcache.c (regcache_print): Use stdio_file.
8714 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
8715 * remote.c (escape_buffer): Use string_file.
8716 * rust-lang.c (rust_get_disr_info): Use string_file.
8717 * serial.c (serial_open_ops_1): Use stdio_file.
8718 (do_serial_close): Use delete.
8719 * stack.c (print_frame_arg): Use string_file.
8720 (print_frame_args): Remove local mem_fileopen stream, not used.
8721 (print_frame): Use string_file.
8722 * symmisc.c (maintenance_print_symbols): Use stdio_file.
8723 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
8724 Take a 'string_file *' instead of a 'ui_file *'.
8725 * top.c (new_ui): Use stdio_file and stderr_file.
8726 (free_ui): Use delete.
8727 (execute_command_to_string): Use string_file.
8728 (quit_confirm): Use string_file.
8729 * tracepoint.c (collection_list::append_exp): Use string_file.
8730 * tui/tui-disasm.c (tui_disassemble): Use string_file.
8731 * tui/tui-file.c: Don't include "ui-file.h".
8732 (enum streamtype, struct tui_stream): Delete.
8733 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
8734 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
8735 (tui_file::tui_file): New method.
8736 (tui_file_fputs): Delete.
8737 (tui_file_get_strbuf): Delete.
8738 (tui_file::puts): New method.
8739 (tui_file_adjust_strbuf): Delete.
8740 (tui_file_flush): Delete.
8741 (tui_file::flush): New method.
8742 * tui/tui-file.h: Tweak intro comment.
8744 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
8745 (tui_file_adjust_strbuf): Delete declarations.
8746 (class tui_file): New class.
8747 * tui/tui-io.c (tui_initialize_io): Use tui_file.
8748 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
8749 (tui_register_format): Use string_stream.
8750 * tui/tui-stack.c (tui_make_status_line): Use string_file.
8751 (tui_get_function_from_frame): Use string_file.
8752 * typeprint.c (type_to_string): Use string_file.
8753 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
8754 (null_stream): New global.
8755 (ui_file_delete): Delete.
8756 (ui_file::ui_file): New.
8757 (null_file_isatty): Delete.
8758 (ui_file::~ui_file): New.
8759 (null_file_rewind): Delete.
8760 (ui_file::printf): New.
8761 (null_file_put): Delete.
8762 (null_file_flush): Delete.
8763 (ui_file::putstr): New.
8764 (null_file_write): Delete.
8765 (ui_file::putstrn): New.
8766 (null_file_read): Delete.
8767 (ui_file::putc): New.
8768 (null_file_fputs): Delete.
8769 (null_file_write_async_safe): Delete.
8770 (ui_file::vprintf): New.
8771 (null_file_delete): Delete.
8772 (null_file::write): New.
8773 (null_file_fseek): Delete.
8774 (null_file::puts): New.
8775 (ui_file_data): Delete.
8776 (null_file::write_async_safe): New.
8777 (gdb_flush, ui_file_isatty): Adjust.
8778 (ui_file_put, ui_file_rewind): Delete.
8779 (ui_file_write): Adjust.
8780 (ui_file_write_for_put): Delete.
8781 (ui_file_write_async_safe, ui_file_read): Adjust.
8782 (ui_file_fseek): Delete.
8783 (fputs_unfiltered): Adjust.
8784 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
8785 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
8786 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
8787 (set_ui_file_data): Delete.
8788 (string_file::~string_file, string_file::write)
8789 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
8790 (do_ui_file_as_string, ui_file_as_string): Delete.
8791 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
8792 (struct mem_file): Delete.
8793 (mem_file_new): Delete.
8794 (stdio_file::stdio_file): New.
8795 (mem_file_delete): Delete.
8796 (stdio_file::stdio_file): New.
8797 (mem_fileopen): Delete.
8798 (stdio_file::~stdio_file): New.
8799 (mem_file_rewind): Delete.
8800 (stdio_file::set_stream): New.
8801 (mem_file_put): Delete.
8802 (stdio_file::open): New.
8803 (mem_file_write): Delete.
8804 (stdio_file_magic, struct stdio_file): Delete.
8805 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
8806 (stdio_file::flush): New.
8807 (stdio_file_read): Rename to ...
8808 (stdio_file::read): ... this. Adjust.
8809 (stdio_file_write): Rename to ...
8810 (stdio_file::write): ... this. Adjust.
8811 (stdio_file_write_async_safe): Rename to ...
8812 (stdio_file::write_async_safe) ... this. Adjust.
8813 (stdio_file_fputs): Rename to ...
8814 (stdio_file::puts) ... this. Adjust.
8815 (stdio_file_isatty): Delete.
8816 (stdio_file_fseek): Delete.
8817 (stdio_file::isatty): New.
8818 (stderr_file_write): Rename to ...
8819 (stderr_file::write) ... this. Adjust.
8820 (stderr_file_fputs): Rename to ...
8821 (stderr_file::puts) ... this. Adjust.
8822 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
8823 (stderr_file::stderr_file): New.
8824 (tee_file_magic): Delete.
8825 (struct tee_file): Delete.
8826 (tee_file::tee_file): New.
8827 (tee_file_new): Delete.
8828 (tee_file::~tee_file): New.
8829 (tee_file_delete): Delete.
8830 (tee_file_flush): Rename to ...
8831 (tee_file::flush): ... this. Adjust.
8832 (tee_file_write): Rename to ...
8833 (tee_file::write): ... this. Adjust.
8834 (tee_file::write_async_safe): New.
8835 (tee_file_fputs): Rename to ...
8836 (tee_file::puts): ... this. Adjust.
8837 (tee_file_isatty): Rename to ...
8838 (tee_file::isatty): ... this. Adjust.
8839 * ui-file.h (struct obstack, struct ui_file): Don't
8841 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
8842 (ui_file_write_ftype)
8843 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
8844 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
8845 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
8846 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
8847 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
8848 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
8849 (set_ui_file_fseek): Delete.
8850 (ui_file_data, ui_file_delete, ui_file_rewind)
8851 (struct ui_file): New.
8853 (class null_file): New.
8854 (null_stream): Declare.
8855 (ui_file_write_for_put, ui_file_put): Delete.
8856 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
8858 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
8859 (gdb_fopen, tee_file_new): Delete.
8860 (struct string_file): New.
8861 (struct stdio_file): New.
8862 (stdio_file_up): New.
8863 (struct stderr_file): New.
8864 (class tee_file): New.
8865 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
8866 of a 'ui_file *'. Adjust.
8867 * ui-out.h (class ui_out) <field_stream>: Likewise.
8868 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
8869 (null_stream): Delete.
8870 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
8872 * utils.h (struct ui_file): Delete forward declaration..
8873 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
8874 (error_stream): Take a 'string_file &' instead of a
8876 * varobj.c (varobj_value_get_print_value): Use string_file.
8877 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
8878 * gdbarch.c: Regenerate.
8880 2017-02-02 Pedro Alves <palves@redhat.com>
8882 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
8883 (gdb_pretty_print_insn): ... this. Now a free function. Add back
8884 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
8885 Adjust to call gdb_print_insn instead of
8886 gdb_disassembler::print_insn.
8887 (dump_insns, do_mixed_source_and_assembly_deprecated)
8888 (do_mixed_source_and_assembly, do_assembly_only): Add back a
8889 'gdbarch' parameter. Remove gdb_disassembler parameter.
8890 (gdb_disassembly): Don't allocate a gdb_disassembler here.
8891 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
8893 (gdb_pretty_print_insn): Re-add declaration.
8894 * record-btrace.c (btrace_insn_history): Don't allocate a
8895 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
8897 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
8899 * disasm.h (gdb_disassembly): Remove file_string parameter.
8900 * disasm.c (gdb_disassembly): Likewise.
8901 * cli/cli-cmds.c (print_disassembly): Adapt.
8902 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
8903 * stack.c (do_gdb_disassembly): Likewise.
8905 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
8907 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
8908 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
8909 targets. And if the implicit value is longer than needed, extract
8910 the first bytes instead of the "least significant" ones.
8912 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
8914 * btrace.c (btrace_enable): Do not call btrace_add_pc for
8915 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
8916 (btrace_fetch): Assert can_access_registers_ptid.
8917 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
8918 validate_registers_access.
8920 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
8922 * gdbthread.h (can_access_registers_ptid): New.
8923 * thread.c (can_access_registers_ptid): New.
8925 2017-02-01 Pedro Alves <palves@redhat.com>
8927 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
8929 2017-01-31 Pedro Alves <palves@redhat.com>
8931 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
8934 2017-01-31 Pedro Alves <palves@redhat.com>
8936 * stack.c (print_frame_args): Remove local mem_fileopen stream,
8939 2017-01-31 Pedro Alves <palves@redhat.com>
8941 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
8943 2017-01-31 Pedro Alves <palves@redhat.com>
8945 * common/scoped_restore.h
8946 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
8947 change the value's parameter type to T2.
8948 (make_scoped_restore): Likewise.
8950 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8951 Richard Henderson <rth@redhat.com>
8953 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
8954 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
8955 GS_BASE for older kernels.
8956 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
8957 GS_BASE for older kernels.
8958 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
8959 and GS_BASE to the offset table.
8960 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
8961 system register group.
8962 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
8964 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
8966 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
8967 AMD64_GSBASE_REGNUM.
8968 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
8969 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
8970 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
8971 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
8972 i386/64bit-segments.xml in those rules.
8973 * features/i386/64bit-segments.xml: New file.
8974 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
8975 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
8976 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
8977 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
8978 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
8979 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
8980 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
8981 * features/i386/amd64-avx-linux.c: Regenerated.
8982 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
8983 * features/i386/amd64-avx-mpx.c: Regenerated.
8984 * features/i386/amd64-avx512-linux.c: Regenerated.
8985 * features/i386/amd64-linux.c: Regenerated.
8986 * features/i386/amd64-mpx-linux.c: Regenerated.
8987 * features/i386/i386-avx-mpx-linux.c: Regenerated.
8988 * features/i386/i386-avx-mpx.c: Regenerated.
8989 * features/i386/x32-avx-linux.c: Regenerated.
8990 * features/i386/x32-avx512-linux.c: Regenerated.
8991 * regformats/i386/amd64-avx-linux.dat: Regenerated.
8992 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
8993 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
8994 * regformats/i386/amd64-linux.dat: Regenerated.
8995 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
8996 * regformats/i386/x32-avx-linux.dat: Regenerated.
8997 * regformats/i386/x32-avx512-linux.dat: Regenerated.
8998 * regformats/i386/x32-linux.dat: Regenerated.
9000 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
9002 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
9003 Set to AMD64_NUM_REGS.
9005 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
9007 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
9008 that checks validity of a register number.
9010 2017-01-27 Kees Cook <keescook@google.com>
9012 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
9013 fetch_fpregs if target has fpa registers.
9014 (arm_linux_store_inferior_registers): Call store_fpregs if target
9017 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
9019 * cris-tdep.c (cris_gdbarch_init): Remove check for
9020 info.byte_order and force it to BFD_ENDIAN_LITTLE.
9022 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
9024 * corelow.c (get_core_register_section): Check for regset
9025 existence before checking for REGSET_VARIABLE_SIZE.
9027 2017-01-26 Yao Qi <yao.qi@linaro.org>
9028 Pedro Alves <palves@redhat.com>
9031 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
9032 call memory_error, save memaddr instead.
9033 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
9034 negative, cal memory_error.
9035 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
9037 2017-01-26 Yao Qi <yao.qi@linaro.org>
9039 * disasm-selftests.c (memory_error_test): New function.
9040 (_initialize_disasm_selftests): Register memory_error_test.
9042 2017-01-26 Yao Qi <yao.qi@linaro.org>
9044 * Makefile.in (SFILES): Add disasm-selftests.c and
9046 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
9047 * disasm-selftests.c: New file.
9048 * selftest-arch.c: New file.
9049 * selftest-arch.h: New file.
9051 2017-01-26 Yao Qi <yao.qi@linaro.org>
9053 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
9054 to bfd_arch_mep. Don't return 0 if section is not
9055 found. Call print_insn_mep.
9057 2017-01-26 Pedro Alves <palves@redhat.com>
9058 Yao Qi <yao.qi@linaro.org>
9060 * arm-tdep.c: Include "disasm.h".
9061 (gdb_print_insn_arm): Update code to get gdbarch.
9062 * disasm.c (dis_asm_read_memory): Change it to
9063 gdb_disassembler::dis_asm_read_memory.
9064 (dis_asm_memory_error): Likewise.
9065 (dis_asm_print_address): Likewise.
9066 (gdb_pretty_print_insn): Change it to
9067 gdb_disassembler::pretty_print_insn.
9068 (dump_insns): Add one argument gdb_disassemlber. All
9070 (do_mixed_source_and_assembly_deprecated): Likewise.
9071 (do_mixed_source_and_assembly): Likewise.
9072 (do_assembly_only): Likewise.
9073 (gdb_disassembler::gdb_disassembler): New.
9074 (gdb_disassembler::print_insn): New.
9075 * disasm.h (class gdb_disassembler): New.
9076 (gdb_pretty_print_insn): Remove declaration.
9077 (gdb_disassemble_info): Likewise.
9078 * guile/scm-disasm.c (class gdbscm_disassembler): New.
9079 (gdbscm_disasm_read_memory_worker): Update.
9080 (gdbscm_disasm_read_memory): Update.
9081 (gdbscm_disasm_memory_error): Remove.
9082 (gdbscm_disasm_print_address): Remove.
9083 (gdbscm_disassembler::gdbscm_disassembler): New.
9084 (gdbscm_print_insn_from_port): Update.
9085 * mips-tdep.c: Include disasm.h.
9086 (gdb_print_insn_mips): Update code to get gdbarch.
9087 * record-btrace.c (btrace_insn_history): Update.
9088 * spu-tdep.c: Include disasm.h.
9089 (struct spu_dis_asm_data): Remove.
9090 (struct spu_dis_asm_info): New.
9091 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
9093 (gdb_print_insn_spu): Cast disassemble_info to
9096 2017-01-26 Yao Qi <yao.qi@linaro.org>
9098 * disasm.c (do_ui_file_delete): Delete.
9099 (gdb_insn_length): Move code creating stream to ...
9100 * utils.c (null_stream): ... here. New function.
9101 * utils.h (null_stream): Declare.
9103 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
9105 * python/py-inferior.c (find_thread_object): Return directly
9106 from the loop. Remove "found" variable.
9108 2017-01-21 Joel Brobecker <brobecker@adacore.com>
9110 GDB 7.12.1 released.
9112 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
9114 * python/py-function.c (fnpy_call): Reorder declarations to have
9115 the gdbpy_enter object declared first.
9116 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
9118 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
9121 * python/python-internal.h (PyMem_RawMalloc): Define for
9123 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
9124 PyMem_RawMalloc instead of PyMem_Malloc.
9126 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
9127 Luis Machado <lgustavo@codesourcery.com>
9129 * NEWS (New commands): Mention flash-erase.
9130 (New MI commands): Mention target-flash-erase.
9131 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
9133 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
9134 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
9135 * target.c (flash_erase_command): New function.
9136 (initialize_targets): Add new flash-erase command.
9137 * target.h (flash_erase_command): New declaration.
9139 2017-01-20 Joel Brobecker <brobecker@adacore.com>
9141 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
9142 HAVE_SYS_PROCFS_H is defined.
9144 2017-01-18 Alan Hayward <alan.hayward@arm.com>
9146 * remote.c (struct cached_reg): Change data into a pointer.
9147 * (stop_reply_dtr): Free data pointers before deleting vector.
9148 (process_stop_reply): Likewise.
9149 (remote_parse_stop_reply): Allocate space for data
9151 2017-01-18 Alan Hayward <alan.hayward@arm.com>
9153 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
9155 (amd64_pseudo_register_read_value): Likewise.
9156 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
9157 (store_register_using_P): Likewise.
9158 * regcache.c (regcache_xfer_part): Likewise.
9160 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
9162 Split real and pseudo registers.
9163 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
9164 (sparc32_pseudo_regnum): New enum.
9165 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
9166 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
9167 (SPARC32_CP0_REGISTERS): New macro.
9168 (sparc32_pseudo_register_name): New function.
9169 (sparc32_register_name): Use sparc32_pseudo_register_name.
9170 (sparc32_pseudo_register_type): New function.
9171 (sparc32_register_type): Use sparc32_pseudo_register_type.
9172 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
9173 pseudo register numbers.
9174 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
9175 (SPARC64_CP0_REGISTERS): New macro.
9176 (sparc64_pseudo_register_name): New function.
9177 (sparc64_register_name): Use sparc64_pseudo_register_name.
9178 (sparc64_pseudo_register_type): New function.
9179 (sparc64_register_type): Use sparc64_pseudo_register_type.
9180 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
9181 pseudo register numbers.
9182 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
9183 sparc64_store_arguments): Handle pseudo register numbers.
9185 2017-01-13 Yao Qi <yao.qi@linaro.org>
9187 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
9188 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
9190 (getpkt_or_notif_sane_1): Likewise.
9192 2017-01-13 Yao Qi <yao.qi@linaro.org>
9194 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
9195 of CC. Pass "-x c++-header" instead of "-x c".
9197 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
9199 * remote.c (remote_can_async_p): Update comment.
9201 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
9203 * linux-nat.c (linux_nat_can_async_p): Update comment.
9205 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
9207 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
9209 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
9211 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
9213 2017-01-10 Tom Tromey <tom@tromey.com>
9215 * python/py-type.c (typy_legacy_template_argument): Update.
9216 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
9217 ~demangle_parse_info): Declare new members.
9218 (cp_demangled_name_to_comp): Return unique_ptr.
9219 (cp_demangled_name_parse_free)
9220 (make_cleanup_cp_demangled_name_parse_free)
9221 (cp_new_demangle_parse_info): Remove.
9222 * cp-support.c (do_demangled_name_parse_free_cleanup)
9223 (make_cleanup_cp_demangled_name_parse_free): Remove.
9224 (inspect_type, cp_canonicalize_string_full)
9225 (cp_canonicalize_string): Update.
9226 (mangled_name_to_comp): Change return type.
9227 (cp_class_name_from_physname, method_name_from_physname)
9228 (cp_func_name, cp_remove_params): Update.
9229 * cp-name-parser.y (demangle_parse_info): New constructor, from
9230 cp_new_demangle_parse_info.
9231 (~demangle_parse_info): New destructor, from
9232 cp_demangled_name_parse_free.
9233 (cp_merge_demangle_parse_infos): Update.
9234 (cp_demangled_name_to_comp): Change return type.
9236 2017-01-10 Tom Tromey <tom@tromey.com>
9238 * top.c (prevent_dont_repeat): Change return type.
9239 * python/python.c (execute_gdb_command): Use std::string.
9241 * guile/guile.c (gdbscm_execute_gdb_command): Update.
9242 * command.h (prevent_dont_repeat): Change return type.
9243 * breakpoint.c (bpstat_do_actions_1): Update.
9245 2017-01-10 Tom Tromey <tom@tromey.com>
9247 * value.h (scoped_value_mark::~scoped_value_mark): Call
9249 (scoped_value_mark::free_to_mark): New method.
9250 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
9253 2017-01-10 Tom Tromey <tom@tromey.com>
9255 * python/py-value.c (valpy_dereference, valpy_referenced_value)
9256 (valpy_reference_value, valpy_const_value, valpy_get_address)
9257 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
9258 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
9259 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
9260 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
9262 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
9263 * value.h (scoped_value_mark): New class.
9265 2017-01-10 Tom Tromey <tom@tromey.com>
9267 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
9268 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
9269 * psymtab.c (discard_psymtabs_upto): Remove.
9270 (make_cleanup_discard_psymtabs): Remove.
9271 (struct psymtab_state): Remove.
9273 2017-01-10 Tom Tromey <tom@tromey.com>
9275 * record-full.c (record_full_save_cleanups): Remove.
9276 (record_full_save): Use gdb::unlinker.
9277 * gcore.c (do_bfd_delete_cleanup): Remove.
9278 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
9280 * dwarf2read.c (unlink_if_set): Remove.
9281 (write_psymtabs_to_index): Use gdb::unlinker.
9282 * common/gdb_unlinker.h: New file.
9284 2017-01-10 Tom Tromey <tom@tromey.com>
9286 * windows-tdep.c (windows_xfer_shared_library): Update.
9287 * windows-nat.c (windows_make_so): Update.
9288 * utils.h (make_cleanup_bfd_unref): Remove.
9289 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
9290 * symfile.h (symfile_bfd_open)
9291 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
9292 * symfile.c (read_symbols, symbol_file_add)
9293 (separate_debug_file_exists): Update.
9294 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
9295 (generic_load, reread_symbols): Update.
9296 * symfile-mem.c (symbol_file_add_from_memory): Update.
9297 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
9298 (spu_symbol_file_add_from_memory): Update.
9299 * solist.h (struct target_so_ops) <bfd_open>: Return
9301 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
9302 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
9304 (solib_map_sections, reload_shared_libraries_1): Update.
9305 * solib-svr4.c (enable_break): Update.
9306 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
9307 * solib-frv.c (enable_break2): Update.
9308 * solib-dsbt.c (enable_break): Update.
9309 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
9311 (darwin_solib_get_all_image_info_addr_at_init): Update.
9312 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
9313 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
9314 * record-full.c (record_full_save): Update.
9315 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
9316 * procfs.c (insert_dbx_link_bpt_in_file): Update.
9317 * minidebug.c (find_separate_debug_file_in_section): Return
9319 * machoread.c (macho_add_oso_symfile): Change abfd to
9321 (macho_symfile_read_all_oso): Update.
9322 (macho_check_dsym): Return gdb_bfd_ref_ptr.
9323 (macho_symfile_read): Update.
9324 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
9325 (jit_bfd_try_read_symtab): Update.
9326 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9327 (gdb_bfd_openw, gdb_bfd_openr_iovec)
9328 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
9330 (gdb_bfd_ref_policy): New struct.
9331 (gdb_bfd_ref_ptr): New typedef.
9332 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9333 (gdb_bfd_openw, gdb_bfd_openr_iovec)
9334 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
9336 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
9337 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
9338 (gcore_command): Update.
9339 * exec.c (exec_file_attach): Update.
9340 * elfread.c (elf_symfile_read): Update.
9341 * dwarf2read.c (dwarf2_get_dwz_file): Update.
9342 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
9343 (open_and_init_dwo_file): Update.
9344 (open_dwp_file): Return gdb_bfd_ref_ptr.
9345 (open_and_init_dwp_file): Update.
9346 * corelow.c (core_open): Update.
9347 * compile/compile-object-load.c (compile_object_load): Update.
9348 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
9349 * coffread.c (coff_symfile_read): Update.
9350 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
9351 gdb_bfd_ref_ptr. Rename.
9352 (dump_bfd_file, restore_command): Update.
9353 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
9354 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
9355 (find_separate_debug_file_by_buildid): Update.
9357 2017-01-10 Tom Tromey <tom@tromey.com>
9359 * common/gdb_ref_ptr.h: New file.
9360 * python/py-ref.h (struct gdbpy_ref_policy): New.
9361 (gdbpy_ref): Now a typedef.
9363 2017-01-10 Tom Tromey <tom@tromey.com>
9365 * utils.h (make_cleanup_htab_delete): Don't declare.
9366 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
9368 * linespec.c (decode_compound_collector): Add constructor,
9370 (lookup_prefix_sym): Remove cleanup.
9371 (symtab_collector): Add constructor, destructor.
9372 (collect_symtabs_from_filename): Remove cleanup.
9373 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
9374 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
9376 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
9377 * dwarf2read.c (dw2_expand_symtabs_matching)
9378 (dw2_map_symbol_filenames, dwarf_decode_macros)
9379 (write_psymtabs_to_index): Use htab_up.
9380 * dwarf2loc.c (func_verify_no_selftailcall)
9381 (call_site_find_chain_1, func_verify_no_selftailcall)
9382 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
9383 std::vector, gdb::unique_xmalloc_ptr.
9384 (call_sitep): Remove typedef.
9385 (dwarf2_locexpr_baton_eval): Remove unused variable.
9387 2017-01-10 Tom Tromey <tom@tromey.com>
9389 * python/python-internal.h (make_cleanup_py_decref)
9390 (make_cleanup_py_xdecref): Don't declare.
9391 * python/py-utils.c (py_decref, make_cleanup_py_decref)
9392 (py_xdecref, make_cleanup_py_xdecref): Remove.
9394 2017-01-10 Tom Tromey <tom@tromey.com>
9396 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
9397 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
9399 2017-01-10 Tom Tromey <tom@tromey.com>
9401 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
9403 2017-01-10 Tom Tromey <tom@tromey.com>
9405 * python/py-utils.c (unicode_to_encoded_string)
9406 (python_string_to_target_string)
9407 (python_string_to_target_python_string)
9408 (python_string_to_host_string, gdbpy_obj_to_string)
9409 (get_addr_from_python): Use gdbpy_ref.
9411 2017-01-10 Tom Tromey <tom@tromey.com>
9413 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
9416 2017-01-10 Tom Tromey <tom@tromey.com>
9418 * python/python.c (eval_python_command, gdbpy_decode_line)
9419 (gdbpy_run_events, gdbpy_start_type_printers)
9420 (gdbpy_apply_type_printers): Use gdbpy_ref.
9422 2017-01-10 Tom Tromey <tom@tromey.com>
9424 * python/py-param.c (get_doc_string, compute_enum_values): Use
9427 2017-01-10 Tom Tromey <tom@tromey.com>
9429 * python/py-inferior.c (find_thread_object, build_inferior_list):
9432 2017-01-10 Tom Tromey <tom@tromey.com>
9434 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
9436 2017-01-10 Tom Tromey <tom@tromey.com>
9438 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
9441 2017-01-10 Tom Tromey <tom@tromey.com>
9443 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
9445 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
9448 2017-01-10 Tom Tromey <tom@tromey.com>
9450 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
9453 2017-01-10 Tom Tromey <tom@tromey.com>
9455 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
9456 decref results of PyArg_ParseTupleAndKeywords.
9458 2017-01-10 Tom Tromey <tom@tromey.com>
9460 * python/python.c (python_run_simple_file): Use
9461 unique_xmalloc_ptr, gdbpy_ref.
9463 2017-01-10 Tom Tromey <tom@tromey.com>
9465 * python/py-prettyprint.c (print_stack_unless_memory_error)
9466 (print_string_repr, print_children): Use gdbpy_ref.
9467 (dummy_python_frame): New class.
9468 (dummy_python_frame::dummy_python_frame): Rename from
9469 push_dummy_python_frame.
9470 (py_restore_tstate): Remove.
9472 2017-01-10 Tom Tromey <tom@tromey.com>
9474 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
9476 2017-01-10 Tom Tromey <tom@tromey.com>
9478 * python/python.c (ensure_python_env, restore_python_env):
9480 * python/python-internal.h (ensure_python_env): Don't declare.
9481 * varobj.h (varobj_ensure_python_env): Don't declare.
9482 * varobj.c (varobj_ensure_python_env): Remove.
9484 2017-01-10 Tom Tromey <tom@tromey.com>
9486 * varobj.c (varobj_value_get_print_value): Use
9489 2017-01-10 Tom Tromey <tom@tromey.com>
9491 * python/py-prettyprint.c (print_string_repr, print_children):
9493 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
9495 * varobj.c (varobj_value_get_print_value): Update.
9496 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
9498 2017-01-10 Tom Tromey <tom@tromey.com>
9500 * varobj.c (varobj_get_display_hint)
9501 (dynamic_varobj_has_child_method, install_new_value_visualizer)
9502 (varobj_set_visualizer, free_variable): Use
9505 2017-01-10 Tom Tromey <tom@tromey.com>
9507 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
9508 (do_finish_initialization): New function. Use gdbpy_ref.
9509 (gdbpy_finish_initialization): Use gdbpy_enter. Call
9510 do_finish_initialization.
9512 2017-01-10 Tom Tromey <tom@tromey.com>
9514 * python/py-param.c (get_set_value, get_show_value): Use
9515 gdbpy_enter, gdbpy_ref.
9517 2017-01-10 Tom Tromey <tom@tromey.com>
9519 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
9521 2017-01-10 Tom Tromey <tom@tromey.com>
9523 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
9525 2017-01-10 Tom Tromey <tom@tromey.com>
9527 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
9528 Use gdbpy_enter_varobj.
9530 2017-01-10 Tom Tromey <tom@tromey.com>
9532 * varobj.c (gdbpy_enter_varobj): New constructor.
9533 * python/python-internal.h (gdbpy_enter_varobj): New class.
9534 * python/py-varobj.c (py_varobj_get_iterator): Use
9537 2017-01-10 Tom Tromey <tom@tromey.com>
9539 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
9540 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
9541 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
9542 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
9544 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
9546 2017-01-10 Tom Tromey <tom@tromey.com>
9548 * python/py-xmethods.c (invoke_match_method): Use
9551 2017-01-10 Tom Tromey <tom@tromey.com>
9553 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
9554 gdbpy_enter, gdbpy_ref.
9556 2017-01-10 Tom Tromey <tom@tromey.com>
9558 * python/python.c (python_interactive_command): Use gdbpy_enter.
9560 2017-01-10 Tom Tromey <tom@tromey.com>
9562 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
9565 2017-01-10 Tom Tromey <tom@tromey.com>
9567 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
9568 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
9570 2017-01-10 Tom Tromey <tom@tromey.com>
9572 * utils.h (htab_deleter): New struct.
9573 (htab_up): New typedef.
9574 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
9575 gdbpy_enter, gdbpy_ref, htab_up.
9577 2017-01-10 Tom Tromey <tom@tromey.com>
9579 * python/py-unwind.c (pending_frame_invalidate): Remove.
9580 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
9582 2017-01-10 Tom Tromey <tom@tromey.com>
9584 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
9585 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
9587 2017-01-10 Tom Tromey <tom@tromey.com>
9589 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
9591 2017-01-10 Tom Tromey <tom@tromey.com>
9593 * python/python.c (gdbpy_eval_from_control_command)
9594 (gdbpy_source_script, gdbpy_run_events)
9595 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
9596 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
9599 2017-01-10 Tom Tromey <tom@tromey.com>
9601 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
9603 2017-01-10 Tom Tromey <tom@tromey.com>
9605 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
9607 2017-01-10 Tom Tromey <tom@tromey.com>
9609 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
9610 (python_on_inferior_call_pre, python_on_inferior_call_post)
9611 (python_on_memory_change, python_on_register_change)
9612 (python_inferior_exit, python_new_objfile, add_thread_object)
9613 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
9615 2017-01-10 Tom Tromey <tom@tromey.com>
9617 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
9618 (bpfinishpy_handle_exit): Use gdbpy_enter.
9620 2017-01-10 Tom Tromey <tom@tromey.com>
9622 * python/py-cmd.c (cmdpy_destroyer)
9623 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
9626 2017-01-10 Tom Tromey <tom@tromey.com>
9628 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
9630 (gdbpy_breakpoint_has_cond): Likewise.
9632 2017-01-10 Tom Tromey <tom@tromey.com>
9634 * python/python.c (gdbpy_enter): New constructor.
9635 (~gdbpy_enter): New destructor.
9636 (restore_python_env, ensure_python_env): Rewrite.
9637 * python/python-internal.h (gdbpy_enter): New class.
9639 2017-01-10 Tom Tromey <tom@tromey.com>
9641 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
9643 2017-01-10 Tom Tromey <tom@tromey.com>
9645 * python/py-value.c (value_has_field, get_field_flag)
9646 (get_field_type, valpy_getitem, convert_value_from_python): Use
9649 2017-01-10 Tom Tromey <tom@tromey.com>
9651 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
9654 2017-01-10 Tom Tromey <tom@tromey.com>
9656 * python/py-prettyprint.c (search_pp_list)
9657 (find_pretty_printer_from_objfiles)
9658 (find_pretty_printer_from_progspace)
9659 (find_pretty_printer_from_gdb, find_pretty_printer)
9660 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
9663 2017-01-10 Tom Tromey <tom@tromey.com>
9665 * python/py-param.c (call_doc_function): Use gdbpy_ref.
9667 2017-01-10 Tom Tromey <tom@tromey.com>
9669 * python/py-linetable.c (build_line_table_tuple_from_pcs)
9670 (ltpy_get_all_source_lines): Use gdbpy_ref.
9672 2017-01-10 Tom Tromey <tom@tromey.com>
9674 * python/py-framefilter.c (extract_sym, extract_value)
9675 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
9678 2017-01-10 Tom Tromey <tom@tromey.com>
9680 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
9682 2017-01-10 Tom Tromey <tom@tromey.com>
9684 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
9686 2017-01-10 Tom Tromey <tom@tromey.com>
9688 * python/py-function.c (convert_values_to_python, fnpy_init): Use
9691 2017-01-10 Tom Tromey <tom@tromey.com>
9693 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
9695 2017-01-10 Tom Tromey <tom@tromey.com>
9697 * python/py-type.c (convert_field, make_fielditem, typy_fields)
9698 (typy_range): Use gdbpy_ref.
9700 2017-01-10 Tom Tromey <tom@tromey.com>
9702 * python/py-threadevent.c (create_thread_event_object): Use
9704 * python/py-stopevent.c (create_stop_event_object): Simplify.
9705 (emit_stop_event): Use gdbpy_ref.
9706 * python/py-signalevent.c (create_signal_event_object): Use
9708 * python/py-newobjfileevent.c (create_new_objfile_event_object)
9709 (emit_new_objfile_event, create_clear_objfiles_event_object)
9710 (emit_clear_objfiles_event): Use gdbpy_ref.
9711 * python/py-infevents.c (create_inferior_call_event_object)
9712 (create_register_changed_event_object)
9713 (create_memory_changed_event_object, emit_inferior_call_event)
9714 (emit_memory_changed_event, emit_register_changed_event): Use
9716 * python/py-exitedevent.c (create_exited_event_object)
9717 (emit_exited_event): Use gdbpy_ref.
9718 * python/py-event.h (evpy_emit_event): Remove
9719 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
9720 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
9721 * python/py-continueevent.c (emit_continue_event): Use
9723 * python/py-breakpoint.c (gdbpy_breakpoint_created)
9724 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
9726 * python/py-bpevent.c (create_breakpoint_event_object): Use
9729 2017-01-10 Tom Tromey <tom@tromey.com>
9731 * python/py-ref.h: New file.
9733 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
9735 * cli-out.c (cli_ui_out::do_redirect): Change return type to
9737 * cli-out.h (cli_ui_out::do_redirect): Likewise.
9738 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
9739 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
9740 * ui-out.c (ui_out::redirect): Likewise.
9741 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
9742 * cli/cli-logging.c (set_logging_redirect): Update call site of
9744 (handle_redirections): Likewise.
9745 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
9746 * top.c (execute_command_to_string): Likewise.
9747 * utils.c (do_ui_out_redirect_pop): Likewise.
9749 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
9751 * stack.c (_initialize_stack): Update "frame" command help message.
9753 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
9755 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
9757 2017-01-06 Yao Qi <yao.qi@linaro.org>
9759 * x86-linux-nat.h: Include gdb_proc_service.h.
9761 2017-01-06 Yao Qi <yao.qi@linaro.org>
9763 * ser-base.h: Include serial.h.
9765 2017-01-06 Yao Qi <yao.qi@linaro.org>
9767 * ppc-linux-tdep.h: Include ppc-tdep.h.
9769 2017-01-06 Yao Qi <yao.qi@linaro.org>
9771 * nat/amd64-linux-siginfo.h: Include signal.h.
9773 2017-01-06 Yao Qi <yao.qi@linaro.org>
9775 * nat/aarch64-linux-hw-point.h: Include break-common.h.
9777 2017-01-06 Yao Qi <yao.qi@linaro.org>
9779 * mi/mi-parse.h: Include mi-cmds.h.
9781 2017-01-06 Yao Qi <yao.qi@linaro.org>
9783 * inf-loop.c: Don't include "target.h".
9784 * inf-loop.h: Include it here.
9786 2017-01-06 Yao Qi <yao.qi@linaro.org>
9788 * dfp.h: Include "dboulest.h" and "expression.h".
9790 2017-01-06 Yao Qi <yao.qi@linaro.org>
9792 * ax-gdb.h: Include "ax.h".
9794 2017-01-06 Yao Qi <yao.qi@linaro.org>
9796 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
9797 with nat/gdb_ptrace.h.
9799 2017-01-05 Yao Qi <yao.qi@linaro.org>
9801 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
9803 (mips64_fbsd_sigframe_init): Likewise.
9805 2017-01-04 John Baldwin <jhb@FreeBSD.org>
9807 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
9808 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
9810 2017-01-04 John Baldwin <jhb@FreeBSD.org>
9812 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
9813 * NEWS: Mention new FreeBSD/mips native configuration.
9814 * config/mips/fbsd.mh: New file.
9815 * configure.host: Add mips*-*-freebsd*.
9816 * mips-fbsd-nat.c: New file.
9818 2017-01-04 John Baldwin <jhb@FreeBSD.org>
9820 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
9821 (ALLDEPFILES): Add mips-fbsd-tdep.c.
9822 * NEWS: Mention new FreeBSD/mips target.
9823 * configure.tgt: Add mips*-*-freebsd*.
9824 * mips-fbsd-tdep.c: New file.
9825 * mips-fbsd-tdep.h: New file.
9827 2017-01-04 Yao Qi <yao.qi@linaro.org>
9829 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
9830 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
9832 2017-01-01 Joel Brobecker <brobecker@adacore.com>
9834 Update copyright year range in all GDB files.
9836 2017-01-01 Joel Brobecker <brobecker@adacore.com>
9838 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
9840 For older changes see ChangeLog-2016.
9846 version-control: never