1 2017-09-06 Keith Seitz <keiths@redhat.com>
3 * dwarf2read.c (dw2_linkage_name_attr): New function.
4 (dw2_linkage_name): New function.
5 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
9 2017-09-06 Kamil Rytarowski <n54@gmx.com>
11 * config/djgpp/djconfig.sh: Correct shell portability issue.
13 2017-09-06 Kamil Rytarowski <n54@gmx.com>
15 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
17 2017-09-06 John Baldwin <jhb@FreeBSD.org>
19 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
20 * NEWS: Mention new FreeBSD/mips native configuration.
21 * configure.host: Add aarch64*-*-freebsd*.
22 * configure.nat: Likewise.
23 * aarch64-fbsd-nat.c: New file.
25 2017-09-06 John Baldwin <jhb@FreeBSD.org>
27 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
28 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
29 * NEWS: Mention new FreeBSD/aarch64 target.
30 * configure.tgt: Add aarch64*-*-freebsd*.
31 * aarch64-fbsd-tdep.c: New file.
32 * aarch64-fbsd-tdep.h: New file.
34 2017-09-06 Kamil Rytarowski <n54@gmx.com>
36 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
38 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
40 * parse.c (find_minsym_type_and_address): Don't relocate addresses
43 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
45 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
48 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
50 * infrun.c (follow_exec): Call add_thread after
51 target_find_description.
53 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
55 * infrun.c (handle_inferior_event_1): When exec'ing, read
56 stop_pc after follow_exec.
58 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
60 * remote.c (process_g_packet): Update error message.
62 2017-09-05 Yao Qi <yao.qi@linaro.org>
64 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
67 2017-09-05 Pedro Alves <palves@redhat.com>
69 * eval.c (eval_call, evaluate_funcall): New functions, factored
71 (evaluate_subexp_standard): ... this.
73 2017-09-05 Yao Qi <yao.qi@linaro.org>
75 * amd64-tdep.c (amd64_target_description): Create target
77 (_initialize_amd64_tdep): Don't call functions
78 initialize_tdesc_amd64_*. Add self tests.
79 * arch/amd64.c (amd64_create_target_description): Add parameter
80 is_linux. Call set_tdesc_osabi if is_linux is true.
81 * arch/amd64.h (amd64_create_target_description): Update the
83 * arch/i386.c (i386_create_target_description): Add parameter
84 is_linux. Call set_tdesc_osabi if is_linux is true.
85 * arch/i386.h (i386_create_target_description): Update
87 * configure.tgt: Add i386.o to gdb_target_obs.
88 * features/Makefile (XMLTOC): Remove i386/*.xml.
89 * features/i386/amd64-avx-avx512.c: Remove.
90 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
91 * features/i386/amd64-avx-mpx.c: Remove.
92 * features/i386/amd64-avx.c: Remove.
93 * features/i386/amd64-mpx.c: Remove.
94 * features/i386/amd64.c: Remove.
95 * features/i386/i386-avx-avx512.c: Remove.
96 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
97 * features/i386/i386-avx-mpx.c: Remove.
98 * features/i386/i386-avx.c: Remove.
99 * features/i386/i386-mmx.c: Remove.
100 * features/i386/i386-mpx.c: Remove.
101 * features/i386/i386.c: Remove.
102 * i386-tdep.c: Don't include features/i386/i386*.c., include
103 target-descriptions.h and arch/i386.h.
104 (i386_target_description): Create target descriptions.
105 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
106 functions. Do self tests.
108 2017-09-05 Yao Qi <yao.qi@linaro.org>
110 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
111 * features/i386/amd64-avx-avx512-linux.c: Removed.
112 * features/i386/amd64-avx-linux.c: Removed.
113 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
114 * features/i386/amd64-avx-mpx-linux.c: Removed.
115 * features/i386/amd64-linux.c: Removed.
116 * features/i386/amd64-mpx-linux.c: Removed.
117 * features/i386/x32-avx-avx512-linux.c: Removed.
118 * features/i386/x32-avx-linux.c: Removed.
119 * features/i386/x32-linux.c: Removed.
121 2017-09-05 Yao Qi <yao.qi@linaro.org>
123 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
125 (amd64_linux_read_description): Call
126 amd64_create_target_description.
127 * arch/amd64.c: New file.
128 * arch/amd64.h: New file.
129 * configure.tgt (x86_64-*-linux*): Append amd64.o.
130 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
132 2017-09-05 Yao Qi <yao.qi@linaro.org>
134 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
135 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
136 (amd64_linux_read_description): Create target descriptions.
137 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
138 functions. Add unit tests.
139 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
141 * features/i386/64bit-avx.c: Generated.
142 * features/i386/64bit-avx512.c: Generated.
143 * features/i386/64bit-core.c: Generated.
144 * features/i386/64bit-linux.c: Generated.
145 * features/i386/64bit-mpx.c: Generated.
146 * features/i386/64bit-pkeys.c: Generated.
147 * features/i386/64bit-segments.c: Generated.
148 * features/i386/64bit-sse.c: Generated.
149 * features/i386/x32-core.c: Generated.
150 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
151 c files for amd64-linux and x32-linux.
153 2017-09-05 Yao Qi <yao.qi@linaro.org>
155 * amd64-linux-tdep.c (amd64_linux_read_description): New
157 (amd64_linux_core_read_description): Call
158 amd64_linux_read_description.
159 (amd64_linux_init_abi): Likewise.
160 (amd64_x32_linux_init_abi): Likewise.
161 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
162 * x86-linux-nat.c (x86_linux_read_description): Call
163 amd64_linux_read_description.
165 2017-09-05 Yao Qi <yao.qi@linaro.org>
167 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
170 2017-09-05 Yao Qi <yao.qi@linaro.org>
172 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
173 * features/i386/i386-avx-avx512-linux.c: Remove.
174 * features/i386/i386-avx-linux.c: Remove.
175 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
176 * features/i386/i386-avx-mpx-linux.c: Remove.
177 * features/i386/i386-linux.c: Remove.
178 * features/i386/i386-mmx-linux.c: Remove.
179 * features/i386/i386-mpx-linux.c: Remove.
181 2017-09-05 Yao Qi <yao.qi@linaro.org>
183 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
184 (SFILES): Add arch/i386.c.
185 (HFILES_NO_SRCDIR): Add arch/i386.h.
186 * arch/i386.c: New file.
187 * arch/i386.h: New file.
188 * arch/tdesc.h (allocate_target_description): Declare.
189 (set_tdesc_architecture): Declare.
190 (set_tdesc_osabi): Declare.
191 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
192 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
194 (i386_linux_read_description): Remove code and call
195 i386_create_target_description.
196 (set_tdesc_architecture): New function.
197 (set_tdesc_osabi): New function.
198 * target-descriptions.h (allocate_target_description): Remove.
200 2017-09-05 Yao Qi <yao.qi@linaro.org>
202 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
203 * target-descriptions.c (tdesc_create_feature): Likewise, and
205 * features/i386/32bit-avx.c: Re-generated.
206 * features/i386/32bit-avx512.c: Re-generated.
207 * features/i386/32bit-core.c: Re-generated.
208 * features/i386/32bit-linux.c: Re-generated.
209 * features/i386/32bit-mpx.c: Re-generated.
210 * features/i386/32bit-pkeys.c: Re-generated.
211 * features/i386/32bit-sse.c: Re-generated.
213 2017-09-05 Yao Qi <yao.qi@linaro.org>
215 * regformats/regdef.h (struct reg): Override operator == and !=.
217 2017-09-05 Yao Qi <yao.qi@linaro.org>
219 * arch/tdesc.h: New file.
220 * regformats/regdat.sh: Generate code using tdesc_create_reg.
221 * target-descriptions.c: Update comments.
222 * target-descriptions.h: Include "arch/tdesc.h". Remove the
224 * features/i386/32bit-avx.c: Re-generated.
225 * features/i386/32bit-avx512.c: Re-generated.
226 * features/i386/32bit-core.c: Re-generated.
227 * features/i386/32bit-linux.c: Re-generated.
228 * features/i386/32bit-mpx.c: Re-generated.
229 * features/i386/32bit-pkeys.c: Re-generated.
230 * features/i386/32bit-sse.c: Re-generated.
232 2017-09-05 Yao Qi <yao.qi@linaro.org>
234 * regformats/regdat.sh: Update generated code.
236 2017-09-05 Yao Qi <yao.qi@linaro.org>
238 * regformats/regdat.sh: Adjust code order.
240 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
242 * expprint.c (dump_subexp_body_standard): Use constant format
243 string in fprintf_filtered call.
245 2017-09-04 John Baldwin <jhb@FreeBSD.org>
247 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
249 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
251 2017-09-04 John Baldwin <jhb@FreeBSD.org>
253 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
255 2017-09-04 John Baldwin <jhb@FreeBSD.org>
257 * bsd-kvm.o: Define _KMEMUSER.
258 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
259 * configure: Regenerate.
261 2017-09-04 John Baldwin <jhb@FreeBSD.org>
263 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
264 * i386-fbsd-nat.c: Likewise.
266 2017-09-04 John Baldwin <jhb@FreeBSD.org>
268 * unittests/array-view-selftests.c: Add include of <array>.
270 2017-09-04 John Baldwin <jhb@FreeBSD.org>
272 * spu-tdep.c (flush_ea_cache): Add missing argument to
273 call_function_by_hand.
275 2017-09-04 Pedro Alves <palves@redhat.com>
277 * NEWS (Safer support for debugging with no debug info): New.
279 2017-09-04 Pedro Alves <palves@redhat.com>
281 * c-exp.y (function_method, function_method_void): Add current
282 instance flags to TYPE_INSTANCE.
283 * dwarf2read.c (check_modifier): New.
284 (compute_delayed_physnames): Assert that only C++ adds delayed
285 physnames. Mark fn_fields as const/volatile depending on
287 * eval.c (make_params): New type_instance_flags parameter. Use
288 it as the new type's instance flags.
289 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
290 flags element and pass it to make_params.
291 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
292 instance flags element.
293 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
294 * gdbtypes.h: Include "enum-flags.h".
295 (type_instance_flags): New enum-flags type.
296 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
297 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
298 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
299 (follow_type_instance_flags): New function.
300 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
301 * parser-defs.h (follow_type_instance_flags): Declare.
302 * valops.c (value_struct_elt_for_reference): const/volatile must
305 2017-09-04 Pedro Alves <palves@redhat.com>
307 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
308 function/method scopes; lookup the nested name as a function local
311 2017-09-04 Pedro Alves <palves@redhat.com>
313 (%type <voidval>): Add function_method.
314 * c-exp.y (exp): New production for calls with no arguments.
315 (function_method, function_method_void_or_typelist): New
317 (exp): New production for "method()::static_var".
318 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
319 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
320 Handle OP_FUNC_STATIC_VAR.
321 * parse.c (operator_length_standard):
322 Handle OP_FUNC_STATIC_VAR.
324 2017-09-04 Pedro Alves <palves@redhat.com>
326 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
328 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
330 * parse.c (operator_length_standard, operator_check_standard):
332 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
334 2017-09-04 Pedro Alves <palves@redhat.com>
336 * ax-gdb.c: Include "typeprint.h".
337 (gen_expr_for_cast): New function.
338 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
339 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
341 * dwarf2read.c (new_symbol_full): Fallback to int instead of
343 * eval.c: Include "typeprint.h".
344 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
345 Error out if symbol has unknown type.
346 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
347 evaluate_subexp_for_cast.
348 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
350 (evaluate_subexp_for_cast): New function.
351 * gdbtypes.c (init_nodebug_var_type): New function.
352 (objfile_type): Use it to initialize types of variables with no
354 * typeprint.c (error_unknown_type): New.
355 * typeprint.h (error_unknown_type): New declaration.
356 * compile/compile-c-types.c (convert_type_basic): Handle
357 TYPE_CODE_ERROR; warn and fallback to int for variables with
360 2017-09-04 Pedro Alves <palves@redhat.com>
362 * eval.c (evaluate_var_value): New function, factored out from ...
363 (evaluate_subexp_standard): ... here.
365 2017-09-04 Pedro Alves <palves@redhat.com>
367 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
368 Remove useless assignments to 'op'.
370 2017-09-04 Pedro Alves <palves@redhat.com>
372 * eval.c (eval_skip_value): New function.
373 (evaluate_subexp_standard): Use it.
375 2017-09-04 Pedro Alves <palves@redhat.com>
377 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
378 function name from symbol/minsym and pass it to
379 error_call_unknown_return_type.
381 2017-09-04 Pedro Alves <palves@redhat.com>
383 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
384 * ax-gdb.c (gen_msym_var_ref): New function.
385 (gen_expr): Handle OP_VAR_MSYM_VALUE.
386 * eval.c (evaluate_var_msym_value): New function.
387 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
388 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
389 to call_function_by_hand.
390 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
391 Handle OP_VAR_MSYM_VALUE.
392 (union exp_element) <msymbol>: New field.
393 * minsyms.h (struct type): Forward declare.
394 (find_minsym_type_and_address): Declare.
395 * parse.c (write_exp_elt_msym): New function.
396 (write_exp_msymbol): Delete, refactored as ...
397 (find_minsym_type_and_address): ... this new function.
398 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
399 (operator_length_standard, operator_check_standard): Handle
401 * std-operator.def (OP_VAR_MSYM_VALUE): New.
403 2017-09-04 Pedro Alves <palves@redhat.com>
405 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
406 TYPE_GNU_IFUNC specially here. Throw error if return type is
408 * ada-typeprint.c (print_func_type): Handle functions with unknown
410 * c-typeprint.c (c_type_print_base): Handle functions and methods
411 with unknown return type.
412 * compile/compile-c-symbols.c (convert_symbol_bmsym)
413 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
414 * compile/compile-c-types.c: Include "objfiles.h".
415 (convert_func): For functions with unknown return type, warn and
417 * compile/compile-object-run.c (compile_object_run): Adjust call
418 to call_function_by_hand_dummy.
419 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
420 call_function_by_hand.
421 * eval.c (evaluate_subexp_standard): Adjust calls to
422 call_function_by_hand. Handle functions and methods with unknown
423 return type. Pass expect_type to call_function_by_hand.
424 * f-typeprint.c (f_type_print_base): Handle functions with unknown
426 * gcore.c (call_target_sbrk): Adjust call to
427 call_function_by_hand.
428 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
429 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
430 an integer address type instead of nodebug.
431 * guile/scm-value.c (gdbscm_value_call): Adjust call to
432 call_function_by_hand.
433 * infcall.c (error_call_unknown_return_type): New function.
434 (call_function_by_hand): New "default_return_type" parameter.
436 (call_function_by_hand_dummy): New "default_return_type"
437 parameter. Use it instead of defaulting to int. If there's no
438 default and the return type is unknown, throw an error. If
439 there's a default return type, and the called function has no
440 debug info, then assume the function is prototyped.
441 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
442 New "default_return_type" parameter.
443 (error_call_unknown_return_type): New declaration.
444 * linux-fork.c (call_lseek): Cast return type of lseek.
445 (inferior_call_waitpid, checkpoint_command): Adjust calls to
446 call_function_by_hand.
447 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
448 calls to call_function_by_hand.
449 * m2-typeprint.c (m2_procedure): Handle functions with unknown
451 * objc-lang.c (lookup_objc_class, lookup_child_selector)
452 (value_nsstring, print_object_command): Adjust calls to
453 call_function_by_hand.
454 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
455 functions with unknown return type.
456 (pascal_type_print_func_varspec_suffix): New function.
457 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
458 TYPE_CODE_METHOD>: Use it.
459 * python/py-value.c (valpy_call): Adjust call to
460 call_function_by_hand.
461 * rust-lang.c (rust_evaluate_funcall): Adjust call to
462 call_function_by_hand.
463 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
464 call_function_by_hand.
465 * valops.c (value_allocate_space_in_inferior): Adjust call to
466 call_function_by_hand.
467 * typeprint.c (type_print_unknown_return_type): New function.
468 * typeprint.h (type_print_unknown_return_type): New declaration.
470 2017-09-04 Pedro Alves <palves@redhat.com>
472 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
473 types with more than one parameter as prototyped.
475 2017-09-04 Pedro Alves <palves@redhat.com>
477 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
478 (disassemble_command): Use gdb_disassembly_flags instead of bare
480 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
481 (dump_insns, do_mixed_source_and_assembly_deprecated)
482 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
483 Use gdb_disassembly_flags instead of bare int.
484 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
485 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
486 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
487 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
488 (enum gdb_disassembly_flag): ... values of this new enumeration.
489 (gdb_disassembly_flags): Define.
491 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
492 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
493 gdb_disassembly_flags instead of bare int.
494 * record-btrace.c (btrace_insn_history)
495 (record_btrace_insn_history, record_btrace_insn_history_range)
496 (record_btrace_insn_history_from): Use gdb_disassembly_flags
498 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
499 Use gdb_disassembly_flags instead of bare int.
500 * target-debug.h (target_debug_print_gdb_disassembly_flags):
502 * target-delegates.c: Regenerate.
503 * target.c (target_insn_history, target_insn_history_from)
504 (target_insn_history_range): Use gdb_disassembly_flags instead of
506 * target.h: Include "disasm.h".
507 (struct target_ops) <to_insn_history, to_insn_history_from,
508 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
510 (target_insn_history, target_insn_history_from)
511 (target_insn_history_range): Use gdb_disassembly_flags instead of
514 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
516 * cli/cli-script.c (build_command_line): For if/while commands,
517 check whether args is empty.
519 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
521 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
522 (enum command_control_type): Likewise.
523 (struct command_line): Likewise.
524 (free_command_lines): Likewise.
525 (struct command_lines_deleter): Likewise.
526 (command_line_up): Likewise.
527 (read_command_lines): Likewise.
528 (read_command_lines_1): Likewise.
529 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
530 (enum command_control_type): Likewise.
531 (struct command_line): Likewise.
532 (free_command_lines): Likewise.
533 (struct command_lines_deleter): Likewise.
534 (command_line_up): Likewise.
535 (read_command_lines): Likewise.
536 (read_command_lines_1): Likewise.
537 * breakpoint.h: Include cli/cli-script.h.
538 * extension-priv.h: Likewise.
539 * gdbcmd.h: Likewise.
541 2017-09-04 Pedro Alves <palves@redhat.com>
543 * ada-lang.c (is_known_support_routine): Move sal declaration to
544 where it is initialized.
545 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
546 (parse_breakpoint_sals, decode_static_tracepoint_spec)
547 (clear_command, update_static_tracepoint): Remove init_sal
548 references. Move declarations closer to initializations.
549 * cli/cli-cmds.c (list_command): Move sal declarations closer to
551 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
552 references. Move sal declarations closer to initializations.
553 * frame.c (find_frame_sal): Return a symtab_and_line via function
554 return instead of output parameter. Remove init_sal references.
555 * frame.h (find_frame_sal): Return a symtab_and_line via function
556 return instead of output parameter.
557 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
558 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
560 (gdbscm_find_pc_line): Remove init_sal reference.
561 * infcall.c (call_function_by_hand_dummy): Remove init_sal
562 references. Move declarations closer to initializations.
563 * infcmd.c (set_step_frame): Update. Move declarations closer to
565 (finish_backward): Remove init_sal references. Move declarations
566 closer to initializations.
567 * infrun.c (process_event_stop_test, handle_step_into_function)
568 (insert_hp_step_resume_breakpoint_at_frame)
569 (insert_step_resume_breakpoint_at_caller): Likewise.
570 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
571 (symbol_to_sal): Likewise.
572 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
573 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
574 to its initialization.
575 * reverse.c (save_bookmark_command): Use new/delete. Remove
576 init_sal references. Move declarations closer to initializations.
577 * source.c (get_current_source_symtab_and_line): Remove brace
579 (set_current_source_symtab_and_line): Now takes the sal by const
580 reference. Remove brace initialization.
581 (line_info): Remove init_sal reference.
582 * source.h (set_current_source_symtab_and_line): Now takes a
583 symtab_and_line via const reference.
584 * stack.c (set_current_sal_from_frame): Adjust.
585 (print_frame_info): Adjust.
586 (get_last_displayed_sal): Return the sal via function return
587 instead of via output parameter. Simplify.
588 (frame_info): Adjust.
589 * stack.h (get_last_displayed_sal): Return the sal via function
590 return instead of via output parameter.
591 * symtab.c (init_sal): Delete.
592 (find_pc_sect_line): Remove init_sal references. Move
593 declarations closer to initializations.
594 (find_function_start_sal): Remove init_sal references. Move
595 declarations closer to initializations.
596 * symtab.h (struct symtab_and_line): In-class initialize all
598 * tracepoint.c (set_traceframe_context)
599 (print_one_static_tracepoint_marker): Remove init_sal references.
600 Move declarations closer to initializations.
601 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
602 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
603 declarations closer to initializations.
604 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
605 init_sal references. Adjust.
607 2017-09-04 Pedro Alves <palves@redhat.com>
609 * ax-gdb.c (agent_command_1): Use range-for.
610 * break-catch-throw.c (re_set_exception_catchpoint): Update.
611 * breakpoint.c: Include "common/array-view.h".
612 (init_breakpoint_sal, create_breakpoint_sal): Change sals
613 parameter from struct symtabs_and_lines to
614 array_view<symtab_and_line>. Adjust. Use range-for. Update.
615 (breakpoint_sals_to_pc): Change sals parameter from struct
616 symtabs_and_lines to std::vector reference.
617 (check_fast_tracepoint_sals): Change sals parameter from struct
618 symtabs_and_lines to std::array_view. Use range-for.
619 (decode_static_tracepoint_spec): Return a std::vector instead of
620 symtabs_and_lines. Update.
621 (create_breakpoint): Update.
622 (break_range_command, until_break_command, clear_command): Update.
623 (base_breakpoint_decode_location, bkpt_decode_location)
624 (bkpt_probe_create_sals_from_location)
625 (bkpt_probe_decode_location, tracepoint_decode_location)
626 (tracepoint_probe_decode_location)
627 (strace_marker_create_sals_from_location): Return a std::vector
628 instead of symtabs_and_lines.
629 (strace_marker_create_breakpoints_sal): Update.
630 (strace_marker_decode_location): Return a std::vector instead of
631 symtabs_and_lines. Update.
632 (update_breakpoint_locations): Change struct symtabs_and_lines
633 parameters to gdb::array_view. Adjust.
634 (location_to_sals): Return a std::vector instead of
635 symtabs_and_lines. Update.
636 (breakpoint_re_set_default): Use std::vector instead of struct
638 (decode_location_default): Return a std::vector instead of
639 symtabs_and_lines. Update.
640 * breakpoint.h: Include "common/array-view.h".
641 (struct breakpoint_ops) <decode_location>: Now returns a
642 std::vector instead of returning a symtabs_and_lines via output
644 (update_breakpoint_locations): Change sals parameters to use
646 * cli/cli-cmds.c (edit_command, list_command): Update to use
647 std::vector and gdb::array_view.
648 (ambiguous_line_spec): Adjust to use gdb::array_view and
650 (compare_symtabs): Rename to ...
651 (cmp_symtabs): ... this. Change parameters to symtab_and_line
652 const reference and adjust.
653 (filter_sals): Rewrite using std::vector and standard algorithms.
654 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
655 (jump_command): Update to use std::vector.
656 * linespec.c (struct linespec_state) <canonical_names>: Update
658 (add_sal_to_sals_basic): Delete.
659 (add_sal_to_sals, filter_results, convert_results_to_lsals)
660 (decode_line_2, create_sals_line_offset)
661 (convert_address_location_to_sals, convert_linespec_to_sals)
662 (convert_explicit_location_to_sals, parse_linespec)
663 (event_location_to_sals, decode_line_full, decode_line_1)
664 (decode_line_with_current_source)
665 (decode_line_with_last_displayed, decode_objc)
666 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
667 (linespec_result::~linespec_result): Adjust to use std::vector
668 instead of symtabs_and_lines.
669 * linespec.h (linespec_sals::sals): Now a std::vector.
670 (struct linespec_result): Use std::vector, bool, and in-class
672 (decode_line_1, decode_line_with_current_source)
673 (decode_line_with_last_displayed): Return std::vector.
674 * macrocmd.c (info_macros_command): Use std::vector.
675 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
676 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
678 * probe.h (parse_probes): Return a std::vector.
679 * python/python.c (gdbpy_decode_line): Use std::vector and
681 * source.c (select_source_symtab, line_info): Use std::vector.
682 * stack.c (func_command): Use std::vector.
683 * symtab.h (struct symtabs_and_lines): Delete.
684 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
686 2017-09-04 Pedro Alves <palves@redhat.com>
688 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
689 unittests/array-view-selftests.c.
690 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
691 * common/array-view.h: New file.
692 * unittests/array-view-selftests.c: New file.
694 2017-09-04 Pedro Alves <palves@redhat.com>
696 * cli/cli-cmds.c (edit_command): Pass message to
698 (list_command): Pass message to ambiguous_line_spec. Say
699 "first"/"last" instead of "start" and "end" to be consistent with
701 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
702 them to print formatted message.
704 2017-09-04 Pedro Alves <palves@redhat.com>
706 * btrace.c (ftrace_add_pt): Pass btrace_insn to
707 ftrace_update_insns by reference instead of pointer.
709 2017-09-04 Yao Qi <yao.qi@linaro.org>
711 * i386-go32-tdep.c: Include x86-xstate.h.
712 (i386_go32_init_abi): Call i386_target_description.
713 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
714 if xcr0 is X86_XSTATE_X87_MASK.
715 * i386-tdep.h (tdesc_i386): Remove the declaration.
716 (tdesc_i386_mmx): Likewise.
718 2017-09-04 Yao Qi <yao.qi@linaro.org>
720 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
721 X86_XSTATE_SSE_MASK instead of 0.
723 2017-09-04 Yao Qi <yao.qi@linaro.org>
725 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
726 i386_target_description.
727 * i386-fbsd-nat.c (i386fbsd_read_description): Call
728 i386_target_description.
729 * i386-tdep.c (i386_gdbarch_init): Likewise.
731 2017-09-04 Yao Qi <yao.qi@linaro.org>
733 * amd64-darwin-tdep.c: Include "x86-xstate.h".
734 (x86_darwin_init_abi_64): Call amd64_target_description.
735 * amd64-dicos-tdep.c: Likewise.
736 * amd64-fbsd-nat.c: Likewise.
737 * amd64-fbsd-tdep.c: Likewise.
738 * amd64-nbsd-tdep.c: Likewise.
739 * amd64-obsd-tdep.c: Likewise.
740 * amd64-sol2-tdep.c: Likewise.
741 * amd64-windows-tdep.c: Likewise.
742 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
744 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
746 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
747 (btrace_function) <insn>: Change type to use std::vector.
748 * btrace.c (ftrace_debug, ftrace_call_num_insn,
749 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
750 ftrace_update_insns, ftrace_compute_global_level_offset,
751 btrace_stitch_bts, btrace_clear, btrace_insn_get,
752 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
753 change to std::vector.
754 (ftrace_update_insns): Adjust to change to std::vector, change
755 type of INSN parameter.
756 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
757 * record-btrace.c (btrace_call_history_insn_range,
758 btrace_compute_src_line_range,
759 record_btrace_frame_prev_register): Adjust to change to
761 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
762 to change to std::vector.
764 2017-09-03 Tom Tromey <tom@tromey.com>
766 * corefile.c (reopen_exec_file): Use std::string.
768 2017-09-03 Tom Tromey <tom@tromey.com>
770 * compile/compile.c (compile_register_name_mangled): Return
772 * compile/compile-loc2c.c (pushf_register_address): Update.
773 (pushf_register): Update.
774 * compile/compile-c-types.c (convert_array): Update.
775 * compile/compile-c-symbols.c (generate_vla_size): Update.
776 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
777 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
778 (convert_one_symbol): Update.
779 (generate_c_for_for_one_variable): Update.
780 * compile/compile-c-support.c (c_get_range_decl_name): Return a
782 (generate_register_struct): Update.
783 * compile/compile-internal.h (c_get_range_decl_name): Return a
785 (compile_register_name_mangled): Return std::string.
787 2017-09-03 Tom Tromey <tom@tromey.com>
789 * utils.c (perror_string): Return a std::string.
790 (throw_perror_with_name, perror_warning_with_name): Update.
792 2017-09-03 Tom Tromey <tom@tromey.com>
794 * demangle.c (demangle_command): Use std::string,
797 2017-09-03 Tom Tromey <tom@tromey.com>
799 * cli/cli-setshow.c (do_set_command): Use std::string.
801 2017-09-03 Tom Tromey <tom@tromey.com>
803 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
805 2017-09-03 Tom Tromey <tom@tromey.com>
807 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
809 2017-09-03 Tom Tromey <tom@tromey.com>
811 * mi/mi-cmd-env.c (env_execute_cli_command): Use
812 gdb::unique_xmalloc_ptr.
814 2017-09-03 Tom Tromey <tom@tromey.com>
816 * thread.c (print_thread_info_1): Use string_printf.
817 (thread_apply_command, thread_apply_all_command): Use
820 2017-09-03 Tom Tromey <tom@tromey.com>
822 * valprint.c (val_print_string): Update.
823 * gdbcore.h (memory_error_message): Return std::string.
824 * corefile.c (memory_error_message): Return std::string.
825 (memory_error): Update.
826 * breakpoint.c (insert_bp_location): Update.
828 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
830 * target/waitstatus.h (target_waitstatus_to_string): Change
831 return type to std::string.
832 * target/waitstatus.c (target_waitstatus_to_string): Return
834 * target.h (target_waitstatus_to_string): Remove declaration.
835 * infrun.c (resume, clear_proceed_status_thread,
836 print_target_wait_results, do_target_wait, save_waitstatus,
837 stop_all_threads): Adjust.
838 * record-btrace.c (record_btrace_wait): Adjust.
840 (target_debug_print_struct_target_waitstatus_p): Adjust.
842 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
845 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
848 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
850 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
851 for setting/unsetting environment variables on the remote target.
852 (New remote packets): Add entries for QEnvironmentHexEncoded,
853 QEnvironmentUnset and QEnvironmentReset.
854 * common/environ.c (gdb_environ::operator=): Extend method to
855 handle m_user_set_env_list and m_user_unset_env_list.
856 (gdb_environ::clear): Likewise.
857 (match_var_in_string): Change type of first parameter from 'char
858 *' to 'const char *'.
859 (gdb_environ::set): Extend method to handle
860 m_user_set_env_list and m_user_unset_env_list.
861 (gdb_environ::unset): Likewise.
862 (gdb_environ::clear_user_set_env): New method.
863 (gdb_environ::user_set_envp): Likewise.
864 (gdb_environ::user_unset_envp): Likewise.
865 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
866 m_user_unset_env_list on move constructor/assignment.
867 (unset): Add new default parameter 'update_unset_list = true'.
868 (clear_user_set_env): New method.
869 (user_set_envp): Likewise.
870 (user_unset_envp): Likewise.
871 (m_user_set_env_list): New std::set.
872 (m_user_unset_env_list): Likewise.
873 * common/rsp-low.c (hex2str): New function.
874 (bin2hex): New overload for bin2hex function.
875 * common/rsp-low.c (hex2str): New prototype.
876 (str2hex): New overload prototype.
877 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
878 QEnvironmentUnset and QEnvironmentReset.
879 (remote_protocol_features): Add QEnvironmentHexEncoded,
880 QEnvironmentUnset and QEnvironmentReset packets.
881 (send_environment_packet): New function.
882 (extended_remote_environment_support): Likewise.
883 (extended_remote_create_inferior): Call
884 extended_remote_environment_support.
885 (_initialize_remote): Add QEnvironmentHexEncoded,
886 QEnvironmentUnset and QEnvironmentReset packet configs.
887 * unittests/environ-selftests.c (gdb_selftest_env_var):
889 (test_vector_initialization): New function.
890 (test_init_from_host_environ): Likewise.
891 (test_reinit_from_host_environ): Likewise.
892 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
894 (test_unset_set_empty_vector): Likewise.
895 (test_vector_clear): Likewise.
896 (test_std_move): Likewise.
897 (test_move_constructor):
898 (test_self_move): Likewise.
899 (test_set_unset_reset): Likewise.
900 (run_tests): Rewrite in terms of the functions above.
902 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
904 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
905 (adi_available): Use a temp variable of type CORE_ADDR as argument
906 3 when calling target_auxv_search.
907 (adi_normalize_address): Use masks and xor operators to calculate
909 (adi_read_versions, adi_write_versions, adi_print_versions)
910 (do_examine, do_assign): Use paddress.
912 2017-08-29 John Baldwin <jhb@FreeBSD.org>
914 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
915 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
916 out of loop and add supply of FIR.
917 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
920 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
923 * cli/cli-script.c (define_command): Don't convert command name
926 2017-08-25 Joel Brobecker <brobecker@adacore.com>
928 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
929 Update all callers accordingly. Remove all code blocks handling
930 the case where DISPP is not NULL.
932 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
935 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
936 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
937 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
939 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
941 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
942 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
943 (read_comp_units_from_section): New parameter abbrev_section, use
944 read_and_check_comp_unit_head, allocate signatured_type if needed.
945 (create_all_comp_units): Update read_comp_units_from_section caller.
947 2017-08-23 Pedro Alves <palves@redhat.com>
950 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
951 to null_ptid and switch to thread without reading the registers
952 after adding the inferior.
954 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
956 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
958 * compile/compile.c (compile_gcc, show_compile_gcc): New.
959 (compile_to_object): Implement compile_gcc.
960 (_initialize_compile): Install "set compile-gcc". Initialize
963 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
965 * compile/compile.c (compile_to_object): Conditionally call
966 set_verbose. Conditionally call compile or compile_v0.
968 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
970 * sparc64-tdep.h: (adi_normalize_address): New export.
971 * sparc-nat.h: (open_adi_tag_fd): New export.
972 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
973 * sparc64-linux-tdep.c:
974 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
975 (sparc64_linux_handle_segmentation_fault): New function.
976 (sparc64_linux_init_abi): Register
977 sparc64_linux_handle_segmentation_fault
978 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
979 (sparc64_addr_bits_remove): New function.
980 (sparc64_init_abi): Register sparc64_addr_bits_remove.
981 (MAX_PROC_NAME_SIZE): New macro.
982 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
983 (sparc64adilist): New variable.
984 (adi_proc_list): New variable.
985 (find_adi_info): New function.
986 (add_adi_info): New function.
987 (get_adi_info_proc): New function.
988 (get_adi_info): New function.
989 (info_adi_command): New function.
990 (read_maps_entry): New function.
991 (adi_available): New function.
992 (adi_normalize_address): New function.
993 (adi_align_address): New function.
994 (adi_convert_byte_count): New function.
995 (adi_tag_fd): New function.
996 (adi_is_addr_mapped): New function.
997 (adi_read_versions): New function.
998 (adi_write_versions): New function.
999 (adi_print_versions): New function.
1000 (do_examine): New function.
1001 (do_assign): New function.
1002 (adi_examine_command): New function.
1003 (adi_assign_command): New function.
1004 (_initialize_sparc64_adi_tdep): New function.
1006 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
1008 * breakpoint.c (breakpoints_info): Rename to ...
1009 (info_breakpoints_command): ... this.
1010 (watchpoints_info): Rename to ...
1011 (info_watchpoints_command): ... this.
1012 (tracepoints_info): Rename to ...
1013 (info_tracepoints_command): ... this.
1014 (_initialize_breakpoint): Adjust.
1015 * dcache.c (dcache_info): Rename to ...
1016 (info_display_command): ... this.
1017 (_initialize_dcache): Adjust.
1018 * frame.h (args_info): Rename to ...
1019 (info_args_command): ... this.
1020 (locals_info): Rename to ...
1021 (info_locals_command): ... this.
1022 * infcmd.c (nofp_registers_info): Rename to ...
1023 (info_registers_command): ... this.
1024 (float_info): Rename to ...
1025 (info_float_command): ... this.
1026 (program_info): Rename to ...
1027 (info_program_command): ... this.
1028 (all_registers_info): Rename to ...
1029 (info_all_registers_command): ... this.
1030 (vector_info): Rename to ...
1031 (info_vector_command): ... this.
1032 (float_info): Rename to ...
1033 (info_float_command): ... this.
1034 (_initialize_infcmd): Adjust.
1035 * inferior.h (term_info): Rename to ...
1036 (info_terminal_command): ... this.
1037 * inflow.c (term_info): Rename to ...
1038 (info_terminal_command): ... this.
1039 (_initialize_inflow): Adjust.
1040 * infrun.c (signals_info): Rename to ...
1041 (info_signals_command): ... this.
1042 (_initialize_infrun): Adjust.
1043 * objc-lang.c (classes_info): Rename to ...
1044 (info_classes_command): ... this.
1045 (selectors_info): Rename to ...
1046 (info_selectors_command): ... this.
1047 (_initialize_objc_language): Adjust.
1048 * printcmd.c (sym_info): Rename to ...
1049 (info_symbol_command): ... this.
1050 (address_info): Rename to ...
1051 (info_address_command): ... this.
1052 (display_info): Rename to ...
1053 (info_display_command): ... this.
1054 (_initialize_printcmd): Adjust.
1055 * reverse.c (bookmarks_info): Rename to ...
1056 (info_breakpoints_command): ... this.
1057 (_initialize_reverse): Adjust.
1058 * ser-go32.c (dos_info): Rename to ...
1059 (info_serial_command): ... this.
1060 (_initialize_ser_dos): Adjust.
1061 * skip.c (skip_info): Rename to ...
1062 (info_skip_command): ... this.
1063 (_initialize_step_skip): Adjust.
1064 * source.c (line_info): Rename to ...
1065 (info_line_command): ... this.
1066 (source_info): Rename to ...
1067 (info_source_command)
1068 * stack.c (frame_info): Rename to ...
1069 (info_frame_command): ... this.
1070 (locals_info): Rename to ...
1071 (info_locals_command): ... this.
1072 (args_info): Rename to ...
1073 (info_args_command): ... this.
1074 (_initialize_stack): Adjust.
1075 * symtab.c (sources_info): Rename to ...
1076 (info_sources_command): ... this.
1077 (variables_info): Rename to ...
1078 (info_variables_command): ... this.
1079 (functions_info): Rename to ...
1080 (info_functions_command): ... this.
1081 (types_info): Rename to ...
1082 (info_types_command): ... this.
1083 (_initialize_symtab): Adjust.
1084 * target.c (target_info): Rename to ...
1085 (info_target_command): ... this.
1086 (initialize_targets): Adjust.
1087 * tracepoint.c (tvariables_info): Rename to ...
1088 (info_tvariables_command): ... this.
1089 (scope_info): Rename to ...
1090 (info_scope_command): ... this.
1091 (trace_dump_actions): Adjust.
1092 (_initialize_tracepoint): Adjust.
1094 2017-08-22 Tom Tromey <tom@tromey.com>
1096 * breakpoint.h (install_breakpoint): Update.
1097 * breakpoint.c (add_solib_catchpoint): Update.
1098 (install_breakpoint): Change argument to a std::unique_ptr.
1099 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
1100 (create_breakpoint_sal, create_breakpoint): Update.
1101 (watch_command_1, catch_exec_command_1)
1102 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
1103 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
1104 Return the breakpoint.
1105 (set_raw_breakpoint_without_location, set_raw_breakpoint)
1106 (new_single_step_breakpoint): Update.
1107 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
1109 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
1111 * break-catch-sig.c (create_signal_catchpoint): Use
1113 * ada-lang.c (create_ada_exception_catchpoint): Use
1116 2017-08-22 Tom Tromey <tom@tromey.com>
1118 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
1120 2017-08-22 Tom Tromey <tom@tromey.com>
1122 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
1123 (lookup_partial_symbol): Update.
1125 2017-08-22 Tom Tromey <tom@tromey.com>
1127 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
1128 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
1129 (find_and_open_source, symtab_to_fullname): Update.
1130 * psymtab.c (psymtab_to_fullname): Update.
1132 2017-08-22 Tom Tromey <tom@tromey.com>
1134 * exec.c (exec_file_attach): Update.
1135 * linux-thread-db.c (try_thread_db_load): Update.
1136 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
1137 * utils.c (gdb_realpath): Change return type.
1138 (gdb_realpath_keepfile): Update.
1139 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
1140 (_initialize_utils): Register the new self test.
1141 * source.c (openp): Update.
1142 (find_and_open_source): Update.
1143 * nto-tdep.c (nto_find_and_open_solib): Update.
1144 * main.c (set_gdb_data_directory): Update.
1145 (captured_main_1): Update.
1146 * dwarf2read.c (dwarf2_get_dwz_file): Update
1147 (dw2_map_symbol_filenames): Update.
1148 * auto-load.c (auto_load_safe_path_vec_update): Update.
1149 (filename_is_in_auto_load_safe_path_vec): Change type of
1151 (auto_load_objfile_script): Update.
1152 (file_is_auto_load_safe): Update. Use std::string.
1153 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
1155 2017-08-22 Tom Tromey <tom@tromey.com>
1157 * utils.c (gdb_realpath_keepfile): Return a
1158 gdb::unique_xmalloc_ptr.
1159 * exec.c (exec_file_attach): Update.
1160 * utils.h (gdb_realpath_keepfile): Return a
1161 gdb::unique_xmalloc_ptr.
1163 2017-08-22 Tom Tromey <tom@tromey.com>
1165 * compile/compile.c (compile_file_command): Use
1166 gdb::unique_xmalloc_ptr, std::string.
1167 * utils.c (gdb_abspath): Change return type.
1168 * source.c (openp): Update.
1169 * objfiles.c (allocate_objfile): Update.
1170 * main.c (set_gdb_data_directory): Update.
1171 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
1173 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
1175 * cli-cmds.c (list_commands): List actual code around more than
1178 2017-08-21 John Baldwin <jhb@FreeBSD.org>
1180 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
1182 2017-08-21 Pedro Alves <palves@redhat.com>
1185 * c-exp.y (variable production): Handle function aliases.
1186 * minsyms.c (msymbol_is_text): New function.
1187 * minsyms.h (msymbol_is_text): Declare.
1188 * symtab.c (find_function_alias_target): New function.
1189 * symtab.h (find_function_alias_target): Declare.
1191 2017-08-21 Pedro Alves <palves@redhat.com>
1193 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
1195 * typeprint.c (whatis_exp): If handling "whatis", and expression
1196 is OP_TYPE, strip one typedef level. Otherwise don't strip
1198 * valops.c (value_cast): Save "to" type before resolving
1199 stubs/typedefs. Use that type as resulting value's type.
1201 2017-08-18 Tom Tromey <tom@tromey.com>
1202 Pedro Alves <palves@redhat.com>
1204 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
1205 * sol-thread.c (sol_thread_resume, sol_thread_wait)
1206 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
1207 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
1208 * proc-service.c (ps_xfer_memory): Use scoped_restore.
1209 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
1210 (linux_get_siginfo_data): Add "thread" argument. Use
1212 * linux-nat.c (linux_child_follow_fork)
1213 (check_stopped_by_watchpoint): Use scoped_restore.
1214 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
1215 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
1216 (restore_inferior_ptid, save_inferior_ptid): Remove.
1217 * btrace.c (btrace_fetch): Use scoped_restore.
1218 * bsd-uthread.c (bsd_uthread_fetch_registers)
1219 (bsd_uthread_store_registers): Use scoped_restore.
1220 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
1222 * aix-thread.c (aix_thread_resume, aix_thread_wait)
1223 (aix_thread_xfer_partial): Use scoped_restore.
1224 * inferior.h (save_inferior_ptid): Remove.
1226 2017-08-18 Yao Qi <yao.qi@linaro.org>
1229 * arm-tdep.c (gdb_print_insn_arm): Mark
1230 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
1232 2017-08-18 Yao Qi <yao.qi@linaro.org>
1234 * NEWS: Mention GDBserver's new option "--selftest".
1235 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
1236 * selftest.c: Move it to common/selftest.c.
1237 * selftest.h: Move it to common/selftest.h.
1238 * selftest-arch.c (reset): New function.
1239 (tests_with_arch): Call reset.
1241 2017-08-18 Yao Qi <yao.qi@linaro.org>
1243 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
1244 instead of exception_fprintf and printf_filtered.
1246 2017-08-18 Yao Qi <yao.qi@linaro.org>
1248 * selftest.c (register_self_test): Rename it to
1249 selftests::register_test.
1250 (run_self_tests): selftest::run_tests.
1251 * selftest.h: Update declarations.
1252 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
1253 selftests::register_test_foreach_arch.
1254 * selftest-arch.h: Update declaration.
1255 * aarch64-tdep.c: Update.
1256 * arm-tdep.c: Likewise.
1257 * disasm-selftests.c: Likewise.
1258 * dwarf2loc.c: Likewise.
1259 * dwarf2-frame.c: Likewise.
1260 * findvar.c: Likewise.
1261 * gdbarch-selftests.c: Likewise.
1262 * maint.c (maintenance_selftest): Likewise.
1263 * regcache.c: Likewise.
1264 * rust-exp.y: Likewise.
1265 * selftest-arch.c: Likewise.
1266 * unittests/environ-selftests.c: Likewise.
1267 * unittests/function-view-selftests.c: Likewise.
1268 * unittests/offset-type-selftests.c: Likewise.
1269 * unittests/optional-selftests.c: Likewise.
1270 * unittests/scoped_restore-selftests.c: Likewise.
1271 * utils-selftests.c: Likewise.
1273 2017-08-17 Pedro Alves <palves@redhat.com>
1275 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
1278 2017-08-17 Pedro Alves <palves@redhat.com>
1280 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
1282 (reset_die_in_process): Delete, replaced by ...
1283 (process_die_scope): ... this new class. Make it responsible for
1284 freeing cu->line_header too.
1285 (process_die): Use process_die_scope.
1286 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
1287 cu->line_header_die_owner. Don't release the line header if it's
1289 (setup_type_unit_groups): Make the CU/DIE own the line header.
1290 Don't release the line header here.
1292 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
1294 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
1296 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
1298 * NEWS: Mention new shortcuts for nexti and stepi in TUI
1301 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
1303 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
1306 2017-08-15 Stafford Horne <shorne@gmail.com>
1308 * MAINTAINERS (Write After Approval): Add Stafford Horne.
1310 2017-08-15 Stafford Horne <shorne@gmail.com>
1312 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
1314 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
1317 * infcmd.c (unset_environment_command): Use the 'clear' method on
1318 the environment instead of resetting it.
1320 2017-08-15 John Baldwin <jhb@FreeBSD.org>
1322 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
1325 2017-08-14 Tom Tromey <tom@tromey.com>
1327 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
1328 (print_binary_chars): Likewise.
1329 (BITS_IN_BYTES): Remove.
1331 2017-08-14 Tom Tromey <tom@tromey.com>
1334 * valprint.c (LOW_ZERO): Change value to 034.
1335 (print_octal_chars): Add static_asserts for octal constants.
1336 * printcmd.c (print_scalar_formatted): Add 'd' case.
1338 2017-08-11 Tom Tromey <tom@tromey.com>
1340 * symfile.c (add_symbol_file_command): Use std::vector.
1342 2017-08-14 Tom Tromey <tom@tromey.com>
1344 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
1345 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
1347 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
1349 2017-08-11 Pedro Alves <palves@redhat.com>
1351 * infrun.c (process_event_stop_test): Adjust
1352 function_name_is_marked_for_skip call.
1353 * skip.c: Include <list>.
1354 (skiplist_entry): Make it a class with private fields, and
1356 (skiplist_entry_chain): Delete.
1357 (skiplist_entries): New.
1358 (skiplist_entry_count): Delete.
1359 (highest_skiplist_entry_num): New.
1360 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
1361 (add_skiplist_entry): Delete.
1362 (skiplist_entry::skiplist_entry): New.
1363 (skiplist_entry::add_entry): New.
1364 (skip_file_command, skip_function): Adjust.
1365 (compile_skip_regexp): Delete.
1366 (skip_command): Don't compile regexp here. Adjust to use
1367 skiplist_entry::add_entry.
1368 (skip_info): Adjust to use range-for and getters.
1369 (skip_enable_command, skip_disable_command): Adjust to use
1370 range-for and setters.
1371 (skip_delete_command): Adjust to use std::list.
1372 (add_skiplist_entry): Delete.
1373 (skip_file_p): Delete, refactored as ...
1374 (skiplist_entry::do_skip_file_p): ... this new method.
1375 (skip_gfile_p): Delete, refactored as ...
1376 (skiplist_entry::do_gskip_file_p): ... this new method.
1377 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
1378 (skiplist_entry::skip_function_p): ... this new method.
1379 (function_name_is_marked_for_skip): Now returns bool, and takes
1380 the function sal by const reference. Adjust to use range-for and
1381 skiplist_entry methods.
1382 (_initialize_step_skip): Remove references to
1383 skiplist_entry_chain, skiplist_entry_count.
1384 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
1385 takes the function sal by const reference.
1387 2017-08-11 Yao Qi <yao.qi@linaro.org>
1389 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
1390 (dwarf2_frame_cache): Remove reset_cache_cleanup.
1391 (dwarf2_frame_cache):
1392 * frame-unwind.c (frame_unwind_try_unwinder): Catch
1393 RETURN_MASK_ALL and set *this_case to NULL.
1394 * frame-unwind.h: Update comments.
1396 2017-08-11 Yao Qi <yao.qi@linaro.org>
1398 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
1399 (dwarf2_frame_state_copy_regs): Remove.
1400 (dwarf2_frame_state_free_regs): Remove.
1401 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
1402 (dwarf2_restore_rule): Call method .alloc_regs instead of
1403 dwarf2_frame_state_alloc_regs.
1404 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
1405 constructor. Call std::move.
1406 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
1407 (dwarf2_frame_cache): Likewise.
1409 [GDB_SELF_TEST]: Include selftest.h and
1411 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
1412 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
1413 execute_cfa_program_test.
1415 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
1416 copy ctor, assignment operator, move assignment.
1417 <alloc_regs>: New method.
1419 (struct dwarf2_frame_state): Delete dtor.
1420 (dwarf2_frame_state_alloc_regs): Remove declaration.
1421 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
1422 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
1424 2017-08-11 Yao Qi <yao.qi@linaro.org>
1426 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
1427 (dwarf2_frame_state::dwarf2_frame_state): New.
1428 (dwarf2_frame_state::~dwarf2_frame_state): New.
1429 (dwarf2_fetch_cfa_info): Update.
1430 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
1431 rather than a pointer. Update code.
1432 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
1434 <data_align, code_align, retaddr_column>: Change them to const.
1435 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
1438 2017-08-11 Yao Qi <yao.qi@linaro.org>
1440 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
1441 <loc.exp>: New field.
1442 * dwarf2-frame.c (execute_cfa_program): Update.
1443 (dwarf2_frame_prev_register): Update.
1445 2017-08-10 Pedro Alves <palves@redhat.com>
1447 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
1449 2017-08-09 John Baldwin <jhb@FreeBSD.org>
1451 * fbsd-nat.c (struct fbsd_fork_info): Remove.
1452 (fbsd_pending_children): Use std::list.
1453 (fbsd_remember_child): Likewise.
1454 (fbsd_is_child_pending): Likewise.
1455 (fbsd_pending_vfork_done): Use std::forward_list.
1456 (fbsd_add_vfork_done): Likewise.
1457 (fbsd_is_vfork_done_pending): Likewise.
1458 (fbsd_next_vfork_done): Likewise.
1460 2017-08-09 John Baldwin <jhb@FreeBSD.org>
1462 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
1463 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
1464 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
1466 (fbsd_xfer_partial): Use gdb::byte_vector.
1467 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
1469 2017-08-09 John Baldwin <jhb@FreeBSD.org>
1471 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
1473 (fbsd_find_memory_regions): Fix `mapfile' initialization.
1475 2017-08-09 Tom Tromey <tom@tromey.com>
1477 * skip.c (skiplist_entry): New constructor.
1478 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
1479 (skiplist_entry::file_is_glob): Now bool.
1480 (skiplist_entry::file, skiplist_entry::function): Now
1482 (make_skip_entry): Return a unique_ptr. Use new.
1483 (free_skiplist_entry, free_skiplist_entry_cleanup)
1484 (make_free_skiplist_entry_cleanup): Remove.
1485 (skip_command, skip_disable_command, add_skiplist_entry)
1486 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
1487 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
1488 (function_name_is_marked_for_skip): Update.
1489 (skip_delete_command): Update. Use delete.
1491 2017-08-09 Jiong Wang <jiong.wang@arm.com>
1493 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
1494 (aarch64_linux_core_read_description): New function.
1495 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
1497 2017-08-09 Pedro Alves <palves@redhat.com>
1499 * cp-name-parser.y (cp_comp_to_string): Return a
1500 gdb::unique_xmalloc_ptr<char>.
1501 * cp-support.c (replace_typedefs_qualified_name)
1502 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
1503 (cp_canonicalize_string_full): Use op= instead of explicit
1505 (cp_class_name_from_physname, method_name_from_physname)
1506 (cp_func_name, cp_remove_params): Adjust to use
1507 gdb::unique_xmalloc_ptr<char>.
1508 * cp-support.h (cp_comp_to_string): Return a
1509 gdb::unique_xmalloc_ptr<char>.
1510 * python/py-type.c (typy_lookup_type): Adjust to use
1511 gdb::unique_xmalloc_ptr<char>.
1513 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
1515 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
1517 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
1518 Yao Qi <yao.qi@linaro.org>
1520 * cp-support.c (cp_canonicalize_string_full): Use
1521 gdb::unique_xmalloc_ptr<char>.
1522 (cp_canonicalize_string): Likewise.
1524 2017-08-09 Yao Qi <yao.qi@linaro.org>
1526 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
1527 * regformats/i386/amd64-avx-avx512.dat: Remove.
1528 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
1529 * regformats/i386/amd64-avx-mpx.dat:Remove.
1530 * regformats/i386/amd64-avx.dat: Remove.
1531 * regformats/i386/amd64-mpx.dat: Remove.
1532 * regformats/i386/i386-avx-avx512.dat: Remove.
1533 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
1534 * regformats/i386/i386-avx-mpx.dat: Remove.
1535 * regformats/i386/i386-mmx.dat: Remove.
1536 * regformats/i386/i386-mpx.dat: Remove.
1538 2017-08-09 Yao Qi <yao.qi@linaro.org>
1540 * amd64-tdep.h (tdesc_x32): Remove the declaration.
1541 * amd64-tdep.c: Don't include features/i386/x32*.c.
1542 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
1544 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
1545 and i386/x32-avx-avx512.
1546 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
1548 * features/i386/x32-avx-avx512.c: Removed.
1549 * features/i386/x32-avx-avx512.xml: Removed.
1550 * features/i386/x32-avx.c: Removed.
1551 * features/i386/x32-avx.xml: Removed.
1552 * features/i386/x32.c: Removed.
1553 * features/i386/x32.xml: Removed.
1554 * regformats/i386/x32-avx-avx512.dat: Removed.
1555 * regformats/i386/x32-avx.dat: Removed.
1556 * regformats/i386/x32.dat: Removed.
1558 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
1560 PR breakpoints/21886
1561 * mem-break.c (default_memory_insert_breakpoint): Use
1562 `->placed_address' rather than `->reqstd_address' for the
1563 breakpoint location.
1565 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
1567 * arch-utils.c (default_print_insn): Remove arch/mach/endian
1570 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
1572 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
1573 a union of `tdep_info', `tdesc_data' and `id'.
1574 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
1575 rather than `info.tdep_info'.
1576 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
1577 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
1578 * i386-tdep.c (i386_gdbarch_init): Likewise.
1579 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
1580 * mips-tdep.c (mips_gdbarch_init): Likewise.
1581 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1582 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
1583 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
1585 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
1587 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
1588 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
1590 * spu-tdep.c (spu_gdbarch_init): Likewise.
1591 * gdbarch.h: Regenerate.
1593 2017-08-07 Leszek Swirski <leszeks@google.com>
1596 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
1598 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
1600 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
1601 (gdbsim_open): Rename gdb_argv args object to argv.
1603 2017-08-05 Tom Tromey <tom@tromey.com>
1605 * compile/compile-object-load.c (compile_object_load): Use
1606 gdb::unique_xmalloc_ptr.
1607 * cli/cli-dump.c (scan_filename): Rename from
1608 scan_filename_with_cleanup. Change return type.
1609 (scan_expression): Rename from scan_expression_with_cleanup.
1611 (dump_memory_to_file, dump_value_to_file, restore_command):
1612 Use gdb::unique_xmalloc_ptr. Update.
1613 * cli/cli-cmds.c (find_and_open_script): Use
1614 gdb::unique_xmalloc_ptr.
1615 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
1616 * symmisc.c (maintenance_print_symbols)
1617 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
1618 * symfile.c (symfile_bfd_open, generic_load)
1619 (add_symbol_file_command, remove_symbol_file_command): Use
1620 gdb::unique_xmalloc_ptr.
1621 * source.c (openp): Use gdb::unique_xmalloc_ptr.
1622 * psymtab.c (maintenance_print_psymbols): Use
1623 gdb::unique_xmalloc_ptr.
1624 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
1625 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
1626 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
1627 (reload_shared_libraries_1): Likewise.
1629 2017-08-05 Tom Tromey <tom@tromey.com>
1631 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
1632 (rust_op_vector, rust_set_vector): New typedefs.
1633 (current_parser): New global.
1634 (work_obstack): Change to pointer type. Update all users.
1635 (rust_ast, pstate): Remove globals.
1636 (struct rust_parser): New.
1637 (%union) <params, field_inits>: Change type.
1638 (start, tuple_expr, unit_expr, struct_expr_list, literal)
1639 (field_expr, expr_list, maybe_expr_list, type_list): Update.
1640 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
1641 (convert_params_to_types, convert_params_to_expression): Change
1643 (ast_string): Change type of "fields".
1644 (rust_parse): Make a rust_parser. Remove cleanups.
1645 (rust_lex_tests): Make and install an auto_obstack.
1647 2017-08-04 Yao Qi <yao.qi@linaro.org>
1649 * configure.srv (ipa_x32_linux_regobj): New.
1650 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
1651 instead of X86_TDESC_AVX512.
1652 (initialize_low_tracepoint): Call
1653 init_registers_x32_avx_avx512_linux.
1655 2017-08-04 Yao Qi <yao.qi@linaro.org>
1657 * utils.h (gdb_argv): Add namespace std for nullptr_t.
1659 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
1661 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
1663 2017-08-03 Tom Tromey <tom@tromey.com>
1665 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
1667 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
1669 2017-08-03 Tom Tromey <tom@tromey.com>
1671 * python/py-param.c (compute_enum_values): Use gdb_argv.
1673 2017-08-03 Tom Tromey <tom@tromey.com>
1675 * utils.h (struct gdb_argv_deleter): New.
1676 (gdb_argv): New class.
1677 * utils.c (gdb_argv::reset): New method.
1678 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
1679 * tracefile.c (tsave_command): Use gdb_argv.
1680 * top.c (new_ui_command): Use gdb_argv.
1681 * symmisc.c (maintenance_print_symbols)
1682 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
1683 * symfile.c (symbol_file_command, generic_load)
1684 (remove_symbol_file_command): Use gdb_argv.
1685 * stack.c (backtrace_command): Use gdb_argv.
1686 * source.c (add_path, show_substitute_path_command)
1687 (unset_substitute_path_command, set_substitute_path_command):
1689 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
1690 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
1691 * remote.c (extended_remote_run, remote_put_command)
1692 (remote_get_command, remote_delete_command): Use gdb_argv.
1693 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
1694 (gdbsim_open): Use gdb_argv.
1695 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
1696 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
1697 * procfs.c (procfs_info_proc): Use gdb_argv.
1698 * interps.c (interpreter_exec_cmd): Use gdb_argv.
1699 * infrun.c (handle_command): Use gdb_argv.
1700 * inferior.c (add_inferior_command, clone_inferior_command):
1702 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
1703 * exec.c (exec_file_command): Use gdb_argv.
1704 * cli/cli-cmds.c (alias_command): Use gdb_argv.
1705 * compile/compile.c (build_argc_argv): Use gdb_argv.
1707 2017-08-03 Tom Tromey <tom@tromey.com>
1709 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
1711 2017-08-03 Tom Tromey <tom@tromey.com>
1713 * python/python.c (compute_python_string): Return std::string.
1714 (gdbpy_eval_from_control_command): Update.
1715 (do_start_initialization): Use std::string.
1716 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
1718 * python/py-breakpoint.c (local_setattro): Use string_printf, not
1721 2017-08-03 Tom Tromey <tom@tromey.com>
1723 * top.h (do_restore_instream_cleanup): Remove.
1724 * top.c (do_restore_instream_cleanup): Remove.
1725 (read_command_file): Use scoped_restore.
1726 * cli/cli-script.c (execute_user_command): Use scoped_restore.
1728 2017-08-03 Tom Tromey <tom@tromey.com>
1730 * cli/cli-script.c (execute_user_command)
1731 (execute_control_command): Use scoped_restore.
1733 2017-08-03 Tom Tromey <tom@tromey.com>
1735 * cli/cli-script.c (do_restore_user_call_depth): Remove.
1736 (execute_user_command): Remove user_call_depth; use
1737 user_args_stack's size instead.
1739 2017-08-03 Tom Tromey <tom@tromey.com>
1741 * top.h (in_user_command): Remove.
1742 * top.c (in_user_command): Remove.
1743 * cli/cli-script.c (do_restore_user_call_depth)
1744 (execute_user_command): Update.
1746 2017-08-03 Tom Tromey <tom@tromey.com>
1748 * valops.c (search_struct_method): Use gdb::byte_vector.
1749 * valarith.c (value_concat): Use std::vector.
1750 * target.c (memory_xfer_partial): Use gdb::byte_vector.
1751 (simple_search_memory): Likewise.
1752 * printcmd.c (find_string_backward): Use gdb::byte_vector.
1753 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
1754 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
1755 * elfread.c (elf_rel_plt_read): Use std::string.
1756 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
1757 * cli/cli-dump.c (restore_section_callback): Use
1760 2017-08-03 Tom Tromey <tom@tromey.com>
1762 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
1764 2017-08-03 Tom Tromey <tom@tromey.com>
1766 * tui/tui-regs.c (tui_restore_gdbout): Remove.
1767 (tui_register_format): Use scoped_restore.
1769 2017-08-03 Tom Tromey <tom@tromey.com>
1771 * reverse.c (exec_direction_default): Remove.
1772 (exec_reverse_once): Use scoped_restore.
1773 * remote.c (restore_remote_timeout): Remove.
1774 (remote_flash_erase, remote_flash_write, remote_flash_done)
1775 (readchar, remote_serial_write): Use scoped_restore.
1776 * cli/cli-script.c (struct source_cleanup_lines_args)
1777 (source_cleanup_lines): Remove.
1778 (script_from_file): Use scoped_restore.
1779 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
1780 (source_command): Use scoped_restore.
1782 2017-08-03 Tom Tromey <tom@tromey.com>
1784 * utils.h (make_cleanup_free_so): Remove.
1785 * utils.c (do_free_so, make_cleanup_free_so): Remove.
1786 * solist.h (struct so_deleter): New.
1787 (so_list_up): New typedef.
1788 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
1790 2017-08-03 Tom Tromey <tom@tromey.com>
1792 * utils.h (make_cleanup_restore_current_language): Remove.
1793 * utils.c (do_restore_current_language)
1794 (make_cleanup_restore_current_language): Remove.
1795 * parse.c (parse_exp_in_context_1)
1796 (parse_expression_with_language): Use
1797 scoped_restore_current_language.
1798 * mi/mi-main.c (mi_cmd_execute): Use
1799 scoped_restore_current_language.
1800 * language.h (scoped_restore_current_language): New class.
1802 2017-08-03 Tom Tromey <tom@tromey.com>
1804 * compile/compile.c (cleanup_unlink_file): Remove.
1805 (compile_to_object): Use gdb::unlinker.
1806 (eval_compile_command): Likewise.
1808 2017-08-03 Tom Tromey <tom@tromey.com>
1810 * utils.h (make_cleanup_fclose): Remove.
1811 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
1813 2017-08-03 Tom Tromey <tom@tromey.com>
1815 * top.c (open_terminal_stream): Return gdb_file_up.
1816 (new_ui_command): Update.
1818 2017-08-03 Tom Tromey <tom@tromey.com>
1820 * source.c (print_source_lines_base, forward_search_command)
1821 (reverse_search_command): Use gdb_file_up.
1823 2017-08-03 Tom Tromey <tom@tromey.com>
1825 * fbsd-nat.c (fbsd_find_memory_regions): Update.
1827 2017-08-03 Tom Tromey <tom@tromey.com>
1829 * cli/cli-cmds.c (find_and_open_script): Change return type.
1830 Remove "streamp" and "full_path" parameters.
1831 (source_script_with_search): Update.
1832 * auto-load.c (source_script_file): Update.
1833 * cli/cli-cmds.h (find_and_open_script): Change type.
1834 (open_script): New struct.
1836 2017-08-03 Tom Tromey <tom@tromey.com>
1838 * xml-support.c (xml_fetch_content_from_file): Update.
1839 * ui-file.c (stdio_file::open): Update.
1840 * tracefile-tfile.c (tfile_start): Update.
1841 * remote.c (remote_file_put, remote_file_get): Update.
1842 * nat/linux-procfs.c (linux_proc_get_int)
1843 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
1844 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
1845 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
1846 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
1847 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
1848 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
1849 * linux-nat.c (linux_proc_pending_signals): Update.
1850 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
1851 (file_closer): Remove.
1852 * compile/compile.c (compile_to_object): Update.
1853 * common/filestuff.h (struct gdb_file_deleter): New.
1854 (gdb_file_up): New typedef.
1855 (gdb_fopen_cloexec): Change return type.
1856 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
1857 * cli/cli-dump.c (fopen_with_cleanup): Remove.
1858 (dump_binary_file, restore_binary_file): Update.
1859 * auto-load.c (auto_load_objfile_script_1): Update.
1861 2017-08-03 Tom Tromey <tom@tromey.com>
1863 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
1864 (info_static_tracepoint_markers_command): Likewise.
1865 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
1866 * skip.c (skip_info): Use ui_out_emit_table.
1867 * progspace.c (print_program_space): Use ui_out_emit_table.
1868 * osdata.c (info_osdata): Use ui_out_emit_table.
1869 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
1871 * linux-thread-db.c (info_auto_load_libthread_db): Use
1873 * inferior.c (print_inferior): Use ui_out_emit_table.
1874 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
1875 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
1876 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
1877 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
1878 * ui-out.h (class ui_out_emit_table): New.
1880 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
1882 * mips-tdep.c (mips_fpu_type_str): New function.
1883 (mips_dump_tdep): Call it.
1885 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
1887 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
1890 2017-07-31 Xavier Roirand <roirand@adacore.com>
1892 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
1894 2017-07-27 Xavier Roirand <roirand@adacore.com>
1896 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
1898 2017-07-26 Yao Qi <yao.qi@linaro.org>
1900 * cli/cli-cmds.c (maintenancechecklist): New variable.
1901 * gdbcmd.h (maintenancechecklist): Declare it.
1902 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
1903 Call i386_linux_read_description with different masks.
1904 * maint.c (maintenance_check_command): New function.
1905 (_initialize_maint_cmds): Call add_prefix_cmd.
1906 * target-descriptions.c (tdesc_reg): override operator != and ==.
1907 (tdesc_type): Likewise.
1908 (tdesc_feature): Likewise.
1909 (target_desc): Likewise.
1910 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
1911 (maintenance_check_xml_descriptions): New function.
1912 (_initialize_target_descriptions) Add command "xml-descriptions".
1913 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
1915 2017-07-26 Yao Qi <yao.qi@linaro.org>
1917 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
1918 Include features/i386/32bit-*.c.
1919 (i386_linux_read_description): Generate target description if it
1921 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
1923 * features/i386/32bit-linux.c: Re-generated.
1924 * features/i386/32bit-sse.c: Likewise.
1925 * target-descriptions.c (print_c_feature::visit): Print code to
1926 set register number if needed.
1927 (print_c_feature) <m_next_regnum>: New field.
1929 2017-07-26 Yao Qi <yao.qi@linaro.org>
1931 * features/Makefile (CFILES): Rename with TDESC_CFILES.
1932 (FEATURE_XMLFILES): New.
1933 (FEATURE_CFILES): New.
1935 (clean-cfiles): Remove generated c files.
1936 * features/i386/32bit-avx.c: Generated.
1937 * features/i386/32bit-avx512.c: Generated.
1938 * features/i386/32bit-core.c: Generated.
1939 * features/i386/32bit-linux.c: Generated.
1940 * features/i386/32bit-mpx.c: Generated.
1941 * features/i386/32bit-pkeys.c: Generated.
1942 * features/i386/32bit-sse.c: Generated.
1943 * target-descriptions.c: Include algorithm.
1944 (tdesc_element_visitor): Add method visit_end.
1945 (print_c_tdesc): Implement visit_end.
1946 (print_c_tdesc:: m_filename_after_features): Move it to
1948 (print_c_feature): New class.
1949 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
1950 name starts with "i386/32bit-".
1952 2017-07-26 Yao Qi <yao.qi@linaro.org>
1954 * target-descriptions.c (tdesc_element_visitor): New class.
1955 (tdesc_element): New class.
1956 (tdesc_reg): Inherit from tdesc_element.
1957 (tdesc_reg::accept): New function.
1958 (tdesc_type): Inherit from tdesc_element.
1959 (tdesc_type::accept): New function.
1960 (tdesc_feature): Inherit from tdesc_element.
1961 (tdesc_feature::accept): New function.
1962 (target_desc): Inherit from tdesc_element.
1963 (target_desc::target_desc): New.
1964 (target_desc::~target_desc): New.
1965 (target_desc::accept): New.
1966 (allocate_target_description): Use new.
1967 (free_target_description): Use delete.
1968 (print_c_tdesc): New class.
1969 (maint_print_c_tdesc_cmd): Adjust.
1971 * features/aarch64.c: Re-generated.
1972 * features/arc-arcompact.c: Re-generated.
1973 * features/arc-v2.c: Re-generated.
1974 * features/arm/arm-with-iwmmxt.c: Re-generated.
1975 * features/arm/arm-with-m.c: Re-generated.
1976 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
1977 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
1978 * features/arm/arm-with-neon.c: Re-generated.
1979 * features/arm/arm-with-vfpv2.c: Re-generated.
1980 * features/arm/arm-with-vfpv3.c: Re-generated.
1981 * features/i386/amd64-avx-avx512.c: Re-generated.
1982 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
1983 * features/i386/amd64-avx.c: Re-generated.
1984 * features/i386/amd64-avx-linux.c: Re-generated.
1985 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
1986 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
1987 * features/i386/amd64-avx-mpx.c: Re-generated.
1988 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
1989 * features/i386/amd64.c: Re-generated.
1990 * features/i386/amd64-linux.c: Re-generated.
1991 * features/i386/amd64-mpx.c: Re-generated.
1992 * features/i386/amd64-mpx-linux.c: Re-generated.
1993 * features/i386/i386-avx-avx512.c: Re-generated.
1994 * features/i386/i386-avx-avx512-linux.c: Re-generated.
1995 * features/i386/i386-avx.c: Re-generated.
1996 * features/i386/i386-avx-linux.c: Re-generated.
1997 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
1998 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
1999 * features/i386/i386-avx-mpx.c: Re-generated.
2000 * features/i386/i386-avx-mpx-linux.c: Re-generated.
2001 * features/i386/i386.c: Re-generated.
2002 * features/i386/i386-linux.c: Re-generated.
2003 * features/i386/i386-mmx.c: Re-generated.
2004 * features/i386/i386-mmx-linux.c: Re-generated.
2005 * features/i386/i386-mpx.c: Re-generated.
2006 * features/i386/i386-mpx-linux.c: Re-generated.
2007 * features/i386/x32-avx-avx512.c: Re-generated.
2008 * features/i386/x32-avx-avx512-linux.c: Re-generated.
2009 * features/i386/x32-avx.c: Re-generated.
2010 * features/i386/x32-avx-linux.c: Re-generated.
2011 * features/i386/x32.c: Re-generated.
2012 * features/i386/x32-linux.c: Re-generated.
2013 * features/microblaze.c: Re-generated.
2014 * features/microblaze-with-stack-protect.c: Re-generated.
2015 * features/mips64-dsp-linux.c: Re-generated.
2016 * features/mips64-linux.c: Re-generated.
2017 * features/mips-dsp-linux.c: Re-generated.
2018 * features/mips-linux.c: Re-generated.
2019 * features/nds32.c: Re-generated.
2020 * features/nios2.c: Re-generated.
2021 * features/nios2-linux.c: Re-generated.
2022 * features/rs6000/powerpc-32.c: Re-generated.
2023 * features/rs6000/powerpc-32l.c: Re-generated.
2024 * features/rs6000/powerpc-403.c: Re-generated.
2025 * features/rs6000/powerpc-403gc.c : Re-generated.
2026 * features/rs6000/powerpc-405.c: Re-generated.
2027 * features/rs6000/powerpc-505.c: Re-generated.
2028 * features/rs6000/powerpc-601.c: Re-generated.
2029 * features/rs6000/powerpc-602.c: Re-generated.
2030 * features/rs6000/powerpc-603.c: Re-generated.
2031 * features/rs6000/powerpc-604.c: Re-generated.
2032 * features/rs6000/powerpc-64.c: Re-generated.
2033 * features/rs6000/powerpc-64l.c: Re-generated.
2034 * features/rs6000/powerpc-7400.c: Re-generated.
2035 * features/rs6000/powerpc-750.c: Re-generated.
2036 * features/rs6000/powerpc-860.c: Re-generated.
2037 * features/rs6000/powerpc-altivec32.c: Re-generated.
2038 * features/rs6000/powerpc-altivec32l.c: Re-generated.
2039 * features/rs6000/powerpc-altivec64.c: Re-generated.
2040 * features/rs6000/powerpc-altivec64l.c: Re-generated.
2041 * features/rs6000/powerpc-cell32l.c: Re-generated.
2042 * features/rs6000/powerpc-cell64l.c: Re-generated.
2043 * features/rs6000/powerpc-e500.c: Re-generated.
2044 * features/rs6000/powerpc-e500l.c: Re-generated.
2045 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
2046 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
2047 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
2048 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
2049 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
2050 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
2051 * features/rs6000/powerpc-vsx32.c: Re-generated.
2052 * features/rs6000/powerpc-vsx32l.c: Re-generated.
2053 * features/rs6000/powerpc-vsx64.c: Re-generated.
2054 * features/rs6000/powerpc-vsx64l.c: Re-generated.
2055 * features/rs6000/rs6000.c: Re-generated.
2056 * features/s390-linux32.c: Re-generated.
2057 * features/s390-linux32v1.c: Re-generated.
2058 * features/s390-linux32v2.c: Re-generated.
2059 * features/s390-linux64.c: Re-generated.
2060 * features/s390-linux64v1.c: Re-generated.
2061 * features/s390-linux64v2.c: Re-generated.
2062 * features/s390-te-linux64.c: Re-generated.
2063 * features/s390-tevx-linux64.c: Re-generated.
2064 * features/s390-vx-linux64.c: Re-generated.
2065 * features/s390x-linux64.c: Re-generated.
2066 * features/s390x-linux64v1.c: Re-generated.
2067 * features/s390x-linux64v2.c: Re-generated.
2068 * features/s390x-te-linux64.c: Re-generated.
2069 * features/s390x-tevx-linux64.c: Re-generated.
2070 * features/s390x-vx-linux64.c: Re-generated.
2071 * features/sparc/sparc32-solaris.c: Re-generated.
2072 * features/sparc/sparc64-solaris.c: Re-generated.
2073 * features/tic6x-c62x.c: Re-generated.
2074 * features/tic6x-c62x-linux.c: Re-generated.
2075 * features/tic6x-c64x.c: Re-generated.
2076 * features/tic6x-c64x-linux.c: Re-generated.
2077 * features/tic6x-c64xp.c: Re-generated.
2078 * features/tic6x-c64xp-linux.c: Re-generated.
2080 2017-07-26 Yao Qi <yao.qi@linaro.org>
2082 * i386-linux-tdep.c (i386_linux_read_description): New function.
2083 (i386_linux_core_read_description): Call
2084 i386_linux_read_description.
2085 * i386-linux-tdep.h (i386_linux_read_description): Declare.
2086 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
2087 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
2088 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
2089 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
2090 * x86-linux-nat.c (x86_linux_read_description): Call
2091 i386_linux_read_description.
2093 2017-07-26 Yao Qi <yao.qi@linaro.org>
2096 * features/Makefile (%.c: %.xml): Pass the xml file name to
2097 command "maint print c-tdesc".
2098 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
2101 2017-07-26 Yao Qi <yao.qi@linaro.org>
2103 * target-descriptions.c (target_desc): Add ctor and dtor. Do
2104 in-class initialization.
2105 (tdesc_create_feature): Call new instead of XCNEW.
2106 (free_target_description): Ue delete.
2108 2017-07-25 John Baldwin <jhb@FreeBSD.org>
2110 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
2112 2017-07-25 Yao Qi <yao.qi@linaro.org>
2114 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
2116 (amd64_x32_init_abi): Likewise.
2117 * amd64-tdep.h (amd64_init_abi): Update declaration.
2118 (amd64_x32_init_abi): Likewise.
2120 2017-07-25 Yao Qi <yao.qi@linaro.org>
2123 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
2124 condition for FPSCR.
2125 (arm_linux_store_inferior_registers): Likewise.
2127 2017-07-22 Tom Tromey <tom@tromey.com>
2129 * break-catch-syscall.c (struct catch_syscall_inferior_data)
2130 <syscalls_counts>: Now a std::vector.
2131 (get_catch_syscall_inferior_data): Use "new".
2132 (catch_syscall_inferior_data_cleanup): Use "delete".
2133 (insert_catch_syscall, remove_catch_syscall)
2134 (clear_syscall_counts): Update.
2136 2017-07-22 Tom Tromey <tom@tromey.com>
2138 * break-catch-syscall.c (syscall_catchpoint)
2139 <syscalls_to_be_caught>: Now a std::vector<int>
2140 (~syscall_catchpoint): Remove.
2141 (insert_catch_syscall, remove_catch_syscall)
2142 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
2143 (print_mention_catch_syscall, print_recreate_catch_syscall):
2145 (create_syscall_event_catchpoint): Change type of "filter"
2147 (catch_syscall_split_args): Return a std::vector.
2148 (catch_syscall_command_1, catching_syscall_number_1): Update.
2150 2017-07-22 Tom Tromey <tom@tromey.com>
2152 * break-catch-throw.c (struct exception_catchpoint)
2153 <exception_rx>: Now a std::string.
2154 (~exception_catchpoint): Remove.
2155 (print_one_detail_exception_catchpoint): Update.
2156 (handle_gnu_v3_exceptions): Change type of except_rx.
2157 (extract_exception_regexp): Return a std::string.
2158 (catch_exception_command_1): Update.
2160 2017-07-22 Tom Tromey <tom@tromey.com>
2162 * break-catch-sig.c (gdb_signal_type): Remove typedef.
2163 (struct signal_catchpoint) <signals_to_be_caught>: Now a
2165 <catch_all>: Now a bool.
2166 (~signal_catchpoint): Remove.
2167 (signal_catchpoint_insert_location)
2168 (signal_catchpoint_remove_location)
2169 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
2170 (signal_catchpoint_print_mention)
2171 (signal_catchpoint_print_recreate)
2172 (signal_catchpoint_explains_signal): Update.
2173 (create_signal_catchpoint): Change type of "filter" and
2175 (catch_signal_split_args): Return a std::vector. Change type of
2177 (catch_signal_command): Update.
2179 2017-07-20 Pedro Alves <palves@redhat.com>
2181 * ada-lang.c (ada_language_defn): Make extern.
2182 (_initialize_ada_language): Remove add_language call.
2183 * c-lang.c (c_language_defn, cplus_language_defn)
2184 (asm_language_defn, minimal_language_defn): Make extern.
2185 (_initialize_c_language): Delete.
2186 * completer.c (compare_cstrings): Delete, moved to utils.h.
2187 * d-lang.c (d_language_defn): Make extern.
2188 (_initialize_d_language): Remove add_language calls.
2189 * defs.h (enum language): Add comment.
2190 * f-lang.c (f_language_defn): Make extern.
2191 (_initialize_f_language): Remove add_language call.
2192 * go-lang.c (go_language_defn): Make extern.
2193 (_initialize_go_language): Remove add_language call.
2194 * language.c: Include <algorithm>.
2195 (languages): Redefine as const array.
2196 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
2197 (set_language_command): Handle "local". Use for-range loop.
2198 (set_language): Remove loop.
2199 (language_enum): Rewrite.
2200 (language_def, language_str): Remove loops.
2201 (add_language): Delete.
2202 (add_set_language_command): New, based on add_languages.
2203 (skip_language_trampoline): Adjust.
2204 (local_language_defn): Delete.
2205 (language_gdbarch_post_init): Adjust.
2206 (_initialize_language): Remove add_language calls. Call
2207 add_set_language_command.
2208 * language.h (add_language): Delete.
2209 (auto_language_defn)
2210 (unknown_language_defn, minimal_language_defn, ada_language_defn)
2211 (asm_language_defn, c_language_defn, cplus_language_defn)
2212 (d_language_defn, f_language_defn, go_language_defn)
2213 (m2_language_defn, objc_language_defn, opencl_language_defn)
2214 (pascal_language_defn, rust_language_defn): Declare.
2215 * m2-lang.c (m2_language_defn): Make extern.
2216 (_initialize_m2_language): Remove add_language call.
2217 * objc-lang.c (objc_language_defn): Make extern.
2218 (_initialize_objc_language): Remove add_language call.
2219 * opencl-lang.c (opencl_language_defn): Make extern.
2220 (_initialize_opencl_language): Remove add_language call.
2221 * p-lang.c (pascal_language_defn): Make extern.
2222 (_initialize_pascal_language): Delete.
2223 * rust-lang.c (rust_language_defn): Make extern.
2224 (_initialize_rust_language): Delete.
2225 * utils.h (compare_cstrings): New static inline function.
2227 2017-07-20 Pedro Alves <palves@redhat.com>
2229 * ada-lang.c (ada_to_fixed_type_1): Adjust.
2230 (get_var_value): Constify parameters.
2231 (get_int_var_value): Change prototype.
2232 (to_fixed_range_type): Adjust.
2233 * ada-lang.h (get_int_var_value): Change prototype.
2235 2017-07-20 Pedro Alves <palves@redhat.com>
2237 * dwarf2read.c (dw2_lookup_symbol): Use
2238 SYMBOL_MATCHES_SEARCH_NAME.
2239 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
2241 2017-07-20 Pedro Alves <palves@redhat.com>
2243 * block.c (block_iter_name_step, block_iter_name_first)
2244 (block_iter_name_next): Delete.
2245 (block_lookup_symbol_primary): Adjust to use
2246 dict_iter_match_first/dict_iter_match_next.
2247 * block.h (block_iter_name_first, block_iter_name_next): Delete
2249 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
2250 dict_iter_match_first/dict_iter_match_next.
2252 2017-07-20 Pedro Alves <palves@redhat.com>
2254 * cp-support.c (cp_find_first_component_aux): Add missing case for
2257 2017-07-18 David Blaikie <dblaikie@gmail.com>
2259 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
2260 of dwo_cu's dwo_file.
2262 2017-07-18 Yao Qi <yao.qi@linaro.org>
2264 * remote.c (store_registers_using_G): Remove one line comment.
2266 2017-07-18 Yao Qi <yao.qi@linaro.org>
2268 * regcache.c (regcache_cpy): Simplify it.
2269 (regcache::cpy_no_passthrough): Remove it.
2270 * regcache.h (cpy_no_passthrough): Remove it.
2271 (regcache_dup, regcache_cpy): Update comments.
2273 2017-07-18 Pedro Alves <palves@redhat.com>
2275 * remote-sim.c (sim_command_completer): Adjust to work with a
2276 completion_tracker instead of a VEC.
2278 2017-07-17 Pedro Alves <palves@redhat.com>
2280 * completer.c (complete_source_filenames): New function.
2281 (complete_address_and_linespec_locations): New function.
2282 (location_completer): Use complete_address_and_linespec_locations.
2283 (completion_tracker::build_completion_result): Honor the tracker's
2284 request to suppress append.
2285 * completer.h (completion_tracker::suppress_append_ws)
2286 (completion_tracker::set_suppress_append_ws): New methods.
2287 (completion_tracker::m_suppress_append_ws): New field.
2288 (complete_source_filenames): New declaration.
2289 * linespec.c (linespec_complete_what): New.
2290 (struct ls_parser) <complete_what, completion_word,
2291 completion_quote_char, completion_quote_end, completion_tracker>:
2293 (string_find_incomplete_keyword_at_end): New.
2294 (linespec_lexer_lex_string): Record quote char. If in completion
2296 (linespec_lexer_consume_token): Advance the completion word point.
2297 (linespec_lexer_peek_token): Save/restore completion info.
2298 (save_stream_and_consume_token): New.
2299 (set_completion_after_number): New.
2300 (linespec_parse_basic): Set what to complete next depending on
2301 token. Handle function and label completions specially.
2302 (parse_linespec): Disable objc shortcut in completion mode. Set
2303 what to complete next depending on token type. Skip keyword if in
2305 (complete_linespec_component, linespec_complete): New.
2306 * linespec.h (linespec_complete): Declare.
2308 2017-07-17 Pedro Alves <palves@redhat.com>
2310 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
2311 Handle 'operator<' / 'operator<<'.
2313 2017-07-17 Pedro Alves <palves@redhat.com>
2315 * completer.c (collect_explicit_location_matches): Handle
2317 (convert_explicit_location_to_linespec): New, factored out from
2319 (convert_explicit_location_to_sals): ... this.
2320 (complete_label): New.
2321 (linespec_complete_label, find_label_symbols_in_block): New.
2322 (find_label_symbols): Add completion_mode parameter and adjust to
2323 call find_label_symbols_in_block.
2324 * linespec.h (linespec_complete_label): Declare.
2326 2017-07-17 Pedro Alves <palves@redhat.com>
2328 * ada-lang.c (ada_collect_symbol_completion_matches): Add
2329 complete_symbol_mode parameter.
2330 * cli/cli-cmds.c (complete_command): Get the completion result out
2331 of the handle_brkchars tracker if used a custom word point.
2332 * completer.c: Include "linespec.h".
2333 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
2334 (advance_to_expression_complete_word_point): New.
2335 (completion_tracker::completes_to_completion_word): New.
2336 (complete_files_symbols): Pass down
2337 complete_symbol_mode::EXPRESSION.
2338 (explicit_options, probe_options): New.
2339 (collect_explicit_location_matches): Complete on the
2340 explictit_loc->foo instead of word. Use
2341 linespec_complete_function. Handle MATCH_LINE. Handle offering
2342 keyword and options completions.
2343 (backup_text_ptr): Delete.
2344 (skip_keyword): New.
2345 (complete_explicit_location): Remove 'word' parameter. Add
2346 language, quoted_arg_start and quoted_arg_end parameters.
2347 Rewrite, parsing left to right.
2348 (location_completer): Rewrite.
2349 (location_completer_handle_brkchars): New function.
2350 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
2351 (enum complete_line_internal_reason): Adjust comments.
2352 (completion_tracker::discard_completions): New.
2353 (completer_handle_brkchars_func_for_completer): Handle
2355 (gdb_custom_word_point_brkchars)
2356 (gdb_org_rl_basic_quote_characters): New.
2357 (gdb_completion_word_break_characters_throw)
2358 (completion_find_completion_word): Handle trackers that use a
2360 (completion_tracker::advance_custom_word_point_by): New.
2361 (completion_tracker::build_completion_result): Don't rely on
2362 readline appending the quote char.
2363 (gdb_rl_attempted_completion_function_throw): Handle trackers that
2364 use a custom word point.
2365 (gdb_rl_attempted_completion_function): Restore
2366 rl_basic_quote_characters.
2367 * completer.h (class completion_tracker): Extend intro comment.
2368 (completion_tracker::set_quote_char)
2369 (completion_tracker::quote_char)
2370 (completion_tracker::set_use_custom_word_point)
2371 (completion_tracker::use_custom_word_point)
2372 (completion_tracker::custom_word_point)
2373 (completion_tracker::set_custom_word_point)
2374 (completion_tracker::advance_custom_word_point_by)
2375 (completion_tracker::completes_to_completion_word)
2376 (completion_tracker::discard_completions): New methods.
2377 (completion_tracker::m_quote_char)
2378 (completion_tracker::m_use_custom_word_point)
2379 (completion_tracker::m_custom_word_point): New fields.
2380 (advance_to_expression_complete_word_point): Declare.
2381 * f-lang.c (f_collect_symbol_completion_matches): Add
2382 complete_symbol_mode parameter.
2383 * language.h (struct language_defn)
2384 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
2386 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
2387 (linespec_complete_function): New function.
2388 (linespec_lexer_lex_keyword): Adjust.
2389 * linespec.h (linespec_keywords, linespec_complete_function): New
2391 * location.c (find_end_quote): New function.
2392 (explicit_location_lex_one): Add explicit_completion_info
2393 parameter. Save quoting info. Don't throw if being called for
2394 completion. Don't handle Ada operators here.
2395 (is_cp_operator, skip_op_false_positives, first_of)
2396 (explicit_location_lex_one_function): New function.
2397 (string_to_explicit_location): Replace 'dont_throw' parameter with
2398 an explicit_completion_info pointer parameter. Handle it. Don't
2399 use explicit_location_lex_one to lex function names. Use
2400 explicit_location_lex_one_function instead.
2401 * location.h (struct explicit_completion_info): New.
2402 (string_to_explicit_location): Replace 'dont_throw' parameter with
2403 an explicit_completion_info pointer parameter.
2404 * symtab.c (default_collect_symbol_completion_matches_break_on):
2405 Add complete_symbol_mode parameter. Handle LINESPEC mode.
2406 (default_collect_symbol_completion_matches)
2407 (collect_symbol_completion_matches): Add complete_symbol_mode
2409 (collect_symbol_completion_matches_type): Pass down
2410 complete_symbol_mode::EXPRESSION.
2411 (collect_file_symbol_completion_matches): Add complete_symbol_mode
2412 parameter. Handle LINESPEC mode.
2413 * symtab.h (complete_symbol_mode): New.
2414 (default_collect_symbol_completion_matches_break_on)
2415 (default_collect_symbol_completion_matches)
2416 (collect_symbol_completion_matches)
2417 (collect_file_symbol_completion_matches): Add complete_symbol_mode
2420 2017-07-17 Pedro Alves <palves@redhat.com>
2422 * utils.c (enum class strncmp_iw_mode): New.
2423 (strcmp_iw): Rename to ...
2424 (strncmp_iw_with_mode): ... this. Add string2_len and mode
2425 parameters. Handle them.
2427 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
2428 * utils.h (strncmp_iw): Declare.
2429 (strcmp_iw): Move describing comments here.
2431 2017-07-17 Pedro Alves <palves@redhat.com>
2433 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
2435 * c-typeprint.c (is_type_conversion_operator): Use
2437 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
2438 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
2440 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
2441 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
2442 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
2443 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
2445 * location.c: Include "cp-support.h".
2446 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
2448 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
2451 2017-07-17 Pedro Alves <palves@redhat.com>
2453 * cli/cli-cmds.c (complete_command): Use a completion tracker
2454 along with completion_find_completion_word for handle_brkchars
2456 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
2457 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
2458 (struct gdb_rl_completion_word_info): New.
2459 (gdb_rl_find_completion_word): New.
2460 (completion_find_completion_word): New.
2461 * completer.h (completion_find_completion_word): Declare.
2463 2017-07-17 Pedro Alves <palves@redhat.com>
2465 * ada-lang.c (symbol_completion_match): Adjust comments.
2466 (symbol_completion_add): Replace vector parameter with
2467 completion_tracker parameter. Use it.
2468 (ada_make_symbol_completion_list): Rename to...
2469 (ada_collect_symbol_completion_matches): ... this. Add
2470 completion_tracker parameter and use it.
2471 (ada_language_defn): Adjust.
2472 * break-catch-syscall.c (catch_syscall_completer): Adjust
2473 prototype and work with completion_tracker instead of VEC.
2474 * breakpoint.c (condition_completer): Adjust prototype and work
2475 with completion_tracker instead of VEC.
2476 * c-lang.c (c_language_defn, cplus_language_defn)
2477 (asm_language_defn, minimal_language_defn): Adjust to renames.
2478 * cli/cli-cmds.c (complete_command): Rework using
2479 completion_tracker. Catch exceptions when completing.
2480 * cli/cli-decode.c (integer_unlimited_completer)
2481 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
2482 with completion_tracker instead of VEC.
2483 * command.h (struct completion_tracker): Forward declare.
2484 (completer_ftype, completer_handle_brkchars_ftype): Change
2486 (complete_on_cmdlist, complete_on_enum): Adjust.
2487 * completer.c: Include <algorithm>.
2488 (struct gdb_completer_state): New.
2489 (current_completion): New global.
2490 (readline_line_completion_function): Delete.
2491 (noop_completer, filename_completer)
2492 (filename_completer_handle_brkchars, complete_files_symbols)
2493 (linespec_location_completer): Adjust to work with a
2494 completion_tracker instead of a VEC.
2495 (string_or_empty): New.
2496 (collect_explicit_location_matches): Adjust to work with a
2497 completion_tracker instead of a VEC.
2498 (explicit_location_completer): Rename to ...
2499 (complete_explicit_location): ... this and adjust to work with a
2500 completion_tracker instead of a VEC.
2501 (location_completer): Adjust to work with a completion_tracker
2503 (add_struct_fields): Adjust to work with a completion_list instead
2505 (expression_completer): Rename to ...
2506 (complete_expression): ... this and adjust to work with a
2507 completion_tracker instead of a VEC. Use complete_files_symbols.
2508 (expression_completer): Reimplement on top of complete_expression.
2509 (symbol_completer): Adjust to work with a completion_tracker
2511 (enum complete_line_internal_reason): Add describing comments.
2512 (complete_line_internal_normal_command): Adjust to work with a
2513 completion_tracker instead of a VEC.
2514 (complete_line_internal): Rename to ...
2515 (complete_line_internal_1): ... this and adjust to work with a
2516 completion_tracker instead of a VEC. Assert TEXT is NULL in the
2517 handle_brkchars phase.
2518 (new_completion_tracker): Delete.
2519 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
2520 complete_line_internal_1.
2521 (free_completion_tracker): Delete.
2522 (INITIAL_COMPLETION_HTAB_SIZE): New.
2523 (completion_tracker::completion_tracker)
2524 (completion_tracker::~completion_tracker): New.
2525 (maybe_add_completion): Delete.
2526 (completion_tracker::maybe_add_completion)
2527 (completion_tracker::add_completion)
2528 (completion_tracker::add_completions): New.
2529 (throw_max_completions_reached_error): Delete.
2530 (complete_line): Adjust to work with a completion_tracker instead
2531 of a VEC. Don't create a completion_tracker_t or check for max
2533 (command_completer, command_completer_handle_brkchars)
2534 (signal_completer, reg_or_group_completer_1)
2535 (reg_or_group_completer, default_completer_handle_brkchars):
2536 Adjust to work with a completion_tracker.
2537 (gdb_completion_word_break_characters_throw): New.
2538 (gdb_completion_word_break_characters): Reimplement.
2539 (line_completion_function): Delete.
2540 (completion_tracker::recompute_lowest_common_denominator)
2541 (expand_preserving_ws)
2542 (completion_tracker::build_completion_result)
2543 (completion_result::completion_result)
2544 (completion_result::completion_result)
2545 (completion_result::~completion_result)
2546 (completion_result::completion_result)
2547 (completion_result::release_match_list, compare_cstrings)
2548 (completion_result::sort_match_list)
2549 (completion_result::reset_match_list)
2550 (gdb_rl_attempted_completion_function_throw)
2551 (gdb_rl_attempted_completion_function): New.
2552 * completer.h (completion_list, struct completion_result)
2553 (class completion_tracker): New.
2554 (complete_line): Add completion_tracker parameter.
2555 (readline_line_completion_function): Delete.
2556 (gdb_rl_attempted_completion_function): New.
2557 (noop_completer, filename_completer, expression_completer)
2558 (location_completer, symbol_completer, command_completer)
2559 (signal_completer, reg_or_group_completer): Update prototypes.
2560 (completion_tracker_t, new_completion_tracker)
2561 (make_cleanup_free_completion_tracker): Delete.
2562 (enum maybe_add_completion_enum): Delete.
2563 (maybe_add_completion): Delete.
2564 (throw_max_completions_reached_error): Delete.
2565 * corefile.c (complete_set_gnutarget): Adjust to work with a
2566 completion_tracker instead of a VEC.
2567 * cp-abi.c (cp_abi_completer): Adjust to work with a
2568 completion_tracker instead of a VEC.
2569 * d-lang.c (d_language_defn): Adjust.
2570 * disasm.c (disassembler_options_completer): Adjust to work with a
2571 completion_tracker instead of a VEC.
2572 * f-lang.c (f_make_symbol_completion_list): Rename to ...
2573 (f_collect_symbol_completion_matches): ... this. Adjust to work
2574 with a completion_tracker instead of a VEC.
2575 (f_language_defn): Adjust.
2576 * go-lang.c (go_language_defn): Adjust.
2577 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
2578 Adjust to work with a completion_tracker instead of a VEC.
2579 * infrun.c (handle_completer): Likewise.
2580 * interps.c (interpreter_completer): Likewise.
2581 * interps.h (interpreter_completer): Likewise.
2582 * language.c (unknown_language_defn, auto_language_defn)
2583 (local_language_defn): Adjust.
2584 * language.h (language_defn::la_make_symbol_completion_list):
2586 (language_defn::la_collect_symbol_completion_matches): ... this
2587 and adjust to work with a completion_tracker instead of a VEC.
2588 * m2-lang.c (m2_language_defn): Adjust.
2589 * objc-lang.c (objc_language_defn): Adjust.
2590 * opencl-lang.c (opencl_language_defn): Adjust.
2591 * p-lang.c (pascal_language_defn): Adjust.
2592 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
2593 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
2594 with a completion_tracker.
2595 * rust-lang.c (rust_language_defn): Adjust.
2596 * symtab.c (free_completion_list, do_free_completion_list)
2597 (return_val, completion_tracker): Delete.
2598 (completion_list_add_name, completion_list_add_symbol)
2599 (completion_list_add_msymbol, completion_list_objc_symbol)
2600 (completion_list_add_fields, add_symtab_completions): Add
2601 completion_tracker parameter and use it.
2602 (default_make_symbol_completion_list_break_on_1): Rename to...
2603 (default_collect_symbol_completion_matches_break_on): ... this.
2604 Add completion_tracker parameter and use it instead of allocating
2605 a completion tracker here.
2606 (default_make_symbol_completion_list_break_on): Delete old
2608 (default_make_symbol_completion_list): Delete.
2609 (default_collect_symbol_completion_matches): New.
2610 (make_symbol_completion_list): Delete.
2611 (collect_symbol_completion_matches): New.
2612 (make_symbol_completion_type): Rename to ...
2613 (collect_symbol_completion_matches_type): ... this. Add
2614 completion_tracker parameter and use it instead of VEC.
2615 (make_file_symbol_completion_list_1): Rename to...
2616 (collect_file_symbol_completion_matches): ... this. Add
2617 completion_tracker parameter and use it instead of VEC.
2618 (make_file_symbol_completion_list): Delete.
2619 (add_filename_to_list): Use completion_list instead of a VEC.
2620 (add_partial_filename_data::list): Now a completion_list.
2621 (make_source_files_completion_list): Work with a completion_list
2623 * symtab.h: Include "completer.h".
2624 (default_make_symbol_completion_list_break_on)
2625 (default_make_symbol_completion_list, make_symbol_completion_list)
2626 (make_symbol_completion_type, make_file_symbol_completion_list)
2627 (make_source_files_completion_list): Delete.
2628 (default_collect_symbol_completion_matches_break_on)
2629 (default_collect_symbol_completion_matches)
2630 (collect_symbol_completion_matches)
2631 (collect_symbol_completion_matches_type)
2632 (collect_file_symbol_completion_matches)
2633 (make_source_files_completion_list): New.
2634 * top.c (init_main): Don't install a rl_completion_entry_function
2635 hook. Install a rl_attempted_completion_function hook instead.
2636 * tui/tui-layout.c (layout_completer): Adjust to work with a
2638 * tui/tui-regs.c (tui_reggroup_completer):
2639 * tui/tui-win.c (window_name_completer, focus_completer)
2640 (winheight_completer): Adjust to work with a completion_tracker.
2641 * value.c: Include "completer.h".
2642 (complete_internalvar): Adjust to work with a completion_tracker.
2643 * value.h (complete_internalvar): Likewise.
2645 2017-07-17 Pedro Alves <palves@redhat.com>
2647 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
2649 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
2650 comments to completer_ftype's declaration.
2651 <completer_handle_brkchars>: Change type to
2652 completer_handle_brkchars_ftype.
2653 * command.h (completer_ftype): Add describing comment and give
2654 names to parameters.
2655 (completer_ftype_void): Rename to ...
2656 (completer_handle_brkchars_ftype) ... this. Add describing comment.
2657 (set_cmd_completer_handle_brkchars): Adjust.
2658 * completer.c (filename_completer_handle_brkchars): New function.
2659 (complete_line_internal_normal_command): New function, factored
2661 (complete_line_internal): ... here.
2662 (command_completer_handle_brkchars)
2663 (default_completer_handle_brkchars)
2664 (completer_handle_brkchars_func_for_completer): New functions.
2665 * completer.h (set_gdb_completion_word_break_characters): Delete
2667 (completer_handle_brkchars_func_for_completer): New declaration.
2668 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
2669 completer_handle_brkchars_func_for_completer.
2671 2017-07-17 Pedro Alves <palves@redhat.com>
2673 * completer.c (symbol_completer): New function, based on
2674 make_symbol_completion_list_fn.
2675 * completer.h (symbol_completer): New declaration.
2676 * guile/scm-cmd.c (cmdscm_completers): Adjust.
2677 * python/py-cmd.c (completers): Adjust.
2678 * symtab.c (make_symbol_completion_list_fn): Delete.
2679 * symtab.h (make_symbol_completion_list_fn): Delete.
2680 * cli/cli-decode.c (add_cmd): Adjust.
2682 2017-07-17 Pedro Alves <palves@redhat.com>
2684 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
2685 * dwarf2read.c: Include "filename-seen-cache.h".
2686 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
2687 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
2688 * filename-seen-cache.c: New file.
2689 * filename-seen-cache.h: New file.
2690 * symtab.c: Include "filename-seen-cache.h".
2691 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
2692 (create_filename_seen_cache, clear_filename_seen_cache)
2693 (delete_filename_seen_cache, filename_seen): Delete, parts moved
2694 to filename-seen-cache.h/filename-seen-cache.c.
2695 (output_source_filename, sources_info)
2696 (maybe_add_partial_symtab_filename)
2697 (make_source_files_completion_list): Adjust to use
2698 filename_seen_cache.
2700 2017-07-17 Pedro Alves <palves@redhat.com>
2702 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
2704 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
2705 dwarf2_debug_sections*)): New.
2706 (dwarf2_per_objfile::dwarf2_per_objfile(const
2707 dwarf2_per_objfile&)): Declare as deleted.
2708 (dwarf2_per_objfile::operator=): Declare as deleted.
2709 (dwarf2_per_objfile::dwarf2_per_objfile)
2710 (dwarf2_per_objfile::~dwarf2_per_objfile)
2711 (dwarf2_per_objfile::free_cached_comp_units): New.
2712 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
2713 ctor. Call dwarf2_per_objfile's ctor manually.
2714 (dwarf2_locate_sections): Deleted/refactored as ...
2715 (dwarf2_per_objfile::locate_sections): ... this new method.
2716 (free_cached_comp_units): Defer to
2717 dwarf2_per_objfile::free_cached_comp_units.
2718 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
2720 2017-07-14 Tom Tromey <tom@tromey.com>
2723 * rust-exp.y (convert_ast_to_expression): Add "want_type"
2725 <UNOP_SIZEOF>: Split into separate case.
2726 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
2728 2017-07-14 Tom Tromey <tom@tromey.com>
2731 * symtab.c (symbol_matches_domain): Add language_rust to special
2733 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
2734 treat LOC_TYPEDEF symbols as variables.
2736 2017-07-14 Pedro Alves <palves@redhat.com>
2738 * symtab.c (make_file_symbol_completion_list_1): Iterate over
2739 symtabs matching all symtabs with SRCFILE as file name instead of
2740 only considering the first hit, with lookup_symtab.
2742 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2744 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
2745 operator_name parameters.
2746 (gen_expr): Update function call.
2748 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2750 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
2752 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
2754 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
2755 parameter, use agent_expr::gdbarch instead, update function
2757 (locexpr_tracepoint_var_ref): Likewise.
2758 (loclist_tracepoint_var_ref): Likewise.
2759 * ax-gdb.c (gen_trace_static_fields): Likewise.
2760 (gen_traced_pop): Likewise.
2761 (gen_frame_args_address): Likewise.
2762 (gen_frame_locals_address): Likewise.
2763 (gen_var_ref): Likewise.
2764 (gen_struct_ref_recursive): Likewise.
2765 (gen_static_field): Likewise.
2766 (gen_maybe_namespace_elt): Likewise.
2767 (gen_expr): Likewise.
2768 (gen_trace_for_var): Likewise.
2769 (gen_trace_for_expr): Likewise.
2770 (gen_trace_for_return_address): Likewise.
2772 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2774 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
2776 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
2778 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2780 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
2781 from ax, update calls.
2782 (gen_usual_arithmetic): Likewise.
2783 (gen_integral_promotions): Likewise.
2784 (gen_bitfield_ref): Likewise.
2785 (gen_primitive_field): Likewise.
2786 (gen_struct_ref_recursive): Likewise.
2787 (gen_struct_ref): Likewise.
2788 (gen_maybe_namespace_elt): Likewise.
2789 (gen_struct_elt_for_reference): Likewise.
2790 (gen_namespace_elt): Likewise.
2791 (gen_aggregate_elt_ref): Likewise.
2792 (gen_expr): Get gdbarch from ax, update calls.
2793 (gen_expr_binop_rest): Likewise.
2795 2017-07-13 Pedro Alves <palves@redhat.com>
2797 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
2799 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
2800 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
2801 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
2802 tdesc_amd64_linux as default tdesc. Get final tdesc from the
2804 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
2805 Get final tdesc from the tdep.
2806 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
2808 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2809 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2810 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
2811 Use it as default tdesc.
2812 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
2813 down to amd_init_abi. No longer handle fallback tdesc here.
2814 * amd64-tdep.h (tdesc_x32): Declare.
2815 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
2817 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
2820 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2822 * s390-linux-tdep.c (s390_process_record): Add support for
2823 instructions new in arch12.
2825 2017-07-11 John Baldwin <jhb@FreeBSD.org>
2827 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
2828 PT_GETFSBASE and PT_GETGSBASE.
2829 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
2832 2017-07-11 John Baldwin <jhb@FreeBSD.org>
2834 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
2835 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
2836 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
2838 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
2839 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
2840 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
2841 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
2842 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
2843 * features/i386/amd64.xml: Add 64bit-segments.xml.
2844 * features/i386/amd64-avx-avx512.c: Regenerated.
2845 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
2846 * features/i386/amd64-avx-mpx.c: Regenerated.
2847 * features/i386/amd64-avx.c: Regenerated.
2848 * features/i386/amd64-mpx.c: Regenerated.
2849 * features/i386/amd64.c: Regenerated.
2850 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
2851 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2852 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
2853 * regformats/i386/amd64-avx.dat: Regenerated.
2854 * regformats/i386/amd64-mpx.dat: Regenerated.
2855 * regformats/i386/amd64.dat: Regenerated.
2857 2017-07-10 Yao Qi <yao.qi@linaro.org>
2859 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
2860 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
2862 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
2864 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
2866 * gnulib/aclocal.m4: Regenerate.
2867 * gnulib/config.in: Regenerate.
2868 * gnulib/configure: Regenerate.
2869 * gnulib/import/Makefile.am: Regenerate.
2870 * gnulib/import/Makefile.in: Regenerate.
2871 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2872 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2873 * gnulib/import/m4/environ.m4: New file.
2874 * gnulib/import/m4/setenv.m4: New file.
2875 * gnulib/import/setenv.c: New file.
2876 * gnulib/import/unsetenv.c: New file.
2878 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
2880 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
2881 address when op is DW_OP_addr.
2883 2017-07-09 Tom Tromey <tom@tromey.com>
2885 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
2886 check and apply to outer type.
2888 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2890 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
2891 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
2892 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
2893 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
2895 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2897 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
2899 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2901 * corelow.c (get_core_siginfo): Remove.
2902 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
2903 instead of get_core_siginfo.
2904 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
2905 * gdbarch.h: Re-generate.
2906 * gdbarch.c: Re-generate.
2907 * linux-tdep.c (linux_core_xfer_siginfo): New.
2908 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
2910 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2912 * corelow.c (thread_section_name): Move to ...
2913 * gdbcore.h (thread_section_name): ... here.
2915 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2917 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
2918 (struct siginfo32): New.
2919 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
2920 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
2921 via ptrace(PT_LWPINFO).
2923 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2925 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
2926 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
2927 (fbsd_get_siginfo_type): New.
2928 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
2929 (_initialize_fbsd_tdep): New.
2931 2017-07-06 David Blaikie <dblaikie@gmail.com>
2933 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
2934 a singular dwo_unit*) to support multiple CUs in the same way that
2935 multiple TUs are supported.
2936 (create_cus_hash_table): Replace create_dwo_cu with a function for
2937 parsing multiple CUs from a DWO file.
2938 (open_and_init_dwo_file): Use create_cus_hash_table rather than
2940 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
2941 htab_find, rather than comparing the signature to a singleton CU in
2944 2017-07-06 Pedro Alves <palves@redhat.com>
2946 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
2948 2017-07-04 Pedro Alves <palves@redhat.com>
2950 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
2951 * gdbtypes.h (TYPE_STATIC): Delete.
2952 (struct fn_field) <is_public, is_abstract, is_static, is_final,
2953 is_synchronized, is_native>: Delete.
2955 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
2956 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
2957 (TYPE_FN_FIELD_ABSTRACT): Delete.
2959 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
2961 * buffer.h (buffer_finish): Fix spelling mistakes.
2963 2017-07-01 Eli Zaretskii <eliz@gnu.org>
2965 * .dir-locals.el: Automatically switch to C-style comments in
2966 versions of Emacs that support the feature.
2968 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
2969 Pedro Alves <palves@redhat.com>
2972 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
2973 (process_next_line): New variable 'inline_cmd'.
2974 Adjust 'if' clauses for "python", "compile" and "guile" to use
2975 'command_name_equals' and check for '!inline_cmd'.
2977 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
2980 * cli/cli-script.c (command_name_equals_not_inline): New function.
2981 (process_next_line): Adjust 'if' clauses for "python", "compile"
2982 and "guile" to use command_name_equals_not_inline.
2984 2017-06-29 Pedro Alves <palves@redhat.com>
2986 * completer.c (expression_completer): Call
2987 linespec_location_completer instead of location_completer.
2989 2017-06-29 Pedro Alves <palves@redhat.com>
2991 * completer.c (expression_completer): Remove code that recomputes
2994 2017-06-29 Yao Qi <yao.qi@linaro.org>
2996 * regformats/regdat.sh: Generate code with
2997 "ifndef IN_PROCESS_AGENT".
2999 2017-06-28 Pedro Alves <palves@redhat.com>
3001 * command.h: Include "common/scoped_restore.h".
3003 2017-06-28 Yao Qi <yao.qi@linaro.org>
3005 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
3006 instead of obstack_grow.
3008 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
3011 * symfile.c (reread_symbols): Call objfiles_changed just before
3014 2017-06-27 Pedro Alves <palves@redhat.com>
3016 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
3017 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
3018 (completion_list_add_symbol, completion_list_add_msymbol):
3019 ... these new functions.
3020 (add_symtab_completions)
3021 (default_make_symbol_completion_list_break_on_1): Adjust.
3023 2017-06-27 Pedro Alves <palves@redhat.com>
3025 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
3026 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
3027 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
3029 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
3030 'storage_obstack' field an auto_obstack. In-class initialize all
3031 non-bitfield fields. Make minsyms_read bool.
3032 * symfile.c (read_symbols): Adjust.
3034 2017-06-27 Alan Hayward <alan.hayward@arm.com>
3036 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
3037 (gdbsim_store_register): Likewise.
3039 2017-06-27 Pedro Alves <palves@redhat.com>
3041 * c-exp.y (name_obstack): Now an auto_obstack.
3042 (yylex): Use auto_obstack::clear.
3043 (c_parse): Use auto_obstack::clear instead of reinitializing and
3044 freeing the obstack.
3045 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
3046 * d-exp.y (name_obstack): Now an auto_obstack.
3047 (yylex): Use auto_obstack::clear.
3048 (d_parse): Use auto_obstack::clear instead of reinitializing and
3049 freeing the obstack.
3050 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
3052 * dwarf2read.c (create_addrmap_from_index)
3053 (dwarf2_build_psymtabs_hard)
3054 (update_enumeration_type_from_children): Likewise.
3055 * gdb_obstack.h (auto_obstack): New type.
3056 * go-exp.y (name_obstack): Now an auto_obstack.
3057 (build_packaged_name): Use auto_obstack::clear.
3058 (go_parse): Use auto_obstack::clear instead of reinitializing and
3059 freeing the obstack.
3060 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
3062 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
3063 * rust-exp.y (work_obstack): Now an auto_obstack.
3064 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
3065 reinitializing and freeing the obstack.
3066 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
3067 (host_char_to_target): Use auto_obstack.
3068 * utils.h (make_cleanup_obstack_free): Delete declaration.
3069 * valprint.c (generic_emit_char, generic_printstr): Use
3072 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
3074 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
3076 (darwin_init_thread_list): Don't update dummy thread.
3077 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
3079 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
3081 * record-full.c (netorder16): Remove.
3083 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
3085 * common/diagnostics.h: Define macros for GCC.
3086 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
3087 * common/vec.h: Include diagnostics.h.
3088 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
3089 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
3092 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
3094 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
3096 * ada-lex.l: Ignore deprecated register warnings.
3098 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
3100 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
3101 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
3103 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
3105 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
3108 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
3110 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
3112 2017-06-23 Alan Hayward <alan.hayward@arm.com>
3114 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
3115 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
3116 (xtensa_register_read_masked): Likewise.
3118 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
3120 * common/environ.c (gdb_environ::unset): Update comment.
3122 2017-06-22 Alan Hayward <alan.hayward@arm.com>
3124 * python/py-unwind.c (pyuw_sniffer): Allocate space for
3127 2017-06-22 Alan Hayward <alan.hayward@arm.com>
3129 * record-full.c (record_full_exec_insn): Use byte_vector.
3131 2017-06-22 Yao Qi <yao.qi@linaro.org>
3133 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
3134 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
3136 2017-06-22 Alan Hayward <alan.hayward@arm.com>
3138 * remote.c (cached_reg): Move from here...
3139 * regcache.h (cached_reg): ...to here.
3140 * python/py-unwind.c (struct reg_info): Remove.
3141 (cached_frame_info): Use cached_reg_t.
3142 (pyuw_prev_register): Likewise.
3143 (pyuw_sniffer): Use cached_reg_t and allocate registers.
3144 (pyuw_dealloc_cache): Free all registers.
3146 2017-06-22 Pedro Alves <palves@redhat.com>
3147 Simon Marchi <simon.marchi@ericsson.com>
3149 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
3151 * common/diagnostics.h: New file.
3153 2017-06-22 Pedro Alves <palves@redhat.com>
3155 * common/agent.h: Add include guards.
3157 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
3159 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
3160 talk about addressable units instead of bytes.
3162 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3164 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
3165 of '::const_iterator'.
3167 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3169 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3170 'unittests/environ-selftests.c'.
3171 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
3172 * charset.c (find_charset_names): Declare object 'iconv_env'.
3173 Update code to use 'iconv_env' object. Remove call to
3175 * common/environ.c: Include <utility>.
3176 (make_environ): Delete function.
3177 (free_environ): Delete function.
3178 (gdb_environ::clear): New function.
3179 (gdb_environ::operator=): New function.
3180 (gdb_environ::get): Likewise.
3181 (environ_vector): Delete function.
3182 (set_in_environ): Delete function.
3183 (gdb_environ::set): New function.
3184 (unset_in_environ): Delete function.
3185 (gdb_environ::unset): New function.
3186 (gdb_environ::envp): Likewise.
3187 * common/environ.h: Include <vector>.
3188 (struct gdb_environ): Delete; transform into...
3189 (class gdb_environ): ... this class.
3190 (free_environ): Delete prototype.
3191 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
3192 environ_vector): Likewise.
3193 * infcmd.c (run_command_1): Update code to call
3194 'envp' from 'gdb_environ' class.
3195 (environment_info): Update code to call methods from 'gdb_environ'
3197 (unset_environment_command): Likewise.
3198 (path_info): Likewise.
3199 (path_command): Likewise.
3200 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
3201 (inferior::inferior): Initialize 'environment' using the host's
3203 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
3204 Include "environ.h".
3205 (class inferior) <environment>: Change type from 'struct
3206 gdb_environ' to 'gdb_environ'.
3207 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
3208 methods from 'gdb_environ' class.
3209 * solib.c (solib_find_1): Likewise
3210 * unittests/environ-selftests.c: New file.
3212 2017-06-20 Yao Qi <yao.qi@linaro.org>
3214 * features/i386/i386-linux.xml: Exchange the order of including
3215 32bit-linux.xml and 32bit-sse.xml.
3216 * features/i386/i386-linux.c: Regenerated.
3218 2017-06-20 Yao Qi <yao.qi@linaro.org>
3220 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
3221 Delete copy ctor and assignment operator.
3222 (tdesc_type): Likewise.
3223 (tdesc_feature): Likewise.
3224 (tdesc_free_reg): Remove.
3225 (tdesc_create_reg): Use new.
3226 (tdesc_free_type): Remove.
3227 (tdesc_create_vector): Use new.
3228 (tdesc_create_union): Likewise.
3229 (tdesc_create_flags): Likewise.
3230 (tdesc_create_enum): Likewise.
3231 (tdesc_free_feature): Delete.
3232 (free_target_description): Use delete.
3234 2017-06-19 John Baldwin <jhb@FreeBSD.org>
3236 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
3239 2017-06-19 Pedro Alves <palves@redhat.com>
3241 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
3242 after gdb::unlinker.
3244 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
3246 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
3247 gdb_environ to access an environment variable.
3249 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3251 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
3254 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3256 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
3258 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3260 * configure: Re-generate.
3261 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
3263 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3265 * configure: Re-generate.
3266 * warning.m4: Pass -Werror to compiler when checking for
3267 supported warning flags.
3269 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3271 * Makefile.in (COMPILE.pre): Add "-x c++".
3273 2017-06-16 Alan Hayward <alan.hayward@arm.com>
3274 Pedro Alves <palves@redhat.com>
3275 Yao Qi <yao.qi@linaro.org>
3277 * defs.h (RequireLongest): New.
3278 (extract_integer): Declare function template.
3279 (extract_signed_integer): Remove the declaration, but define it
3281 (extract_unsigned_integer): Likewise.
3282 (store_integer): Declare function template.
3283 (store_signed_integer): Remove the declaration, but define it
3285 (store_unsigned_integer): Likewise.
3286 * findvar.c (extract_integer): New function template.
3287 (extract_signed_integer): Remove.
3288 (extract_unsigned_integer): Remove.
3289 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
3291 (store_integer): New function template.
3292 (store_signed_integer): Remove.
3293 (store_unsigned_integer): Remove.
3294 (store_integer): Explicit instantiations.
3295 * regcache.c (regcache_raw_read_signed): Update.
3296 (regcache::raw_read): New function.
3297 (regcache::raw_read_signed): Remove.
3298 (regcache::raw_read_unsigned): Remove.
3299 (regcache_raw_read_unsigned): Update.
3300 (regcache_raw_write_unsigned): Update.
3301 (regcache::raw_write_signed): Remove.
3302 (regcache::raw_write): New function.
3303 (regcache_cooked_read_signed): Update.
3304 (regcache::raw_write_unsigned): Remove.
3305 (regcache::cooked_read_signed): Remove.
3306 (regcache_cooked_read_unsigned): Update.
3307 (regcache::cooked_read_unsigned): Remove.
3308 (regcache_cooked_write_signed): Update.
3309 (regcache_cooked_write_unsigned): Update.
3310 * regcache.h (regcache) <raw_read_signed>: Remove.
3311 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
3312 <raw_read, raw_write>: New.
3313 <cooked_read_signed, cooked_write_signed>: Remove.
3314 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
3315 <cooked_read, cooked_write>: New.
3316 * sh64-tdep.c (sh64_pseudo_register_read): Update.
3317 (sh64_pseudo_register_write): Update.
3319 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
3321 * arc-tdep.c (arc_disassembler_options): New variable.
3322 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
3323 of default_print_insn.
3324 (arc_delayed_print_insn): Set info->section when needed,
3325 use default_print_insn to retrieve a disassembler.
3327 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
3330 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
3331 to mention $SHELL and startup-with-shell.
3333 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3335 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
3337 2017-06-14 Yao Qi <yao.qi@linaro.org>
3339 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
3340 default_print_insn instead of print_insn_aarch64.
3341 * arm-tdep.c (gdb_print_insn_arm): Call
3342 default_print_insn instead of print_insn_big_arm
3343 and print_insn_little_arm.
3344 * i386-tdep.c (i386_print_insn): Call default_print_insn
3345 instead of print_insn_i386.
3346 * ia64-tdep.c (ia64_print_insn): Call
3347 default_print_insn instead of print_insn_ia64.
3348 * mips-tdep.c (gdb_print_insn_mips): Call
3349 default_print_insn instead of print_insn_big_mips
3350 and print_insn_little_mips.
3351 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
3352 instead of print_insn_spu.
3354 2017-06-14 Pedro Alves <palves@redhat.com>
3356 * ada-lang.c: Include "common/byte-vector.h".
3357 (ada_value_primitive_packed_val): Use gdb::byte_vector.
3358 * charset.c (wchar_iterator::iterate): Resize the vector instead
3360 * common/byte-vector.h: Include "common/def-vector.h".
3361 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
3362 * cli/cli-dump.c: Include "common/byte-vector.h".
3363 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
3364 * common/byte-vector.h: New file.
3365 * common/def-vector.h: New file.
3366 * common/default-init-alloc.h: New file.
3367 * dwarf2loc.c: Include "common/byte-vector.h".
3368 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
3369 instead of reserving it.
3370 * dwarf2read.c: Include "common/byte-vector.h".
3371 (data_buf::m_vec): Now a gdb::byte_vector.
3372 * gdb_regex.c: Include "common/def-vector.h".
3373 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
3374 * mi/mi-main.c: Include "common/byte-vector.h".
3375 (mi_cmd_data_read_memory): Use gdb::byte_vector.
3376 * printcmd.c: Include "common/byte-vector.h".
3377 (print_scalar_formatted): Use gdb::byte_vector.
3378 * valprint.c: Include "common/byte-vector.h".
3379 (maybe_negate_by_bytes, print_decimal_chars): Use
3382 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
3384 * darwin-nat.c: Include "nat/fork-inferior.h".
3386 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
3388 * configure.nat: Factor out Darwin bits that are not
3389 architecture-specific. Add fork-inferior.o.
3391 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
3393 * configure.nat: Factor out AIX bits that are not
3394 architecture-specific. Add fork-inferior.o.
3396 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3398 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
3399 (read_pieced_value, write_pieced_value): ...here. Reduce to
3400 wrappers that just call rw_pieced_value.
3402 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3404 * dwarf2loc.c (write_pieced_value): When writing the data for a
3405 memory piece, use write_memory_with_notification instead of
3408 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3410 * valops.c (read_value_memory): Change embedded_offset to
3411 represent a bit offset instead of a byte offset.
3412 * value.h (read_value_memory): Adjust comment.
3414 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3416 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
3417 dest_offset_bits and source_offset_bits.
3418 (write_pieced_value): Likewise.
3420 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3422 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
3423 given by DW_OP_bit_piece.
3424 (write_pieced_value): Likewise.
3426 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3428 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
3429 some other preparations to the places where sufficient information
3431 (write_pieced_value): Likewise.
3433 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3435 * dwarf2loc.c (bits_to_bytes): New function.
3436 (read_pieced_value): Fix offset calculations for register pieces
3437 on big-endian targets.
3438 (write_pieced_value): Likewise.
3440 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3442 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
3443 (write_pieced_value): Likewise.
3445 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3447 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
3448 transfer the source value's least significant bits, instead of its
3449 lowest-addressed ones. Rename type_len to max_offset.
3450 (read_pieced_value): Mirror above changes to write_pieced_value as
3453 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3455 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
3456 truncate full bytes from dest_offset_bits before using it as an
3457 offset into the buffer.
3459 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3461 * dwarf2loc.c (write_pieced_value): Include transfer size in
3464 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3466 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
3467 calculation of this_size.
3469 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3471 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
3472 when targeting a bit-field.
3473 (write_pieced_value): Likewise.
3475 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3477 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
3478 (allocate_piece_closure): Drop addr_size parameter.
3479 (dwarf2_evaluate_loc_desc_full): Adjust call to
3480 allocate_piece_closure.
3482 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3485 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
3486 the LSB end, independent of endianness.
3488 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3490 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
3493 2017-06-13 Yao Qi <yao.qi@linaro.org>
3495 * mips-linux-nat.c: Move include features/mips*-linux.c to
3497 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
3498 to mips-linux-tdep.c.
3499 * mips-linux-tdep.c: Include features/mips*-linux.c
3500 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
3502 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
3503 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
3504 (tdesc_mips64_dsp_linux): Declare.
3506 2017-06-12 Tom Tromey <tom@tromey.com>
3508 * valprint.h (val_print_type_code_int): Remove.
3509 * valprint.c (generic_val_print_int): Always call
3510 val_print_scalar_formatted.
3511 (val_print_type_code_int): Remove.
3512 * printcmd.c (print_scalar_formatted): Handle options->format==0.
3513 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
3514 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
3515 * ada-valprint.c (ada_val_print_num): Use
3516 val_print_scalar_formatted.
3518 2017-06-12 Tom Tromey <tom@tromey.com>
3520 * printcmd.c (print_scalar_formatted): Unify the two switches.
3521 Don't convert scalars to LONGEST.
3523 2017-06-12 Tom Tromey <tom@tromey.com>
3526 * valprint.h (print_decimal_chars): Update.
3527 * valprint.c (maybe_negate_by_bytes): New function.
3528 (print_decimal_chars): Add "is_signed" argument.
3529 * printcmd.c (print_scalar_formatted): Update.
3531 2017-06-12 Tom Tromey <tom@tromey.com>
3534 * valprint.h (print_binary_chars, print_hex_chars): Update.
3535 * valprint.c (val_print_type_code_int): Update.
3536 (print_binary_chars): Add "zero_pad" argument.
3537 (emit_octal_digit): New function.
3538 (print_octal_chars): Don't zero-pad.
3539 (print_decimal_chars): Likewise.
3540 (print_hex_chars): Add "zero_pad" argument.
3541 * sh64-tdep.c (sh64_do_fp_register): Update.
3542 * regcache.c (regcache::dump): Update.
3543 * printcmd.c (print_scalar_formatted): Update.
3544 * infcmd.c (default_print_one_register_info): Update.
3546 2017-06-12 Pedro Alves <palves@redhat.com>
3547 Alan Hayward <alan.hayward@arm.com>
3549 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
3550 (mips_eabi_push_dummy_call): Rename local 'regsize' to
3551 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
3552 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
3553 Assert that abi_regsize bytes fit in 'ref_valbuf'.
3555 2017-06-12 Pedro Alves <palves@redhat.com>
3557 * dwarf2read.c (mapped_symtab::data): Now a vector of
3558 symtab_index_entry instead of vector of
3559 std::unique_ptr<symtab_index_entry>. All users adjusted to check
3560 whether an element's name is NULL instead of checking whether the
3561 element itself is NULL.
3562 (find_slot): Change return type. Adjust.
3563 (hash_expand, , add_index_entry, uniquify_cu_indices)
3564 (write_hash_table): Adjust.
3566 2017-06-12 Pedro Alves <palves@redhat.com>
3568 * dwarf2read.c (recursively_count_psymbols): New function.
3569 (write_psymtabs_to_index): Call it to compute number of psyms and
3570 pass estimate size of psyms_seen to unordered_set's ctor.
3572 2017-06-12 Pedro Alves <palves@redhat.com>
3574 * dwarf2read.c (write_hash_table): Check if key already exists
3577 2017-06-12 Pedro Alves <palves@redhat.com>
3579 * dwarf2read.c (data_buf::append_space): Rename to...
3580 (data_buf::grow): ... this, and make private. Adjust all callers.
3581 (data_buf::append_uint): New method.
3582 (add_address_entry, write_one_signatured_type)
3583 (write_psymtabs_to_index): Use it.
3585 2017-06-12 Pedro Alves <palves@redhat.com>
3587 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
3588 (file_write (FILE *, const std::vector<Elem>&)): Delete.
3589 (data_buf::file_write): Call ::fwrite directly.
3591 2017-06-12 Pedro Alves <palves@redhat.com>
3593 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
3596 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
3598 Code cleanup: C++ify .gdb_index producer.
3599 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
3600 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
3601 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
3602 (create_strtab, add_string): Remove.
3603 (file_write, data_buf): New.
3604 (struct symtab_index_entry): Use std::vector for cu_indices.
3605 (struct mapped_symtab): Use std::vector for data.
3606 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
3607 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
3609 (find_slot): Change return type. Update it to the new data structures.
3610 (hash_expand, add_index_entry): Update it to the new data structures.
3611 (offset_type_compare): Remove.
3612 (uniquify_cu_indices): Update it to the new data structures.
3613 (c_str_view, c_str_view_hasher, vector_hasher): New.
3614 (add_indices_to_cpool): Remove.
3615 (write_hash_table): Update it to the new data structures.
3616 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
3617 (eq_psymtab_cu_index): Remove.
3618 (psym_index_map): New typedef.
3619 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
3620 reference and std::unordered_map for cu_index_htab.
3621 (add_address_entry, add_address_entry_worker, write_address_map)
3622 (write_psymbols): Update it to the new data structures.
3623 (write_obstack): Remove.
3624 (struct signatured_type_index_data): Change types_list to a data_buf
3625 reference and psyms_seen to a std::unordered_set reference.
3626 (write_one_signatured_type, recursively_write_psymbols)
3627 (write_psymtabs_to_index): Update it to the new data structures.
3629 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
3631 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
3632 separate-debug-file commands.
3633 * symfile.h (separate_debug_file_debug): New global.
3634 * symfile.c (separate_debug_file_debug): New global.
3635 (separate_debug_file_exists, find_separate_debug_file): Add
3637 (_initialize_symfile): Add "set debug separate-debug-file"
3639 * build-id.c (build_id_to_debug_bfd,
3640 find_separate_debug_file_by_buildid): Add debug output.
3642 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3644 * gdbarch.sh (displaced_step_free_closure): Remove.
3645 * gdbarch.h, gdbarch.c: Re-generate.
3646 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
3647 displaced_step_free_closure.
3648 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
3649 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
3650 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3651 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
3652 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3653 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
3654 * arch-utils.h (simple_displaced_step_free_closure): Remove.
3655 * arch-utils.c (simple_displaced_step_free_closure): Remove.
3656 * infrun.c (displaced_step_clear): Call xfree instead of
3657 gdbarch_displaced_step_free_closure.
3659 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
3661 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
3664 2017-06-08 Alan Hayward <alan.hayward@arm.com>
3666 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
3667 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
3668 (mn10300_push_dummy_call): Likewise.
3670 2017-06-08 Alan Hayward <alan.hayward@arm.com>
3672 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
3674 2017-06-08 Alan Hayward <alan.hayward@arm.com>
3676 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
3678 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3680 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
3681 able to start inferiors using a shell.
3682 (New remote packets): Announce new packet "QStartupWithShell".
3683 * remote.c: Add PACKET_QStartupWithShell.
3684 (extended_remote_create_inferior): Handle new
3685 PACKET_QStartupWithShell.
3686 (remote_protocol_features) <QStartupWithShell>: New entry for
3687 PACKET_QStartupWithShell.
3688 (_initialize_remote): Call "add_packet_config_cmd" for
3691 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3692 Pedro Alves <palves@redhat.com>
3694 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
3695 and "nat/fork-inferior.h".
3696 * common/common-inferior.h: New file, with contents from
3698 * commom/common-utils.c: Include "common-utils.h".
3699 (stringify_argv): New function.
3700 * common/common-utils.h (stringify_argv): New prototype.
3701 * configure.nat: Add "fork-inferior.o" as a dependency for
3702 "*linux*", "fbsd*" and "nbsd*" hosts.
3703 * corefile.c (get_exec_file): Update comment.
3704 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
3705 instead of "startup_inferior".
3706 (darwin_create_inferior): Call "add_thread_silent" after
3708 * fork-child.c: Cleanup unnecessary includes.
3709 (SHELL_FILE): Move to "common/common-fork-child.c".
3710 (environ): Likewise.
3711 (exec_wrapper): Initialize.
3712 (get_exec_wrapper): New function.
3713 (breakup_args): Move to "common/common-fork-child.c"; rename to
3714 "breakup_args_for_exec".
3715 (escape_bang_in_quoted_argument): Move to
3716 "common/common-fork-child.c".
3717 (saved_ui): New variable.
3718 (prefork_hook): New function.
3719 (postfork_hook): Likewise.
3720 (postfork_child_hook): Likewise.
3721 (gdb_startup_inferior): Likewise.
3722 (fork_inferior): Move to "common/common-fork-child.c". Update
3723 function to support gdbserver.
3724 (startup_inferior): Likewise.
3725 * gdbcore.h (get_exec_file): Remove declaration.
3726 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
3727 instead of "startup_inferior". Call "add_thread_silent" after
3729 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
3730 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
3731 instead of "startup_inferior". Call "add_thread_silent" after
3733 * inferior.h: Include "common-inferior.h".
3734 (trace_start_error): Move to "common/common-utils.h".
3735 (trace_start_error_with_name): Likewise.
3736 (fork_inferior): Move prototype to "nat/fork-inferior.h".
3737 (startup_inferior): Likewise.
3738 (gdb_startup_inferior): New prototype.
3739 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
3740 * nat/fork-inferior.h: New file.
3741 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
3742 instead of "startup_inferior". Call "add_thread_silent" after
3744 * target.h (target_terminal_init): Move prototype to
3746 (target_terminal_inferior): Likewise.
3747 (target_terminal_ours): Likewise.
3748 * target/target.h (target_terminal_init): New prototype, moved
3750 (target_terminal_inferior): Likewise.
3751 (target_terminal_ours): Likewise.
3752 * utils.c (gdb_flush_out_err): New function.
3754 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3756 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
3757 * common/common-gdbthread.h: New file, with parts from
3759 * gdbthread.h: Include "common-gdbthread.h".
3760 (switch_to_thread): Moved to "common/common-gdbthread.h".
3762 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3764 * Makefile.in (SFILES): Add "common/job-control.c".
3765 (HFILES_NO_SRCDIR): Add "common/job-control.h".
3766 (COMMON_OBS): Add "job-control.o".
3767 * common/job-control.c: New file, with contents from
3769 * common/job-control.h: New file, with contents from "terminal.h".
3770 * fork-child.c: Include "job-control.h".
3771 * inflow.c: Include "job-control.h".
3772 (gdb_setpgid): Move to "common/common-inflow.c".
3773 (_initialize_inflow): Move setting of "job_control" to
3774 "handle_job_control".
3775 * terminal.h (job_control): Moved to "common/common-terminal.h".
3776 (gdb_setpgid): Likewise.
3777 * top.c: Include "job_control.h".
3778 * utils.c: Likewise.
3779 (job_control): Moved to "job-control.c".
3781 2017-06-07 Pedro Alves <palves@redhat.com>
3783 * Makefile.in (SFILES): Add gdb_regex.c.
3784 (COMMON_OBS): Add gdb_regex.o.
3785 * ada-lang.c (ada_add_standard_exceptions)
3786 (ada_add_exceptions_from_frame, name_matches_regex)
3787 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
3788 parameter type to compiled_regex. Adjust.
3789 (ada_exceptions_list): Use compiled_regex.
3790 * break-catch-throw.c (exception_catchpoint::pattern): Now a
3791 std::unique_ptr<compiled_regex>.
3792 (exception_catchpoint::~exception_catchpoint): Remove regfree
3794 (check_status_exception_catchpoint): Adjust to use compiled_regex.
3795 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
3796 * breakpoint.c (solib_catchpoint::compiled): Now a
3797 std::unique_ptr<compiled_regex>.
3798 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
3799 (check_status_catch_solib): Adjust to use compiled_regex.
3800 (add_solib_catchpoint): Adjust to use compiled_regex.
3801 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
3802 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
3803 compiled_regex reference. Adjust to use it.
3804 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
3805 declaration. Include "gdb_regex.h".
3806 (apropos_cmd): Change regex parameter to compiled_regex reference.
3807 * gdb_regex.c: New file.
3808 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
3810 (class compiled_regex): New.
3811 * linux-tdep.c: Include "common/gdb_optional.h".
3812 (struct mapping_regexes): New, factored out from
3813 mapping_is_anonymous_p, and adjusted to use compiled_regex.
3814 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
3815 gdb::optional and remove cleanups. Adjust to compiled_regex.
3816 * probe.c: Include "common/gdb_optional.h".
3817 (collect_probes): Use compiled_regex and gdb::optional and remove
3819 * skip.c: Include "common/gdb_optional.h".
3820 (skiplist_entry::compiled_function_regexp): Now a
3821 gdb::optional<compiled_regex>.
3822 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
3823 (free_skiplist_entry): Remove regfree call.
3824 (compile_skip_regexp, skip_rfunction_p): Adjust to use
3825 compiled_regex and gdb::optional.
3826 * symtab.c: Include "common/gdb_optional.h".
3827 (search_symbols): Use compiled_regex and gdb::optional.
3828 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
3829 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
3832 2017-06-07 Alan Hayward <alan.hayward@arm.com>
3834 * regcache.c (regcache::save): Avoid buffer use.
3835 (regcache::dump): Likewise.
3837 2017-06-07 Alan Hayward <alan.hayward@arm.com>
3839 * sh-tdep.c (sh_pseudo_register_read): Remove
3841 (sh_pseudo_register_write): Likewise.
3842 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
3843 (sh64_pseudo_register_write): Likewise
3845 2017-06-07 Alan Hayward <alan.hayward@arm.com>
3847 * aarch64-tdep.c (aarch64_store_return_value): Use
3849 (aarch64_pseudo_read_value): Likewise.
3850 (aarch64_pseudo_write): Likewise.
3852 2017-06-06 Yao Qi <yao.qi@linaro.org>
3854 * regformats/regdef.h (set_register_cache): Remove the
3857 2017-06-06 Alan Hayward <alan.hayward@arm.com>
3859 * frame.c (frame_unwind_register_signed): Use
3860 frame_unwind_register_value.
3862 2017-06-06 Pedro Alves <palves@redhat.com>
3864 PR breakpoints/21553
3865 * breakpoint.c (create_breakpoints_sal_default)
3866 (init_breakpoint_sal, create_breakpoint_sal): Use
3867 gdb::unique_xmalloc_ptr for string parameters.
3868 (create_breakpoint): Constify 'extra_string' and 'cond_string'
3869 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
3870 (base_breakpoint_create_breakpoints_sal)
3871 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
3872 (strace_marker_create_breakpoints_sal)
3873 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
3875 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
3876 gdb::unique_xmalloc_ptr for string parameters.
3877 (create_breakpoint): Constify 'extra_string' and 'cond_string'
3880 2017-06-06 Alan Hayward <alan.hayward@arm.com>
3882 * alpha-tdep.c (alpha_register_to_value): Use
3883 get_frame_register_value.
3884 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
3886 2017-06-06 Alan Hayward <alan.hayward@arm.com>
3888 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
3889 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
3890 (ia64_value_to_register): Likewise.
3891 (ia64_extract_return_value): Likewise.
3892 (ia64_store_return_value): Likewise.
3893 (ia64_push_dummy_call): Likewise.
3895 2017-06-04 Joel Brobecker <brobecker@adacore.com>
3899 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
3901 * x86-linux-nat.c (struct arch_lwp_info): Remove.
3903 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
3905 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
3907 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
3909 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
3911 * event-loop.c (poll_timers): Unallocate timer using delete
3914 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3916 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
3917 (struct breakpoint) <~breakpoint>: New.
3918 (struct watchpoint): Inherit from breakpoint.
3921 (struct tracepoint): Inherit from breakpoint.
3923 * breakpoint.c (longjmp_breakpoint_ops): Remove.
3924 (struct longjmp_breakpoint): Inherit from breakpoint.
3925 <~longjmp_breakpoint>: New.
3927 (new_breakpoint_from_type): Remove casts.
3928 (watchpoint_in_thread_scope): Remove reference to base field.
3929 (watchpoint_del_at_next_stop): Likewise.
3930 (update_watchpoint): Likewise.
3931 (watchpoint_check): Likewise.
3932 (bpstat_check_watchpoint): Likewise.
3933 (set_longjmp_breakpoint): Likewise.
3934 (struct fork_catchpoint): Inherit from breakpoint.
3936 (struct solib_catchpoint): Inherit from breakpoint.
3937 <~solib_catchpoint>: New.
3939 (dtor_catch_solib): Change to ...
3940 (solib_catchpoint::~solib_catchpoint): ... this.
3941 (breakpoint_hit_catch_solib): Remove reference to base field.
3942 (add_solib_catchpoint): Likewise.
3943 (create_fork_vfork_event_catchpoint): Likewise.
3944 (struct exec_catchpoint): Inherit from breakpoint.
3945 <~exec_catchpoint>: New.
3947 (dtor_catch_exec): Change to ...
3948 (exec_catchpoint::~exec_catchpoint): ... this.
3949 (dtor_watchpoint): Change to ...
3950 (watchpoint::~watchpoint): ... this.
3951 (watch_command_1): Remove reference to base field.
3952 (catch_exec_command_1): Likewise.
3953 (base_breakpoint_dtor): Change to ...
3954 (breakpoint::~breakpoint): ... this.
3955 (base_breakpoint_ops): Remove dtor field value.
3956 (longjmp_bkpt_dtor): Change to ...
3957 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
3958 (strace_marker_create_breakpoints_sal): Remove reference to base
3960 (delete_breakpoint): Don't manually call breakpoint destructor.
3961 (create_tracepoint_from_upload): Remove reference to base field.
3962 (trace_pass_set_count): Likewise.
3963 (initialize_breakpoint_ops): Don't initialize
3964 momentary_breakpoint_ops, don't set dtors.
3965 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
3966 <~ada_catchpoint>: New.
3968 (create_excep_cond_exprs): Remove reference to base field.
3969 (dtor_exception): Change to ...
3970 (ada_catchpoint::~ada_catchpoint): ... this.
3971 (dtor_catch_exception): Remove.
3972 (dtor_catch_exception_unhandled): Remove.
3973 (dtor_catch_assert): Remove.
3974 (create_ada_exception_catchpoint): Remove reference to base
3976 (initialize_ada_catchpoint_ops): Don't set dtors.
3977 * break-catch-sig.c (struct signal_catchpoint): Inherit from
3979 <~signal_catchpoint>: New.
3981 (signal_catchpoint_dtor): Change to ...
3982 (signal_catchpoint::~signal_catchpoint): ... this.
3983 (create_signal_catchpoint): Remove reference to base field.
3984 (initialize_signal_catchpoint_ops): Don't set dtor.
3985 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
3987 <~syscall_catchpoint>: New.
3989 (dtor_catch_syscall): Change to ...
3990 (syscall_catchpoint::~syscall_catchpoint): ... this.
3991 (create_syscall_event_catchpoint): Remove reference to base
3993 (initialize_syscall_catchpoint_ops): Don't set dtor.
3994 * break-catch-throw.c (struct exception_catchpoint): Inherit
3996 <~exception_catchpoint>: New.
3998 (dtor_exception_catchpoint): Change to ...
3999 (exception_catchpoint::~exception_catchpoint): ... this.
4000 (handle_gnu_v3_exceptions): Remove reference to base field.
4001 (initialize_throw_catchpoint_ops): Don't set dtor.
4002 * ctf.c (ctf_get_traceframe_address): Remove reference to base
4004 * remote.c (remote_get_tracepoint_status): Likewise.
4005 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
4006 * tracefile.c (tracefile_fetch_registers): Likewise.
4007 * tracepoint.c (actions_command): Likewise.
4008 (validate_actionline): Likewise.
4009 (tfind_1): Likewise.
4010 (get_traceframe_location): Likewise.
4011 (find_matching_tracepoint_location): Likewise.
4012 (parse_tracepoint_status): Likewise.
4013 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
4015 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
4017 * breakpoint.c (struct longjmp_breakpoint): New struct.
4018 (is_tracepoint_type): Change return type to bool.
4019 (is_longjmp_type): New function.
4020 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
4021 (set_raw_breakpoint_without_location): Use
4022 new_breakpoint_from_type.
4023 (set_raw_breakpoint): Likewise.
4025 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
4027 * breakpoint.c (new_breakpoint_from_type): New function.
4028 (create_breakpoint_sal): Use new_breakpoint_from_type and
4030 (create_breakpoint): Likewise.
4032 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
4034 * memattr.c (mem_info_command): Rename to ...
4035 (info_mem_command): ... this.
4036 (mem_enable_command): Rename to ...
4037 (enable_mem_command): ... this.
4038 (mem_disable_command): Rename to ...
4039 (disable_mem_command): ... this.
4040 (mem_delete_command): Rename to ...
4041 (delete_mem_command): ... this.
4042 (_initialize_mem): Adjust function names.
4044 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
4046 * btrace.c (handle_pt_insn_events): New.
4047 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
4048 STATUS. Split into this and ...
4049 (handle_pt_insn_event_flags): ... this.
4051 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
4053 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
4054 and struct pt_insn.resynced.
4055 * configure: Regenerated.
4056 * config.in: Regenerated.
4058 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4060 * btrace.c (ftrace_find_call_by_number): New function.
4061 (ftrace_new_function): Store objects, not pointers.
4062 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
4063 ftrace_new_gap, ftrace_update_function,
4064 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
4065 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
4066 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
4067 btrace_ends_with_single_insn, btrace_call_get): Account for
4068 btrace_thread_info::functions now storing objects.
4069 * btrace.h (struct btrace_thread_info): Add constructor.
4070 (struct btrace_thread_info) <functions>: Make std::vector.
4071 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
4072 Initialize with default values.
4073 * record-btrace.c (record_btrace_frame_sniffer): Account for
4074 btrace_thread_info::functions now storing objects.
4076 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4078 * btrace.c: Remove typedef bfun_s.
4079 (ftrace_new_gap): Directly add gaps to the list of gaps.
4080 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
4081 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
4082 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
4085 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4087 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
4088 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
4089 with btrace_thread_info::next_segment and
4090 btrace_thread_info::prev_segment.
4091 * btrace.h: Remove struct btrace_func_link.
4092 (struct btrace_function): Replace pair of function segment pointers
4093 with pair of indices.
4094 * python/py-record-btrace.c (btpy_call_prev_sibling,
4095 btpy_call_next_sibling): Replace references to
4096 btrace_thread_info::segment with btrace_thread_info::next_segment and
4097 btrace_thread_info::prev_segment.
4098 * record-btrace.c (record_btrace_frame_this_id): Use
4099 btrace_find_call_by_number.
4101 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4103 * btrace.c (ftrace_new_function, ftrace_fixup_level,
4104 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
4105 btrace_insn_next, btrace_insn_prev): Remove references to
4106 btrace_thread_info::flow.
4107 * btrace.h (struct btrace_function): Remove FLOW.
4109 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4111 * btrace.c (ftrace_find_call_by_number): New function.
4112 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
4113 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
4114 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
4115 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
4117 * btrace.h (struct btrace_function): Turn UP into an index.
4118 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
4120 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
4121 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
4122 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
4124 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4126 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
4127 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
4128 ftrace_update_function, ftrace_compute_global_level_offset,
4129 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
4130 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
4131 btrace_insn_end, btrace_is_empty): Remove references to
4132 btrace_thread_info::begin and btrace_thread_info::end.
4133 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
4134 (struct btrace_thread_info) <functions>: Adjust comment.
4135 * record-btrace.c (record_btrace_start_replaying): Remove reference to
4136 btrace_thread_info::begin.
4138 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4140 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
4141 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
4142 ftrace_update_function): Remove arguments that implicitly were always
4144 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
4145 Don't pass BTINFO->END.
4147 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4149 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
4150 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
4151 btrace_find_insn_by_number): Replace function segment pointer with
4153 (btrace_insn_cmp): Simplify.
4154 * btrace.h: (struct btrace_insn_iterator) Rename index to
4155 insn_index. Replace function segment pointer with index into function
4157 * record-btrace.c (record_btrace_call_history): Replace function
4158 segment pointer use with index.
4159 (record_btrace_frame_sniffer): Retrieve function call segment through
4161 (record_btrace_set_replay): Remove defunc't safety check.
4163 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4165 * btrace.c (btrace_ends_with_single_insn): New function.
4166 (btrace_call_get, btrace_call_number, btrace_call_begin,
4167 btrace_call_end, btrace_call_next, btrace_call_prev,
4168 btrace_find_call_by_number): Use index into call segment vector
4170 (btrace_call_cmp): Simplify.
4171 * btrace.h (struct btrace_call_iterator): Replace function call segment
4172 pointer with index into vector.
4173 * record-btrace.c (record_btrace_call_history): Use index instead of
4176 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4178 * btrace.c (btrace_insn_begin, btrace_insn_end,
4179 btrace_find_insn_by_number): Add btinfo to iterator.
4180 * btrace.h (struct btrace_insn_iterator): Add btinfo.
4182 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4184 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
4185 and save pointers directly.
4186 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
4187 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
4188 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
4189 changed signature of functions.
4190 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
4191 (btrace_fetch): Remove code that adds btrace_function pointers to
4192 vector of btrace_functions.
4193 (btrace_clear): Simplify freeing vector of btrace_functions.
4195 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4197 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
4198 Replace VEC_* with std::vector functions.
4199 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
4200 (struct btrace_thread_info)<functions>: Change type to std::vector.
4202 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
4204 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
4205 "Removed targets and native configurations" up. Merge duplicate
4206 "New commands" sub-sections. Add "New options" sub-sections.
4208 2017-05-26 Alan Hayward <alan.hayward@arm.com>
4210 * defs.h (copy_integer_to_size): New declaration.
4211 * findvar.c (copy_integer_to_size): New function.
4212 (do_cint_test): New selftest function.
4213 (copy_integer_to_size_test): Likewise.
4214 (_initialize_findvar): Likewise.
4215 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
4216 (mips_fbsd_collect_reg): Use raw_collect_integer.
4217 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
4218 (mips64_fill_gregset): Use raw_collect_integer
4219 (mips64_fill_fpregset): Use raw_supply_integer.
4220 * regcache.c (regcache::raw_supply_integer): New function.
4221 (regcache::raw_collect_integer): Likewise.
4222 * regcache.h: (regcache::raw_supply_integer): New declaration.
4223 (regcache::raw_collect_integer): Likewise.
4225 2017-05-24 Yao Qi <yao.qi@linaro.org>
4227 * Makefile.in (SFILES): Add gdbarch-selftests.c.
4228 (COMMON_OBS): Add gdbarch-selftests.o.
4229 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
4230 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
4231 * gdbarch-selftests.c: New file.
4232 * regcache.h (regcache) <~regcache>: Mark it virtual if
4234 <raw_write>: Likewise.
4236 2017-05-24 Yao Qi <yao.qi@linaro.org>
4238 * regcache.c (current_regcache): Change it to
4239 regcache::current_regcache.
4240 (regcache_observer_target_changed): Update.
4241 (regcache_thread_ptid_changed): Make it a regcache static
4243 (regcache_thread_ptid_changed): Update.
4244 (class regcache_access): New.
4245 (current_regcache_test): Update.
4246 (_initialize_regcache): Update.
4247 * regcache.h: Include forward_list.
4248 (regcache): Declare regcache_thread_ptid_changed and declare
4249 registers_changed_ptid as friend.
4251 2017-05-24 Yao Qi <yao.qi@linaro.org>
4253 * i387-tdep.c (i387_register_to_value): Use register_size
4254 instead of TYPE_LENGTH.
4255 * m68k-tdep.c (m68k_register_to_value): Likewise.
4257 2017-05-24 Yao Qi <yao.qi@linaro.org>
4259 * i387-tdep.c (i387_convert_register_p): Return false if type
4260 code isn't TYPE_CODE_FLT.
4262 2017-05-24 Yao Qi <yao.qi@linaro.org>
4264 * alpha-tdep.c (alpha_convert_register_p): Return true if type
4266 (alpha_register_to_value): Remove type length check.
4267 (alpha_value_to_register): Likewise.
4269 2017-05-24 Yao Qi <yao.qi@linaro.org>
4271 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
4274 2017-05-24 Yao Qi <yao.qi@linaro.org>
4276 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
4277 TYPE_CODE_FLT or not.
4279 2017-05-24 Yao Qi <yao.qi@linaro.org>
4281 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
4282 * avr-tdep.c (avr_gdbarch_init): Likewise.
4283 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
4284 * cris-tdep.c (cris_gdbarch_init): Likewise.
4285 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4286 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
4287 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4288 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
4289 * mep-tdep.c (mep_gdbarch_init): Likewise.
4290 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
4291 * mips-tdep.c (mips_gdbarch_init): Likewise.
4292 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
4293 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4294 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
4295 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
4296 * v850-tdep.c (v850_gdbarch_init): Likewise.
4298 2017-05-24 Yao Qi <yao.qi@linaro.org>
4300 * selftest-arch.c (tests_with_arch): Call registers_changed
4301 and reinit_frame_cache.
4302 * selftest.c (run_self_tests): Likewise.
4304 2017-05-24 Yao Qi <yao.qi@linaro.org>
4306 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
4307 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
4309 2017-05-24 Yao Qi <yao.qi@linaro.org>
4311 * rl78-tdep.c (rl78_gdbarch_init): Don't call
4312 set_gdbarch_print_insn.
4314 2017-05-24 Yao Qi <yao.qi@linaro.org>
4316 * h8300-tdep.c (h8300_gdbarch_init): Don't call
4317 set_gdbarch_print_insn.
4319 2017-05-24 Yao Qi <yao.qi@linaro.org>
4321 * alpha-tdep.c (alpha_gdbarch_init): Don't call
4322 set_gdbarch_print_insn.
4323 * arc-tdep.c (arc_gdbarch_init): Likewise.
4324 * arch-utils.c: include dis-asm.h.
4325 (default_print_insn): New function.
4326 * arch-utils.h (default_print_insn): Declare.
4327 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
4328 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
4329 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
4330 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
4331 * frv-tdep.c (frv_gdbarch_init): Likewise.
4332 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4333 * gdbarch.sh (print_insn): Use default_print_insn.
4334 * gdbarch.c: Regenerated.
4335 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
4336 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
4337 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
4338 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
4339 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4340 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
4341 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
4342 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
4343 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
4344 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
4345 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
4346 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4347 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
4348 * mt-tdep.c (mt_gdbarch_init): Likewise.
4349 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4350 * nios2-tdep.c (nios2_print_insn): Remove.
4351 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
4352 * rx-tdep.c (rx_gdbarch_init): Likewise.
4353 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
4354 * score-tdep.c (score_print_insn): Remove.
4355 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
4356 * sh-tdep.c (sh_gdbarch_init): Likewise.
4357 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
4358 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4359 * tic6x-tdep.c (tic6x_print_insn): Remove.
4360 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
4361 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
4362 * v850-tdep.c (v850_gdbarch_init): Likewise.
4363 * vax-tdep.c (vax_gdbarch_init): Likewise.
4364 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
4365 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
4367 2017-05-23 John Baldwin <jhb@FreeBSD.org>
4369 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
4370 (MIPS_FP0_REGNUM): Remove.
4371 (MIPS_FSR_REGNUM): Remove.
4372 (mips_fbsd_supply_fpregs): Use mips_regnum.
4373 (mips_fbsd_supply_gregs): Likewise.
4374 (mips_fbsd_collect_fpregs): Likewise.
4375 (mips_fbsd_collect_gregs): Likewise.
4377 2017-05-23 John Baldwin <jhb@FreeBSD.org>
4379 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
4380 (getpfpregs_supplies): New function.
4381 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
4383 (mips_fbsd_store_inferior_registers): Likewise.
4385 2017-05-22 Pedro Alves <palves@redhat.com>
4387 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
4390 2017-05-22 Alan Hayward <alan.hayward@arm.com>
4392 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
4393 (store_register): Likewise.
4394 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
4395 (get_decimal_float_return_value): Likewise.
4396 (do_ppc_sysv_return_value): Likewise.
4397 (ppc64_sysv_abi_push_integer): Likewise.
4398 (ppc64_sysv_abi_push_freg): Likewise.
4399 (ppc64_sysv_abi_return_value_base): Likewise.
4400 (ppc64_sysv_abi_return_value): Likewise.
4401 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
4402 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
4403 * rs6000-nat.c: Likewise.
4404 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
4405 (rs6000_value_to_register): Likewise.
4406 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
4408 2017-05-21 Tom Tromey <tom@tromey.com>
4411 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
4412 arrays as "[T]", not "[T; ]".
4414 2017-05-19 Tom Tromey <tom@tromey.com>
4417 * rust-lang.c (exp_descriptor_rust): New function.
4418 (rust_language_defn): Use it.
4419 * p-lang.c (pascal_language_defn): Update.
4420 * opencl-lang.c (opencl_language_defn): Update.
4421 * objc-lang.c (objc_language_defn): Update.
4422 * m2-lang.c (m2_language_defn): Update.
4423 * language.h (struct language_defn)
4424 <la_watch_location_expression>: New member.
4425 * language.c (unknown_language_defn, auto_language_defn)
4426 (local_language_defn): Update.
4427 * go-lang.c (go_language_defn): Update.
4428 * f-lang.c (f_language_defn): Update.
4429 * d-lang.c (d_language_defn): Update.
4430 * c-lang.h (c_watch_location_expression): Declare.
4431 * c-lang.c (c_watch_location_expression): New function.
4432 (c_language_defn, cplus_language_defn, asm_language_defn)
4433 (minimal_language_defn): Use it.
4434 * breakpoint.c (watch_command_1): Call
4435 la_watch_location_expression.
4436 * ada-lang.c (ada_language_defn): Update.
4438 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4441 * gdb_curses.h (NOMACROS): Define.
4442 (NCURSES_NOMACROS): Define.
4444 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4447 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
4449 * tui/tui-wingeneral.c (box_win): Likewise.
4450 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
4451 (tui_show_source_line): Likewise.
4452 (tui_show_exec_info_content): Likewise.
4454 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
4456 * sparc-tdep.c (sparc_structure_return_p)
4457 (sparc_arg_on_registers_p): New functions.
4458 (sparc32_store_arguments): Use them.
4459 * sparc64-tdep.c (sparc64_16_byte_align_p)
4460 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
4461 Handle TYPE_CODE_ARRAY.
4463 2017-05-17 Yao Qi <yao.qi@linaro.org>
4465 * cli/cli-decode.c (add_alias_cmd): New function.
4466 * command.h (add_alias_cmd): Declare.
4467 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
4468 instead call add_alias_cmd.
4470 2017-05-17 Pedro Alves <palves@redhat.com>
4472 * Makefile.in (nat_extra_makefile_frag): Rename to ...
4473 (nat_makefile_frag): ... this. All references updated.
4474 * configure.ac: Likewise.
4475 * configure.nat: Likewise. Enhance comments.
4476 * configure: Regenerate.
4478 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4480 * procfs.c (procfs_create_inferior): Change prototype to match
4483 2017-05-13 Eli Zaretskii <eliz@gnu.org>
4485 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
4486 C++ compiler warning.
4488 2017-05-12 Tom Tromey <tom@tromey.com>
4491 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
4492 recurse, just call value_struct_elt directly.
4494 2017-05-12 Tom Tromey <tom@tromey.com>
4496 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
4497 OP_RUST_ARRAY>: Fix.
4499 2017-05-12 Tom Tromey <tom@tromey.com>
4501 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
4503 2017-05-09 Yao Qi <yao.qi@linaro.org>
4505 * regcache.c: Include <forward_list>.
4506 (struct regcache_list): Remove.
4507 (current_regcache): Update.
4508 (get_thread_arch_aspace_regcache): Update for std::forward_list.
4509 (regcache_thread_ptid_changed): Likewise.
4510 (registers_changed_ptid): Likewise.
4511 (current_regcache_size): Likewise.
4513 2017-05-09 Yao Qi <yao.qi@linaro.org>
4515 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
4516 (current_regcache_size): New function.
4517 (current_regcache_test): New function.
4518 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
4520 2017-05-08 Alan Hayward <alan.hayward@arm.com>
4522 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
4523 (print_gp_register_row): Use get_frame_register_value.
4525 2017-05-08 Alan Hayward <alan.hayward@arm.com>
4527 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
4528 (mips_supply_fpregset): Likewise.
4529 (mips64_supply_gregset): Likewise.
4531 2017-05-08 Alan Hayward <alan.hayward@arm.com>
4533 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
4534 regcache->raw_supply_zeroed.
4536 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4538 * configure.nat: Rearrange 'case' statements to match
4541 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4543 * Makefile.in: Remove "@host_makefile_frag@". Add variables
4544 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
4545 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
4546 "@nat_extra_makefile_frag@".
4547 (Makefile): Remove dependency on "@frags@".
4548 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
4549 (data-directory/Makefile): Likewise.
4550 * config/aarch64/linux.mh: Deleted; moved contents to
4551 "gdb/configure.nat".
4552 * config/alpha/alpha-linux.mh: Likewise.
4553 * config/alpha/nbsd.mh: Likewise.
4554 * config/arm/linux.mh: Likewise.
4555 * config/arm/nbsdelf.mh: Likewise.
4556 * config/i386/cygwin.mh: Likewise.
4557 * config/i386/cygwin64.mh: Likewise.
4558 * config/i386/darwin.mh: Likewise.
4559 * config/i386/fbsd.mh: Likewise.
4560 * config/i386/fbsd64.mh: Likewise.
4561 * config/i386/go32.mh: Likewise.
4562 * config/i386/i386gnu.mh: Likewise.
4563 * config/i386/i386sol2.mh: Likewise.
4564 * config/i386/linux.mh: Likewise.
4565 * config/i386/linux64.mh: Likewise.
4566 * config/i386/mingw.mh: Likewise.
4567 * config/i386/mingw64.mh: Likewise.
4568 * config/i386/nbsd64.mh: Likewise.
4569 * config/i386/nbsdelf.mh: Likewise.
4570 * config/i386/nto.mh: Likewise.
4571 * config/i386/obsd.mh: Likewise.
4572 * config/i386/obsd64.mh: Likewise.
4573 * config/i386/sol2-64.mh: Likewise.
4574 * config/ia64/linux.mh: Likewise.
4575 * config/m32r/linux.mh: Likewise.
4576 * config/m68k/linux.mh: Likewise.
4577 * config/m68k/nbsdelf.mh: Likewise.
4578 * config/m68k/obsd.mh: Likewise.
4579 * config/m88k/obsd.mh: Likewise.
4580 * config/mips/fbsd.mh: Likewise.
4581 * config/mips/linux.mh: Likewise.
4582 * config/mips/nbsd.mh: Likewise.
4583 * config/mips/obsd64.mh: Likewise.
4584 * config/pa/linux.mh: Likewise.
4585 * config/pa/nbsd.mh: Likewise.
4586 * config/pa/obsd.mh: Likewise.
4587 * config/powerpc/aix.mh: Likewise.
4588 * config/powerpc/fbsd.mh: Likewise.
4589 * config/powerpc/linux.mh: Likewise.
4590 * config/powerpc/nbsd.mh: Likewise.
4591 * config/powerpc/obsd.mh: Likewise.
4592 * config/powerpc/ppc64-linux.mh: Likewise.
4593 * config/powerpc/spu-linux.mh: Likewise.
4594 * config/s390/linux.mh: Likewise.
4595 * config/sh/nbsd.mh: Likewise.
4596 * config/sparc/fbsd.mh: Likewise.
4597 * config/sparc/linux.mh: Likewise.
4598 * config/sparc/linux64.mh: Likewise.
4599 * config/sparc/nbsd64.mh: Likewise.
4600 * config/sparc/nbsdelf.mh: Likewise.
4601 * config/sparc/obsd64.mh: Likewise.
4602 * config/sparc/sol2.mh: Likewise.
4603 * config/tilegx/linux.mh: Likewise.
4604 * config/vax/nbsdelf.mh: Likewise.
4605 * config/vax/obsd.mh: Likewise.
4606 * config/xtensa/linux.mh: Likewise.
4607 * config/i386/i386gnu.mn: New file, with excerpts from
4608 "config/i386/i386gnu.mh".
4609 * configure: Regenerate.
4610 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
4611 *.mh files under "gdb/config".
4612 * configure.nat: New file, with contents from the
4613 "gdb/config/*/*.mh" files.
4615 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
4617 * btrace.c (btrace_clear): Free insn vector.
4619 2017-05-05 Pedro Alves <palves@redhat.com>
4621 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
4622 * configure: Regenerate.
4624 2017-05-04 Pedro Alves <palves@redhat.com>
4626 * Makefile.in (SFILES): Add progspace-and-thread.c.
4627 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
4628 (COMMON_OBS): Add progspace-and-thread.o.
4629 * breakpoint.c: Include "progspace-and-thread.h".
4630 (update_inserted_breakpoint_locations)
4631 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
4632 Use scoped_restore_current_pspace_and_thread.
4633 (create_std_terminate_master_breakpoint): Use
4634 scoped_restore_current_program_space.
4635 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
4636 (print_breakpoint_location): Use
4637 scoped_restore_current_program_space.
4638 (bp_loc_is_permanent): Use
4639 scoped_restore_current_pspace_and_thread.
4640 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
4641 (download_tracepoint_locations): Use
4642 scoped_restore_current_pspace_and_thread.
4643 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
4644 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
4645 (enum step_over_calls_kind): Moved from inferior.h.
4646 (class scoped_restore_current_thread): New class.
4647 * gdbthread.h (make_cleanup_restore_current_thread): Delete
4649 (scoped_restore_current_thread): New class.
4650 * infcmd.c: Include "common/gdb_optional.h".
4651 (continue_1, proceed_after_attach): Use
4652 scoped_restore_current_thread.
4653 (notice_new_inferior): Use scoped_restore_current_thread.
4654 * inferior.c: Include "progspace-and-thread.h".
4655 (restore_inferior, save_current_inferior): Delete.
4656 (add_inferior_command, clone_inferior_command): Use
4657 scoped_restore_current_pspace_and_thread.
4658 * inferior.h (scoped_restore_current_inferior): New class.
4659 * infrun.c: Include "progspace-and-thread.h" and
4660 "common/gdb_optional.h".
4661 (follow_fork_inferior): Use
4662 scoped_restore_current_pspace_and_thread.
4663 (scoped_restore_exited_inferior): New class.
4664 (handle_vfork_child_exec_or_exit): Use
4665 scoped_restore_exited_inferior,
4666 scoped_restore_current_pspace_and_thread,
4667 scoped_restore_current_thread and scoped_restore.
4668 (fetch_inferior_event): Use scoped_restore_current_thread.
4669 * linespec.c (decode_line_full, decode_line_1): Use
4670 scoped_restore_current_program_space.
4671 * mi/mi-main.c: Include "progspace-and-thread.h".
4672 (exec_continue): Use scoped_restore_current_thread.
4673 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
4674 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
4675 * proc-service.c (ps_pglobal_lookup): Use
4676 scoped_restore_current_program_space.
4677 * progspace-and-thread.c: New file.
4678 * progspace-and-thread.h: New file.
4679 * progspace.c (release_program_space, clone_program_space): Use
4680 scoped_restore_current_program_space.
4681 (restore_program_space, save_current_program_space)
4682 (save_current_space_and_thread): Delete.
4683 (switch_to_program_space_and_thread): Moved to
4684 progspace-and-thread.c.
4685 * progspace.h (save_current_program_space)
4686 (save_current_space_and_thread): Delete declarations.
4687 (scoped_restore_current_program_space): New class.
4688 * remote.c (remote_btrace_maybe_reopen): Use
4689 scoped_restore_current_thread.
4690 * symtab.c: Include "progspace-and-thread.h".
4691 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
4692 * thread.c (print_thread_info_1): Use
4693 scoped_restore_current_thread.
4694 (struct current_thread_cleanup): Delete.
4695 (do_restore_current_thread_cleanup)
4696 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
4697 (scoped_restore_current_thread::~scoped_restore_current_thread):
4699 (make_cleanup_restore_current_thread): Rename/convert to ...
4700 (scoped_restore_current_thread::scoped_restore_current_thread):
4702 (thread_apply_all_command): Use scoped_restore_current_thread.
4703 (thread_apply_command): Use scoped_restore_current_thread.
4704 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
4705 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
4707 2017-05-04 Pedro Alves <palves@redhat.com>
4709 * thread.c (make_cleanup_restore_current_thread): Move
4710 find_thread_ptid call before the is_stopped call. Assert that the
4711 thread is found. Replace is_stopped call by checking the thread's
4712 state directly. Remove unnecessary NULL-thread check.
4714 2017-05-04 Pedro Alves <palves@redhat.com>
4716 * corelow.c (thread_section_name): New class.
4717 (get_core_register_section, get_core_siginfo): Use it.
4719 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
4721 * corelow.c (sniff_core_bfd): Remove extra semicolon.
4722 (get_core_register_section): Remove xfree of NULL pointer.
4724 2017-05-03 Alan Hayward <alan.hayward@arm.com>
4726 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
4727 * regcache.c (regcache::raw_supply_zeroed): New function.
4728 * regcache.h (regcache::raw_supply_zeroed): New declaration.
4730 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
4732 * gdbarch.sh: Remove commented out definition of
4734 * gdbarch.h: Re-generate.
4736 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4738 * configure: Regenerate.
4740 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
4742 * solib-target.c (solib_target_relocate_section_addresses):
4743 Remove num_section_bases, num_bases, segment_bases variables.
4745 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4747 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
4749 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4751 * solib-target.c: Include <vector>
4752 (struct lm_info_target) <~lm_info_target>: Remove.
4753 <segment_bases, section_bases>: Change type to
4754 std::vector<CORE_ADDR>.
4755 (library_list_start_segment, library_list_start_section,
4756 library_list_end_library,
4757 solib_target_relocate_section_addresses): Adjust.
4759 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4761 * gdbarch.sh (software_single_step): Change return type to
4762 std::vector<CORE_ADDR>.
4763 * gdbarch.c, gdbarch.h: Re-generate.
4764 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
4766 (arm_deal_with_atomic_sequence_raw): Adjust.
4767 (thumb_get_next_pcs_raw): Adjust.
4768 (arm_get_next_pcs_raw): Adjust.
4769 (arm_get_next_pcs): Adjust.
4770 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
4771 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
4772 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
4773 (alpha_software_single_step): Adjust.
4774 * alpha-tdep.h (alpha_software_single_step): Adjust.
4775 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
4776 * arm-tdep.c (arm_software_single_step): Adjust.
4777 (arm_breakpoint_kind_from_current_state): Adjust.
4778 * arm-tdep.h (arm_software_single_step): Adjust.
4779 * breakpoint.c (insert_single_step_breakpoint): Adjust.
4780 * cris-tdep.c (cris_software_single_step): Adjust.
4781 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
4782 (micromips_deal_with_atomic_sequence): Adjust.
4783 (deal_with_atomic_sequence): Adjust.
4784 (mips_software_single_step): Adjust.
4785 * mips-tdep.h (mips_software_single_step): Adjust.
4786 * moxie-tdep.c (moxie_software_single_step): Adjust.
4787 * nios2-tdep.c (nios2_software_single_step): Adjust.
4788 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
4789 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
4790 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
4791 * s390-linux-tdep.c (s390_software_single_step): Adjust.
4792 * sparc-tdep.c (sparc_software_single_step): Adjust.
4793 * spu-tdep.c (spu_software_single_step): Adjust.
4794 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
4796 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4798 * gdbarch.sh: Use semi-colon as field separator instead of colon.
4799 * gdbarch.h: Re-generate.
4801 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4803 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
4804 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
4805 * python/py-instruction.c, python/py-instruction.h: New file.
4806 * python/py-record.c: Add py-instruction.h include.
4807 (gdbpy_initialize_record): Make gdb.Instruction a super class of
4808 gdb.RecordInstruction.
4809 * python/python-internal.h: Add gdbpy_initialize_instruction
4811 * python/python.c (do_start_initialization): Add
4812 gdbpy_initialize_instruction.
4814 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4816 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
4818 (btrace_func_from_recpy_func): New function.
4819 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
4820 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
4821 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
4822 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
4823 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
4824 Also, use new helper functions.
4825 (btpy_list_item): Use new helper functions.
4826 (recpy_bt_function_call_history): Use new type name.
4827 (btpy_call_getset): Remove.
4828 (gdbpy_initialize_btrace): Remove code to initialize
4829 gdb.BtraceFunctionCall.
4830 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
4831 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
4832 recpy_bt_func_prev, recpy_bt_func_next): New export.
4833 * python/py-record.c (recpy_func_type): New static object.
4834 (recpy_func_new, recpy_func_level, recpy_func_symbol,
4835 recpy_func_instructions, recpy_func_up, recpy_func_prev,
4836 recpy_func_next): New function.
4837 (recpy_element_hash, recpy_element_richcompare): Updated comment.
4838 (recpy_func_getset): New static object.
4839 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
4840 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
4842 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4844 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
4845 (btpy_object, btpy_insn_type, btpy_new): Remove.
4846 (btpy_list_object): Use gdb.RecordInstruction type instead of
4847 gdb.BtraceInstruction type.
4848 (btrace_insn_from_recpy_insn): New function.
4849 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
4851 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
4852 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
4853 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
4854 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
4855 instead of btpy_object.
4856 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4857 btpy_insn_data, btpy_insn_decode): Rename to ...
4858 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
4859 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
4860 recpy_bt_insn_decode): This. Also, use new helper functions.
4861 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
4863 (btpy_insn_getset): Remove.
4864 (gdbpy_initialize_btrace): Remove code to initialize
4865 gdb.BtraceInstruction. Use recpy_element_object.
4866 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
4867 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
4868 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
4869 * python/py-record.c (recpy_insn_type): New static object.
4870 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
4871 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
4872 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
4874 (recpy_insn_getset): New static object.
4875 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
4876 * python/py-record.h (recpy_element_object): New typedef.
4877 (recpy_insn_type, recpy_insn_new): New export.
4879 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4881 * py-record-btrace.c (btpy_insn_new): Removed.
4882 (btpy_insn_or_gap_new): New function.
4883 (btpy_insn_error): Removed.
4884 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4885 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
4886 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
4887 btpy_insn_or_gap_new instead of btpy_insn_new.
4888 (btpy_insn_getset): Remove btpy_insn_error.
4889 * py-record.c (recpy_gap_type): New static object.
4890 (recpy_gap_object): New typedef.
4891 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
4892 recpy_gap_reason_string): New function.
4893 (recpy_gap_getset): New static object.
4894 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
4895 * py-record.h (recpy_gap_new): New export.
4897 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4899 * python/py-record.c (recpy_ptid): Remove.
4900 (recpy_record_getset): Remove recpy_ptid.
4902 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4904 * btrace.c (btrace_fetch): Set inferior_ptid.
4905 * python/py-record-btrace.c: Add "py-record.h" include.
4906 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
4907 recpy_bt_end, recpy_bt_instruction_history,
4908 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
4909 in gdb.Record object instead of current ptid.
4910 * python/py-record.c: Include new "py-record.h" file.
4911 (recpy_record_object): Moved to py-record.h.
4912 * python/py-record.h: New file.
4914 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4916 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
4917 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
4920 2017-05-01 Joel Brobecker <brobecker@adacore.com>
4922 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
4923 the past maintainers section.
4925 2017-04-28 Yao Qi <yao.qi@linaro.org>
4927 * infcmd.c (get_return_value): Use regcache ctor, and remove
4930 2017-04-28 Yao Qi <yao.qi@linaro.org>
4931 Pedro Alves <palves@redhat.com>
4933 * regcache.c (regcache::regcache): New tag dispatch ctor.
4934 (do_cooked_read): Moved above.
4935 (regcache_dup): Use the tag dispatch ctor..
4936 * regcache.h (regcache): Declare ctor, delete copy ctor and
4937 assignment operator, remove friend regcache_dup.
4939 2017-04-28 Yao Qi <yao.qi@linaro.org>
4941 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
4942 call method save instead of regcache_cpy.
4943 * regcache.h (struct regcache): Make regcache_dup a friend.
4945 2017-04-28 Yao Qi <yao.qi@linaro.org>
4947 * regcache.c (struct regcache): Move to regcache.h
4948 (regcache::arch): New method.
4949 (regcache_get_ptid): Update.
4950 (get_regcache_arch): Call arch method.
4951 (get_regcache_aspace): Call method aspace.
4952 (register_buffer): Change it to method.
4953 (regcache_save): Change it to regcache::save.
4954 (regcache_restore): Likewise.
4955 (regcache_cpy_no_passthrough): Remove the declaration.
4956 (regcache_cpy): Call methods restore and cpy_no_passthrough.
4957 (regcache_cpy_no_passthrough): Change it to method
4959 (regcache_register_status): Change it to method
4960 get_register_status.
4961 (regcache_invalidate): Change it to method invalidate.
4962 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
4963 (regcache_raw_update): Change it to method raw_update.
4964 (regcache_raw_read): Likewise.
4965 (regcache_raw_read_signed): Likewise.
4966 (regcache_raw_read_unsigned): Likewise.
4967 (regcache_raw_write_signed): Likewise.
4968 (regcache_raw_write_unsigned): Likewise.
4969 (regcache_cooked_read): Likewise.
4970 (regcache_cooked_read_value): Likewise.
4971 (regcache_cooked_read_signed): Likewise.
4972 (regcache_cooked_read_unsigned): Likewise.
4973 (regcache_cooked_write_signed): Likewise.
4974 (regcache_cooked_write_unsigned): Likewise.
4975 (regcache_raw_set_cached_value): Likewise.
4976 (regcache_raw_write): Likewise.
4977 (regcache_cooked_write): Likewise.
4978 (regcache_xfer_part): Likewise.
4979 (regcache_raw_read_part): Likewise.
4980 (regcache_raw_write_part): Likewise.
4981 (regcache_cooked_read_part): Likewise.
4982 (regcache_cooked_write_part): Likewise.
4983 (regcache_raw_supply): Likewise.
4984 (regcache_raw_collect): Likewise.
4985 (regcache_transfer_regset): Likewise.
4986 (regcache_supply_regset): Likewise.
4987 (regcache_collect_regset): Likewise.
4988 (regcache_debug_print_register): Likewise.
4989 (enum regcache_dump_what): Move it to regcache.h.
4990 (regcache_dump): Change it to method dump.
4991 * regcache.h (enum regcache_dump_what): New.
4992 (class regcache): New.
4993 * target.c (target_fetch_registers): Call method
4994 debug_print_register.
4995 (target_store_registers): Likewise.
4997 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4999 * windows-nat.c (struct lm_info_windows): Initialize field.
5000 (windows_make_so): Allocate lm_info_windows with new.
5001 (windows_free_so): Free lm_info_windows with delete.
5003 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5005 * solib-darwin.c (struct lm_info_darwin): Initialize field.
5006 (darwin_current_sos): Allocate lm_info_darwin with new, remove
5008 (darwin_free_so): Free lm_info_darwin with delete.
5010 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5012 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
5013 <l_addr_p>: Change type to bool.
5014 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
5015 (svr4_free_so): Free lm_info_svr4 with delete.
5016 (svr4_copy_library_list): Replace memcpy with call to copy
5018 (library_list_start_library, svr4_default_sos): Allocate
5019 lm_info_svr4 with new.
5021 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5023 * solib-target.c (struct lm_info_target): Add destructor,
5025 <name>: Change type to std::string.
5026 (library_list_start_library): Allocate lm_info_target with new.
5027 (solib_target_free_library_list): Free lm_info_target with
5029 (solib_target_current_sos): Adapt to std::string.
5030 (solib_target_free_so): Free lm_info_target with delete.
5032 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5034 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
5036 (frv_current_sos): Allocate lm_info_frv with new.
5037 (frv_relocate_main_executable): Free lm_info_frv with delete,
5039 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
5041 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5043 * solib-frv.c (struct lm_info_frv): Fix indentation.
5045 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5047 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
5049 (dsbt_current_sos): Allocate lm_info_dsbt with new.
5050 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
5051 and allocate with new.
5052 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
5054 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5056 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
5057 <filename, member_name>: Change type to std::string.
5058 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
5059 (library_list_start_library): Allocate lm_info_aix with new.
5060 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
5061 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
5062 with copy constructor.
5064 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5066 * solist.h (struct lm_info): Remove.
5067 (struct lm_info_base): New class.
5068 (struct so_list) <lm_info>: Change type to lm_info_base *.
5069 * nto-tdep.c (struct lm_info): Remove.
5071 * solib-aix.c (struct lm_info): Rename to ...
5072 (struct lm_info_aix): ... this. Extend lm_info_base.
5073 (lm_info_p): Rename to ...
5074 (lm_info_aix_p): ... this, and adjust.
5075 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
5076 solib_aix_parse_libraries, library_list_start_library,
5077 solib_aix_free_library_list, solib_aix_parse_libraries,
5078 solib_aix_get_library_list,
5079 solib_aix_relocate_section_addresses, solib_aix_free_so,
5080 solib_aix_get_section_offsets,
5081 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
5083 (struct solib_aix_inferior_data) <library_list>: Adjust.
5084 * solib-darwin.c (struct lm_info): Rename to ...
5085 (struct lm_info_darwin): ... this. Extend lm_info_base.
5086 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
5087 * solib-dsbt.c (struct lm_info): Rename to ...
5088 (struct lm_info_dsbt): ... this. Extend lm_info_base.
5089 (struct dsbt_info) <main_executable_lm_info): Adjust.
5090 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
5091 dsbt_relocate_section_addresses): Adjust.
5092 * solib-frv.c (struct lm_info): Rename to ...
5093 (struct lm_info_frv): ... this. Extend lm_info_base.
5094 (main_executable_lm_info): Adjust.
5095 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
5096 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
5097 find_canonical_descriptor_in_load_object,
5098 frv_fdpic_find_canonical_descriptor): Adjust.
5099 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
5101 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
5102 svr4_clear_so, svr4_copy_library_list,
5103 library_list_start_library, svr4_default_sos, svr4_read_so_list,
5104 svr4_current_sos, svr4_fetch_objfile_link_map,
5105 solist_update_incremental): Adjust.
5106 * solib-svr4.h (struct lm_info_svr4): Move here from
5108 * solib-target.c (struct lm_info): Rename to ...
5109 (struct lm_info_target): ... this. Extend lm_info_base.
5110 (lm_info_p): Rename to ...
5111 (lm_info_target_p): ... this.
5112 (solib_target_parse_libraries, library_list_start_segment,
5113 library_list_start_section, library_list_start_library,
5114 library_list_end_library, solib_target_free_library_list,
5115 solib_target_current_sos, solib_target_free_so,
5116 solib_target_relocate_section_addresses): Adjust.
5117 * windows-nat.c (struct lm_info): Rename to ...
5118 (struct lm_info_windows): ... this. Extend lm_info_base.
5119 (windows_make_so, handle_load_dll, handle_unload_dll,
5120 windows_xfer_shared_libraries): Adjust.
5122 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
5124 * solib-darwin.c (struct darwin_so_list): Remove.
5125 (darwin_current_sos): Allocate an so_list object instead of a
5126 darwin_so_list, separately allocate an lm_info object.
5127 (darwin_free_so): Free lm_info.
5129 2017-04-28 John Baldwin <jhb@FreeBSD.org>
5131 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
5132 with fprintf_filtered.
5134 2017-04-28 Yao Qi <yao.qi@linaro.org>
5136 * regcache.c (regcache::regcache): New function.
5137 (regcache::~regcache): New function.
5138 (regcache_xmalloc_1): Remove.
5139 (regcache_xmalloc): Call new regcache.
5140 (regcache_xfree): Call delete regcache.
5141 (get_thread_arch_aspace_regcache): Call new regcache.
5143 2017-04-28 Yao Qi <yao.qi@linaro.org>
5145 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
5146 lwp instead of ptid_get_lwp.
5148 2017-04-28 Yao Qi <yao.qi@linaro.org>
5150 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
5151 lwp_info instead of getting from inferior_ptid.
5153 2017-04-27 Keith Seitz <keiths@redhat.com>
5155 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
5156 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
5157 (CV_CONVERSION_BADNESS): Define.
5158 (rank_one_type): Remove overly restrictive rvalue reference
5160 Add cv-qualifier checks and subranks for type equality.
5161 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
5162 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
5163 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
5165 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
5167 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
5168 count when creating the object.
5170 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
5171 Ulrich Weigand <uweigand@de.ibm.com>
5173 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
5174 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
5176 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
5177 (process_xcoff_symbol): Likewise.
5178 (scan_xcoff_symtab): Likewise.
5180 2017-04-26 Alan Hayward <alan.hayward@arm.com>
5182 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
5183 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
5184 (ia64_access_reg): Use get_frame_register_unsigned.
5185 (ia64_access_rse_reg): Likewise.
5186 (ia64_libunwind_frame_prev_register): Likewise.
5188 2017-04-26 Jiong Wang <jiong.wang@arm.com>
5190 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
5191 * gdbarch.c: Regenerated.
5192 * gdbarch.h: Regenerated.
5193 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
5194 visibility external.
5195 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
5196 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
5197 (enum cfa_how_kind): Move to ...
5198 (struct dwarf2_frame_state_reg_info): Likewise.
5199 (struct dwarf2_frame_state): Likewise.
5200 * dwarf2-frame.h: ... here.
5201 (dwarf2_frame_state_alloc_regs): New declaration.
5202 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
5203 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
5205 2017-04-26 Alan Hayward <alan.hayward@arm.com>
5207 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
5208 regcache_raw_read_unsigned.
5209 (xtensa_pseudo_register_write): Likewise.
5211 2017-04-26 Alan Hayward <alan.hayward@arm.com>
5213 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
5214 (nds32_pseudo_register_write): Likewise.
5216 2017-04-25 Yao Qi <yao.qi@linaro.org>
5218 * regcache.c (struct regcache) <readonly_p>: Change its type
5220 (regcache_xmalloc_1): Update parameter type and callers update.
5222 2017-04-25 Yao Qi <yao.qi@linaro.org>
5224 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
5225 set_gdbarch_wchar_bit.
5226 * arm-tdep.c (arm_gdbarch_init): Likewise.
5228 2017-04-25 Pedro Alves <palves@redhat.com>
5230 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
5231 (BothAreRelocatable, memcopy, memmove): Don't define.
5232 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
5235 2017-04-25 Pedro Alves <palves@redhat.com>
5237 * common/common-defs.h: Include "common/poison.h".
5238 * common/function-view.h: (Not, Or, Requires): Move to traits.h
5240 * common/poison.h: New file.
5241 * common/traits.h: Include <type_traits>.
5242 (Not, Or, Requires): New, moved from common/function-view.h.
5244 2017-04-25 Pedro Alves <palves@redhat.com>
5246 * breakpoint.h (struct breakpoint): In-class initialize all
5247 fields. Make boolean fields "bool".
5248 * breakpoint.c (init_raw_breakpoint_without_location): Remove
5249 memset call and initializations no longer necessary.
5251 2017-04-25 Pedro Alves <palves@redhat.com>
5253 * btrace.c (pt_btrace_insn_flags): Change parameter type to
5255 (pt_btrace_insn): New function.
5256 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
5258 2017-04-25 Pedro Alves <palves@redhat.com>
5260 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
5261 "base" field and inherit from "bp_location" instead. Add
5263 (allocate_location_exception): Use new non-default ctor.
5264 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
5265 (init_bp_location): Convert to ...
5266 (bp_location::bp_location): ... this new ctor, and remove memset
5268 (base_breakpoint_allocate_location): Use the new non-default ctor.
5269 * breakpoint.h (bp_location): Now a class. Declare default and
5270 non-default ctors. In-class initialize all members.
5271 (init_bp_location): Remove declaration.
5273 2017-04-25 Pedro Alves <palves@redhat.com>
5275 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
5276 assignment operator.
5278 2017-04-24 Yao Qi <yao.qi@linaro.org>
5280 * doublest.c (convert_doublest_to_floatformat): Call
5281 floatformat_totalsize_bytes.
5283 2017-04-22 Tom Tromey <tom@tromey.com>
5285 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5287 * stack.c (print_frame): Use ui_out_emit_list.
5288 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
5290 * mi/mi-main.c (print_one_inferior)
5291 (mi_cmd_data_list_register_names)
5292 (mi_cmd_data_list_register_values, mi_cmd_list_features)
5293 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
5295 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
5296 (mi_output_solib_attribs): Use ui_out_emit_list,
5298 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
5299 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
5300 (mi_cmd_stack_list_args, list_args_or_locals): Use
5302 * disasm.c (do_assembly_only): Use ui_out_emit_list.
5303 * breakpoint.c (print_solib_event, output_thread_groups): Use
5306 2017-04-22 Tom Tromey <tom@tromey.com>
5308 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
5309 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
5310 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
5312 2017-04-22 Tom Tromey <tom@tromey.com>
5314 * tracepoint.c (tvariables_info_1)
5315 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
5317 2017-04-22 Tom Tromey <tom@tromey.com>
5319 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
5320 annotate_arg_emitter.
5321 * breakpoint.c (print_mention_watchpoint)
5322 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
5323 * annotate.h (struct annotate_arg_emitter): New.
5325 2017-04-22 Tom Tromey <tom@tromey.com>
5327 * record-btrace.c (record_btrace_insn_history)
5328 (record_btrace_insn_history_range, record_btrace_call_history)
5329 (record_btrace_call_history_range): Use ui_out_emit_tuple.
5330 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
5332 * stack.c (print_frame_info): Use ui_out_emit_tuple.
5333 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
5334 * skip.c (skip_info): Use ui_out_emit_tuple.
5335 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
5336 * progspace.c (print_program_space): Use ui_out_emit_tuple.
5337 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
5338 * osdata.c (info_osdata): Use ui_out_emit_tuple.
5339 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
5341 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
5342 (output_register, mi_cmd_data_read_memory)
5343 (mi_cmd_data_read_memory_bytes, mi_load_progress)
5344 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
5345 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
5346 Use ui_out_emit_tuple.
5347 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
5349 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
5350 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
5351 * linux-thread-db.c (info_auto_load_libthread_db): Use
5353 * inferior.c (print_inferior): Use ui_out_emit_tuple.
5354 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
5355 * disasm.c (do_mixed_source_and_assembly_deprecated)
5356 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
5357 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
5358 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
5359 * breakpoint.c (print_one_breakpoint_location)
5360 (print_one_breakpoint): Use ui_out_emit_tuple.
5361 * auto-load.c (print_script, info_auto_load_cmd): Use
5363 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
5365 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
5367 * thread.c (print_thread_info_1): Remove dead code.
5369 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5371 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
5373 * arm-tdep.c (selftests::arm_record_test): Likewise.
5375 2017-04-21 Yao Qi <yao.qi@linaro.org>
5377 * regcache.c (regcache_restore): Remove argument 2. Replace
5378 argument 3 with regcache. Get register status from
5379 src->register_status and get register contents from
5380 register_buffer (src, regnum).
5381 (regcache_cpy): Update.
5383 2017-04-19 Pedro Alves <palves@redhat.com>
5385 * gdbthread.h (thread): Add missing closing parenthesis in
5388 2017-04-19 Pedro Alves <palves@redhat.com>
5390 * common/refcounted-object.h: New file.
5391 * gdbthread.h: Include "common/refcounted-object.h".
5392 (thread_info): Inherit from refcounted_object and add comments.
5393 (thread_info::incref, thread_info::decref)
5394 (thread_info::m_refcount): Delete.
5395 (thread_info::deletable): Use the refcounted_object::refcount()
5397 * inferior.c (current_inferior_): Add comment.
5398 (set_current_inferior): Increment/decrement refcounts.
5399 (prune_inferiors, remove_inferior_command): Skip inferiors marked
5400 not-deletable instead of comparing with the current inferior.
5401 (initialize_inferiors): Increment the initial inferior's refcount.
5402 * inferior.h (struct inferior): Forward declare.
5403 Include "common/refcounted-object.h".
5404 (current_inferior, set_current_inferior): Move declaration to
5405 before struct inferior's definition, and fix comment.
5406 (inferior): Inherit from refcounted_object. Add comments.
5407 * thread.c (switch_to_thread_no_regs): Reference the thread's
5408 inferior pointer directly instead of doing a ptid lookup.
5409 (switch_to_no_thread): New function.
5410 (switch_to_thread(thread_info *)): New function, factored out
5412 (switch_to_thread(ptid_t)): ... this.
5413 (restore_current_thread): Delete.
5414 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
5415 fields, and add 'inf' field.
5416 (do_restore_current_thread_cleanup): Check whether old->inf is
5417 alive instead of looking up an inferior by ptid. Use
5418 switch_to_thread and switch_to_no_thread.
5419 (restore_current_thread_cleanup_dtor): Use old->inf directly
5420 instead of lookup up an inferior by id. Decref the inferior.
5421 Don't restore 'removable'.
5422 (make_cleanup_restore_current_thread): Same the inferior pointer
5423 in old, instead of the inferior number. Incref the inferior.
5424 Don't save/clear 'removable'.
5426 2017-04-19 Pedro Alves <palves@redhat.com>
5428 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5429 unittests/scoped_restore-selftests.c.
5430 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
5431 * common/scoped_restore.h (scoped_restore_base): Make "class".
5432 (scoped_restore_base::release): New public method.
5433 (scoped_restore_base::scoped_restore_base): New protected ctor.
5434 (scoped_restore_base::m_saved_var): New protected field.
5435 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
5436 scoped_restore_base base class instead of m_saved_var directly.
5437 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
5438 (scoped_restore_tmpl::scoped_restore_tmpl(const
5439 scoped_restore_tmpl<T>&)): Likewise.
5440 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
5442 (scoped_restore_tmpl::saved_var): New method.
5443 (scoped_restore_tmpl::m_saved_var): Delete.
5444 * inferior.h (inferior::detaching): Now a bool.
5445 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
5447 * unittests/scoped_restore-selftests.c: New file.
5449 2017-04-19 Pedro Alves <palves@redhat.com>
5451 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
5452 Re-sort in alphabetic order.
5454 2017-04-18 Pedro Alves <palves@redhat.com>
5456 * xml-support.c (obstack_xml_printf): Delete.
5457 * xml-support.h (obstack_xml_printf): Delete.
5459 2017-04-18 Pedro Alves <palves@redhat.com>
5461 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
5462 vdebug, verror, body_text, start_element, end_element, name,
5463 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
5464 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
5465 is_xinclude>: Make private and add m_ prefix.
5466 (gdb_xml_parser::body_text): New method, based on ...
5467 (gdb_xml_body_text): ... this. Adjust.
5468 (gdb_xml_parser::vdebug): New method, based on ...
5469 (gdb_xml_debug): ... this. Adjust.
5470 (gdb_xml_parser::verror): New method, based on ...
5471 (gdb_xml_error): ... this. Adjust.
5472 (gdb_xml_parser::start_element): New method, based on ...
5473 (gdb_xml_start_element): ... this. Adjust.
5474 (gdb_xml_start_element_wrapper): Defer to
5475 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
5476 (gdb_xml_parser::end_element): New method, based on ...
5477 (gdb_xml_end_element_wrapper): ... this. Adjust.
5478 (gdb_xml_parser::~gdb_xml_parser): Adjust.
5479 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
5480 (gdb_xml_parser::use_dtd): New method, based on ...
5481 (gdb_xml_use_dtd): ... this. Adjust.
5482 (gdb_xml_parser::parse): New method, based on ...
5483 (gdb_xml_parse): ... this. Adjust.
5484 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
5485 (xinclude_start_include): Adjust to call the parser's name method.
5486 (xml_xinclude_default, xml_xinclude_start_doctype)
5487 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
5489 (xml_process_xincludes): Adjust to call parser methods.
5490 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
5493 2017-04-18 Pedro Alves <palves@redhat.com>
5495 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
5496 gdb::optional<std::string>.
5497 * xml-support.c: Include <string>.
5498 (scope_level::scope_level(scope_level &&))
5499 (scope_level::~scope_level): Delete.
5500 (scope_level::body): Now a std::string.
5501 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
5502 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
5504 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
5505 (xinclude_parsing_data::output): Now a std::string reference.
5506 (xinclude_start_include): Adjust.
5507 (xml_xinclude_default): Adjust.
5508 (xml_process_xincludes): Add 'output' parameter, and return bool.
5509 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
5511 * xml-tdesc.c: Include <unordered_map> and <string>.
5512 (tdesc_xml_cache): Delete.
5513 (tdesc_xml_cache_s): Delete.
5514 (xml_cache): Now an std::unordered_map.
5515 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
5516 (target_fetch_description_xml): Change return type to
5517 gdb::optional<std::string>, and adjust.
5518 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
5519 (target_fetch_description_xml): Change return type to
5520 gdb::optional<std::string>.
5522 2017-04-18 Pedro Alves <palves@redhat.com>
5524 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5525 unittests/optional-selftests.c.
5526 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
5527 * unittests/optional-selftests.c: New file.
5528 * unittests/optional/assignment/1.cc: New file.
5529 * unittests/optional/assignment/2.cc: New file.
5530 * unittests/optional/assignment/3.cc: New file.
5531 * unittests/optional/assignment/4.cc: New file.
5532 * unittests/optional/assignment/5.cc: New file.
5533 * unittests/optional/assignment/6.cc: New file.
5534 * unittests/optional/assignment/7.cc: New file.
5535 * unittests/optional/cons/copy.cc: New file.
5536 * unittests/optional/cons/default.cc: New file.
5537 * unittests/optional/cons/move.cc: New file.
5538 * unittests/optional/cons/value.cc: New file.
5539 * unittests/optional/in_place.cc: New file.
5540 * unittests/optional/observers/1.cc: New file.
5541 * unittests/optional/observers/2.cc: New file.
5543 2017-04-18 Pedro Alves <palves@redhat.com>
5545 * common/gdb_optional.h: Include common/traits.h.
5546 (in_place_t): New type.
5547 (in_place): New constexpr variable.
5548 (optional::optional): Remove member initialization of
5550 (optional::optional(in_place_t...)): New constructor.
5551 (optional::~optional): Use reset.
5552 (optional::optional(const optional&)): New.
5553 (optional::optional(const optional&&)): New.
5554 (optional::optional(T &)): New.
5555 (optional::optional(T &&)): New.
5556 (operator::operator=(const optional &)): New.
5557 (operator::operator=(optional &&)): New.
5558 (operator::operator= (const T &))
5559 (operator::operator= (T &&))
5560 (operator::emplace (Args &&... args)): Return a T&. Use reset.
5561 (operator::reset): New.
5562 (operator::m_instantiated):: Add in-class initializer.
5563 * common/traits.h: Include <type_traits>.
5564 (struct And): New types.
5566 2017-04-18 Pedro Alves <palves@redhat.com>
5568 * xml-support.c: Include <vector>.
5569 (scope_level::scope_level(const gdb_xml_element *))
5570 (scope_level::scope_level(scope_level&&)): New.
5571 (scope_level::~scope_level): New.
5572 (scope_level_s): Delete.
5573 (gdb_xml_parser::scopes): Now a std::vector.
5574 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
5576 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
5578 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
5579 of the scopes member. Use std::vector::emplace_back.
5581 2017-04-18 Pedro Alves <palves@redhat.com>
5583 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
5585 (gdb_xml_end_element): Change type of first parameter.
5586 (gdb_xml_cleanup): Rename to ...
5587 (gdb_xml_parser::~gdb_xml_parser): ... this.
5588 (gdb_xml_create_parser_and_cleanup): Delete with ...
5589 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
5591 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
5592 using gdb_xml_create_parser_and_cleanup.
5593 (xinclude_parsing_data): Add ctor/dtor.
5594 (xml_xinclude_cleanup): Delete.
5595 (xml_process_xincludes): Create a local xinclude_parsing_data
5596 instead of heap-allocating one. Create a local gdb_xml_parser
5597 instead of heap-allocating one with
5598 gdb_xml_create_parser_and_cleanup.
5600 2017-04-18 John Baldwin <jhb@FreeBSD.org>
5603 * fbsd-nat.c (resume_one_thread_cb): Remove.
5604 (resume_all_threads_cb): Remove.
5605 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
5606 iterate_over_threads.
5608 2017-04-17 Joel Brobecker <brobecker@adacore.com>
5610 * NEWS: Create a new section for the next release branch.
5611 Rename the section of the current branch, now that it has
5614 2017-04-17 Joel Brobecker <brobecker@adacore.com>
5616 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
5617 * version.in: Bump version to 8.0.50.DATE-git.
5619 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
5622 * windows-nat.c (windows_create_inferior): Declare 'allargs'
5623 independently of the host, and fix build breakage on Cygwin.
5625 2017-04-13 Pedro Alves <palves@redhat.com>
5627 * inferior.c (free_inferior): Convert to ...
5628 (inferior::~inferior): ... this dtor.
5629 (inferior::inferior): New ctor, factored out from ...
5630 (add_inferior_silent): ... here. Allocate the inferior with a new
5632 (delete_inferior): Call delete instead of free_inferior.
5633 * inferior.h (gdb_environ, continuation): Forward declare.
5634 (inferior): Now a class. Add in-class initialization to all
5635 members. Make boolean fields bool, except 'detaching'.
5636 (inferior::inferior): New explicit ctor.
5637 (inferior::~inferior): New.
5639 2017-04-13 Pedro Alves <palves@redhat.com>
5641 * inferior.c (init_inferior_list): Delete.
5642 * inferior.h (init_inferior_list): Delete.
5644 2017-04-13 Pedro Alves <palves@redhat.com>
5647 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
5648 (top level): Call it twice, with different thread sets.
5650 2017-04-13 Pedro Alves <palves@redhat.com>
5652 * thread.c: Include <algorithm>.
5653 (thread_array_cleanup): Delete.
5654 (scoped_inc_dec_ref): New class.
5655 (live_threads_count): New function.
5656 (set_thread_refcount): Delete.
5657 (tp_array_compar_ascending): Now a bool.
5658 (tp_array_compar): Convert to a std::sort comparison function.
5659 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
5660 and live_threads_count.
5662 2017-04-13 Pedro Alves <palves@redhat.com>
5664 * infrun.c (follow_fork_inferior): Also switch the current
5667 2017-04-13 Pedro Alves <palves@redhat.com>
5669 * breakpoint.c (watch_command_1): Save watchpoint-frame info
5670 before calling create_internal_breakpoint.
5672 2017-04-13 Pedro Alves <palves@redhat.com>
5674 * fork-child.c (execv_argv): New class.
5675 (breakup_args): Refactored as ...
5676 (execv_argv::init_for_no_shell): .. this method of execv_argv.
5677 Copy arguments to storage and replace separators with NULL
5678 terminators in place.
5679 (escape_bang_in_quoted_argument): Adjust to return bool.
5680 (execv_argv::execv_argv): New ctor.
5681 (execv_argv::init_for_shell): New method, factored out from
5682 fork_inferior. Don't strdup strings into the vector.
5683 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
5684 Remove free_vector_argv call.
5686 2017-04-13 Yao Qi <yao.qi@linaro.org>
5688 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
5691 2017-04-13 Yao Qi <yao.qi@linaro.org>
5693 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
5694 * rx-tdep.c (rx_gdbarch_init): Likewise.
5696 2017-04-13 Pedro Alves <palves@redhat.com>
5698 * breakpoint.h (struct breakpoint): Reindent.
5700 2017-04-13 Pedro Alves <palves@redhat.com>
5702 * breakpoint.c (bp_location): Rename to ...
5703 (bp_locations): ... this. All references updated.
5704 (bp_location_count): Rename to ...
5705 (bp_locations_count): ... this. All references updated.
5706 (bp_location_placed_address_before_address_max): Rename to ...
5707 (bp_locations_placed_address_before_address_max): ... this. All
5709 (bp_location_shadow_len_after_address_max): Rename to ...
5710 (bp_locations_shadow_len_after_address_max): ... this. All
5712 (bp_location_compare_addrs): Rename to ...
5713 (bp_locations_compare_addrs): ... this. All references updated.
5714 (bp_location_compare):Rename to ...
5715 (bp_locations_compare): ... this. All references updated.
5716 (bp_location_target_extensions_update): Rename to ...
5717 (bp_locations_target_extensions_update): ... this. All references
5720 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5722 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
5723 * common/common.m4: Check headers 'termios.h', 'termio.h' and
5725 * common/gdb_termios.h: New file, with parts of "terminal.h".
5726 * inflow.c: Include "gdb_termios.h".
5727 * ser-unix.c: Include "gdb_termios.h".
5728 * terminal.h: Move terminal-related defines to
5729 "common/gdb_termios.h".
5731 2017-04-12 Tom Tromey <tom@tromey.com>
5733 * probe.c (parse_probes): Update.
5734 * location.h (delete_event_location): Don't declare.
5735 (event_location_deleter::operator()): Update.
5736 * location.c (event_location_deleter::operator()): Rename from
5737 delete_event_location.
5738 * linespec.h (linespec_result) <location>: Change type to
5740 * linespec.c (canonicalize_linespec, event_location_to_sals)
5741 (decode_objc): Update.
5742 (linespec_result): Don't call delete_event_location.
5743 * breakpoint.c (create_breakpoints_sal)
5744 (bkpt_probe_create_sals_from_location)
5745 (strace_marker_create_sals_from_location): Update.
5747 2017-04-12 Tom Tromey <tom@tromey.com>
5749 * linespec.h (struct linespec_result): Add constructor and
5751 (init_linespec_result, destroy_linespec_result)
5752 (make_cleanup_destroy_linespec_result): Don't declare.
5753 * linespec.c (init_linespec_result): Remove.
5754 (linespec_result::~linespec_result): Rename from
5755 destroy_linespec_result. Update.
5756 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
5758 * breakpoint.c (create_breakpoint, break_range_command)
5759 (decode_location_default): Update.
5760 * ax-gdb.c (agent_command_1): Update.
5762 2017-04-12 Tom Tromey <tom@tromey.com>
5764 * remote.c (remote_download_tracepoint): Update.
5765 * python/py-breakpoint.c (bppy_get_location): Update.
5766 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
5767 (gdbscm_breakpoint_location): Update.
5768 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
5769 * breakpoint.h (struct breakpoint) <location, location_range_end>:
5770 Change type to event_location_up.
5771 * breakpoint.c (create_overlay_event_breakpoint)
5772 (create_longjmp_master_breakpoint)
5773 (create_std_terminate_master_breakpoint)
5774 (create_exception_master_breakpoint)
5775 (breakpoint_event_location_empty_p, print_breakpoint_location)
5776 (print_one_breakpoint_location, create_thread_event_breakpoint)
5777 (init_breakpoint_sal, create_breakpoint)
5778 (print_recreate_ranged_breakpoint, break_range_command)
5779 (init_ada_exception_breakpoint, say_where): Update.
5780 (base_breakpoint_dtor): Don't call delete_event_location.
5781 (bkpt_print_recreate, tracepoint_print_recreate)
5782 (dprintf_print_recreate, update_static_tracepoint)
5783 (breakpoint_re_set_default): Update.
5785 2017-04-12 Tom Tromey <tom@tromey.com>
5787 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
5788 type of "to_do". Update.
5789 (compute_stack_depth): Use std::vector.
5791 2017-04-12 Tom Tromey <tom@tromey.com>
5793 * printcmd.c (find_instruction_backward): Use std::vector.
5795 2017-04-12 Tom Tromey <tom@tromey.com>
5797 * symfile.c (objfilep): Remove typedef.
5798 (reread_symbols): Use a std::vector.
5800 2017-04-12 Tom Tromey <tom@tromey.com>
5802 * mi/mi-main.c (exec_direction_forward): Remove.
5803 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
5804 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5806 * guile/guile.c (guile_repl_command, guile_command)
5807 (gdbscm_execute_gdb_command): Use scoped_restore.
5808 * go-exp.y (go_parse): Use scoped_restore.
5809 * d-exp.y (d_parse): Use scoped_restore.
5810 * cli/cli-decode.c (cmd_func): Use scoped_restore.
5811 * c-exp.y (c_parse): Use scoped_restore.
5813 2017-04-12 Tom Tromey <tom@tromey.com>
5815 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
5816 (mi_parse): Update return type.
5817 (mi_parse_free): Remove.
5818 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
5819 (mi_parse::~mi_parse): Rename from mi_parse_free.
5820 (mi_parse_cleanup): Remove.
5821 (mi_parse): Return a unique_ptr. Use new.
5822 * mi/mi-main.c (mi_execute_command): Update.
5824 2017-04-12 Tom Tromey <tom@tromey.com>
5826 * location.c (explicit_location_lex_one): Return a
5828 (string_to_explicit_location): Update. Remove cleanups.
5830 2017-04-12 Tom Tromey <tom@tromey.com>
5832 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
5833 (compare_value_and_voffset): Change type. Update.
5834 (compute_vtable_size): Change type of "offset_vec".
5835 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
5836 (gnuv3_get_typeid): Remove extraneous declaration.
5838 2017-04-12 Tom Tromey <tom@tromey.com>
5840 * charset.h (wchar_iterator): Fix comment.
5842 2017-04-12 Tom Tromey <tom@tromey.com>
5844 * charset.c (iconv_wrapper): New class.
5845 (cleanup_iconv): Remove.
5846 (convert_between_encodings): Use it.
5848 2017-04-12 Tom Tromey <tom@tromey.com>
5850 * symfile.h (increment_reading_symtab): Update type.
5851 * symfile.c (decrement_reading_symtab): Remove.
5852 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
5853 * psymtab.c (psymtab_to_symtab): Update.
5854 * dwarf2read.c (dw2_instantiate_symtab): Update.
5856 2017-04-12 Tom Tromey <tom@tromey.com>
5858 * jit.c (struct jit_reader): Declare separately. Add constructor
5859 and destructor. Change type of "handle".
5860 (loaded_jit_reader): Define separately.
5861 (jit_reader_load): Update. New "new".
5862 (jit_reader_unload_command): Use "delete".
5863 * gdb-dlfcn.h (struct dlclose_deleter): New.
5864 (gdb_dlhandle_up): New typedef.
5865 (gdb_dlopen, gdb_dlsym): Update types.
5866 (gdb_dlclose): Remove.
5867 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
5868 (gdb_dlsym): Change type of "handle".
5869 (make_cleanup_dlclose): Remove.
5870 (dlclose_deleter::operator()): Rename from gdb_dlclose.
5871 * compile/compile-c-support.c (load_libcc): Update.
5873 2017-04-12 Tom Tromey <tom@tromey.com>
5875 * symtab.h (find_pcs_for_symtab_line): Change return type.
5876 * symtab.c (find_pcs_for_symtab_line): Change return type.
5877 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
5878 type of "vec". Update.
5879 (ltpy_get_pcs_for_line): Update.
5880 * linespec.c (decode_digits_ordinary): Update.
5882 2017-04-12 Tom Tromey <tom@tromey.com>
5884 * tracepoint.c (actions_command): Update.
5885 * python/python.c (python_command, python_interactive_command):
5887 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5888 * guile/guile.c (guile_command): Update.
5889 * defs.h (read_command_lines, read_command_lines_1): Return
5891 (command_lines_deleter): New struct.
5892 (command_line_up): New typedef.
5893 * compile/compile.c (compile_code_command)
5894 (compile_print_command): Update.
5895 * cli/cli-script.h (get_command_line, copy_command_lines): Return
5897 (make_cleanup_free_command_lines): Remove.
5898 * cli/cli-script.c (get_command_line, read_command_lines_1)
5899 (copy_command_lines): Return command_line_up.
5900 (while_command, if_command, read_command_lines, define_command)
5901 (document_command): Update.
5902 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
5904 * breakpoint.h (breakpoint_set_commands): Change type of
5906 * breakpoint.c (breakpoint_set_commands): Change type of
5908 (do_map_commands_command, update_dprintf_command_list)
5909 (create_tracepoint_from_upload): Update.
5911 2017-04-12 Tom Tromey <tom@tromey.com>
5913 * tracepoint.c (scope_info): Update.
5914 * spu-tdep.c (spu_catch_start): Update.
5915 * python/python.c (gdbpy_decode_line): Update.
5916 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
5917 * python/py-breakpoint.c (bppy_init): Update.
5918 * probe.c (parse_probes): Update.
5919 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
5920 * location.h (event_location_deleter): New struct.
5921 (event_location_up): New typedef.
5922 (new_linespec_location, new_address_location, new_probe_location)
5923 (new_explicit_location, copy_event_location)
5924 (string_to_event_location, string_to_event_location_basic)
5925 (string_to_explicit_location): Update return type.
5926 (make_cleanup_delete_event_location): Remove.
5927 * location.c (new_linespec_location, new_address_location)
5928 (new_probe_location, new_explicit_location, copy_event_location):
5929 Return event_location_up.
5930 (delete_event_location_cleanup)
5931 (make_cleanup_delete_event_location): Remove.
5932 (string_to_explicit_location, string_to_event_location_basic)
5933 (string_to_event_location): Return event_location_up.
5934 * linespec.c (canonicalize_linespec, event_location_to_sals)
5935 (decode_line_with_current_source)
5936 (decode_line_with_last_displayed, decode_objc): Update.
5937 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
5938 * completer.c (location_completer): Update.
5939 * cli/cli-cmds.c (edit_command, list_command): Update.
5940 * breakpoint.c (create_overlay_event_breakpoint)
5941 (create_longjmp_master_breakpoint)
5942 (create_std_terminate_master_breakpoint)
5943 (create_exception_master_breakpoint)
5944 (create_thread_event_breakpoint): Update.
5945 (init_breakpoint_sal): Update. Remove some dead code.
5946 (create_breakpoint_sal): Change type of "location". Update.
5947 (create_breakpoints_sal, create_breakpoint, break_command_1)
5948 (dprintf_command, break_range_command, until_break_command)
5949 (init_ada_exception_breakpoint)
5950 (strace_marker_create_sals_from_location)
5951 (update_static_tracepoint, trace_command, ftrace_command)
5952 (strace_command, create_tracepoint_from_upload): Update.
5953 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5954 * ax-gdb.c (agent_command_1): Update.
5956 2017-04-12 Pedro Alves <palves@redhat.com>
5958 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
5959 * configure.tgt: Handle i[34567]86-*-go32* and
5960 i[34567]86-*-msdosdjgpp*.
5961 * i386-tdep.c (i386_svr4_reg_to_regnum):
5963 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
5965 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
5966 * i386-go32-tdep.c: New file.
5967 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
5970 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
5972 * aix-thread.c (pd_status2str): Change return type to const char *.
5974 2017-04-12 Pedro Alves <palves@redhat.com>
5976 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
5977 calls to set_gdbarch_gnu_triplet_regexp.
5979 2017-04-12 Pedro Alves <palves@redhat.com>
5982 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
5984 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
5985 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
5986 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
5987 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
5988 * gdbarch.h, gdbarch.c: Regenerate.
5989 * aarch64-tdep.c (aarch64_gdbarch_init): Override
5990 gdbarch_wchar_bit and gdbarch_wchar_signed.
5991 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
5992 * arm-tdep.c (arm_gdbarch_init): Likewise.
5993 * avr-tdep.c (avr_gdbarch_init): Likewise.
5994 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
5995 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
5996 * i386-tdep.c (i386_go32_init_abi): Likewise.
5997 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5998 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5999 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6000 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6001 * sh-tdep.c (sh_gdbarch_init): Likewise.
6002 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6003 * sparc64-tdep.c (sparc64_init_abi): Likewise.
6004 * windows-tdep.c (windows_init_abi): Likewise.
6005 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6007 2017-04-12 Pedro Alves <palves@redhat.com>
6010 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
6011 cplus_primitive_type_char32_t>: New enum values.
6012 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
6013 and cplus_primitive_type_char32_t.
6014 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
6015 32, use the archtecture's built-in type for char16_t and char32_t,
6016 respectively. Otherwise, fallback to init_integer_type as before,
6017 but make the type unsigned, and issue a complaint.
6018 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
6020 2017-04-12 Alan Hayward <alan.hayward@arm.com>
6022 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
6023 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
6025 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6027 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
6030 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6032 * common/common-utils.c (free_vector_argv): New function.
6033 * common/common-utils.h: Include <vector>.
6034 (free_vector_argv): New prototype.
6035 * darwin-nat.c (darwin_create_inferior): Rewrite function
6036 prototype in order to constify "exec_file" and accept a
6037 "std::string" for "allargs".
6038 * fork-child.c: Include <vector>.
6039 (breakup_args): Rewrite function, using C++.
6040 (fork_inferior): Rewrite function header, constify "exec_file_arg"
6041 and accept "std::string" for "allargs". Update the code to
6042 calculate "argv" based on "allargs". Update calls to "exec_fun"
6044 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
6045 order to constify "exec_file" and accept a "std::string" for
6047 * go32-nat.c (go32_create_inferior): Likewise.
6048 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
6049 * infcmd.c (run_command_1): Constify "exec_file". Use
6050 "std::string" for inferior arguments.
6051 * inferior.h (fork_inferior): Update prototype.
6052 * linux-nat.c (linux_nat_create_inferior): Rewrite function
6053 prototype in order to constify "exec_file" and accept a
6054 "std::string" for "allargs".
6055 * nto-procfs.c (procfs_create_inferior): Likewise.
6056 * procfs.c (procfs_create_inferior): Likewise.
6057 * remote-sim.c (gdbsim_create_inferior): Likewise.
6058 * remote.c (extended_remote_run): Update code to accept
6059 "std::string" as argument.
6060 (extended_remote_create_inferior): Rewrite function prototype in
6061 order to constify "exec_file" and accept a "std::string" for
6063 * rs6000-nat.c (super_create_inferior): Likewise.
6064 (rs6000_create_inferior): Likewise.
6065 * target.h (struct target_ops) <to_create_inferior>: Likewise.
6066 * windows-nat.c (windows_create_inferior): Likewise.
6068 2017-04-11 Pedro Alves <palves@redhat.com>
6070 * thread.c: Fix whitespace throughout.
6072 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
6074 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
6076 2017-04-11 Alan Hayward <alan.hayward@arm.com>
6078 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
6080 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
6083 * osdata.c (info_osdata): Check if 'type' is an empty string
6086 2017-04-10 Pedro Alves <palves@redhat.com>
6088 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
6089 (ptid_to_global_thread_id, in_thread_list)
6090 (do_captured_list_thread_ids, set_resumed, set_running)
6091 (set_executing, set_stop_requested, finish_thread_state)
6092 (validate_registers_access, can_access_registers_ptid)
6093 (print_thread_info_1, switch_to_thread)
6094 (do_restore_current_thread_cleanup)
6095 (make_cleanup_restore_current_thread, thread_command)
6096 (thread_name_command): Use operator== instead of ptid_equal.
6098 2017-04-10 Pedro Alves <palves@redhat.com>
6100 * thread.c (struct current_thread_cleanup) <next>: Delete field.
6101 (current_thread_cleanup_chain): Delete.
6102 (restore_current_thread_cleanup_dtor)
6103 (make_cleanup_restore_current_thread): Remove references to
6104 current_thread_cleanup_chain.
6106 2017-04-10 Alan Hayward <alan.hayward@arm.com>
6108 * msp430-tdep.c (msp430_pseudo_register_read): Never return
6111 2017-04-10 Yao Qi <yao.qi@linaro.org>
6114 * gdbthread.h (thread_info::deletable): New method.
6115 (thread_info::incref): New method.
6116 (thread_info::decref): New method.
6117 (thread_info::refcount): Move it to private.
6118 * infrun.c (save_stop_context): Call inc_refcount.
6119 (release_stop_context_cleanup): Likewise.
6120 * thread.c (set_thread_exited): New function.
6121 (init_thread_list): Delete "tp" only it is deletable, otherwise
6122 call set_thread_exited.
6123 (delete_thread_1): Call set_thread_exited.
6124 (current_thread_cleanup) <inferior_pid>: Remove.
6125 <thread>: New field.
6126 (restore_current_thread_ptid_changed): Removed.
6127 (do_restore_current_thread_cleanup): Adjust.
6128 (restore_current_thread_cleanup_dtor): Don't call
6130 (set_thread_refcount): Use dec_refcount.
6131 (make_cleanup_restore_current_thread): Adjust.
6132 (thread_apply_all_command): Call inc_refcount.
6133 (_initialize_thread): Don't call
6134 observer_attach_thread_ptid_changed.
6136 2017-04-10 Yao Qi <yao.qi@linaro.org>
6138 * thread.c (delete_thread_1): Hoist code on marking thread as
6141 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6143 * windows-nat.c (windows_detach): Initialize ptid with
6146 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
6148 * unittests/ptid-selftests.c: Fix erroneous assert messages.
6150 2017-04-07 Alan Hayward <alan.hayward@arm.com>
6152 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
6153 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
6154 (bfin_pseudo_register_write): Likewise
6156 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
6158 * common/ptid.h (struct ptid): Change to...
6159 (class ptid_t): ... this.
6160 <ptid_t>: New constructors.
6161 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
6162 matches>: New methods.
6163 <make_null, make_minus_one>: New static methods.
6170 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
6171 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
6172 as references, move comment to class ptid_t.
6173 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
6174 ptid_t static methods.
6175 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
6176 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
6177 Take ptid arguments as references, implement using ptid_t methods.
6178 * unittests/ptid-selftests.c: New file.
6179 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6180 unittests/ptid-selftests.c.
6181 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
6183 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
6185 * python/python.c (python_run_simple_file): Cast mode literal to
6186 non-const char pointer as expected by PyFile_FromString.
6188 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
6190 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
6191 minus_one_ptid and null_ptid.
6193 2017-04-05 Pedro Alves <palves@redhat.com>
6195 * warning.m4 (build_warnings): Remove -Wno-write-strings.
6196 * configure: Regenerate.
6198 2017-04-05 Pedro Alves <palves@redhat.com>
6200 * ada-exp.y (yyerror): Constify.
6201 * ada-lang.c (bound_name, get_selections)
6202 (ada_variant_discrim_type)
6203 (ada_variant_discrim_name, ada_value_struct_elt)
6204 (ada_lookup_struct_elt_type, is_unchecked_variant)
6205 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
6206 (catch_ada_exception_command_split)
6207 (catch_ada_assert_command_split, catch_assert_command)
6208 (ada_op_name): Constify.
6209 * ada-lang.h (ada_yyerror, get_selections)
6210 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
6211 * arc-tdep.c (arc_print_frame_cache): Constify.
6212 * arm-tdep.c (arm_skip_stub): Constify.
6213 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
6214 (gen_aggregate_elt_ref): Constify.
6215 * bcache.c (print_bcache_statistics): Constify.
6216 * bcache.h (print_bcache_statistics): Constify.
6217 * break-catch-throw.c (catch_exception_command_1):
6218 * breakpoint.c (struct ep_type_description::description):
6220 (add_solib_catchpoint): Constify.
6221 (catch_fork_command_1): Add cast.
6222 (add_catch_command): Constify.
6223 * breakpoint.h (add_catch_command, add_solib_catchpoint):
6225 * bsd-uthread.c (bsd_uthread_state): Constify.
6226 * buildsym.c (patch_subfile_names): Constify.
6227 * buildsym.h (next_symbol_text_func, patch_subfile_names):
6229 * c-exp.y (yyerror): Constify.
6230 (token::oper): Constify.
6231 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
6232 * c-varobj.c (cplus_describe_child): Constify.
6233 * charset.c (find_charset_names): Add cast.
6234 (find_charset_names): Constify array and add const_cast.
6235 * cli/cli-cmds.c (complete_command, cd_command): Constify.
6236 (edit_command): Constify.
6237 * cli/cli-decode.c (lookup_cmd): Constify.
6238 * cli/cli-dump.c (dump_memory_command, dump_value_command):
6240 (struct dump_context): Constify.
6241 (add_dump_command, restore_command): Constify.
6242 * cli/cli-script.c (get_command_line): Constify.
6243 * cli/cli-script.h (get_command_line): Constify.
6244 * cli/cli-utils.c (check_for_argument): Constify.
6245 * cli/cli-utils.h (check_for_argument): Constify.
6246 * coff-pe-read.c (struct read_pe_section_data): Constify.
6247 * command.h (lookup_cmd): Constify.
6248 * common/print-utils.c (decimal2str): Constify.
6249 * completer.c (gdb_print_filename): Constify.
6250 * corefile.c (set_gnutarget): Constify.
6251 * cp-name-parser.y (yyerror): Constify.
6252 * cp-valprint.c (cp_print_class_member): Constify.
6253 * cris-tdep.c (cris_register_name, crisv32_register_name):
6255 * d-exp.y (yyerror): Constify.
6256 (struct token::oper): Constify.
6257 * d-lang.h (d_yyerror): Constify.
6258 * dbxread.c (struct header_file_location::name): Constify.
6259 (add_old_header_file, add_new_header_file, last_function_name)
6260 (dbx_next_symbol_text, add_bincl_to_list)
6261 (find_corresponding_bincl_psymtab, set_namestring)
6262 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
6263 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
6264 * defs.h (command_line_input, print_address_symbolic)
6265 (deprecated_readline_begin_hook): Constify.
6266 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
6268 * event-top.c (handle_line_of_input): Constify and add cast.
6269 * exceptions.c (catch_errors): Constify.
6270 * exceptions.h (catch_errors): Constify.
6271 * expprint.c (print_subexp_standard, op_string, op_name)
6272 (op_name_standard, dump_raw_expression, dump_raw_expression):
6273 * expression.h (op_name, op_string, dump_raw_expression):
6275 * f-exp.y (yyerror): Constify.
6276 (struct token::oper): Constify.
6277 (struct f77_boolean_val::name): Constify.
6278 * f-lang.c (f_word_break_characters): Constify.
6279 * f-lang.h (f_yyerror): Constify.
6280 * fork-child.c (fork_inferior): Add cast.
6281 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
6282 (new_variant): Constify.
6283 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
6284 * gdbarch.c: Regenerate.
6285 * gdbcore.h (set_gnutarget): Constify.
6286 * go-exp.y (yyerror): Constify.
6287 (token::oper): Constify.
6288 * go-lang.h (go_yyerror): Constify.
6289 * go32-nat.c (go32_sysinfo): Constify.
6290 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
6291 * guile/scm-cmd.c (cmdscm_function): Constify.
6292 * guile/scm-param.c (pascm_param_value): Constify.
6293 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
6294 (h8300sx_register_name): Constify.
6295 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
6297 * ia64-tdep.c (ia64_register_names): Constify.
6298 * infcmd.c (construct_inferior_arguments): Constify.
6299 (path_command, attach_post_wait): Constify.
6300 * language.c (show_range_command, show_case_command)
6301 (unk_lang_error): Constify.
6302 * language.h (language_defn::la_error)
6303 (language_defn::la_name_of_this): Constify.
6304 * linespec.c (decode_line_2): Constify.
6305 * linux-thread-db.c (thread_db_err_str): Constify.
6306 * lm32-tdep.c (lm32_register_name): Constify.
6307 * m2-exp.y (yyerror): Constify.
6308 * m2-lang.h (m2_yyerror): Constify.
6309 * m32r-tdep.c (m32r_register_names): Constify and make static.
6310 * m68hc11-tdep.c (m68hc11_register_names): Constify.
6311 * m88k-tdep.c (m88k_register_name): Constify.
6312 * macroexp.c (appendmem): Constify.
6313 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
6314 (upgrade_type, parse_external, parse_partial_symbols)
6315 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
6316 (new_symbol): Constify.
6317 * memattr.c (mem_info_command): Constify.
6318 * mep-tdep.c (register_name_from_keyword): Constify.
6319 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
6321 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
6322 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
6323 * mi/mi-main.c (captured_mi_execute_command): Constify and add
6325 (mi_execute_async_cli_command): Constify.
6326 * mips-tdep.c (mips_register_name): Constify.
6327 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
6328 (am33_register_name, am33_2_register_name)
6329 * moxie-tdep.c (moxie_register_names): Constify.
6330 * nat/linux-osdata.c (osdata_type): Constify fields.
6331 * nto-tdep.c (nto_parse_redirection): Constify.
6332 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
6333 (lookup_child_selector): Constify.
6334 (objc_methcall::name): Constify.
6335 * objc-lang.h (lookup_objc_class, lookup_child_selector)
6336 (lookup_struct_typedef): Constify.
6337 * objfiles.c (pc_in_section): Constify.
6338 * objfiles.h (pc_in_section): Constify.
6339 * p-exp.y (struct token::oper): Constify.
6340 (yyerror): Constify.
6341 * p-lang.h (pascal_yyerror): Constify.
6342 * parser-defs.h (op_name_standard): Constify.
6343 (op_print::string): Constify.
6344 (exp_descriptor::op_name): Constify.
6345 * printcmd.c (print_address_symbolic): Constify.
6346 * psymtab.c (print_partial_symbols): Constify.
6347 * python/py-breakpoint.c (stop_func): Constify.
6348 (bppy_get_expression): Constify.
6349 * python/py-cmd.c (cmdpy_completer::name): Constify.
6350 (cmdpy_function): Constify.
6351 * python/py-event.c (evpy_add_attribute)
6352 (gdbpy_initialize_event_generic): Constify.
6353 * python/py-event.h (evpy_add_attribute)
6354 (gdbpy_initialize_event_generic): Constify.
6355 * python/py-evts.c (add_new_registry): Constify.
6356 * python/py-finishbreakpoint.c (outofscope_func): Constify.
6357 * python/py-framefilter.c (get_py_iter_from_func): Constify.
6358 * python/py-inferior.c (get_buffer): Add cast.
6359 * python/py-param.c (parm_constant::name): Constify.
6360 * python/py-unwind.c (fprint_frame_id): Constify.
6361 * python/python.c (gdbpy_parameter_value): Constify.
6362 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
6363 * remote.c (memory_packet_config::name): Constify.
6364 (show_packet_config_cmd, remote_write_bytes)
6365 (remote_buffer_add_string):
6366 * reverse.c (exec_reverse_once): Constify.
6367 * rs6000-tdep.c (variant::name, variant::description): Constify.
6368 * rust-exp.y (rustyyerror): Constify.
6369 * rust-lang.c (rust_op_name): Constify.
6370 * rust-lang.h (rustyyerror): Constify.
6371 * serial.h (serial_ops::name): Constify.
6372 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
6373 (sh_sh3e_register_name, sh_sh2e_register_name)
6374 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
6375 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
6376 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
6377 (sh_sh4al_dsp_register_name): Constify.
6378 * sh64-tdep.c (sh64_register_name): Constify.
6379 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
6380 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
6381 * stabsread.c (patch_block_stabs, read_type_number)
6382 (ref_map::stabs, ref_add, process_reference)
6383 (symbol_reference_defined, define_symbol, define_symbol)
6384 (error_type, read_type, read_member_functions, read_cpp_abbrev)
6385 (read_one_struct_field, read_struct_fields, read_baseclasses)
6386 (read_tilde_fields, read_struct_type, read_array_type)
6387 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
6388 (read_huge_number, read_range_type, read_args, common_block_start)
6389 (find_name_end): Constify.
6390 * stabsread.h (common_block_start, define_symbol)
6391 (process_one_symbol, symbol_reference_defined, ref_add):
6392 * symfile.c (get_section_index, add_symbol_file_command):
6393 * symfile.h (get_section_index): Constify.
6394 * target-descriptions.c (tdesc_type::name): Constify.
6395 (tdesc_free_type): Add cast.
6396 * target.c (find_default_run_target):
6397 (add_deprecated_target_alias, find_default_run_target)
6398 (target_announce_detach): Constify.
6399 (do_option): Constify.
6400 * target.h (add_deprecated_target_alias): Constify.
6401 * thread.c (print_thread_info_1): Constify.
6402 * top.c (deprecated_readline_begin_hook, command_line_input):
6404 (init_main): Add casts.
6405 * top.h (handle_line_of_input): Constify.
6406 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
6407 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
6408 (tfind_command): Rename to ...
6409 (tfind_command_1): ... this and constify.
6410 (tfind_command): New function.
6411 (tfind_end_command, tfind_start_command): Adjust.
6412 (encode_source_string): Constify.
6413 * tracepoint.h (encode_source_string): Constify.
6414 * tui/tui-data.c (tui_partial_win_by_name): Constify.
6415 * tui/tui-data.h (tui_partial_win_by_name): Constify.
6416 * tui/tui-source.c (tui_set_source_content_nil): Constify.
6417 * tui/tui-source.h (tui_set_source_content_nil): Constify.
6418 * tui/tui-win.c (parse_scrolling_args): Constify.
6419 * tui/tui-windata.c (tui_erase_data_content): Constify.
6420 * tui/tui-windata.h (tui_erase_data_content): Constify.
6421 * tui/tui-winsource.c (tui_erase_source_content): Constify.
6422 * tui/tui.c (tui_enable): Add cast.
6423 * utils.c (defaulted_query): Constify.
6424 (init_page_info): Add cast.
6425 (puts_debug, subset_compare): Constify.
6426 * utils.h (subset_compare): Constify.
6427 * varobj.c (varobj_format_string): Constify.
6428 * varobj.h (varobj_format_string): Constify.
6429 * vax-tdep.c (vax_register_name): Constify.
6430 * windows-nat.c (windows_detach): Constify.
6431 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
6432 * xml-support.c (gdb_xml_end_element): Constify.
6433 * xml-tdesc.c (tdesc_start_reg): Constify.
6434 * xstormy16-tdep.c (xstormy16_register_name): Constify.
6435 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
6436 * xtensa-tdep.h (xtensa_register_t::name): Constify.
6438 2017-04-05 Pedro Alves <palves@redhat.com>
6440 * proc-api.c (struct trans): Constify.
6441 (procfs_note): Constify.
6442 * proc-events.c (struct trans, syscall_table):
6443 * proc-flags.c (struct trans): Constify.
6444 * proc-utils.h (procfs_note): Constify.
6445 * proc-why.c (struct trans): Constify.
6446 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
6447 (procfs_detach): Constify.
6448 * sol-thread.c (struct string_map): Constify.
6449 (td_err_string, td_state_string): Constify.
6451 2017-04-05 Pedro Alves <palves@redhat.com>
6453 * proc-api.c (procfs_filename): Don't initialize
6455 (prepare_to_trace): Assume procfs_filename is non-NULL.
6456 (_initialize_proc_api): Give procfs_filename a default value here.
6458 2017-04-05 Pedro Alves <palves@redhat.com>
6460 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
6461 'cond_string' parameter.
6462 (extract_exception_regexp): Constify 'string' parameter.
6463 (catch_exception_command_1): Constify.
6464 * breakpoint.c (init_catchpoint)
6465 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
6467 (ep_parse_optional_if_clause, catch_fork_command_1)
6468 (catch_exec_command_1): Constify.
6469 * breakpoint.h (init_catchpoint): Constify 'cond_string'
6471 (ep_parse_optional_if_clause): Constify.
6472 * cli/cli-utils.c (remove_trailing_whitespace)
6473 (check_for_argument): Constify.
6474 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
6476 (check_for_argument): Likewise.
6478 2017-04-05 Pedro Alves <palves@redhat.com>
6480 * event-top.c (command_line_handler): Add cast to execute_command
6482 * record-btrace.c (cmd_record_btrace_bts_start)
6483 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
6484 (cmd_record_btrace_start): Add cast to execute_command call.
6485 * record-full.c (record_full_goto_insn):
6486 * record.c (record_start, record_stop): Add cast to
6487 execute_command_to_string calls.
6488 (cmd_record_start): Add cast to execute_command calls.
6490 2017-04-05 Pedro Alves <palves@redhat.com>
6492 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
6493 static inline function.
6494 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
6495 array and use gdb_PyArg_ParseTupleAndKeywords.
6496 * python/py-cmd.c (cmdpy_init): Likewise.
6497 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
6498 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
6499 (infpy_search_memory): Likewise.
6500 * python/py-objfile.c (objfpy_add_separate_debug_file)
6501 (gdbpy_lookup_objfile): Likewise.
6502 * python/py-symbol.c (gdbpy_lookup_symbol)
6503 (gdbpy_lookup_global_symbol): Likewise.
6504 * python/py-type.c (gdbpy_lookup_type): Likewise.
6505 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
6506 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
6509 2017-04-05 Pedro Alves <palves@redhat.com>
6511 * python/python-internal.h (gdb_PyGetSetDef): New type.
6512 * python/py-block.c (block_object_getset)
6513 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
6514 * python/py-event.c (event_object_getset)
6515 (finish_breakpoint_object_getset): Likewise.
6516 * python/py-inferior.c (inferior_object_getset): Likewise.
6517 * python/py-infthread.c (thread_object_getset): Likewise.
6518 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
6519 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
6520 * python/py-objfile.c (objfile_getset): Likewise.
6521 * python/py-progspace.c (pspace_getset): Likewise.
6522 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
6524 * python/py-record.c (recpy_record_getset): Likewise.
6525 * python/py-symbol.c (symbol_object_getset): Likewise.
6526 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
6528 * python/py-type.c (type_object_getset, field_object_getset):
6530 * python/py-value.c (value_object_getset): Likewise.
6532 2017-04-05 Pedro Alves <palves@redhat.com>
6534 * python/python-internal.h (gdb_PyObject_CallMethod)
6535 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
6537 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
6538 (PySys_GetObject, PySys_SetPath): New macros.
6540 2017-04-05 Pedro Alves <palves@redhat.com>
6542 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
6543 info_osdata_command.
6544 * osdata.c (info_osdata_command): Rename to ...
6545 (info_osdata): ... this. Constify 'type' parameter, and remove
6546 the 'from_tty' parameter. Accept NULL TYPE.
6547 (info_osdata_command): New function.
6548 * osdata.h (info_osdata_command): Remove declaration.
6549 (info_osdata): New declaration.
6551 2017-04-05 Pedro Alves <palves@redhat.com>
6553 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
6554 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
6555 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
6557 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
6558 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
6559 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
6561 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
6562 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
6563 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
6564 (mi_cmd_file_list_exec_source_files)
6565 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
6566 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6567 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
6569 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
6570 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
6571 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
6572 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
6573 (mi_cmd_stack_info_frame): Constify 'command' parameter.
6574 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
6575 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
6576 'command' parameter.
6577 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
6578 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
6579 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
6580 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
6581 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
6582 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
6583 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
6584 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
6585 (mi_cmd_var_set_update_range): Constify 'command' parameter.
6586 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
6587 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
6589 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
6590 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
6591 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
6592 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
6593 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
6594 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
6595 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
6596 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
6597 (mi_cmd_data_list_changed_registers)
6598 (mi_cmd_data_write_register_values)
6599 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
6600 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
6601 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
6602 (mi_cmd_list_features, mi_cmd_list_target_features)
6603 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
6604 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
6605 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
6606 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
6607 (mi_cmd_trace_frame_collected): Constify 'command'
6609 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
6610 'command' parameter.
6612 2017-04-05 Pedro Alves <palves@redhat.com>
6614 * ada-lang.c (ada_completer_word_break_characters): Now a const
6616 (ada_get_gdb_completer_word_break_characters): Constify.
6617 * completer.c (gdb_completer_command_word_break_characters)
6618 (gdb_completer_file_name_break_characters)
6619 (gdb_completer_quote_characters): Now const arrays.
6620 (get_gdb_completer_quote_characters): Constify.
6621 (set_rl_completer_word_break_characters): New function.
6622 (set_gdb_completion_word_break_characters)
6623 (complete_line_internal): Use it.
6624 * completer.h (get_gdb_completer_quote_characters): Constify.
6625 (set_rl_completer_word_break_characters): Declare.
6626 * f-lang.c (f_word_break_characters): Constify.
6627 * language.c (default_word_break_characters): Constify.
6628 * language.h (language_defn::la_word_break_characters): Constify.
6629 (default_word_break_characters): Constify.
6630 * top.c (init_main): Use set_rl_completer_word_break_characters.
6632 2017-04-05 Pedro Alves <palves@redhat.com>
6634 * aix-thread.c (aix_thread_pid_to_str)
6635 (aix_thread_extra_thread_info): Constify.
6636 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
6637 * bsd-uthread.c (bsd_uthread_extra_thread_info)
6638 (bsd_uthread_pid_to_str): Constify.
6639 * corelow.c (core_pid_to_str): Constify.
6640 * darwin-nat.c (darwin_pid_to_str): Constify.
6641 * fbsd-nat.c (fbsd_pid_to_str): Constify.
6642 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
6644 * gnu-nat.c (gnu_pid_to_str): Constify.
6645 * go32-nat.c (go32_pid_to_str): Constify.
6646 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
6647 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
6648 * inferior.c (inferior_pid_to_str): Constify.
6649 * linux-nat.c (linux_nat_pid_to_str): Constify.
6650 * linux-tdep.c (linux_core_pid_to_str): Constify.
6651 * linux-thread-db.c (thread_db_pid_to_str)
6652 (thread_db_extra_thread_info): Constify.
6653 * nto-tdep.c (nto_extra_thread_info): Constify.
6654 * nto-tdep.h (nto_extra_thread_info): Constify.
6655 * obsd-nat.c (obsd_pid_to_str): Constify.
6656 * procfs.c (procfs_pid_to_str): Constify.
6657 * ravenscar-thread.c (ravenscar_extra_thread_info)
6658 (ravenscar_pid_to_str): Constify.
6659 * remote-sim.c (gdbsim_pid_to_str): Constify.
6660 * remote.c (remote_threads_extra_info, remote_pid_to_str):
6662 * sol-thread.c (solaris_pid_to_str): Constify.
6663 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
6664 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
6665 * target.c (default_pid_to_str, target_pid_to_str)
6666 (normal_pid_to_str, default_pid_to_str): Constify.
6667 * target.h (target_ops::to_pid_to_str)
6668 (target_ops::to_extra_thread_info): Constify.
6669 (target_pid_to_str, normal_pid_to_str): Constify.
6670 * windows-nat.c (windows_pid_to_str): Constify.
6671 * gdbarch.sh (core_pid_to_str): Constify.
6672 * target-delegates.c: Regenerate.
6673 * gdbarch.h, gdbarch.c: Regenerate.
6675 2017-04-05 Pedro Alves <palves@redhat.com>
6677 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
6678 the memory of the temporary warning_pre_print override.
6679 * utils.c (warning_pre_print): Constify.
6680 * utils.h (warning_pre_print): Constify.
6682 2017-04-05 Pedro Alves <palves@redhat.com>
6684 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
6685 (shell_command): New function.
6686 (make_command): Use std::string.
6687 (init_cli_cmds): Register shell_command instead of shell_escape.
6689 2017-04-05 Pedro Alves <palves@redhat.com>
6691 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
6692 * tracepoint.c (default_collect): Don't initialize.
6694 2017-04-05 Pedro Alves <palves@redhat.com>
6696 * macroexp.c (macro_buffer::shared): Now a bool.
6697 (init_buffer): Update.
6698 (init_shared_buffer): Constify 'addr' parameter.
6699 (substitute_args, expand, macro_expand, macro_expand_next): Remove
6702 2017-04-05 Pedro Alves <palves@redhat.com>
6704 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
6705 * disasm.c (set_disassembler_options): Constify local.
6706 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
6708 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
6711 * tracefile.c (tsave_command): Fix argument parsing for '-r'
6714 2017-04-05 Yao Qi <yao.qi@linaro.org>
6716 * frame.c (frame_unwind_register_unsigned): Call
6717 frame_unwind_register_value.
6719 2017-04-05 Yao Qi <yao.qi@linaro.org>
6721 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
6722 Use gdb_test_multiple, and don't match anchor.
6724 2017-04-05 Pedro Alves <palves@redhat.com>
6726 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
6727 (Write After Approval): Remove Simon Marchi.
6729 2017-04-05 Pedro Alves <palves@redhat.com>
6731 * common/gdb_optional.h (optional::optional): Make constexpr and
6734 2017-04-04 John Baldwin <jhb@FreeBSD.org>
6736 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6737 (amd64fbsd_jmp_buf_reg_offset): Remove.
6738 (amd64fbsd_supply_uthread): Remove function.
6739 (amd64fbsd_collect_uthread): Remove function.
6740 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
6741 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
6742 (x86_64-*-freebsd*): Remove bsd-uthread.o.
6743 (fbsd-nat.c): Update comment.
6744 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6745 (i386fbsd_jmp_buf_reg_offset): Remove.
6746 (i386fbsd_supply_uthread): Remove function.
6747 (i386fbsd_collect_uthread): Remove function.
6748 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
6750 2017-04-04 John Baldwin <jhb@FreeBSD.org>
6752 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
6753 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
6754 * NEWS: Mention that support for FreeBSD/alpha was removed.
6755 * alpha-fbsd-tdep.c: Delete file.
6756 * config/alpha/fbsd.mh: Delete file.
6757 * configure.host: Delete alpha*-*-freebsd* and
6758 alpha*-*-kfreebsd*-gnu.
6759 * configure.tgt: Delete alpha*-*-freebsd* and
6760 alpha*-*-kfreebsd*-gnu.
6762 2017-04-04 John Baldwin <jhb@FreeBSD.org>
6764 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
6765 amd64bsd_store_inferior_registers): Use ptid from regcache.
6767 2017-04-04 Pedro Alves <palves@redhat.com>
6769 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
6770 data fields, make them private and add "m_" prefixes.
6771 (lnp_state_machine::lnp_state_machine): New ctor.
6772 (record_line, check_line_address, handle_set_discriminator)
6773 (handle_set_address, handle_advance_pc, handle_special_opcode)
6774 (handle_advance_line, handle_set_file, handle_negate_stmt)
6775 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
6776 (end_sequence, advance_line): New methods.
6777 (m_gdbarch, m_record_lines_p): New fields.
6778 (lnp_reader_state): Delete.
6779 (dwarf_record_line): Rename to ...
6780 (lnp_state_machine::record_line): ... adjust.
6781 (init_lnp_state_machine): Delete.
6782 (lnp_state_machine::lnp_state_machine): New.
6783 (check_line_address): Rename to ...
6784 (lnp_state_machine::check_line_address): This.
6785 (dwarf_decode_lines_1): Remove reference to "reader_state".
6786 Adjust lnp_state_machine having a non-default ctor. Use bool.
6787 State machine internal state manipulation moved to
6788 lnp_state_machine methods.
6790 2017-04-04 Pedro Alves <palves@redhat.com>
6792 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6793 unittests/offset-type-selftests.c.
6794 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
6795 * common/offset-type.h: New file.
6796 * common/preprocessor.h: New file.
6797 * common/traits.h: New file.
6798 * common/valid-expr.h: New file.
6799 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
6800 sect_offset and cu_offset strong typedefs throughout.
6801 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
6802 typedefs throughout.
6803 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
6804 sect_offset and cu_offset strong typedefs throughout.
6805 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
6806 typedefs throughout.
6807 * gdbtypes.h: Include "common/offset-type.h".
6808 (cu_offset): Now an offset type (strong typedef) instead of a
6810 (sect_offset): Likewise.
6811 (union call_site_parameter_u): Rename "param_offset" field to
6813 * unittests/offset-type-selftests.c: New file.
6815 2017-04-04 Pedro Alves <palves@redhat.com>
6817 * common/underlying.h: New file.
6818 * dwarf2read.c: Include "common/gdb_optional.h" and
6819 "common/underlying.h".
6820 (dir_index, file_name_index): New types.
6821 (file_entry): Use them.
6822 (file_entry::include): Use to_underlying.
6823 (line_header::add_file_name): Use dir_index.
6824 (read_formatted_entries): Use gdb::optional. Read form before
6825 writting to file_entry.
6826 (dwarf_decode_line_header): Use dir_index.
6827 (lnp_state_machine::current_file): Use to_underlying.
6828 (lnp_state_machine::file): Change type to file_name_index.
6829 (dwarf_record_line): Use to_underlying.
6830 (init_lnp_state_machine): Use file_name_index.
6831 (dwarf_decode_lines_1): Use dir_index and file_name_index.
6833 2017-04-04 Pedro Alves <palves@redhat.com>
6835 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
6836 operator bool, has_value and get methods.
6838 2017-04-04 Pedro Alves <palves@redhat.com>
6840 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
6842 (line_header): Initialize all data fields. Change type of
6843 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
6844 Change type of include_dirs to std::vector<const char *>. Remove
6845 num_include_dirs, include_dirs_size. Change type of file_names to
6846 std::vector<file_entry>. Remove num_file_names, file_names_size.
6847 (line_header::line_header): New.
6848 (line_header::add_include_dir, line_header::add_file_name): New
6850 (line_header::include_dir_at): Remove NULL check.
6851 (line_header::file_name_at): Add const overload.
6852 (line_header_up): New unique_ptr typedef.
6853 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
6854 std::vector. Remove free_line_header call.
6855 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
6856 free_line_header call.
6857 (free_cu_line_header): Delete.
6858 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
6859 (setup_type_unit_groups): Use line_header_up instead of cleanups.
6860 Adjust to use std::vector.
6861 (free_line_header): Delete.
6862 (free_line_header_voidp): Use delete.
6863 (add_include_dir): Replace with ...
6864 (line_header::add_include_dir): ... this method. Use std::vector.
6865 (add_file_name): Replace with ...
6866 (line_header::add_file_name): ... this method. Use std::vector.
6867 (add_include_dir_stub): Delete.
6868 (read_formatted_entries): Remove memset.
6869 (dwarf_decode_line_header): Return a line_header_up instead of a
6870 raw pointer. Remove cleanup handling. Pass lambdas to
6871 read_formatted_entries. Adjust to use line_header methods.
6872 (dwarf_decode_lines_1): Adjust to use line_header methods.
6873 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
6876 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
6878 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
6879 instead of struct ptid.
6881 2017-05-04 Alan Hayward <alan.hayward@arm.com>
6883 * frame.c (get_frame_register_bytes): Unwind using value.
6884 (put_frame_register_bytes): Likewise.
6886 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
6888 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
6891 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
6893 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
6895 2017-03-29 Yao Qi <yao.qi@linaro.org>
6897 * gdbthread.h (struct thread_info): Declare constructor and
6898 destructor. Add some in-class member initializers.
6899 * thread.c (free_thread): Remove.
6900 (init_thread_list): Call delete instead of free_thread.
6901 (new_thread): Call thread_info constructor.
6902 (thread_info::thread_info): New function.
6903 (thread_info::~thread_info): New function.
6904 (delete_thread_1): Call delete instead of free_thread.
6905 (make_cleanup_restore_current_thread): Move tp and frame to
6908 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6910 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
6911 (arc_skip_prologue): Likewise.
6912 (arc_make_frame_cache): Likewise.
6913 (arc_pv_get_operand): New function.
6914 (arc_is_in_prologue): Likewise.
6915 (arc_analyze_prologue): Likewise.
6916 (arc_print_frame_cache): Likewise.
6917 (MAX_PROLOGUE_LENGTH): New constant.
6919 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6921 * configure.tgt: Add arc-insn.o.
6922 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
6923 (dump_arc_instruction_command): New function.
6924 (arc_fprintf_disasm): Likewise.
6925 (arc_disassemble_info): Likewise.
6926 (arc_insn_get_operand_value): Likewise.
6927 (arc_insn_get_operand_value_signed): Likewise.
6928 (arc_insn_get_memory_base_reg): Likewise.
6929 (arc_insn_get_memory_offset): Likewise.
6930 (arc_insn_get_branch_target): Likewise.
6931 (arc_insn_dump): Likewise.
6932 (arc_insn_get_linear_next_pc): Likewise.
6933 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
6934 (arc_disassemble_info): Likewise.
6935 (arc_insn_get_branch_target): Likewise.
6936 (arc_insn_get_linear_next_pc): Likewise.
6937 * NEWS: Mention new "maint print arc arc-instruction".
6939 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6941 * arc-tdep (maintenance_print_arc_list): New variable.
6942 (maintenance_print_arc_command): New function.
6944 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6946 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
6947 Add "limm" and "reserved".
6948 (arc_cannot_fetch_register, arc_cannot_store_register): Add
6949 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
6950 * arc-tdep.h (arc_regnum): Likewise.
6952 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6954 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6955 for THREADPTR register.
6956 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
6958 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
6959 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
6960 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
6962 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6964 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
6965 registers above gdbarch_num_regs (gdbarch) as privileged in
6968 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6970 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6971 for a single specified register or for all registers in
6972 a0_base..a0_base + C0_NREGS range.
6973 (supply_gregset_reg): Call regcache_raw_supply for a single
6974 specified register or for all registers in a0_base..a0_base +
6977 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6979 * arch/xtensa.h (C0_NREGS): Add definition.
6980 * xtensa-tdep.c (C0_NREGS): Remove definition.
6982 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6984 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
6985 Drop xtensa_default_isa initialization.
6986 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
6988 2017-03-27 Pedro Alves <palves@redhat.com>
6990 * dwarf2read.c (file_entry) <dir_index>: Add comment.
6991 (file_entry::include_dir): New method.
6992 (line_header::include_dir_at, line_header::file_name_at): New
6994 (setup_type_unit_groups, setup_type_unit_groups)
6995 (psymtab_include_file_name): Simplify using the new methods.
6996 (lnp_state_machine) <the_line_header>: New field.
6997 <file>: Add comment.
6998 (lnp_state_machine::current_file): New method.
6999 (dwarf_record_line): Simplify using the new methods.
7000 (init_lnp_state_machine): Initialize the "the_line_header" field.
7001 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
7002 Simplify using the new methods.
7004 2017-03-27 Pedro Alves <palves@redhat.com>
7006 * cp-name-parser.y (make_empty): Delete.
7007 (demangler_special, nested_name, ptr_operator, array_indicator)
7008 (direct_declarator, declarator_1): Use fill_comp instead of
7011 2017-03-27 Pedro Alves <palves@redhat.com>
7013 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
7014 to ATTRIBUTE_PRINTF.
7015 * solib-target.c (library_list_start_list): Print "string" not
7017 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
7020 2017-03-27 Pedro Alves <palves@redhat.com>
7022 * dwarf2read.c (struct file_and_directory): New.
7023 (dwarf2_get_dwz_file): Adjust to use std::string.
7024 (dw2_get_file_names_reader): Adjust to use file_and_directory.
7025 (find_file_and_directory): Adjust to return a file_and_directory
7027 (read_file_scope): Adjust to use file_and_directory. Remove
7028 make_cleanup/do_cleanups calls.
7029 (open_and_init_dwp_file): Adjust to use std::string. Remove
7030 make_cleanup/do_cleanups calls.
7031 * python/python.c (do_start_initialization): Adjust to ldirname
7032 returning a std::string.
7033 * utils.c (ldirname): Now returns a std::string.
7034 * utils.h (ldirname): Change return type to std::string.
7035 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
7036 returning a std::string.
7037 * xml-tdesc.c (file_read_description_xml): Likewise.
7039 2017-03-24 Alan Hayward <alan.hayward@arm.com>
7041 * regcache.c (regcache_debug_print_register): New function.
7042 * regcache.h (regcache_debug_print_register): New declaration.
7043 * target.c (debug_print_register): Remove.
7044 (target_fetch_registers): Call regcache_debug_print_register.
7045 (target_store_registers): Likewise.
7047 2017-03-24 Pádraig Brady <pbrady@fb.com>
7049 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
7050 reference beyond the 'lh->include_dirs' array before accessing to
7052 (psymtab_include_file_name): Likewise.
7053 (dwarf_decode_lines_1): Likewise.
7054 (dwarf_decode_lines): Likewise.
7055 (file_file_name): Likewise.
7057 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
7059 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
7061 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
7062 ps_lsetfpregs): Likewise.
7063 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
7064 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
7065 ps_lsetfpregs): Likewise.
7066 * target.c (target_fetch_registers, target_store_registers):
7069 2017-03-23 Alan Hayward <alan.hayward@arm.com>
7071 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
7073 2017-03-23 Yao Qi <yao.qi@linaro.org>
7075 * aarch64-tdep.c (aarch64_process_record_test): Declare.
7076 (_initialize_aarch64_tdep): Register it.
7077 (aarch64_record_load_store): Handle PRFM instruction.
7078 (aarch64_process_record_test): New function.
7080 2017-03-23 Yao Qi <yao.qi@linaro.org>
7082 * aarch64-tdep.c (aarch64_record_load_store): Fix code
7085 2017-03-23 Yao Qi <yao.qi@linaro.org>
7087 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
7089 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7091 python/python.c (do_start_initialization): Fix memory leak.
7093 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7095 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
7096 using get_ptrace_pid.
7097 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
7099 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
7100 inferior_ptid instead of pid.
7102 2017-03-22 Yao Qi <yao.qi@linaro.org>
7104 * aarch64-tdep.c: Wrap locally used classes in anonymous
7106 * arm-tdep.c: Likewise.
7107 * linespec.c: Likewise.
7108 * ui-out.c: Likewise.
7110 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
7113 * python/lib/gdb/printer/bound_registers.py: Import sys.
7115 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
7117 * windows-nat.c (do_windows_fetch_inferior_registers): Add
7118 windows_thread_info parameter and use it instead of
7120 (windows_fetch_inferior_registers): Don't set current_thread,
7121 pass the thread to do_windows_fetch_inferior_registers. Use
7122 ptid from regcache instead of inferior_ptid.
7123 (do_windows_store_inferior_registers): Add windows_thread_info
7124 parameter and use it instead of current_thread.
7125 (windows_store_inferior_registers): Don't set current_thread,
7126 pass the thread to do_windows_store_inferior_registers. Use
7127 ptid from regcache instead of inferior_ptid.
7129 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
7131 * ser-mingw.c (ser_windows_raw): Remove reference to
7132 struct serial::current_timeout.
7134 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
7137 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
7138 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
7139 (sparc64_fsr_type): Fix %fsr decoding.
7141 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
7143 * python/py-record-btrace.c (btpy_insn_data): Change return type
7146 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
7148 * spu-linux-nat.c (spu_fetch_inferior_registers,
7149 spu_store_inferior_registers): Use ptid from regcache, set and
7150 restore inferior_ptid.
7151 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
7154 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
7156 * i386-linux-nat.c (fetch_register, store_register,
7157 i386_linux_fetch_inferior_registers,
7158 i386_linux_store_inferior_registers): Use ptid from regcache.
7159 * ia64-linux-nat.c (ia64_linux_fetch_register,
7160 ia64_linux_store_register): Likewise.
7161 * inf-ptrace.c (inf_ptrace_fetch_register,
7162 inf_ptrace_store_register): Likewise.
7163 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
7164 m32r_linux_store_inferior_registers): Likewise.
7165 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
7166 m68kbsd_store_inferior_registers): Likewise.
7167 * m68k-linux-nat.c (fetch_register, store_register,
7168 m68k_linux_fetch_inferior_registers,
7169 m68k_linux_store_inferior_registers): Likewise.
7170 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
7171 m88kbsd_store_inferior_registers): Likewise.
7172 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
7173 mips_fbsd_store_inferior_registers): Likewise.
7174 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
7175 mips64_linux_regsets_store_registers): Likewise.
7176 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
7177 mipsnbsd_store_inferior_registers): Likewise.
7178 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
7179 mips64obsd_store_inferior_registers): Likewise.
7180 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
7182 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
7183 ppcfbsd_store_inferior_registers): Likewise.
7184 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
7185 ppc_linux_store_inferior_registers): Likewise.
7186 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
7187 ppcnbsd_store_inferior_registers): Likewise.
7188 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
7189 ppcobsd_store_registers): Likewise.
7190 * procfs.c (procfs_fetch_registers, procfs_store_registers):
7192 * ravenscar-thread.c (ravenscar_fetch_registers,
7193 ravenscar_store_registers, ravenscar_prepare_to_store):
7195 * record-btrace.c (record_btrace_fetch_registers,
7196 record_btrace_store_registers, record_btrace_prepare_to_store):
7198 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
7199 Lookup inferior using ptid from regcache, instead of
7201 * remote.c (remote_fetch_registers, remote_store_registers): Use
7203 * rs6000-nat.c (fetch_register, store_register): Likewise.
7204 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
7205 s390_linux_store_inferior_registers): Likewise.
7206 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
7207 shnbsd_store_inferior_registers): Likewise.
7208 * sol-thread.c (sol_thread_fetch_registers,
7209 sol_thread_store_registers): Likewise.
7210 * sparc-nat.c (sparc_fetch_inferior_registers,
7211 sparc_store_inferior_registers): Likewise.
7212 * tilegx-linux-nat.c (fetch_inferior_registers,
7213 store_inferior_registers): Likewise.
7214 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
7215 vaxbsd_store_inferior_registers): Likewise.
7216 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
7217 store_xtregs): Likewise.
7219 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7222 * NEWS: Mention support for rvalue references in GDB and python.
7223 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
7224 supports both lvalue and rvalue references.
7226 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7229 * gdbtypes.c (rank_one_type): Implement overloading
7230 resolution rules regarding rvalue references.
7232 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7235 * aarch64-tdep.c (aarch64_type_align)
7236 (aarch64_extract_return_value, aarch64_store_return_value): Change
7237 lvalue reference type checks to general reference type checks.
7238 * amd64-tdep.c (amd64_classify): Likewise.
7239 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
7241 * arm-tdep.c (arm_type_align, arm_extract_return_value)
7242 (arm_store_return_value): Likewise.
7243 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
7244 * c-typeprint.c (c_print_type): Likewise.
7245 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
7246 (cplus_number_of_children, cplus_describe_child): Likewise.
7247 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
7248 * completer.c (expression_completer): Likewise.
7249 * cp-support.c (make_symbol_overload_list_adl_namespace):
7251 * darwin-nat-info.c (info_mach_region_command): Likewise.
7252 * dwarf2loc.c (entry_data_value_coerce_ref)
7253 (value_of_dwarf_reg_entry): Likewise.
7254 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
7255 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
7257 * findvar.c (extract_typed_address, store_typed_address):
7259 * gdbtypes.c (rank_one_type): Likewise.
7260 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
7261 * infcall.c (value_arg_coerce): Likewise.
7262 * language.c (pointer_type): Likewise.
7263 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
7265 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
7266 * mn10300-tdep.c (mn10300_type_align): Likewise.
7267 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
7268 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
7269 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
7271 * printcmd.c (print_formatted, x_command): Likewise.
7272 * python/py-type.c (typy_get_composite, typy_template_argument):
7274 * python/py-value.c (valpy_referenced_value)
7275 (valpy_get_dynamic_type, value_has_field): Likewise.
7276 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
7277 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
7278 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
7279 * spu-tdep.c (spu_scalar_value_p): Likewise.
7280 * symtab.c (lookup_symbol_aux): Likewise.
7281 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
7282 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
7284 * valops.c (value_cast_pointers, value_cast)
7285 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
7286 (value_struct_elt, value_struct_elt_bitpos)
7287 (value_find_oload_method_list, find_overload_match)
7288 (value_rtti_indirect_type): Likewise.
7289 * valprint.c (val_print_scalar_type_p, generic_val_print):
7291 * value.c (value_actual_type, value_as_address, unpack_long)
7292 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
7293 (coerce_ref): Likewise.
7294 * varobj.c (varobj_get_value_type): Likewise.
7296 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7299 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
7301 * python/lib/gdb/command/explore.py: Support exploring values
7302 of rvalue reference types.
7303 * python/lib/gdb/types.py: Implement get_basic_type() for
7304 rvalue reference types.
7305 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
7307 * python/py-value.c (valpy_getitem): Add an rvalue reference
7309 (valpy_reference_value): Add new parameter "refcode".
7310 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
7311 New wrappers for valpy_reference_value().
7312 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
7313 (gdbpy_invoke_xmethod): Likewise.
7315 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7318 * dwarf2read.c (process_die, read_type_die_1): Handle the
7319 DW_TAG_rvalue_reference_type DIE.
7320 (read_tag_reference_type): Add new parameter "refcode".
7322 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7325 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
7326 (c_type_print_modifier, c_type_print_varspec_suffix)
7327 (c_type_print_base): Support printing rvalue reference types.
7328 * c-valprint.c (c_val_print, c_value_print): Support printing
7329 rvalue reference values.
7331 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7334 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
7336 * cp-support.c (replace_typedefs): Handle
7337 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
7338 * python/py-type.c (typy_lookup_type): Likewise.
7340 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7343 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
7344 * parse.c (insert_type): Change assert statement.
7345 (follow_types): Handle rvalue reference types.
7346 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
7349 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7352 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
7353 value_ref() interface.
7354 * c-valprint.c (c_value_print): Likewise.
7355 * infcall.c (value_arg_coerce): Likewise.
7356 * python/py-value.c (valpy_reference_value): Likewise.
7357 * valops.c (value_cast, value_reinterpret_cast)
7358 (value_dynamic_cast, typecmp): Likewise.
7359 (value_ref): Parameterize by kind of return value reference type.
7360 * value.h (value_ref): Add new parameter "refcode".
7362 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7365 * dwarf2read.c (read_tag_reference_type): Use
7366 lookup_lvalue_reference_type() instead of lookup_reference_type().
7367 * eval.c (evaluate_subexp_standard): Likewise.
7368 * f-exp.y: Likewise.
7369 * gdbtypes.c (make_reference_type, lookup_reference_type):
7370 Generalize with rvalue reference types.
7371 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
7372 convenience wrappers for lookup_reference_type().
7373 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
7374 reference kind parameter.
7375 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
7376 wrappers for lookup_reference_type().
7377 * guile/scm-type.c (gdbscm_type_reference): Use
7378 lookup_lvalue_reference_type() instead of lookup_reference_type().
7379 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
7380 * parse.c (follow_types): Likewise.
7381 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
7382 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
7384 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
7385 (gdbpy_invoke_xmethod): Likewise.
7386 * stabsread.c: Provide extra argument to make_reference_type()
7388 * valops.c (value_ref, value_rtti_indirect_type): Use
7389 lookup_lvalue_reference_type() instead of lookup_reference_type().
7391 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
7394 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
7395 (TYPE_IS_REFERENCE): New macro.
7396 (struct type): Add rvalue_reference_type field.
7397 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
7399 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
7401 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
7402 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
7403 New function definition.
7404 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
7405 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
7406 New function declaration.
7407 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
7408 * mi/mi-interp.h: New file.
7409 * solib.c (info_sharedlibrary_command): Replace for loop with
7411 * solib.h (update_solib_list): New function declaration.
7412 (so_list_head): Move macro.
7413 * solist.h (ALL_SO_LIBS): New macro.
7415 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
7417 * infcmd.c (post_create_inferior): Remove unused argument in
7419 * remote.c (remote_start_remote): Likewise.
7420 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
7421 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
7422 (enable_break): Likewise.
7423 * solib.c (update_solib_list): Remove unused target argument
7424 and its documentation.
7425 (solib_add): Remove unused target argument. Remove unused
7426 argument in call to update_solib_list.
7427 (info_sharedlibrary_command): Remove unused argument in call
7428 to update_solib_list.
7429 (sharedlibrary_command): Remove unused argument in call to
7431 (handle_solib_event): Likewise.
7432 (reload_shared_libraries): Likewise.
7433 * solib.h (solib_add): Remove unused target argument.
7435 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
7437 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
7438 (s390_displaced_step_fixup): Cover relative branches with the
7439 default fixup handling. This fixes lack of support for some
7440 relative branch instructions.
7442 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7444 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
7447 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7449 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
7450 i386_darwin_store_inferior_registers): Use ptid from regcache.
7452 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7454 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
7455 i386bsd_store_inferior_registers): Use ptid from regcache.
7457 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7459 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
7460 hppaobsd_store_registers): Use ptid from regcache.
7462 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7464 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
7465 hppanbsd_store_registers): Use ptid from regcache.
7467 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7469 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
7470 from regcache. Use get_ptrace_pid.
7472 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7474 * corelow.c (get_core_register_section): Use ptid from regcache,
7477 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7479 * bsd-uthread.c (bsd_uthread_fetch_registers,
7480 bsd_uthread_store_registers): Use ptid from regcache, set and
7481 restore inferior_ptid.
7483 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7485 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
7486 fetch_fp_regs, store_register, store_regs, store_fp_register,
7487 store_fp_regs): Use ptid from regcache.
7489 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7491 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
7492 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
7493 store_vfp_regs): Use ptid from regcache.
7495 2017-03-17 Pedro Alves <palves@redhat.com>
7498 * ser-base.c (ser_base_wait_for): Add comment.
7499 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
7501 * ser-unix.c (hardwire_raw): Remove reference to
7502 scb->current_timeout.
7503 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
7504 (hardwire_ops): Install ser_base_readchar instead of
7506 * serial.h (struct serial) <current_timeout, timeout_remaining>:
7509 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
7512 * python/lib/gdb/printer/bound_registers.py: Add support for
7515 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7517 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
7518 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
7519 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
7520 byte_offset to subobj_byte_offset. Fix the handling of
7521 DWARF_VALUE_STACK on big-endian targets when coming via an
7523 (dwarf2_evaluate_loc_desc): Adjust call to
7524 dwarf2_evaluate_loc_desc_full.
7525 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
7526 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
7528 2017-03-16 Yao Qi <yao.qi@linaro.org>
7530 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
7531 and REVSH instructions.
7533 2017-03-16 Yao Qi <yao.qi@linaro.org>
7535 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
7536 (arm_record_test): Declare.
7537 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
7538 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
7539 align with the manual.
7540 (thumb_record_misc): Adjust the code order to align with the
7542 (thumb2_record_decode_insn_handler): Fix instruction matching.
7543 (instruction_reader_thumb): New class.
7544 (arm_record_test): New function.
7546 2017-03-16 Yao Qi <yao.qi@linaro.org>
7548 * arm-tdep.c (abstract_memory_reader): New class.
7549 (instruction_reader): New class.
7550 (extract_arm_insn): Add argument 'reader'. Callers updated.
7551 (decode_insn): Likewise.
7553 2017-03-16 Doug Evans <dje@google.com>
7555 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
7556 member. Change type of TYPE member to SCM. All uses updated.
7557 (lsscm_make_lazy_string_smob): Add assert.
7558 (lsscm_make_lazy_string): Flag bad length values.
7559 (lsscm_elt_type): New function.
7560 (gdbscm_lazy_string_to_value): Rewrite to use
7561 lsscm_safe_lazy_string_to_value.
7562 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
7563 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
7564 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
7566 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
7567 * guile/scm-type.c (tyscm_scm_to_type): New function.
7569 2017-03-15 Doug Evans <dje@google.com>
7571 PR python/17728, python/18439, python/18779
7572 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
7573 member. Change type of TYPE member to PyObject *. All uses updated.
7574 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
7575 (gdbpy_create_lazy_string_object): Flag bad length values.
7576 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
7577 Handle typedefs in incoming type.
7578 (stpy_lazy_string_elt_type): New function.
7579 (gdbpy_extract_lazy_string): Call it.
7580 * python/py-value.c (valpy_lazy_string): Flag bad length values.
7581 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
7582 typedefs in incoming type.
7584 2017-03-16 Doug Evans <dje@google.com>
7586 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
7587 * guile/scm-type.c (tyscm_scm_to_type): New function.
7589 2017-03-16 Jiong Wang <jiong.wang@arm.com>
7591 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
7592 "ULONGEST" for "skip".
7594 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
7597 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
7598 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
7599 (inf_ptrace_peek_poke): ...here. New function. Now also loop
7600 over ptrace peek/poke until end of buffer or error.
7602 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
7604 * parse.c (length_of_subexp): Make static.
7605 * parser-defs.h (length_of_subexp): Remove.
7607 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
7609 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
7612 2017-03-14 Pedro Alves <palves@redhat.com>
7614 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
7615 (main): Use std::unique_ptr. Remove calls to
7616 cp_demangled_name_parse_free.
7618 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7620 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
7621 alphabsd_store_inferior_registers): Use regcache->ptid instead
7624 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7626 * aix-thread.c (aix_thread_fetch_registers,
7627 aix_thread_store_registers): Use regcache->ptid instead of
7630 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7632 * aarch64-linux-nat.c (fetch_gregs_from_thread,
7633 store_gregs_to_thread, fetch_fpregs_from_thread,
7634 store_fpregs_to_thread): Use regcache->ptid instead of
7637 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7639 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
7640 amd64_linux_fetch_inferior_registers): Use regcache->ptid
7641 instead of inferior_ptid.
7643 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7645 * target.c (target_fetch_registers, target_store_registers): Add
7648 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7650 * regcache.h (regcache_get_ptid): New function.
7651 * regcache.c (regcache_get_ptid): New function.
7653 2017-03-13 Mark Wielaard <mark@klomp.org>
7655 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
7657 2017-03-10 Keith Seitz <keiths@redhat.com>
7660 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
7662 2017-03-08 Pedro Alves <palves@redhat.com>
7665 * infrun.c (start_step_over, do_target_resume, resume)
7666 (restart_threads): Assert we're not resuming a thread that is
7667 meant to be stopped.
7668 (infrun_thread_stop_requested_callback): Delete.
7669 (infrun_thread_stop_requested): If the thread is internally
7670 stopped, queue a pending stop event and clear the thread's
7672 (handle_stop_requested): New function.
7673 (handle_syscall_event, handle_inferior_event_1): Use
7674 handle_stop_requested.
7675 (handle_stop_requested): New function.
7676 (handle_signal_stop): Set the thread's stop_signal here instead of
7678 (finish_step_over): Clear step over info unconditionally.
7679 (handle_signal_stop): If the user had interrupted the event
7680 thread, consider the stop a random signal.
7681 (handle_signal_stop) <signal arrived while stepping over
7682 breakpoint>: Don't restart threads here.
7683 (stop_waiting): Don't clear step-over info here.
7685 2017-03-08 Pedro Alves <palves@redhat.com>
7688 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
7689 goes to argument 2, not 1.
7691 2017-03-08 Pedro Alves <palves@redhat.com>
7694 * top.c (gdb_readline_wrapper): Avoid passing NULL to
7696 (command_line_input): Add comment.
7698 2017-03-08 Pedro Alves <palves@redhat.com>
7701 * tui/tui-file.c (tui_file::write): New.
7702 * tui/tui-file.h (tui_file): Override "write".
7703 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
7704 factored out from ...
7705 (tui_puts): ... here.
7706 (tui_putc): Use them.
7707 (tui_write): New function.
7708 * tui/tui-io.h (tui_write): Declare.
7710 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7712 * Makefile.in (SFILES): Replace "environ.c" with
7714 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
7715 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
7717 * common/environ.c: ... here.
7718 * environ.h: Moved to...
7719 * common/environ.h: ... here.
7721 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
7723 * gdbarch.sh (pstring_ptr): New static function.
7724 (gdbarch_disassembler_options): Use it.
7725 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
7726 not valid_disassembler_option->name.
7727 * gdbarch.c: Regenerate.
7729 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
7731 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
7733 2017-03-07 Pedro Alves <palves@redhat.com>
7735 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
7737 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
7739 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
7740 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
7741 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
7742 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
7744 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
7746 * xtensa-linux-nat.c (fetch_gregs): Remove const.
7748 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
7750 * remote.c (remote_add_target_side_commands): Use range-based
7753 2017-03-03 Yao Qi <yao.qi@linaro.org>
7756 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
7758 * valprint.c (common_val_print): Likewise.
7760 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
7762 * NEWS: Mention new set/show disassembler-options commands.
7763 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
7764 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
7765 (prospective_options): New static variable.
7766 (gdb_disassembler::gdb_disassembler): Initialize
7767 m_di.disassembler_options.
7768 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
7769 (get_disassembler_options): New function.
7770 (set_disassembler_options): Likewise.
7771 (set_disassembler_options_sfunc): Likewise.
7772 (show_disassembler_options_sfunc): Likewise.
7773 (disassembler_options_completer): Likewise.
7774 (_initialize_disasm): Likewise.
7775 * disasm.h (get_disassembler_options): New prototype.
7776 (set_disassembler_options): Likewise.
7777 * gdbarch.sh (gdbarch_disassembler_options): New variable.
7778 (gdbarch_verify_disassembler_options): Likewise.
7779 * gdbarch.c: Regenerate.
7780 * gdbarch.h: Likewise.
7781 * arm-tdep.c (num_disassembly_options): Delete.
7782 (set_disassembly_style): Likewise.
7783 (arm_disassembler_options): New static variable.
7784 (set_disassembly_style_sfunc): Convert short style name into long
7785 option name. Call set_disassembler_options.
7786 (show_disassembly_style_sfunc): New function.
7787 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
7788 set_gdbarch_verify_disassembler_options.
7789 (_initialize_arm_tdep): Delete regnames variable and update callers.
7790 (arm_disassembler_options): Initialize.
7791 (disasm_options): New variable.
7792 (num_disassembly_options): Rename from this...
7793 (num_disassembly_styles): ...to this. Compute by scanning through
7795 (valid_disassembly_styles): Initialize using disasm_options.
7796 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
7797 set_arm_regname_option.
7798 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
7799 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
7800 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
7801 set_gdbarch_verify_disassembler_options.
7802 * s390-tdep.c (s390_disassembler_options): New static variable.
7803 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
7804 set_gdbarch_verify_disassembler_options.
7806 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
7808 * remote.c (remote_add_target_side_condition): Remove "struct"
7809 keyword from range-based for loop.
7811 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
7813 * remote.c (remote_add_target_side_condition): Use range-based
7814 for loop. Update comment.
7816 2017-02-27 Yao Qi <yao.qi@linaro.org>
7818 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
7820 2017-02-26 Alan Hayward <alan.hayward@arm.com>
7822 * regcache.c (regcache_raw_update): New function.
7823 (regcache_raw_read): Move code to regcache_raw_update.
7824 * regcache.h (regcache_raw_update): New declaration.
7825 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
7827 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
7829 * dwarf2read.c (create_debug_type_hash_table): Initialize
7830 header.signature and header.type_offset_in_tu.
7832 2017-02-24 Pedro Alves <palves@redhat.com>
7834 * symtab.c (make_file_symbol_completion_list_1): Use
7835 add_symtab_completions.
7837 2017-02-24 Alan Hayward <alan.hayward@arm.com>
7839 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
7841 2017-02-24 Alan Hayward <alan.hayward@arm.com>
7843 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
7844 I386_MAX_REGISTER_SIZE.
7845 (i386_pseudo_register_write): Likewise.
7846 (i386_process_record): Likewise.
7847 * i387-tdep.c (i387_supply_xsave): Likewise.
7848 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
7849 (store_register): Likewise.
7851 2017-02-23 Pedro Alves <palves@redhat.com>
7853 * ada-lang.c: Include "common/function-view.h".
7854 (ada_iterate_over_symbols): Adjust to use function_view as
7856 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
7857 (ada_make_symbol_completion_list): Use a lambda.
7858 (ada_exc_search_name_matches): Delete.
7859 (name_matches_regex): New.
7860 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
7861 * compile/compile-c-support.c: Include "common/function-view.h".
7862 (print_one_macro): Change prototype to accept a ui_file pointer.
7863 (write_macro_definitions): Use a lambda.
7864 * dwarf2read.c: Include "common/function-view.h".
7865 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
7866 (dw2_expand_symtabs_matching): Adjust to use function_view as
7868 * language.h: Include "common/function-view.h".
7869 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
7870 function_view as callback type.
7871 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
7872 * linespec.c: Include "common/function-view.h".
7873 (collect_info::add_symbol): New method.
7874 (struct symbol_and_data_callback, iterate_inline_only, struct
7875 symbol_matcher_data, iterate_name_matcher): Delete.
7876 (iterate_over_all_matching_symtabs): Adjust to use function_view
7877 as callback type and lambdas.
7878 (iterate_over_file_blocks): Adjust to use function_view as
7880 (decode_compound_collector): Now a class with private fields.
7881 (decode_compound_collector::release_symbols): New method.
7882 (collect_one_symbol): Rename to...
7883 (decode_compound_collector::operator()): ... this and adjust.
7884 (lookup_prefix_sym): decode_compound_collector construction bits
7885 move to decode_compound_collector ctor. Pass the
7886 decode_compound_collector object directly as callback. Remove
7887 cleanups and use decode_compound_collector::release_symbols
7889 (symtab_collector): Now a class with private fields.
7890 (symtab_collector::release_symtabs): New method.
7891 (add_symtabs_to_list): Rename to...
7892 (symtab_collector::operator()): ... this and adjust.
7893 (collect_symtabs_from_filename): symtab_collector construction
7894 bits move to symtab_collector ctor. Pass the symtab_collector
7895 object directly as callback. Remove cleanups and use
7896 symtab_collector::release_symtabs instead.
7897 (collect_symbols): Delete.
7898 (add_matching_symbols_to_info): Use lambdas.
7899 * macrocmd.c (print_macro_callback): Delete.
7900 (info_macro_command): Use a lambda.
7901 (info_macros_command): Pass print_macro_definition as callable
7903 (print_one_macro): Remove 'ignore' parameter.
7904 (macro_list_command): Adjust.
7905 * macrotab.c (macro_for_each_data::fn): Now a function_view.
7906 (macro_for_each_data::user_data): Delete field.
7907 (foreach_macro): Adjust to call the function_view.
7908 (macro_for_each): Adjust to use function_view as callback type.
7909 (foreach_macro_in_scope): Adjust to call the function_view.
7910 (macro_for_each_in_scope): Adjust to use function_view as callback
7912 * macrotab.h: Include "common/function-view.h".
7913 (macro_callback_fn): Declare a prototype instead of a pointer.
7914 Remove "user_data" parameter.
7915 (macro_for_each, macro_for_each_in_scope): Adjust to use
7916 function_view as callback type.
7917 * psymtab.c (partial_map_expand_apply)
7918 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
7919 Adjust to use function_view as callback type and to return bool.
7920 (psym_expand_symtabs_matching): Adjust to use function_view as
7922 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
7923 to use function_view as callback type and to return bool.
7924 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
7926 * symfile.c (expand_symtabs_matching): Adjust to use function_view
7928 * symfile.h: Include "common/function-view.h".
7929 (expand_symtabs_file_matcher_ftype)
7930 (expand_symtabs_symbol_matcher_ftype)
7931 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
7933 (quick_symbol_functions::map_symtabs_matching_filename)
7934 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
7935 function_view as callback type and return bool.
7936 (expand_symtabs_matching): Adjust to use function_view as callback
7938 (maintenance_expand_name_matcher)
7939 (maintenance_expand_file_matcher): Delete.
7940 (maintenance_expand_symtabs): Use lambdas.
7941 * symtab.c (iterate_over_some_symtabs): Adjust to use
7942 function_view as callback types and return bool.
7943 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
7945 (lookup_symtab_callback): Delete.
7946 (lookup_symtab): Use a lambda.
7947 (iterate_over_symbols): Adjust to use function_view as callback
7949 (struct search_symbols_data, search_symbols_file_matches)
7950 (search_symbols_name_matches): Delete.
7951 (search_symbols): Use a pair of lambdas.
7952 (struct add_name_data, add_macro_name, symbol_completion_matcher)
7953 (symtab_expansion_callback): Delete.
7954 (default_make_symbol_completion_list_break_on_1): Use lambdas.
7955 * symtab.h: Include "common/function-view.h".
7956 (iterate_over_some_symtabs): Adjust to use function_view as
7957 callback type and return bool.
7958 (iterate_over_symtabs): Adjust to use function_view as callback
7960 (symbol_found_callback_ftype): Remove 'data' parameter and return
7962 (iterate_over_symbols): Adjust to use function_view as callback
7965 2017-02-23 Pedro Alves <palves@redhat.com>
7967 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
7968 (%.o) <unittests/%.c>: New pattern.
7969 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
7970 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
7971 * common/function-view.h: New file.
7972 * unittests/function-view-selftests.c: New file.
7973 * configure: Regenerate.
7975 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
7977 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
7979 * go32-nat.c (go32_thread_alive): Likewise.
7981 2017-02-23 Yao Qi <yao.qi@linaro.org>
7983 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
7986 2017-02-23 Yao Qi <yao.qi@linaro.org>
7988 * varobj.c (varobj_clear_saved_item): Use delete instead of
7990 (update_dynamic_varobj_children): Likewise.
7992 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7994 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
7996 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
7998 * common/enum-flags.h (enum_flags::enum_flags): Initialize
7999 m_enum_value to 0 in default constructor.
8001 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8003 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
8004 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
8005 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
8006 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
8007 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
8008 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
8009 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
8010 IS_STORE_CONDITIONAL_INSN.
8012 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8014 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
8016 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8018 * NEWS (Changes since GDB 7.12): Add DWARF-5.
8020 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8022 * dwarf2read.c (skip_one_die, read_attribute_value)
8023 (dwarf2_const_value_attr, dump_die_shallow)
8024 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8025 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
8027 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8029 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
8030 (dwarf_parse_macro_header): Accept DWARF version 5.
8031 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
8033 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8035 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
8037 * common/common-exceptions.h (enum errors): Likewise.
8038 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
8039 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
8040 (dwarf_expr_context::execute_stack_op): Likewise.
8041 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
8043 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
8044 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
8045 (show_entry_values_debug, call_site_to_target_addr)
8046 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
8047 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
8048 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
8049 (value_of_dwarf_block_entry, indirect_pieced_value)
8050 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
8051 (disassemble_dwarf_expression): Likewise.
8052 * dwarf2read.c (process_die, inherit_abstract_dies)
8053 (read_call_site_scope): Likewise.
8054 * gdbtypes.h (struct func_type, struct call_site_parameter)
8055 (struct call_site): Likewise.
8056 * stack.c (read_frame_arg): Likewise.
8057 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
8059 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8061 * defs.h (read_unsigned_leb128): New declaration.
8062 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
8063 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
8064 (dwarf2_find_location_expression): Call also
8065 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
8066 * dwarf2loc.h (dwarf2_version): New declaration.
8067 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
8069 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
8071 (struct dwop_section_names): Add loclists_dwo.
8072 (dwop_section_names): Add .debug_loclists.dwo.
8073 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
8074 (struct dwarf2_per_cu_data): Add dwarf_version.
8075 (struct dwo_sections): Add loclists.
8076 (struct attr_abbrev): Add implicit_const.
8077 (read_indirect_line_string): New declaration.
8078 (read_unsigned_leb128): Delete declaration.
8079 (rcuh_kind): New definition.
8080 (read_and_check_comp_unit_head): Change parameter
8081 is_debug_types_section to section_kind.
8082 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
8083 (read_comp_unit_head): Change parameter abfd to section, add parameter
8084 section_kind. Handle DWARF-5.
8085 (error_check_comp_unit_head): Accept also DWARF version 5.
8086 (read_and_check_comp_unit_head): Change parameter
8087 is_debug_types_section to section_kind.
8088 (read_and_check_type_unit_head): Delete function.
8089 (read_abbrev_offset): Handle DWARF-5.
8090 (create_debug_type_hash_table): Add parameter section_kind. Process
8091 only DW_UT_type. Use signature and type_offset_in_tu from struct
8093 (create_debug_types_hash_table): Update create_debug_type_hash_table
8095 (create_all_type_units): Call create_debug_type_hash_table.
8096 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
8097 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
8099 (skip_one_die): Handle DW_FORM_implicit_const.
8100 (dwarf2_rnglists_process): New function.
8101 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
8102 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
8103 (read_attribute_value): Handle DW_FORM_implicit_const,
8105 (read_attribute): Handle DW_FORM_implicit_const.
8106 (read_indirect_string_at_offset_from): New function from
8107 read_indirect_string_at_offset.
8108 (read_indirect_string_at_offset): Call
8109 read_indirect_string_at_offset_from.
8110 (read_indirect_line_string_at_offset): New function.
8111 (read_indirect_string): New function comment.
8112 (read_indirect_line_string): New function.
8113 (read_unsigned_leb128): Make it global.
8114 (dwarf2_string_attr): Handle DWARF-5.
8115 (add_include_dir_stub, read_formatted_entries): New functions.
8116 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
8118 (per_cu_header_read_in): Update read_comp_unit_head caller.
8119 (dwarf2_version): New function.
8120 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
8122 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
8125 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8127 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
8129 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8131 * dwarf2read.c (dwarf2_ranges_process): New function from
8133 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
8134 dwarf2_ranges_process.
8136 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8138 * dwarf2read.c (create_debug_type_hash_table): New function from
8139 create_debug_types_hash_table.
8140 (create_debug_types_hash_table): Call create_debug_type_hash_table.
8141 (create_all_type_units, open_and_init_dwo_file): Update
8142 create_debug_types_hash_table callers.
8144 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
8147 * fork-child.c (trace_start_error): Fix thinko. va_end should
8148 refer to 'ap', not 'args'.
8150 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
8151 Pedro Alves <palves@redhat.com>
8154 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
8156 * fork-child.c (trace_start_error): New function.
8157 (trace_start_error_with_name): Likewise.
8158 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
8159 * inf-ptrace.c (inf_ptrace_me): Likewise.
8160 * inferior.h (trace_start_error): New prototype.
8161 (trace_start_error_with_name): Likewise.
8163 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
8166 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
8167 NULL before using it.
8168 * symmisc.c (maintenance_print_symbols): Likewise.
8169 (maintenance_print_msymbols): Likewise.
8171 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8173 * NEWS: Add record Python bindings entry.
8175 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8177 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
8179 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
8180 * python/py-record-btrace.c, python/py-record-btrace.h,
8181 python/py-record-full.c, python/py-record-full.h: New file.
8182 * python/py-record.c: Add include for py-record-btrace.h and
8184 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
8185 recpy_instruction_history, recpy_function_call_history, recpy_begin,
8186 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
8187 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
8189 (gdbpy_initialize_btrace): New export.
8190 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
8192 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8194 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
8195 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
8196 * python/py-record.c: New file.
8197 * python/python-internal.h (gdbpy_start_recording,
8198 gdbpy_current_recording, gdpy_stop_recording,
8199 gdbpy_initialize_record): New export.
8200 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
8201 (python_GdbMethods): Add gdbpy_start_recording,
8202 gdbpy_current_recording and gdbpy_stop_recording.
8204 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8206 * record-btrace.c (record_btrace_record_method): New function.
8207 (init_record_btrace_ops): Initialize to_record_method.
8208 * record-full.c (record_full_record_method): New function.
8209 (init_record_full_ops, init_record_full_core_ops): Add
8210 record_full_record_method.
8211 * record.h (enum record_method): New enum.
8212 * target-debug.h (target_debug_print_enum_record_method: New define.
8213 * target-delegates.c: Regenerate.
8214 * target.c (target_record_method): New function.
8215 * target.h: Include record.h.
8216 (struct target_ops) <to_record_method>: New field.
8217 (target_record_method): New export.
8219 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8221 * record.h (record_start, record_stop): New export.
8222 * record.c (record_start, record_stop): New function.
8224 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8226 * btrace.c (btrace_fetch): Copy function call segments pointer
8228 (btrace_clear): Clear the vector.
8229 (btrace_find_insn_by_number): Use binary search to find the correct
8230 function call segment.
8231 * btrace.h (brace_fun_p): New typedef.
8232 (struct btrace_thread_info) <functions>: New field.
8234 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8236 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
8237 * btrace.c (btrace_decode_error): ... here. New function.
8238 * btrace.h (btrace_decode_error): New export.
8240 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8242 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
8243 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
8244 btrace_find_insn_by_number): Remove special case for gaps.
8245 * btrace.h (btrace_insn_get_error): New export.
8246 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
8247 * record-btrace.c (btrace_insn_history): Print number for gaps.
8248 (record_btrace_info, record_btrace_goto): Handle gaps.
8250 2017-02-14 Tom Tromey <tom@tromey.com>
8253 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
8255 * python/py-evts.c (gdbpy_initialize_py_events): Add
8256 before_prompt registry.
8257 * python/py-events.h (events_object) <before_prompt>: New field.
8259 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
8261 * btrace.c (ftrace_new_switch): Preserve up link and flags.
8263 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
8265 * symfile (_initialize_symfile): Add usage text to the load command's
8268 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
8270 * utils.c (defaulted_query): Don't query on secondary UIs.
8272 2017-02-10 Tom Tromey <tom@tromey.com>
8274 * rust-lang.c (rust_get_disr_info): Remove unused variable.
8276 2017-02-10 Tom Tromey <tom@tromey.com>
8278 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
8280 * python/py-type.c (typy_legacy_template_argument): Remove
8281 unnecessary "cleanup" local.
8283 2017-02-10 Tom Tromey <tom@tromey.com>
8285 * python/python.c (do_start_initialization): New function, from
8287 (_initialize_python): Call do_start_initialization.
8288 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
8291 2017-02-10 Tom Tromey <tom@tromey.com>
8293 * python/py-prettyprint.c (pretty_print_one_value): Use
8296 2017-02-10 Tom Tromey <tom@tromey.com>
8298 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
8299 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
8301 * python/py-type.c (field_new): Use gdbpy_ref.
8302 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
8304 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
8305 (py_free_pspace): Likewise.
8306 (pspace_to_pspace_object): Likewise.
8307 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
8308 (py_free_objfile): Likewise.
8309 (objfile_to_objfile_object): Likewise.
8310 * python/py-inferior.c (delete_thread_object): Use
8312 (infpy_read_memory): Likewise.
8313 (py_free_inferior): Likewise.
8314 * python/py-evtregistry.c (create_eventregistry_object): Use
8316 * python/py-event.c (create_event_object): Use gdbpy_ref.
8318 2017-02-10 Tom Tromey <tom@tromey.com>
8320 * python/py-ref.h (gdbpy_ref_policy): Now a template.
8321 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
8323 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
8324 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
8325 python/py-exitedevent.c, python/py-finishbreakpoint.c,
8326 python/py-framefilter.c, python/py-function.c,
8327 python/py-inferior.c, python/py-infevents.c,
8328 python/py-linetable.c, python/py-newobjfileevent.c,
8329 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
8330 python/py-signalevent.c, python/py-stopevent.c,
8331 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
8332 python/py-unwind.c, python/py-utils.c, python/py-value.c,
8333 python/py-varobj.c, python/py-xmethods.c, python/python.c,
8334 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
8336 2017-02-10 Tom Tromey <tom@tromey.com>
8338 * ui-out.h (ui_out_emit_type): New class.
8339 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
8340 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
8341 and ui_out_emit_tuple.
8342 (enumerate_locals): Likewise.
8343 (py_mi_print_variables, py_print_locals, py_print_args): Use
8345 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
8347 * common/gdb_optional.h: New file.
8349 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
8351 * MAINTAINERS (Write After Approval): Update my e-mail address.
8353 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
8356 * breakpoint.c (_initialize_breakpoint): Update the help description
8357 of the 'commands' command to indicate that it takes a list argument.
8359 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
8361 * interps.c (current_interp_set_logging): Remove "return".
8363 2017-02-09 Gary Benson <gbenson@redhat.com>
8365 * symtab.c (add_symtab_completions): Prevent NULL pointer
8368 2017-02-08 Pedro Alves <palves@redhat.com>
8370 * interps.c (interp::interp): Remove reference to quiet_p.
8371 (interp_set): Make static. Remove dead "Switching to" output
8373 (interp_quiet_p, interp_set_quiet): Delete.
8374 (interpreter_exec_cmd): Don't set the interpreter quiet.
8375 * interps.h (interp_quiet_p): Make static.
8376 (class interp) <quiet_p>: Remove field
8378 2017-02-08 Jerome Guitton <guitton@adacore.com>
8380 * cli/cli-decode.c (find_command_name_length): Make it extern.
8381 * cli/cli-decode.h (find_command_name_length): Declare.
8382 * cli/cli-script.c (command_name_equals, line_first_arg):
8384 (process_next_line): Use cli-decode to parse command names.
8385 (build_command_line): Make args a constant pointer.
8387 2017-02-08 Jerome Guitton <guitton@adacore.com>
8389 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
8390 Remove case-insensitive search.
8392 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
8394 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
8395 at the end of the line. Avoids an ARI warning.
8397 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
8399 * NEWS: Mention support for record/replay of Intel 64 rdrand and
8400 rdseed instructions.
8401 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
8403 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
8406 Provide and use sparc32 and sparc64 target description XML files.
8407 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
8408 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
8409 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
8410 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
8411 * features/sparc/sparc32-solaris.xml: New file.
8412 * features/sparc/sparc64-solaris.xml: New file.
8413 * features/sparc/sparc32-solaris.c: Generated.
8414 * features/sparc/sparc64-solaris.c: Generated.
8415 * sparc-tdep.h: Account for differences in target descriptions.
8416 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
8417 (sparc32_register_type): Use target provided registers.
8418 (validate_tdesc_registers): New function.
8419 (sparc32_gdbarch_init): Use tdesc_has_registers.
8420 Set pseudoregister functions.
8421 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
8422 (sparc64_register_type): Use target provided registers.
8423 (sparc64_init_abi): Set pseudoregister functions.
8425 2017-02-03 Tom Tromey <tom@tromey.com>
8428 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
8429 with a single member.
8431 2017-02-03 Pedro Alves <palves@redhat.com>
8433 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
8434 (cli_interp_base::~cli_interp_base): New.
8435 (cli_interp): New struct.
8436 (as_cli_interp): Cast the interp itself to cli_interp.
8437 (cli_interpreter_pre_command_loop): Rename to ...
8438 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
8440 (cli_interpreter_init): Rename to ...
8441 (cli_interp::init): ... this. Remove 'self' parameter. Use
8442 boolean. Make extern.
8443 (cli_interpreter_resume): Rename to ...
8444 (cli_interp::resume): ... this. Remove 'data' parameter. Make
8446 (cli_interpreter_suspend): Rename to ...
8447 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
8449 (cli_interpreter_exec): Rename to ...
8450 (cli_interp::exec): ... this. Remove 'data' parameter. Make
8452 (cli_interpreter_supports_command_editing): Rename to ...
8453 (cli_interp_base::supports_command_editing): ... this. Remove
8454 'interp' parameter. Make extern.
8455 (cli_ui_out): Rename to ...
8456 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
8458 (cli_set_logging): Rename to ...
8459 (cli_interp_base::set_logging): ... this. Remove 'interp'
8460 parameter. Make extern.
8461 (cli_interp_procs): Delete.
8462 (cli_interp_factory): Adjust to use "new".
8463 * cli/cli-interp.h: Include "interps.h".
8464 (struct cli_interp_base): New struct.
8465 * interps.c (struct interp): Delete. Fields moved to interps.h.
8466 (interp_new): Delete.
8467 (interp::interp, interp::~interp): New.
8468 (interp_set): Use bool, and return void. Assume the interpreter
8469 has suspend, init and resume methods, and that the all return
8471 (set_top_level_interpreter): interp_set returns void.
8472 (interp_ui_out): Adapt.
8473 (current_interp_set_logging): Adapt.
8474 (interp_data): Delete.
8475 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
8476 (interp_exec): Adapt.
8477 (top_level_interpreter_data): Delete.
8478 * interps.h (interp_init_ftype, interp_resume_ftype)
8479 (interp_suspend_ftype, interp_exec_ftype)
8480 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
8481 (class interp): New.
8482 (interp_new): Delete.
8483 (interp_set): Now returns void. Use bool.
8484 (interp_data, top_level_interpreter_data): Delete.
8485 * mi/mi-common.h: Include interps.h.
8486 (class mi_interp): Inherit from interp. Define a ctor. Declare
8487 init, resume, suspect, exec, interp_ui_out, set_logging and
8488 pre_command_loop methods.
8489 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
8490 (mi_interpreter_init): Rename to ...
8491 (mi_interp::init): ... this. Remove the 'interp' parameter, use
8492 bool, return void and make extern. Adjust.
8493 (mi_interpreter_resume): ... Rename to ...
8494 (mi_interp::resume): ... this. Remove the 'data' parameter,
8495 return void and make extern. Adjust.
8496 (mi_interpreter_suspend): ... Rename to ...
8497 (mi_interp::suspend): ... this. Remove the 'data' parameter,
8498 return void and make extern. Adjust.
8499 (mi_interpreter_exec): ... Rename to ...
8500 (mi_interp::exec): ... this. Remove the 'data' parameter and make
8502 (mi_interpreter_pre_command_loop): ... Rename to ...
8503 (mi_interp::pre_command_loop): ... this. Remove the 'self'
8504 parameter and make extern.
8505 (mi_on_normal_stop_1): Adjust.
8506 (mi_ui_out): Rename to ...
8507 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
8508 parameter and make extern. Adjust.
8509 (mi_set_logging): Rename to ...
8510 (mi_interp::set_logging): ... this. Remove the 'interp'
8511 parameter and make extern. Adjust.
8512 (mi_interp_procs): Delete.
8513 (mi_interp_factory): Adjust to use 'new'.
8514 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
8515 (mi_print_exception, mi_execute_command, mi_load_progress):
8517 * tui/tui-interp.c (tui_interp): New class.
8518 (as_tui_interp): Return a tui_interp pointer.
8519 (tui_on_normal_stop, tui_on_signal_received)
8520 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
8521 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
8522 to use interp::interp_ui_out.
8523 (tui_init): Rename to ...
8524 (tui_interp::init): ... this. Remove the 'self' parameter, use
8525 bool, return void and make extern. Adjust.
8526 (tui_resume): Rename to ...
8527 (tui_interp::resume): ... this. Remove the 'data' parameter,
8528 return void and make extern. Adjust.
8529 (tui_suspend): Rename to ...
8530 (tui_interp::suspend): ... this. Remove the 'data' parameter,
8531 return void and make extern. Adjust.
8532 (tui_ui_out): Rename to ...
8533 (tui_interp::interp_ui_out): ... this. Remove the 'self'
8534 parameter, and make extern. Adjust.
8535 (tui_exec): Rename to ...
8536 (tui_interp::exec): ... this. Remove the 'data' parameter and
8538 (tui_interp_procs): Delete.
8539 (tui_interp_factory): Use "new".
8541 2017-02-02 Tom Tromey <tom@tromey.com>
8543 * rust-exp.y (ends_raw_string, space_then_number)
8544 (rust_identifier_start_p): Return bool.
8545 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
8546 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
8547 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
8548 (rust_chartype_p): Return bool.
8549 (val_print_struct, rust_print_struct_def, rust_print_type):
8551 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
8554 2017-02-02 Tom Tromey <tom@tromey.com>
8556 * rust-lang.c: Reindent.
8558 2017-02-02 Tom Tromey <tom@tromey.com>
8560 * rust-lang.h (rust_crate_for_block): Update.
8561 * rust-lang.c (rust_crate_for_block): Return std::string.
8562 (rust_get_disr_info): Use std:;string, not
8563 gdb::unique_xmalloc_ptr.
8564 * rust-exp.y (crate_name): Update.
8566 2017-02-02 Pedro Alves <palves@redhat.com>
8568 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
8569 field out of gdb_disassembler_test and make it static.
8571 2017-02-02 Pedro Alves <palves@redhat.com>
8573 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
8574 mi1_interp and mi_interp fields.
8576 2017-02-02 Pedro Alves <palves@redhat.com>
8578 * cli/cli-interp.c (struct saved_output_files, saved_output):
8579 Moved from cli/cli-logging.c.
8580 (cli_set_logging): New function.
8581 (cli_interp_procs): Install cli_set_logging.
8582 * cli/cli-interp.h (make_logging_output, cli_set_logging):
8584 * cli/cli-logging.c (struct saved_output_files, saved_output):
8585 Moved to cli/cli-interp.c.
8586 (pop_output_files): Don't save outputs here.
8587 (make_logging_output): New function.
8588 (handle_redirections): Don't build tee nor save previous outputs
8590 * interps.c (current_interp_set_logging): Change prototype.
8591 Assume there's always a set_logging_proc method installed.
8592 * interps.h (interp_set_logging_ftype): Change prototype.
8593 (current_interp_set_logging): Change prototype and adjust comment.
8594 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
8595 use make_logging_output.
8596 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
8597 2017-02-02 Pedro Alves <palves@redhat.com>
8599 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
8601 (set_logging_overwrite): ... here.
8602 (logging_no_redirect_file): Delete.
8603 (set_logging_redirect): Don't handle redirection on the fly.
8604 Instead warn that "logging off" / "logging on" is necessary.
8605 (pop_output_files): Delete references to logging_no_redirect_file.
8606 (show_logging_command): Always speak in terms of what will happen
8607 once logging is reenabled.
8609 2017-02-02 Pedro Alves <palves@redhat.com>
8611 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
8613 2017-02-02 Pedro Alves <palves@redhat.com>
8615 * disasm.c (gdb_pretty_print_insn): Rename to ...
8616 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
8617 Remove gdbarch parameter. Adapt to clear the object's buffers
8618 instead of allocating new buffers, and to print using the object's
8619 gdb_disassembler instead of calling gdb_print_insn.
8620 (dump_insns): Use gdb_pretty_print_disassembler.
8621 * disasm.h (gdb_pretty_print_insn): Delete declaration.
8622 (gdb_pretty_print_disassembler): New class.
8623 * record-btrace.c (btrace_insn_history): Use
8624 gdb_pretty_print_disassembler.
8626 2017-02-02 Pedro Alves <palves@redhat.com>
8628 * ada-lang.c (type_as_string): Use string_file.
8629 * ada-valprint.c (ada_print_floating): Use string_file.
8630 * ada-varobj.c (ada_varobj_scalar_image)
8631 (ada_varobj_get_value_image): Use string_file.
8632 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
8633 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
8634 * breakpoint.c (update_inserted_breakpoint_locations)
8635 (insert_breakpoint_locations, reattach_breakpoints)
8636 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
8637 (print_it_watchpoint): Use string_file.
8638 (save_breakpoints): Use stdio_file.
8639 * c-exp.y (oper): Use string_file.
8640 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
8642 (pop_output_files): Use delete.
8643 (handle_redirections): Use stdio_file and tee_file.
8644 * cli/cli-setshow.c (do_show_command): Use string_file.
8645 * compile/compile-c-support.c (c_compute_program): Use
8647 * compile/compile-c-symbols.c (generate_vla_size): Take a
8648 'string_file &' instead of a 'ui_file *'.
8649 (generate_c_for_for_one_variable): Take a 'string_file &' instead
8650 of a 'ui_file *'. Use string_file.
8651 (generate_c_for_variable_locations): Take a 'string_file &'
8652 instead of a 'ui_file *'.
8653 * compile/compile-internal.h (generate_c_for_for_one_variable):
8654 Take a 'string_file &' instead of a 'ui_file *'.
8655 * compile/compile-loc2c.c (push, pushf, unary, binary)
8656 (print_label, pushf_register_address, pushf_register)
8657 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
8658 'ui_file *'. Adjust.
8659 * compile/compile.c (compile_to_object): Use string_file.
8660 * compile/compile.h (compile_dwarf_expr_to_c)
8661 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
8663 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
8664 (replace_typedefs_qualified_name): Use string_file and
8666 * disasm.c (gdb_pretty_print_insn): Use string_file.
8667 (gdb_disassembly): Adjust reference the null_stream global.
8668 (do_ui_file_delete): Delete.
8669 (gdb_insn_length): Use null_stream.
8670 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
8671 * dwarf2loc.c (dwarf2_compile_property_to_c)
8672 (locexpr_generate_c_location, loclist_generate_c_location): Take a
8673 'string_file &' instead of a 'ui_file *'.
8674 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
8675 * dwarf2read.c (do_ui_file_peek_last): Delete.
8676 (dwarf2_compute_name): Use string_file.
8677 * event-top.c (gdb_setup_readline): Use stdio_file.
8678 * gdbarch.sh (verify_gdbarch): Use string_file.
8679 * gdbtypes.c (safe_parse_type): Use null_stream.
8680 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
8682 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
8683 'string_file *' instead of a 'ui_file *'.
8684 (gdbscm_arch_disassemble): Use string_file.
8685 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
8686 * guile/scm-ports.c (class ioscm_file_port): Now a class that
8687 inherits from ui_file.
8688 (ioscm_file_port_delete, ioscm_file_port_rewind)
8689 (ioscm_file_port_put): Delete.
8690 (ioscm_file_port_write): Rename to ...
8691 (ioscm_file_port::write): ... this. Remove file_port_magic
8693 (ioscm_file_port_new): Delete.
8694 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
8696 * guile/scm-type.c (tyscm_type_name): Use string_file.
8697 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
8699 * infcmd.c (print_return_value_1): Use string_file.
8700 * infrun.c (print_target_wait_results): Use string_file.
8701 * language.c (add_language): Use string_file.
8702 * location.c (explicit_to_string_internal): Use string_file.
8703 * main.c (captured_main_1): Use null_file.
8704 * maint.c (maintenance_print_architecture): Use stdio_file.
8705 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
8706 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
8707 event_channel>: Change type to mi_console_file pointer.
8708 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
8709 (mi_console_file_delete): Delete.
8710 (struct mi_console_file): Delete.
8711 (mi_console_file_magic): Delete.
8712 (mi_console_file_new): Delete.
8713 (mi_console_file::mi_console_file): New.
8714 (mi_console_file_delete): Delete.
8715 (mi_console_file_fputs): Delete.
8716 (mi_console_file::write): New.
8717 (mi_console_raw_packet): Delete.
8718 (mi_console_file::flush): New.
8719 (mi_console_file_flush): Delete.
8720 (mi_console_set_raw): Rename to ...
8721 (mi_console_file::set_raw): ... this.
8722 * mi/mi-console.h (class mi_console_file): New class.
8723 (mi_console_file_new, mi_console_set_raw): Delete.
8724 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
8725 (mi_set_logging): Use delete and tee_file. Adjust.
8726 * mi/mi-main.c (output_register): Use string_file.
8727 (mi_cmd_data_evaluate_expression): Use string_file.
8728 (mi_cmd_data_read_memory): Use string_file.
8729 (mi_cmd_execute, print_variable_or_computed): Use string_file.
8730 * mi/mi-out.c (mi_ui_out::main_stream): New.
8731 (mi_ui_out::rewind): Use main_stream and
8733 (mi_ui_out::put): Use main_stream and string_file.
8734 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8735 Allocate a 'string_file' instead.
8736 (mi_out_new): Don't allocate a mem_fileopen stream here.
8737 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8738 (mi_ui_out::main_stream): Declare method.
8739 * printcmd.c (eval_command): Use string_file.
8740 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
8741 * python/py-arch.c (archpy_disassemble): Use string_file.
8742 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
8743 * python/py-frame.c (frapy_str): Use string_file.
8744 * python/py-framefilter.c (py_print_type, py_print_single_arg):
8746 * python/py-type.c (typy_str): Use string_file.
8747 * python/py-unwind.c (unwind_infopy_str): Use string_file.
8748 * python/py-value.c (valpy_str): Use string_file.
8749 * record-btrace.c (btrace_insn_history): Use string_file.
8750 * regcache.c (regcache_print): Use stdio_file.
8751 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
8752 * remote.c (escape_buffer): Use string_file.
8753 * rust-lang.c (rust_get_disr_info): Use string_file.
8754 * serial.c (serial_open_ops_1): Use stdio_file.
8755 (do_serial_close): Use delete.
8756 * stack.c (print_frame_arg): Use string_file.
8757 (print_frame_args): Remove local mem_fileopen stream, not used.
8758 (print_frame): Use string_file.
8759 * symmisc.c (maintenance_print_symbols): Use stdio_file.
8760 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
8761 Take a 'string_file *' instead of a 'ui_file *'.
8762 * top.c (new_ui): Use stdio_file and stderr_file.
8763 (free_ui): Use delete.
8764 (execute_command_to_string): Use string_file.
8765 (quit_confirm): Use string_file.
8766 * tracepoint.c (collection_list::append_exp): Use string_file.
8767 * tui/tui-disasm.c (tui_disassemble): Use string_file.
8768 * tui/tui-file.c: Don't include "ui-file.h".
8769 (enum streamtype, struct tui_stream): Delete.
8770 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
8771 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
8772 (tui_file::tui_file): New method.
8773 (tui_file_fputs): Delete.
8774 (tui_file_get_strbuf): Delete.
8775 (tui_file::puts): New method.
8776 (tui_file_adjust_strbuf): Delete.
8777 (tui_file_flush): Delete.
8778 (tui_file::flush): New method.
8779 * tui/tui-file.h: Tweak intro comment.
8781 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
8782 (tui_file_adjust_strbuf): Delete declarations.
8783 (class tui_file): New class.
8784 * tui/tui-io.c (tui_initialize_io): Use tui_file.
8785 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
8786 (tui_register_format): Use string_stream.
8787 * tui/tui-stack.c (tui_make_status_line): Use string_file.
8788 (tui_get_function_from_frame): Use string_file.
8789 * typeprint.c (type_to_string): Use string_file.
8790 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
8791 (null_stream): New global.
8792 (ui_file_delete): Delete.
8793 (ui_file::ui_file): New.
8794 (null_file_isatty): Delete.
8795 (ui_file::~ui_file): New.
8796 (null_file_rewind): Delete.
8797 (ui_file::printf): New.
8798 (null_file_put): Delete.
8799 (null_file_flush): Delete.
8800 (ui_file::putstr): New.
8801 (null_file_write): Delete.
8802 (ui_file::putstrn): New.
8803 (null_file_read): Delete.
8804 (ui_file::putc): New.
8805 (null_file_fputs): Delete.
8806 (null_file_write_async_safe): Delete.
8807 (ui_file::vprintf): New.
8808 (null_file_delete): Delete.
8809 (null_file::write): New.
8810 (null_file_fseek): Delete.
8811 (null_file::puts): New.
8812 (ui_file_data): Delete.
8813 (null_file::write_async_safe): New.
8814 (gdb_flush, ui_file_isatty): Adjust.
8815 (ui_file_put, ui_file_rewind): Delete.
8816 (ui_file_write): Adjust.
8817 (ui_file_write_for_put): Delete.
8818 (ui_file_write_async_safe, ui_file_read): Adjust.
8819 (ui_file_fseek): Delete.
8820 (fputs_unfiltered): Adjust.
8821 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
8822 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
8823 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
8824 (set_ui_file_data): Delete.
8825 (string_file::~string_file, string_file::write)
8826 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
8827 (do_ui_file_as_string, ui_file_as_string): Delete.
8828 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
8829 (struct mem_file): Delete.
8830 (mem_file_new): Delete.
8831 (stdio_file::stdio_file): New.
8832 (mem_file_delete): Delete.
8833 (stdio_file::stdio_file): New.
8834 (mem_fileopen): Delete.
8835 (stdio_file::~stdio_file): New.
8836 (mem_file_rewind): Delete.
8837 (stdio_file::set_stream): New.
8838 (mem_file_put): Delete.
8839 (stdio_file::open): New.
8840 (mem_file_write): Delete.
8841 (stdio_file_magic, struct stdio_file): Delete.
8842 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
8843 (stdio_file::flush): New.
8844 (stdio_file_read): Rename to ...
8845 (stdio_file::read): ... this. Adjust.
8846 (stdio_file_write): Rename to ...
8847 (stdio_file::write): ... this. Adjust.
8848 (stdio_file_write_async_safe): Rename to ...
8849 (stdio_file::write_async_safe) ... this. Adjust.
8850 (stdio_file_fputs): Rename to ...
8851 (stdio_file::puts) ... this. Adjust.
8852 (stdio_file_isatty): Delete.
8853 (stdio_file_fseek): Delete.
8854 (stdio_file::isatty): New.
8855 (stderr_file_write): Rename to ...
8856 (stderr_file::write) ... this. Adjust.
8857 (stderr_file_fputs): Rename to ...
8858 (stderr_file::puts) ... this. Adjust.
8859 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
8860 (stderr_file::stderr_file): New.
8861 (tee_file_magic): Delete.
8862 (struct tee_file): Delete.
8863 (tee_file::tee_file): New.
8864 (tee_file_new): Delete.
8865 (tee_file::~tee_file): New.
8866 (tee_file_delete): Delete.
8867 (tee_file_flush): Rename to ...
8868 (tee_file::flush): ... this. Adjust.
8869 (tee_file_write): Rename to ...
8870 (tee_file::write): ... this. Adjust.
8871 (tee_file::write_async_safe): New.
8872 (tee_file_fputs): Rename to ...
8873 (tee_file::puts): ... this. Adjust.
8874 (tee_file_isatty): Rename to ...
8875 (tee_file::isatty): ... this. Adjust.
8876 * ui-file.h (struct obstack, struct ui_file): Don't
8878 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
8879 (ui_file_write_ftype)
8880 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
8881 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
8882 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
8883 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
8884 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
8885 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
8886 (set_ui_file_fseek): Delete.
8887 (ui_file_data, ui_file_delete, ui_file_rewind)
8888 (struct ui_file): New.
8890 (class null_file): New.
8891 (null_stream): Declare.
8892 (ui_file_write_for_put, ui_file_put): Delete.
8893 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
8895 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
8896 (gdb_fopen, tee_file_new): Delete.
8897 (struct string_file): New.
8898 (struct stdio_file): New.
8899 (stdio_file_up): New.
8900 (struct stderr_file): New.
8901 (class tee_file): New.
8902 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
8903 of a 'ui_file *'. Adjust.
8904 * ui-out.h (class ui_out) <field_stream>: Likewise.
8905 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
8906 (null_stream): Delete.
8907 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
8909 * utils.h (struct ui_file): Delete forward declaration..
8910 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
8911 (error_stream): Take a 'string_file &' instead of a
8913 * varobj.c (varobj_value_get_print_value): Use string_file.
8914 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
8915 * gdbarch.c: Regenerate.
8917 2017-02-02 Pedro Alves <palves@redhat.com>
8919 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
8920 (gdb_pretty_print_insn): ... this. Now a free function. Add back
8921 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
8922 Adjust to call gdb_print_insn instead of
8923 gdb_disassembler::print_insn.
8924 (dump_insns, do_mixed_source_and_assembly_deprecated)
8925 (do_mixed_source_and_assembly, do_assembly_only): Add back a
8926 'gdbarch' parameter. Remove gdb_disassembler parameter.
8927 (gdb_disassembly): Don't allocate a gdb_disassembler here.
8928 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
8930 (gdb_pretty_print_insn): Re-add declaration.
8931 * record-btrace.c (btrace_insn_history): Don't allocate a
8932 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
8934 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
8936 * disasm.h (gdb_disassembly): Remove file_string parameter.
8937 * disasm.c (gdb_disassembly): Likewise.
8938 * cli/cli-cmds.c (print_disassembly): Adapt.
8939 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
8940 * stack.c (do_gdb_disassembly): Likewise.
8942 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
8944 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
8945 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
8946 targets. And if the implicit value is longer than needed, extract
8947 the first bytes instead of the "least significant" ones.
8949 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
8951 * btrace.c (btrace_enable): Do not call btrace_add_pc for
8952 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
8953 (btrace_fetch): Assert can_access_registers_ptid.
8954 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
8955 validate_registers_access.
8957 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
8959 * gdbthread.h (can_access_registers_ptid): New.
8960 * thread.c (can_access_registers_ptid): New.
8962 2017-02-01 Pedro Alves <palves@redhat.com>
8964 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
8966 2017-01-31 Pedro Alves <palves@redhat.com>
8968 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
8971 2017-01-31 Pedro Alves <palves@redhat.com>
8973 * stack.c (print_frame_args): Remove local mem_fileopen stream,
8976 2017-01-31 Pedro Alves <palves@redhat.com>
8978 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
8980 2017-01-31 Pedro Alves <palves@redhat.com>
8982 * common/scoped_restore.h
8983 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
8984 change the value's parameter type to T2.
8985 (make_scoped_restore): Likewise.
8987 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8988 Richard Henderson <rth@redhat.com>
8990 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
8991 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
8992 GS_BASE for older kernels.
8993 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
8994 GS_BASE for older kernels.
8995 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
8996 and GS_BASE to the offset table.
8997 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
8998 system register group.
8999 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
9001 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
9003 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
9004 AMD64_GSBASE_REGNUM.
9005 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
9006 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
9007 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
9008 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
9009 i386/64bit-segments.xml in those rules.
9010 * features/i386/64bit-segments.xml: New file.
9011 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
9012 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
9013 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
9014 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
9015 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
9016 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
9017 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
9018 * features/i386/amd64-avx-linux.c: Regenerated.
9019 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
9020 * features/i386/amd64-avx-mpx.c: Regenerated.
9021 * features/i386/amd64-avx512-linux.c: Regenerated.
9022 * features/i386/amd64-linux.c: Regenerated.
9023 * features/i386/amd64-mpx-linux.c: Regenerated.
9024 * features/i386/i386-avx-mpx-linux.c: Regenerated.
9025 * features/i386/i386-avx-mpx.c: Regenerated.
9026 * features/i386/x32-avx-linux.c: Regenerated.
9027 * features/i386/x32-avx512-linux.c: Regenerated.
9028 * regformats/i386/amd64-avx-linux.dat: Regenerated.
9029 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
9030 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
9031 * regformats/i386/amd64-linux.dat: Regenerated.
9032 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
9033 * regformats/i386/x32-avx-linux.dat: Regenerated.
9034 * regformats/i386/x32-avx512-linux.dat: Regenerated.
9035 * regformats/i386/x32-linux.dat: Regenerated.
9037 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
9039 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
9040 Set to AMD64_NUM_REGS.
9042 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
9044 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
9045 that checks validity of a register number.
9047 2017-01-27 Kees Cook <keescook@google.com>
9049 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
9050 fetch_fpregs if target has fpa registers.
9051 (arm_linux_store_inferior_registers): Call store_fpregs if target
9054 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
9056 * cris-tdep.c (cris_gdbarch_init): Remove check for
9057 info.byte_order and force it to BFD_ENDIAN_LITTLE.
9059 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
9061 * corelow.c (get_core_register_section): Check for regset
9062 existence before checking for REGSET_VARIABLE_SIZE.
9064 2017-01-26 Yao Qi <yao.qi@linaro.org>
9065 Pedro Alves <palves@redhat.com>
9068 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
9069 call memory_error, save memaddr instead.
9070 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
9071 negative, cal memory_error.
9072 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
9074 2017-01-26 Yao Qi <yao.qi@linaro.org>
9076 * disasm-selftests.c (memory_error_test): New function.
9077 (_initialize_disasm_selftests): Register memory_error_test.
9079 2017-01-26 Yao Qi <yao.qi@linaro.org>
9081 * Makefile.in (SFILES): Add disasm-selftests.c and
9083 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
9084 * disasm-selftests.c: New file.
9085 * selftest-arch.c: New file.
9086 * selftest-arch.h: New file.
9088 2017-01-26 Yao Qi <yao.qi@linaro.org>
9090 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
9091 to bfd_arch_mep. Don't return 0 if section is not
9092 found. Call print_insn_mep.
9094 2017-01-26 Pedro Alves <palves@redhat.com>
9095 Yao Qi <yao.qi@linaro.org>
9097 * arm-tdep.c: Include "disasm.h".
9098 (gdb_print_insn_arm): Update code to get gdbarch.
9099 * disasm.c (dis_asm_read_memory): Change it to
9100 gdb_disassembler::dis_asm_read_memory.
9101 (dis_asm_memory_error): Likewise.
9102 (dis_asm_print_address): Likewise.
9103 (gdb_pretty_print_insn): Change it to
9104 gdb_disassembler::pretty_print_insn.
9105 (dump_insns): Add one argument gdb_disassemlber. All
9107 (do_mixed_source_and_assembly_deprecated): Likewise.
9108 (do_mixed_source_and_assembly): Likewise.
9109 (do_assembly_only): Likewise.
9110 (gdb_disassembler::gdb_disassembler): New.
9111 (gdb_disassembler::print_insn): New.
9112 * disasm.h (class gdb_disassembler): New.
9113 (gdb_pretty_print_insn): Remove declaration.
9114 (gdb_disassemble_info): Likewise.
9115 * guile/scm-disasm.c (class gdbscm_disassembler): New.
9116 (gdbscm_disasm_read_memory_worker): Update.
9117 (gdbscm_disasm_read_memory): Update.
9118 (gdbscm_disasm_memory_error): Remove.
9119 (gdbscm_disasm_print_address): Remove.
9120 (gdbscm_disassembler::gdbscm_disassembler): New.
9121 (gdbscm_print_insn_from_port): Update.
9122 * mips-tdep.c: Include disasm.h.
9123 (gdb_print_insn_mips): Update code to get gdbarch.
9124 * record-btrace.c (btrace_insn_history): Update.
9125 * spu-tdep.c: Include disasm.h.
9126 (struct spu_dis_asm_data): Remove.
9127 (struct spu_dis_asm_info): New.
9128 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
9130 (gdb_print_insn_spu): Cast disassemble_info to
9133 2017-01-26 Yao Qi <yao.qi@linaro.org>
9135 * disasm.c (do_ui_file_delete): Delete.
9136 (gdb_insn_length): Move code creating stream to ...
9137 * utils.c (null_stream): ... here. New function.
9138 * utils.h (null_stream): Declare.
9140 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
9142 * python/py-inferior.c (find_thread_object): Return directly
9143 from the loop. Remove "found" variable.
9145 2017-01-21 Joel Brobecker <brobecker@adacore.com>
9147 GDB 7.12.1 released.
9149 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
9151 * python/py-function.c (fnpy_call): Reorder declarations to have
9152 the gdbpy_enter object declared first.
9153 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
9155 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
9158 * python/python-internal.h (PyMem_RawMalloc): Define for
9160 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
9161 PyMem_RawMalloc instead of PyMem_Malloc.
9163 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
9164 Luis Machado <lgustavo@codesourcery.com>
9166 * NEWS (New commands): Mention flash-erase.
9167 (New MI commands): Mention target-flash-erase.
9168 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
9170 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
9171 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
9172 * target.c (flash_erase_command): New function.
9173 (initialize_targets): Add new flash-erase command.
9174 * target.h (flash_erase_command): New declaration.
9176 2017-01-20 Joel Brobecker <brobecker@adacore.com>
9178 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
9179 HAVE_SYS_PROCFS_H is defined.
9181 2017-01-18 Alan Hayward <alan.hayward@arm.com>
9183 * remote.c (struct cached_reg): Change data into a pointer.
9184 * (stop_reply_dtr): Free data pointers before deleting vector.
9185 (process_stop_reply): Likewise.
9186 (remote_parse_stop_reply): Allocate space for data
9188 2017-01-18 Alan Hayward <alan.hayward@arm.com>
9190 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
9192 (amd64_pseudo_register_read_value): Likewise.
9193 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
9194 (store_register_using_P): Likewise.
9195 * regcache.c (regcache_xfer_part): Likewise.
9197 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
9199 Split real and pseudo registers.
9200 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
9201 (sparc32_pseudo_regnum): New enum.
9202 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
9203 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
9204 (SPARC32_CP0_REGISTERS): New macro.
9205 (sparc32_pseudo_register_name): New function.
9206 (sparc32_register_name): Use sparc32_pseudo_register_name.
9207 (sparc32_pseudo_register_type): New function.
9208 (sparc32_register_type): Use sparc32_pseudo_register_type.
9209 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
9210 pseudo register numbers.
9211 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
9212 (SPARC64_CP0_REGISTERS): New macro.
9213 (sparc64_pseudo_register_name): New function.
9214 (sparc64_register_name): Use sparc64_pseudo_register_name.
9215 (sparc64_pseudo_register_type): New function.
9216 (sparc64_register_type): Use sparc64_pseudo_register_type.
9217 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
9218 pseudo register numbers.
9219 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
9220 sparc64_store_arguments): Handle pseudo register numbers.
9222 2017-01-13 Yao Qi <yao.qi@linaro.org>
9224 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
9225 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
9227 (getpkt_or_notif_sane_1): Likewise.
9229 2017-01-13 Yao Qi <yao.qi@linaro.org>
9231 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
9232 of CC. Pass "-x c++-header" instead of "-x c".
9234 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
9236 * remote.c (remote_can_async_p): Update comment.
9238 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
9240 * linux-nat.c (linux_nat_can_async_p): Update comment.
9242 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
9244 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
9246 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
9248 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
9250 2017-01-10 Tom Tromey <tom@tromey.com>
9252 * python/py-type.c (typy_legacy_template_argument): Update.
9253 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
9254 ~demangle_parse_info): Declare new members.
9255 (cp_demangled_name_to_comp): Return unique_ptr.
9256 (cp_demangled_name_parse_free)
9257 (make_cleanup_cp_demangled_name_parse_free)
9258 (cp_new_demangle_parse_info): Remove.
9259 * cp-support.c (do_demangled_name_parse_free_cleanup)
9260 (make_cleanup_cp_demangled_name_parse_free): Remove.
9261 (inspect_type, cp_canonicalize_string_full)
9262 (cp_canonicalize_string): Update.
9263 (mangled_name_to_comp): Change return type.
9264 (cp_class_name_from_physname, method_name_from_physname)
9265 (cp_func_name, cp_remove_params): Update.
9266 * cp-name-parser.y (demangle_parse_info): New constructor, from
9267 cp_new_demangle_parse_info.
9268 (~demangle_parse_info): New destructor, from
9269 cp_demangled_name_parse_free.
9270 (cp_merge_demangle_parse_infos): Update.
9271 (cp_demangled_name_to_comp): Change return type.
9273 2017-01-10 Tom Tromey <tom@tromey.com>
9275 * top.c (prevent_dont_repeat): Change return type.
9276 * python/python.c (execute_gdb_command): Use std::string.
9278 * guile/guile.c (gdbscm_execute_gdb_command): Update.
9279 * command.h (prevent_dont_repeat): Change return type.
9280 * breakpoint.c (bpstat_do_actions_1): Update.
9282 2017-01-10 Tom Tromey <tom@tromey.com>
9284 * value.h (scoped_value_mark::~scoped_value_mark): Call
9286 (scoped_value_mark::free_to_mark): New method.
9287 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
9290 2017-01-10 Tom Tromey <tom@tromey.com>
9292 * python/py-value.c (valpy_dereference, valpy_referenced_value)
9293 (valpy_reference_value, valpy_const_value, valpy_get_address)
9294 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
9295 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
9296 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
9297 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
9299 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
9300 * value.h (scoped_value_mark): New class.
9302 2017-01-10 Tom Tromey <tom@tromey.com>
9304 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
9305 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
9306 * psymtab.c (discard_psymtabs_upto): Remove.
9307 (make_cleanup_discard_psymtabs): Remove.
9308 (struct psymtab_state): Remove.
9310 2017-01-10 Tom Tromey <tom@tromey.com>
9312 * record-full.c (record_full_save_cleanups): Remove.
9313 (record_full_save): Use gdb::unlinker.
9314 * gcore.c (do_bfd_delete_cleanup): Remove.
9315 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
9317 * dwarf2read.c (unlink_if_set): Remove.
9318 (write_psymtabs_to_index): Use gdb::unlinker.
9319 * common/gdb_unlinker.h: New file.
9321 2017-01-10 Tom Tromey <tom@tromey.com>
9323 * windows-tdep.c (windows_xfer_shared_library): Update.
9324 * windows-nat.c (windows_make_so): Update.
9325 * utils.h (make_cleanup_bfd_unref): Remove.
9326 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
9327 * symfile.h (symfile_bfd_open)
9328 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
9329 * symfile.c (read_symbols, symbol_file_add)
9330 (separate_debug_file_exists): Update.
9331 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
9332 (generic_load, reread_symbols): Update.
9333 * symfile-mem.c (symbol_file_add_from_memory): Update.
9334 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
9335 (spu_symbol_file_add_from_memory): Update.
9336 * solist.h (struct target_so_ops) <bfd_open>: Return
9338 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
9339 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
9341 (solib_map_sections, reload_shared_libraries_1): Update.
9342 * solib-svr4.c (enable_break): Update.
9343 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
9344 * solib-frv.c (enable_break2): Update.
9345 * solib-dsbt.c (enable_break): Update.
9346 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
9348 (darwin_solib_get_all_image_info_addr_at_init): Update.
9349 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
9350 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
9351 * record-full.c (record_full_save): Update.
9352 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
9353 * procfs.c (insert_dbx_link_bpt_in_file): Update.
9354 * minidebug.c (find_separate_debug_file_in_section): Return
9356 * machoread.c (macho_add_oso_symfile): Change abfd to
9358 (macho_symfile_read_all_oso): Update.
9359 (macho_check_dsym): Return gdb_bfd_ref_ptr.
9360 (macho_symfile_read): Update.
9361 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
9362 (jit_bfd_try_read_symtab): Update.
9363 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9364 (gdb_bfd_openw, gdb_bfd_openr_iovec)
9365 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
9367 (gdb_bfd_ref_policy): New struct.
9368 (gdb_bfd_ref_ptr): New typedef.
9369 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9370 (gdb_bfd_openw, gdb_bfd_openr_iovec)
9371 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
9373 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
9374 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
9375 (gcore_command): Update.
9376 * exec.c (exec_file_attach): Update.
9377 * elfread.c (elf_symfile_read): Update.
9378 * dwarf2read.c (dwarf2_get_dwz_file): Update.
9379 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
9380 (open_and_init_dwo_file): Update.
9381 (open_dwp_file): Return gdb_bfd_ref_ptr.
9382 (open_and_init_dwp_file): Update.
9383 * corelow.c (core_open): Update.
9384 * compile/compile-object-load.c (compile_object_load): Update.
9385 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
9386 * coffread.c (coff_symfile_read): Update.
9387 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
9388 gdb_bfd_ref_ptr. Rename.
9389 (dump_bfd_file, restore_command): Update.
9390 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
9391 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
9392 (find_separate_debug_file_by_buildid): Update.
9394 2017-01-10 Tom Tromey <tom@tromey.com>
9396 * common/gdb_ref_ptr.h: New file.
9397 * python/py-ref.h (struct gdbpy_ref_policy): New.
9398 (gdbpy_ref): Now a typedef.
9400 2017-01-10 Tom Tromey <tom@tromey.com>
9402 * utils.h (make_cleanup_htab_delete): Don't declare.
9403 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
9405 * linespec.c (decode_compound_collector): Add constructor,
9407 (lookup_prefix_sym): Remove cleanup.
9408 (symtab_collector): Add constructor, destructor.
9409 (collect_symtabs_from_filename): Remove cleanup.
9410 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
9411 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
9413 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
9414 * dwarf2read.c (dw2_expand_symtabs_matching)
9415 (dw2_map_symbol_filenames, dwarf_decode_macros)
9416 (write_psymtabs_to_index): Use htab_up.
9417 * dwarf2loc.c (func_verify_no_selftailcall)
9418 (call_site_find_chain_1, func_verify_no_selftailcall)
9419 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
9420 std::vector, gdb::unique_xmalloc_ptr.
9421 (call_sitep): Remove typedef.
9422 (dwarf2_locexpr_baton_eval): Remove unused variable.
9424 2017-01-10 Tom Tromey <tom@tromey.com>
9426 * python/python-internal.h (make_cleanup_py_decref)
9427 (make_cleanup_py_xdecref): Don't declare.
9428 * python/py-utils.c (py_decref, make_cleanup_py_decref)
9429 (py_xdecref, make_cleanup_py_xdecref): Remove.
9431 2017-01-10 Tom Tromey <tom@tromey.com>
9433 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
9434 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
9436 2017-01-10 Tom Tromey <tom@tromey.com>
9438 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
9440 2017-01-10 Tom Tromey <tom@tromey.com>
9442 * python/py-utils.c (unicode_to_encoded_string)
9443 (python_string_to_target_string)
9444 (python_string_to_target_python_string)
9445 (python_string_to_host_string, gdbpy_obj_to_string)
9446 (get_addr_from_python): Use gdbpy_ref.
9448 2017-01-10 Tom Tromey <tom@tromey.com>
9450 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
9453 2017-01-10 Tom Tromey <tom@tromey.com>
9455 * python/python.c (eval_python_command, gdbpy_decode_line)
9456 (gdbpy_run_events, gdbpy_start_type_printers)
9457 (gdbpy_apply_type_printers): Use gdbpy_ref.
9459 2017-01-10 Tom Tromey <tom@tromey.com>
9461 * python/py-param.c (get_doc_string, compute_enum_values): Use
9464 2017-01-10 Tom Tromey <tom@tromey.com>
9466 * python/py-inferior.c (find_thread_object, build_inferior_list):
9469 2017-01-10 Tom Tromey <tom@tromey.com>
9471 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
9473 2017-01-10 Tom Tromey <tom@tromey.com>
9475 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
9478 2017-01-10 Tom Tromey <tom@tromey.com>
9480 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
9482 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
9485 2017-01-10 Tom Tromey <tom@tromey.com>
9487 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
9490 2017-01-10 Tom Tromey <tom@tromey.com>
9492 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
9493 decref results of PyArg_ParseTupleAndKeywords.
9495 2017-01-10 Tom Tromey <tom@tromey.com>
9497 * python/python.c (python_run_simple_file): Use
9498 unique_xmalloc_ptr, gdbpy_ref.
9500 2017-01-10 Tom Tromey <tom@tromey.com>
9502 * python/py-prettyprint.c (print_stack_unless_memory_error)
9503 (print_string_repr, print_children): Use gdbpy_ref.
9504 (dummy_python_frame): New class.
9505 (dummy_python_frame::dummy_python_frame): Rename from
9506 push_dummy_python_frame.
9507 (py_restore_tstate): Remove.
9509 2017-01-10 Tom Tromey <tom@tromey.com>
9511 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
9513 2017-01-10 Tom Tromey <tom@tromey.com>
9515 * python/python.c (ensure_python_env, restore_python_env):
9517 * python/python-internal.h (ensure_python_env): Don't declare.
9518 * varobj.h (varobj_ensure_python_env): Don't declare.
9519 * varobj.c (varobj_ensure_python_env): Remove.
9521 2017-01-10 Tom Tromey <tom@tromey.com>
9523 * varobj.c (varobj_value_get_print_value): Use
9526 2017-01-10 Tom Tromey <tom@tromey.com>
9528 * python/py-prettyprint.c (print_string_repr, print_children):
9530 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
9532 * varobj.c (varobj_value_get_print_value): Update.
9533 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
9535 2017-01-10 Tom Tromey <tom@tromey.com>
9537 * varobj.c (varobj_get_display_hint)
9538 (dynamic_varobj_has_child_method, install_new_value_visualizer)
9539 (varobj_set_visualizer, free_variable): Use
9542 2017-01-10 Tom Tromey <tom@tromey.com>
9544 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
9545 (do_finish_initialization): New function. Use gdbpy_ref.
9546 (gdbpy_finish_initialization): Use gdbpy_enter. Call
9547 do_finish_initialization.
9549 2017-01-10 Tom Tromey <tom@tromey.com>
9551 * python/py-param.c (get_set_value, get_show_value): Use
9552 gdbpy_enter, gdbpy_ref.
9554 2017-01-10 Tom Tromey <tom@tromey.com>
9556 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
9558 2017-01-10 Tom Tromey <tom@tromey.com>
9560 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
9562 2017-01-10 Tom Tromey <tom@tromey.com>
9564 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
9565 Use gdbpy_enter_varobj.
9567 2017-01-10 Tom Tromey <tom@tromey.com>
9569 * varobj.c (gdbpy_enter_varobj): New constructor.
9570 * python/python-internal.h (gdbpy_enter_varobj): New class.
9571 * python/py-varobj.c (py_varobj_get_iterator): Use
9574 2017-01-10 Tom Tromey <tom@tromey.com>
9576 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
9577 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
9578 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
9579 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
9581 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
9583 2017-01-10 Tom Tromey <tom@tromey.com>
9585 * python/py-xmethods.c (invoke_match_method): Use
9588 2017-01-10 Tom Tromey <tom@tromey.com>
9590 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
9591 gdbpy_enter, gdbpy_ref.
9593 2017-01-10 Tom Tromey <tom@tromey.com>
9595 * python/python.c (python_interactive_command): Use gdbpy_enter.
9597 2017-01-10 Tom Tromey <tom@tromey.com>
9599 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
9602 2017-01-10 Tom Tromey <tom@tromey.com>
9604 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
9605 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
9607 2017-01-10 Tom Tromey <tom@tromey.com>
9609 * utils.h (htab_deleter): New struct.
9610 (htab_up): New typedef.
9611 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
9612 gdbpy_enter, gdbpy_ref, htab_up.
9614 2017-01-10 Tom Tromey <tom@tromey.com>
9616 * python/py-unwind.c (pending_frame_invalidate): Remove.
9617 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
9619 2017-01-10 Tom Tromey <tom@tromey.com>
9621 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
9622 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
9624 2017-01-10 Tom Tromey <tom@tromey.com>
9626 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
9628 2017-01-10 Tom Tromey <tom@tromey.com>
9630 * python/python.c (gdbpy_eval_from_control_command)
9631 (gdbpy_source_script, gdbpy_run_events)
9632 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
9633 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
9636 2017-01-10 Tom Tromey <tom@tromey.com>
9638 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
9640 2017-01-10 Tom Tromey <tom@tromey.com>
9642 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
9644 2017-01-10 Tom Tromey <tom@tromey.com>
9646 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
9647 (python_on_inferior_call_pre, python_on_inferior_call_post)
9648 (python_on_memory_change, python_on_register_change)
9649 (python_inferior_exit, python_new_objfile, add_thread_object)
9650 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
9652 2017-01-10 Tom Tromey <tom@tromey.com>
9654 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
9655 (bpfinishpy_handle_exit): Use gdbpy_enter.
9657 2017-01-10 Tom Tromey <tom@tromey.com>
9659 * python/py-cmd.c (cmdpy_destroyer)
9660 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
9663 2017-01-10 Tom Tromey <tom@tromey.com>
9665 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
9667 (gdbpy_breakpoint_has_cond): Likewise.
9669 2017-01-10 Tom Tromey <tom@tromey.com>
9671 * python/python.c (gdbpy_enter): New constructor.
9672 (~gdbpy_enter): New destructor.
9673 (restore_python_env, ensure_python_env): Rewrite.
9674 * python/python-internal.h (gdbpy_enter): New class.
9676 2017-01-10 Tom Tromey <tom@tromey.com>
9678 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
9680 2017-01-10 Tom Tromey <tom@tromey.com>
9682 * python/py-value.c (value_has_field, get_field_flag)
9683 (get_field_type, valpy_getitem, convert_value_from_python): Use
9686 2017-01-10 Tom Tromey <tom@tromey.com>
9688 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
9691 2017-01-10 Tom Tromey <tom@tromey.com>
9693 * python/py-prettyprint.c (search_pp_list)
9694 (find_pretty_printer_from_objfiles)
9695 (find_pretty_printer_from_progspace)
9696 (find_pretty_printer_from_gdb, find_pretty_printer)
9697 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
9700 2017-01-10 Tom Tromey <tom@tromey.com>
9702 * python/py-param.c (call_doc_function): Use gdbpy_ref.
9704 2017-01-10 Tom Tromey <tom@tromey.com>
9706 * python/py-linetable.c (build_line_table_tuple_from_pcs)
9707 (ltpy_get_all_source_lines): Use gdbpy_ref.
9709 2017-01-10 Tom Tromey <tom@tromey.com>
9711 * python/py-framefilter.c (extract_sym, extract_value)
9712 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
9715 2017-01-10 Tom Tromey <tom@tromey.com>
9717 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
9719 2017-01-10 Tom Tromey <tom@tromey.com>
9721 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
9723 2017-01-10 Tom Tromey <tom@tromey.com>
9725 * python/py-function.c (convert_values_to_python, fnpy_init): Use
9728 2017-01-10 Tom Tromey <tom@tromey.com>
9730 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
9732 2017-01-10 Tom Tromey <tom@tromey.com>
9734 * python/py-type.c (convert_field, make_fielditem, typy_fields)
9735 (typy_range): Use gdbpy_ref.
9737 2017-01-10 Tom Tromey <tom@tromey.com>
9739 * python/py-threadevent.c (create_thread_event_object): Use
9741 * python/py-stopevent.c (create_stop_event_object): Simplify.
9742 (emit_stop_event): Use gdbpy_ref.
9743 * python/py-signalevent.c (create_signal_event_object): Use
9745 * python/py-newobjfileevent.c (create_new_objfile_event_object)
9746 (emit_new_objfile_event, create_clear_objfiles_event_object)
9747 (emit_clear_objfiles_event): Use gdbpy_ref.
9748 * python/py-infevents.c (create_inferior_call_event_object)
9749 (create_register_changed_event_object)
9750 (create_memory_changed_event_object, emit_inferior_call_event)
9751 (emit_memory_changed_event, emit_register_changed_event): Use
9753 * python/py-exitedevent.c (create_exited_event_object)
9754 (emit_exited_event): Use gdbpy_ref.
9755 * python/py-event.h (evpy_emit_event): Remove
9756 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
9757 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
9758 * python/py-continueevent.c (emit_continue_event): Use
9760 * python/py-breakpoint.c (gdbpy_breakpoint_created)
9761 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
9763 * python/py-bpevent.c (create_breakpoint_event_object): Use
9766 2017-01-10 Tom Tromey <tom@tromey.com>
9768 * python/py-ref.h: New file.
9770 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
9772 * cli-out.c (cli_ui_out::do_redirect): Change return type to
9774 * cli-out.h (cli_ui_out::do_redirect): Likewise.
9775 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
9776 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
9777 * ui-out.c (ui_out::redirect): Likewise.
9778 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
9779 * cli/cli-logging.c (set_logging_redirect): Update call site of
9781 (handle_redirections): Likewise.
9782 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
9783 * top.c (execute_command_to_string): Likewise.
9784 * utils.c (do_ui_out_redirect_pop): Likewise.
9786 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
9788 * stack.c (_initialize_stack): Update "frame" command help message.
9790 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
9792 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
9794 2017-01-06 Yao Qi <yao.qi@linaro.org>
9796 * x86-linux-nat.h: Include gdb_proc_service.h.
9798 2017-01-06 Yao Qi <yao.qi@linaro.org>
9800 * ser-base.h: Include serial.h.
9802 2017-01-06 Yao Qi <yao.qi@linaro.org>
9804 * ppc-linux-tdep.h: Include ppc-tdep.h.
9806 2017-01-06 Yao Qi <yao.qi@linaro.org>
9808 * nat/amd64-linux-siginfo.h: Include signal.h.
9810 2017-01-06 Yao Qi <yao.qi@linaro.org>
9812 * nat/aarch64-linux-hw-point.h: Include break-common.h.
9814 2017-01-06 Yao Qi <yao.qi@linaro.org>
9816 * mi/mi-parse.h: Include mi-cmds.h.
9818 2017-01-06 Yao Qi <yao.qi@linaro.org>
9820 * inf-loop.c: Don't include "target.h".
9821 * inf-loop.h: Include it here.
9823 2017-01-06 Yao Qi <yao.qi@linaro.org>
9825 * dfp.h: Include "dboulest.h" and "expression.h".
9827 2017-01-06 Yao Qi <yao.qi@linaro.org>
9829 * ax-gdb.h: Include "ax.h".
9831 2017-01-06 Yao Qi <yao.qi@linaro.org>
9833 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
9834 with nat/gdb_ptrace.h.
9836 2017-01-05 Yao Qi <yao.qi@linaro.org>
9838 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
9840 (mips64_fbsd_sigframe_init): Likewise.
9842 2017-01-04 John Baldwin <jhb@FreeBSD.org>
9844 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
9845 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
9847 2017-01-04 John Baldwin <jhb@FreeBSD.org>
9849 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
9850 * NEWS: Mention new FreeBSD/mips native configuration.
9851 * config/mips/fbsd.mh: New file.
9852 * configure.host: Add mips*-*-freebsd*.
9853 * mips-fbsd-nat.c: New file.
9855 2017-01-04 John Baldwin <jhb@FreeBSD.org>
9857 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
9858 (ALLDEPFILES): Add mips-fbsd-tdep.c.
9859 * NEWS: Mention new FreeBSD/mips target.
9860 * configure.tgt: Add mips*-*-freebsd*.
9861 * mips-fbsd-tdep.c: New file.
9862 * mips-fbsd-tdep.h: New file.
9864 2017-01-04 Yao Qi <yao.qi@linaro.org>
9866 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
9867 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
9869 2017-01-01 Joel Brobecker <brobecker@adacore.com>
9871 Update copyright year range in all GDB files.
9873 2017-01-01 Joel Brobecker <brobecker@adacore.com>
9875 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
9877 For older changes see ChangeLog-2016.
9883 version-control: never