Share i386-linux target description between GDB and GDBserver
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
5f035c07
YQ
12017-09-05 Yao Qi <yao.qi@linaro.org>
2
3 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4 (SFILES): Add arch/i386.c.
5 (HFILES_NO_SRCDIR): Add arch/i386.h.
6 * arch/i386.c: New file.
7 * arch/i386.h: New file.
8 * arch/tdesc.h (allocate_target_description): Declare.
9 (set_tdesc_architecture): Declare.
10 (set_tdesc_osabi): Declare.
11 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
12 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
13 include arch/i386.h.
14 (i386_linux_read_description): Remove code and call
15 i386_create_target_description.
16 (set_tdesc_architecture): New function.
17 (set_tdesc_osabi): New function.
18 * target-descriptions.h (allocate_target_description): Remove.
19
0abe8a89
YQ
202017-09-05 Yao Qi <yao.qi@linaro.org>
21
22 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
23 * target-descriptions.c (tdesc_create_feature): Likewise, and
24 adjust code.
25 * features/i386/32bit-avx.c: Re-generated.
26 * features/i386/32bit-avx512.c: Re-generated.
27 * features/i386/32bit-core.c: Re-generated.
28 * features/i386/32bit-linux.c: Re-generated.
29 * features/i386/32bit-mpx.c: Re-generated.
30 * features/i386/32bit-pkeys.c: Re-generated.
31 * features/i386/32bit-sse.c: Re-generated.
32
0a188386
YQ
332017-09-05 Yao Qi <yao.qi@linaro.org>
34
35 * regformats/regdef.h (struct reg): Override operator == and !=.
36
f49ff000
YQ
372017-09-05 Yao Qi <yao.qi@linaro.org>
38
39 * arch/tdesc.h: New file.
40 * regformats/regdat.sh: Generate code using tdesc_create_reg.
41 * target-descriptions.c: Update comments.
42 * target-descriptions.h: Include "arch/tdesc.h". Remove the
43 declarations.
44 * features/i386/32bit-avx.c: Re-generated.
45 * features/i386/32bit-avx512.c: Re-generated.
46 * features/i386/32bit-core.c: Re-generated.
47 * features/i386/32bit-linux.c: Re-generated.
48 * features/i386/32bit-mpx.c: Re-generated.
49 * features/i386/32bit-pkeys.c: Re-generated.
50 * features/i386/32bit-sse.c: Re-generated.
51
f7000548
YQ
522017-09-05 Yao Qi <yao.qi@linaro.org>
53
54 * regformats/regdat.sh: Update generated code.
55
c9a5e2a5
YQ
562017-09-05 Yao Qi <yao.qi@linaro.org>
57
58 * regformats/regdat.sh: Adjust code order.
59
d6b687ac
SM
602017-09-05 Simon Marchi <simon.marchi@ericsson.com>
61
62 * expprint.c (dump_subexp_body_standard): Use constant format
63 string in fprintf_filtered call.
64
a379bfd0
JB
652017-09-04 John Baldwin <jhb@FreeBSD.org>
66
67 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
68 NetBSD/i386.
69 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
70
f7efc967
JB
712017-09-04 John Baldwin <jhb@FreeBSD.org>
72
73 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
74
c49fbc6c
JB
752017-09-04 John Baldwin <jhb@FreeBSD.org>
76
77 * bsd-kvm.o: Define _KMEMUSER.
78 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
79 * configure: Regenerate.
80
26562e73
JB
812017-09-04 John Baldwin <jhb@FreeBSD.org>
82
83 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
84 * i386-fbsd-nat.c: Likewise.
85
31cf1487
JB
862017-09-04 John Baldwin <jhb@FreeBSD.org>
87
88 * unittests/array-view-selftests.c: Add include of <array>.
89
5b9f8a7c
JB
902017-09-04 John Baldwin <jhb@FreeBSD.org>
91
92 * spu-tdep.c (flush_ea_cache): Add missing argument to
93 call_function_by_hand.
94
d69cf9b2
PA
952017-09-04 Pedro Alves <palves@redhat.com>
96
97 * NEWS (Safer support for debugging with no debug info): New.
98
3693fdb3
PA
992017-09-04 Pedro Alves <palves@redhat.com>
100
101 * c-exp.y (function_method, function_method_void): Add current
102 instance flags to TYPE_INSTANCE.
103 * dwarf2read.c (check_modifier): New.
104 (compute_delayed_physnames): Assert that only C++ adds delayed
105 physnames. Mark fn_fields as const/volatile depending on
106 physname.
107 * eval.c (make_params): New type_instance_flags parameter. Use
108 it as the new type's instance flags.
109 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
110 flags element and pass it to make_params.
111 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
112 instance flags element.
113 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
114 * gdbtypes.h: Include "enum-flags.h".
115 (type_instance_flags): New enum-flags type.
116 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
117 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
118 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
119 (follow_type_instance_flags): New function.
120 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
121 * parser-defs.h (follow_type_instance_flags): Declare.
122 * valops.c (value_struct_elt_for_reference): const/volatile must
123 match too.
124
e68cb8e0
PA
1252017-09-04 Pedro Alves <palves@redhat.com>
126
127 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
128 function/method scopes; lookup the nested name as a function local
129 static variable.
130
858be34c
PA
1312017-09-04 Pedro Alves <palves@redhat.com>
132
133 (%type <voidval>): Add function_method.
134 * c-exp.y (exp): New production for calls with no arguments.
135 (function_method, function_method_void_or_typelist): New
136 productions.
137 (exp): New production for "method()::static_var".
138 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
139 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
140 Handle OP_FUNC_STATIC_VAR.
141 * parse.c (operator_length_standard):
142 Handle OP_FUNC_STATIC_VAR.
143
dd5901a6
PA
1442017-09-04 Pedro Alves <palves@redhat.com>
145
146 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
147 handling.
148 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
149 Ditto.
150 * parse.c (operator_length_standard, operator_check_standard):
151 Ditto.
152 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
153
46a4882b
PA
1542017-09-04 Pedro Alves <palves@redhat.com>
155
156 * ax-gdb.c: Include "typeprint.h".
157 (gen_expr_for_cast): New function.
158 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
159 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
160 type is unknown.
161 * dwarf2read.c (new_symbol_full): Fallback to int instead of
162 nodebug_data_symbol.
163 * eval.c: Include "typeprint.h".
164 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
165 Error out if symbol has unknown type.
166 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
167 evaluate_subexp_for_cast.
168 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
169 OP_VAR_MSYM_VALUE.
170 (evaluate_subexp_for_cast): New function.
171 * gdbtypes.c (init_nodebug_var_type): New function.
172 (objfile_type): Use it to initialize types of variables with no
173 debug info.
174 * typeprint.c (error_unknown_type): New.
175 * typeprint.h (error_unknown_type): New declaration.
176 * compile/compile-c-types.c (convert_type_basic): Handle
177 TYPE_CODE_ERROR; warn and fallback to int for variables with
178 unknown type.
179
fe13dfec
PA
1802017-09-04 Pedro Alves <palves@redhat.com>
181
182 * eval.c (evaluate_var_value): New function, factored out from ...
183 (evaluate_subexp_standard): ... here.
184
d008ee21
PA
1852017-09-04 Pedro Alves <palves@redhat.com>
186
187 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
188 Remove useless assignments to 'op'.
189
827d0c51
PA
1902017-09-04 Pedro Alves <palves@redhat.com>
191
192 * eval.c (eval_skip_value): New function.
193 (evaluate_subexp_standard): Use it.
194
2c5a2be1
PA
1952017-09-04 Pedro Alves <palves@redhat.com>
196
197 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
198 function name from symbol/minsym and pass it to
199 error_call_unknown_return_type.
200
74ea4be4
PA
2012017-09-04 Pedro Alves <palves@redhat.com>
202
203 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
204 * ax-gdb.c (gen_msym_var_ref): New function.
205 (gen_expr): Handle OP_VAR_MSYM_VALUE.
206 * eval.c (evaluate_var_msym_value): New function.
207 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
208 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
209 to call_function_by_hand.
210 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
211 Handle OP_VAR_MSYM_VALUE.
212 (union exp_element) <msymbol>: New field.
213 * minsyms.h (struct type): Forward declare.
214 (find_minsym_type_and_address): Declare.
215 * parse.c (write_exp_elt_msym): New function.
216 (write_exp_msymbol): Delete, refactored as ...
217 (find_minsym_type_and_address): ... this new function.
218 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
219 (operator_length_standard, operator_check_standard): Handle
220 OP_VAR_MSYM_VALUE.
221 * std-operator.def (OP_VAR_MSYM_VALUE): New.
222
7022349d
PA
2232017-09-04 Pedro Alves <palves@redhat.com>
224
225 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
226 TYPE_GNU_IFUNC specially here. Throw error if return type is
227 unknown.
228 * ada-typeprint.c (print_func_type): Handle functions with unknown
229 return type.
230 * c-typeprint.c (c_type_print_base): Handle functions and methods
231 with unknown return type.
232 * compile/compile-c-symbols.c (convert_symbol_bmsym)
233 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
234 * compile/compile-c-types.c: Include "objfiles.h".
235 (convert_func): For functions with unknown return type, warn and
236 default to int.
237 * compile/compile-object-run.c (compile_object_run): Adjust call
238 to call_function_by_hand_dummy.
239 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
240 call_function_by_hand.
241 * eval.c (evaluate_subexp_standard): Adjust calls to
242 call_function_by_hand. Handle functions and methods with unknown
243 return type. Pass expect_type to call_function_by_hand.
244 * f-typeprint.c (f_type_print_base): Handle functions with unknown
245 return type.
246 * gcore.c (call_target_sbrk): Adjust call to
247 call_function_by_hand.
248 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
249 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
250 an integer address type instead of nodebug.
251 * guile/scm-value.c (gdbscm_value_call): Adjust call to
252 call_function_by_hand.
253 * infcall.c (error_call_unknown_return_type): New function.
254 (call_function_by_hand): New "default_return_type" parameter.
255 Pass it down.
256 (call_function_by_hand_dummy): New "default_return_type"
257 parameter. Use it instead of defaulting to int. If there's no
258 default and the return type is unknown, throw an error. If
259 there's a default return type, and the called function has no
260 debug info, then assume the function is prototyped.
261 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
262 New "default_return_type" parameter.
263 (error_call_unknown_return_type): New declaration.
264 * linux-fork.c (call_lseek): Cast return type of lseek.
265 (inferior_call_waitpid, checkpoint_command): Adjust calls to
266 call_function_by_hand.
267 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
268 calls to call_function_by_hand.
269 * m2-typeprint.c (m2_procedure): Handle functions with unknown
270 return type.
271 * objc-lang.c (lookup_objc_class, lookup_child_selector)
272 (value_nsstring, print_object_command): Adjust calls to
273 call_function_by_hand.
274 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
275 functions with unknown return type.
276 (pascal_type_print_func_varspec_suffix): New function.
277 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
278 TYPE_CODE_METHOD>: Use it.
279 * python/py-value.c (valpy_call): Adjust call to
280 call_function_by_hand.
281 * rust-lang.c (rust_evaluate_funcall): Adjust call to
282 call_function_by_hand.
283 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
284 call_function_by_hand.
285 * valops.c (value_allocate_space_in_inferior): Adjust call to
286 call_function_by_hand.
287 * typeprint.c (type_print_unknown_return_type): New function.
288 * typeprint.h (type_print_unknown_return_type): New declaration.
289
54990598
PA
2902017-09-04 Pedro Alves <palves@redhat.com>
291
292 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
293 types with more than one parameter as prototyped.
294
9a24775b
PA
2952017-09-04 Pedro Alves <palves@redhat.com>
296
297 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
298 (disassemble_command): Use gdb_disassembly_flags instead of bare
299 int.
300 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
301 (dump_insns, do_mixed_source_and_assembly_deprecated)
302 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
303 Use gdb_disassembly_flags instead of bare int.
304 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
305 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
306 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
307 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
308 (enum gdb_disassembly_flag): ... values of this new enumeration.
309 (gdb_disassembly_flags): Define.
310 (gdb_disassembly)
311 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
312 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
313 gdb_disassembly_flags instead of bare int.
314 * record-btrace.c (btrace_insn_history)
315 (record_btrace_insn_history, record_btrace_insn_history_range)
316 (record_btrace_insn_history_from): Use gdb_disassembly_flags
317 instead of bare int.
318 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
319 Use gdb_disassembly_flags instead of bare int.
320 * target-debug.h (target_debug_print_gdb_disassembly_flags):
321 Define.
322 * target-delegates.c: Regenerate.
323 * target.c (target_insn_history, target_insn_history_from)
324 (target_insn_history_range): Use gdb_disassembly_flags instead of
325 bare int.
326 * target.h: Include "disasm.h".
327 (struct target_ops) <to_insn_history, to_insn_history_from,
328 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
329 int.
330 (target_insn_history, target_insn_history_from)
331 (target_insn_history_range): Use gdb_disassembly_flags instead of
332 bare int.
333
80a65e9b
SM
3342017-09-04 Simon Marchi <simon.marchi@ericsson.com>
335
336 * cli/cli-script.c (build_command_line): For if/while commands,
337 check whether args is empty.
338
6b66338c
SM
3392017-09-04 Simon Marchi <simon.marchi@ericsson.com>
340
341 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
342 (enum command_control_type): Likewise.
343 (struct command_line): Likewise.
344 (free_command_lines): Likewise.
345 (struct command_lines_deleter): Likewise.
346 (command_line_up): Likewise.
347 (read_command_lines): Likewise.
348 (read_command_lines_1): Likewise.
349 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
350 (enum command_control_type): Likewise.
351 (struct command_line): Likewise.
352 (free_command_lines): Likewise.
353 (struct command_lines_deleter): Likewise.
354 (command_line_up): Likewise.
355 (read_command_lines): Likewise.
356 (read_command_lines_1): Likewise.
357 * breakpoint.h: Include cli/cli-script.h.
358 * extension-priv.h: Likewise.
359 * gdbcmd.h: Likewise.
360
51abb421
PA
3612017-09-04 Pedro Alves <palves@redhat.com>
362
363 * ada-lang.c (is_known_support_routine): Move sal declaration to
364 where it is initialized.
365 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
366 (parse_breakpoint_sals, decode_static_tracepoint_spec)
367 (clear_command, update_static_tracepoint): Remove init_sal
368 references. Move declarations closer to initializations.
369 * cli/cli-cmds.c (list_command): Move sal declarations closer to
370 initializations.
371 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
372 references. Move sal declarations closer to initializations.
373 * frame.c (find_frame_sal): Return a symtab_and_line via function
374 return instead of output parameter. Remove init_sal references.
375 * frame.h (find_frame_sal): Return a symtab_and_line via function
376 return instead of output parameter.
377 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
378 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
379 instead of memset.
380 (gdbscm_find_pc_line): Remove init_sal reference.
381 * infcall.c (call_function_by_hand_dummy): Remove init_sal
382 references. Move declarations closer to initializations.
383 * infcmd.c (set_step_frame): Update. Move declarations closer to
384 initializations.
385 (finish_backward): Remove init_sal references. Move declarations
386 closer to initializations.
387 * infrun.c (process_event_stop_test, handle_step_into_function)
388 (insert_hp_step_resume_breakpoint_at_frame)
389 (insert_step_resume_breakpoint_at_caller): Likewise.
390 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
391 (symbol_to_sal): Likewise.
392 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
393 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
394 to its initialization.
395 * reverse.c (save_bookmark_command): Use new/delete. Remove
396 init_sal references. Move declarations closer to initializations.
397 * source.c (get_current_source_symtab_and_line): Remove brace
398 initialization.
399 (set_current_source_symtab_and_line): Now takes the sal by const
400 reference. Remove brace initialization.
401 (line_info): Remove init_sal reference.
402 * source.h (set_current_source_symtab_and_line): Now takes a
403 symtab_and_line via const reference.
404 * stack.c (set_current_sal_from_frame): Adjust.
405 (print_frame_info): Adjust.
406 (get_last_displayed_sal): Return the sal via function return
407 instead of via output parameter. Simplify.
408 (frame_info): Adjust.
409 * stack.h (get_last_displayed_sal): Return the sal via function
410 return instead of via output parameter.
411 * symtab.c (init_sal): Delete.
412 (find_pc_sect_line): Remove init_sal references. Move
413 declarations closer to initializations.
414 (find_function_start_sal): Remove init_sal references. Move
415 declarations closer to initializations.
416 * symtab.h (struct symtab_and_line): In-class initialize all
417 fields.
418 * tracepoint.c (set_traceframe_context)
419 (print_one_static_tracepoint_marker): Remove init_sal references.
420 Move declarations closer to initializations.
421 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
422 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
423 declarations closer to initializations.
424 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
425 init_sal references. Adjust.
426
6c5b2ebe
PA
4272017-09-04 Pedro Alves <palves@redhat.com>
428
429 * ax-gdb.c (agent_command_1): Use range-for.
430 * break-catch-throw.c (re_set_exception_catchpoint): Update.
431 * breakpoint.c: Include "common/array-view.h".
432 (init_breakpoint_sal, create_breakpoint_sal): Change sals
433 parameter from struct symtabs_and_lines to
434 array_view<symtab_and_line>. Adjust. Use range-for. Update.
435 (breakpoint_sals_to_pc): Change sals parameter from struct
436 symtabs_and_lines to std::vector reference.
437 (check_fast_tracepoint_sals): Change sals parameter from struct
438 symtabs_and_lines to std::array_view. Use range-for.
439 (decode_static_tracepoint_spec): Return a std::vector instead of
440 symtabs_and_lines. Update.
441 (create_breakpoint): Update.
442 (break_range_command, until_break_command, clear_command): Update.
443 (base_breakpoint_decode_location, bkpt_decode_location)
444 (bkpt_probe_create_sals_from_location)
445 (bkpt_probe_decode_location, tracepoint_decode_location)
446 (tracepoint_probe_decode_location)
447 (strace_marker_create_sals_from_location): Return a std::vector
448 instead of symtabs_and_lines.
449 (strace_marker_create_breakpoints_sal): Update.
450 (strace_marker_decode_location): Return a std::vector instead of
451 symtabs_and_lines. Update.
452 (update_breakpoint_locations): Change struct symtabs_and_lines
453 parameters to gdb::array_view. Adjust.
454 (location_to_sals): Return a std::vector instead of
455 symtabs_and_lines. Update.
456 (breakpoint_re_set_default): Use std::vector instead of struct
457 symtabs_and_lines.
458 (decode_location_default): Return a std::vector instead of
459 symtabs_and_lines. Update.
460 * breakpoint.h: Include "common/array-view.h".
461 (struct breakpoint_ops) <decode_location>: Now returns a
462 std::vector instead of returning a symtabs_and_lines via output
463 parameter.
464 (update_breakpoint_locations): Change sals parameters to use
465 gdb::array_view.
466 * cli/cli-cmds.c (edit_command, list_command): Update to use
467 std::vector and gdb::array_view.
468 (ambiguous_line_spec): Adjust to use gdb::array_view and
469 range-for.
470 (compare_symtabs): Rename to ...
471 (cmp_symtabs): ... this. Change parameters to symtab_and_line
472 const reference and adjust.
473 (filter_sals): Rewrite using std::vector and standard algorithms.
474 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
475 (jump_command): Update to use std::vector.
476 * linespec.c (struct linespec_state) <canonical_names>: Update
477 comment.
478 (add_sal_to_sals_basic): Delete.
479 (add_sal_to_sals, filter_results, convert_results_to_lsals)
480 (decode_line_2, create_sals_line_offset)
481 (convert_address_location_to_sals, convert_linespec_to_sals)
482 (convert_explicit_location_to_sals, parse_linespec)
483 (event_location_to_sals, decode_line_full, decode_line_1)
484 (decode_line_with_current_source)
485 (decode_line_with_last_displayed, decode_objc)
486 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
487 (linespec_result::~linespec_result): Adjust to use std::vector
488 instead of symtabs_and_lines.
489 * linespec.h (linespec_sals::sals): Now a std::vector.
490 (struct linespec_result): Use std::vector, bool, and in-class
491 initialization.
492 (decode_line_1, decode_line_with_current_source)
493 (decode_line_with_last_displayed): Return std::vector.
494 * macrocmd.c (info_macros_command): Use std::vector.
495 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
496 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
497 std::vector.
498 * probe.h (parse_probes): Return a std::vector.
499 * python/python.c (gdbpy_decode_line): Use std::vector and
500 gdb::array_view.
501 * source.c (select_source_symtab, line_info): Use std::vector.
502 * stack.c (func_command): Use std::vector.
503 * symtab.h (struct symtabs_and_lines): Delete.
504 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
505
7c44b49c
PA
5062017-09-04 Pedro Alves <palves@redhat.com>
507
508 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
509 unittests/array-view-selftests.c.
510 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
511 * common/array-view.h: New file.
512 * unittests/array-view-selftests.c: New file.
513
e439fa14
PA
5142017-09-04 Pedro Alves <palves@redhat.com>
515
516 * cli/cli-cmds.c (edit_command): Pass message to
517 ambiguous_line_spec.
518 (list_command): Pass message to ambiguous_line_spec. Say
519 "first"/"last" instead of "start" and "end" to be consistent with
520 the manual.
521 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
522 them to print formatted message.
523
7525b645
PA
5242017-09-04 Pedro Alves <palves@redhat.com>
525
526 * btrace.c (ftrace_add_pt): Pass btrace_insn to
527 ftrace_update_insns by reference instead of pointer.
528
badc0020
YQ
5292017-09-04 Yao Qi <yao.qi@linaro.org>
530
531 * i386-go32-tdep.c: Include x86-xstate.h.
532 (i386_go32_init_abi): Call i386_target_description.
533 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
534 if xcr0 is X86_XSTATE_X87_MASK.
535 * i386-tdep.h (tdesc_i386): Remove the declaration.
536 (tdesc_i386_mmx): Likewise.
537
d78bdb54
YQ
5382017-09-04 Yao Qi <yao.qi@linaro.org>
539
540 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
541 X86_XSTATE_SSE_MASK instead of 0.
542
ca1fa5ee
YQ
5432017-09-04 Yao Qi <yao.qi@linaro.org>
544
545 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
546 i386_target_description.
547 * i386-fbsd-nat.c (i386fbsd_read_description): Call
548 i386_target_description.
549 * i386-tdep.c (i386_gdbarch_init): Likewise.
550
2434b019
YQ
5512017-09-04 Yao Qi <yao.qi@linaro.org>
552
553 * amd64-darwin-tdep.c: Include "x86-xstate.h".
554 (x86_darwin_init_abi_64): Call amd64_target_description.
555 * amd64-dicos-tdep.c: Likewise.
556 * amd64-fbsd-nat.c: Likewise.
557 * amd64-fbsd-tdep.c: Likewise.
558 * amd64-nbsd-tdep.c: Likewise.
559 * amd64-obsd-tdep.c: Likewise.
560 * amd64-sol2-tdep.c: Likewise.
561 * amd64-windows-tdep.c: Likewise.
562 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
563
0860c437
SM
5642017-09-04 Simon Marchi <simon.marchi@ericsson.com>
565
566 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
567 (btrace_function) <insn>: Change type to use std::vector.
568 * btrace.c (ftrace_debug, ftrace_call_num_insn,
569 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
570 ftrace_update_insns, ftrace_compute_global_level_offset,
571 btrace_stitch_bts, btrace_clear, btrace_insn_get,
572 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
573 change to std::vector.
574 (ftrace_update_insns): Adjust to change to std::vector, change
575 type of INSN parameter.
576 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
577 * record-btrace.c (btrace_call_history_insn_range,
578 btrace_compute_src_line_range,
579 record_btrace_frame_prev_register): Adjust to change to
580 std::vector.
581 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
582 to change to std::vector.
583
0638b7f9
TT
5842017-09-03 Tom Tromey <tom@tromey.com>
585
586 * corefile.c (reopen_exec_file): Use std::string.
587
8f84fb0e
TT
5882017-09-03 Tom Tromey <tom@tromey.com>
589
590 * compile/compile.c (compile_register_name_mangled): Return
591 std::string.
592 * compile/compile-loc2c.c (pushf_register_address): Update.
593 (pushf_register): Update.
594 * compile/compile-c-types.c (convert_array): Update.
595 * compile/compile-c-symbols.c (generate_vla_size): Update.
596 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
597 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
598 (convert_one_symbol): Update.
599 (generate_c_for_for_one_variable): Update.
600 * compile/compile-c-support.c (c_get_range_decl_name): Return a
601 std::string.
602 (generate_register_struct): Update.
603 * compile/compile-internal.h (c_get_range_decl_name): Return a
604 std::string.
605 (compile_register_name_mangled): Return std::string.
606
18e9961f
TT
6072017-09-03 Tom Tromey <tom@tromey.com>
608
609 * utils.c (perror_string): Return a std::string.
610 (throw_perror_with_name, perror_warning_with_name): Update.
611
45343786
TT
6122017-09-03 Tom Tromey <tom@tromey.com>
613
614 * demangle.c (demangle_command): Use std::string,
615 unique_xmalloc_ptr.
616
b57af503
TT
6172017-09-03 Tom Tromey <tom@tromey.com>
618
619 * cli/cli-setshow.c (do_set_command): Use std::string.
620
6eecf35f
TT
6212017-09-03 Tom Tromey <tom@tromey.com>
622
623 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
624
56496dd4
TT
6252017-09-03 Tom Tromey <tom@tromey.com>
626
627 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
628
e91a1fa7
TT
6292017-09-03 Tom Tromey <tom@tromey.com>
630
631 * mi/mi-cmd-env.c (env_execute_cli_command): Use
632 gdb::unique_xmalloc_ptr.
633
7ffd83d7
TT
6342017-09-03 Tom Tromey <tom@tromey.com>
635
636 * thread.c (print_thread_info_1): Use string_printf.
637 (thread_apply_command, thread_apply_all_command): Use
638 std::string.
639
1ccbe998
TT
6402017-09-03 Tom Tromey <tom@tromey.com>
641
642 * valprint.c (val_print_string): Update.
643 * gdbcore.h (memory_error_message): Return std::string.
644 * corefile.c (memory_error_message): Return std::string.
645 (memory_error): Update.
646 * breakpoint.c (insert_bp_location): Update.
647
23fdd69e
SM
6482017-09-03 Simon Marchi <simon.marchi@ericsson.com>
649
650 * target/waitstatus.h (target_waitstatus_to_string): Change
651 return type to std::string.
652 * target/waitstatus.c (target_waitstatus_to_string): Return
653 std::string.
654 * target.h (target_waitstatus_to_string): Remove declaration.
655 * infrun.c (resume, clear_proceed_status_thread,
656 print_target_wait_results, do_target_wait, save_waitstatus,
657 stop_all_threads): Adjust.
658 * record-btrace.c (record_btrace_wait): Adjust.
659 * target-debug.h
660 (target_debug_print_struct_target_waitstatus_p): Adjust.
661
5c811d30
JK
6622017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
663
664 PR gdb/22046
665 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
666 detection.
667
0a2dde4a
SDJ
6682017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
669
670 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
671 for setting/unsetting environment variables on the remote target.
672 (New remote packets): Add entries for QEnvironmentHexEncoded,
673 QEnvironmentUnset and QEnvironmentReset.
674 * common/environ.c (gdb_environ::operator=): Extend method to
675 handle m_user_set_env_list and m_user_unset_env_list.
676 (gdb_environ::clear): Likewise.
677 (match_var_in_string): Change type of first parameter from 'char
678 *' to 'const char *'.
679 (gdb_environ::set): Extend method to handle
680 m_user_set_env_list and m_user_unset_env_list.
681 (gdb_environ::unset): Likewise.
682 (gdb_environ::clear_user_set_env): New method.
683 (gdb_environ::user_set_envp): Likewise.
684 (gdb_environ::user_unset_envp): Likewise.
685 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
686 m_user_unset_env_list on move constructor/assignment.
687 (unset): Add new default parameter 'update_unset_list = true'.
688 (clear_user_set_env): New method.
689 (user_set_envp): Likewise.
690 (user_unset_envp): Likewise.
691 (m_user_set_env_list): New std::set.
692 (m_user_unset_env_list): Likewise.
693 * common/rsp-low.c (hex2str): New function.
694 (bin2hex): New overload for bin2hex function.
695 * common/rsp-low.c (hex2str): New prototype.
696 (str2hex): New overload prototype.
697 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
698 QEnvironmentUnset and QEnvironmentReset.
699 (remote_protocol_features): Add QEnvironmentHexEncoded,
700 QEnvironmentUnset and QEnvironmentReset packets.
701 (send_environment_packet): New function.
702 (extended_remote_environment_support): Likewise.
703 (extended_remote_create_inferior): Call
704 extended_remote_environment_support.
705 (_initialize_remote): Add QEnvironmentHexEncoded,
706 QEnvironmentUnset and QEnvironmentReset packet configs.
707 * unittests/environ-selftests.c (gdb_selftest_env_var):
708 New variable.
709 (test_vector_initialization): New function.
710 (test_init_from_host_environ): Likewise.
711 (test_reinit_from_host_environ): Likewise.
712 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
713 Likewise.
714 (test_unset_set_empty_vector): Likewise.
715 (test_vector_clear): Likewise.
716 (test_std_move): Likewise.
717 (test_move_constructor):
718 (test_self_move): Likewise.
719 (test_set_unset_reset): Likewise.
720 (run_tests): Rewrite in terms of the functions above.
721
654670a4
WP
7222017-08-31 Weimin Pan <weimin.pan@oracle.com>
723
724 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
725 (adi_available): Use a temp variable of type CORE_ADDR as argument
726 3 when calling target_auxv_search.
727 (adi_normalize_address): Use masks and xor operators to calculate
728 normalized address.
729 (adi_read_versions, adi_write_versions, adi_print_versions)
730 (do_examine, do_assign): Use paddress.
731
7755ddb7
JB
7322017-08-29 John Baldwin <jhb@FreeBSD.org>
733
734 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
735 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
736 out of loop and add supply of FIR.
737 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
738 add collect of FIR.
739
fd437cbc
SM
7402017-08-28 Simon Marchi <simon.marchi@ericsson.com>
741
3804a343 742 PR gdb/21827
fd437cbc
SM
743 * cli/cli-script.c (define_command): Don't convert command name
744 to lower case.
745
988f6b3d
JB
7462017-08-25 Joel Brobecker <brobecker@adacore.com>
747
748 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
749 Update all callers accordingly. Remove all code blocks handling
750 the case where DISPP is not NULL.
751
663c44ac
JK
7522017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
753
754 PR symtab/22003
755 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
756 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
757 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
758
f1902523
JK
7592017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
760
761 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
762 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
763 (read_comp_units_from_section): New parameter abbrev_section, use
764 read_and_check_comp_unit_head, allocate signatured_type if needed.
765 (create_all_comp_units): Update read_comp_units_from_section caller.
766
87215ad1
SDJ
7672017-08-23 Pedro Alves <palves@redhat.com>
768
769 PR remote/21852
770 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
771 to null_ptid and switch to thread without reading the registers
772 after adding the inferior.
773
6e41ddec
JK
7742017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
775
776 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
777 compile-gcc.
778 * compile/compile.c (compile_gcc, show_compile_gcc): New.
779 (compile_to_object): Implement compile_gcc.
780 (_initialize_compile): Install "set compile-gcc". Initialize
781 compile_gcc.
782
e68c32d5
JK
7832017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
784
785 * compile/compile.c (compile_to_object): Conditionally call
786 set_verbose. Conditionally call compile or compile_v0.
787
58afddc6
WP
7882017-08-07 Weimin Pan <weimin.pan@oracle.com>
789
790 * sparc64-tdep.h: (adi_normalize_address): New export.
791 * sparc-nat.h: (open_adi_tag_fd): New export.
792 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
793 * sparc64-linux-tdep.c:
794 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
795 (sparc64_linux_handle_segmentation_fault): New function.
796 (sparc64_linux_init_abi): Register
797 sparc64_linux_handle_segmentation_fault
798 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
799 (sparc64_addr_bits_remove): New function.
800 (sparc64_init_abi): Register sparc64_addr_bits_remove.
801 (MAX_PROC_NAME_SIZE): New macro.
802 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
803 (sparc64adilist): New variable.
804 (adi_proc_list): New variable.
805 (find_adi_info): New function.
806 (add_adi_info): New function.
807 (get_adi_info_proc): New function.
808 (get_adi_info): New function.
809 (info_adi_command): New function.
810 (read_maps_entry): New function.
811 (adi_available): New function.
812 (adi_normalize_address): New function.
813 (adi_align_address): New function.
814 (adi_convert_byte_count): New function.
815 (adi_tag_fd): New function.
816 (adi_is_addr_mapped): New function.
817 (adi_read_versions): New function.
818 (adi_write_versions): New function.
819 (adi_print_versions): New function.
820 (do_examine): New function.
821 (do_assign): New function.
822 (adi_examine_command): New function.
823 (adi_assign_command): New function.
824 (_initialize_sparc64_adi_tdep): New function.
825
11db9430
SM
8262017-08-22 Simon Marchi <simon.marchi@ericsson.com>
827
828 * breakpoint.c (breakpoints_info): Rename to ...
829 (info_breakpoints_command): ... this.
830 (watchpoints_info): Rename to ...
831 (info_watchpoints_command): ... this.
832 (tracepoints_info): Rename to ...
833 (info_tracepoints_command): ... this.
834 (_initialize_breakpoint): Adjust.
835 * dcache.c (dcache_info): Rename to ...
836 (info_display_command): ... this.
837 (_initialize_dcache): Adjust.
838 * frame.h (args_info): Rename to ...
839 (info_args_command): ... this.
840 (locals_info): Rename to ...
841 (info_locals_command): ... this.
842 * infcmd.c (nofp_registers_info): Rename to ...
843 (info_registers_command): ... this.
844 (float_info): Rename to ...
845 (info_float_command): ... this.
846 (program_info): Rename to ...
847 (info_program_command): ... this.
848 (all_registers_info): Rename to ...
849 (info_all_registers_command): ... this.
850 (vector_info): Rename to ...
851 (info_vector_command): ... this.
852 (float_info): Rename to ...
853 (info_float_command): ... this.
854 (_initialize_infcmd): Adjust.
855 * inferior.h (term_info): Rename to ...
856 (info_terminal_command): ... this.
857 * inflow.c (term_info): Rename to ...
858 (info_terminal_command): ... this.
859 (_initialize_inflow): Adjust.
860 * infrun.c (signals_info): Rename to ...
861 (info_signals_command): ... this.
862 (_initialize_infrun): Adjust.
863 * objc-lang.c (classes_info): Rename to ...
864 (info_classes_command): ... this.
865 (selectors_info): Rename to ...
866 (info_selectors_command): ... this.
867 (_initialize_objc_language): Adjust.
868 * printcmd.c (sym_info): Rename to ...
869 (info_symbol_command): ... this.
870 (address_info): Rename to ...
871 (info_address_command): ... this.
872 (display_info): Rename to ...
873 (info_display_command): ... this.
874 (_initialize_printcmd): Adjust.
875 * reverse.c (bookmarks_info): Rename to ...
876 (info_breakpoints_command): ... this.
877 (_initialize_reverse): Adjust.
878 * ser-go32.c (dos_info): Rename to ...
879 (info_serial_command): ... this.
880 (_initialize_ser_dos): Adjust.
881 * skip.c (skip_info): Rename to ...
882 (info_skip_command): ... this.
883 (_initialize_step_skip): Adjust.
884 * source.c (line_info): Rename to ...
885 (info_line_command): ... this.
886 (source_info): Rename to ...
887 (info_source_command)
888 * stack.c (frame_info): Rename to ...
889 (info_frame_command): ... this.
890 (locals_info): Rename to ...
891 (info_locals_command): ... this.
892 (args_info): Rename to ...
893 (info_args_command): ... this.
894 (_initialize_stack): Adjust.
895 * symtab.c (sources_info): Rename to ...
896 (info_sources_command): ... this.
897 (variables_info): Rename to ...
898 (info_variables_command): ... this.
899 (functions_info): Rename to ...
900 (info_functions_command): ... this.
901 (types_info): Rename to ...
902 (info_types_command): ... this.
903 (_initialize_symtab): Adjust.
904 * target.c (target_info): Rename to ...
905 (info_target_command): ... this.
906 (initialize_targets): Adjust.
907 * tracepoint.c (tvariables_info): Rename to ...
908 (info_tvariables_command): ... this.
909 (scope_info): Rename to ...
910 (info_scope_command): ... this.
911 (trace_dump_actions): Adjust.
912 (_initialize_tracepoint): Adjust.
913
b270e6f9
TT
9142017-08-22 Tom Tromey <tom@tromey.com>
915
916 * breakpoint.h (install_breakpoint): Update.
917 * breakpoint.c (add_solib_catchpoint): Update.
918 (install_breakpoint): Change argument to a std::unique_ptr.
919 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
920 (create_breakpoint_sal, create_breakpoint): Update.
921 (watch_command_1, catch_exec_command_1)
922 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
923 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
924 Return the breakpoint.
925 (set_raw_breakpoint_without_location, set_raw_breakpoint)
926 (new_single_step_breakpoint): Update.
927 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
928 std::unique_ptr.
929 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
930 std::unique_ptr.
931 * break-catch-sig.c (create_signal_catchpoint): Use
932 std::unique_ptr.
933 * ada-lang.c (create_ada_exception_catchpoint): Use
934 std::unique_ptr.
935
36bd8eaa
TT
9362017-08-22 Tom Tromey <tom@tromey.com>
937
938 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
939
56f37645
TT
9402017-08-22 Tom Tromey <tom@tromey.com>
941
942 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
943 (lookup_partial_symbol): Update.
944
0b581c69
TT
9452017-08-22 Tom Tromey <tom@tromey.com>
946
947 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
948 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
949 (find_and_open_source, symtab_to_fullname): Update.
950 * psymtab.c (psymtab_to_fullname): Update.
951
14278e1f
TT
9522017-08-22 Tom Tromey <tom@tromey.com>
953
954 * exec.c (exec_file_attach): Update.
955 * linux-thread-db.c (try_thread_db_load): Update.
956 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
957 * utils.c (gdb_realpath): Change return type.
958 (gdb_realpath_keepfile): Update.
959 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
960 (_initialize_utils): Register the new self test.
961 * source.c (openp): Update.
962 (find_and_open_source): Update.
963 * nto-tdep.c (nto_find_and_open_solib): Update.
964 * main.c (set_gdb_data_directory): Update.
965 (captured_main_1): Update.
966 * dwarf2read.c (dwarf2_get_dwz_file): Update
967 (dw2_map_symbol_filenames): Update.
968 * auto-load.c (auto_load_safe_path_vec_update): Update.
969 (filename_is_in_auto_load_safe_path_vec): Change type of
970 "filename_realp".
971 (auto_load_objfile_script): Update.
972 (file_is_auto_load_safe): Update. Use std::string.
973 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
974
4971c9a7
TT
9752017-08-22 Tom Tromey <tom@tromey.com>
976
977 * utils.c (gdb_realpath_keepfile): Return a
978 gdb::unique_xmalloc_ptr.
979 * exec.c (exec_file_attach): Update.
980 * utils.h (gdb_realpath_keepfile): Return a
981 gdb::unique_xmalloc_ptr.
982
e3e41d58
TT
9832017-08-22 Tom Tromey <tom@tromey.com>
984
985 * compile/compile.c (compile_file_command): Use
986 gdb::unique_xmalloc_ptr, std::string.
987 * utils.c (gdb_abspath): Change return type.
988 * source.c (openp): Update.
989 * objfiles.c (allocate_objfile): Update.
990 * main.c (set_gdb_data_directory): Update.
991 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
992
0d999a6e
ZZ
9932017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
994
995 * cli-cmds.c (list_commands): List actual code around more than
996 one location.
997
329d5e7e
JB
9982017-08-21 John Baldwin <jhb@FreeBSD.org>
999
1000 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
1001
bf223d3e
PA
10022017-08-21 Pedro Alves <palves@redhat.com>
1003
1004 PR gdb/19487
1005 * c-exp.y (variable production): Handle function aliases.
1006 * minsyms.c (msymbol_is_text): New function.
1007 * minsyms.h (msymbol_is_text): Declare.
1008 * symtab.c (find_function_alias_target): New function.
1009 * symtab.h (find_function_alias_target): Declare.
1010
c973d0aa
PA
10112017-08-21 Pedro Alves <palves@redhat.com>
1012
1013 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
1014 typedefs.
1015 * typeprint.c (whatis_exp): If handling "whatis", and expression
1016 is OP_TYPE, strip one typedef level. Otherwise don't strip
1017 typedefs here.
1018 * valops.c (value_cast): Save "to" type before resolving
1019 stubs/typedefs. Use that type as resulting value's type.
1020
2989a365
TT
10212017-08-18 Tom Tromey <tom@tromey.com>
1022 Pedro Alves <palves@redhat.com>
1023
1024 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
1025 * sol-thread.c (sol_thread_resume, sol_thread_wait)
1026 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
1027 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
1028 * proc-service.c (ps_xfer_memory): Use scoped_restore.
1029 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
1030 (linux_get_siginfo_data): Add "thread" argument. Use
1031 scoped_restore.
1032 * linux-nat.c (linux_child_follow_fork)
1033 (check_stopped_by_watchpoint): Use scoped_restore.
1034 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
1035 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
1036 (restore_inferior_ptid, save_inferior_ptid): Remove.
1037 * btrace.c (btrace_fetch): Use scoped_restore.
1038 * bsd-uthread.c (bsd_uthread_fetch_registers)
1039 (bsd_uthread_store_registers): Use scoped_restore.
1040 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
1041 scoped_restore.
1042 * aix-thread.c (aix_thread_resume, aix_thread_wait)
1043 (aix_thread_xfer_partial): Use scoped_restore.
1044 * inferior.h (save_inferior_ptid): Remove.
1045
e60eb288
YQ
10462017-08-18 Yao Qi <yao.qi@linaro.org>
1047
1048 PR tdep/21818
1049 * arm-tdep.c (gdb_print_insn_arm): Mark
1050 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
1051
6d580b63
YQ
10522017-08-18 Yao Qi <yao.qi@linaro.org>
1053
1054 * NEWS: Mention GDBserver's new option "--selftest".
1055 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
1056 * selftest.c: Move it to common/selftest.c.
1057 * selftest.h: Move it to common/selftest.h.
1058 * selftest-arch.c (reset): New function.
1059 (tests_with_arch): Call reset.
1060
86dcbf50
YQ
10612017-08-18 Yao Qi <yao.qi@linaro.org>
1062
1063 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
1064 instead of exception_fprintf and printf_filtered.
1065
7649770c
YQ
10662017-08-18 Yao Qi <yao.qi@linaro.org>
1067
1068 * selftest.c (register_self_test): Rename it to
1069 selftests::register_test.
1070 (run_self_tests): selftest::run_tests.
1071 * selftest.h: Update declarations.
1072 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
1073 selftests::register_test_foreach_arch.
1074 * selftest-arch.h: Update declaration.
1075 * aarch64-tdep.c: Update.
1076 * arm-tdep.c: Likewise.
1077 * disasm-selftests.c: Likewise.
1078 * dwarf2loc.c: Likewise.
1079 * dwarf2-frame.c: Likewise.
1080 * findvar.c: Likewise.
1081 * gdbarch-selftests.c: Likewise.
1082 * maint.c (maintenance_selftest): Likewise.
1083 * regcache.c: Likewise.
1084 * rust-exp.y: Likewise.
1085 * selftest-arch.c: Likewise.
1086 * unittests/environ-selftests.c: Likewise.
1087 * unittests/function-view-selftests.c: Likewise.
1088 * unittests/offset-type-selftests.c: Likewise.
1089 * unittests/optional-selftests.c: Likewise.
1090 * unittests/scoped_restore-selftests.c: Likewise.
1091 * utils-selftests.c: Likewise.
1092
b0cba12e
PA
10932017-08-17 Pedro Alves <palves@redhat.com>
1094
1095 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
1096 local.
1097
4c8aa72d
PA
10982017-08-17 Pedro Alves <palves@redhat.com>
1099
1100 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
1101 field.
1102 (reset_die_in_process): Delete, replaced by ...
1103 (process_die_scope): ... this new class. Make it responsible for
1104 freeing cu->line_header too.
1105 (process_die): Use process_die_scope.
1106 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
1107 cu->line_header_die_owner. Don't release the line header if it's
1108 owned by the CU.
1109 (setup_type_unit_groups): Make the CU/DIE own the line header.
1110 Don't release the line header here.
1111
ba713918
AL
11122017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
1113
1114 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
1115
44d0fb3a
RK
11162017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
1117
1118 * NEWS: Mention new shortcuts for nexti and stepi in TUI
1119 Single-Key mode
1120
a5afdb16
RK
11212017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
1122
1123 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
1124 mode command list.
1125
47613aeb
SH
11262017-08-15 Stafford Horne <shorne@gmail.com>
1127
1128 * MAINTAINERS (Write After Approval): Add Stafford Horne.
1129
9c3cc999
SH
11302017-08-15 Stafford Horne <shorne@gmail.com>
1131
1132 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
1133
206726fb
SDJ
11342017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
1135
1136 PR gdb/21954
1137 * infcmd.c (unset_environment_command): Use the 'clear' method on
1138 the environment instead of resetting it.
1139
0335ac6d
JB
11402017-08-15 John Baldwin <jhb@FreeBSD.org>
1141
1142 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
1143 platforms.
1144
d3abe1c8
TT
11452017-08-14 Tom Tromey <tom@tromey.com>
1146
1147 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
1148 (print_binary_chars): Likewise.
1149 (BITS_IN_BYTES): Remove.
1150
d6382fff
TT
11512017-08-14 Tom Tromey <tom@tromey.com>
1152
1153 PR gdb/21675
1154 * valprint.c (LOW_ZERO): Change value to 034.
1155 (print_octal_chars): Add static_asserts for octal constants.
1156 * printcmd.c (print_scalar_formatted): Add 'd' case.
1157
f978cb06
TT
11582017-08-11 Tom Tromey <tom@tromey.com>
1159
1160 * symfile.c (add_symbol_file_command): Use std::vector.
1161
2f5404b3
TT
11622017-08-14 Tom Tromey <tom@tromey.com>
1163
1164 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
1165 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
1166 std::move.
1167 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
1168
de7985c3
PA
11692017-08-11 Pedro Alves <palves@redhat.com>
1170
1171 * infrun.c (process_event_stop_test): Adjust
1172 function_name_is_marked_for_skip call.
1173 * skip.c: Include <list>.
1174 (skiplist_entry): Make it a class with private fields, and
1175 getters/setters.
1176 (skiplist_entry_chain): Delete.
1177 (skiplist_entries): New.
1178 (skiplist_entry_count): Delete.
1179 (highest_skiplist_entry_num): New.
1180 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
1181 (add_skiplist_entry): Delete.
1182 (skiplist_entry::skiplist_entry): New.
1183 (skiplist_entry::add_entry): New.
1184 (skip_file_command, skip_function): Adjust.
1185 (compile_skip_regexp): Delete.
1186 (skip_command): Don't compile regexp here. Adjust to use
1187 skiplist_entry::add_entry.
1188 (skip_info): Adjust to use range-for and getters.
1189 (skip_enable_command, skip_disable_command): Adjust to use
1190 range-for and setters.
1191 (skip_delete_command): Adjust to use std::list.
1192 (add_skiplist_entry): Delete.
1193 (skip_file_p): Delete, refactored as ...
1194 (skiplist_entry::do_skip_file_p): ... this new method.
1195 (skip_gfile_p): Delete, refactored as ...
1196 (skiplist_entry::do_gskip_file_p): ... this new method.
1197 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
1198 (skiplist_entry::skip_function_p): ... this new method.
1199 (function_name_is_marked_for_skip): Now returns bool, and takes
1200 the function sal by const reference. Adjust to use range-for and
1201 skiplist_entry methods.
1202 (_initialize_step_skip): Remove references to
1203 skiplist_entry_chain, skiplist_entry_count.
1204 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
1205 takes the function sal by const reference.
1206
be7d3cd5
YQ
12072017-08-11 Yao Qi <yao.qi@linaro.org>
1208
1209 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
1210 (dwarf2_frame_cache): Remove reset_cache_cleanup.
1211 (dwarf2_frame_cache):
1212 * frame-unwind.c (frame_unwind_try_unwinder): Catch
1213 RETURN_MASK_ALL and set *this_case to NULL.
1214 * frame-unwind.h: Update comments.
1215
1c90d9f0
YQ
12162017-08-11 Yao Qi <yao.qi@linaro.org>
1217
1218 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
1219 (dwarf2_frame_state_copy_regs): Remove.
1220 (dwarf2_frame_state_free_regs): Remove.
1221 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
1222 (dwarf2_restore_rule): Call method .alloc_regs instead of
1223 dwarf2_frame_state_alloc_regs.
1224 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
1225 constructor. Call std::move.
1226 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
1227 (dwarf2_frame_cache): Likewise.
1228
1229 [GDB_SELF_TEST]: Include selftest.h and
1230 selftest-arch.h.
1231 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
1232 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
1233 execute_cfa_program_test.
1234
1235 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
1236 copy ctor, assignment operator, move assignment.
1237 <alloc_regs>: New method.
1238 <swap>: New method.
1239 (struct dwarf2_frame_state): Delete dtor.
1240 (dwarf2_frame_state_alloc_regs): Remove declaration.
1241 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
1242 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
1243
afe37d6b
YQ
12442017-08-11 Yao Qi <yao.qi@linaro.org>
1245
1246 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
1247 (dwarf2_frame_state::dwarf2_frame_state): New.
1248 (dwarf2_frame_state::~dwarf2_frame_state): New.
1249 (dwarf2_fetch_cfa_info): Update.
1250 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
1251 rather than a pointer. Update code.
1252 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
1253 dtor.
1254 <data_align, code_align, retaddr_column>: Change them to const.
1255 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
1256 to bool.
1257
b348037f
YQ
12582017-08-11 Yao Qi <yao.qi@linaro.org>
1259
1260 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
1261 <loc.exp>: New field.
1262 * dwarf2-frame.c (execute_cfa_program): Update.
1263 (dwarf2_frame_prev_register): Update.
1264
e7c9de26
PA
12652017-08-10 Pedro Alves <palves@redhat.com>
1266
1267 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
1268
e8c6b620
JB
12692017-08-09 John Baldwin <jhb@FreeBSD.org>
1270
1271 * fbsd-nat.c (struct fbsd_fork_info): Remove.
1272 (fbsd_pending_children): Use std::list.
1273 (fbsd_remember_child): Likewise.
1274 (fbsd_is_child_pending): Likewise.
1275 (fbsd_pending_vfork_done): Use std::forward_list.
1276 (fbsd_add_vfork_done): Likewise.
1277 (fbsd_is_vfork_done_pending): Likewise.
1278 (fbsd_next_vfork_done): Likewise.
1279
e4a26669
JB
12802017-08-09 John Baldwin <jhb@FreeBSD.org>
1281
1282 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
1283 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
1284 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
1285 for `mapfilename'.
1286 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 1287 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 1288
142311d3
JB
12892017-08-09 John Baldwin <jhb@FreeBSD.org>
1290
1291 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
1292 "filestuff.h".
1293 (fbsd_find_memory_regions): Fix `mapfile' initialization.
1294
42fa2e0e
TT
12952017-08-09 Tom Tromey <tom@tromey.com>
1296
1297 * skip.c (skiplist_entry): New constructor.
1298 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
1299 (skiplist_entry::file_is_glob): Now bool.
1300 (skiplist_entry::file, skiplist_entry::function): Now
1301 std::string.
1302 (make_skip_entry): Return a unique_ptr. Use new.
1303 (free_skiplist_entry, free_skiplist_entry_cleanup)
1304 (make_free_skiplist_entry_cleanup): Remove.
1305 (skip_command, skip_disable_command, add_skiplist_entry)
1306 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
1307 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
1308 (function_name_is_marked_for_skip): Update.
1309 (skip_delete_command): Update. Use delete.
1310
cd3af38d
JW
13112017-08-09 Jiong Wang <jiong.wang@arm.com>
1312
1313 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
1314 (aarch64_linux_core_read_description): New function.
1315 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
1316
29592bde
PA
13172017-08-09 Pedro Alves <palves@redhat.com>
1318
1319 * cp-name-parser.y (cp_comp_to_string): Return a
1320 gdb::unique_xmalloc_ptr<char>.
1321 * cp-support.c (replace_typedefs_qualified_name)
1322 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
1323 (cp_canonicalize_string_full): Use op= instead of explicit
1324 convertion.
1325 (cp_class_name_from_physname, method_name_from_physname)
1326 (cp_func_name, cp_remove_params): Adjust to use
1327 gdb::unique_xmalloc_ptr<char>.
1328 * cp-support.h (cp_comp_to_string): Return a
1329 gdb::unique_xmalloc_ptr<char>.
1330 * python/py-type.c (typy_lookup_type): Adjust to use
1331 gdb::unique_xmalloc_ptr<char>.
1332
b3340438
L
13332017-08-09 H.J. Lu <hongjiu.lu@intel.com>
1334
1335 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
1336
e88e8651
YQ
13372017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
1338 Yao Qi <yao.qi@linaro.org>
1339
1340 * cp-support.c (cp_canonicalize_string_full): Use
1341 gdb::unique_xmalloc_ptr<char>.
1342 (cp_canonicalize_string): Likewise.
1343
f5a29eb0
YQ
13442017-08-09 Yao Qi <yao.qi@linaro.org>
1345
1346 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
1347 * regformats/i386/amd64-avx-avx512.dat: Remove.
1348 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
1349 * regformats/i386/amd64-avx-mpx.dat:Remove.
1350 * regformats/i386/amd64-avx.dat: Remove.
1351 * regformats/i386/amd64-mpx.dat: Remove.
1352 * regformats/i386/i386-avx-avx512.dat: Remove.
1353 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
1354 * regformats/i386/i386-avx-mpx.dat: Remove.
1355 * regformats/i386/i386-mmx.dat: Remove.
1356 * regformats/i386/i386-mpx.dat: Remove.
1357
57757c2f
YQ
13582017-08-09 Yao Qi <yao.qi@linaro.org>
1359
1360 * amd64-tdep.h (tdesc_x32): Remove the declaration.
1361 * amd64-tdep.c: Don't include features/i386/x32*.c.
1362 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
1363 functions.
1364 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
1365 and i386/x32-avx-avx512.
1366 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
1367 and i386/x32.xml.
1368 * features/i386/x32-avx-avx512.c: Removed.
1369 * features/i386/x32-avx-avx512.xml: Removed.
1370 * features/i386/x32-avx.c: Removed.
1371 * features/i386/x32-avx.xml: Removed.
1372 * features/i386/x32.c: Removed.
1373 * features/i386/x32.xml: Removed.
1374 * regformats/i386/x32-avx-avx512.dat: Removed.
1375 * regformats/i386/x32-avx.dat: Removed.
1376 * regformats/i386/x32.dat: Removed.
1377
ba7b109b
MR
13782017-08-07 Maciej W. Rozycki <macro@imgtec.com>
1379
1380 PR breakpoints/21886
1381 * mem-break.c (default_memory_insert_breakpoint): Use
1382 `->placed_address' rather than `->reqstd_address' for the
1383 breakpoint location.
1384
e347efc3
MR
13852017-08-07 Maciej W. Rozycki <macro@imgtec.com>
1386
1387 * arch-utils.c (default_print_insn): Remove arch/mach/endian
1388 assertions.
1389
0dba2a6c
MR
13902017-08-07 Maciej W. Rozycki <macro@imgtec.com>
1391
1392 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
1393 a union of `tdep_info', `tdesc_data' and `id'.
1394 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
1395 rather than `info.tdep_info'.
1396 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
1397 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
1398 * i386-tdep.c (i386_gdbarch_init): Likewise.
1399 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
1400 * mips-tdep.c (mips_gdbarch_init): Likewise.
1401 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1402 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
1403 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
1404 `info.tdep_info'.
1405 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
1406 `info.tdep_info'.
1407 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
1408 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
1409 `info.tdep_info'.
1410 * spu-tdep.c (spu_gdbarch_init): Likewise.
1411 * gdbarch.h: Regenerate.
1412
16eb6b2d
LS
14132017-08-07 Leszek Swirski <leszeks@google.com>
1414
7b005726 1415 PR symtab/20899
16eb6b2d
LS
1416 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
1417
74cbb09e
SM
14182017-08-07 Simon Marchi <simon.marchi@ericsson.com>
1419
1420 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
1421 (gdbsim_open): Rename gdb_argv args object to argv.
1422
ee0c3293
TT
14232017-08-05 Tom Tromey <tom@tromey.com>
1424
1425 * compile/compile-object-load.c (compile_object_load): Use
1426 gdb::unique_xmalloc_ptr.
1427 * cli/cli-dump.c (scan_filename): Rename from
1428 scan_filename_with_cleanup. Change return type.
1429 (scan_expression): Rename from scan_expression_with_cleanup.
1430 Change return type.
1431 (dump_memory_to_file, dump_value_to_file, restore_command):
1432 Use gdb::unique_xmalloc_ptr. Update.
1433 * cli/cli-cmds.c (find_and_open_script): Use
1434 gdb::unique_xmalloc_ptr.
1435 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
1436 * symmisc.c (maintenance_print_symbols)
1437 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
1438 * symfile.c (symfile_bfd_open, generic_load)
1439 (add_symbol_file_command, remove_symbol_file_command): Use
1440 gdb::unique_xmalloc_ptr.
1441 * source.c (openp): Use gdb::unique_xmalloc_ptr.
1442 * psymtab.c (maintenance_print_psymbols): Use
1443 gdb::unique_xmalloc_ptr.
1444 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
1445 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
1446 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
1447 (reload_shared_libraries_1): Likewise.
1448
3232fabd
TT
14492017-08-05 Tom Tromey <tom@tromey.com>
1450
1451 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
1452 (rust_op_vector, rust_set_vector): New typedefs.
1453 (current_parser): New global.
1454 (work_obstack): Change to pointer type. Update all users.
1455 (rust_ast, pstate): Remove globals.
1456 (struct rust_parser): New.
1457 (%union) <params, field_inits>: Change type.
1458 (start, tuple_expr, unit_expr, struct_expr_list, literal)
1459 (field_expr, expr_list, maybe_expr_list, type_list): Update.
1460 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
1461 (convert_params_to_types, convert_params_to_expression): Change
1462 type of "params".
1463 (ast_string): Change type of "fields".
1464 (rust_parse): Make a rust_parser. Remove cleanups.
1465 (rust_lex_tests): Make and install an auto_obstack.
1466
f02fd774
YQ
14672017-08-04 Yao Qi <yao.qi@linaro.org>
1468
1469 * configure.srv (ipa_x32_linux_regobj): New.
1470 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
1471 instead of X86_TDESC_AVX512.
1472 (initialize_low_tracepoint): Call
1473 init_registers_x32_avx_avx512_linux.
1474
91975afd
YQ
14752017-08-04 Yao Qi <yao.qi@linaro.org>
1476
1477 * utils.h (gdb_argv): Add namespace std for nullptr_t.
1478
2331fa3a
RK
14792017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
1480
1481 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
1482
744e4fe1
TT
14832017-08-03 Tom Tromey <tom@tromey.com>
1484
1485 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
1486 Remove.
1487 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
1488
1c034b67
TT
14892017-08-03 Tom Tromey <tom@tromey.com>
1490
1491 * python/py-param.c (compute_enum_values): Use gdb_argv.
1492
773a1edc
TT
14932017-08-03 Tom Tromey <tom@tromey.com>
1494
1495 * utils.h (struct gdb_argv_deleter): New.
1496 (gdb_argv): New class.
1497 * utils.c (gdb_argv::reset): New method.
1498 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
1499 * tracefile.c (tsave_command): Use gdb_argv.
1500 * top.c (new_ui_command): Use gdb_argv.
1501 * symmisc.c (maintenance_print_symbols)
1502 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
1503 * symfile.c (symbol_file_command, generic_load)
1504 (remove_symbol_file_command): Use gdb_argv.
1505 * stack.c (backtrace_command): Use gdb_argv.
1506 * source.c (add_path, show_substitute_path_command)
1507 (unset_substitute_path_command, set_substitute_path_command):
1508 Use gdb_argv.
1509 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
1510 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
1511 * remote.c (extended_remote_run, remote_put_command)
1512 (remote_get_command, remote_delete_command): Use gdb_argv.
1513 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
1514 (gdbsim_open): Use gdb_argv.
1515 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
1516 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
1517 * procfs.c (procfs_info_proc): Use gdb_argv.
1518 * interps.c (interpreter_exec_cmd): Use gdb_argv.
1519 * infrun.c (handle_command): Use gdb_argv.
1520 * inferior.c (add_inferior_command, clone_inferior_command):
1521 Use gdb_argv.
1522 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
1523 * exec.c (exec_file_command): Use gdb_argv.
1524 * cli/cli-cmds.c (alias_command): Use gdb_argv.
1525 * compile/compile.c (build_argc_argv): Use gdb_argv.
1526
0d50bde3
TT
15272017-08-03 Tom Tromey <tom@tromey.com>
1528
1529 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
1530
7f968c89
TT
15312017-08-03 Tom Tromey <tom@tromey.com>
1532
1533 * python/python.c (compute_python_string): Return std::string.
1534 (gdbpy_eval_from_control_command): Update.
1535 (do_start_initialization): Use std::string.
1536 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
1537 xstrprintf.
1538 * python/py-breakpoint.c (local_setattro): Use string_printf, not
1539 xstrprintf.
1540
3c9ebddd
TT
15412017-08-03 Tom Tromey <tom@tromey.com>
1542
1543 * top.h (do_restore_instream_cleanup): Remove.
1544 * top.c (do_restore_instream_cleanup): Remove.
1545 (read_command_file): Use scoped_restore.
1546 * cli/cli-script.c (execute_user_command): Use scoped_restore.
1547
b51b225e
TT
15482017-08-03 Tom Tromey <tom@tromey.com>
1549
1550 * cli/cli-script.c (execute_user_command)
1551 (execute_control_command): Use scoped_restore.
1552
ac991630
TT
15532017-08-03 Tom Tromey <tom@tromey.com>
1554
1555 * cli/cli-script.c (do_restore_user_call_depth): Remove.
1556 (execute_user_command): Remove user_call_depth; use
1557 user_args_stack's size instead.
1558
898e0c8e
TT
15592017-08-03 Tom Tromey <tom@tromey.com>
1560
1561 * top.h (in_user_command): Remove.
1562 * top.c (in_user_command): Remove.
1563 * cli/cli-script.c (do_restore_user_call_depth)
1564 (execute_user_command): Update.
1565
26fcd5d7
TT
15662017-08-03 Tom Tromey <tom@tromey.com>
1567
1568 * valops.c (search_struct_method): Use gdb::byte_vector.
1569 * valarith.c (value_concat): Use std::vector.
1570 * target.c (memory_xfer_partial): Use gdb::byte_vector.
1571 (simple_search_memory): Likewise.
1572 * printcmd.c (find_string_backward): Use gdb::byte_vector.
1573 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
1574 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
1575 * elfread.c (elf_rel_plt_read): Use std::string.
1576 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
1577 * cli/cli-dump.c (restore_section_callback): Use
1578 gdb::byte_vector.
1579
7c218e6c
TT
15802017-08-03 Tom Tromey <tom@tromey.com>
1581
1582 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
1583
31b68d4a
TT
15842017-08-03 Tom Tromey <tom@tromey.com>
1585
1586 * tui/tui-regs.c (tui_restore_gdbout): Remove.
1587 (tui_register_format): Use scoped_restore.
1588
2ec845e7
TT
15892017-08-03 Tom Tromey <tom@tromey.com>
1590
1591 * reverse.c (exec_direction_default): Remove.
1592 (exec_reverse_once): Use scoped_restore.
1593 * remote.c (restore_remote_timeout): Remove.
1594 (remote_flash_erase, remote_flash_write, remote_flash_done)
1595 (readchar, remote_serial_write): Use scoped_restore.
1596 * cli/cli-script.c (struct source_cleanup_lines_args)
1597 (source_cleanup_lines): Remove.
1598 (script_from_file): Use scoped_restore.
1599 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
1600 (source_command): Use scoped_restore.
1601
b3bc8453
TT
16022017-08-03 Tom Tromey <tom@tromey.com>
1603
1604 * utils.h (make_cleanup_free_so): Remove.
1605 * utils.c (do_free_so, make_cleanup_free_so): Remove.
1606 * solist.h (struct so_deleter): New.
1607 (so_list_up): New typedef.
1608 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
1609
e3ad2841
TT
16102017-08-03 Tom Tromey <tom@tromey.com>
1611
1612 * utils.h (make_cleanup_restore_current_language): Remove.
1613 * utils.c (do_restore_current_language)
1614 (make_cleanup_restore_current_language): Remove.
1615 * parse.c (parse_exp_in_context_1)
1616 (parse_expression_with_language): Use
1617 scoped_restore_current_language.
1618 * mi/mi-main.c (mi_cmd_execute): Use
1619 scoped_restore_current_language.
1620 * language.h (scoped_restore_current_language): New class.
1621
b80cf838
TT
16222017-08-03 Tom Tromey <tom@tromey.com>
1623
1624 * compile/compile.c (cleanup_unlink_file): Remove.
1625 (compile_to_object): Use gdb::unlinker.
1626 (eval_compile_command): Likewise.
1627
fad0444a
TT
16282017-08-03 Tom Tromey <tom@tromey.com>
1629
1630 * utils.h (make_cleanup_fclose): Remove.
1631 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
1632
6e7bc05c
TT
16332017-08-03 Tom Tromey <tom@tromey.com>
1634
1635 * top.c (open_terminal_stream): Return gdb_file_up.
1636 (new_ui_command): Update.
1637
4a45905b
TT
16382017-08-03 Tom Tromey <tom@tromey.com>
1639
1640 * source.c (print_source_lines_base, forward_search_command)
1641 (reverse_search_command): Use gdb_file_up.
1642
7cd06d6e
TT
16432017-08-03 Tom Tromey <tom@tromey.com>
1644
1645 * fbsd-nat.c (fbsd_find_memory_regions): Update.
1646
ed166945
TT
16472017-08-03 Tom Tromey <tom@tromey.com>
1648
1649 * cli/cli-cmds.c (find_and_open_script): Change return type.
1650 Remove "streamp" and "full_path" parameters.
1651 (source_script_with_search): Update.
1652 * auto-load.c (source_script_file): Update.
1653 * cli/cli-cmds.h (find_and_open_script): Change type.
1654 (open_script): New struct.
1655
d419f42d
TT
16562017-08-03 Tom Tromey <tom@tromey.com>
1657
1658 * xml-support.c (xml_fetch_content_from_file): Update.
1659 * ui-file.c (stdio_file::open): Update.
1660 * tracefile-tfile.c (tfile_start): Update.
1661 * remote.c (remote_file_put, remote_file_get): Update.
1662 * nat/linux-procfs.c (linux_proc_get_int)
1663 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
1664 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
1665 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
1666 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
1667 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
1668 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
1669 * linux-nat.c (linux_proc_pending_signals): Update.
1670 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
1671 (file_closer): Remove.
1672 * compile/compile.c (compile_to_object): Update.
1673 * common/filestuff.h (struct gdb_file_deleter): New.
1674 (gdb_file_up): New typedef.
1675 (gdb_fopen_cloexec): Change return type.
1676 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
1677 * cli/cli-dump.c (fopen_with_cleanup): Remove.
1678 (dump_binary_file, restore_binary_file): Update.
1679 * auto-load.c (auto_load_objfile_script_1): Update.
1680
4a2b031d
TT
16812017-08-03 Tom Tromey <tom@tromey.com>
1682
1683 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
1684 (info_static_tracepoint_markers_command): Likewise.
1685 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
1686 * skip.c (skip_info): Use ui_out_emit_table.
1687 * progspace.c (print_program_space): Use ui_out_emit_table.
1688 * osdata.c (info_osdata): Use ui_out_emit_table.
1689 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
1690 ui_out_emit_table.
1691 * linux-thread-db.c (info_auto_load_libthread_db): Use
1692 ui_out_emit_table.
1693 * inferior.c (print_inferior): Use ui_out_emit_table.
1694 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
1695 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
1696 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
1697 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
1698 * ui-out.h (class ui_out_emit_table): New.
1699
a4f320fd
MR
17002017-08-02 Maciej W. Rozycki <macro@imgtec.com>
1701
1702 * mips-tdep.c (mips_fpu_type_str): New function.
1703 (mips_dump_tdep): Call it.
1704
a2f1f308
MR
17052017-08-01 Maciej W. Rozycki <macro@imgtec.com>
1706
1707 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
1708 `->mips_fpu_type'.
1709
7e5ed83b
XR
17102017-07-31 Xavier Roirand <roirand@adacore.com>
1711
1712 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
1713
4c9dc811
XR
17142017-07-27 Xavier Roirand <roirand@adacore.com>
1715
1716 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
1717
27d41eac
YQ
17182017-07-26 Yao Qi <yao.qi@linaro.org>
1719
1720 * cli/cli-cmds.c (maintenancechecklist): New variable.
1721 * gdbcmd.h (maintenancechecklist): Declare it.
1722 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
1723 Call i386_linux_read_description with different masks.
1724 * maint.c (maintenance_check_command): New function.
1725 (_initialize_maint_cmds): Call add_prefix_cmd.
1726 * target-descriptions.c (tdesc_reg): override operator != and ==.
1727 (tdesc_type): Likewise.
1728 (tdesc_feature): Likewise.
1729 (target_desc): Likewise.
1730 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
1731 (maintenance_check_xml_descriptions): New function.
1732 (_initialize_target_descriptions) Add command "xml-descriptions".
1733 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
1734
ea03d0d3
YQ
17352017-07-26 Yao Qi <yao.qi@linaro.org>
1736
1737 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
1738 Include features/i386/32bit-*.c.
1739 (i386_linux_read_description): Generate target description if it
1740 doesn't exist.
1741 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
1742 functions.
1743 * features/i386/32bit-linux.c: Re-generated.
1744 * features/i386/32bit-sse.c: Likewise.
1745 * target-descriptions.c (print_c_feature::visit): Print code to
1746 set register number if needed.
1747 (print_c_feature) <m_next_regnum>: New field.
1748
25aa13e5
YQ
17492017-07-26 Yao Qi <yao.qi@linaro.org>
1750
1751 * features/Makefile (CFILES): Rename with TDESC_CFILES.
1752 (FEATURE_XMLFILES): New.
1753 (FEATURE_CFILES): New.
1754 New rules.
1755 (clean-cfiles): Remove generated c files.
1756 * features/i386/32bit-avx.c: Generated.
1757 * features/i386/32bit-avx512.c: Generated.
1758 * features/i386/32bit-core.c: Generated.
1759 * features/i386/32bit-linux.c: Generated.
1760 * features/i386/32bit-mpx.c: Generated.
1761 * features/i386/32bit-pkeys.c: Generated.
1762 * features/i386/32bit-sse.c: Generated.
1763 * target-descriptions.c: Include algorithm.
1764 (tdesc_element_visitor): Add method visit_end.
1765 (print_c_tdesc): Implement visit_end.
1766 (print_c_tdesc:: m_filename_after_features): Move it to
1767 protected.
1768 (print_c_feature): New class.
1769 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
1770 name starts with "i386/32bit-".
1771
6eb1e6a8
YQ
17722017-07-26 Yao Qi <yao.qi@linaro.org>
1773
1774 * target-descriptions.c (tdesc_element_visitor): New class.
1775 (tdesc_element): New class.
1776 (tdesc_reg): Inherit from tdesc_element.
1777 (tdesc_reg::accept): New function.
1778 (tdesc_type): Inherit from tdesc_element.
1779 (tdesc_type::accept): New function.
1780 (tdesc_feature): Inherit from tdesc_element.
1781 (tdesc_feature::accept): New function.
1782 (target_desc): Inherit from tdesc_element.
1783 (target_desc::target_desc): New.
1784 (target_desc::~target_desc): New.
1785 (target_desc::accept): New.
1786 (allocate_target_description): Use new.
1787 (free_target_description): Use delete.
1788 (print_c_tdesc): New class.
1789 (maint_print_c_tdesc_cmd): Adjust.
1790
1791 * features/aarch64.c: Re-generated.
1792 * features/arc-arcompact.c: Re-generated.
1793 * features/arc-v2.c: Re-generated.
1794 * features/arm/arm-with-iwmmxt.c: Re-generated.
1795 * features/arm/arm-with-m.c: Re-generated.
1796 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
1797 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
1798 * features/arm/arm-with-neon.c: Re-generated.
1799 * features/arm/arm-with-vfpv2.c: Re-generated.
1800 * features/arm/arm-with-vfpv3.c: Re-generated.
1801 * features/i386/amd64-avx-avx512.c: Re-generated.
1802 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
1803 * features/i386/amd64-avx.c: Re-generated.
1804 * features/i386/amd64-avx-linux.c: Re-generated.
1805 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
1806 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
1807 * features/i386/amd64-avx-mpx.c: Re-generated.
1808 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
1809 * features/i386/amd64.c: Re-generated.
1810 * features/i386/amd64-linux.c: Re-generated.
1811 * features/i386/amd64-mpx.c: Re-generated.
1812 * features/i386/amd64-mpx-linux.c: Re-generated.
1813 * features/i386/i386-avx-avx512.c: Re-generated.
1814 * features/i386/i386-avx-avx512-linux.c: Re-generated.
1815 * features/i386/i386-avx.c: Re-generated.
1816 * features/i386/i386-avx-linux.c: Re-generated.
1817 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
1818 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
1819 * features/i386/i386-avx-mpx.c: Re-generated.
1820 * features/i386/i386-avx-mpx-linux.c: Re-generated.
1821 * features/i386/i386.c: Re-generated.
1822 * features/i386/i386-linux.c: Re-generated.
1823 * features/i386/i386-mmx.c: Re-generated.
1824 * features/i386/i386-mmx-linux.c: Re-generated.
1825 * features/i386/i386-mpx.c: Re-generated.
1826 * features/i386/i386-mpx-linux.c: Re-generated.
1827 * features/i386/x32-avx-avx512.c: Re-generated.
1828 * features/i386/x32-avx-avx512-linux.c: Re-generated.
1829 * features/i386/x32-avx.c: Re-generated.
1830 * features/i386/x32-avx-linux.c: Re-generated.
1831 * features/i386/x32.c: Re-generated.
1832 * features/i386/x32-linux.c: Re-generated.
1833 * features/microblaze.c: Re-generated.
1834 * features/microblaze-with-stack-protect.c: Re-generated.
1835 * features/mips64-dsp-linux.c: Re-generated.
1836 * features/mips64-linux.c: Re-generated.
1837 * features/mips-dsp-linux.c: Re-generated.
1838 * features/mips-linux.c: Re-generated.
1839 * features/nds32.c: Re-generated.
1840 * features/nios2.c: Re-generated.
1841 * features/nios2-linux.c: Re-generated.
1842 * features/rs6000/powerpc-32.c: Re-generated.
1843 * features/rs6000/powerpc-32l.c: Re-generated.
1844 * features/rs6000/powerpc-403.c: Re-generated.
1845 * features/rs6000/powerpc-403gc.c : Re-generated.
1846 * features/rs6000/powerpc-405.c: Re-generated.
1847 * features/rs6000/powerpc-505.c: Re-generated.
1848 * features/rs6000/powerpc-601.c: Re-generated.
1849 * features/rs6000/powerpc-602.c: Re-generated.
1850 * features/rs6000/powerpc-603.c: Re-generated.
1851 * features/rs6000/powerpc-604.c: Re-generated.
1852 * features/rs6000/powerpc-64.c: Re-generated.
1853 * features/rs6000/powerpc-64l.c: Re-generated.
1854 * features/rs6000/powerpc-7400.c: Re-generated.
1855 * features/rs6000/powerpc-750.c: Re-generated.
1856 * features/rs6000/powerpc-860.c: Re-generated.
1857 * features/rs6000/powerpc-altivec32.c: Re-generated.
1858 * features/rs6000/powerpc-altivec32l.c: Re-generated.
1859 * features/rs6000/powerpc-altivec64.c: Re-generated.
1860 * features/rs6000/powerpc-altivec64l.c: Re-generated.
1861 * features/rs6000/powerpc-cell32l.c: Re-generated.
1862 * features/rs6000/powerpc-cell64l.c: Re-generated.
1863 * features/rs6000/powerpc-e500.c: Re-generated.
1864 * features/rs6000/powerpc-e500l.c: Re-generated.
1865 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
1866 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
1867 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
1868 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
1869 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
1870 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
1871 * features/rs6000/powerpc-vsx32.c: Re-generated.
1872 * features/rs6000/powerpc-vsx32l.c: Re-generated.
1873 * features/rs6000/powerpc-vsx64.c: Re-generated.
1874 * features/rs6000/powerpc-vsx64l.c: Re-generated.
1875 * features/rs6000/rs6000.c: Re-generated.
1876 * features/s390-linux32.c: Re-generated.
1877 * features/s390-linux32v1.c: Re-generated.
1878 * features/s390-linux32v2.c: Re-generated.
1879 * features/s390-linux64.c: Re-generated.
1880 * features/s390-linux64v1.c: Re-generated.
1881 * features/s390-linux64v2.c: Re-generated.
1882 * features/s390-te-linux64.c: Re-generated.
1883 * features/s390-tevx-linux64.c: Re-generated.
1884 * features/s390-vx-linux64.c: Re-generated.
1885 * features/s390x-linux64.c: Re-generated.
1886 * features/s390x-linux64v1.c: Re-generated.
1887 * features/s390x-linux64v2.c: Re-generated.
1888 * features/s390x-te-linux64.c: Re-generated.
1889 * features/s390x-tevx-linux64.c: Re-generated.
1890 * features/s390x-vx-linux64.c: Re-generated.
1891 * features/sparc/sparc32-solaris.c: Re-generated.
1892 * features/sparc/sparc64-solaris.c: Re-generated.
1893 * features/tic6x-c62x.c: Re-generated.
1894 * features/tic6x-c62x-linux.c: Re-generated.
1895 * features/tic6x-c64x.c: Re-generated.
1896 * features/tic6x-c64x-linux.c: Re-generated.
1897 * features/tic6x-c64xp.c: Re-generated.
1898 * features/tic6x-c64xp-linux.c: Re-generated.
1899
35b4818d
YQ
19002017-07-26 Yao Qi <yao.qi@linaro.org>
1901
1902 * i386-linux-tdep.c (i386_linux_read_description): New function.
1903 (i386_linux_core_read_description): Call
1904 i386_linux_read_description.
1905 * i386-linux-tdep.h (i386_linux_read_description): Declare.
1906 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
1907 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
1908 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
1909 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
1910 * x86-linux-nat.c (x86_linux_read_description): Call
1911 i386_linux_read_description.
1912
8e2141c6
YQ
19132017-07-26 Yao Qi <yao.qi@linaro.org>
1914
1915 * NEWS: Mention it.
1916 * features/Makefile (%.c: %.xml): Pass the xml file name to
1917 command "maint print c-tdesc".
1918 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
1919 name from 'arg'.
1920
b468ff4c
YQ
19212017-07-26 Yao Qi <yao.qi@linaro.org>
1922
1923 * target-descriptions.c (target_desc): Add ctor and dtor. Do
1924 in-class initialization.
1925 (tdesc_create_feature): Call new instead of XCNEW.
1926 (free_target_description): Ue delete.
1927
b9c0e1b4
JB
19282017-07-25 John Baldwin <jhb@FreeBSD.org>
1929
1930 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
1931
a04b5337
YQ
19322017-07-25 Yao Qi <yao.qi@linaro.org>
1933
1934 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
1935 constant.
1936 (amd64_x32_init_abi): Likewise.
1937 * amd64-tdep.h (amd64_init_abi): Update declaration.
1938 (amd64_x32_init_abi): Likewise.
1939
02ad7fc2
YQ
19402017-07-25 Yao Qi <yao.qi@linaro.org>
1941
1942 PR tdep/21717
1943 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
1944 condition for FPSCR.
1945 (arm_linux_store_inferior_registers): Likewise.
1946
b6f48cb0
TT
19472017-07-22 Tom Tromey <tom@tromey.com>
1948
1949 * break-catch-syscall.c (struct catch_syscall_inferior_data)
1950 <syscalls_counts>: Now a std::vector.
1951 (get_catch_syscall_inferior_data): Use "new".
1952 (catch_syscall_inferior_data_cleanup): Use "delete".
1953 (insert_catch_syscall, remove_catch_syscall)
1954 (clear_syscall_counts): Update.
1955
e12c9b7a
TT
19562017-07-22 Tom Tromey <tom@tromey.com>
1957
1958 * break-catch-syscall.c (syscall_catchpoint)
1959 <syscalls_to_be_caught>: Now a std::vector<int>
1960 (~syscall_catchpoint): Remove.
1961 (insert_catch_syscall, remove_catch_syscall)
1962 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
1963 (print_mention_catch_syscall, print_recreate_catch_syscall):
1964 Update.
1965 (create_syscall_event_catchpoint): Change type of "filter"
1966 parameter.
1967 (catch_syscall_split_args): Return a std::vector.
1968 (catch_syscall_command_1, catching_syscall_number_1): Update.
1969
4fa8aeac
TT
19702017-07-22 Tom Tromey <tom@tromey.com>
1971
1972 * break-catch-throw.c (struct exception_catchpoint)
1973 <exception_rx>: Now a std::string.
1974 (~exception_catchpoint): Remove.
1975 (print_one_detail_exception_catchpoint): Update.
1976 (handle_gnu_v3_exceptions): Change type of except_rx.
1977 (extract_exception_regexp): Return a std::string.
1978 (catch_exception_command_1): Update.
1979
f746a154
TT
19802017-07-22 Tom Tromey <tom@tromey.com>
1981
1982 * break-catch-sig.c (gdb_signal_type): Remove typedef.
1983 (struct signal_catchpoint) <signals_to_be_caught>: Now a
1984 std::vector.
1985 <catch_all>: Now a bool.
1986 (~signal_catchpoint): Remove.
1987 (signal_catchpoint_insert_location)
1988 (signal_catchpoint_remove_location)
1989 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
1990 (signal_catchpoint_print_mention)
1991 (signal_catchpoint_print_recreate)
1992 (signal_catchpoint_explains_signal): Update.
1993 (create_signal_catchpoint): Change type of "filter" and
1994 "catch_all".
1995 (catch_signal_split_args): Return a std::vector. Change type of
1996 "catch_all".
1997 (catch_signal_command): Update.
1998
47e77640
PA
19992017-07-20 Pedro Alves <palves@redhat.com>
2000
2001 * ada-lang.c (ada_language_defn): Make extern.
2002 (_initialize_ada_language): Remove add_language call.
2003 * c-lang.c (c_language_defn, cplus_language_defn)
2004 (asm_language_defn, minimal_language_defn): Make extern.
2005 (_initialize_c_language): Delete.
2006 * completer.c (compare_cstrings): Delete, moved to utils.h.
2007 * d-lang.c (d_language_defn): Make extern.
2008 (_initialize_d_language): Remove add_language calls.
2009 * defs.h (enum language): Add comment.
2010 * f-lang.c (f_language_defn): Make extern.
2011 (_initialize_f_language): Remove add_language call.
2012 * go-lang.c (go_language_defn): Make extern.
2013 (_initialize_go_language): Remove add_language call.
2014 * language.c: Include <algorithm>.
2015 (languages): Redefine as const array.
2016 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
2017 (set_language_command): Handle "local". Use for-range loop.
2018 (set_language): Remove loop.
2019 (language_enum): Rewrite.
2020 (language_def, language_str): Remove loops.
2021 (add_language): Delete.
2022 (add_set_language_command): New, based on add_languages.
2023 (skip_language_trampoline): Adjust.
2024 (local_language_defn): Delete.
2025 (language_gdbarch_post_init): Adjust.
2026 (_initialize_language): Remove add_language calls. Call
2027 add_set_language_command.
2028 * language.h (add_language): Delete.
2029 (auto_language_defn)
2030 (unknown_language_defn, minimal_language_defn, ada_language_defn)
2031 (asm_language_defn, c_language_defn, cplus_language_defn)
2032 (d_language_defn, f_language_defn, go_language_defn)
2033 (m2_language_defn, objc_language_defn, opencl_language_defn)
2034 (pascal_language_defn, rust_language_defn): Declare.
2035 * m2-lang.c (m2_language_defn): Make extern.
2036 (_initialize_m2_language): Remove add_language call.
2037 * objc-lang.c (objc_language_defn): Make extern.
2038 (_initialize_objc_language): Remove add_language call.
2039 * opencl-lang.c (opencl_language_defn): Make extern.
2040 (_initialize_opencl_language): Remove add_language call.
2041 * p-lang.c (pascal_language_defn): Make extern.
2042 (_initialize_pascal_language): Delete.
2043 * rust-lang.c (rust_language_defn): Make extern.
2044 (_initialize_rust_language): Delete.
2045 * utils.h (compare_cstrings): New static inline function.
2046
edb0c9cb
PA
20472017-07-20 Pedro Alves <palves@redhat.com>
2048
2049 * ada-lang.c (ada_to_fixed_type_1): Adjust.
2050 (get_var_value): Constify parameters.
2051 (get_int_var_value): Change prototype.
2052 (to_fixed_range_type): Adjust.
2053 * ada-lang.h (get_int_var_value): Change prototype.
2054
a778f165
PA
20552017-07-20 Pedro Alves <palves@redhat.com>
2056
2057 * dwarf2read.c (dw2_lookup_symbol): Use
2058 SYMBOL_MATCHES_SEARCH_NAME.
2059 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
2060
42edd901
PA
20612017-07-20 Pedro Alves <palves@redhat.com>
2062
2063 * block.c (block_iter_name_step, block_iter_name_first)
2064 (block_iter_name_next): Delete.
2065 (block_lookup_symbol_primary): Adjust to use
2066 dict_iter_match_first/dict_iter_match_next.
2067 * block.h (block_iter_name_first, block_iter_name_next): Delete
2068 declarations.
2069 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
2070 dict_iter_match_first/dict_iter_match_next.
2071
cf325299
PA
20722017-07-20 Pedro Alves <palves@redhat.com>
2073
2074 * cp-support.c (cp_find_first_component_aux): Add missing case for
2075 end of string.
2076
c5ed0576
DB
20772017-07-18 David Blaikie <dblaikie@gmail.com>
2078
2079 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
2080 of dwo_cu's dwo_file.
2081
27841e76
YQ
20822017-07-18 Yao Qi <yao.qi@linaro.org>
2083
2084 * remote.c (store_registers_using_G): Remove one line comment.
2085
cfb7e58b
YQ
20862017-07-18 Yao Qi <yao.qi@linaro.org>
2087
2088 * regcache.c (regcache_cpy): Simplify it.
2089 (regcache::cpy_no_passthrough): Remove it.
2090 * regcache.h (cpy_no_passthrough): Remove it.
2091 (regcache_dup, regcache_cpy): Update comments.
2092
386535dd
PA
20932017-07-18 Pedro Alves <palves@redhat.com>
2094
2095 * remote-sim.c (sim_command_completer): Adjust to work with a
2096 completion_tracker instead of a VEC.
2097
c45ec17c
PA
20982017-07-17 Pedro Alves <palves@redhat.com>
2099
2100 * completer.c (complete_source_filenames): New function.
2101 (complete_address_and_linespec_locations): New function.
2102 (location_completer): Use complete_address_and_linespec_locations.
2103 (completion_tracker::build_completion_result): Honor the tracker's
2104 request to suppress append.
2105 * completer.h (completion_tracker::suppress_append_ws)
2106 (completion_tracker::set_suppress_append_ws): New methods.
2107 (completion_tracker::m_suppress_append_ws): New field.
2108 (complete_source_filenames): New declaration.
2109 * linespec.c (linespec_complete_what): New.
2110 (struct ls_parser) <complete_what, completion_word,
2111 completion_quote_char, completion_quote_end, completion_tracker>:
2112 New fields.
2113 (string_find_incomplete_keyword_at_end): New.
2114 (linespec_lexer_lex_string): Record quote char. If in completion
2115 mode, don't throw.
2116 (linespec_lexer_consume_token): Advance the completion word point.
2117 (linespec_lexer_peek_token): Save/restore completion info.
2118 (save_stream_and_consume_token): New.
2119 (set_completion_after_number): New.
2120 (linespec_parse_basic): Set what to complete next depending on
2121 token. Handle function and label completions specially.
2122 (parse_linespec): Disable objc shortcut in completion mode. Set
2123 what to complete next depending on token type. Skip keyword if in
2124 completion mode.
2125 (complete_linespec_component, linespec_complete): New.
2126 * linespec.h (linespec_complete): Declare.
2127
be966d42
PA
21282017-07-17 Pedro Alves <palves@redhat.com>
2129
2130 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
2131 Handle 'operator<' / 'operator<<'.
2132
a2459270
PA
21332017-07-17 Pedro Alves <palves@redhat.com>
2134
2135 * completer.c (collect_explicit_location_matches): Handle
2136 MATCH_LABEL.
2137 (convert_explicit_location_to_linespec): New, factored out from
2138 ...
2139 (convert_explicit_location_to_sals): ... this.
2140 (complete_label): New.
2141 (linespec_complete_label, find_label_symbols_in_block): New.
2142 (find_label_symbols): Add completion_mode parameter and adjust to
2143 call find_label_symbols_in_block.
2144 * linespec.h (linespec_complete_label): Declare.
2145
c6756f62
PA
21462017-07-17 Pedro Alves <palves@redhat.com>
2147
2148 * ada-lang.c (ada_collect_symbol_completion_matches): Add
2149 complete_symbol_mode parameter.
2150 * cli/cli-cmds.c (complete_command): Get the completion result out
2151 of the handle_brkchars tracker if used a custom word point.
2152 * completer.c: Include "linespec.h".
2153 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
2154 (advance_to_expression_complete_word_point): New.
2155 (completion_tracker::completes_to_completion_word): New.
2156 (complete_files_symbols): Pass down
2157 complete_symbol_mode::EXPRESSION.
2158 (explicit_options, probe_options): New.
2159 (collect_explicit_location_matches): Complete on the
2160 explictit_loc->foo instead of word. Use
2161 linespec_complete_function. Handle MATCH_LINE. Handle offering
2162 keyword and options completions.
2163 (backup_text_ptr): Delete.
2164 (skip_keyword): New.
2165 (complete_explicit_location): Remove 'word' parameter. Add
2166 language, quoted_arg_start and quoted_arg_end parameters.
2167 Rewrite, parsing left to right.
2168 (location_completer): Rewrite.
2169 (location_completer_handle_brkchars): New function.
2170 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
2171 (enum complete_line_internal_reason): Adjust comments.
2172 (completion_tracker::discard_completions): New.
2173 (completer_handle_brkchars_func_for_completer): Handle
2174 location_completer.
2175 (gdb_custom_word_point_brkchars)
2176 (gdb_org_rl_basic_quote_characters): New.
2177 (gdb_completion_word_break_characters_throw)
2178 (completion_find_completion_word): Handle trackers that use a
2179 custom word point.
2180 (completion_tracker::advance_custom_word_point_by): New.
2181 (completion_tracker::build_completion_result): Don't rely on
2182 readline appending the quote char.
2183 (gdb_rl_attempted_completion_function_throw): Handle trackers that
2184 use a custom word point.
2185 (gdb_rl_attempted_completion_function): Restore
2186 rl_basic_quote_characters.
2187 * completer.h (class completion_tracker): Extend intro comment.
2188 (completion_tracker::set_quote_char)
2189 (completion_tracker::quote_char)
2190 (completion_tracker::set_use_custom_word_point)
2191 (completion_tracker::use_custom_word_point)
2192 (completion_tracker::custom_word_point)
2193 (completion_tracker::set_custom_word_point)
2194 (completion_tracker::advance_custom_word_point_by)
2195 (completion_tracker::completes_to_completion_word)
2196 (completion_tracker::discard_completions): New methods.
2197 (completion_tracker::m_quote_char)
2198 (completion_tracker::m_use_custom_word_point)
2199 (completion_tracker::m_custom_word_point): New fields.
2200 (advance_to_expression_complete_word_point): Declare.
2201 * f-lang.c (f_collect_symbol_completion_matches): Add
2202 complete_symbol_mode parameter.
2203 * language.h (struct language_defn)
2204 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
2205 parameter.
2206 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
2207 (linespec_complete_function): New function.
2208 (linespec_lexer_lex_keyword): Adjust.
2209 * linespec.h (linespec_keywords, linespec_complete_function): New
2210 declarations.
2211 * location.c (find_end_quote): New function.
2212 (explicit_location_lex_one): Add explicit_completion_info
2213 parameter. Save quoting info. Don't throw if being called for
2214 completion. Don't handle Ada operators here.
2215 (is_cp_operator, skip_op_false_positives, first_of)
2216 (explicit_location_lex_one_function): New function.
2217 (string_to_explicit_location): Replace 'dont_throw' parameter with
2218 an explicit_completion_info pointer parameter. Handle it. Don't
2219 use explicit_location_lex_one to lex function names. Use
2220 explicit_location_lex_one_function instead.
2221 * location.h (struct explicit_completion_info): New.
2222 (string_to_explicit_location): Replace 'dont_throw' parameter with
2223 an explicit_completion_info pointer parameter.
2224 * symtab.c (default_collect_symbol_completion_matches_break_on):
2225 Add complete_symbol_mode parameter. Handle LINESPEC mode.
2226 (default_collect_symbol_completion_matches)
2227 (collect_symbol_completion_matches): Add complete_symbol_mode
2228 parameter.
2229 (collect_symbol_completion_matches_type): Pass down
2230 complete_symbol_mode::EXPRESSION.
2231 (collect_file_symbol_completion_matches): Add complete_symbol_mode
2232 parameter. Handle LINESPEC mode.
2233 * symtab.h (complete_symbol_mode): New.
2234 (default_collect_symbol_completion_matches_break_on)
2235 (default_collect_symbol_completion_matches)
2236 (collect_symbol_completion_matches)
2237 (collect_file_symbol_completion_matches): Add complete_symbol_mode
2238 parameter.
2239
1d550c82
PA
22402017-07-17 Pedro Alves <palves@redhat.com>
2241
2242 * utils.c (enum class strncmp_iw_mode): New.
2243 (strcmp_iw): Rename to ...
2244 (strncmp_iw_with_mode): ... this. Add string2_len and mode
2245 parameters. Handle them.
2246 (strncmp_iw): New.
2247 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
2248 * utils.h (strncmp_iw): Declare.
2249 (strcmp_iw): Move describing comments here.
2250
8090b426
PA
22512017-07-17 Pedro Alves <palves@redhat.com>
2252
2253 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
2254 CP_OPERATOR_STR.
2255 * c-typeprint.c (is_type_conversion_operator): Use
2256 CP_OPERATOR_STR.
2257 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
2258 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
2259 CP_OPERATOR_LEN.
2260 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
2261 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
2262 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
2263 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
2264 CP_OPERATOR_STR.
2265 * location.c: Include "cp-support.h".
2266 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
2267 CP_OPERATOR_STR.
2268 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
2269 CP_OPERATOR_LEN.
2270
6a2c1b87
PA
22712017-07-17 Pedro Alves <palves@redhat.com>
2272
2273 * cli/cli-cmds.c (complete_command): Use a completion tracker
2274 along with completion_find_completion_word for handle_brkchars
2275 phase.
2276 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
2277 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
2278 (struct gdb_rl_completion_word_info): New.
2279 (gdb_rl_find_completion_word): New.
2280 (completion_find_completion_word): New.
2281 * completer.h (completion_find_completion_word): Declare.
2282
eb3ff9a5
PA
22832017-07-17 Pedro Alves <palves@redhat.com>
2284
2285 * ada-lang.c (symbol_completion_match): Adjust comments.
2286 (symbol_completion_add): Replace vector parameter with
2287 completion_tracker parameter. Use it.
2288 (ada_make_symbol_completion_list): Rename to...
2289 (ada_collect_symbol_completion_matches): ... this. Add
2290 completion_tracker parameter and use it.
2291 (ada_language_defn): Adjust.
2292 * break-catch-syscall.c (catch_syscall_completer): Adjust
2293 prototype and work with completion_tracker instead of VEC.
2294 * breakpoint.c (condition_completer): Adjust prototype and work
2295 with completion_tracker instead of VEC.
2296 * c-lang.c (c_language_defn, cplus_language_defn)
2297 (asm_language_defn, minimal_language_defn): Adjust to renames.
2298 * cli/cli-cmds.c (complete_command): Rework using
2299 completion_tracker. Catch exceptions when completing.
2300 * cli/cli-decode.c (integer_unlimited_completer)
2301 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
2302 with completion_tracker instead of VEC.
2303 * command.h (struct completion_tracker): Forward declare.
2304 (completer_ftype, completer_handle_brkchars_ftype): Change
2305 types.
2306 (complete_on_cmdlist, complete_on_enum): Adjust.
2307 * completer.c: Include <algorithm>.
2308 (struct gdb_completer_state): New.
2309 (current_completion): New global.
2310 (readline_line_completion_function): Delete.
2311 (noop_completer, filename_completer)
2312 (filename_completer_handle_brkchars, complete_files_symbols)
2313 (linespec_location_completer): Adjust to work with a
2314 completion_tracker instead of a VEC.
2315 (string_or_empty): New.
2316 (collect_explicit_location_matches): Adjust to work with a
2317 completion_tracker instead of a VEC.
2318 (explicit_location_completer): Rename to ...
2319 (complete_explicit_location): ... this and adjust to work with a
2320 completion_tracker instead of a VEC.
2321 (location_completer): Adjust to work with a completion_tracker
2322 instead of a VEC.
2323 (add_struct_fields): Adjust to work with a completion_list instead
2324 of VEC.
2325 (expression_completer): Rename to ...
2326 (complete_expression): ... this and adjust to work with a
2327 completion_tracker instead of a VEC. Use complete_files_symbols.
2328 (expression_completer): Reimplement on top of complete_expression.
2329 (symbol_completer): Adjust to work with a completion_tracker
2330 instead of a VEC.
2331 (enum complete_line_internal_reason): Add describing comments.
2332 (complete_line_internal_normal_command): Adjust to work with a
2333 completion_tracker instead of a VEC.
2334 (complete_line_internal): Rename to ...
2335 (complete_line_internal_1): ... this and adjust to work with a
2336 completion_tracker instead of a VEC. Assert TEXT is NULL in the
2337 handle_brkchars phase.
2338 (new_completion_tracker): Delete.
2339 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
2340 complete_line_internal_1.
2341 (free_completion_tracker): Delete.
2342 (INITIAL_COMPLETION_HTAB_SIZE): New.
2343 (completion_tracker::completion_tracker)
2344 (completion_tracker::~completion_tracker): New.
2345 (maybe_add_completion): Delete.
2346 (completion_tracker::maybe_add_completion)
2347 (completion_tracker::add_completion)
2348 (completion_tracker::add_completions): New.
2349 (throw_max_completions_reached_error): Delete.
2350 (complete_line): Adjust to work with a completion_tracker instead
2351 of a VEC. Don't create a completion_tracker_t or check for max
2352 completions here.
2353 (command_completer, command_completer_handle_brkchars)
2354 (signal_completer, reg_or_group_completer_1)
2355 (reg_or_group_completer, default_completer_handle_brkchars):
2356 Adjust to work with a completion_tracker.
2357 (gdb_completion_word_break_characters_throw): New.
2358 (gdb_completion_word_break_characters): Reimplement.
2359 (line_completion_function): Delete.
2360 (completion_tracker::recompute_lowest_common_denominator)
2361 (expand_preserving_ws)
2362 (completion_tracker::build_completion_result)
2363 (completion_result::completion_result)
2364 (completion_result::completion_result)
2365 (completion_result::~completion_result)
2366 (completion_result::completion_result)
2367 (completion_result::release_match_list, compare_cstrings)
2368 (completion_result::sort_match_list)
2369 (completion_result::reset_match_list)
2370 (gdb_rl_attempted_completion_function_throw)
2371 (gdb_rl_attempted_completion_function): New.
2372 * completer.h (completion_list, struct completion_result)
2373 (class completion_tracker): New.
2374 (complete_line): Add completion_tracker parameter.
2375 (readline_line_completion_function): Delete.
2376 (gdb_rl_attempted_completion_function): New.
2377 (noop_completer, filename_completer, expression_completer)
2378 (location_completer, symbol_completer, command_completer)
2379 (signal_completer, reg_or_group_completer): Update prototypes.
2380 (completion_tracker_t, new_completion_tracker)
2381 (make_cleanup_free_completion_tracker): Delete.
2382 (enum maybe_add_completion_enum): Delete.
2383 (maybe_add_completion): Delete.
2384 (throw_max_completions_reached_error): Delete.
2385 * corefile.c (complete_set_gnutarget): Adjust to work with a
2386 completion_tracker instead of a VEC.
2387 * cp-abi.c (cp_abi_completer): Adjust to work with a
2388 completion_tracker instead of a VEC.
2389 * d-lang.c (d_language_defn): Adjust.
2390 * disasm.c (disassembler_options_completer): Adjust to work with a
2391 completion_tracker instead of a VEC.
2392 * f-lang.c (f_make_symbol_completion_list): Rename to ...
2393 (f_collect_symbol_completion_matches): ... this. Adjust to work
2394 with a completion_tracker instead of a VEC.
2395 (f_language_defn): Adjust.
2396 * go-lang.c (go_language_defn): Adjust.
2397 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
2398 Adjust to work with a completion_tracker instead of a VEC.
2399 * infrun.c (handle_completer): Likewise.
2400 * interps.c (interpreter_completer): Likewise.
2401 * interps.h (interpreter_completer): Likewise.
2402 * language.c (unknown_language_defn, auto_language_defn)
2403 (local_language_defn): Adjust.
2404 * language.h (language_defn::la_make_symbol_completion_list):
2405 Rename to ...
2406 (language_defn::la_collect_symbol_completion_matches): ... this
2407 and adjust to work with a completion_tracker instead of a VEC.
2408 * m2-lang.c (m2_language_defn): Adjust.
2409 * objc-lang.c (objc_language_defn): Adjust.
2410 * opencl-lang.c (opencl_language_defn): Adjust.
2411 * p-lang.c (pascal_language_defn): Adjust.
2412 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
2413 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
2414 with a completion_tracker.
2415 * rust-lang.c (rust_language_defn): Adjust.
2416 * symtab.c (free_completion_list, do_free_completion_list)
2417 (return_val, completion_tracker): Delete.
2418 (completion_list_add_name, completion_list_add_symbol)
2419 (completion_list_add_msymbol, completion_list_objc_symbol)
2420 (completion_list_add_fields, add_symtab_completions): Add
2421 completion_tracker parameter and use it.
2422 (default_make_symbol_completion_list_break_on_1): Rename to...
2423 (default_collect_symbol_completion_matches_break_on): ... this.
2424 Add completion_tracker parameter and use it instead of allocating
2425 a completion tracker here.
2426 (default_make_symbol_completion_list_break_on): Delete old
2427 implementation.
2428 (default_make_symbol_completion_list): Delete.
2429 (default_collect_symbol_completion_matches): New.
2430 (make_symbol_completion_list): Delete.
2431 (collect_symbol_completion_matches): New.
2432 (make_symbol_completion_type): Rename to ...
2433 (collect_symbol_completion_matches_type): ... this. Add
2434 completion_tracker parameter and use it instead of VEC.
2435 (make_file_symbol_completion_list_1): Rename to...
2436 (collect_file_symbol_completion_matches): ... this. Add
2437 completion_tracker parameter and use it instead of VEC.
2438 (make_file_symbol_completion_list): Delete.
2439 (add_filename_to_list): Use completion_list instead of a VEC.
2440 (add_partial_filename_data::list): Now a completion_list.
2441 (make_source_files_completion_list): Work with a completion_list
2442 instead of a VEC.
2443 * symtab.h: Include "completer.h".
2444 (default_make_symbol_completion_list_break_on)
2445 (default_make_symbol_completion_list, make_symbol_completion_list)
2446 (make_symbol_completion_type, make_file_symbol_completion_list)
2447 (make_source_files_completion_list): Delete.
2448 (default_collect_symbol_completion_matches_break_on)
2449 (default_collect_symbol_completion_matches)
2450 (collect_symbol_completion_matches)
2451 (collect_symbol_completion_matches_type)
2452 (collect_file_symbol_completion_matches)
2453 (make_source_files_completion_list): New.
2454 * top.c (init_main): Don't install a rl_completion_entry_function
2455 hook. Install a rl_attempted_completion_function hook instead.
2456 * tui/tui-layout.c (layout_completer): Adjust to work with a
2457 completion_tracker.
2458 * tui/tui-regs.c (tui_reggroup_completer):
2459 * tui/tui-win.c (window_name_completer, focus_completer)
2460 (winheight_completer): Adjust to work with a completion_tracker.
2461 * value.c: Include "completer.h".
2462 (complete_internalvar): Adjust to work with a completion_tracker.
2463 * value.h (complete_internalvar): Likewise.
2464
6e1dbf8c
PA
24652017-07-17 Pedro Alves <palves@redhat.com>
2466
2467 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
2468 renames.
2469 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
2470 comments to completer_ftype's declaration.
2471 <completer_handle_brkchars>: Change type to
2472 completer_handle_brkchars_ftype.
2473 * command.h (completer_ftype): Add describing comment and give
2474 names to parameters.
2475 (completer_ftype_void): Rename to ...
2476 (completer_handle_brkchars_ftype) ... this. Add describing comment.
2477 (set_cmd_completer_handle_brkchars): Adjust.
2478 * completer.c (filename_completer_handle_brkchars): New function.
2479 (complete_line_internal_normal_command): New function, factored
2480 out from ...
2481 (complete_line_internal): ... here.
2482 (command_completer_handle_brkchars)
2483 (default_completer_handle_brkchars)
2484 (completer_handle_brkchars_func_for_completer): New functions.
2485 * completer.h (set_gdb_completion_word_break_characters): Delete
2486 declaration.
2487 (completer_handle_brkchars_func_for_completer): New declaration.
2488 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
2489 completer_handle_brkchars_func_for_completer.
2490
78b13106
PA
24912017-07-17 Pedro Alves <palves@redhat.com>
2492
2493 * completer.c (symbol_completer): New function, based on
2494 make_symbol_completion_list_fn.
2495 * completer.h (symbol_completer): New declaration.
2496 * guile/scm-cmd.c (cmdscm_completers): Adjust.
2497 * python/py-cmd.c (completers): Adjust.
2498 * symtab.c (make_symbol_completion_list_fn): Delete.
2499 * symtab.h (make_symbol_completion_list_fn): Delete.
2500 * cli/cli-decode.c (add_cmd): Adjust.
2501
bbf2f4df
PA
25022017-07-17 Pedro Alves <palves@redhat.com>
2503
2504 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
2505 * dwarf2read.c: Include "filename-seen-cache.h".
2506 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
2507 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
2508 * filename-seen-cache.c: New file.
2509 * filename-seen-cache.h: New file.
2510 * symtab.c: Include "filename-seen-cache.h".
2511 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
2512 (create_filename_seen_cache, clear_filename_seen_cache)
2513 (delete_filename_seen_cache, filename_seen): Delete, parts moved
2514 to filename-seen-cache.h/filename-seen-cache.c.
2515 (output_source_filename, sources_info)
2516 (maybe_add_partial_symtab_filename)
2517 (make_source_files_completion_list): Adjust to use
2518 filename_seen_cache.
2519
330cdd98
PA
25202017-07-17 Pedro Alves <palves@redhat.com>
2521
2522 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
2523 fields.
2524 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
2525 dwarf2_debug_sections*)): New.
2526 (dwarf2_per_objfile::dwarf2_per_objfile(const
2527 dwarf2_per_objfile&)): Declare as deleted.
2528 (dwarf2_per_objfile::operator=): Declare as deleted.
2529 (dwarf2_per_objfile::dwarf2_per_objfile)
2530 (dwarf2_per_objfile::~dwarf2_per_objfile)
2531 (dwarf2_per_objfile::free_cached_comp_units): New.
2532 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
2533 ctor. Call dwarf2_per_objfile's ctor manually.
2534 (dwarf2_locate_sections): Deleted/refactored as ...
2535 (dwarf2_per_objfile::locate_sections): ... this new method.
2536 (free_cached_comp_units): Defer to
2537 dwarf2_per_objfile::free_cached_comp_units.
2538 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
2539
8880f2a9
TT
25402017-07-14 Tom Tromey <tom@tromey.com>
2541
2542 PR rust/21764:
2543 * rust-exp.y (convert_ast_to_expression): Add "want_type"
2544 parameter.
2545 <UNOP_SIZEOF>: Split into separate case.
2546 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
2547
65547233
TT
25482017-07-14 Tom Tromey <tom@tromey.com>
2549
2550 PR rust/21763:
2551 * symtab.c (symbol_matches_domain): Add language_rust to special
2552 case.
2553 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
2554 treat LOC_TYPEDEF symbols as variables.
2555
8f14146e
PA
25562017-07-14 Pedro Alves <palves@redhat.com>
2557
2558 * symtab.c (make_file_symbol_completion_list_1): Iterate over
2559 symtabs matching all symtabs with SRCFILE as file name instead of
2560 only considering the first hit, with lookup_symtab.
2561
2347965c
SM
25622017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2563
2564 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
2565 operator_name parameters.
2566 (gen_expr): Update function call.
2567
40f4af28
SM
25682017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2569
2570 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
2571 parameter.
2572 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
2573 Likewise.
2574 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
2575 parameter, use agent_expr::gdbarch instead, update function
2576 calls.
2577 (locexpr_tracepoint_var_ref): Likewise.
2578 (loclist_tracepoint_var_ref): Likewise.
2579 * ax-gdb.c (gen_trace_static_fields): Likewise.
2580 (gen_traced_pop): Likewise.
2581 (gen_frame_args_address): Likewise.
2582 (gen_frame_locals_address): Likewise.
2583 (gen_var_ref): Likewise.
2584 (gen_struct_ref_recursive): Likewise.
2585 (gen_static_field): Likewise.
2586 (gen_maybe_namespace_elt): Likewise.
2587 (gen_expr): Likewise.
2588 (gen_trace_for_var): Likewise.
2589 (gen_trace_for_expr): Likewise.
2590 (gen_trace_for_return_address): Likewise.
2591
053f8057
SM
25922017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2593
2594 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
2595 parameter.
2596 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
2597
6661ad48
SM
25982017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2599
2600 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
2601 from ax, update calls.
2602 (gen_usual_arithmetic): Likewise.
2603 (gen_integral_promotions): Likewise.
2604 (gen_bitfield_ref): Likewise.
2605 (gen_primitive_field): Likewise.
2606 (gen_struct_ref_recursive): Likewise.
2607 (gen_struct_ref): Likewise.
2608 (gen_maybe_namespace_elt): Likewise.
2609 (gen_struct_elt_for_reference): Likewise.
2610 (gen_namespace_elt): Likewise.
2611 (gen_aggregate_elt_ref): Likewise.
2612 (gen_expr): Get gdbarch from ax, update calls.
2613 (gen_expr_binop_rest): Likewise.
2614
c55a47e7
PA
26152017-07-13 Pedro Alves <palves@redhat.com>
2616
2617 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
2618 as default tdesc.
2619 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
2620 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
2621 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
2622 tdesc_amd64_linux as default tdesc. Get final tdesc from the
2623 tdep.
2624 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
2625 Get final tdesc from the tdep.
2626 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
2627 default tdesc.
2628 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2629 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2630 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
2631 Use it as default tdesc.
2632 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
2633 down to amd_init_abi. No longer handle fallback tdesc here.
2634 * amd64-tdep.h (tdesc_x32): Declare.
2635 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
2636 parameter.
2637 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
2638 as default tdesc.
2639
55efceab
AA
26402017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2641
2642 * s390-linux-tdep.c (s390_process_record): Add support for
2643 instructions new in arch12.
2644
0aa37b65
JB
26452017-07-11 John Baldwin <jhb@FreeBSD.org>
2646
2647 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
2648 PT_GETFSBASE and PT_GETGSBASE.
2649 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
2650 PT_SETGSBASE.
2651
48aeef91
JB
26522017-07-11 John Baldwin <jhb@FreeBSD.org>
2653
2654 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
2655 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
2656 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
2657 those rules.
2658 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
2659 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
2660 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
2661 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
2662 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
2663 * features/i386/amd64.xml: Add 64bit-segments.xml.
2664 * features/i386/amd64-avx-avx512.c: Regenerated.
2665 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
2666 * features/i386/amd64-avx-mpx.c: Regenerated.
2667 * features/i386/amd64-avx.c: Regenerated.
2668 * features/i386/amd64-mpx.c: Regenerated.
2669 * features/i386/amd64.c: Regenerated.
2670 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
2671 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2672 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
2673 * regformats/i386/amd64-avx.dat: Regenerated.
2674 * regformats/i386/amd64-mpx.dat: Regenerated.
2675 * regformats/i386/amd64.dat: Regenerated.
2676
77c501bc
YQ
26772017-07-10 Yao Qi <yao.qi@linaro.org>
2678
2679 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
2680 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
2681
6dc8d757
AK
26822017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
2683
2684 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
2685 unsetenv.
2686 * gnulib/aclocal.m4: Regenerate.
2687 * gnulib/config.in: Regenerate.
2688 * gnulib/configure: Regenerate.
2689 * gnulib/import/Makefile.am: Regenerate.
2690 * gnulib/import/Makefile.in: Regenerate.
2691 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2692 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2693 * gnulib/import/m4/environ.m4: New file.
2694 * gnulib/import/m4/setenv.m4: New file.
2695 * gnulib/import/setenv.c: New file.
2696 * gnulib/import/unsetenv.c: New file.
2697
266934d1
SM
26982017-07-09 Simon Marchi <simon.marchi@ericsson.com>
2699
2700 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
2701 address when op is DW_OP_addr.
2702
03278692
TT
27032017-07-09 Tom Tromey <tom@tromey.com>
2704
2705 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
2706 check and apply to outer type.
2707
4b654465
JB
27082017-07-07 John Baldwin <jhb@FreeBSD.org>
2709
2710 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
2711 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
2712 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
2713 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
2714
2af9fc44
JB
27152017-07-07 John Baldwin <jhb@FreeBSD.org>
2716
2717 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
2718
382b69bb
JB
27192017-07-07 John Baldwin <jhb@FreeBSD.org>
2720
2721 * corelow.c (get_core_siginfo): Remove.
2722 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
2723 instead of get_core_siginfo.
2724 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
2725 * gdbarch.h: Re-generate.
2726 * gdbarch.c: Re-generate.
2727 * linux-tdep.c (linux_core_xfer_siginfo): New.
2728 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
2729
6e5eab33
JB
27302017-07-07 John Baldwin <jhb@FreeBSD.org>
2731
2732 * corelow.c (thread_section_name): Move to ...
2733 * gdbcore.h (thread_section_name): ... here.
2734
929edea9
JB
27352017-07-07 John Baldwin <jhb@FreeBSD.org>
2736
2737 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
2738 (struct siginfo32): New.
2739 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
2740 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
2741 via ptrace(PT_LWPINFO).
2742
762c974a
JB
27432017-07-07 John Baldwin <jhb@FreeBSD.org>
2744
2745 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
2746 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
2747 (fbsd_get_siginfo_type): New.
2748 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
2749 (_initialize_fbsd_tdep): New.
2750
33c5cd75
DB
27512017-07-06 David Blaikie <dblaikie@gmail.com>
2752
2753 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
2754 a singular dwo_unit*) to support multiple CUs in the same way that
2755 multiple TUs are supported.
2756 (create_cus_hash_table): Replace create_dwo_cu with a function for
2757 parsing multiple CUs from a DWO file.
2758 (open_and_init_dwo_file): Use create_cus_hash_table rather than
2759 create_dwo_cu.
2760 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
2761 htab_find, rather than comparing the signature to a singleton CU in
2762 the dwo_file.
2763
8455d262
PA
27642017-07-06 Pedro Alves <palves@redhat.com>
2765
2766 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
2767
4da3eb35
PA
27682017-07-04 Pedro Alves <palves@redhat.com>
2769
2770 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
2771 * gdbtypes.h (TYPE_STATIC): Delete.
2772 (struct fn_field) <is_public, is_abstract, is_static, is_final,
2773 is_synchronized, is_native>: Delete.
2774 <dummy>: Bump.
2775 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
2776 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
2777 (TYPE_FN_FIELD_ABSTRACT): Delete.
2778
5bfd255c
SM
27792017-07-03 Simon Marchi <simon.marchi@ericsson.com>
2780
2781 * buffer.h (buffer_finish): Fix spelling mistakes.
2782
25c54127
EZ
27832017-07-01 Eli Zaretskii <eliz@gnu.org>
2784
2785 * .dir-locals.el: Automatically switch to C-style comments in
2786 versions of Emacs that support the feature.
2787
dc4bde35
SDJ
27882017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
2789 Pedro Alves <palves@redhat.com>
2790
2791 PR cli/21688
2792 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
2793 (process_next_line): New variable 'inline_cmd'.
2794 Adjust 'if' clauses for "python", "compile" and "guile" to use
2795 'command_name_equals' and check for '!inline_cmd'.
2796
51ed89aa
SDJ
27972017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
2798
2799 PR cli/21688
2800 * cli/cli-script.c (command_name_equals_not_inline): New function.
2801 (process_next_line): Adjust 'if' clauses for "python", "compile"
2802 and "guile" to use command_name_equals_not_inline.
2803
eb17d413
PA
28042017-06-29 Pedro Alves <palves@redhat.com>
2805
2806 * completer.c (expression_completer): Call
2807 linespec_location_completer instead of location_completer.
2808
195bcdd5
PA
28092017-06-29 Pedro Alves <palves@redhat.com>
2810
2811 * completer.c (expression_completer): Remove code that recomputes
2812 'text' from 'word'.
2813
adc764e7
YQ
28142017-06-29 Yao Qi <yao.qi@linaro.org>
2815
2816 * regformats/regdat.sh: Generate code with
2817 "ifndef IN_PROCESS_AGENT".
2818
6e75794e
PA
28192017-06-28 Pedro Alves <palves@redhat.com>
2820
2821 * command.h: Include "common/scoped_restore.h".
2822
bc491f2e
YQ
28232017-06-28 Yao Qi <yao.qi@linaro.org>
2824
2825 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
2826 instead of obstack_grow.
2827
41664b45
DG
28282017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
2829
2830 PR gdb/21337
2831 * symfile.c (reread_symbols): Call objfiles_changed just before
2832 read_symbols.
2833
6da67eb1
PA
28342017-06-27 Pedro Alves <palves@redhat.com>
2835
2836 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
2837 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
2838 (completion_list_add_symbol, completion_list_add_msymbol):
2839 ... these new functions.
2840 (add_symtab_completions)
2841 (default_make_symbol_completion_list_break_on_1): Adjust.
2842
23732b1e
PA
28432017-06-27 Pedro Alves <palves@redhat.com>
2844
2845 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
2846 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
2847 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
2848 dtor.
2849 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
2850 'storage_obstack' field an auto_obstack. In-class initialize all
2851 non-bitfield fields. Make minsyms_read bool.
2852 * symfile.c (read_symbols): Adjust.
2853
a4d1e79a
AH
28542017-06-27 Alan Hayward <alan.hayward@arm.com>
2855
2856 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
2857 (gdbsim_store_register): Likewise.
2858
8268c778
PA
28592017-06-27 Pedro Alves <palves@redhat.com>
2860
2861 * c-exp.y (name_obstack): Now an auto_obstack.
2862 (yylex): Use auto_obstack::clear.
2863 (c_parse): Use auto_obstack::clear instead of reinitializing and
2864 freeing the obstack.
2865 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
2866 * d-exp.y (name_obstack): Now an auto_obstack.
2867 (yylex): Use auto_obstack::clear.
2868 (d_parse): Use auto_obstack::clear instead of reinitializing and
2869 freeing the obstack.
2870 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
2871 auto_obstack.
2872 * dwarf2read.c (create_addrmap_from_index)
2873 (dwarf2_build_psymtabs_hard)
2874 (update_enumeration_type_from_children): Likewise.
2875 * gdb_obstack.h (auto_obstack): New type.
2876 * go-exp.y (name_obstack): Now an auto_obstack.
2877 (build_packaged_name): Use auto_obstack::clear.
2878 (go_parse): Use auto_obstack::clear instead of reinitializing and
2879 freeing the obstack.
2880 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
2881 auto_obstack.
2882 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
2883 * rust-exp.y (work_obstack): Now an auto_obstack.
2884 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
2885 reinitializing and freeing the obstack.
2886 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
2887 (host_char_to_target): Use auto_obstack.
2888 * utils.h (make_cleanup_obstack_free): Delete declaration.
2889 * valprint.c (generic_emit_char, generic_printstr): Use
2890 auto_obstack.
2891
db665f42
SM
28922017-06-27 Simon Marchi <simon.marchi@ericsson.com>
2893
2894 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
2895 thread.
2896 (darwin_init_thread_list): Don't update dummy thread.
2897 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
2898
873c0814
SM
28992017-06-26 Simon Marchi <simon.marchi@ericsson.com>
2900
2901 * record-full.c (netorder16): Remove.
2902
8b5a7a6e
SM
29032017-06-26 Simon Marchi <simon.marchi@ericsson.com>
2904
2905 * common/diagnostics.h: Define macros for GCC.
2906 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
2907 * common/vec.h: Include diagnostics.h.
2908 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
2909 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
2910 warning.
2911
d1435379
SM
29122017-06-26 Simon Marchi <simon.marchi@ericsson.com>
2913
2914 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
2915 New macro.
2916 * ada-lex.l: Ignore deprecated register warnings.
2917
cc75e0fd
SM
29182017-06-25 Simon Marchi <simon.marchi@ericsson.com>
2919
2920 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
2921 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
2922
07809eaf
SM
29232017-06-25 Simon Marchi <simon.marchi@ericsson.com>
2924
2925 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
2926 its own line.
2927
f076f034
SM
29282017-06-25 Simon Marchi <simon.marchi@ericsson.com>
2929
2930 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
2931
0dd5cbc5
AH
29322017-06-23 Alan Hayward <alan.hayward@arm.com>
2933
2934 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
2935 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
2936 (xtensa_register_read_masked): Likewise.
2937
d4c6ce5b
SDJ
29382017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
2939
2940 * common/environ.c (gdb_environ::unset): Update comment.
2941
16892a03
AH
29422017-06-22 Alan Hayward <alan.hayward@arm.com>
2943
2944 * python/py-unwind.c (pyuw_sniffer): Allocate space for
2945 registers.
2946
d7dcbefc
AH
29472017-06-22 Alan Hayward <alan.hayward@arm.com>
2948
2949 * record-full.c (record_full_exec_insn): Use byte_vector.
2950
b30ff123
YQ
29512017-06-22 Yao Qi <yao.qi@linaro.org>
2952
2953 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
2954 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2955
4fa847d7
AH
29562017-06-22 Alan Hayward <alan.hayward@arm.com>
2957
2958 * remote.c (cached_reg): Move from here...
2959 * regcache.h (cached_reg): ...to here.
2960 * python/py-unwind.c (struct reg_info): Remove.
2961 (cached_frame_info): Use cached_reg_t.
2962 (pyuw_prev_register): Likewise.
2963 (pyuw_sniffer): Use cached_reg_t and allocate registers.
2964 (pyuw_dealloc_cache): Free all registers.
2965
f4906a9a
PA
29662017-06-22 Pedro Alves <palves@redhat.com>
2967 Simon Marchi <simon.marchi@ericsson.com>
2968
2969 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
2970 warning.
2971 * common/diagnostics.h: New file.
2972
b45a1208
PA
29732017-06-22 Pedro Alves <palves@redhat.com>
2974
2975 * common/agent.h: Add include guards.
2976
e4da2c61
SM
29772017-06-21 Simon Marchi <simon.marchi@ericsson.com>
2978
2979 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
2980 talk about addressable units instead of bytes.
2981
96160d60
SDJ
29822017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2983
2984 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
2985 of '::const_iterator'.
2986
9a6c7d9c
SDJ
29872017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2988
2989 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2990 'unittests/environ-selftests.c'.
2991 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
2992 * charset.c (find_charset_names): Declare object 'iconv_env'.
2993 Update code to use 'iconv_env' object. Remove call to
2994 'free_environ'.
2995 * common/environ.c: Include <utility>.
2996 (make_environ): Delete function.
2997 (free_environ): Delete function.
2998 (gdb_environ::clear): New function.
2999 (gdb_environ::operator=): New function.
3000 (gdb_environ::get): Likewise.
3001 (environ_vector): Delete function.
3002 (set_in_environ): Delete function.
3003 (gdb_environ::set): New function.
3004 (unset_in_environ): Delete function.
3005 (gdb_environ::unset): New function.
3006 (gdb_environ::envp): Likewise.
3007 * common/environ.h: Include <vector>.
3008 (struct gdb_environ): Delete; transform into...
3009 (class gdb_environ): ... this class.
3010 (free_environ): Delete prototype.
3011 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
3012 environ_vector): Likewise.
3013 * infcmd.c (run_command_1): Update code to call
3014 'envp' from 'gdb_environ' class.
3015 (environment_info): Update code to call methods from 'gdb_environ'
3016 class.
3017 (unset_environment_command): Likewise.
3018 (path_info): Likewise.
3019 (path_command): Likewise.
3020 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
3021 (inferior::inferior): Initialize 'environment' using the host's
3022 information.
3023 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
3024 Include "environ.h".
3025 (class inferior) <environment>: Change type from 'struct
3026 gdb_environ' to 'gdb_environ'.
3027 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
3028 methods from 'gdb_environ' class.
3029 * solib.c (solib_find_1): Likewise
3030 * unittests/environ-selftests.c: New file.
3031
75c554cf
YQ
30322017-06-20 Yao Qi <yao.qi@linaro.org>
3033
3034 * features/i386/i386-linux.xml: Exchange the order of including
3035 32bit-linux.xml and 32bit-sse.xml.
3036 * features/i386/i386-linux.c: Regenerated.
3037
72ddacb7
YQ
30382017-06-20 Yao Qi <yao.qi@linaro.org>
3039
3040 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
3041 Delete copy ctor and assignment operator.
3042 (tdesc_type): Likewise.
3043 (tdesc_feature): Likewise.
3044 (tdesc_free_reg): Remove.
3045 (tdesc_create_reg): Use new.
3046 (tdesc_free_type): Remove.
3047 (tdesc_create_vector): Use new.
3048 (tdesc_create_union): Likewise.
3049 (tdesc_create_flags): Likewise.
3050 (tdesc_create_enum): Likewise.
3051 (tdesc_free_feature): Delete.
3052 (free_target_description): Use delete.
3053
325c9fd4
JB
30542017-06-19 John Baldwin <jhb@FreeBSD.org>
3055
3056 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
3057 registers.
3058
16b7a719
PA
30592017-06-19 Pedro Alves <palves@redhat.com>
3060
3061 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
3062 after gdb::unlinker.
3063
1c8e01c9
SDJ
30642017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
3065
3066 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
3067 gdb_environ to access an environment variable.
3068
ffce45d2
TP
30692017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3070
3071 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
3072 gdb_byte*.
3073
1d4fbac9
SM
30742017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3075
3076 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
3077
8465943a
SM
30782017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3079
3080 * configure: Re-generate.
3081 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
3082
3e019bdc
SM
30832017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3084
3085 * configure: Re-generate.
3086 * warning.m4: Pass -Werror to compiler when checking for
3087 supported warning flags.
3088
cf0dd6f0
SM
30892017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3090
3091 * Makefile.in (COMPILE.pre): Add "-x c++".
3092
6f98355c
YQ
30932017-06-16 Alan Hayward <alan.hayward@arm.com>
3094 Pedro Alves <palves@redhat.com>
3095 Yao Qi <yao.qi@linaro.org>
3096
3097 * defs.h (RequireLongest): New.
3098 (extract_integer): Declare function template.
3099 (extract_signed_integer): Remove the declaration, but define it
3100 static inline.
3101 (extract_unsigned_integer): Likewise.
3102 (store_integer): Declare function template.
3103 (store_signed_integer): Remove the declaration, but define it
3104 static inline.
3105 (store_unsigned_integer): Likewise.
3106 * findvar.c (extract_integer): New function template.
3107 (extract_signed_integer): Remove.
3108 (extract_unsigned_integer): Remove.
3109 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
3110 instantiations.
3111 (store_integer): New function template.
3112 (store_signed_integer): Remove.
3113 (store_unsigned_integer): Remove.
3114 (store_integer): Explicit instantiations.
3115 * regcache.c (regcache_raw_read_signed): Update.
3116 (regcache::raw_read): New function.
3117 (regcache::raw_read_signed): Remove.
3118 (regcache::raw_read_unsigned): Remove.
3119 (regcache_raw_read_unsigned): Update.
3120 (regcache_raw_write_unsigned): Update.
3121 (regcache::raw_write_signed): Remove.
3122 (regcache::raw_write): New function.
3123 (regcache_cooked_read_signed): Update.
3124 (regcache::raw_write_unsigned): Remove.
3125 (regcache::cooked_read_signed): Remove.
3126 (regcache_cooked_read_unsigned): Update.
3127 (regcache::cooked_read_unsigned): Remove.
3128 (regcache_cooked_write_signed): Update.
3129 (regcache_cooked_write_unsigned): Update.
3130 * regcache.h (regcache) <raw_read_signed>: Remove.
3131 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
3132 <raw_read, raw_write>: New.
3133 <cooked_read_signed, cooked_write_signed>: Remove.
3134 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
3135 <cooked_read, cooked_write>: New.
3136 * sh64-tdep.c (sh64_pseudo_register_read): Update.
3137 (sh64_pseudo_register_write): Update.
3138
a87dc45a
AK
31392017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
3140
3141 * arc-tdep.c (arc_disassembler_options): New variable.
3142 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
3143 of default_print_insn.
3144 (arc_delayed_print_insn): Set info->section when needed,
3145 use default_print_insn to retrieve a disassembler.
3146
45159d6a
SDJ
31472017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
3148
3149 PR gdb/21574
3150 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
3151 to mention $SHELL and startup-with-shell.
3152
b46c4cf0
MF
31532017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3154
3155 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
3156
6394c606
YQ
31572017-06-14 Yao Qi <yao.qi@linaro.org>
3158
3159 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
3160 default_print_insn instead of print_insn_aarch64.
3161 * arm-tdep.c (gdb_print_insn_arm): Call
3162 default_print_insn instead of print_insn_big_arm
3163 and print_insn_little_arm.
3164 * i386-tdep.c (i386_print_insn): Call default_print_insn
3165 instead of print_insn_i386.
3166 * ia64-tdep.c (ia64_print_insn): Call
3167 default_print_insn instead of print_insn_ia64.
3168 * mips-tdep.c (gdb_print_insn_mips): Call
3169 default_print_insn instead of print_insn_big_mips
3170 and print_insn_little_mips.
3171 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
3172 instead of print_insn_spu.
3173
d5722aa2
PA
31742017-06-14 Pedro Alves <palves@redhat.com>
3175
3176 * ada-lang.c: Include "common/byte-vector.h".
3177 (ada_value_primitive_packed_val): Use gdb::byte_vector.
3178 * charset.c (wchar_iterator::iterate): Resize the vector instead
3179 of reserving it.
3180 * common/byte-vector.h: Include "common/def-vector.h".
3181 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
3182 * cli/cli-dump.c: Include "common/byte-vector.h".
3183 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
3184 * common/byte-vector.h: New file.
3185 * common/def-vector.h: New file.
3186 * common/default-init-alloc.h: New file.
3187 * dwarf2loc.c: Include "common/byte-vector.h".
3188 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
3189 instead of reserving it.
3190 * dwarf2read.c: Include "common/byte-vector.h".
3191 (data_buf::m_vec): Now a gdb::byte_vector.
3192 * gdb_regex.c: Include "common/def-vector.h".
3193 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
3194 * mi/mi-main.c: Include "common/byte-vector.h".
3195 (mi_cmd_data_read_memory): Use gdb::byte_vector.
3196 * printcmd.c: Include "common/byte-vector.h".
3197 (print_scalar_formatted): Use gdb::byte_vector.
3198 * valprint.c: Include "common/byte-vector.h".
3199 (maybe_negate_by_bytes, print_decimal_chars): Use
3200 gdb::byte_vector.
3201
01ec7a27
SM
32022017-06-13 Simon Marchi <simon.marchi@ericsson.com>
3203
3204 * darwin-nat.c: Include "nat/fork-inferior.h".
3205
848d9074
SM
32062017-06-13 Simon Marchi <simon.marchi@ericsson.com>
3207
3208 * configure.nat: Factor out Darwin bits that are not
3209 architecture-specific. Add fork-inferior.o.
3210
3b912944
SM
32112017-06-13 Simon Marchi <simon.marchi@ericsson.com>
3212
3213 * configure.nat: Factor out AIX bits that are not
3214 architecture-specific. Add fork-inferior.o.
3215
55acdf22
AA
32162017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3217
3218 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
3219 (read_pieced_value, write_pieced_value): ...here. Reduce to
3220 wrappers that just call rw_pieced_value.
3221
f65e2044
AA
32222017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3223
3224 * dwarf2loc.c (write_pieced_value): When writing the data for a
3225 memory piece, use write_memory_with_notification instead of
3226 write_memory.
3227
23f945bf
AA
32282017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3229
3230 * valops.c (read_value_memory): Change embedded_offset to
3231 represent a bit offset instead of a byte offset.
3232 * value.h (read_value_memory): Adjust comment.
3233
f236533e
AA
32342017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3235
3236 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
3237 dest_offset_bits and source_offset_bits.
3238 (write_pieced_value): Likewise.
3239
65d84b76
AA
32402017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3241
3242 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
3243 given by DW_OP_bit_piece.
3244 (write_pieced_value): Likewise.
3245
242d31ab
AA
32462017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3247
3248 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
3249 some other preparations to the places where sufficient information
3250 is available.
3251 (write_pieced_value): Likewise.
3252
03c8af18
AA
32532017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3254
3255 * dwarf2loc.c (bits_to_bytes): New function.
3256 (read_pieced_value): Fix offset calculations for register pieces
3257 on big-endian targets.
3258 (write_pieced_value): Likewise.
3259
840989c1
AA
32602017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3261
3262 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
3263 (write_pieced_value): Likewise.
3264
359b19bb
AA
32652017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3266
3267 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
3268 transfer the source value's least significant bits, instead of its
3269 lowest-addressed ones. Rename type_len to max_offset.
3270 (read_pieced_value): Mirror above changes to write_pieced_value as
3271 applicable.
3272
07c9ca3b
AA
32732017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3274
3275 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
3276 truncate full bytes from dest_offset_bits before using it as an
3277 offset into the buffer.
3278
f1cc9874
AA
32792017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3280
3281 * dwarf2loc.c (write_pieced_value): Include transfer size in
3282 byte-wise check.
3283
cdaac320
AA
32842017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3285
3286 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
3287 calculation of this_size.
3288
af547a96
AA
32892017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3290
3291 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
3292 when targeting a bit-field.
3293 (write_pieced_value): Likewise.
3294
ddd7882a
AA
32952017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3296
3297 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
3298 (allocate_piece_closure): Drop addr_size parameter.
3299 (dwarf2_evaluate_loc_desc_full): Adjust call to
3300 allocate_piece_closure.
3301
e9352324
AA
33022017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3303
3304 PR gdb/21226
3305 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
3306 the LSB end, independent of endianness.
3307
d5d1163e
AA
33082017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3309
3310 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
3311 size capping.
3312
032bb6ea
YQ
33132017-06-13 Yao Qi <yao.qi@linaro.org>
3314
3315 * mips-linux-nat.c: Move include features/mips*-linux.c to
3316 mips-linux-tdep.c.
3317 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
3318 to mips-linux-tdep.c.
3319 * mips-linux-tdep.c: Include features/mips*-linux.c
3320 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
3321 functions.
3322 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
3323 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
3324 (tdesc_mips64_dsp_linux): Declare.
3325
f12f6bad
TT
33262017-06-12 Tom Tromey <tom@tromey.com>
3327
3328 * valprint.h (val_print_type_code_int): Remove.
3329 * valprint.c (generic_val_print_int): Always call
3330 val_print_scalar_formatted.
3331 (val_print_type_code_int): Remove.
3332 * printcmd.c (print_scalar_formatted): Handle options->format==0.
3333 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
3334 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
3335 * ada-valprint.c (ada_val_print_num): Use
3336 val_print_scalar_formatted.
3337
d9109c80
TT
33382017-06-12 Tom Tromey <tom@tromey.com>
3339
3340 * printcmd.c (print_scalar_formatted): Unify the two switches.
3341 Don't convert scalars to LONGEST.
3342
4ac0cb1c
TT
33432017-06-12 Tom Tromey <tom@tromey.com>
3344
3345 PR exp/16225:
3346 * valprint.h (print_decimal_chars): Update.
3347 * valprint.c (maybe_negate_by_bytes): New function.
3348 (print_decimal_chars): Add "is_signed" argument.
3349 * printcmd.c (print_scalar_formatted): Update.
3350
30a25466
TT
33512017-06-12 Tom Tromey <tom@tromey.com>
3352
3353 PR exp/16225:
3354 * valprint.h (print_binary_chars, print_hex_chars): Update.
3355 * valprint.c (val_print_type_code_int): Update.
3356 (print_binary_chars): Add "zero_pad" argument.
3357 (emit_octal_digit): New function.
3358 (print_octal_chars): Don't zero-pad.
3359 (print_decimal_chars): Likewise.
3360 (print_hex_chars): Add "zero_pad" argument.
3361 * sh64-tdep.c (sh64_do_fp_register): Update.
3362 * regcache.c (regcache::dump): Update.
3363 * printcmd.c (print_scalar_formatted): Update.
3364 * infcmd.c (default_print_one_register_info): Update.
3365
b3464d03
PA
33662017-06-12 Pedro Alves <palves@redhat.com>
3367 Alan Hayward <alan.hayward@arm.com>
3368
3369 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
3370 (mips_eabi_push_dummy_call): Rename local 'regsize' to
3371 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
3372 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
3373 Assert that abi_regsize bytes fit in 'ref_valbuf'.
3374
4b76cda9
PA
33752017-06-12 Pedro Alves <palves@redhat.com>
3376
3377 * dwarf2read.c (mapped_symtab::data): Now a vector of
3378 symtab_index_entry instead of vector of
3379 std::unique_ptr<symtab_index_entry>. All users adjusted to check
3380 whether an element's name is NULL instead of checking whether the
3381 element itself is NULL.
3382 (find_slot): Change return type. Adjust.
3383 (hash_expand, , add_index_entry, uniquify_cu_indices)
3384 (write_hash_table): Adjust.
3385
e8f8bcb3
PA
33862017-06-12 Pedro Alves <palves@redhat.com>
3387
3388 * dwarf2read.c (recursively_count_psymbols): New function.
3389 (write_psymtabs_to_index): Call it to compute number of psyms and
3390 pass estimate size of psyms_seen to unordered_set's ctor.
3391
70a1152b
PA
33922017-06-12 Pedro Alves <palves@redhat.com>
3393
3394 * dwarf2read.c (write_hash_table): Check if key already exists
3395 before emplacing.
3396
c2f134ac
PA
33972017-06-12 Pedro Alves <palves@redhat.com>
3398
3399 * dwarf2read.c (data_buf::append_space): Rename to...
3400 (data_buf::grow): ... this, and make private. Adjust all callers.
3401 (data_buf::append_uint): New method.
3402 (add_address_entry, write_one_signatured_type)
3403 (write_psymtabs_to_index): Use it.
3404
a81e6d4d
PA
34052017-06-12 Pedro Alves <palves@redhat.com>
3406
3407 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
3408 (file_write (FILE *, const std::vector<Elem>&)): Delete.
3409 (data_buf::file_write): Call ::fwrite directly.
3410
6fd931f2
PA
34112017-06-12 Pedro Alves <palves@redhat.com>
3412
3413 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
3414 std::vector::erase.
3415
bc8f2430
JK
34162017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
3417
3418 Code cleanup: C++ify .gdb_index producer.
3419 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
3420 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
3421 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
3422 (create_strtab, add_string): Remove.
3423 (file_write, data_buf): New.
3424 (struct symtab_index_entry): Use std::vector for cu_indices.
3425 (struct mapped_symtab): Use std::vector for data.
3426 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
3427 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
3428 Remove.
3429 (find_slot): Change return type. Update it to the new data structures.
3430 (hash_expand, add_index_entry): Update it to the new data structures.
3431 (offset_type_compare): Remove.
3432 (uniquify_cu_indices): Update it to the new data structures.
3433 (c_str_view, c_str_view_hasher, vector_hasher): New.
3434 (add_indices_to_cpool): Remove.
3435 (write_hash_table): Update it to the new data structures.
3436 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
3437 (eq_psymtab_cu_index): Remove.
3438 (psym_index_map): New typedef.
3439 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
3440 reference and std::unordered_map for cu_index_htab.
3441 (add_address_entry, add_address_entry_worker, write_address_map)
3442 (write_psymbols): Update it to the new data structures.
3443 (write_obstack): Remove.
3444 (struct signatured_type_index_data): Change types_list to a data_buf
3445 reference and psyms_seen to a std::unordered_set reference.
3446 (write_one_signatured_type, recursively_write_psymbols)
3447 (write_psymtabs_to_index): Update it to the new data structures.
3448
c4dcb155
SM
34492017-06-11 Simon Marchi <simon.marchi@ericsson.com>
3450
3451 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
3452 separate-debug-file commands.
3453 * symfile.h (separate_debug_file_debug): New global.
3454 * symfile.c (separate_debug_file_debug): New global.
3455 (separate_debug_file_exists, find_separate_debug_file): Add
3456 debug output.
3457 (_initialize_symfile): Add "set debug separate-debug-file"
3458 command.
3459 * build-id.c (build_id_to_debug_bfd,
3460 find_separate_debug_file_by_buildid): Add debug output.
3461
6d45d4b4
SM
34622017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3463
3464 * gdbarch.sh (displaced_step_free_closure): Remove.
3465 * gdbarch.h, gdbarch.c: Re-generate.
3466 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
3467 displaced_step_free_closure.
3468 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
3469 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
3470 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3471 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
3472 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3473 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
3474 * arch-utils.h (simple_displaced_step_free_closure): Remove.
3475 * arch-utils.c (simple_displaced_step_free_closure): Remove.
3476 * infrun.c (displaced_step_clear): Call xfree instead of
3477 gdbarch_displaced_step_free_closure.
3478
2f91880f
SDJ
34792017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
3480
3481 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
3482 NULL".
3483
b8b6e72f
AH
34842017-06-08 Alan Hayward <alan.hayward@arm.com>
3485
3486 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
3487 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
3488 (mn10300_push_dummy_call): Likewise.
3489
5369082e
AH
34902017-06-08 Alan Hayward <alan.hayward@arm.com>
3491
3492 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
3493
ff4ca5ac
AH
34942017-06-08 Alan Hayward <alan.hayward@arm.com>
3495
3496 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
3497
aefd8b33
SDJ
34982017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3499
3500 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
3501 able to start inferiors using a shell.
3502 (New remote packets): Announce new packet "QStartupWithShell".
3503 * remote.c: Add PACKET_QStartupWithShell.
3504 (extended_remote_create_inferior): Handle new
3505 PACKET_QStartupWithShell.
3506 (remote_protocol_features) <QStartupWithShell>: New entry for
3507 PACKET_QStartupWithShell.
3508 (_initialize_remote): Call "add_packet_config_cmd" for
3509 QStartupShell.
3510
2090129c
SDJ
35112017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3512 Pedro Alves <palves@redhat.com>
3513
3514 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
3515 and "nat/fork-inferior.h".
3516 * common/common-inferior.h: New file, with contents from
3517 "gdb/inferior.h".
3518 * commom/common-utils.c: Include "common-utils.h".
3519 (stringify_argv): New function.
3520 * common/common-utils.h (stringify_argv): New prototype.
3521 * configure.nat: Add "fork-inferior.o" as a dependency for
3522 "*linux*", "fbsd*" and "nbsd*" hosts.
3523 * corefile.c (get_exec_file): Update comment.
3524 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
3525 instead of "startup_inferior".
3526 (darwin_create_inferior): Call "add_thread_silent" after
3527 "fork_inferior".
3528 * fork-child.c: Cleanup unnecessary includes.
3529 (SHELL_FILE): Move to "common/common-fork-child.c".
3530 (environ): Likewise.
3531 (exec_wrapper): Initialize.
3532 (get_exec_wrapper): New function.
3533 (breakup_args): Move to "common/common-fork-child.c"; rename to
3534 "breakup_args_for_exec".
3535 (escape_bang_in_quoted_argument): Move to
3536 "common/common-fork-child.c".
3537 (saved_ui): New variable.
3538 (prefork_hook): New function.
3539 (postfork_hook): Likewise.
3540 (postfork_child_hook): Likewise.
3541 (gdb_startup_inferior): Likewise.
3542 (fork_inferior): Move to "common/common-fork-child.c". Update
3543 function to support gdbserver.
3544 (startup_inferior): Likewise.
3545 * gdbcore.h (get_exec_file): Remove declaration.
3546 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
3547 instead of "startup_inferior". Call "add_thread_silent" after
3548 "fork_inferior".
3549 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
3550 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
3551 instead of "startup_inferior". Call "add_thread_silent" after
3552 "fork_inferior".
3553 * inferior.h: Include "common-inferior.h".
3554 (trace_start_error): Move to "common/common-utils.h".
3555 (trace_start_error_with_name): Likewise.
3556 (fork_inferior): Move prototype to "nat/fork-inferior.h".
3557 (startup_inferior): Likewise.
3558 (gdb_startup_inferior): New prototype.
3559 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
3560 * nat/fork-inferior.h: New file.
3561 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
3562 instead of "startup_inferior". Call "add_thread_silent" after
3563 "fork_inferior".
3564 * target.h (target_terminal_init): Move prototype to
3565 "target/target.h".
3566 (target_terminal_inferior): Likewise.
3567 (target_terminal_ours): Likewise.
3568 * target/target.h (target_terminal_init): New prototype, moved
3569 from "target.h".
3570 (target_terminal_inferior): Likewise.
3571 (target_terminal_ours): Likewise.
3572 * utils.c (gdb_flush_out_err): New function.
3573
043a4934
SDJ
35742017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3575
3576 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
3577 * common/common-gdbthread.h: New file, with parts from
3578 "gdb/gdbthread.h".
3579 * gdbthread.h: Include "common-gdbthread.h".
3580 (switch_to_thread): Moved to "common/common-gdbthread.h".
3581
15652511
SDJ
35822017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3583
3584 * Makefile.in (SFILES): Add "common/job-control.c".
3585 (HFILES_NO_SRCDIR): Add "common/job-control.h".
3586 (COMMON_OBS): Add "job-control.o".
3587 * common/job-control.c: New file, with contents from
3588 "gdb/inflow.c".
3589 * common/job-control.h: New file, with contents from "terminal.h".
3590 * fork-child.c: Include "job-control.h".
3591 * inflow.c: Include "job-control.h".
3592 (gdb_setpgid): Move to "common/common-inflow.c".
3593 (_initialize_inflow): Move setting of "job_control" to
3594 "handle_job_control".
3595 * terminal.h (job_control): Moved to "common/common-terminal.h".
3596 (gdb_setpgid): Likewise.
3597 * top.c: Include "job_control.h".
3598 * utils.c: Likewise.
3599 (job_control): Moved to "job-control.c".
3600
2d7cc5c7
PA
36012017-06-07 Pedro Alves <palves@redhat.com>
3602
3603 * Makefile.in (SFILES): Add gdb_regex.c.
3604 (COMMON_OBS): Add gdb_regex.o.
3605 * ada-lang.c (ada_add_standard_exceptions)
3606 (ada_add_exceptions_from_frame, name_matches_regex)
3607 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
3608 parameter type to compiled_regex. Adjust.
3609 (ada_exceptions_list): Use compiled_regex.
3610 * break-catch-throw.c (exception_catchpoint::pattern): Now a
3611 std::unique_ptr<compiled_regex>.
3612 (exception_catchpoint::~exception_catchpoint): Remove regfree
3613 call.
3614 (check_status_exception_catchpoint): Adjust to use compiled_regex.
3615 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
3616 * breakpoint.c (solib_catchpoint::compiled): Now a
3617 std::unique_ptr<compiled_regex>.
3618 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
3619 (check_status_catch_solib): Adjust to use compiled_regex.
3620 (add_solib_catchpoint): Adjust to use compiled_regex.
3621 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
3622 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
3623 compiled_regex reference. Adjust to use it.
3624 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
3625 declaration. Include "gdb_regex.h".
3626 (apropos_cmd): Change regex parameter to compiled_regex reference.
3627 * gdb_regex.c: New file.
3628 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
3629 declarations.
3630 (class compiled_regex): New.
3631 * linux-tdep.c: Include "common/gdb_optional.h".
3632 (struct mapping_regexes): New, factored out from
3633 mapping_is_anonymous_p, and adjusted to use compiled_regex.
3634 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
3635 gdb::optional and remove cleanups. Adjust to compiled_regex.
3636 * probe.c: Include "common/gdb_optional.h".
3637 (collect_probes): Use compiled_regex and gdb::optional and remove
3638 cleanups.
3639 * skip.c: Include "common/gdb_optional.h".
3640 (skiplist_entry::compiled_function_regexp): Now a
3641 gdb::optional<compiled_regex>.
3642 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
3643 (free_skiplist_entry): Remove regfree call.
3644 (compile_skip_regexp, skip_rfunction_p): Adjust to use
3645 compiled_regex and gdb::optional.
3646 * symtab.c: Include "common/gdb_optional.h".
3647 (search_symbols): Use compiled_regex and gdb::optional.
3648 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
3649 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
3650 to gdb_regex.c.
3651
50d6adef
AH
36522017-06-07 Alan Hayward <alan.hayward@arm.com>
3653
3654 * regcache.c (regcache::save): Avoid buffer use.
3655 (regcache::dump): Likewise.
3656
4a8a33c8
AH
36572017-06-07 Alan Hayward <alan.hayward@arm.com>
3658
3659 * sh-tdep.c (sh_pseudo_register_read): Remove
3660 MAX_REGISTER_SIZE.
3661 (sh_pseudo_register_write): Likewise.
3662 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
3663 (sh64_pseudo_register_write): Likewise
3664
d1be909e
AH
36652017-06-07 Alan Hayward <alan.hayward@arm.com>
3666
3667 * aarch64-tdep.c (aarch64_store_return_value): Use
3668 V_REGISTER_SIZE.
3669 (aarch64_pseudo_read_value): Likewise.
3670 (aarch64_pseudo_write): Likewise.
3671
f4a65042
YQ
36722017-06-06 Yao Qi <yao.qi@linaro.org>
3673
3674 * regformats/regdef.h (set_register_cache): Remove the
3675 declaration.
3676
9f7fb0aa
AH
36772017-06-06 Alan Hayward <alan.hayward@arm.com>
3678
3679 * frame.c (frame_unwind_register_signed): Use
3680 frame_unwind_register_value.
3681
e1e01040
PA
36822017-06-06 Pedro Alves <palves@redhat.com>
3683
3684 PR breakpoints/21553
3685 * breakpoint.c (create_breakpoints_sal_default)
3686 (init_breakpoint_sal, create_breakpoint_sal): Use
3687 gdb::unique_xmalloc_ptr for string parameters.
3688 (create_breakpoint): Constify 'extra_string' and 'cond_string'
3689 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
3690 (base_breakpoint_create_breakpoints_sal)
3691 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
3692 (strace_marker_create_breakpoints_sal)
3693 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
3694 string parameters.
3695 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
3696 gdb::unique_xmalloc_ptr for string parameters.
3697 (create_breakpoint): Constify 'extra_string' and 'cond_string'
3698 parameters.
3699
fbe654c8
AH
37002017-06-06 Alan Hayward <alan.hayward@arm.com>
3701
3702 * alpha-tdep.c (alpha_register_to_value): Use
3703 get_frame_register_value.
3704 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
3705
ae0d01d6
AH
37062017-06-06 Alan Hayward <alan.hayward@arm.com>
3707
3708 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
3709 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
3710 (ia64_value_to_register): Likewise.
3711 (ia64_extract_return_value): Likewise.
3712 (ia64_store_return_value): Likewise.
3713 (ia64_push_dummy_call): Likewise.
3714
49cf576c
JB
37152017-06-04 Joel Brobecker <brobecker@adacore.com>
3716
3717 GDB 8.0 released.
3718
26b6a6ab
SM
37192017-06-03 Simon Marchi <simon.marchi@ericsson.com>
3720
3721 * x86-linux-nat.c (struct arch_lwp_info): Remove.
3722
22827c51
SM
37232017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
3724
3725 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
3726 parameter.
3727 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
3728
0e05cf3a
SM
37292017-06-02 Simon Marchi <simon.marchi@ericsson.com>
3730
3731 * event-loop.c (poll_timers): Unallocate timer using delete
3732 instead of xfree.
3733
c1fc2657
SM
37342017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3735
3736 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
3737 (struct breakpoint) <~breakpoint>: New.
3738 (struct watchpoint): Inherit from breakpoint.
3739 <~watchpoint>: New.
3740 <base>: Remove.
3741 (struct tracepoint): Inherit from breakpoint.
3742 <base>: Remove.
3743 * breakpoint.c (longjmp_breakpoint_ops): Remove.
3744 (struct longjmp_breakpoint): Inherit from breakpoint.
3745 <~longjmp_breakpoint>: New.
3746 <base>: Remove.
3747 (new_breakpoint_from_type): Remove casts.
3748 (watchpoint_in_thread_scope): Remove reference to base field.
3749 (watchpoint_del_at_next_stop): Likewise.
3750 (update_watchpoint): Likewise.
3751 (watchpoint_check): Likewise.
3752 (bpstat_check_watchpoint): Likewise.
3753 (set_longjmp_breakpoint): Likewise.
3754 (struct fork_catchpoint): Inherit from breakpoint.
3755 <base>: Remove.
3756 (struct solib_catchpoint): Inherit from breakpoint.
3757 <~solib_catchpoint>: New.
3758 <base>: Remove.
3759 (dtor_catch_solib): Change to ...
3760 (solib_catchpoint::~solib_catchpoint): ... this.
3761 (breakpoint_hit_catch_solib): Remove reference to base field.
3762 (add_solib_catchpoint): Likewise.
3763 (create_fork_vfork_event_catchpoint): Likewise.
3764 (struct exec_catchpoint): Inherit from breakpoint.
3765 <~exec_catchpoint>: New.
3766 <base>: Remove.
3767 (dtor_catch_exec): Change to ...
3768 (exec_catchpoint::~exec_catchpoint): ... this.
3769 (dtor_watchpoint): Change to ...
3770 (watchpoint::~watchpoint): ... this.
3771 (watch_command_1): Remove reference to base field.
3772 (catch_exec_command_1): Likewise.
3773 (base_breakpoint_dtor): Change to ...
3774 (breakpoint::~breakpoint): ... this.
3775 (base_breakpoint_ops): Remove dtor field value.
3776 (longjmp_bkpt_dtor): Change to ...
3777 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
3778 (strace_marker_create_breakpoints_sal): Remove reference to base
3779 field.
3780 (delete_breakpoint): Don't manually call breakpoint destructor.
3781 (create_tracepoint_from_upload): Remove reference to base field.
3782 (trace_pass_set_count): Likewise.
3783 (initialize_breakpoint_ops): Don't initialize
3784 momentary_breakpoint_ops, don't set dtors.
3785 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
3786 <~ada_catchpoint>: New.
3787 <base>: Remove.
3788 (create_excep_cond_exprs): Remove reference to base field.
3789 (dtor_exception): Change to ...
3790 (ada_catchpoint::~ada_catchpoint): ... this.
3791 (dtor_catch_exception): Remove.
3792 (dtor_catch_exception_unhandled): Remove.
3793 (dtor_catch_assert): Remove.
3794 (create_ada_exception_catchpoint): Remove reference to base
3795 field.
3796 (initialize_ada_catchpoint_ops): Don't set dtors.
3797 * break-catch-sig.c (struct signal_catchpoint): Inherit from
3798 breakpoint.
3799 <~signal_catchpoint>: New.
3800 <base>: Remove.
3801 (signal_catchpoint_dtor): Change to ...
3802 (signal_catchpoint::~signal_catchpoint): ... this.
3803 (create_signal_catchpoint): Remove reference to base field.
3804 (initialize_signal_catchpoint_ops): Don't set dtor.
3805 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
3806 from breakpoint.
3807 <~syscall_catchpoint>: New.
3808 <base>: Remove.
3809 (dtor_catch_syscall): Change to ...
3810 (syscall_catchpoint::~syscall_catchpoint): ... this.
3811 (create_syscall_event_catchpoint): Remove reference to base
3812 field.
3813 (initialize_syscall_catchpoint_ops): Don't set dtor.
3814 * break-catch-throw.c (struct exception_catchpoint): Inherit
3815 from breakpoint.
3816 <~exception_catchpoint>: New.
3817 <base>: Remove.
3818 (dtor_exception_catchpoint): Change to ...
3819 (exception_catchpoint::~exception_catchpoint): ... this.
3820 (handle_gnu_v3_exceptions): Remove reference to base field.
3821 (initialize_throw_catchpoint_ops): Don't set dtor.
3822 * ctf.c (ctf_get_traceframe_address): Remove reference to base
3823 field.
3824 * remote.c (remote_get_tracepoint_status): Likewise.
3825 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
3826 * tracefile.c (tracefile_fetch_registers): Likewise.
3827 * tracepoint.c (actions_command): Likewise.
3828 (validate_actionline): Likewise.
3829 (tfind_1): Likewise.
3830 (get_traceframe_location): Likewise.
3831 (find_matching_tracepoint_location): Likewise.
3832 (parse_tracepoint_status): Likewise.
3833 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
3834
3b0871f4
SM
38352017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3836
3837 * breakpoint.c (struct longjmp_breakpoint): New struct.
3838 (is_tracepoint_type): Change return type to bool.
3839 (is_longjmp_type): New function.
3840 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
3841 (set_raw_breakpoint_without_location): Use
3842 new_breakpoint_from_type.
3843 (set_raw_breakpoint): Likewise.
3844
a5e364af
SM
38452017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3846
3847 * breakpoint.c (new_breakpoint_from_type): New function.
3848 (create_breakpoint_sal): Use new_breakpoint_from_type and
3849 unique_ptr.
3850 (create_breakpoint): Likewise.
3851
ae3b3f34
SM
38522017-05-31 Simon Marchi <simon.marchi@ericsson.com>
3853
3854 * memattr.c (mem_info_command): Rename to ...
3855 (info_mem_command): ... this.
3856 (mem_enable_command): Rename to ...
3857 (enable_mem_command): ... this.
3858 (mem_disable_command): Rename to ...
3859 (disable_mem_command): ... this.
3860 (mem_delete_command): Rename to ...
3861 (delete_mem_command): ... this.
3862 (_initialize_mem): Adjust function names.
3863
13ace077
MM
38642017-05-31 Markus Metzger <markus.t.metzger@intel.com>
3865
3866 * btrace.c (handle_pt_insn_events): New.
3867 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
3868 STATUS. Split into this and ...
3869 (handle_pt_insn_event_flags): ... this.
3870
c56ccc05
MM
38712017-05-31 Markus Metzger <markus.t.metzger@intel.com>
3872
3873 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
3874 and struct pt_insn.resynced.
3875 * configure: Regenerated.
3876 * config.in: Regenerated.
3877
08c3f6d2
TW
38782017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3879
3880 * btrace.c (ftrace_find_call_by_number): New function.
3881 (ftrace_new_function): Store objects, not pointers.
3882 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
3883 ftrace_new_gap, ftrace_update_function,
3884 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
3885 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
3886 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
3887 btrace_ends_with_single_insn, btrace_call_get): Account for
3888 btrace_thread_info::functions now storing objects.
3889 * btrace.h (struct btrace_thread_info): Add constructor.
3890 (struct btrace_thread_info) <functions>: Make std::vector.
3891 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
3892 Initialize with default values.
3893 * record-btrace.c (record_btrace_frame_sniffer): Account for
3894 btrace_thread_info::functions now storing objects.
3895
8ffd39f2
TW
38962017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3897
3898 * btrace.c: Remove typedef bfun_s.
3899 (ftrace_new_gap): Directly add gaps to the list of gaps.
3900 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
3901 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
3902 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
3903 instead of gdb VEC.
3904
4aeb0dfc
TW
39052017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3906
3907 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
3908 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
3909 with btrace_thread_info::next_segment and
3910 btrace_thread_info::prev_segment.
3911 * btrace.h: Remove struct btrace_func_link.
3912 (struct btrace_function): Replace pair of function segment pointers
3913 with pair of indices.
3914 * python/py-record-btrace.c (btpy_call_prev_sibling,
3915 btpy_call_next_sibling): Replace references to
3916 btrace_thread_info::segment with btrace_thread_info::next_segment and
3917 btrace_thread_info::prev_segment.
3918 * record-btrace.c (record_btrace_frame_this_id): Use
3919 btrace_find_call_by_number.
3920
eb8f2b9c
TW
39212017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3922
3923 * btrace.c (ftrace_new_function, ftrace_fixup_level,
3924 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
3925 btrace_insn_next, btrace_insn_prev): Remove references to
3926 btrace_thread_info::flow.
3927 * btrace.h (struct btrace_function): Remove FLOW.
3928
42bfe59e
TW
39292017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3930
3931 * btrace.c (ftrace_find_call_by_number): New function.
3932 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
3933 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
3934 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
3935 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
3936 index.
3937 * btrace.h (struct btrace_function): Turn UP into an index.
3938 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
3939 as an index.
3940 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
3941 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
3942 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
3943
b54b03bd
TW
39442017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3945
3946 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
3947 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
3948 ftrace_update_function, ftrace_compute_global_level_offset,
3949 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
3950 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
3951 btrace_insn_end, btrace_is_empty): Remove references to
3952 btrace_thread_info::begin and btrace_thread_info::end.
3953 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
3954 (struct btrace_thread_info) <functions>: Adjust comment.
3955 * record-btrace.c (record_btrace_start_replaying): Remove reference to
3956 btrace_thread_info::begin.
3957
8286623c
TW
39582017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3959
3960 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
3961 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
3962 ftrace_update_function): Remove arguments that implicitly were always
3963 BTINFO->END.
3964 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
3965 Don't pass BTINFO->END.
3966
a0f1b963
TW
39672017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3968
3969 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
3970 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
3971 btrace_find_insn_by_number): Replace function segment pointer with
3972 index.
3973 (btrace_insn_cmp): Simplify.
3974 * btrace.h: (struct btrace_insn_iterator) Rename index to
3975 insn_index. Replace function segment pointer with index into function
3976 segment vector.
3977 * record-btrace.c (record_btrace_call_history): Replace function
3978 segment pointer use with index.
3979 (record_btrace_frame_sniffer): Retrieve function call segment through
3980 vector.
3981 (record_btrace_set_replay): Remove defunc't safety check.
3982
f158f208
TW
39832017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3984
3985 * btrace.c (btrace_ends_with_single_insn): New function.
3986 (btrace_call_get, btrace_call_number, btrace_call_begin,
3987 btrace_call_end, btrace_call_next, btrace_call_prev,
3988 btrace_find_call_by_number): Use index into call segment vector
3989 instead of pointer.
3990 (btrace_call_cmp): Simplify.
3991 * btrace.h (struct btrace_call_iterator): Replace function call segment
3992 pointer with index into vector.
3993 * record-btrace.c (record_btrace_call_history): Use index instead of
3994 pointer.
3995
521103fd
TW
39962017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3997
3998 * btrace.c (btrace_insn_begin, btrace_insn_end,
3999 btrace_find_insn_by_number): Add btinfo to iterator.
4000 * btrace.h (struct btrace_insn_iterator): Add btinfo.
4001
17b89b34
TW
40022017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4003
4004 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
4005 and save pointers directly.
4006 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
4007 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
4008 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
4009 changed signature of functions.
4010 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
4011 (btrace_fetch): Remove code that adds btrace_function pointers to
4012 vector of btrace_functions.
4013 (btrace_clear): Simplify freeing vector of btrace_functions.
4014
2b51eddc
TW
40152017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
4016
4017 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
4018 Replace VEC_* with std::vector functions.
4019 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
4020 (struct btrace_thread_info)<functions>: Change type to std::vector.
4021
db6be0d5
SM
40222017-05-30 Simon Marchi <simon.marchi@ericsson.com>
4023
4024 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
4025 "Removed targets and native configurations" up. Merge duplicate
4026 "New commands" sub-sections. Add "New options" sub-sections.
4027
b057297a
AH
40282017-05-26 Alan Hayward <alan.hayward@arm.com>
4029
4030 * defs.h (copy_integer_to_size): New declaration.
4031 * findvar.c (copy_integer_to_size): New function.
4032 (do_cint_test): New selftest function.
4033 (copy_integer_to_size_test): Likewise.
4034 (_initialize_findvar): Likewise.
4035 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
4036 (mips_fbsd_collect_reg): Use raw_collect_integer.
4037 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
4038 (mips64_fill_gregset): Use raw_collect_integer
4039 (mips64_fill_fpregset): Use raw_supply_integer.
4040 * regcache.c (regcache::raw_supply_integer): New function.
4041 (regcache::raw_collect_integer): Likewise.
4042 * regcache.h: (regcache::raw_supply_integer): New declaration.
4043 (regcache::raw_collect_integer): Likewise.
4044
b77b02a5
YQ
40452017-05-24 Yao Qi <yao.qi@linaro.org>
4046
4047 * Makefile.in (SFILES): Add gdbarch-selftests.c.
4048 (COMMON_OBS): Add gdbarch-selftests.o.
4049 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
4050 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
4051 * gdbarch-selftests.c: New file.
4052 * regcache.h (regcache) <~regcache>: Mark it virtual if
4053 GDB_SELF_TEST.
4054 <raw_write>: Likewise.
4055
e521e87e
YQ
40562017-05-24 Yao Qi <yao.qi@linaro.org>
4057
4058 * regcache.c (current_regcache): Change it to
4059 regcache::current_regcache.
4060 (regcache_observer_target_changed): Update.
4061 (regcache_thread_ptid_changed): Make it a regcache static
4062 method.
4063 (regcache_thread_ptid_changed): Update.
4064 (class regcache_access): New.
4065 (current_regcache_test): Update.
4066 (_initialize_regcache): Update.
4067 * regcache.h: Include forward_list.
4068 (regcache): Declare regcache_thread_ptid_changed and declare
4069 registers_changed_ptid as friend.
4070
d8e07dda
YQ
40712017-05-24 Yao Qi <yao.qi@linaro.org>
4072
4073 * i387-tdep.c (i387_register_to_value): Use register_size
4074 instead of TYPE_LENGTH.
4075 * m68k-tdep.c (m68k_register_to_value): Likewise.
4076
8c8f9122
YQ
40772017-05-24 Yao Qi <yao.qi@linaro.org>
4078
4079 * i387-tdep.c (i387_convert_register_p): Return false if type
4080 code isn't TYPE_CODE_FLT.
4081
68fce50f
YQ
40822017-05-24 Yao Qi <yao.qi@linaro.org>
4083
4084 * alpha-tdep.c (alpha_convert_register_p): Return true if type
4085 length is 4.
4086 (alpha_register_to_value): Remove type length check.
4087 (alpha_value_to_register): Likewise.
4088
88954b49
YQ
40892017-05-24 Yao Qi <yao.qi@linaro.org>
4090
4091 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
4092 TYPE_CODE_FLT.
4093
e3ec9b69
YQ
40942017-05-24 Yao Qi <yao.qi@linaro.org>
4095
4096 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
4097 TYPE_CODE_FLT or not.
4098
cdd238da
YQ
40992017-05-24 Yao Qi <yao.qi@linaro.org>
4100
4101 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
4102 * avr-tdep.c (avr_gdbarch_init): Likewise.
4103 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
4104 * cris-tdep.c (cris_gdbarch_init): Likewise.
4105 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4106 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
4107 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4108 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
4109 * mep-tdep.c (mep_gdbarch_init): Likewise.
4110 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
4111 * mips-tdep.c (mips_gdbarch_init): Likewise.
4112 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
4113 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4114 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
4115 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
4116 * v850-tdep.c (v850_gdbarch_init): Likewise.
4117
7a3929c4
YQ
41182017-05-24 Yao Qi <yao.qi@linaro.org>
4119
4120 * selftest-arch.c (tests_with_arch): Call registers_changed
4121 and reinit_frame_cache.
4122 * selftest.c (run_self_tests): Likewise.
4123
f4985dba
YQ
41242017-05-24 Yao Qi <yao.qi@linaro.org>
4125
4126 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
4127 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
4128
ab20fa4a
YQ
41292017-05-24 Yao Qi <yao.qi@linaro.org>
4130
4131 * rl78-tdep.c (rl78_gdbarch_init): Don't call
4132 set_gdbarch_print_insn.
4133
f532ab94
YQ
41342017-05-24 Yao Qi <yao.qi@linaro.org>
4135
4136 * h8300-tdep.c (h8300_gdbarch_init): Don't call
4137 set_gdbarch_print_insn.
4138
39503f82
YQ
41392017-05-24 Yao Qi <yao.qi@linaro.org>
4140
4141 * alpha-tdep.c (alpha_gdbarch_init): Don't call
4142 set_gdbarch_print_insn.
4143 * arc-tdep.c (arc_gdbarch_init): Likewise.
4144 * arch-utils.c: include dis-asm.h.
4145 (default_print_insn): New function.
4146 * arch-utils.h (default_print_insn): Declare.
4147 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
4148 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
4149 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
4150 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
4151 * frv-tdep.c (frv_gdbarch_init): Likewise.
4152 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4153 * gdbarch.sh (print_insn): Use default_print_insn.
4154 * gdbarch.c: Regenerated.
4155 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
4156 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
4157 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
4158 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
4159 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4160 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
4161 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
4162 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
4163 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
4164 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
4165 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
4166 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4167 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
4168 * mt-tdep.c (mt_gdbarch_init): Likewise.
4169 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4170 * nios2-tdep.c (nios2_print_insn): Remove.
4171 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
4172 * rx-tdep.c (rx_gdbarch_init): Likewise.
4173 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
4174 * score-tdep.c (score_print_insn): Remove.
4175 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
4176 * sh-tdep.c (sh_gdbarch_init): Likewise.
4177 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
4178 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4179 * tic6x-tdep.c (tic6x_print_insn): Remove.
4180 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
4181 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
4182 * v850-tdep.c (v850_gdbarch_init): Likewise.
4183 * vax-tdep.c (vax_gdbarch_init): Likewise.
4184 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
4185 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
4186
f7241d4f
JB
41872017-05-23 John Baldwin <jhb@FreeBSD.org>
4188
4189 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
4190 (MIPS_FP0_REGNUM): Remove.
4191 (MIPS_FSR_REGNUM): Remove.
4192 (mips_fbsd_supply_fpregs): Use mips_regnum.
4193 (mips_fbsd_supply_gregs): Likewise.
4194 (mips_fbsd_collect_fpregs): Likewise.
4195 (mips_fbsd_collect_gregs): Likewise.
4196
d489d81d
JB
41972017-05-23 John Baldwin <jhb@FreeBSD.org>
4198
4199 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
4200 (getpfpregs_supplies): New function.
4201 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
4202 getfpregs_supplies.
4203 (mips_fbsd_store_inferior_registers): Likewise.
4204
e11b3cdc
PA
42052017-05-22 Pedro Alves <palves@redhat.com>
4206
4207 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
4208 maintainer.
4209
0f068fb5
AH
42102017-05-22 Alan Hayward <alan.hayward@arm.com>
4211
4212 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
4213 (store_register): Likewise.
4214 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
4215 (get_decimal_float_return_value): Likewise.
4216 (do_ppc_sysv_return_value): Likewise.
4217 (ppc64_sysv_abi_push_integer): Likewise.
4218 (ppc64_sysv_abi_push_freg): Likewise.
4219 (ppc64_sysv_abi_return_value_base): Likewise.
4220 (ppc64_sysv_abi_return_value): Likewise.
4221 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
4222 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
4223 * rs6000-nat.c: Likewise.
4224 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
4225 (rs6000_value_to_register): Likewise.
4226 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
4227
e6cf65f2
TT
42282017-05-21 Tom Tromey <tom@tromey.com>
4229
4230 PR rust/21466:
4231 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
4232 arrays as "[T]", not "[T; ]".
4233
43cc5389
TT
42342017-05-19 Tom Tromey <tom@tromey.com>
4235
4236 PR rust/21484:
4237 * rust-lang.c (exp_descriptor_rust): New function.
4238 (rust_language_defn): Use it.
4239 * p-lang.c (pascal_language_defn): Update.
4240 * opencl-lang.c (opencl_language_defn): Update.
4241 * objc-lang.c (objc_language_defn): Update.
4242 * m2-lang.c (m2_language_defn): Update.
4243 * language.h (struct language_defn)
4244 <la_watch_location_expression>: New member.
4245 * language.c (unknown_language_defn, auto_language_defn)
4246 (local_language_defn): Update.
4247 * go-lang.c (go_language_defn): Update.
4248 * f-lang.c (f_language_defn): Update.
4249 * d-lang.c (d_language_defn): Update.
4250 * c-lang.h (c_watch_location_expression): Declare.
4251 * c-lang.c (c_watch_location_expression): New function.
4252 (c_language_defn, cplus_language_defn, asm_language_defn)
4253 (minimal_language_defn): Use it.
4254 * breakpoint.c (watch_command_1): Call
4255 la_watch_location_expression.
4256 * ada-lang.c (ada_language_defn): Update.
4257
7a6e7fcc
RO
42582017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4259
6e7e1744
RO
4260 PR tui/21482
4261 * gdb_curses.h (NOMACROS): Define.
4262 (NCURSES_NOMACROS): Define.
4263
42642017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4265
4266 PR tui/21482
7a6e7fcc
RO
4267 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
4268 arg to char *.
4269 * tui/tui-wingeneral.c (box_win): Likewise.
4270 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
4271 (tui_show_source_line): Likewise.
4272 (tui_show_exec_info_content): Likewise.
4273
1933fd8e
VM
42742017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
4275
4276 * sparc-tdep.c (sparc_structure_return_p)
4277 (sparc_arg_on_registers_p): New functions.
4278 (sparc32_store_arguments): Use them.
4279 * sparc64-tdep.c (sparc64_16_byte_align_p)
4280 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
4281 Handle TYPE_CODE_ARRAY.
4282
21873064
YQ
42832017-05-17 Yao Qi <yao.qi@linaro.org>
4284
4285 * cli/cli-decode.c (add_alias_cmd): New function.
4286 * command.h (add_alias_cmd): Declare.
4287 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
4288 instead call add_alias_cmd.
4289
2b351b19
PA
42902017-05-17 Pedro Alves <palves@redhat.com>
4291
4292 * Makefile.in (nat_extra_makefile_frag): Rename to ...
4293 (nat_makefile_frag): ... this. All references updated.
4294 * configure.ac: Likewise.
4295 * configure.nat: Likewise. Enhance comments.
4296 * configure: Regenerate.
4297
5f2ad7a3
RO
42982017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4299
4300 * procfs.c (procfs_create_inferior): Change prototype to match
4301 definition.
4302
adf3dde5
EZ
43032017-05-13 Eli Zaretskii <eliz@gnu.org>
4304
4305 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
4306 C++ compiler warning.
4307
6830f270
TT
43082017-05-12 Tom Tromey <tom@tromey.com>
4309
4310 PR rust/21483:
4311 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
4312 recurse, just call value_struct_elt directly.
4313
68f2f2e3
TT
43142017-05-12 Tom Tromey <tom@tromey.com>
4315
4316 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
4317 OP_RUST_ARRAY>: Fix.
4318
256afbc2
TT
43192017-05-12 Tom Tromey <tom@tromey.com>
4320
4321 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
4322
94bb8dfe
YQ
43232017-05-09 Yao Qi <yao.qi@linaro.org>
4324
4325 * regcache.c: Include <forward_list>.
4326 (struct regcache_list): Remove.
4327 (current_regcache): Update.
4328 (get_thread_arch_aspace_regcache): Update for std::forward_list.
4329 (regcache_thread_ptid_changed): Likewise.
4330 (registers_changed_ptid): Likewise.
4331 (current_regcache_size): Likewise.
4332
8248946c
YQ
43332017-05-09 Yao Qi <yao.qi@linaro.org>
4334
4335 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
4336 (current_regcache_size): New function.
4337 (current_regcache_test): New function.
4338 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
4339
313c5961
AH
43402017-05-08 Alan Hayward <alan.hayward@arm.com>
4341
4342 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
4343 (print_gp_register_row): Use get_frame_register_value.
4344
27bfc1d1
AH
43452017-05-08 Alan Hayward <alan.hayward@arm.com>
4346
4347 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
4348 (mips_supply_fpregset): Likewise.
4349 (mips64_supply_gregset): Likewise.
4350
146e6c5c
AH
43512017-05-08 Alan Hayward <alan.hayward@arm.com>
4352
4353 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
4354 regcache->raw_supply_zeroed.
4355
e50f25ec
SDJ
43562017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4357
4358 * configure.nat: Rearrange 'case' statements to match
4359 host before cpu.
4360
21ea5acd
SDJ
43612017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4362
4363 * Makefile.in: Remove "@host_makefile_frag@". Add variables
4364 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
4365 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
4366 "@nat_extra_makefile_frag@".
4367 (Makefile): Remove dependency on "@frags@".
4368 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
4369 (data-directory/Makefile): Likewise.
4370 * config/aarch64/linux.mh: Deleted; moved contents to
4371 "gdb/configure.nat".
4372 * config/alpha/alpha-linux.mh: Likewise.
4373 * config/alpha/nbsd.mh: Likewise.
4374 * config/arm/linux.mh: Likewise.
4375 * config/arm/nbsdelf.mh: Likewise.
4376 * config/i386/cygwin.mh: Likewise.
4377 * config/i386/cygwin64.mh: Likewise.
4378 * config/i386/darwin.mh: Likewise.
4379 * config/i386/fbsd.mh: Likewise.
4380 * config/i386/fbsd64.mh: Likewise.
4381 * config/i386/go32.mh: Likewise.
4382 * config/i386/i386gnu.mh: Likewise.
4383 * config/i386/i386sol2.mh: Likewise.
4384 * config/i386/linux.mh: Likewise.
4385 * config/i386/linux64.mh: Likewise.
4386 * config/i386/mingw.mh: Likewise.
4387 * config/i386/mingw64.mh: Likewise.
4388 * config/i386/nbsd64.mh: Likewise.
4389 * config/i386/nbsdelf.mh: Likewise.
4390 * config/i386/nto.mh: Likewise.
4391 * config/i386/obsd.mh: Likewise.
4392 * config/i386/obsd64.mh: Likewise.
4393 * config/i386/sol2-64.mh: Likewise.
4394 * config/ia64/linux.mh: Likewise.
4395 * config/m32r/linux.mh: Likewise.
4396 * config/m68k/linux.mh: Likewise.
4397 * config/m68k/nbsdelf.mh: Likewise.
4398 * config/m68k/obsd.mh: Likewise.
4399 * config/m88k/obsd.mh: Likewise.
4400 * config/mips/fbsd.mh: Likewise.
4401 * config/mips/linux.mh: Likewise.
4402 * config/mips/nbsd.mh: Likewise.
4403 * config/mips/obsd64.mh: Likewise.
4404 * config/pa/linux.mh: Likewise.
4405 * config/pa/nbsd.mh: Likewise.
4406 * config/pa/obsd.mh: Likewise.
4407 * config/powerpc/aix.mh: Likewise.
4408 * config/powerpc/fbsd.mh: Likewise.
4409 * config/powerpc/linux.mh: Likewise.
4410 * config/powerpc/nbsd.mh: Likewise.
4411 * config/powerpc/obsd.mh: Likewise.
4412 * config/powerpc/ppc64-linux.mh: Likewise.
4413 * config/powerpc/spu-linux.mh: Likewise.
4414 * config/s390/linux.mh: Likewise.
4415 * config/sh/nbsd.mh: Likewise.
4416 * config/sparc/fbsd.mh: Likewise.
4417 * config/sparc/linux.mh: Likewise.
4418 * config/sparc/linux64.mh: Likewise.
4419 * config/sparc/nbsd64.mh: Likewise.
4420 * config/sparc/nbsdelf.mh: Likewise.
4421 * config/sparc/obsd64.mh: Likewise.
4422 * config/sparc/sol2.mh: Likewise.
4423 * config/tilegx/linux.mh: Likewise.
4424 * config/vax/nbsdelf.mh: Likewise.
4425 * config/vax/obsd.mh: Likewise.
4426 * config/xtensa/linux.mh: Likewise.
4427 * config/i386/i386gnu.mn: New file, with excerpts from
4428 "config/i386/i386gnu.mh".
4429 * configure: Regenerate.
4430 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
4431 *.mh files under "gdb/config".
4432 * configure.nat: New file, with contents from the
4433 "gdb/config/*/*.mh" files.
4434
7ed1acaf
TW
44352017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
4436
4437 * btrace.c (btrace_clear): Free insn vector.
4438
e13cb306
PA
44392017-05-05 Pedro Alves <palves@redhat.com>
4440
4441 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
4442 * configure: Regenerate.
4443
5ed8105e
PA
44442017-05-04 Pedro Alves <palves@redhat.com>
4445
4446 * Makefile.in (SFILES): Add progspace-and-thread.c.
4447 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
4448 (COMMON_OBS): Add progspace-and-thread.o.
4449 * breakpoint.c: Include "progspace-and-thread.h".
4450 (update_inserted_breakpoint_locations)
4451 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
4452 Use scoped_restore_current_pspace_and_thread.
4453 (create_std_terminate_master_breakpoint): Use
4454 scoped_restore_current_program_space.
4455 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
4456 (print_breakpoint_location): Use
4457 scoped_restore_current_program_space.
4458 (bp_loc_is_permanent): Use
4459 scoped_restore_current_pspace_and_thread.
4460 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
4461 (download_tracepoint_locations): Use
4462 scoped_restore_current_pspace_and_thread.
4463 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
4464 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
4465 (enum step_over_calls_kind): Moved from inferior.h.
4466 (class scoped_restore_current_thread): New class.
4467 * gdbthread.h (make_cleanup_restore_current_thread): Delete
4468 declaration.
4469 (scoped_restore_current_thread): New class.
4470 * infcmd.c: Include "common/gdb_optional.h".
4471 (continue_1, proceed_after_attach): Use
4472 scoped_restore_current_thread.
4473 (notice_new_inferior): Use scoped_restore_current_thread.
4474 * inferior.c: Include "progspace-and-thread.h".
4475 (restore_inferior, save_current_inferior): Delete.
4476 (add_inferior_command, clone_inferior_command): Use
4477 scoped_restore_current_pspace_and_thread.
4478 * inferior.h (scoped_restore_current_inferior): New class.
4479 * infrun.c: Include "progspace-and-thread.h" and
4480 "common/gdb_optional.h".
4481 (follow_fork_inferior): Use
4482 scoped_restore_current_pspace_and_thread.
4483 (scoped_restore_exited_inferior): New class.
4484 (handle_vfork_child_exec_or_exit): Use
4485 scoped_restore_exited_inferior,
4486 scoped_restore_current_pspace_and_thread,
4487 scoped_restore_current_thread and scoped_restore.
4488 (fetch_inferior_event): Use scoped_restore_current_thread.
4489 * linespec.c (decode_line_full, decode_line_1): Use
4490 scoped_restore_current_program_space.
4491 * mi/mi-main.c: Include "progspace-and-thread.h".
4492 (exec_continue): Use scoped_restore_current_thread.
4493 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
4494 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
4495 * proc-service.c (ps_pglobal_lookup): Use
4496 scoped_restore_current_program_space.
4497 * progspace-and-thread.c: New file.
4498 * progspace-and-thread.h: New file.
4499 * progspace.c (release_program_space, clone_program_space): Use
4500 scoped_restore_current_program_space.
4501 (restore_program_space, save_current_program_space)
4502 (save_current_space_and_thread): Delete.
4503 (switch_to_program_space_and_thread): Moved to
4504 progspace-and-thread.c.
4505 * progspace.h (save_current_program_space)
4506 (save_current_space_and_thread): Delete declarations.
4507 (scoped_restore_current_program_space): New class.
4508 * remote.c (remote_btrace_maybe_reopen): Use
4509 scoped_restore_current_thread.
4510 * symtab.c: Include "progspace-and-thread.h".
4511 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
4512 * thread.c (print_thread_info_1): Use
4513 scoped_restore_current_thread.
4514 (struct current_thread_cleanup): Delete.
4515 (do_restore_current_thread_cleanup)
4516 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
4517 (scoped_restore_current_thread::~scoped_restore_current_thread):
4518 ... this new dtor.
4519 (make_cleanup_restore_current_thread): Rename/convert to ...
4520 (scoped_restore_current_thread::scoped_restore_current_thread):
4521 ... this new ctor.
4522 (thread_apply_all_command): Use scoped_restore_current_thread.
4523 (thread_apply_command): Use scoped_restore_current_thread.
4524 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
4525 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
4526
f6223dbb
PA
45272017-05-04 Pedro Alves <palves@redhat.com>
4528
4529 * thread.c (make_cleanup_restore_current_thread): Move
4530 find_thread_ptid call before the is_stopped call. Assert that the
4531 thread is found. Replace is_stopped call by checking the thread's
4532 state directly. Remove unnecessary NULL-thread check.
4533
3c3ae77e
PA
45342017-05-04 Pedro Alves <palves@redhat.com>
4535
4536 * corelow.c (thread_section_name): New class.
4537 (get_core_register_section, get_core_siginfo): Use it.
4538
45eba0ab
AA
45392017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
4540
4541 * corelow.c (sniff_core_bfd): Remove extra semicolon.
4542 (get_core_register_section): Remove xfree of NULL pointer.
4543
f81fdd35
AH
45442017-05-03 Alan Hayward <alan.hayward@arm.com>
4545
4546 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
4547 * regcache.c (regcache::raw_supply_zeroed): New function.
4548 * regcache.h (regcache::raw_supply_zeroed): New declaration.
4549
35837774
SM
45502017-05-03 Simon Marchi <simon.marchi@ericsson.com>
4551
4552 * gdbarch.sh: Remove commented out definition of
4553 TARGET_CHAR_BIT.
4554 * gdbarch.h: Re-generate.
4555
c94fee56
SDJ
45562017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4557
4558 * configure: Regenerate.
4559
d17f7b36
SM
45602017-05-02 Simon Marchi <simon.marchi@ericsson.com>
4561
4562 * solib-target.c (solib_target_relocate_section_addresses):
4563 Remove num_section_bases, num_bases, segment_bases variables.
4564
b560ebd6
SM
45652017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4566
4567 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
4568
f2f46dfc
SM
45692017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4570
4571 * solib-target.c: Include <vector>
4572 (struct lm_info_target) <~lm_info_target>: Remove.
4573 <segment_bases, section_bases>: Change type to
4574 std::vector<CORE_ADDR>.
4575 (library_list_start_segment, library_list_start_section,
4576 library_list_end_library,
4577 solib_target_relocate_section_addresses): Adjust.
4578
a0ff9e1a
SM
45792017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4580
4581 * gdbarch.sh (software_single_step): Change return type to
4582 std::vector<CORE_ADDR>.
4583 * gdbarch.c, gdbarch.h: Re-generate.
4584 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
4585 Adjust.
4586 (arm_deal_with_atomic_sequence_raw): Adjust.
4587 (thumb_get_next_pcs_raw): Adjust.
4588 (arm_get_next_pcs_raw): Adjust.
4589 (arm_get_next_pcs): Adjust.
4590 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
4591 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
4592 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
4593 (alpha_software_single_step): Adjust.
4594 * alpha-tdep.h (alpha_software_single_step): Adjust.
4595 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
4596 * arm-tdep.c (arm_software_single_step): Adjust.
4597 (arm_breakpoint_kind_from_current_state): Adjust.
4598 * arm-tdep.h (arm_software_single_step): Adjust.
4599 * breakpoint.c (insert_single_step_breakpoint): Adjust.
4600 * cris-tdep.c (cris_software_single_step): Adjust.
4601 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
4602 (micromips_deal_with_atomic_sequence): Adjust.
4603 (deal_with_atomic_sequence): Adjust.
4604 (mips_software_single_step): Adjust.
4605 * mips-tdep.h (mips_software_single_step): Adjust.
4606 * moxie-tdep.c (moxie_software_single_step): Adjust.
4607 * nios2-tdep.c (nios2_software_single_step): Adjust.
4608 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
4609 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
4610 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
4611 * s390-linux-tdep.c (s390_software_single_step): Adjust.
4612 * sparc-tdep.c (sparc_software_single_step): Adjust.
4613 * spu-tdep.c (spu_software_single_step): Adjust.
4614 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
4615
ea480a30
SM
46162017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4617
4618 * gdbarch.sh: Use semi-colon as field separator instead of colon.
4619 * gdbarch.h: Re-generate.
4620
d050f7d7
TW
46212017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4622
4623 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
4624 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
4625 * python/py-instruction.c, python/py-instruction.h: New file.
4626 * python/py-record.c: Add py-instruction.h include.
4627 (gdbpy_initialize_record): Make gdb.Instruction a super class of
4628 gdb.RecordInstruction.
4629 * python/python-internal.h: Add gdbpy_initialize_instruction
4630 declaration.
4631 * python/python.c (do_start_initialization): Add
4632 gdbpy_initialize_instruction.
4633
14f819c8
TW
46342017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4635
4636 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
4637 Remove.
4638 (btrace_func_from_recpy_func): New function.
4639 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
4640 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
4641 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
4642 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
4643 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
4644 Also, use new helper functions.
4645 (btpy_list_item): Use new helper functions.
4646 (recpy_bt_function_call_history): Use new type name.
4647 (btpy_call_getset): Remove.
4648 (gdbpy_initialize_btrace): Remove code to initialize
4649 gdb.BtraceFunctionCall.
4650 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
4651 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
4652 recpy_bt_func_prev, recpy_bt_func_next): New export.
4653 * python/py-record.c (recpy_func_type): New static object.
4654 (recpy_func_new, recpy_func_level, recpy_func_symbol,
4655 recpy_func_instructions, recpy_func_up, recpy_func_prev,
4656 recpy_func_next): New function.
4657 (recpy_element_hash, recpy_element_richcompare): Updated comment.
4658 (recpy_func_getset): New static object.
4659 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
4660 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
4661
0ed5da75
TW
46622017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4663
4664 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
4665 (btpy_object, btpy_insn_type, btpy_new): Remove.
4666 (btpy_list_object): Use gdb.RecordInstruction type instead of
4667 gdb.BtraceInstruction type.
4668 (btrace_insn_from_recpy_insn): New function.
4669 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
4670 btpy_new.
4671 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
4672 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
4673 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
4674 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
4675 instead of btpy_object.
4676 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4677 btpy_insn_data, btpy_insn_decode): Rename to ...
4678 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
4679 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
4680 recpy_bt_insn_decode): This. Also, use new helper functions.
4681 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
4682 recpy_insn_type.
4683 (btpy_insn_getset): Remove.
4684 (gdbpy_initialize_btrace): Remove code to initialize
4685 gdb.BtraceInstruction. Use recpy_element_object.
4686 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
4687 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
4688 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
4689 * python/py-record.c (recpy_insn_type): New static object.
4690 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
4691 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
4692 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
4693 New function.
4694 (recpy_insn_getset): New static object.
4695 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
4696 * python/py-record.h (recpy_element_object): New typedef.
4697 (recpy_insn_type, recpy_insn_new): New export.
4698
913aeadd
TW
46992017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4700
4701 * py-record-btrace.c (btpy_insn_new): Removed.
4702 (btpy_insn_or_gap_new): New function.
4703 (btpy_insn_error): Removed.
4704 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4705 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
4706 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
4707 btpy_insn_or_gap_new instead of btpy_insn_new.
4708 (btpy_insn_getset): Remove btpy_insn_error.
4709 * py-record.c (recpy_gap_type): New static object.
4710 (recpy_gap_object): New typedef.
4711 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
4712 recpy_gap_reason_string): New function.
4713 (recpy_gap_getset): New static object.
4714 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
4715 * py-record.h (recpy_gap_new): New export.
4716
a3be24ad
TW
47172017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4718
4719 * python/py-record.c (recpy_ptid): Remove.
4720 (recpy_record_getset): Remove recpy_ptid.
4721
ae20e79a
TW
47222017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4723
4724 * btrace.c (btrace_fetch): Set inferior_ptid.
4725 * python/py-record-btrace.c: Add "py-record.h" include.
4726 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
4727 recpy_bt_end, recpy_bt_instruction_history,
4728 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
4729 in gdb.Record object instead of current ptid.
4730 * python/py-record.c: Include new "py-record.h" file.
4731 (recpy_record_object): Moved to py-record.h.
4732 * python/py-record.h: New file.
4733
8d0050ea
TW
47342017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4735
4736 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
4737 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
4738 indentation.
4739
3f380b50
JB
47402017-05-01 Joel Brobecker <brobecker@adacore.com>
4741
4742 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
4743 the past maintainers section.
4744
07495424
YQ
47452017-04-28 Yao Qi <yao.qi@linaro.org>
4746
4747 * infcmd.c (get_return_value): Use regcache ctor, and remove
4748 cleanup.
4749
deb1fa3e
YQ
47502017-04-28 Yao Qi <yao.qi@linaro.org>
4751 Pedro Alves <palves@redhat.com>
4752
4753 * regcache.c (regcache::regcache): New tag dispatch ctor.
4754 (do_cooked_read): Moved above.
4755 (regcache_dup): Use the tag dispatch ctor..
4756 * regcache.h (regcache): Declare ctor, delete copy ctor and
4757 assignment operator, remove friend regcache_dup.
4758
b421c83c
YQ
47592017-04-28 Yao Qi <yao.qi@linaro.org>
4760
4761 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
4762 call method save instead of regcache_cpy.
4763 * regcache.h (struct regcache): Make regcache_dup a friend.
4764
ef79d9a3
YQ
47652017-04-28 Yao Qi <yao.qi@linaro.org>
4766
4767 * regcache.c (struct regcache): Move to regcache.h
4768 (regcache::arch): New method.
4769 (regcache_get_ptid): Update.
4770 (get_regcache_arch): Call arch method.
4771 (get_regcache_aspace): Call method aspace.
4772 (register_buffer): Change it to method.
4773 (regcache_save): Change it to regcache::save.
4774 (regcache_restore): Likewise.
4775 (regcache_cpy_no_passthrough): Remove the declaration.
4776 (regcache_cpy): Call methods restore and cpy_no_passthrough.
4777 (regcache_cpy_no_passthrough): Change it to method
4778 cpy_no_passthrough.
4779 (regcache_register_status): Change it to method
4780 get_register_status.
4781 (regcache_invalidate): Change it to method invalidate.
4782 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
4783 (regcache_raw_update): Change it to method raw_update.
4784 (regcache_raw_read): Likewise.
4785 (regcache_raw_read_signed): Likewise.
4786 (regcache_raw_read_unsigned): Likewise.
4787 (regcache_raw_write_signed): Likewise.
4788 (regcache_raw_write_unsigned): Likewise.
4789 (regcache_cooked_read): Likewise.
4790 (regcache_cooked_read_value): Likewise.
4791 (regcache_cooked_read_signed): Likewise.
4792 (regcache_cooked_read_unsigned): Likewise.
4793 (regcache_cooked_write_signed): Likewise.
4794 (regcache_cooked_write_unsigned): Likewise.
4795 (regcache_raw_set_cached_value): Likewise.
4796 (regcache_raw_write): Likewise.
4797 (regcache_cooked_write): Likewise.
4798 (regcache_xfer_part): Likewise.
4799 (regcache_raw_read_part): Likewise.
4800 (regcache_raw_write_part): Likewise.
4801 (regcache_cooked_read_part): Likewise.
4802 (regcache_cooked_write_part): Likewise.
4803 (regcache_raw_supply): Likewise.
4804 (regcache_raw_collect): Likewise.
4805 (regcache_transfer_regset): Likewise.
4806 (regcache_supply_regset): Likewise.
4807 (regcache_collect_regset): Likewise.
4808 (regcache_debug_print_register): Likewise.
4809 (enum regcache_dump_what): Move it to regcache.h.
4810 (regcache_dump): Change it to method dump.
4811 * regcache.h (enum regcache_dump_what): New.
4812 (class regcache): New.
4813 * target.c (target_fetch_registers): Call method
4814 debug_print_register.
4815 (target_store_registers): Likewise.
4816
f8fdb78e
SM
48172017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4818
4819 * windows-nat.c (struct lm_info_windows): Initialize field.
4820 (windows_make_so): Allocate lm_info_windows with new.
4821 (windows_free_so): Free lm_info_windows with delete.
4822
9ccbfd7b
SM
48232017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4824
4825 * solib-darwin.c (struct lm_info_darwin): Initialize field.
4826 (darwin_current_sos): Allocate lm_info_darwin with new, remove
4827 cleanup.
4828 (darwin_free_so): Free lm_info_darwin with delete.
4829
76e75227
SM
48302017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4831
4832 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
4833 <l_addr_p>: Change type to bool.
4834 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
4835 (svr4_free_so): Free lm_info_svr4 with delete.
4836 (svr4_copy_library_list): Replace memcpy with call to copy
4837 constructor.
4838 (library_list_start_library, svr4_default_sos): Allocate
4839 lm_info_svr4 with new.
4840
51046d9e
SM
48412017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4842
4843 * solib-target.c (struct lm_info_target): Add destructor,
4844 initialize fields.
4845 <name>: Change type to std::string.
4846 (library_list_start_library): Allocate lm_info_target with new.
4847 (solib_target_free_library_list): Free lm_info_target with
4848 delete.
4849 (solib_target_current_sos): Adapt to std::string.
4850 (solib_target_free_so): Free lm_info_target with delete.
4851
4023ae76
SM
48522017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4853
4854 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
4855 fields.
4856 (frv_current_sos): Allocate lm_info_frv with new.
4857 (frv_relocate_main_executable): Free lm_info_frv with delete,
4858 allocate with new.
4859 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
4860
af43057b
SM
48612017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4862
4863 * solib-frv.c (struct lm_info_frv): Fix indentation.
4864
b0911207
SM
48652017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4866
4867 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
4868 map field.
4869 (dsbt_current_sos): Allocate lm_info_dsbt with new.
4870 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
4871 and allocate with new.
4872 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
4873
6c401f72
SM
48742017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4875
4876 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
4877 <filename, member_name>: Change type to std::string.
4878 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
4879 (library_list_start_library): Allocate lm_info_aix with new.
4880 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
4881 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
4882 with copy constructor.
4883
d0e449a1
SM
48842017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4885
4886 * solist.h (struct lm_info): Remove.
4887 (struct lm_info_base): New class.
4888 (struct so_list) <lm_info>: Change type to lm_info_base *.
4889 * nto-tdep.c (struct lm_info): Remove.
4890 (lm_addr): Adjust.
4891 * solib-aix.c (struct lm_info): Rename to ...
4892 (struct lm_info_aix): ... this. Extend lm_info_base.
4893 (lm_info_p): Rename to ...
4894 (lm_info_aix_p): ... this, and adjust.
4895 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
4896 solib_aix_parse_libraries, library_list_start_library,
4897 solib_aix_free_library_list, solib_aix_parse_libraries,
4898 solib_aix_get_library_list,
4899 solib_aix_relocate_section_addresses, solib_aix_free_so,
4900 solib_aix_get_section_offsets,
4901 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
4902 Adjust.
4903 (struct solib_aix_inferior_data) <library_list>: Adjust.
4904 * solib-darwin.c (struct lm_info): Rename to ...
4905 (struct lm_info_darwin): ... this. Extend lm_info_base.
4906 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
4907 * solib-dsbt.c (struct lm_info): Rename to ...
4908 (struct lm_info_dsbt): ... this. Extend lm_info_base.
4909 (struct dsbt_info) <main_executable_lm_info): Adjust.
4910 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
4911 dsbt_relocate_section_addresses): Adjust.
4912 * solib-frv.c (struct lm_info): Rename to ...
4913 (struct lm_info_frv): ... this. Extend lm_info_base.
4914 (main_executable_lm_info): Adjust.
4915 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
4916 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
4917 find_canonical_descriptor_in_load_object,
4918 frv_fdpic_find_canonical_descriptor): Adjust.
4919 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
4920 to lm_info_svr4.
4921 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
4922 svr4_clear_so, svr4_copy_library_list,
4923 library_list_start_library, svr4_default_sos, svr4_read_so_list,
4924 svr4_current_sos, svr4_fetch_objfile_link_map,
4925 solist_update_incremental): Adjust.
4926 * solib-svr4.h (struct lm_info_svr4): Move here from
4927 solib-svr4.c.
4928 * solib-target.c (struct lm_info): Rename to ...
4929 (struct lm_info_target): ... this. Extend lm_info_base.
4930 (lm_info_p): Rename to ...
4931 (lm_info_target_p): ... this.
4932 (solib_target_parse_libraries, library_list_start_segment,
4933 library_list_start_section, library_list_start_library,
4934 library_list_end_library, solib_target_free_library_list,
4935 solib_target_current_sos, solib_target_free_so,
4936 solib_target_relocate_section_addresses): Adjust.
4937 * windows-nat.c (struct lm_info): Rename to ...
4938 (struct lm_info_windows): ... this. Extend lm_info_base.
4939 (windows_make_so, handle_load_dll, handle_unload_dll,
4940 windows_xfer_shared_libraries): Adjust.
4941
434a4023
SM
49422017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4943
4944 * solib-darwin.c (struct darwin_so_list): Remove.
4945 (darwin_current_sos): Allocate an so_list object instead of a
4946 darwin_so_list, separately allocate an lm_info object.
4947 (darwin_free_so): Free lm_info.
4948
428544e8
JB
49492017-04-28 John Baldwin <jhb@FreeBSD.org>
4950
4951 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
4952 with fprintf_filtered.
4953
4621115f
YQ
49542017-04-28 Yao Qi <yao.qi@linaro.org>
4955
4956 * regcache.c (regcache::regcache): New function.
4957 (regcache::~regcache): New function.
4958 (regcache_xmalloc_1): Remove.
4959 (regcache_xmalloc): Call new regcache.
4960 (regcache_xfree): Call delete regcache.
4961 (get_thread_arch_aspace_regcache): Call new regcache.
4962
339053c2
YQ
49632017-04-28 Yao Qi <yao.qi@linaro.org>
4964
4965 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
4966 lwp instead of ptid_get_lwp.
4967
7974a605
YQ
49682017-04-28 Yao Qi <yao.qi@linaro.org>
4969
4970 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
4971 lwp_info instead of getting from inferior_ptid.
4972
e15c3eb4
KS
49732017-04-27 Keith Seitz <keiths@redhat.com>
4974
4975 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
4976 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
4977 (CV_CONVERSION_BADNESS): Define.
4978 (rank_one_type): Remove overly restrictive rvalue reference
4979 rank checks.
4980 Add cv-qualifier checks and subranks for type equality.
4981 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
4982 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
4983 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
4984
72bc1d24
SM
49852017-04-27 Simon Marchi <simon.marchi@ericsson.com>
4986
4987 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
4988 count when creating the object.
4989
55bcecda
UW
49902017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
4991 Ulrich Weigand <uweigand@de.ibm.com>
4992
4993 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
4994 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
4995 is used in AIX.
4996 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
4997 (process_xcoff_symbol): Likewise.
4998 (scan_xcoff_symtab): Likewise.
4999
5c99fcf8
AH
50002017-04-26 Alan Hayward <alan.hayward@arm.com>
5001
5002 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
5003 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
5004 (ia64_access_reg): Use get_frame_register_unsigned.
5005 (ia64_access_rse_reg): Likewise.
5006 (ia64_libunwind_frame_prev_register): Likewise.
5007
b41c5a85
JW
50082017-04-26 Jiong Wang <jiong.wang@arm.com>
5009
5010 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
5011 * gdbarch.c: Regenerated.
5012 * gdbarch.h: Regenerated.
5013 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
5014 visibility external.
5015 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
5016 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
5017 (enum cfa_how_kind): Move to ...
5018 (struct dwarf2_frame_state_reg_info): Likewise.
5019 (struct dwarf2_frame_state): Likewise.
5020 * dwarf2-frame.h: ... here.
5021 (dwarf2_frame_state_alloc_regs): New declaration.
5022 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
5023 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
5024
c185f580
AH
50252017-04-26 Alan Hayward <alan.hayward@arm.com>
5026
5027 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
5028 regcache_raw_read_unsigned.
5029 (xtensa_pseudo_register_write): Likewise.
5030
19c45594
AH
50312017-04-26 Alan Hayward <alan.hayward@arm.com>
5032
5033 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
5034 (nds32_pseudo_register_write): Likewise.
5035
4658f12e
YQ
50362017-04-25 Yao Qi <yao.qi@linaro.org>
5037
5038 * regcache.c (struct regcache) <readonly_p>: Change its type
5039 to bool.
5040 (regcache_xmalloc_1): Update parameter type and callers update.
5041
d581dda8
YQ
50422017-04-25 Yao Qi <yao.qi@linaro.org>
5043
5044 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
5045 set_gdbarch_wchar_bit.
5046 * arm-tdep.c (arm_gdbarch_init): Likewise.
5047
debed3db
PA
50482017-04-25 Pedro Alves <palves@redhat.com>
5049
5050 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
5051 (BothAreRelocatable, memcopy, memmove): Don't define.
5052 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
5053 macros.
5054
b0b92aeb
PA
50552017-04-25 Pedro Alves <palves@redhat.com>
5056
5057 * common/common-defs.h: Include "common/poison.h".
5058 * common/function-view.h: (Not, Or, Requires): Move to traits.h
5059 and adjust.
5060 * common/poison.h: New file.
5061 * common/traits.h: Include <type_traits>.
5062 (Not, Or, Requires): New, moved from common/function-view.h.
5063
16c4d54a
PA
50642017-04-25 Pedro Alves <palves@redhat.com>
5065
5066 * breakpoint.h (struct breakpoint): In-class initialize all
5067 fields. Make boolean fields "bool".
5068 * breakpoint.c (init_raw_breakpoint_without_location): Remove
5069 memset call and initializations no longer necessary.
5070
b5c36682
PA
50712017-04-25 Pedro Alves <palves@redhat.com>
5072
5073 * btrace.c (pt_btrace_insn_flags): Change parameter type to
5074 reference.
5075 (pt_btrace_insn): New function.
5076 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
5077
5625a286
PA
50782017-04-25 Pedro Alves <palves@redhat.com>
5079
5080 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
5081 "base" field and inherit from "bp_location" instead. Add
5082 non-default ctor.
5083 (allocate_location_exception): Use new non-default ctor.
5084 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
5085 (init_bp_location): Convert to ...
5086 (bp_location::bp_location): ... this new ctor, and remove memset
5087 call.
5088 (base_breakpoint_allocate_location): Use the new non-default ctor.
5089 * breakpoint.h (bp_location): Now a class. Declare default and
5090 non-default ctors. In-class initialize all members.
5091 (init_bp_location): Remove declaration.
5092
23bcc18f
PA
50932017-04-25 Pedro Alves <palves@redhat.com>
5094
5095 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
5096 assignment operator.
5097
e1ba3053
YQ
50982017-04-24 Yao Qi <yao.qi@linaro.org>
5099
5100 * doublest.c (convert_doublest_to_floatformat): Call
5101 floatformat_totalsize_bytes.
5102
10f489e5
TT
51032017-04-22 Tom Tromey <tom@tromey.com>
5104
5105 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5106 ui_out_emit_list.
5107 * stack.c (print_frame): Use ui_out_emit_list.
5108 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
5109 ui_out_emit_list.
5110 * mi/mi-main.c (print_one_inferior)
5111 (mi_cmd_data_list_register_names)
5112 (mi_cmd_data_list_register_values, mi_cmd_list_features)
5113 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
5114 ui_out_emit_list.
5115 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
5116 (mi_output_solib_attribs): Use ui_out_emit_list,
5117 ui_out_emit_tuple.
5118 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
5119 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
5120 (mi_cmd_stack_list_args, list_args_or_locals): Use
5121 ui_out_emit_list.
5122 * disasm.c (do_assembly_only): Use ui_out_emit_list.
5123 * breakpoint.c (print_solib_event, output_thread_groups): Use
5124 ui_out_emit_list.
5125
0092b74d
TT
51262017-04-22 Tom Tromey <tom@tromey.com>
5127
5128 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
5129 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
5130 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
5131
a14a62dd
TT
51322017-04-22 Tom Tromey <tom@tromey.com>
5133
5134 * tracepoint.c (tvariables_info_1)
5135 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
5136
46b9c129
TT
51372017-04-22 Tom Tromey <tom@tromey.com>
5138
5139 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
5140 annotate_arg_emitter.
5141 * breakpoint.c (print_mention_watchpoint)
5142 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
5143 * annotate.h (struct annotate_arg_emitter): New.
5144
2e783024
TT
51452017-04-22 Tom Tromey <tom@tromey.com>
5146
5147 * record-btrace.c (record_btrace_insn_history)
5148 (record_btrace_insn_history_range, record_btrace_call_history)
5149 (record_btrace_call_history_range): Use ui_out_emit_tuple.
5150 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
5151 ui_out_emit_tuple.
5152 * stack.c (print_frame_info): Use ui_out_emit_tuple.
5153 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
5154 * skip.c (skip_info): Use ui_out_emit_tuple.
5155 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
5156 * progspace.c (print_program_space): Use ui_out_emit_tuple.
5157 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
5158 * osdata.c (info_osdata): Use ui_out_emit_tuple.
5159 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
5160 ui_out_emit_tuple.
5161 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
5162 (output_register, mi_cmd_data_read_memory)
5163 (mi_cmd_data_read_memory_bytes, mi_load_progress)
5164 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
5165 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
5166 Use ui_out_emit_tuple.
5167 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
5168 ui_out_emit_tuple.
5169 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
5170 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
5171 * linux-thread-db.c (info_auto_load_libthread_db): Use
5172 ui_out_emit_tuple.
5173 * inferior.c (print_inferior): Use ui_out_emit_tuple.
5174 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
5175 * disasm.c (do_mixed_source_and_assembly_deprecated)
5176 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
5177 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
5178 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
5179 * breakpoint.c (print_one_breakpoint_location)
5180 (print_one_breakpoint): Use ui_out_emit_tuple.
5181 * auto-load.c (print_script, info_auto_load_cmd): Use
5182 ui_out_emit_tuple.
5183 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
5184
9be21bb4
SM
51852017-04-21 Simon Marchi <simon.marchi@ericsson.com>
5186
5187 * thread.c (print_thread_info_1): Remove dead code.
5188
0d4c07af
JK
51892017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5190
5191 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
5192 GDB_SELF_TEST.
5193 * arm-tdep.c (selftests::arm_record_test): Likewise.
5194
4daf993d
YQ
51952017-04-21 Yao Qi <yao.qi@linaro.org>
5196
5197 * regcache.c (regcache_restore): Remove argument 2. Replace
5198 argument 3 with regcache. Get register status from
5199 src->register_status and get register contents from
5200 register_buffer (src, regnum).
5201 (regcache_cpy): Update.
5202
a6c21d4a
PA
52032017-04-19 Pedro Alves <palves@redhat.com>
5204
5205 * gdbthread.h (thread): Add missing closing parenthesis in
5206 comment.
5207
3a3fd0fd
PA
52082017-04-19 Pedro Alves <palves@redhat.com>
5209
5210 * common/refcounted-object.h: New file.
5211 * gdbthread.h: Include "common/refcounted-object.h".
5212 (thread_info): Inherit from refcounted_object and add comments.
5213 (thread_info::incref, thread_info::decref)
5214 (thread_info::m_refcount): Delete.
5215 (thread_info::deletable): Use the refcounted_object::refcount()
5216 method.
5217 * inferior.c (current_inferior_): Add comment.
5218 (set_current_inferior): Increment/decrement refcounts.
5219 (prune_inferiors, remove_inferior_command): Skip inferiors marked
5220 not-deletable instead of comparing with the current inferior.
5221 (initialize_inferiors): Increment the initial inferior's refcount.
5222 * inferior.h (struct inferior): Forward declare.
5223 Include "common/refcounted-object.h".
5224 (current_inferior, set_current_inferior): Move declaration to
5225 before struct inferior's definition, and fix comment.
5226 (inferior): Inherit from refcounted_object. Add comments.
5227 * thread.c (switch_to_thread_no_regs): Reference the thread's
5228 inferior pointer directly instead of doing a ptid lookup.
5229 (switch_to_no_thread): New function.
5230 (switch_to_thread(thread_info *)): New function, factored out
5231 from ...
5232 (switch_to_thread(ptid_t)): ... this.
5233 (restore_current_thread): Delete.
5234 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
5235 fields, and add 'inf' field.
5236 (do_restore_current_thread_cleanup): Check whether old->inf is
5237 alive instead of looking up an inferior by ptid. Use
5238 switch_to_thread and switch_to_no_thread.
5239 (restore_current_thread_cleanup_dtor): Use old->inf directly
5240 instead of lookup up an inferior by id. Decref the inferior.
5241 Don't restore 'removable'.
5242 (make_cleanup_restore_current_thread): Same the inferior pointer
5243 in old, instead of the inferior number. Incref the inferior.
5244 Don't save/clear 'removable'.
5245
9bcb1f16
PA
52462017-04-19 Pedro Alves <palves@redhat.com>
5247
5248 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5249 unittests/scoped_restore-selftests.c.
5250 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
5251 * common/scoped_restore.h (scoped_restore_base): Make "class".
5252 (scoped_restore_base::release): New public method.
5253 (scoped_restore_base::scoped_restore_base): New protected ctor.
5254 (scoped_restore_base::m_saved_var): New protected field.
5255 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
5256 scoped_restore_base base class instead of m_saved_var directly.
5257 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
5258 (scoped_restore_tmpl::scoped_restore_tmpl(const
5259 scoped_restore_tmpl<T>&)): Likewise.
5260 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
5261 method.
5262 (scoped_restore_tmpl::saved_var): New method.
5263 (scoped_restore_tmpl::m_saved_var): Delete.
5264 * inferior.h (inferior::detaching): Now a bool.
5265 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
5266 cleanup.
5267 * unittests/scoped_restore-selftests.c: New file.
5268
26fcd539
PA
52692017-04-19 Pedro Alves <palves@redhat.com>
5270
5271 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
5272 Re-sort in alphabetic order.
5273
fdd243b0
PA
52742017-04-18 Pedro Alves <palves@redhat.com>
5275
5276 * xml-support.c (obstack_xml_printf): Delete.
5277 * xml-support.h (obstack_xml_printf): Delete.
5278
4895cde2
PA
52792017-04-18 Pedro Alves <palves@redhat.com>
5280
5281 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
5282 vdebug, verror, body_text, start_element, end_element, name,
5283 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
5284 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
5285 is_xinclude>: Make private and add m_ prefix.
5286 (gdb_xml_parser::body_text): New method, based on ...
5287 (gdb_xml_body_text): ... this. Adjust.
5288 (gdb_xml_parser::vdebug): New method, based on ...
5289 (gdb_xml_debug): ... this. Adjust.
5290 (gdb_xml_parser::verror): New method, based on ...
5291 (gdb_xml_error): ... this. Adjust.
5292 (gdb_xml_parser::start_element): New method, based on ...
5293 (gdb_xml_start_element): ... this. Adjust.
5294 (gdb_xml_start_element_wrapper): Defer to
5295 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
5296 (gdb_xml_parser::end_element): New method, based on ...
5297 (gdb_xml_end_element_wrapper): ... this. Adjust.
5298 (gdb_xml_parser::~gdb_xml_parser): Adjust.
5299 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
5300 (gdb_xml_parser::use_dtd): New method, based on ...
5301 (gdb_xml_use_dtd): ... this. Adjust.
5302 (gdb_xml_parser::parse): New method, based on ...
5303 (gdb_xml_parse): ... this. Adjust.
5304 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
5305 (xinclude_start_include): Adjust to call the parser's name method.
5306 (xml_xinclude_default, xml_xinclude_start_doctype)
5307 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
5308 method.
5309 (xml_process_xincludes): Adjust to call parser methods.
5310 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
5311 declarations.
5312
bd8a901f
PA
53132017-04-18 Pedro Alves <palves@redhat.com>
5314
5315 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
5316 gdb::optional<std::string>.
5317 * xml-support.c: Include <string>.
5318 (scope_level::scope_level(scope_level &&))
5319 (scope_level::~scope_level): Delete.
5320 (scope_level::body): Now a std::string.
5321 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
5322 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
5323 parameter.
5324 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
5325 (xinclude_parsing_data::output): Now a std::string reference.
5326 (xinclude_start_include): Adjust.
5327 (xml_xinclude_default): Adjust.
5328 (xml_process_xincludes): Add 'output' parameter, and return bool.
5329 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
5330 and return bool.
5331 * xml-tdesc.c: Include <unordered_map> and <string>.
5332 (tdesc_xml_cache): Delete.
5333 (tdesc_xml_cache_s): Delete.
5334 (xml_cache): Now an std::unordered_map.
5335 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
5336 (target_fetch_description_xml): Change return type to
5337 gdb::optional<std::string>, and adjust.
5338 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
5339 (target_fetch_description_xml): Change return type to
5340 gdb::optional<std::string>.
5341
d35d1958
PA
53422017-04-18 Pedro Alves <palves@redhat.com>
5343
5344 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5345 unittests/optional-selftests.c.
5346 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
5347 * unittests/optional-selftests.c: New file.
5348 * unittests/optional/assignment/1.cc: New file.
5349 * unittests/optional/assignment/2.cc: New file.
5350 * unittests/optional/assignment/3.cc: New file.
5351 * unittests/optional/assignment/4.cc: New file.
5352 * unittests/optional/assignment/5.cc: New file.
5353 * unittests/optional/assignment/6.cc: New file.
5354 * unittests/optional/assignment/7.cc: New file.
5355 * unittests/optional/cons/copy.cc: New file.
5356 * unittests/optional/cons/default.cc: New file.
5357 * unittests/optional/cons/move.cc: New file.
5358 * unittests/optional/cons/value.cc: New file.
5359 * unittests/optional/in_place.cc: New file.
5360 * unittests/optional/observers/1.cc: New file.
5361 * unittests/optional/observers/2.cc: New file.
5362
22796e97
PA
53632017-04-18 Pedro Alves <palves@redhat.com>
5364
5365 * common/gdb_optional.h: Include common/traits.h.
5366 (in_place_t): New type.
5367 (in_place): New constexpr variable.
5368 (optional::optional): Remove member initialization of
5369 m_instantiated.
5370 (optional::optional(in_place_t...)): New constructor.
5371 (optional::~optional): Use reset.
5372 (optional::optional(const optional&)): New.
5373 (optional::optional(const optional&&)): New.
5374 (optional::optional(T &)): New.
5375 (optional::optional(T &&)): New.
5376 (operator::operator=(const optional &)): New.
5377 (operator::operator=(optional &&)): New.
5378 (operator::operator= (const T &))
5379 (operator::operator= (T &&))
5380 (operator::emplace (Args &&... args)): Return a T&. Use reset.
5381 (operator::reset): New.
5382 (operator::m_instantiated):: Add in-class initializer.
5383 * common/traits.h: Include <type_traits>.
5384 (struct And): New types.
5385
a7fc9b61
PA
53862017-04-18 Pedro Alves <palves@redhat.com>
5387
5388 * xml-support.c: Include <vector>.
5389 (scope_level::scope_level(const gdb_xml_element *))
5390 (scope_level::scope_level(scope_level&&)): New.
5391 (scope_level::~scope_level): New.
5392 (scope_level_s): Delete.
5393 (gdb_xml_parser::scopes): Now a std::vector.
5394 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
5395 Use std::vector.
5396 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
5397 scope cleanup code.
5398 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
5399 of the scopes member. Use std::vector::emplace_back.
5400
010151c9
PA
54012017-04-18 Pedro Alves <palves@redhat.com>
5402
5403 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
5404 a bool.
5405 (gdb_xml_end_element): Change type of first parameter.
5406 (gdb_xml_cleanup): Rename to ...
5407 (gdb_xml_parser::~gdb_xml_parser): ... this.
5408 (gdb_xml_create_parser_and_cleanup): Delete with ...
5409 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
5410 to this new ctor.
5411 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
5412 using gdb_xml_create_parser_and_cleanup.
5413 (xinclude_parsing_data): Add ctor/dtor.
5414 (xml_xinclude_cleanup): Delete.
5415 (xml_process_xincludes): Create a local xinclude_parsing_data
5416 instead of heap-allocating one. Create a local gdb_xml_parser
5417 instead of heap-allocating one with
5418 gdb_xml_create_parser_and_cleanup.
5419
d56060f0
JB
54202017-04-18 John Baldwin <jhb@FreeBSD.org>
5421
5422 PR threads/20743
5423 * fbsd-nat.c (resume_one_thread_cb): Remove.
5424 (resume_all_threads_cb): Remove.
5425 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
5426 iterate_over_threads.
5427
305d16a9
JB
54282017-04-17 Joel Brobecker <brobecker@adacore.com>
5429
5430 * NEWS: Create a new section for the next release branch.
5431 Rename the section of the current branch, now that it has
5432 been cut.
5433
8bb57231
JB
54342017-04-17 Joel Brobecker <brobecker@adacore.com>
5435
5436 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
5437 * version.in: Bump version to 8.0.50.DATE-git.
5438
096c92dd
SDJ
54392017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
5440
5441 PR gdb/21385
5442 * windows-nat.c (windows_create_inferior): Declare 'allargs'
5443 independently of the host, and fix build breakage on Cygwin.
5444
0550c955
PA
54452017-04-13 Pedro Alves <palves@redhat.com>
5446
5447 * inferior.c (free_inferior): Convert to ...
5448 (inferior::~inferior): ... this dtor.
5449 (inferior::inferior): New ctor, factored out from ...
5450 (add_inferior_silent): ... here. Allocate the inferior with a new
5451 expression.
5452 (delete_inferior): Call delete instead of free_inferior.
5453 * inferior.h (gdb_environ, continuation): Forward declare.
5454 (inferior): Now a class. Add in-class initialization to all
5455 members. Make boolean fields bool, except 'detaching'.
5456 (inferior::inferior): New explicit ctor.
5457 (inferior::~inferior): New.
5458
e3d60dfc
PA
54592017-04-13 Pedro Alves <palves@redhat.com>
5460
5461 * inferior.c (init_inferior_list): Delete.
5462 * inferior.h (init_inferior_list): Delete.
5463
5fd69d0a
PA
54642017-04-13 Pedro Alves <palves@redhat.com>
5465
5466 PR threads/13217
5467 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
5468 (top level): Call it twice, with different thread sets.
5469
c6609450
PA
54702017-04-13 Pedro Alves <palves@redhat.com>
5471
5472 * thread.c: Include <algorithm>.
5473 (thread_array_cleanup): Delete.
5474 (scoped_inc_dec_ref): New class.
5475 (live_threads_count): New function.
5476 (set_thread_refcount): Delete.
5477 (tp_array_compar_ascending): Now a bool.
5478 (tp_array_compar): Convert to a std::sort comparison function.
5479 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
5480 and live_threads_count.
5481
2a00d7ce
PA
54822017-04-13 Pedro Alves <palves@redhat.com>
5483
5484 * infrun.c (follow_fork_inferior): Also switch the current
5485 inferior.
5486
441d7c93
PA
54872017-04-13 Pedro Alves <palves@redhat.com>
5488
5489 * breakpoint.c (watch_command_1): Save watchpoint-frame info
5490 before calling create_internal_breakpoint.
5491
808480f6
PA
54922017-04-13 Pedro Alves <palves@redhat.com>
5493
5494 * fork-child.c (execv_argv): New class.
5495 (breakup_args): Refactored as ...
5496 (execv_argv::init_for_no_shell): .. this method of execv_argv.
5497 Copy arguments to storage and replace separators with NULL
5498 terminators in place.
5499 (escape_bang_in_quoted_argument): Adjust to return bool.
5500 (execv_argv::execv_argv): New ctor.
5501 (execv_argv::init_for_shell): New method, factored out from
5502 fork_inferior. Don't strdup strings into the vector.
5503 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
5504 Remove free_vector_argv call.
5505
ad3d022a
YQ
55062017-04-13 Yao Qi <yao.qi@linaro.org>
5507
5508 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
5509 tdep->rx_psw_type.
5510
e6ddc3bf
YQ
55112017-04-13 Yao Qi <yao.qi@linaro.org>
5512
5513 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
5514 * rx-tdep.c (rx_gdbarch_init): Likewise.
5515
bfb8cf90
PA
55162017-04-13 Pedro Alves <palves@redhat.com>
5517
5518 * breakpoint.h (struct breakpoint): Reindent.
5519
f5336ca5
PA
55202017-04-13 Pedro Alves <palves@redhat.com>
5521
5522 * breakpoint.c (bp_location): Rename to ...
5523 (bp_locations): ... this. All references updated.
5524 (bp_location_count): Rename to ...
5525 (bp_locations_count): ... this. All references updated.
5526 (bp_location_placed_address_before_address_max): Rename to ...
5527 (bp_locations_placed_address_before_address_max): ... this. All
5528 references updated.
5529 (bp_location_shadow_len_after_address_max): Rename to ...
5530 (bp_locations_shadow_len_after_address_max): ... this. All
5531 references updated.
5532 (bp_location_compare_addrs): Rename to ...
5533 (bp_locations_compare_addrs): ... this. All references updated.
5534 (bp_location_compare):Rename to ...
5535 (bp_locations_compare): ... this. All references updated.
5536 (bp_location_target_extensions_update): Rename to ...
5537 (bp_locations_target_extensions_update): ... this. All references
5538 updated.
5539
be628ab8
SDJ
55402017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5541
5542 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
5543 * common/common.m4: Check headers 'termios.h', 'termio.h' and
5544 'sgtty.h'.
5545 * common/gdb_termios.h: New file, with parts of "terminal.h".
5546 * inflow.c: Include "gdb_termios.h".
5547 * ser-unix.c: Include "gdb_termios.h".
5548 * terminal.h: Move terminal-related defines to
5549 "common/gdb_termios.h".
5550
8e9e35b1
TT
55512017-04-12 Tom Tromey <tom@tromey.com>
5552
5553 * probe.c (parse_probes): Update.
5554 * location.h (delete_event_location): Don't declare.
5555 (event_location_deleter::operator()): Update.
5556 * location.c (event_location_deleter::operator()): Rename from
5557 delete_event_location.
5558 * linespec.h (linespec_result) <location>: Change type to
5559 event_location_up.
5560 * linespec.c (canonicalize_linespec, event_location_to_sals)
5561 (decode_objc): Update.
5562 (linespec_result): Don't call delete_event_location.
5563 * breakpoint.c (create_breakpoints_sal)
5564 (bkpt_probe_create_sals_from_location)
5565 (strace_marker_create_sals_from_location): Update.
5566
16e802b9
TT
55672017-04-12 Tom Tromey <tom@tromey.com>
5568
5569 * linespec.h (struct linespec_result): Add constructor and
5570 destructor.
5571 (init_linespec_result, destroy_linespec_result)
5572 (make_cleanup_destroy_linespec_result): Don't declare.
5573 * linespec.c (init_linespec_result): Remove.
5574 (linespec_result::~linespec_result): Rename from
5575 destroy_linespec_result. Update.
5576 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
5577 Remove.
5578 * breakpoint.c (create_breakpoint, break_range_command)
5579 (decode_location_default): Update.
5580 * ax-gdb.c (agent_command_1): Update.
5581
d28cd78a
TT
55822017-04-12 Tom Tromey <tom@tromey.com>
5583
5584 * remote.c (remote_download_tracepoint): Update.
5585 * python/py-breakpoint.c (bppy_get_location): Update.
5586 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
5587 (gdbscm_breakpoint_location): Update.
5588 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
5589 * breakpoint.h (struct breakpoint) <location, location_range_end>:
5590 Change type to event_location_up.
5591 * breakpoint.c (create_overlay_event_breakpoint)
5592 (create_longjmp_master_breakpoint)
5593 (create_std_terminate_master_breakpoint)
5594 (create_exception_master_breakpoint)
5595 (breakpoint_event_location_empty_p, print_breakpoint_location)
5596 (print_one_breakpoint_location, create_thread_event_breakpoint)
5597 (init_breakpoint_sal, create_breakpoint)
5598 (print_recreate_ranged_breakpoint, break_range_command)
5599 (init_ada_exception_breakpoint, say_where): Update.
5600 (base_breakpoint_dtor): Don't call delete_event_location.
5601 (bkpt_print_recreate, tracepoint_print_recreate)
5602 (dprintf_print_recreate, update_static_tracepoint)
5603 (breakpoint_re_set_default): Update.
5604
711799d5
TT
56052017-04-12 Tom Tromey <tom@tromey.com>
5606
5607 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
5608 type of "to_do". Update.
5609 (compute_stack_depth): Use std::vector.
5610
52d214d3
TT
56112017-04-12 Tom Tromey <tom@tromey.com>
5612
5613 * printcmd.c (find_instruction_backward): Use std::vector.
5614
4c404b8b
TT
56152017-04-12 Tom Tromey <tom@tromey.com>
5616
5617 * symfile.c (objfilep): Remove typedef.
5618 (reread_symbols): Use a std::vector.
5619
156d9eab
TT
56202017-04-12 Tom Tromey <tom@tromey.com>
5621
5622 * mi/mi-main.c (exec_direction_forward): Remove.
5623 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
5624 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5625 scoped_restore.
5626 * guile/guile.c (guile_repl_command, guile_command)
5627 (gdbscm_execute_gdb_command): Use scoped_restore.
5628 * go-exp.y (go_parse): Use scoped_restore.
5629 * d-exp.y (d_parse): Use scoped_restore.
5630 * cli/cli-decode.c (cmd_func): Use scoped_restore.
5631 * c-exp.y (c_parse): Use scoped_restore.
5632
4d89769a
TT
56332017-04-12 Tom Tromey <tom@tromey.com>
5634
5635 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
5636 (mi_parse): Update return type.
5637 (mi_parse_free): Remove.
5638 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
5639 (mi_parse::~mi_parse): Rename from mi_parse_free.
5640 (mi_parse_cleanup): Remove.
5641 (mi_parse): Return a unique_ptr. Use new.
5642 * mi/mi-main.c (mi_execute_command): Update.
5643
4b217cc7
TT
56442017-04-12 Tom Tromey <tom@tromey.com>
5645
5646 * location.c (explicit_location_lex_one): Return a
5647 unique_xmalloc_ptr.
5648 (string_to_explicit_location): Update. Remove cleanups.
5649
59d3651b
TT
56502017-04-12 Tom Tromey <tom@tromey.com>
5651
5652 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
5653 (compare_value_and_voffset): Change type. Update.
5654 (compute_vtable_size): Change type of "offset_vec".
5655 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
5656 (gnuv3_get_typeid): Remove extraneous declaration.
5657
b24b0d6c
TT
56582017-04-12 Tom Tromey <tom@tromey.com>
5659
5660 * charset.h (wchar_iterator): Fix comment.
5661
80a3b8c5
TT
56622017-04-12 Tom Tromey <tom@tromey.com>
5663
5664 * charset.c (iconv_wrapper): New class.
5665 (cleanup_iconv): Remove.
5666 (convert_between_encodings): Use it.
5667
c83dd867
TT
56682017-04-12 Tom Tromey <tom@tromey.com>
5669
5670 * symfile.h (increment_reading_symtab): Update type.
5671 * symfile.c (decrement_reading_symtab): Remove.
5672 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
5673 * psymtab.c (psymtab_to_symtab): Update.
5674 * dwarf2read.c (dw2_instantiate_symtab): Update.
5675
0e8621a0
TT
56762017-04-12 Tom Tromey <tom@tromey.com>
5677
5678 * jit.c (struct jit_reader): Declare separately. Add constructor
5679 and destructor. Change type of "handle".
5680 (loaded_jit_reader): Define separately.
5681 (jit_reader_load): Update. New "new".
5682 (jit_reader_unload_command): Use "delete".
5683 * gdb-dlfcn.h (struct dlclose_deleter): New.
5684 (gdb_dlhandle_up): New typedef.
5685 (gdb_dlopen, gdb_dlsym): Update types.
5686 (gdb_dlclose): Remove.
5687 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
5688 (gdb_dlsym): Change type of "handle".
5689 (make_cleanup_dlclose): Remove.
5690 (dlclose_deleter::operator()): Rename from gdb_dlclose.
5691 * compile/compile-c-support.c (load_libcc): Update.
5692
67d89901
TT
56932017-04-12 Tom Tromey <tom@tromey.com>
5694
5695 * symtab.h (find_pcs_for_symtab_line): Change return type.
5696 * symtab.c (find_pcs_for_symtab_line): Change return type.
5697 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
5698 type of "vec". Update.
5699 (ltpy_get_pcs_for_line): Update.
5700 * linespec.c (decode_digits_ordinary): Update.
5701
93921405
TT
57022017-04-12 Tom Tromey <tom@tromey.com>
5703
5704 * tracepoint.c (actions_command): Update.
5705 * python/python.c (python_command, python_interactive_command):
5706 Update.
5707 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5708 * guile/guile.c (guile_command): Update.
5709 * defs.h (read_command_lines, read_command_lines_1): Return
5710 command_line_up.
5711 (command_lines_deleter): New struct.
5712 (command_line_up): New typedef.
5713 * compile/compile.c (compile_code_command)
5714 (compile_print_command): Update.
5715 * cli/cli-script.h (get_command_line, copy_command_lines): Return
5716 command_line_up.
5717 (make_cleanup_free_command_lines): Remove.
5718 * cli/cli-script.c (get_command_line, read_command_lines_1)
5719 (copy_command_lines): Return command_line_up.
5720 (while_command, if_command, read_command_lines, define_command)
5721 (document_command): Update.
5722 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
5723 Remove.
5724 * breakpoint.h (breakpoint_set_commands): Change type of
5725 "commands".
5726 * breakpoint.c (breakpoint_set_commands): Change type of
5727 "commands". Update.
5728 (do_map_commands_command, update_dprintf_command_list)
5729 (create_tracepoint_from_upload): Update.
5730
ffc2605c
TT
57312017-04-12 Tom Tromey <tom@tromey.com>
5732
5733 * tracepoint.c (scope_info): Update.
5734 * spu-tdep.c (spu_catch_start): Update.
5735 * python/python.c (gdbpy_decode_line): Update.
5736 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
5737 * python/py-breakpoint.c (bppy_init): Update.
5738 * probe.c (parse_probes): Update.
5739 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
5740 * location.h (event_location_deleter): New struct.
5741 (event_location_up): New typedef.
5742 (new_linespec_location, new_address_location, new_probe_location)
5743 (new_explicit_location, copy_event_location)
5744 (string_to_event_location, string_to_event_location_basic)
5745 (string_to_explicit_location): Update return type.
5746 (make_cleanup_delete_event_location): Remove.
5747 * location.c (new_linespec_location, new_address_location)
5748 (new_probe_location, new_explicit_location, copy_event_location):
5749 Return event_location_up.
5750 (delete_event_location_cleanup)
5751 (make_cleanup_delete_event_location): Remove.
5752 (string_to_explicit_location, string_to_event_location_basic)
5753 (string_to_event_location): Return event_location_up.
5754 * linespec.c (canonicalize_linespec, event_location_to_sals)
5755 (decode_line_with_current_source)
5756 (decode_line_with_last_displayed, decode_objc): Update.
5757 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
5758 * completer.c (location_completer): Update.
5759 * cli/cli-cmds.c (edit_command, list_command): Update.
5760 * breakpoint.c (create_overlay_event_breakpoint)
5761 (create_longjmp_master_breakpoint)
5762 (create_std_terminate_master_breakpoint)
5763 (create_exception_master_breakpoint)
5764 (create_thread_event_breakpoint): Update.
5765 (init_breakpoint_sal): Update. Remove some dead code.
5766 (create_breakpoint_sal): Change type of "location". Update.
5767 (create_breakpoints_sal, create_breakpoint, break_command_1)
5768 (dprintf_command, break_range_command, until_break_command)
5769 (init_ada_exception_breakpoint)
5770 (strace_marker_create_sals_from_location)
5771 (update_static_tracepoint, trace_command, ftrace_command)
5772 (strace_command, create_tracepoint_from_upload): Update.
5773 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5774 * ax-gdb.c (agent_command_1): Update.
5775
8f10c932
PA
57762017-04-12 Pedro Alves <palves@redhat.com>
5777
5778 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
5779 * configure.tgt: Handle i[34567]86-*-go32* and
5780 i[34567]86-*-msdosdjgpp*.
5781 * i386-tdep.c (i386_svr4_reg_to_regnum):
5782 Make extern.
5783 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
5784 i386-go32-tdep.c.
5785 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
5786 * i386-go32-tdep.c: New file.
5787 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
5788 declarations.
5789
0a31ccfb
SM
57902017-04-12 Simon Marchi <simon.marchi@ericsson.com>
5791
5792 * aix-thread.c (pd_status2str): Change return type to const char *.
5793
e9bb3fbb
PA
57942017-04-12 Pedro Alves <palves@redhat.com>
5795
5796 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
5797 calls to set_gdbarch_gnu_triplet_regexp.
5798
53375380
PA
57992017-04-12 Pedro Alves <palves@redhat.com>
5800
5801 PR gdb/21323
5802 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
5803 New enum value.
5804 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
5805 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
5806 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
5807 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
5808 * gdbarch.h, gdbarch.c: Regenerate.
5809 * aarch64-tdep.c (aarch64_gdbarch_init): Override
5810 gdbarch_wchar_bit and gdbarch_wchar_signed.
5811 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
5812 * arm-tdep.c (arm_gdbarch_init): Likewise.
5813 * avr-tdep.c (avr_gdbarch_init): Likewise.
5814 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
5815 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
5816 * i386-tdep.c (i386_go32_init_abi): Likewise.
5817 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5818 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5819 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5820 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5821 * sh-tdep.c (sh_gdbarch_init): Likewise.
5822 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5823 * sparc64-tdep.c (sparc64_init_abi): Likewise.
5824 * windows-tdep.c (windows_init_abi): Likewise.
5825 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5826
53e710ac
PA
58272017-04-12 Pedro Alves <palves@redhat.com>
5828
5829 PR c++/21323
5830 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
5831 cplus_primitive_type_char32_t>: New enum values.
5832 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
5833 and cplus_primitive_type_char32_t.
5834 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
5835 32, use the archtecture's built-in type for char16_t and char32_t,
5836 respectively. Otherwise, fallback to init_integer_type as before,
5837 but make the type unsigned, and issue a complaint.
5838 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
5839
ab0538b8
AH
58402017-04-12 Alan Hayward <alan.hayward@arm.com>
5841
5e0e0422 5842 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
5843 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
5844
5430098f
SDJ
58452017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5846
5847 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
5848 'const char *'.
5849
7c5ded6a
SDJ
58502017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5851
5852 * common/common-utils.c (free_vector_argv): New function.
5853 * common/common-utils.h: Include <vector>.
5854 (free_vector_argv): New prototype.
5855 * darwin-nat.c (darwin_create_inferior): Rewrite function
5856 prototype in order to constify "exec_file" and accept a
5857 "std::string" for "allargs".
5858 * fork-child.c: Include <vector>.
5859 (breakup_args): Rewrite function, using C++.
5860 (fork_inferior): Rewrite function header, constify "exec_file_arg"
5861 and accept "std::string" for "allargs". Update the code to
5862 calculate "argv" based on "allargs". Update calls to "exec_fun"
5863 and "execvp".
5864 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
5865 order to constify "exec_file" and accept a "std::string" for
5866 "allargs".
5867 * go32-nat.c (go32_create_inferior): Likewise.
5868 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
5869 * infcmd.c (run_command_1): Constify "exec_file". Use
5870 "std::string" for inferior arguments.
5871 * inferior.h (fork_inferior): Update prototype.
5872 * linux-nat.c (linux_nat_create_inferior): Rewrite function
5873 prototype in order to constify "exec_file" and accept a
5874 "std::string" for "allargs".
5875 * nto-procfs.c (procfs_create_inferior): Likewise.
5876 * procfs.c (procfs_create_inferior): Likewise.
5877 * remote-sim.c (gdbsim_create_inferior): Likewise.
5878 * remote.c (extended_remote_run): Update code to accept
5879 "std::string" as argument.
5880 (extended_remote_create_inferior): Rewrite function prototype in
5881 order to constify "exec_file" and accept a "std::string" for
5882 "allargs".
5883 * rs6000-nat.c (super_create_inferior): Likewise.
5884 (rs6000_create_inferior): Likewise.
5885 * target.h (struct target_ops) <to_create_inferior>: Likewise.
5886 * windows-nat.c (windows_create_inferior): Likewise.
5887
ae0eee42
PA
58882017-04-11 Pedro Alves <palves@redhat.com>
5889
5890 * thread.c: Fix whitespace throughout.
5891
a6acac06
PR
58922017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
5893
5894 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
5895
64403bd1
AH
58962017-04-11 Alan Hayward <alan.hayward@arm.com>
5897
5898 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
5899
a5bef50f
SDJ
59002017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
5901
5902 PR gdb/21364
5903 * osdata.c (info_osdata): Check if 'type' is an empty string
5904 instead of NULL.
5905
9295a5a9
PA
59062017-04-10 Pedro Alves <palves@redhat.com>
5907
5908 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
5909 (ptid_to_global_thread_id, in_thread_list)
5910 (do_captured_list_thread_ids, set_resumed, set_running)
5911 (set_executing, set_stop_requested, finish_thread_state)
5912 (validate_registers_access, can_access_registers_ptid)
5913 (print_thread_info_1, switch_to_thread)
5914 (do_restore_current_thread_cleanup)
5915 (make_cleanup_restore_current_thread, thread_command)
5916 (thread_name_command): Use operator== instead of ptid_equal.
5917
996812e3
PA
59182017-04-10 Pedro Alves <palves@redhat.com>
5919
5920 * thread.c (struct current_thread_cleanup) <next>: Delete field.
5921 (current_thread_cleanup_chain): Delete.
5922 (restore_current_thread_cleanup_dtor)
5923 (make_cleanup_restore_current_thread): Remove references to
5924 current_thread_cleanup_chain.
5925
845b344f
AH
59262017-04-10 Alan Hayward <alan.hayward@arm.com>
5927
5928 * msp430-tdep.c (msp430_pseudo_register_read): Never return
5929 REG_UNKNOWN.
5930
803bdfe4
YQ
59312017-04-10 Yao Qi <yao.qi@linaro.org>
5932
5933 PR gdb/19942
5934 * gdbthread.h (thread_info::deletable): New method.
5935 (thread_info::incref): New method.
5936 (thread_info::decref): New method.
5937 (thread_info::refcount): Move it to private.
5938 * infrun.c (save_stop_context): Call inc_refcount.
5939 (release_stop_context_cleanup): Likewise.
5940 * thread.c (set_thread_exited): New function.
5941 (init_thread_list): Delete "tp" only it is deletable, otherwise
5942 call set_thread_exited.
5943 (delete_thread_1): Call set_thread_exited.
5944 (current_thread_cleanup) <inferior_pid>: Remove.
5945 <thread>: New field.
5946 (restore_current_thread_ptid_changed): Removed.
5947 (do_restore_current_thread_cleanup): Adjust.
5948 (restore_current_thread_cleanup_dtor): Don't call
5949 find_thread_ptid.
5950 (set_thread_refcount): Use dec_refcount.
5951 (make_cleanup_restore_current_thread): Adjust.
5952 (thread_apply_all_command): Call inc_refcount.
5953 (_initialize_thread): Don't call
5954 observer_attach_thread_ptid_changed.
5955
8c25b497
YQ
59562017-04-10 Yao Qi <yao.qi@linaro.org>
5957
5958 * thread.c (delete_thread_1): Hoist code on marking thread as
5959 exited.
5960
8473b447
SM
59612017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5962
5963 * windows-nat.c (windows_detach): Initialize ptid with
5964 minus_one_ptid.
5965
6670ec13
SM
59662017-04-07 Simon Marchi <simon.marchi@ericsson.com>
5967
5968 * unittests/ptid-selftests.c: Fix erroneous assert messages.
5969
ba2f91bb
AH
59702017-04-07 Alan Hayward <alan.hayward@arm.com>
5971
5972 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
5973 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
5974 (bfin_pseudo_register_write): Likewise
5975
436252de
SM
59762017-04-06 Simon Marchi <simon.marchi@ericsson.com>
5977
5978 * common/ptid.h (struct ptid): Change to...
5979 (class ptid_t): ... this.
5980 <ptid_t>: New constructors.
5981 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
5982 matches>: New methods.
5983 <make_null, make_minus_one>: New static methods.
5984 <pid>: Rename to...
5985 <m_pid>: ...this.
5986 <lwp>: Rename to...
5987 <m_lwp>: ...this.
5988 <tid>: Rename to...
5989 <m_tid>: ...this.
5990 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
5991 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
5992 as references, move comment to class ptid_t.
5993 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
5994 ptid_t static methods.
5995 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
5996 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
5997 Take ptid arguments as references, implement using ptid_t methods.
5998 * unittests/ptid-selftests.c: New file.
5999 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6000 unittests/ptid-selftests.c.
6001 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
6002
0dedf377
TP
60032017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
6004
6005 * python/python.c (python_run_simple_file): Cast mode literal to
6006 non-const char pointer as expected by PyFile_FromString.
6007
4e9868d4
SM
60082017-04-05 Simon Marchi <simon.marchi@ericsson.com>
6009
6010 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
6011 minus_one_ptid and null_ptid.
6012
9bf2a700
PA
60132017-04-05 Pedro Alves <palves@redhat.com>
6014
6015 * warning.m4 (build_warnings): Remove -Wno-write-strings.
6016 * configure: Regenerate.
6017
a121b7c1
PA
60182017-04-05 Pedro Alves <palves@redhat.com>
6019
6020 * ada-exp.y (yyerror): Constify.
6021 * ada-lang.c (bound_name, get_selections)
6022 (ada_variant_discrim_type)
6023 (ada_variant_discrim_name, ada_value_struct_elt)
6024 (ada_lookup_struct_elt_type, is_unchecked_variant)
6025 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
6026 (catch_ada_exception_command_split)
6027 (catch_ada_assert_command_split, catch_assert_command)
6028 (ada_op_name): Constify.
6029 * ada-lang.h (ada_yyerror, get_selections)
6030 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
6031 * arc-tdep.c (arc_print_frame_cache): Constify.
6032 * arm-tdep.c (arm_skip_stub): Constify.
6033 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
6034 (gen_aggregate_elt_ref): Constify.
6035 * bcache.c (print_bcache_statistics): Constify.
6036 * bcache.h (print_bcache_statistics): Constify.
6037 * break-catch-throw.c (catch_exception_command_1):
6038 * breakpoint.c (struct ep_type_description::description):
6039 Constify.
6040 (add_solib_catchpoint): Constify.
6041 (catch_fork_command_1): Add cast.
6042 (add_catch_command): Constify.
6043 * breakpoint.h (add_catch_command, add_solib_catchpoint):
6044 Constify.
6045 * bsd-uthread.c (bsd_uthread_state): Constify.
6046 * buildsym.c (patch_subfile_names): Constify.
6047 * buildsym.h (next_symbol_text_func, patch_subfile_names):
6048 Constify.
6049 * c-exp.y (yyerror): Constify.
6050 (token::oper): Constify.
6051 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
6052 * c-varobj.c (cplus_describe_child): Constify.
6053 * charset.c (find_charset_names): Add cast.
6054 (find_charset_names): Constify array and add const_cast.
6055 * cli/cli-cmds.c (complete_command, cd_command): Constify.
6056 (edit_command): Constify.
6057 * cli/cli-decode.c (lookup_cmd): Constify.
6058 * cli/cli-dump.c (dump_memory_command, dump_value_command):
6059 Constify.
6060 (struct dump_context): Constify.
6061 (add_dump_command, restore_command): Constify.
6062 * cli/cli-script.c (get_command_line): Constify.
6063 * cli/cli-script.h (get_command_line): Constify.
6064 * cli/cli-utils.c (check_for_argument): Constify.
6065 * cli/cli-utils.h (check_for_argument): Constify.
6066 * coff-pe-read.c (struct read_pe_section_data): Constify.
6067 * command.h (lookup_cmd): Constify.
6068 * common/print-utils.c (decimal2str): Constify.
6069 * completer.c (gdb_print_filename): Constify.
6070 * corefile.c (set_gnutarget): Constify.
6071 * cp-name-parser.y (yyerror): Constify.
6072 * cp-valprint.c (cp_print_class_member): Constify.
6073 * cris-tdep.c (cris_register_name, crisv32_register_name):
6074 Constify.
6075 * d-exp.y (yyerror): Constify.
6076 (struct token::oper): Constify.
6077 * d-lang.h (d_yyerror): Constify.
6078 * dbxread.c (struct header_file_location::name): Constify.
6079 (add_old_header_file, add_new_header_file, last_function_name)
6080 (dbx_next_symbol_text, add_bincl_to_list)
6081 (find_corresponding_bincl_psymtab, set_namestring)
6082 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
6083 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
6084 * defs.h (command_line_input, print_address_symbolic)
6085 (deprecated_readline_begin_hook): Constify.
6086 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
6087 Constify.
6088 * event-top.c (handle_line_of_input): Constify and add cast.
6089 * exceptions.c (catch_errors): Constify.
6090 * exceptions.h (catch_errors): Constify.
6091 * expprint.c (print_subexp_standard, op_string, op_name)
6092 (op_name_standard, dump_raw_expression, dump_raw_expression):
6093 * expression.h (op_name, op_string, dump_raw_expression):
6094 Constify.
6095 * f-exp.y (yyerror): Constify.
6096 (struct token::oper): Constify.
6097 (struct f77_boolean_val::name): Constify.
6098 * f-lang.c (f_word_break_characters): Constify.
6099 * f-lang.h (f_yyerror): Constify.
6100 * fork-child.c (fork_inferior): Add cast.
6101 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
6102 (new_variant): Constify.
6103 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
6104 * gdbarch.c: Regenerate.
6105 * gdbcore.h (set_gnutarget): Constify.
6106 * go-exp.y (yyerror): Constify.
6107 (token::oper): Constify.
6108 * go-lang.h (go_yyerror): Constify.
6109 * go32-nat.c (go32_sysinfo): Constify.
6110 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
6111 * guile/scm-cmd.c (cmdscm_function): Constify.
6112 * guile/scm-param.c (pascm_param_value): Constify.
6113 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
6114 (h8300sx_register_name): Constify.
6115 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
6116 Constify.
6117 * ia64-tdep.c (ia64_register_names): Constify.
6118 * infcmd.c (construct_inferior_arguments): Constify.
6119 (path_command, attach_post_wait): Constify.
6120 * language.c (show_range_command, show_case_command)
6121 (unk_lang_error): Constify.
6122 * language.h (language_defn::la_error)
6123 (language_defn::la_name_of_this): Constify.
6124 * linespec.c (decode_line_2): Constify.
6125 * linux-thread-db.c (thread_db_err_str): Constify.
6126 * lm32-tdep.c (lm32_register_name): Constify.
6127 * m2-exp.y (yyerror): Constify.
6128 * m2-lang.h (m2_yyerror): Constify.
6129 * m32r-tdep.c (m32r_register_names): Constify and make static.
6130 * m68hc11-tdep.c (m68hc11_register_names): Constify.
6131 * m88k-tdep.c (m88k_register_name): Constify.
6132 * macroexp.c (appendmem): Constify.
6133 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
6134 (upgrade_type, parse_external, parse_partial_symbols)
6135 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
6136 (new_symbol): Constify.
6137 * memattr.c (mem_info_command): Constify.
6138 * mep-tdep.c (register_name_from_keyword): Constify.
6139 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
6140 Constify.
6141 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
6142 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
6143 * mi/mi-main.c (captured_mi_execute_command): Constify and add
6144 cast.
6145 (mi_execute_async_cli_command): Constify.
6146 * mips-tdep.c (mips_register_name): Constify.
6147 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
6148 (am33_register_name, am33_2_register_name)
6149 * moxie-tdep.c (moxie_register_names): Constify.
6150 * nat/linux-osdata.c (osdata_type): Constify fields.
6151 * nto-tdep.c (nto_parse_redirection): Constify.
6152 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
6153 (lookup_child_selector): Constify.
6154 (objc_methcall::name): Constify.
6155 * objc-lang.h (lookup_objc_class, lookup_child_selector)
6156 (lookup_struct_typedef): Constify.
6157 * objfiles.c (pc_in_section): Constify.
6158 * objfiles.h (pc_in_section): Constify.
6159 * p-exp.y (struct token::oper): Constify.
6160 (yyerror): Constify.
6161 * p-lang.h (pascal_yyerror): Constify.
6162 * parser-defs.h (op_name_standard): Constify.
6163 (op_print::string): Constify.
6164 (exp_descriptor::op_name): Constify.
6165 * printcmd.c (print_address_symbolic): Constify.
6166 * psymtab.c (print_partial_symbols): Constify.
6167 * python/py-breakpoint.c (stop_func): Constify.
6168 (bppy_get_expression): Constify.
6169 * python/py-cmd.c (cmdpy_completer::name): Constify.
6170 (cmdpy_function): Constify.
6171 * python/py-event.c (evpy_add_attribute)
6172 (gdbpy_initialize_event_generic): Constify.
6173 * python/py-event.h (evpy_add_attribute)
6174 (gdbpy_initialize_event_generic): Constify.
6175 * python/py-evts.c (add_new_registry): Constify.
6176 * python/py-finishbreakpoint.c (outofscope_func): Constify.
6177 * python/py-framefilter.c (get_py_iter_from_func): Constify.
6178 * python/py-inferior.c (get_buffer): Add cast.
6179 * python/py-param.c (parm_constant::name): Constify.
6180 * python/py-unwind.c (fprint_frame_id): Constify.
6181 * python/python.c (gdbpy_parameter_value): Constify.
6182 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
6183 * remote.c (memory_packet_config::name): Constify.
6184 (show_packet_config_cmd, remote_write_bytes)
6185 (remote_buffer_add_string):
6186 * reverse.c (exec_reverse_once): Constify.
6187 * rs6000-tdep.c (variant::name, variant::description): Constify.
6188 * rust-exp.y (rustyyerror): Constify.
6189 * rust-lang.c (rust_op_name): Constify.
6190 * rust-lang.h (rustyyerror): Constify.
6191 * serial.h (serial_ops::name): Constify.
6192 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
6193 (sh_sh3e_register_name, sh_sh2e_register_name)
6194 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
6195 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
6196 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
6197 (sh_sh4al_dsp_register_name): Constify.
6198 * sh64-tdep.c (sh64_register_name): Constify.
6199 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
6200 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
6201 * stabsread.c (patch_block_stabs, read_type_number)
6202 (ref_map::stabs, ref_add, process_reference)
6203 (symbol_reference_defined, define_symbol, define_symbol)
6204 (error_type, read_type, read_member_functions, read_cpp_abbrev)
6205 (read_one_struct_field, read_struct_fields, read_baseclasses)
6206 (read_tilde_fields, read_struct_type, read_array_type)
6207 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
6208 (read_huge_number, read_range_type, read_args, common_block_start)
6209 (find_name_end): Constify.
6210 * stabsread.h (common_block_start, define_symbol)
6211 (process_one_symbol, symbol_reference_defined, ref_add):
6212 * symfile.c (get_section_index, add_symbol_file_command):
6213 * symfile.h (get_section_index): Constify.
6214 * target-descriptions.c (tdesc_type::name): Constify.
6215 (tdesc_free_type): Add cast.
6216 * target.c (find_default_run_target):
6217 (add_deprecated_target_alias, find_default_run_target)
6218 (target_announce_detach): Constify.
6219 (do_option): Constify.
6220 * target.h (add_deprecated_target_alias): Constify.
6221 * thread.c (print_thread_info_1): Constify.
6222 * top.c (deprecated_readline_begin_hook, command_line_input):
6223 Constify.
6224 (init_main): Add casts.
6225 * top.h (handle_line_of_input): Constify.
6226 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
6227 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
6228 (tfind_command): Rename to ...
6229 (tfind_command_1): ... this and constify.
6230 (tfind_command): New function.
6231 (tfind_end_command, tfind_start_command): Adjust.
6232 (encode_source_string): Constify.
6233 * tracepoint.h (encode_source_string): Constify.
6234 * tui/tui-data.c (tui_partial_win_by_name): Constify.
6235 * tui/tui-data.h (tui_partial_win_by_name): Constify.
6236 * tui/tui-source.c (tui_set_source_content_nil): Constify.
6237 * tui/tui-source.h (tui_set_source_content_nil): Constify.
6238 * tui/tui-win.c (parse_scrolling_args): Constify.
6239 * tui/tui-windata.c (tui_erase_data_content): Constify.
6240 * tui/tui-windata.h (tui_erase_data_content): Constify.
6241 * tui/tui-winsource.c (tui_erase_source_content): Constify.
6242 * tui/tui.c (tui_enable): Add cast.
6243 * utils.c (defaulted_query): Constify.
6244 (init_page_info): Add cast.
6245 (puts_debug, subset_compare): Constify.
6246 * utils.h (subset_compare): Constify.
6247 * varobj.c (varobj_format_string): Constify.
6248 * varobj.h (varobj_format_string): Constify.
6249 * vax-tdep.c (vax_register_name): Constify.
6250 * windows-nat.c (windows_detach): Constify.
6251 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
6252 * xml-support.c (gdb_xml_end_element): Constify.
6253 * xml-tdesc.c (tdesc_start_reg): Constify.
6254 * xstormy16-tdep.c (xstormy16_register_name): Constify.
6255 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
6256 * xtensa-tdep.h (xtensa_register_t::name): Constify.
6257
995816ba
PA
62582017-04-05 Pedro Alves <palves@redhat.com>
6259
6260 * proc-api.c (struct trans): Constify.
6261 (procfs_note): Constify.
6262 * proc-events.c (struct trans, syscall_table):
6263 * proc-flags.c (struct trans): Constify.
6264 * proc-utils.h (procfs_note): Constify.
6265 * proc-why.c (struct trans): Constify.
6266 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
6267 (procfs_detach): Constify.
6268 * sol-thread.c (struct string_map): Constify.
6269 (td_err_string, td_state_string): Constify.
6270
3e83a920
PA
62712017-04-05 Pedro Alves <palves@redhat.com>
6272
6273 * proc-api.c (procfs_filename): Don't initialize
6274 procfs_filename.
6275 (prepare_to_trace): Assume procfs_filename is non-NULL.
6276 (_initialize_proc_api): Give procfs_filename a default value here.
6277
63160a43
PA
62782017-04-05 Pedro Alves <palves@redhat.com>
6279
6280 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
6281 'cond_string' parameter.
6282 (extract_exception_regexp): Constify 'string' parameter.
6283 (catch_exception_command_1): Constify.
6284 * breakpoint.c (init_catchpoint)
6285 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
6286 parameter.
6287 (ep_parse_optional_if_clause, catch_fork_command_1)
6288 (catch_exec_command_1): Constify.
6289 * breakpoint.h (init_catchpoint): Constify 'cond_string'
6290 parameter.
6291 (ep_parse_optional_if_clause): Constify.
6292 * cli/cli-utils.c (remove_trailing_whitespace)
6293 (check_for_argument): Constify.
6294 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
6295 non-const overload.
6296 (check_for_argument): Likewise.
6297
9b2eba3d
PA
62982017-04-05 Pedro Alves <palves@redhat.com>
6299
6300 * event-top.c (command_line_handler): Add cast to execute_command
6301 call.
6302 * record-btrace.c (cmd_record_btrace_bts_start)
6303 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
6304 (cmd_record_btrace_start): Add cast to execute_command call.
6305 * record-full.c (record_full_goto_insn):
6306 * record.c (record_start, record_stop): Add cast to
6307 execute_command_to_string calls.
6308 (cmd_record_start): Add cast to execute_command calls.
6309
2adadf51
PA
63102017-04-05 Pedro Alves <palves@redhat.com>
6311
6312 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
6313 static inline function.
6314 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
6315 array and use gdb_PyArg_ParseTupleAndKeywords.
6316 * python/py-cmd.c (cmdpy_init): Likewise.
6317 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
6318 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
6319 (infpy_search_memory): Likewise.
6320 * python/py-objfile.c (objfpy_add_separate_debug_file)
6321 (gdbpy_lookup_objfile): Likewise.
6322 * python/py-symbol.c (gdbpy_lookup_symbol)
6323 (gdbpy_lookup_global_symbol): Likewise.
6324 * python/py-type.c (gdbpy_lookup_type): Likewise.
6325 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
6326 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
6327 Likewise.
6328
0d1f4ceb
PA
63292017-04-05 Pedro Alves <palves@redhat.com>
6330
6331 * python/python-internal.h (gdb_PyGetSetDef): New type.
6332 * python/py-block.c (block_object_getset)
6333 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
6334 * python/py-event.c (event_object_getset)
6335 (finish_breakpoint_object_getset): Likewise.
6336 * python/py-inferior.c (inferior_object_getset): Likewise.
6337 * python/py-infthread.c (thread_object_getset): Likewise.
6338 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
6339 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
6340 * python/py-objfile.c (objfile_getset): Likewise.
6341 * python/py-progspace.c (pspace_getset): Likewise.
6342 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
6343 Likewise.
6344 * python/py-record.c (recpy_record_getset): Likewise.
6345 * python/py-symbol.c (symbol_object_getset): Likewise.
6346 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
6347 Likewise.
6348 * python/py-type.c (type_object_getset, field_object_getset):
6349 Likewise.
6350 * python/py-value.c (value_object_getset): Likewise.
6351
4d759979
PA
63522017-04-05 Pedro Alves <palves@redhat.com>
6353
6354 * python/python-internal.h (gdb_PyObject_CallMethod)
6355 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
6356 New functions.
6357 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
6358 (PySys_GetObject, PySys_SetPath): New macros.
6359
fdf9e36f
PA
63602017-04-05 Pedro Alves <palves@redhat.com>
6361
6362 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
6363 info_osdata_command.
6364 * osdata.c (info_osdata_command): Rename to ...
6365 (info_osdata): ... this. Constify 'type' parameter, and remove
6366 the 'from_tty' parameter. Accept NULL TYPE.
6367 (info_osdata_command): New function.
6368 * osdata.h (info_osdata_command): Remove declaration.
6369 (info_osdata): New declaration.
6370
9f33b8b7
PA
63712017-04-05 Pedro Alves <palves@redhat.com>
6372
6373 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
6374 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
6375 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
6376 parameter.
6377 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
6378 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
6379 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
6380 parameter.
6381 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
6382 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
6383 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
6384 (mi_cmd_file_list_exec_source_files)
6385 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
6386 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6387 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
6388 parameter.
6389 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
6390 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
6391 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
6392 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
6393 (mi_cmd_stack_info_frame): Constify 'command' parameter.
6394 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
6395 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
6396 'command' parameter.
6397 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
6398 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
6399 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
6400 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
6401 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
6402 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
6403 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
6404 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
6405 (mi_cmd_var_set_update_range): Constify 'command' parameter.
6406 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
6407 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
6408 parameter.
6409 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
6410 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
6411 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
6412 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
6413 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
6414 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
6415 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
6416 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
6417 (mi_cmd_data_list_changed_registers)
6418 (mi_cmd_data_write_register_values)
6419 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
6420 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
6421 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
6422 (mi_cmd_list_features, mi_cmd_list_target_features)
6423 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
6424 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
6425 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
6426 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
6427 (mi_cmd_trace_frame_collected): Constify 'command'
6428 parameter.
6429 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
6430 'command' parameter.
6431
67cb5b2d
PA
64322017-04-05 Pedro Alves <palves@redhat.com>
6433
6434 * ada-lang.c (ada_completer_word_break_characters): Now a const
6435 array.
6436 (ada_get_gdb_completer_word_break_characters): Constify.
6437 * completer.c (gdb_completer_command_word_break_characters)
6438 (gdb_completer_file_name_break_characters)
6439 (gdb_completer_quote_characters): Now const arrays.
6440 (get_gdb_completer_quote_characters): Constify.
6441 (set_rl_completer_word_break_characters): New function.
6442 (set_gdb_completion_word_break_characters)
6443 (complete_line_internal): Use it.
6444 * completer.h (get_gdb_completer_quote_characters): Constify.
6445 (set_rl_completer_word_break_characters): Declare.
6446 * f-lang.c (f_word_break_characters): Constify.
6447 * language.c (default_word_break_characters): Constify.
6448 * language.h (language_defn::la_word_break_characters): Constify.
6449 (default_word_break_characters): Constify.
6450 * top.c (init_main): Use set_rl_completer_word_break_characters.
6451
7a114964
PA
64522017-04-05 Pedro Alves <palves@redhat.com>
6453
6454 * aix-thread.c (aix_thread_pid_to_str)
6455 (aix_thread_extra_thread_info): Constify.
6456 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
6457 * bsd-uthread.c (bsd_uthread_extra_thread_info)
6458 (bsd_uthread_pid_to_str): Constify.
6459 * corelow.c (core_pid_to_str): Constify.
6460 * darwin-nat.c (darwin_pid_to_str): Constify.
6461 * fbsd-nat.c (fbsd_pid_to_str): Constify.
6462 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
6463 Constify.
6464 * gnu-nat.c (gnu_pid_to_str): Constify.
6465 * go32-nat.c (go32_pid_to_str): Constify.
6466 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
6467 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
6468 * inferior.c (inferior_pid_to_str): Constify.
6469 * linux-nat.c (linux_nat_pid_to_str): Constify.
6470 * linux-tdep.c (linux_core_pid_to_str): Constify.
6471 * linux-thread-db.c (thread_db_pid_to_str)
6472 (thread_db_extra_thread_info): Constify.
6473 * nto-tdep.c (nto_extra_thread_info): Constify.
6474 * nto-tdep.h (nto_extra_thread_info): Constify.
6475 * obsd-nat.c (obsd_pid_to_str): Constify.
6476 * procfs.c (procfs_pid_to_str): Constify.
6477 * ravenscar-thread.c (ravenscar_extra_thread_info)
6478 (ravenscar_pid_to_str): Constify.
6479 * remote-sim.c (gdbsim_pid_to_str): Constify.
6480 * remote.c (remote_threads_extra_info, remote_pid_to_str):
6481 Constify.
6482 * sol-thread.c (solaris_pid_to_str): Constify.
6483 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
6484 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
6485 * target.c (default_pid_to_str, target_pid_to_str)
6486 (normal_pid_to_str, default_pid_to_str): Constify.
6487 * target.h (target_ops::to_pid_to_str)
6488 (target_ops::to_extra_thread_info): Constify.
6489 (target_pid_to_str, normal_pid_to_str): Constify.
6490 * windows-nat.c (windows_pid_to_str): Constify.
6491 * gdbarch.sh (core_pid_to_str): Constify.
6492 * target-delegates.c: Regenerate.
6493 * gdbarch.h, gdbarch.c: Regenerate.
6494
69bbf465
PA
64952017-04-05 Pedro Alves <palves@redhat.com>
6496
6497 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
6498 the memory of the temporary warning_pre_print override.
6499 * utils.c (warning_pre_print): Constify.
6500 * utils.h (warning_pre_print): Constify.
6501
be47f9e8
PA
65022017-04-05 Pedro Alves <palves@redhat.com>
6503
6504 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
6505 (shell_command): New function.
6506 (make_command): Use std::string.
6507 (init_cli_cmds): Register shell_command instead of shell_escape.
6508
bde6261a
PA
65092017-04-05 Pedro Alves <palves@redhat.com>
6510
6511 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
6512 * tracepoint.c (default_collect): Don't initialize.
6513
b38ef47f
PA
65142017-04-05 Pedro Alves <palves@redhat.com>
6515
6516 * macroexp.c (macro_buffer::shared): Now a bool.
6517 (init_buffer): Update.
6518 (init_shared_buffer): Constify 'addr' parameter.
6519 (substitute_args, expand, macro_expand, macro_expand_next): Remove
6520 casts.
6521
f995bbe8
PA
65222017-04-05 Pedro Alves <palves@redhat.com>
6523
6524 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
6525 * disasm.c (set_disassembler_options): Constify local.
6526 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
6527
4a596fe2
SDJ
65282017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
6529
6530 PR gdb/21352
6531 * tracefile.c (tsave_command): Fix argument parsing for '-r'
6532 option.
6533
2cad08ea
YQ
65342017-04-05 Yao Qi <yao.qi@linaro.org>
6535
6536 * frame.c (frame_unwind_register_unsigned): Call
6537 frame_unwind_register_value.
6538
55a98976
YQ
65392017-04-05 Yao Qi <yao.qi@linaro.org>
6540
6541 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
6542 Use gdb_test_multiple, and don't match anchor.
6543
4ac40124
PA
65442017-04-05 Pedro Alves <palves@redhat.com>
6545
6546 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
6547 (Write After Approval): Remove Simon Marchi.
6548
c053b654
PA
65492017-04-05 Pedro Alves <palves@redhat.com>
6550
6551 * common/gdb_optional.h (optional::optional): Make constexpr and
6552 initialize m_dummy.
6553
4c7bf4f9
JB
65542017-04-04 John Baldwin <jhb@FreeBSD.org>
6555
6556 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6557 (amd64fbsd_jmp_buf_reg_offset): Remove.
6558 (amd64fbsd_supply_uthread): Remove function.
6559 (amd64fbsd_collect_uthread): Remove function.
6560 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
6561 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
6562 (x86_64-*-freebsd*): Remove bsd-uthread.o.
6563 (fbsd-nat.c): Update comment.
6564 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6565 (i386fbsd_jmp_buf_reg_offset): Remove.
6566 (i386fbsd_supply_uthread): Remove function.
6567 (i386fbsd_collect_uthread): Remove function.
6568 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
6569
1e1a8bef
JB
65702017-04-04 John Baldwin <jhb@FreeBSD.org>
6571
6572 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
6573 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
6574 * NEWS: Mention that support for FreeBSD/alpha was removed.
6575 * alpha-fbsd-tdep.c: Delete file.
6576 * config/alpha/fbsd.mh: Delete file.
6577 * configure.host: Delete alpha*-*-freebsd* and
6578 alpha*-*-kfreebsd*-gnu.
6579 * configure.tgt: Delete alpha*-*-freebsd* and
6580 alpha*-*-kfreebsd*-gnu.
6581
49907934
JB
65822017-04-04 John Baldwin <jhb@FreeBSD.org>
6583
6584 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
6585 amd64bsd_store_inferior_registers): Use ptid from regcache.
6586
6f77053d
PA
65872017-04-04 Pedro Alves <palves@redhat.com>
6588
6589 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
6590 data fields, make them private and add "m_" prefixes.
6591 (lnp_state_machine::lnp_state_machine): New ctor.
6592 (record_line, check_line_address, handle_set_discriminator)
6593 (handle_set_address, handle_advance_pc, handle_special_opcode)
6594 (handle_advance_line, handle_set_file, handle_negate_stmt)
6595 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
6596 (end_sequence, advance_line): New methods.
6597 (m_gdbarch, m_record_lines_p): New fields.
6598 (lnp_reader_state): Delete.
6599 (dwarf_record_line): Rename to ...
6600 (lnp_state_machine::record_line): ... adjust.
6601 (init_lnp_state_machine): Delete.
6602 (lnp_state_machine::lnp_state_machine): New.
6603 (check_line_address): Rename to ...
6604 (lnp_state_machine::check_line_address): This.
6605 (dwarf_decode_lines_1): Remove reference to "reader_state".
6606 Adjust lnp_state_machine having a non-default ctor. Use bool.
6607 State machine internal state manipulation moved to
6608 lnp_state_machine methods.
6609
9c541725
PA
66102017-04-04 Pedro Alves <palves@redhat.com>
6611
6612 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6613 unittests/offset-type-selftests.c.
6614 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
6615 * common/offset-type.h: New file.
6616 * common/preprocessor.h: New file.
6617 * common/traits.h: New file.
6618 * common/valid-expr.h: New file.
6619 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
6620 sect_offset and cu_offset strong typedefs throughout.
6621 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
6622 typedefs throughout.
6623 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
6624 sect_offset and cu_offset strong typedefs throughout.
6625 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
6626 typedefs throughout.
6627 * gdbtypes.h: Include "common/offset-type.h".
6628 (cu_offset): Now an offset type (strong typedef) instead of a
6629 struct.
6630 (sect_offset): Likewise.
6631 (union call_site_parameter_u): Rename "param_offset" field to
6632 "param_cu_off".
6633 * unittests/offset-type-selftests.c: New file.
6634
ecfb656c
PA
66352017-04-04 Pedro Alves <palves@redhat.com>
6636
6637 * common/underlying.h: New file.
6638 * dwarf2read.c: Include "common/gdb_optional.h" and
6639 "common/underlying.h".
6640 (dir_index, file_name_index): New types.
6641 (file_entry): Use them.
6642 (file_entry::include): Use to_underlying.
6643 (line_header::add_file_name): Use dir_index.
6644 (read_formatted_entries): Use gdb::optional. Read form before
6645 writting to file_entry.
6646 (dwarf_decode_line_header): Use dir_index.
6647 (lnp_state_machine::current_file): Use to_underlying.
6648 (lnp_state_machine::file): Change type to file_name_index.
6649 (dwarf_record_line): Use to_underlying.
6650 (init_lnp_state_machine): Use file_name_index.
6651 (dwarf_decode_lines_1): Use dir_index and file_name_index.
6652
d194f1fe
PA
66532017-04-04 Pedro Alves <palves@redhat.com>
6654
6655 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
6656 operator bool, has_value and get methods.
6657
fff8551c
PA
66582017-04-04 Pedro Alves <palves@redhat.com>
6659
6660 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
6661 fields.
6662 (line_header): Initialize all data fields. Change type of
6663 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
6664 Change type of include_dirs to std::vector<const char *>. Remove
6665 num_include_dirs, include_dirs_size. Change type of file_names to
6666 std::vector<file_entry>. Remove num_file_names, file_names_size.
6667 (line_header::line_header): New.
6668 (line_header::add_include_dir, line_header::add_file_name): New
6669 methods.
6670 (line_header::include_dir_at): Remove NULL check.
6671 (line_header::file_name_at): Add const overload.
6672 (line_header_up): New unique_ptr typedef.
6673 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
6674 std::vector. Remove free_line_header call.
6675 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
6676 free_line_header call.
6677 (free_cu_line_header): Delete.
6678 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
6679 (setup_type_unit_groups): Use line_header_up instead of cleanups.
6680 Adjust to use std::vector.
6681 (free_line_header): Delete.
6682 (free_line_header_voidp): Use delete.
6683 (add_include_dir): Replace with ...
6684 (line_header::add_include_dir): ... this method. Use std::vector.
6685 (add_file_name): Replace with ...
6686 (line_header::add_file_name): ... this method. Use std::vector.
6687 (add_include_dir_stub): Delete.
6688 (read_formatted_entries): Remove memset.
6689 (dwarf_decode_line_header): Return a line_header_up instead of a
6690 raw pointer. Remove cleanup handling. Pass lambdas to
6691 read_formatted_entries. Adjust to use line_header methods.
6692 (dwarf_decode_lines_1): Adjust to use line_header methods.
6693 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
6694 use std::vector.
6695
d62a8ae2
SM
66962017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
6697
6698 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
6699 instead of struct ptid.
6700
db3a1dc7
AH
67012017-05-04 Alan Hayward <alan.hayward@arm.com>
6702
6703 * frame.c (get_frame_register_bytes): Unwind using value.
6704 (put_frame_register_bytes): Likewise.
6705
b1b45502
IB
67062017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
6707
6708 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
6709 aggregate-like.
6710
ec13808e
JK
67112017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
6712
6713 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
6714
12316564
YQ
67152017-03-29 Yao Qi <yao.qi@linaro.org>
6716
6717 * gdbthread.h (struct thread_info): Declare constructor and
6718 destructor. Add some in-class member initializers.
6719 * thread.c (free_thread): Remove.
6720 (init_thread_list): Call delete instead of free_thread.
6721 (new_thread): Call thread_info constructor.
6722 (thread_info::thread_info): New function.
6723 (thread_info::~thread_info): New function.
6724 (delete_thread_1): Call delete instead of free_thread.
6725 (make_cleanup_restore_current_thread): Move tp and frame to
6726 inner block.
6727
fe5f7374
AK
67282017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6729
6730 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
6731 (arc_skip_prologue): Likewise.
6732 (arc_make_frame_cache): Likewise.
6733 (arc_pv_get_operand): New function.
6734 (arc_is_in_prologue): Likewise.
6735 (arc_analyze_prologue): Likewise.
6736 (arc_print_frame_cache): Likewise.
6737 (MAX_PROLOGUE_LENGTH): New constant.
6738
eea78757
AK
67392017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6740
6741 * configure.tgt: Add arc-insn.o.
6742 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
6743 (dump_arc_instruction_command): New function.
6744 (arc_fprintf_disasm): Likewise.
6745 (arc_disassemble_info): Likewise.
6746 (arc_insn_get_operand_value): Likewise.
6747 (arc_insn_get_operand_value_signed): Likewise.
6748 (arc_insn_get_memory_base_reg): Likewise.
6749 (arc_insn_get_memory_offset): Likewise.
6750 (arc_insn_get_branch_target): Likewise.
6751 (arc_insn_dump): Likewise.
6752 (arc_insn_get_linear_next_pc): Likewise.
6753 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
6754 (arc_disassemble_info): Likewise.
6755 (arc_insn_get_branch_target): Likewise.
6756 (arc_insn_get_linear_next_pc): Likewise.
6757 * NEWS: Mention new "maint print arc arc-instruction".
6758
3be78afd
AK
67592017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6760
6761 * arc-tdep (maintenance_print_arc_list): New variable.
6762 (maintenance_print_arc_command): New function.
6763
296ec4fa
AK
67642017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6765
6766 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
6767 Add "limm" and "reserved".
6768 (arc_cannot_fetch_register, arc_cannot_store_register): Add
6769 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
6770 * arc-tdep.h (arc_regnum): Likewise.
6771
f74f865e
MF
67722017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6773
6774 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6775 for THREADPTR register.
6776 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
6777 register.
6778 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
6779 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
6780 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
6781
0d0bf81a
MF
67822017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6783
6784 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
6785 registers above gdbarch_num_regs (gdbarch) as privileged in
6786 call0 ABI.
6787
0ce4291e
MF
67882017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6789
6790 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6791 for a single specified register or for all registers in
6792 a0_base..a0_base + C0_NREGS range.
6793 (supply_gregset_reg): Call regcache_raw_supply for a single
6794 specified register or for all registers in a0_base..a0_base +
6795 C0_NREGS range.
6796
c56054f9
MF
67972017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6798
6799 * arch/xtensa.h (C0_NREGS): Add definition.
6800 * xtensa-tdep.c (C0_NREGS): Remove definition.
6801
a4398628
MF
68022017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6803
6804 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
6805 Drop xtensa_default_isa initialization.
6806 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
6807
8c43009f
PA
68082017-03-27 Pedro Alves <palves@redhat.com>
6809
6810 * dwarf2read.c (file_entry) <dir_index>: Add comment.
6811 (file_entry::include_dir): New method.
6812 (line_header::include_dir_at, line_header::file_name_at): New
6813 methods.
6814 (setup_type_unit_groups, setup_type_unit_groups)
6815 (psymtab_include_file_name): Simplify using the new methods.
6816 (lnp_state_machine) <the_line_header>: New field.
6817 <file>: Add comment.
6818 (lnp_state_machine::current_file): New method.
6819 (dwarf_record_line): Simplify using the new methods.
6820 (init_lnp_state_machine): Initialize the "the_line_header" field.
6821 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
6822 Simplify using the new methods.
6823
a7e80b9e
PA
68242017-03-27 Pedro Alves <palves@redhat.com>
6825
6826 * cp-name-parser.y (make_empty): Delete.
6827 (demangler_special, nested_name, ptr_operator, array_indicator)
6828 (direct_declarator, declarator_1): Use fill_comp instead of
6829 make_empty.
6830
21047726
PA
68312017-03-27 Pedro Alves <palves@redhat.com>
6832
6833 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
6834 to ATTRIBUTE_PRINTF.
6835 * solib-target.c (library_list_start_list): Print "string" not
6836 "version".
6837 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
6838 gdb_xml_error call.
6839
d721ba37
PA
68402017-03-27 Pedro Alves <palves@redhat.com>
6841
6842 * dwarf2read.c (struct file_and_directory): New.
6843 (dwarf2_get_dwz_file): Adjust to use std::string.
6844 (dw2_get_file_names_reader): Adjust to use file_and_directory.
6845 (find_file_and_directory): Adjust to return a file_and_directory
6846 object.
6847 (read_file_scope): Adjust to use file_and_directory. Remove
6848 make_cleanup/do_cleanups calls.
6849 (open_and_init_dwp_file): Adjust to use std::string. Remove
6850 make_cleanup/do_cleanups calls.
6851 * python/python.c (do_start_initialization): Adjust to ldirname
6852 returning a std::string.
6853 * utils.c (ldirname): Now returns a std::string.
6854 * utils.h (ldirname): Change return type to std::string.
6855 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
6856 returning a std::string.
6857 * xml-tdesc.c (file_read_description_xml): Likewise.
6858
ed771251
AH
68592017-03-24 Alan Hayward <alan.hayward@arm.com>
6860
6861 * regcache.c (regcache_debug_print_register): New function.
6862 * regcache.h (regcache_debug_print_register): New declaration.
6863 * target.c (debug_print_register): Remove.
6864 (target_fetch_registers): Call regcache_debug_print_register.
6865 (target_store_registers): Likewise.
6866
568c1b9f
PB
68672017-03-24 Pádraig Brady <pbrady@fb.com>
6868
6869 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
6870 reference beyond the 'lh->include_dirs' array before accessing to
6871 it.
6872 (psymtab_include_file_name): Likewise.
6873 (dwarf_decode_lines_1): Likewise.
6874 (dwarf_decode_lines): Likewise.
6875 (file_file_name): Likewise.
6876
3e00d44f
SM
68772017-03-23 Simon Marchi <simon.marchi@ericsson.com>
6878
6879 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
6880 inferior_ptid.
6881 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
6882 ps_lsetfpregs): Likewise.
6883 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
6884 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
6885 ps_lsetfpregs): Likewise.
6886 * target.c (target_fetch_registers, target_store_registers):
6887 Remove asserts.
6888
077ae656
AH
68892017-03-23 Alan Hayward <alan.hayward@arm.com>
6890
6891 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
6892
1e2b521d
YQ
68932017-03-23 Yao Qi <yao.qi@linaro.org>
6894
6895 * aarch64-tdep.c (aarch64_process_record_test): Declare.
6896 (_initialize_aarch64_tdep): Register it.
6897 (aarch64_record_load_store): Handle PRFM instruction.
6898 (aarch64_process_record_test): New function.
6899
33877125
YQ
69002017-03-23 Yao Qi <yao.qi@linaro.org>
6901
6902 * aarch64-tdep.c (aarch64_record_load_store): Fix code
6903 indentation.
6904
a0eef940
YQ
69052017-03-23 Yao Qi <yao.qi@linaro.org>
6906
6907 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
6908
3f2a3564
PR
69092017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6910
6911 python/python.c (do_start_initialization): Fix memory leak.
6912
b67aeab0
SM
69132017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6914
6915 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
6916 using get_ptrace_pid.
6917 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
6918 inferior_ptid.
6919 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
6920 inferior_ptid instead of pid.
6921
ffdbe864
YQ
69222017-03-22 Yao Qi <yao.qi@linaro.org>
6923
6924 * aarch64-tdep.c: Wrap locally used classes in anonymous
6925 namespace.
6926 * arm-tdep.c: Likewise.
6927 * linespec.c: Likewise.
6928 * ui-out.c: Likewise.
6929
9d736fbf
JG
69302017-03-22 Jonah Graham <jonah@kichwacoders.com>
6931
6932 PR gdb/19637
6933 * python/lib/gdb/printer/bound_registers.py: Import sys.
6934
3de88e9a
SM
69352017-03-21 Simon Marchi <simon.marchi@ericsson.com>
6936
6937 * windows-nat.c (do_windows_fetch_inferior_registers): Add
6938 windows_thread_info parameter and use it instead of
6939 current_thread.
6940 (windows_fetch_inferior_registers): Don't set current_thread,
6941 pass the thread to do_windows_fetch_inferior_registers. Use
6942 ptid from regcache instead of inferior_ptid.
6943 (do_windows_store_inferior_registers): Add windows_thread_info
6944 parameter and use it instead of current_thread.
6945 (windows_store_inferior_registers): Don't set current_thread,
6946 pass the thread to do_windows_store_inferior_registers. Use
6947 ptid from regcache instead of inferior_ptid.
6948
0e7b8f61
SM
69492017-03-21 Simon Marchi <simon.marchi@ericsson.com>
6950
6951 * ser-mingw.c (ser_windows_raw): Remove reference to
6952 struct serial::current_timeout.
6953
5badf10a
IR
69542017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
6955
6956 PR tdep/20928
6957 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
6958 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
6959 (sparc64_fsr_type): Fix %fsr decoding.
6960
cee59b3f
TW
69612017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
6962
6963 * python/py-record-btrace.c (btpy_insn_data): Change return type
6964 for Python 2.
6965
639a9038
SM
69662017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
6967
6968 * spu-linux-nat.c (spu_fetch_inferior_registers,
6969 spu_store_inferior_registers): Use ptid from regcache, set and
6970 restore inferior_ptid.
6971 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
6972 Likewise.
6973
bcc0c096
SM
69742017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
6975
6976 * i386-linux-nat.c (fetch_register, store_register,
6977 i386_linux_fetch_inferior_registers,
6978 i386_linux_store_inferior_registers): Use ptid from regcache.
6979 * ia64-linux-nat.c (ia64_linux_fetch_register,
6980 ia64_linux_store_register): Likewise.
6981 * inf-ptrace.c (inf_ptrace_fetch_register,
6982 inf_ptrace_store_register): Likewise.
6983 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
6984 m32r_linux_store_inferior_registers): Likewise.
6985 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
6986 m68kbsd_store_inferior_registers): Likewise.
6987 * m68k-linux-nat.c (fetch_register, store_register,
6988 m68k_linux_fetch_inferior_registers,
6989 m68k_linux_store_inferior_registers): Likewise.
6990 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
6991 m88kbsd_store_inferior_registers): Likewise.
6992 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
6993 mips_fbsd_store_inferior_registers): Likewise.
6994 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
6995 mips64_linux_regsets_store_registers): Likewise.
6996 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
6997 mipsnbsd_store_inferior_registers): Likewise.
6998 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
6999 mips64obsd_store_inferior_registers): Likewise.
7000 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
7001 Likewise.
7002 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
7003 ppcfbsd_store_inferior_registers): Likewise.
7004 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
7005 ppc_linux_store_inferior_registers): Likewise.
7006 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
7007 ppcnbsd_store_inferior_registers): Likewise.
7008 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
7009 ppcobsd_store_registers): Likewise.
7010 * procfs.c (procfs_fetch_registers, procfs_store_registers):
7011 Likewise.
7012 * ravenscar-thread.c (ravenscar_fetch_registers,
7013 ravenscar_store_registers, ravenscar_prepare_to_store):
7014 Likewise.
7015 * record-btrace.c (record_btrace_fetch_registers,
7016 record_btrace_store_registers, record_btrace_prepare_to_store):
7017 Likewise.
7018 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
7019 Lookup inferior using ptid from regcache, instead of
7020 current_inferior.
7021 * remote.c (remote_fetch_registers, remote_store_registers): Use
7022 ptid from regcache.
7023 * rs6000-nat.c (fetch_register, store_register): Likewise.
7024 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
7025 s390_linux_store_inferior_registers): Likewise.
7026 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
7027 shnbsd_store_inferior_registers): Likewise.
7028 * sol-thread.c (sol_thread_fetch_registers,
7029 sol_thread_store_registers): Likewise.
7030 * sparc-nat.c (sparc_fetch_inferior_registers,
7031 sparc_store_inferior_registers): Likewise.
7032 * tilegx-linux-nat.c (fetch_inferior_registers,
7033 store_inferior_registers): Likewise.
7034 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
7035 vaxbsd_store_inferior_registers): Likewise.
7036 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
7037 store_xtregs): Likewise.
7038
c0f55cc6
AV
70392017-03-20 Artemiy Volkov <artemiyv@acm.org>
7040
7041 PR gdb/14441
7042 * NEWS: Mention support for rvalue references in GDB and python.
7043 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
7044 supports both lvalue and rvalue references.
7045
15c0a2a9
AV
70462017-03-20 Artemiy Volkov <artemiyv@acm.org>
7047
7048 PR gdb/14441
7049 * gdbtypes.c (rank_one_type): Implement overloading
7050 resolution rules regarding rvalue references.
7051
aa006118
AV
70522017-03-20 Artemiy Volkov <artemiyv@acm.org>
7053
7054 PR gdb/14441
7055 * aarch64-tdep.c (aarch64_type_align)
7056 (aarch64_extract_return_value, aarch64_store_return_value): Change
7057 lvalue reference type checks to general reference type checks.
7058 * amd64-tdep.c (amd64_classify): Likewise.
7059 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
7060 Likewise.
7061 * arm-tdep.c (arm_type_align, arm_extract_return_value)
7062 (arm_store_return_value): Likewise.
7063 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
7064 * c-typeprint.c (c_print_type): Likewise.
7065 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
7066 (cplus_number_of_children, cplus_describe_child): Likewise.
7067 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
7068 * completer.c (expression_completer): Likewise.
7069 * cp-support.c (make_symbol_overload_list_adl_namespace):
7070 Likewise.
7071 * darwin-nat-info.c (info_mach_region_command): Likewise.
7072 * dwarf2loc.c (entry_data_value_coerce_ref)
7073 (value_of_dwarf_reg_entry): Likewise.
7074 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
7075 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
7076 Likewise.
7077 * findvar.c (extract_typed_address, store_typed_address):
7078 Likewise.
7079 * gdbtypes.c (rank_one_type): Likewise.
7080 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
7081 * infcall.c (value_arg_coerce): Likewise.
7082 * language.c (pointer_type): Likewise.
7083 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
7084 Likewise.
7085 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
7086 * mn10300-tdep.c (mn10300_type_align): Likewise.
7087 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
7088 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
7089 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
7090 Likewise.
7091 * printcmd.c (print_formatted, x_command): Likewise.
7092 * python/py-type.c (typy_get_composite, typy_template_argument):
7093 Likewise.
7094 * python/py-value.c (valpy_referenced_value)
7095 (valpy_get_dynamic_type, value_has_field): Likewise.
7096 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
7097 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
7098 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
7099 * spu-tdep.c (spu_scalar_value_p): Likewise.
7100 * symtab.c (lookup_symbol_aux): Likewise.
7101 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
7102 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
7103 Likewise.
7104 * valops.c (value_cast_pointers, value_cast)
7105 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
7106 (value_struct_elt, value_struct_elt_bitpos)
7107 (value_find_oload_method_list, find_overload_match)
7108 (value_rtti_indirect_type): Likewise.
7109 * valprint.c (val_print_scalar_type_p, generic_val_print):
7110 Likewise.
7111 * value.c (value_actual_type, value_as_address, unpack_long)
7112 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
7113 (coerce_ref): Likewise.
7114 * varobj.c (varobj_get_value_type): Likewise.
7115
3fcf899d
AV
71162017-03-20 Artemiy Volkov <artemiyv@acm.org>
7117
7118 PR gdb/14441
7119 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
7120 table of constants.
7121 * python/lib/gdb/command/explore.py: Support exploring values
7122 of rvalue reference types.
7123 * python/lib/gdb/types.py: Implement get_basic_type() for
7124 rvalue reference types.
7125 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
7126 constant.
7127 * python/py-value.c (valpy_getitem): Add an rvalue reference
7128 check.
7129 (valpy_reference_value): Add new parameter "refcode".
7130 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
7131 New wrappers for valpy_reference_value().
7132 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
7133 (gdbpy_invoke_xmethod): Likewise.
7134
4297a3f0
AV
71352017-03-20 Artemiy Volkov <artemiyv@acm.org>
7136
7137 PR gdb/14441
7138 * dwarf2read.c (process_die, read_type_die_1): Handle the
7139 DW_TAG_rvalue_reference_type DIE.
7140 (read_tag_reference_type): Add new parameter "refcode".
7141
e1cb3213
AV
71422017-03-20 Artemiy Volkov <artemiyv@acm.org>
7143
7144 PR gdb/14441
7145 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
7146 (c_type_print_modifier, c_type_print_varspec_suffix)
7147 (c_type_print_base): Support printing rvalue reference types.
7148 * c-valprint.c (c_val_print, c_value_print): Support printing
7149 rvalue reference values.
7150
e4347c89
AV
71512017-03-20 Artemiy Volkov <artemiyv@acm.org>
7152
7153 PR gdb/14441
7154 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
7155 typename.
7156 * cp-support.c (replace_typedefs): Handle
7157 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
7158 * python/py-type.c (typy_lookup_type): Likewise.
7159
53cc15f5
AV
71602017-03-20 Artemiy Volkov <artemiyv@acm.org>
7161
7162 PR gdb/14441
7163 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
7164 * parse.c (insert_type): Change assert statement.
7165 (follow_types): Handle rvalue reference types.
7166 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
7167 constant.
7168
a65cfae5
AV
71692017-03-20 Artemiy Volkov <artemiyv@acm.org>
7170
7171 PR gdb/14441
7172 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
7173 value_ref() interface.
7174 * c-valprint.c (c_value_print): Likewise.
7175 * infcall.c (value_arg_coerce): Likewise.
7176 * python/py-value.c (valpy_reference_value): Likewise.
7177 * valops.c (value_cast, value_reinterpret_cast)
7178 (value_dynamic_cast, typecmp): Likewise.
7179 (value_ref): Parameterize by kind of return value reference type.
7180 * value.h (value_ref): Add new parameter "refcode".
7181
3b224330
AV
71822017-03-20 Artemiy Volkov <artemiyv@acm.org>
7183
7184 PR gdb/14441
7185 * dwarf2read.c (read_tag_reference_type): Use
7186 lookup_lvalue_reference_type() instead of lookup_reference_type().
7187 * eval.c (evaluate_subexp_standard): Likewise.
7188 * f-exp.y: Likewise.
7189 * gdbtypes.c (make_reference_type, lookup_reference_type):
7190 Generalize with rvalue reference types.
7191 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
7192 convenience wrappers for lookup_reference_type().
7193 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
7194 reference kind parameter.
7195 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
7196 wrappers for lookup_reference_type().
7197 * guile/scm-type.c (gdbscm_type_reference): Use
7198 lookup_lvalue_reference_type() instead of lookup_reference_type().
7199 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
7200 * parse.c (follow_types): Likewise.
7201 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
7202 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
7203 Likewise.
7204 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
7205 (gdbpy_invoke_xmethod): Likewise.
7206 * stabsread.c: Provide extra argument to make_reference_type()
7207 call.
7208 * valops.c (value_ref, value_rtti_indirect_type): Use
7209 lookup_lvalue_reference_type() instead of lookup_reference_type().
7210
f9aeb8d4
AV
72112017-03-20 Artemiy Volkov <artemiyv@acm.org>
7212
7213 PR gdb/14441
7214 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
7215 (TYPE_IS_REFERENCE): New macro.
7216 (struct type): Add rvalue_reference_type field.
7217 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
7218
51457a05
MAL
72192017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
7220
7221 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
7222 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
7223 New function definition.
7224 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
7225 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
7226 New function declaration.
7227 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
7228 * mi/mi-interp.h: New file.
7229 * solib.c (info_sharedlibrary_command): Replace for loop with
7230 ALL_SO_LIBS macro
7231 * solib.h (update_solib_list): New function declaration.
7232 (so_list_head): Move macro.
7233 * solist.h (ALL_SO_LIBS): New macro.
7234
e696b3ad
MAL
72352017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
7236
7237 * infcmd.c (post_create_inferior): Remove unused argument in
7238 call to solib_add.
7239 * remote.c (remote_start_remote): Likewise.
7240 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
7241 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
7242 (enable_break): Likewise.
7243 * solib.c (update_solib_list): Remove unused target argument
7244 and its documentation.
7245 (solib_add): Remove unused target argument. Remove unused
7246 argument in call to update_solib_list.
7247 (info_sharedlibrary_command): Remove unused argument in call
7248 to update_solib_list.
7249 (sharedlibrary_command): Remove unused argument in call to
7250 solib_add.
7251 (handle_solib_event): Likewise.
7252 (reload_shared_libraries): Likewise.
7253 * solib.h (solib_add): Remove unused target argument.
7254
dcb84eda
AA
72552017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
7256
7257 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
7258 (s390_displaced_step_fixup): Cover relative branches with the
7259 default fixup handling. This fixes lack of support for some
7260 relative branch instructions.
7261
d9cb6cdc
SM
72622017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7263
7264 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
7265 ptid from regcache.
7266
1afaf9f4
SM
72672017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7268
7269 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
7270 i386_darwin_store_inferior_registers): Use ptid from regcache.
7271
aac12e24
SM
72722017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7273
7274 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
7275 i386bsd_store_inferior_registers): Use ptid from regcache.
7276
bbe1eef1
SM
72772017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7278
7279 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
7280 hppaobsd_store_registers): Use ptid from regcache.
7281
10799020
SM
72822017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7283
7284 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
7285 hppanbsd_store_registers): Use ptid from regcache.
7286
00204cf7
SM
72872017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7288
7289 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
7290 from regcache. Use get_ptrace_pid.
7291
11a33714
SM
72922017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7293
7294 * corelow.c (get_core_register_section): Use ptid from regcache,
7295 update doc.
7296
317cd492
SM
72972017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7298
7299 * bsd-uthread.c (bsd_uthread_fetch_registers,
7300 bsd_uthread_store_registers): Use ptid from regcache, set and
7301 restore inferior_ptid.
7302
9ac8a7c2
SM
73032017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7304
7305 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
7306 fetch_fp_regs, store_register, store_regs, store_fp_register,
7307 store_fp_regs): Use ptid from regcache.
7308
4ac4bb6a
SM
73092017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
7310
7311 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
7312 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
7313 store_vfp_regs): Use ptid from regcache.
7314
9bcbdca8
PA
73152017-03-17 Pedro Alves <palves@redhat.com>
7316
7317 PR remote/21188
7318 * ser-base.c (ser_base_wait_for): Add comment.
7319 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
7320 version.
7321 * ser-unix.c (hardwire_raw): Remove reference to
7322 scb->current_timeout.
7323 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
7324 (hardwire_ops): Install ser_base_readchar instead of
7325 hardwire_readchar.
7326 * serial.h (struct serial) <current_timeout, timeout_remaining>:
7327 Remove fields.
7328
7503099f
JG
73292017-03-17 Jonah Graham <jonah@kichwacoders.com>
7330
7331 PR gdb/19637
7332 * python/lib/gdb/printer/bound_registers.py: Add support for
7333 Python 3.
7334
7942e96e
AA
73352017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7336
7337 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
7338 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
7339 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
7340 byte_offset to subobj_byte_offset. Fix the handling of
7341 DWARF_VALUE_STACK on big-endian targets when coming via an
7342 implicit pointer.
7343 (dwarf2_evaluate_loc_desc): Adjust call to
7344 dwarf2_evaluate_loc_desc_full.
7345 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
7346 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
7347
ba14f379
YQ
73482017-03-16 Yao Qi <yao.qi@linaro.org>
7349
7350 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
7351 and REVSH instructions.
7352
b121eeb9
YQ
73532017-03-16 Yao Qi <yao.qi@linaro.org>
7354
7355 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
7356 (arm_record_test): Declare.
7357 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
7358 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
7359 align with the manual.
7360 (thumb_record_misc): Adjust the code order to align with the
7361 manual.
7362 (thumb2_record_decode_insn_handler): Fix instruction matching.
7363 (instruction_reader_thumb): New class.
7364 (arm_record_test): New function.
7365
728a7913
YQ
73662017-03-16 Yao Qi <yao.qi@linaro.org>
7367
7368 * arm-tdep.c (abstract_memory_reader): New class.
7369 (instruction_reader): New class.
7370 (extract_arm_insn): Add argument 'reader'. Callers updated.
7371 (decode_insn): Likewise.
7372
34b43320
DE
73732017-03-16 Doug Evans <dje@google.com>
7374
a7c0469f
DE
7375 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
7376 member. Change type of TYPE member to SCM. All uses updated.
7377 (lsscm_make_lazy_string_smob): Add assert.
7378 (lsscm_make_lazy_string): Flag bad length values.
7379 (lsscm_elt_type): New function.
7380 (gdbscm_lazy_string_to_value): Rewrite to use
7381 lsscm_safe_lazy_string_to_value.
7382 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
7383 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
7384 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
7385 in incoming type.
7386 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
7387 * guile/scm-type.c (tyscm_scm_to_type): New function.
7388
73892017-03-15 Doug Evans <dje@google.com>
7390
34b43320
DE
7391 PR python/17728, python/18439, python/18779
7392 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
7393 member. Change type of TYPE member to PyObject *. All uses updated.
7394 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
7395 (gdbpy_create_lazy_string_object): Flag bad length values.
7396 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
7397 Handle typedefs in incoming type.
7398 (stpy_lazy_string_elt_type): New function.
7399 (gdbpy_extract_lazy_string): Call it.
7400 * python/py-value.c (valpy_lazy_string): Flag bad length values.
7401 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
7402 typedefs in incoming type.
7403
a3a5fecc
DE
74042017-03-16 Doug Evans <dje@google.com>
7405
7406 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
7407 * guile/scm-type.c (tyscm_scm_to_type): New function.
7408
28f1c605
JW
74092017-03-16 Jiong Wang <jiong.wang@arm.com>
7410
7411 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
7412 "ULONGEST" for "skip".
7413
87c336f6
AA
74142017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
7415
7416 PR gdb/21220
7417 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
7418 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
7419 (inf_ptrace_peek_poke): ...here. New function. Now also loop
7420 over ptrace peek/poke until end of buffer or error.
7421
cf81cf60
SM
74222017-03-14 Simon Marchi <simon.marchi@ericsson.com>
7423
7424 * parse.c (length_of_subexp): Make static.
7425 * parser-defs.h (length_of_subexp): Remove.
7426
a379284a
AA
74272017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
7428
7429 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
7430 as well.
7431
8a6200ba
PA
74322017-03-14 Pedro Alves <palves@redhat.com>
7433
7434 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
7435 (main): Use std::unique_ptr. Remove calls to
7436 cp_demangled_name_parse_free.
7437
f79ec206
SM
74382017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7439
7440 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
7441 alphabsd_store_inferior_registers): Use regcache->ptid instead
7442 of inferior_ptid.
7443
edb5fb00
SM
74442017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7445
7446 * aix-thread.c (aix_thread_fetch_registers,
7447 aix_thread_store_registers): Use regcache->ptid instead of
7448 inferior_ptid.
7449
55119686
SM
74502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7451
7452 * aarch64-linux-nat.c (fetch_gregs_from_thread,
7453 store_gregs_to_thread, fetch_fpregs_from_thread,
7454 store_fpregs_to_thread): Use regcache->ptid instead of
7455 inferior_ptid.
7456
6a06fbb7
SM
74572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7458
7459 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
7460 amd64_linux_fetch_inferior_registers): Use regcache->ptid
7461 instead of inferior_ptid.
7462
c6386875
SM
74632017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7464
7465 * target.c (target_fetch_registers, target_store_registers): Add
7466 assert.
7467
ddaaf0fb
SM
74682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7469
7470 * regcache.h (regcache_get_ptid): New function.
7471 * regcache.c (regcache_get_ptid): New function.
7472
b9da89d1 74732017-03-13 Mark Wielaard <mark@klomp.org>
7474
7475 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
7476
5f4d1085
KS
74772017-03-10 Keith Seitz <keiths@redhat.com>
7478
7479 PR c++/8218
7480 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
7481
c65d6b55
PA
74822017-03-08 Pedro Alves <palves@redhat.com>
7483
7484 PR gdb/18360
7485 * infrun.c (start_step_over, do_target_resume, resume)
7486 (restart_threads): Assert we're not resuming a thread that is
7487 meant to be stopped.
7488 (infrun_thread_stop_requested_callback): Delete.
7489 (infrun_thread_stop_requested): If the thread is internally
7490 stopped, queue a pending stop event and clear the thread's
7491 inline-frame state.
7492 (handle_stop_requested): New function.
7493 (handle_syscall_event, handle_inferior_event_1): Use
7494 handle_stop_requested.
7495 (handle_stop_requested): New function.
7496 (handle_signal_stop): Set the thread's stop_signal here instead of
7497 at caller.
7498 (finish_step_over): Clear step over info unconditionally.
7499 (handle_signal_stop): If the user had interrupted the event
7500 thread, consider the stop a random signal.
7501 (handle_signal_stop) <signal arrived while stepping over
7502 breakpoint>: Don't restart threads here.
7503 (stop_waiting): Don't clear step-over info here.
7504
15c22686
PA
75052017-03-08 Pedro Alves <palves@redhat.com>
7506
7507 PR 21206
7508 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
7509 goes to argument 2, not 1.
7510
6e5d74e7
PA
75112017-03-08 Pedro Alves <palves@redhat.com>
7512
7513 PR cli/21218
7514 * top.c (gdb_readline_wrapper): Avoid passing NULL to
7515 display_gdb_prompt.
7516 (command_line_input): Add comment.
7517
9753a2f6
PA
75182017-03-08 Pedro Alves <palves@redhat.com>
7519
7520 PR tui/21216
7521 * tui/tui-file.c (tui_file::write): New.
7522 * tui/tui-file.h (tui_file): Override "write".
7523 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
7524 factored out from ...
7525 (tui_puts): ... here.
7526 (tui_putc): Use them.
7527 (tui_write): New function.
7528 * tui/tui-io.h (tui_write): Declare.
7529
1672e0d9
SDJ
75302017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7531
7532 * Makefile.in (SFILES): Replace "environ.c" with
7533 "common/environ.c".
7534 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
7535 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
7536 to...
7537 * common/environ.c: ... here.
7538 * environ.h: Moved to...
7539 * common/environ.h: ... here.
7540
f7bb4e3a
PB
75412017-03-07 Peter Bergner <bergner@vnet.ibm.com>
7542
7543 * gdbarch.sh (pstring_ptr): New static function.
7544 (gdbarch_disassembler_options): Use it.
7545 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
7546 not valid_disassembler_option->name.
7547 * gdbarch.c: Regenerate.
7548
e45ced6c
PB
75492017-03-07 Peter Bergner <bergner@vnet.ibm.com>
7550
7551 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
7552
5f6fd321
PA
75532017-03-07 Pedro Alves <palves@redhat.com>
7554
7555 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
7556
6dbb839a 75572017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
7558
7559 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
7560 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
7561 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 7562 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 7563
d274ecf4
SM
75642017-03-06 Simon Marchi <simon.marchi@ericsson.com>
7565
7566 * xtensa-linux-nat.c (fetch_gregs): Remove const.
7567
df97be55
SM
75682017-03-03 Simon Marchi <simon.marchi@ericsson.com>
7569
7570 * remote.c (remote_add_target_side_commands): Use range-based
7571 for loop.
7572
7d45f3df
YQ
75732017-03-03 Yao Qi <yao.qi@linaro.org>
7574
7575 PR gdb/21165
7576 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
7577 value is lazy.
7578 * valprint.c (common_val_print): Likewise.
7579
65b48a81
PB
75802017-02-28 Peter Bergner <bergner@vnet.ibm.com>
7581
7582 * NEWS: Mention new set/show disassembler-options commands.
7583 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
7584 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
7585 (prospective_options): New static variable.
7586 (gdb_disassembler::gdb_disassembler): Initialize
7587 m_di.disassembler_options.
7588 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
7589 (get_disassembler_options): New function.
7590 (set_disassembler_options): Likewise.
7591 (set_disassembler_options_sfunc): Likewise.
7592 (show_disassembler_options_sfunc): Likewise.
7593 (disassembler_options_completer): Likewise.
7594 (_initialize_disasm): Likewise.
7595 * disasm.h (get_disassembler_options): New prototype.
7596 (set_disassembler_options): Likewise.
7597 * gdbarch.sh (gdbarch_disassembler_options): New variable.
7598 (gdbarch_verify_disassembler_options): Likewise.
7599 * gdbarch.c: Regenerate.
7600 * gdbarch.h: Likewise.
7601 * arm-tdep.c (num_disassembly_options): Delete.
7602 (set_disassembly_style): Likewise.
7603 (arm_disassembler_options): New static variable.
7604 (set_disassembly_style_sfunc): Convert short style name into long
7605 option name. Call set_disassembler_options.
7606 (show_disassembly_style_sfunc): New function.
7607 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
7608 set_gdbarch_verify_disassembler_options.
7609 (_initialize_arm_tdep): Delete regnames variable and update callers.
7610 (arm_disassembler_options): Initialize.
7611 (disasm_options): New variable.
7612 (num_disassembly_options): Rename from this...
7613 (num_disassembly_styles): ...to this. Compute by scanning through
7614 disasm_options.
7615 (valid_disassembly_styles): Initialize using disasm_options.
7616 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
7617 set_arm_regname_option.
7618 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
7619 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
7620 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
7621 set_gdbarch_verify_disassembler_options.
7622 * s390-tdep.c (s390_disassembler_options): New static variable.
7623 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
7624 set_gdbarch_verify_disassembler_options.
7625
d538e36d
SM
76262017-02-27 Simon Marchi <simon.marchi@ericsson.com>
7627
7628 * remote.c (remote_add_target_side_condition): Remove "struct"
7629 keyword from range-based for loop.
7630
83621223
SM
76312017-02-27 Simon Marchi <simon.marchi@ericsson.com>
7632
7633 * remote.c (remote_add_target_side_condition): Use range-based
7634 for loop. Update comment.
7635
2123df0e
YQ
76362017-02-27 Yao Qi <yao.qi@linaro.org>
7637
7638 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
7639
8e368124
AH
76402017-02-26 Alan Hayward <alan.hayward@arm.com>
7641
7642 * regcache.c (regcache_raw_update): New function.
7643 (regcache_raw_read): Move code to regcache_raw_update.
7644 * regcache.h (regcache_raw_update): New declaration.
7645 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
7646
a49dd8dd
JK
76472017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
7648
7649 * dwarf2read.c (create_debug_type_hash_table): Initialize
7650 header.signature and header.type_offset_in_tu.
7651
34e4bae9
PA
76522017-02-24 Pedro Alves <palves@redhat.com>
7653
7654 * symtab.c (make_file_symbol_completion_list_1): Use
7655 add_symtab_completions.
7656
b0e4b369
AH
76572017-02-24 Alan Hayward <alan.hayward@arm.com>
7658
7659 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
7660
975c21ab
AH
76612017-02-24 Alan Hayward <alan.hayward@arm.com>
7662
7663 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
7664 I386_MAX_REGISTER_SIZE.
7665 (i386_pseudo_register_write): Likewise.
7666 (i386_process_record): Likewise.
7667 * i387-tdep.c (i387_supply_xsave): Likewise.
7668 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
7669 (store_register): Likewise.
7670
14bc53a8
PA
76712017-02-23 Pedro Alves <palves@redhat.com>
7672
7673 * ada-lang.c: Include "common/function-view.h".
7674 (ada_iterate_over_symbols): Adjust to use function_view as
7675 callback type.
7676 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
7677 (ada_make_symbol_completion_list): Use a lambda.
7678 (ada_exc_search_name_matches): Delete.
7679 (name_matches_regex): New.
7680 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
7681 * compile/compile-c-support.c: Include "common/function-view.h".
7682 (print_one_macro): Change prototype to accept a ui_file pointer.
7683 (write_macro_definitions): Use a lambda.
7684 * dwarf2read.c: Include "common/function-view.h".
7685 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
7686 (dw2_expand_symtabs_matching): Adjust to use function_view as
7687 callback type.
7688 * language.h: Include "common/function-view.h".
7689 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
7690 function_view as callback type.
7691 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
7692 * linespec.c: Include "common/function-view.h".
7693 (collect_info::add_symbol): New method.
7694 (struct symbol_and_data_callback, iterate_inline_only, struct
7695 symbol_matcher_data, iterate_name_matcher): Delete.
7696 (iterate_over_all_matching_symtabs): Adjust to use function_view
7697 as callback type and lambdas.
7698 (iterate_over_file_blocks): Adjust to use function_view as
7699 callback type.
7700 (decode_compound_collector): Now a class with private fields.
7701 (decode_compound_collector::release_symbols): New method.
7702 (collect_one_symbol): Rename to...
7703 (decode_compound_collector::operator()): ... this and adjust.
7704 (lookup_prefix_sym): decode_compound_collector construction bits
7705 move to decode_compound_collector ctor. Pass the
7706 decode_compound_collector object directly as callback. Remove
7707 cleanups and use decode_compound_collector::release_symbols
7708 instead.
7709 (symtab_collector): Now a class with private fields.
7710 (symtab_collector::release_symtabs): New method.
7711 (add_symtabs_to_list): Rename to...
7712 (symtab_collector::operator()): ... this and adjust.
7713 (collect_symtabs_from_filename): symtab_collector construction
7714 bits move to symtab_collector ctor. Pass the symtab_collector
7715 object directly as callback. Remove cleanups and use
7716 symtab_collector::release_symtabs instead.
7717 (collect_symbols): Delete.
7718 (add_matching_symbols_to_info): Use lambdas.
7719 * macrocmd.c (print_macro_callback): Delete.
7720 (info_macro_command): Use a lambda.
7721 (info_macros_command): Pass print_macro_definition as callable
7722 directly.
7723 (print_one_macro): Remove 'ignore' parameter.
7724 (macro_list_command): Adjust.
7725 * macrotab.c (macro_for_each_data::fn): Now a function_view.
7726 (macro_for_each_data::user_data): Delete field.
7727 (foreach_macro): Adjust to call the function_view.
7728 (macro_for_each): Adjust to use function_view as callback type.
7729 (foreach_macro_in_scope): Adjust to call the function_view.
7730 (macro_for_each_in_scope): Adjust to use function_view as callback
7731 type.
7732 * macrotab.h: Include "common/function-view.h".
7733 (macro_callback_fn): Declare a prototype instead of a pointer.
7734 Remove "user_data" parameter.
7735 (macro_for_each, macro_for_each_in_scope): Adjust to use
7736 function_view as callback type.
7737 * psymtab.c (partial_map_expand_apply)
7738 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
7739 Adjust to use function_view as callback type and to return bool.
7740 (psym_expand_symtabs_matching): Adjust to use function_view as
7741 callback types.
7742 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
7743 to use function_view as callback type and to return bool.
7744 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
7745 callback types.
7746 * symfile.c (expand_symtabs_matching): Adjust to use function_view
7747 as callback types.
7748 * symfile.h: Include "common/function-view.h".
7749 (expand_symtabs_file_matcher_ftype)
7750 (expand_symtabs_symbol_matcher_ftype)
7751 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
7752 return bool.
7753 (quick_symbol_functions::map_symtabs_matching_filename)
7754 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
7755 function_view as callback type and return bool.
7756 (expand_symtabs_matching): Adjust to use function_view as callback
7757 type.
7758 (maintenance_expand_name_matcher)
7759 (maintenance_expand_file_matcher): Delete.
7760 (maintenance_expand_symtabs): Use lambdas.
7761 * symtab.c (iterate_over_some_symtabs): Adjust to use
7762 function_view as callback types and return bool.
7763 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
7764 of a cleanup.
7765 (lookup_symtab_callback): Delete.
7766 (lookup_symtab): Use a lambda.
7767 (iterate_over_symbols): Adjust to use function_view as callback
7768 type.
7769 (struct search_symbols_data, search_symbols_file_matches)
7770 (search_symbols_name_matches): Delete.
7771 (search_symbols): Use a pair of lambdas.
7772 (struct add_name_data, add_macro_name, symbol_completion_matcher)
7773 (symtab_expansion_callback): Delete.
7774 (default_make_symbol_completion_list_break_on_1): Use lambdas.
7775 * symtab.h: Include "common/function-view.h".
7776 (iterate_over_some_symtabs): Adjust to use function_view as
7777 callback type and return bool.
7778 (iterate_over_symtabs): Adjust to use function_view as callback
7779 type.
7780 (symbol_found_callback_ftype): Remove 'data' parameter and return
7781 bool.
7782 (iterate_over_symbols): Adjust to use function_view as callback
7783 type.
7784
07e253aa
PA
77852017-02-23 Pedro Alves <palves@redhat.com>
7786
7787 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
7788 (%.o) <unittests/%.c>: New pattern.
7789 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
7790 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
7791 * common/function-view.h: New file.
7792 * unittests/function-view-selftests.c: New file.
7793 * configure: Regenerate.
7794
8eaf5320
SM
77952017-02-23 Simon Marchi <simon.marchi@ericsson.com>
7796
7797 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
7798 inferior_ptid.
7799 * go32-nat.c (go32_thread_alive): Likewise.
7800
38768751
YQ
78012017-02-23 Yao Qi <yao.qi@linaro.org>
7802
7803 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
7804 delete.
7805
0a8beaba
YQ
78062017-02-23 Yao Qi <yao.qi@linaro.org>
7807
7808 * varobj.c (varobj_clear_saved_item): Use delete instead of
7809 xfree.
7810 (update_dynamic_varobj_children): Likewise.
7811
58fdfd2c
JK
78122017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7813
7814 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
7815
1b90b139
SM
78162017-02-21 Simon Marchi <simon.marchi@ericsson.com>
7817
7818 * common/enum-flags.h (enum_flags::enum_flags): Initialize
7819 m_enum_value to 0 in default constructor.
7820
2039d74e
EBM
78212017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7822
7823 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
7824 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
7825 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
7826 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
7827 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
7828 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
7829 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
7830 IS_STORE_CONDITIONAL_INSN.
7831
7814882a
JK
78322017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7833
7834 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
7835
0ae60b63
JK
78362017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7837
7838 * NEWS (Changes since GDB 7.12): Add DWARF-5.
7839
0224619f
JK
78402017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7841
7842 * dwarf2read.c (skip_one_die, read_attribute_value)
7843 (dwarf2_const_value_attr, dump_die_shallow)
7844 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7845 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
7846
0af92d60
JK
78472017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7848
7849 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
7850 (dwarf_parse_macro_header): Accept DWARF version 5.
7851 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
7852
216f72a1
JK
78532017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7854
7855 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
7856 DW_AT_GNU_*.
7857 * common/common-exceptions.h (enum errors): Likewise.
7858 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
7859 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
7860 (dwarf_expr_context::execute_stack_op): Likewise.
7861 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
7862 Likewise.
7863 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
7864 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
7865 (show_entry_values_debug, call_site_to_target_addr)
7866 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
7867 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
7868 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
7869 (value_of_dwarf_block_entry, indirect_pieced_value)
7870 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
7871 (disassemble_dwarf_expression): Likewise.
7872 * dwarf2read.c (process_die, inherit_abstract_dies)
7873 (read_call_site_scope): Likewise.
7874 * gdbtypes.h (struct func_type, struct call_site_parameter)
7875 (struct call_site): Likewise.
7876 * stack.c (read_frame_arg): Likewise.
7877 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
7878
43988095
JK
78792017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7880
7881 * defs.h (read_unsigned_leb128): New declaration.
7882 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
7883 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
7884 (dwarf2_find_location_expression): Call also
7885 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
7886 * dwarf2loc.h (dwarf2_version): New declaration.
7887 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
7888 rnglists.
7889 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
7890 .debug_rnglists.
7891 (struct dwop_section_names): Add loclists_dwo.
7892 (dwop_section_names): Add .debug_loclists.dwo.
7893 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
7894 (struct dwarf2_per_cu_data): Add dwarf_version.
7895 (struct dwo_sections): Add loclists.
7896 (struct attr_abbrev): Add implicit_const.
7897 (read_indirect_line_string): New declaration.
7898 (read_unsigned_leb128): Delete declaration.
7899 (rcuh_kind): New definition.
7900 (read_and_check_comp_unit_head): Change parameter
7901 is_debug_types_section to section_kind.
7902 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
7903 (read_comp_unit_head): Change parameter abfd to section, add parameter
7904 section_kind. Handle DWARF-5.
7905 (error_check_comp_unit_head): Accept also DWARF version 5.
7906 (read_and_check_comp_unit_head): Change parameter
7907 is_debug_types_section to section_kind.
7908 (read_and_check_type_unit_head): Delete function.
7909 (read_abbrev_offset): Handle DWARF-5.
7910 (create_debug_type_hash_table): Add parameter section_kind. Process
7911 only DW_UT_type. Use signature and type_offset_in_tu from struct
7912 comp_unit_head.
7913 (create_debug_types_hash_table): Update create_debug_type_hash_table
7914 caller.
7915 (create_all_type_units): Call create_debug_type_hash_table.
7916 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
7917 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
7918 caller.
7919 (skip_one_die): Handle DW_FORM_implicit_const.
7920 (dwarf2_rnglists_process): New function.
7921 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
7922 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
7923 (read_attribute_value): Handle DW_FORM_implicit_const,
7924 DW_FORM_line_strp.
7925 (read_attribute): Handle DW_FORM_implicit_const.
7926 (read_indirect_string_at_offset_from): New function from
7927 read_indirect_string_at_offset.
7928 (read_indirect_string_at_offset): Call
7929 read_indirect_string_at_offset_from.
7930 (read_indirect_line_string_at_offset): New function.
7931 (read_indirect_string): New function comment.
7932 (read_indirect_line_string): New function.
7933 (read_unsigned_leb128): Make it global.
7934 (dwarf2_string_attr): Handle DWARF-5.
7935 (add_include_dir_stub, read_formatted_entries): New functions.
7936 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
7937 Handle DWARF-5.
7938 (per_cu_header_read_in): Update read_comp_unit_head caller.
7939 (dwarf2_version): New function.
7940 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
7941 rnglists.
7942 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
7943 fields.
7944
22d2f3ab
JK
79452017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7946
7947 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
7948
5f46c5a5
JK
79492017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7950
7951 * dwarf2read.c (dwarf2_ranges_process): New function from
7952 dwarf2_ranges_read.
7953 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
7954 dwarf2_ranges_process.
7955
78d4d2c5
JK
79562017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7957
7958 * dwarf2read.c (create_debug_type_hash_table): New function from
7959 create_debug_types_hash_table.
7960 (create_debug_types_hash_table): Call create_debug_type_hash_table.
7961 (create_all_type_units, open_and_init_dwo_file): Update
7962 create_debug_types_hash_table callers.
7963
1b076f25
SDJ
79642017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
7965
7966 PR gdb/16188
7967 * fork-child.c (trace_start_error): Fix thinko. va_end should
7968 refer to 'ap', not 'args'.
7969
0db8980c
SDJ
79702017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
7971 Pedro Alves <palves@redhat.com>
7972
7973 PR gdb/16188
7974 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
7975 calls succeeded.
7976 * fork-child.c (trace_start_error): New function.
7977 (trace_start_error_with_name): Likewise.
7978 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
7979 * inf-ptrace.c (inf_ptrace_me): Likewise.
7980 * inferior.h (trace_start_error): New prototype.
7981 (trace_start_error_with_name): Likewise.
7982
99e8a4f9
SDJ
79832017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
7984
7985 PR gdb/21164
7986 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
7987 NULL before using it.
7988 * symmisc.c (maintenance_print_symbols): Likewise.
7989 (maintenance_print_msymbols): Likewise.
7990
4e746bb6
TW
79912017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7992
7993 * NEWS: Add record Python bindings entry.
7994
79952017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7996
7997 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
7998 py-record-full.o.
7999 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
8000 * python/py-record-btrace.c, python/py-record-btrace.h,
8001 python/py-record-full.c, python/py-record-full.h: New file.
8002 * python/py-record.c: Add include for py-record-btrace.h and
8003 py-record-full.h.
8004 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
8005 recpy_instruction_history, recpy_function_call_history, recpy_begin,
8006 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
8007 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
8008 New definition.
8009 (gdbpy_initialize_btrace): New export.
8010 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
8011
80122017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8013
8014 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
8015 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
8016 * python/py-record.c: New file.
8017 * python/python-internal.h (gdbpy_start_recording,
8018 gdbpy_current_recording, gdpy_stop_recording,
8019 gdbpy_initialize_record): New export.
8020 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
8021 (python_GdbMethods): Add gdbpy_start_recording,
8022 gdbpy_current_recording and gdbpy_stop_recording.
8023
80242017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8025
8026 * record-btrace.c (record_btrace_record_method): New function.
8027 (init_record_btrace_ops): Initialize to_record_method.
8028 * record-full.c (record_full_record_method): New function.
8029 (init_record_full_ops, init_record_full_core_ops): Add
8030 record_full_record_method.
8031 * record.h (enum record_method): New enum.
8032 * target-debug.h (target_debug_print_enum_record_method: New define.
8033 * target-delegates.c: Regenerate.
8034 * target.c (target_record_method): New function.
8035 * target.h: Include record.h.
8036 (struct target_ops) <to_record_method>: New field.
8037 (target_record_method): New export.
8038
80392017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8040
8041 * record.h (record_start, record_stop): New export.
8042 * record.c (record_start, record_stop): New function.
8043
80442017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8045
8046 * btrace.c (btrace_fetch): Copy function call segments pointer
8047 into a vector.
8048 (btrace_clear): Clear the vector.
8049 (btrace_find_insn_by_number): Use binary search to find the correct
8050 function call segment.
8051 * btrace.h (brace_fun_p): New typedef.
8052 (struct btrace_thread_info) <functions>: New field.
8053
80542017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8055
8056 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
8057 * btrace.c (btrace_decode_error): ... here. New function.
8058 * btrace.h (btrace_decode_error): New export.
8059
80602017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
8061
8062 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
8063 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
8064 btrace_find_insn_by_number): Remove special case for gaps.
8065 * btrace.h (btrace_insn_get_error): New export.
8066 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
8067 * record-btrace.c (btrace_insn_history): Print number for gaps.
8068 (record_btrace_info, record_btrace_goto): Handle gaps.
8069
3f77c769
TT
80702017-02-14 Tom Tromey <tom@tromey.com>
8071
8072 PR python/13598:
8073 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
8074 event.
8075 * python/py-evts.c (gdbpy_initialize_py_events): Add
8076 before_prompt registry.
8077 * python/py-events.h (events_object) <before_prompt>: New field.
8078
4c2c7ac6
MM
80792017-02-14 Markus Metzger <markus.t.metzger@intel.com>
8080
8081 * btrace.c (ftrace_new_switch): Preserve up link and flags.
8082
5cf30ebf
LM
80832017-02-13 Luis Machado <lgustavo@codesourcery.com>
8084
8085 * symfile (_initialize_symfile): Add usage text to the load command's
8086 help text.
8087
26a06916
SM
80882017-02-10 Simon Marchi <simon.marchi@ericsson.com>
8089
8090 * utils.c (defaulted_query): Don't query on secondary UIs.
8091
0b145e37
TT
80922017-02-10 Tom Tromey <tom@tromey.com>
8093
8094 * rust-lang.c (rust_get_disr_info): Remove unused variable.
8095
2d8365c4
TT
80962017-02-10 Tom Tromey <tom@tromey.com>
8097
8098 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
8099 "cleanup" local.
8100 * python/py-type.c (typy_legacy_template_argument): Remove
8101 unnecessary "cleanup" local.
8102
2bb8f231
TT
81032017-02-10 Tom Tromey <tom@tromey.com>
8104
8105 * python/python.c (do_start_initialization): New function, from
8106 _initialize_python.
8107 (_initialize_python): Call do_start_initialization.
8108 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
8109 goto.
8110
1bdfaf42
TT
81112017-02-10 Tom Tromey <tom@tromey.com>
8112
8113 * python/py-prettyprint.c (pretty_print_one_value): Use
8114 gdbpy_ref.
8115
88b6faea
TT
81162017-02-10 Tom Tromey <tom@tromey.com>
8117
8118 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
8119 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
8120 gdbpy_ref.
8121 * python/py-type.c (field_new): Use gdbpy_ref.
8122 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
8123 gdbpy_ref.
8124 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
8125 (py_free_pspace): Likewise.
8126 (pspace_to_pspace_object): Likewise.
8127 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
8128 (py_free_objfile): Likewise.
8129 (objfile_to_objfile_object): Likewise.
8130 * python/py-inferior.c (delete_thread_object): Use
8131 gdbpy_ref.
8132 (infpy_read_memory): Likewise.
8133 (py_free_inferior): Likewise.
8134 * python/py-evtregistry.c (create_eventregistry_object): Use
8135 gdbpy_ref.
8136 * python/py-event.c (create_event_object): Use gdbpy_ref.
8137
7780f186
TT
81382017-02-10 Tom Tromey <tom@tromey.com>
8139
8140 * python/py-ref.h (gdbpy_ref_policy): Now a template.
8141 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
8142 used.
8143 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
8144 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
8145 python/py-exitedevent.c, python/py-finishbreakpoint.c,
8146 python/py-framefilter.c, python/py-function.c,
8147 python/py-inferior.c, python/py-infevents.c,
8148 python/py-linetable.c, python/py-newobjfileevent.c,
8149 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
8150 python/py-signalevent.c, python/py-stopevent.c,
8151 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
8152 python/py-unwind.c, python/py-utils.c, python/py-value.c,
8153 python/py-varobj.c, python/py-xmethods.c, python/python.c,
8154 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
8155
d4b0bb18
TT
81562017-02-10 Tom Tromey <tom@tromey.com>
8157
8158 * ui-out.h (ui_out_emit_type): New class.
8159 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
8160 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
8161 and ui_out_emit_tuple.
8162 (enumerate_locals): Likewise.
8163 (py_mi_print_variables, py_print_locals, py_print_args): Use
8164 ui_out_emit_list.
8165 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
8166 ui_out_emit_list.
8167 * common/gdb_optional.h: New file.
8168
f67f945c
MG
81692017-02-10 Martin Galvan <martingalvan@sourceware.org>
8170
8171 * MAINTAINERS (Write After Approval): Update my e-mail address.
8172
18da0c51
MG
81732017-02-10 Martin Galvan <martingalvan@sourceware.org>
8174
8175 PR gdb/21122
8176 * breakpoint.c (_initialize_breakpoint): Update the help description
8177 of the 'commands' command to indicate that it takes a list argument.
8178
62c14536
SM
81792017-02-09 Simon Marchi <simon.marchi@ericsson.com>
8180
8181 * interps.c (current_interp_set_logging): Remove "return".
8182
ff6fa247
GB
81832017-02-09 Gary Benson <gbenson@redhat.com>
8184
8185 * symtab.c (add_symtab_completions): Prevent NULL pointer
8186 dereference.
8187
a474bd8e
PA
81882017-02-08 Pedro Alves <palves@redhat.com>
8189
8190 * interps.c (interp::interp): Remove reference to quiet_p.
8191 (interp_set): Make static. Remove dead "Switching to" output
8192 code.
8193 (interp_quiet_p, interp_set_quiet): Delete.
8194 (interpreter_exec_cmd): Don't set the interpreter quiet.
8195 * interps.h (interp_quiet_p): Make static.
8196 (class interp) <quiet_p>: Remove field
8197
3d7b173c
JG
81982017-02-08 Jerome Guitton <guitton@adacore.com>
8199
604c4576
JG
8200 * cli/cli-decode.c (find_command_name_length): Make it extern.
8201 * cli/cli-decode.h (find_command_name_length): Declare.
8202 * cli/cli-script.c (command_name_equals, line_first_arg):
8203 New functions.
8204 (process_next_line): Use cli-decode to parse command names.
8205 (build_command_line): Make args a constant pointer.
8206
82072017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 8208
3d7b173c
JG
8209 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
8210 Remove case-insensitive search.
8211
1291063d
JM
82122017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
8213
8214 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
8215 at the end of the line. Avoids an ARI warning.
8216
20b477a7
LM
82172017-02-06 Luis Machado <lgustavo@codesourcery.com>
8218
8219 * NEWS: Mention support for record/replay of Intel 64 rdrand and
8220 rdseed instructions.
8221 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
8222
3f7b46f2
IR
82232017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
8224
8225 PR tdep/20936
8226 Provide and use sparc32 and sparc64 target description XML files.
8227 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
8228 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
8229 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
8230 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
8231 * features/sparc/sparc32-solaris.xml: New file.
8232 * features/sparc/sparc64-solaris.xml: New file.
8233 * features/sparc/sparc32-solaris.c: Generated.
8234 * features/sparc/sparc64-solaris.c: Generated.
8235 * sparc-tdep.h: Account for differences in target descriptions.
8236 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
8237 (sparc32_register_type): Use target provided registers.
8238 (validate_tdesc_registers): New function.
8239 (sparc32_gdbarch_init): Use tdesc_has_registers.
8240 Set pseudoregister functions.
8241 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
8242 (sparc64_register_type): Use target provided registers.
8243 (sparc64_init_abi): Set pseudoregister functions.
8244
f0fd41c1
TT
82452017-02-03 Tom Tromey <tom@tromey.com>
8246
8247 PR rust/21097:
8248 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
8249 with a single member.
8250
d6f9b0fb
PA
82512017-02-03 Pedro Alves <palves@redhat.com>
8252
8253 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
8254 (cli_interp_base::~cli_interp_base): New.
8255 (cli_interp): New struct.
8256 (as_cli_interp): Cast the interp itself to cli_interp.
8257 (cli_interpreter_pre_command_loop): Rename to ...
8258 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
8259 parameter.
8260 (cli_interpreter_init): Rename to ...
8261 (cli_interp::init): ... this. Remove 'self' parameter. Use
8262 boolean. Make extern.
8263 (cli_interpreter_resume): Rename to ...
8264 (cli_interp::resume): ... this. Remove 'data' parameter. Make
8265 extern.
8266 (cli_interpreter_suspend): Rename to ...
8267 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
8268 extern.
8269 (cli_interpreter_exec): Rename to ...
8270 (cli_interp::exec): ... this. Remove 'data' parameter. Make
8271 extern.
8272 (cli_interpreter_supports_command_editing): Rename to ...
8273 (cli_interp_base::supports_command_editing): ... this. Remove
8274 'interp' parameter. Make extern.
8275 (cli_ui_out): Rename to ...
8276 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
8277 Make extern.
8278 (cli_set_logging): Rename to ...
8279 (cli_interp_base::set_logging): ... this. Remove 'interp'
8280 parameter. Make extern.
8281 (cli_interp_procs): Delete.
8282 (cli_interp_factory): Adjust to use "new".
8283 * cli/cli-interp.h: Include "interps.h".
8284 (struct cli_interp_base): New struct.
8285 * interps.c (struct interp): Delete. Fields moved to interps.h.
8286 (interp_new): Delete.
8287 (interp::interp, interp::~interp): New.
8288 (interp_set): Use bool, and return void. Assume the interpreter
8289 has suspend, init and resume methods, and that the all return
8290 void.
8291 (set_top_level_interpreter): interp_set returns void.
8292 (interp_ui_out): Adapt.
8293 (current_interp_set_logging): Adapt.
8294 (interp_data): Delete.
8295 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
8296 (interp_exec): Adapt.
8297 (top_level_interpreter_data): Delete.
8298 * interps.h (interp_init_ftype, interp_resume_ftype)
8299 (interp_suspend_ftype, interp_exec_ftype)
8300 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
8301 (class interp): New.
8302 (interp_new): Delete.
8303 (interp_set): Now returns void. Use bool.
8304 (interp_data, top_level_interpreter_data): Delete.
8305 * mi/mi-common.h: Include interps.h.
8306 (class mi_interp): Inherit from interp. Define a ctor. Declare
8307 init, resume, suspect, exec, interp_ui_out, set_logging and
8308 pre_command_loop methods.
8309 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
8310 (mi_interpreter_init): Rename to ...
8311 (mi_interp::init): ... this. Remove the 'interp' parameter, use
8312 bool, return void and make extern. Adjust.
8313 (mi_interpreter_resume): ... Rename to ...
8314 (mi_interp::resume): ... this. Remove the 'data' parameter,
8315 return void and make extern. Adjust.
8316 (mi_interpreter_suspend): ... Rename to ...
8317 (mi_interp::suspend): ... this. Remove the 'data' parameter,
8318 return void and make extern. Adjust.
8319 (mi_interpreter_exec): ... Rename to ...
8320 (mi_interp::exec): ... this. Remove the 'data' parameter and make
8321 extern. Adjust.
8322 (mi_interpreter_pre_command_loop): ... Rename to ...
8323 (mi_interp::pre_command_loop): ... this. Remove the 'self'
8324 parameter and make extern.
8325 (mi_on_normal_stop_1): Adjust.
8326 (mi_ui_out): Rename to ...
8327 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
8328 parameter and make extern. Adjust.
8329 (mi_set_logging): Rename to ...
8330 (mi_interp::set_logging): ... this. Remove the 'interp'
8331 parameter and make extern. Adjust.
8332 (mi_interp_procs): Delete.
8333 (mi_interp_factory): Adjust to use 'new'.
8334 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
8335 (mi_print_exception, mi_execute_command, mi_load_progress):
8336 Adjust.
8337 * tui/tui-interp.c (tui_interp): New class.
8338 (as_tui_interp): Return a tui_interp pointer.
8339 (tui_on_normal_stop, tui_on_signal_received)
8340 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
8341 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
8342 to use interp::interp_ui_out.
8343 (tui_init): Rename to ...
8344 (tui_interp::init): ... this. Remove the 'self' parameter, use
8345 bool, return void and make extern. Adjust.
8346 (tui_resume): Rename to ...
8347 (tui_interp::resume): ... this. Remove the 'data' parameter,
8348 return void and make extern. Adjust.
8349 (tui_suspend): Rename to ...
8350 (tui_interp::suspend): ... this. Remove the 'data' parameter,
8351 return void and make extern. Adjust.
8352 (tui_ui_out): Rename to ...
8353 (tui_interp::interp_ui_out): ... this. Remove the 'self'
8354 parameter, and make extern. Adjust.
8355 (tui_exec): Rename to ...
8356 (tui_interp::exec): ... this. Remove the 'data' parameter and
8357 make extern.
8358 (tui_interp_procs): Delete.
8359 (tui_interp_factory): Use "new".
8360
65c40c95
TT
83612017-02-02 Tom Tromey <tom@tromey.com>
8362
8363 * rust-exp.y (ends_raw_string, space_then_number)
8364 (rust_identifier_start_p): Return bool.
8365 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
8366 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
8367 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
8368 (rust_chartype_p): Return bool.
8369 (val_print_struct, rust_print_struct_def, rust_print_type):
8370 Update.
8371 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
8372 Return bool.
8373
b50f188d
TT
83742017-02-02 Tom Tromey <tom@tromey.com>
8375
8376 * rust-lang.c: Reindent.
8377
03c85b11
TT
83782017-02-02 Tom Tromey <tom@tromey.com>
8379
8380 * rust-lang.h (rust_crate_for_block): Update.
8381 * rust-lang.c (rust_crate_for_block): Return std::string.
8382 (rust_get_disr_info): Use std:;string, not
8383 gdb::unique_xmalloc_ptr.
8384 * rust-exp.y (crate_name): Update.
8385
9b6da501
PA
83862017-02-02 Pedro Alves <palves@redhat.com>
8387
8388 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
8389 field out of gdb_disassembler_test and make it static.
8390
ec4cb20b
PA
83912017-02-02 Pedro Alves <palves@redhat.com>
8392
8393 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
8394 mi1_interp and mi_interp fields.
8395
5be5dbf0
PA
83962017-02-02 Pedro Alves <palves@redhat.com>
8397
616268b6
PA
8398 * cli/cli-interp.c (struct saved_output_files, saved_output):
8399 Moved from cli/cli-logging.c.
8400 (cli_set_logging): New function.
8401 (cli_interp_procs): Install cli_set_logging.
8402 * cli/cli-interp.h (make_logging_output, cli_set_logging):
8403 Declare.
8404 * cli/cli-logging.c (struct saved_output_files, saved_output):
8405 Moved to cli/cli-interp.c.
8406 (pop_output_files): Don't save outputs here.
8407 (make_logging_output): New function.
8408 (handle_redirections): Don't build tee nor save previous outputs
8409 here.
8410 * interps.c (current_interp_set_logging): Change prototype.
8411 Assume there's always a set_logging_proc method installed.
8412 * interps.h (interp_set_logging_ftype): Change prototype.
8413 (current_interp_set_logging): Change prototype and adjust comment.
8414 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
8415 use make_logging_output.
8416 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
84172017-02-02 Pedro Alves <palves@redhat.com>
8418
5be5dbf0
PA
8419 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
8420 from ...
8421 (set_logging_overwrite): ... here.
8422 (logging_no_redirect_file): Delete.
8423 (set_logging_redirect): Don't handle redirection on the fly.
8424 Instead warn that "logging off" / "logging on" is necessary.
8425 (pop_output_files): Delete references to logging_no_redirect_file.
8426 (show_logging_command): Always speak in terms of what will happen
8427 once logging is reenabled.
8428
c99cc448
PA
84292017-02-02 Pedro Alves <palves@redhat.com>
8430
8431 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
8432
8b172ce7
PA
84332017-02-02 Pedro Alves <palves@redhat.com>
8434
8435 * disasm.c (gdb_pretty_print_insn): Rename to ...
8436 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
8437 Remove gdbarch parameter. Adapt to clear the object's buffers
8438 instead of allocating new buffers, and to print using the object's
8439 gdb_disassembler instead of calling gdb_print_insn.
8440 (dump_insns): Use gdb_pretty_print_disassembler.
8441 * disasm.h (gdb_pretty_print_insn): Delete declaration.
8442 (gdb_pretty_print_disassembler): New class.
8443 * record-btrace.c (btrace_insn_history): Use
8444 gdb_pretty_print_disassembler.
8445
d7e74731
PA
84462017-02-02 Pedro Alves <palves@redhat.com>
8447
8448 * ada-lang.c (type_as_string): Use string_file.
8449 * ada-valprint.c (ada_print_floating): Use string_file.
8450 * ada-varobj.c (ada_varobj_scalar_image)
8451 (ada_varobj_get_value_image): Use string_file.
8452 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
8453 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
8454 * breakpoint.c (update_inserted_breakpoint_locations)
8455 (insert_breakpoint_locations, reattach_breakpoints)
8456 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
8457 (print_it_watchpoint): Use string_file.
8458 (save_breakpoints): Use stdio_file.
8459 * c-exp.y (oper): Use string_file.
8460 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
8461 tee_file.
8462 (pop_output_files): Use delete.
8463 (handle_redirections): Use stdio_file and tee_file.
8464 * cli/cli-setshow.c (do_show_command): Use string_file.
8465 * compile/compile-c-support.c (c_compute_program): Use
8466 string_file.
8467 * compile/compile-c-symbols.c (generate_vla_size): Take a
8468 'string_file &' instead of a 'ui_file *'.
8469 (generate_c_for_for_one_variable): Take a 'string_file &' instead
8470 of a 'ui_file *'. Use string_file.
8471 (generate_c_for_variable_locations): Take a 'string_file &'
8472 instead of a 'ui_file *'.
8473 * compile/compile-internal.h (generate_c_for_for_one_variable):
8474 Take a 'string_file &' instead of a 'ui_file *'.
8475 * compile/compile-loc2c.c (push, pushf, unary, binary)
8476 (print_label, pushf_register_address, pushf_register)
8477 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
8478 'ui_file *'. Adjust.
8479 * compile/compile.c (compile_to_object): Use string_file.
8480 * compile/compile.h (compile_dwarf_expr_to_c)
8481 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
8482 'ui_file *'.
8483 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
8484 (replace_typedefs_qualified_name): Use string_file and
8485 obstack_copy0.
8486 * disasm.c (gdb_pretty_print_insn): Use string_file.
8487 (gdb_disassembly): Adjust reference the null_stream global.
8488 (do_ui_file_delete): Delete.
8489 (gdb_insn_length): Use null_stream.
8490 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
8491 * dwarf2loc.c (dwarf2_compile_property_to_c)
8492 (locexpr_generate_c_location, loclist_generate_c_location): Take a
8493 'string_file &' instead of a 'ui_file *'.
8494 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
8495 * dwarf2read.c (do_ui_file_peek_last): Delete.
8496 (dwarf2_compute_name): Use string_file.
8497 * event-top.c (gdb_setup_readline): Use stdio_file.
8498 * gdbarch.sh (verify_gdbarch): Use string_file.
8499 * gdbtypes.c (safe_parse_type): Use null_stream.
8500 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
8501 string_file.
8502 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
8503 'string_file *' instead of a 'ui_file *'.
8504 (gdbscm_arch_disassemble): Use string_file.
8505 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
8506 * guile/scm-ports.c (class ioscm_file_port): Now a class that
8507 inherits from ui_file.
8508 (ioscm_file_port_delete, ioscm_file_port_rewind)
8509 (ioscm_file_port_put): Delete.
8510 (ioscm_file_port_write): Rename to ...
8511 (ioscm_file_port::write): ... this. Remove file_port_magic
8512 checks.
8513 (ioscm_file_port_new): Delete.
8514 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
8515 ui_file_up.
8516 * guile/scm-type.c (tyscm_type_name): Use string_file.
8517 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
8518 Use string_file.
8519 * infcmd.c (print_return_value_1): Use string_file.
8520 * infrun.c (print_target_wait_results): Use string_file.
8521 * language.c (add_language): Use string_file.
8522 * location.c (explicit_to_string_internal): Use string_file.
8523 * main.c (captured_main_1): Use null_file.
8524 * maint.c (maintenance_print_architecture): Use stdio_file.
8525 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
8526 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
8527 event_channel>: Change type to mi_console_file pointer.
8528 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
8529 (mi_console_file_delete): Delete.
8530 (struct mi_console_file): Delete.
8531 (mi_console_file_magic): Delete.
8532 (mi_console_file_new): Delete.
8533 (mi_console_file::mi_console_file): New.
8534 (mi_console_file_delete): Delete.
8535 (mi_console_file_fputs): Delete.
8536 (mi_console_file::write): New.
8537 (mi_console_raw_packet): Delete.
8538 (mi_console_file::flush): New.
8539 (mi_console_file_flush): Delete.
8540 (mi_console_set_raw): Rename to ...
8541 (mi_console_file::set_raw): ... this.
8542 * mi/mi-console.h (class mi_console_file): New class.
8543 (mi_console_file_new, mi_console_set_raw): Delete.
8544 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
8545 (mi_set_logging): Use delete and tee_file. Adjust.
8546 * mi/mi-main.c (output_register): Use string_file.
8547 (mi_cmd_data_evaluate_expression): Use string_file.
8548 (mi_cmd_data_read_memory): Use string_file.
8549 (mi_cmd_execute, print_variable_or_computed): Use string_file.
8550 * mi/mi-out.c (mi_ui_out::main_stream): New.
8551 (mi_ui_out::rewind): Use main_stream and
8552 string_file.
8553 (mi_ui_out::put): Use main_stream and string_file.
8554 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8555 Allocate a 'string_file' instead.
8556 (mi_out_new): Don't allocate a mem_fileopen stream here.
8557 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8558 (mi_ui_out::main_stream): Declare method.
8559 * printcmd.c (eval_command): Use string_file.
8560 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
8561 * python/py-arch.c (archpy_disassemble): Use string_file.
8562 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
8563 * python/py-frame.c (frapy_str): Use string_file.
8564 * python/py-framefilter.c (py_print_type, py_print_single_arg):
8565 Use string_file.
8566 * python/py-type.c (typy_str): Use string_file.
8567 * python/py-unwind.c (unwind_infopy_str): Use string_file.
8568 * python/py-value.c (valpy_str): Use string_file.
8569 * record-btrace.c (btrace_insn_history): Use string_file.
8570 * regcache.c (regcache_print): Use stdio_file.
8571 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
8572 * remote.c (escape_buffer): Use string_file.
8573 * rust-lang.c (rust_get_disr_info): Use string_file.
8574 * serial.c (serial_open_ops_1): Use stdio_file.
8575 (do_serial_close): Use delete.
8576 * stack.c (print_frame_arg): Use string_file.
8577 (print_frame_args): Remove local mem_fileopen stream, not used.
8578 (print_frame): Use string_file.
8579 * symmisc.c (maintenance_print_symbols): Use stdio_file.
8580 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
8581 Take a 'string_file *' instead of a 'ui_file *'.
8582 * top.c (new_ui): Use stdio_file and stderr_file.
8583 (free_ui): Use delete.
8584 (execute_command_to_string): Use string_file.
8585 (quit_confirm): Use string_file.
8586 * tracepoint.c (collection_list::append_exp): Use string_file.
8587 * tui/tui-disasm.c (tui_disassemble): Use string_file.
8588 * tui/tui-file.c: Don't include "ui-file.h".
8589 (enum streamtype, struct tui_stream): Delete.
8590 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
8591 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
8592 (tui_file::tui_file): New method.
8593 (tui_file_fputs): Delete.
8594 (tui_file_get_strbuf): Delete.
8595 (tui_file::puts): New method.
8596 (tui_file_adjust_strbuf): Delete.
8597 (tui_file_flush): Delete.
8598 (tui_file::flush): New method.
8599 * tui/tui-file.h: Tweak intro comment.
8600 Include ui-file.h.
8601 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
8602 (tui_file_adjust_strbuf): Delete declarations.
8603 (class tui_file): New class.
8604 * tui/tui-io.c (tui_initialize_io): Use tui_file.
8605 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
8606 (tui_register_format): Use string_stream.
8607 * tui/tui-stack.c (tui_make_status_line): Use string_file.
8608 (tui_get_function_from_frame): Use string_file.
8609 * typeprint.c (type_to_string): Use string_file.
8610 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
8611 (null_stream): New global.
8612 (ui_file_delete): Delete.
8613 (ui_file::ui_file): New.
8614 (null_file_isatty): Delete.
8615 (ui_file::~ui_file): New.
8616 (null_file_rewind): Delete.
8617 (ui_file::printf): New.
8618 (null_file_put): Delete.
8619 (null_file_flush): Delete.
8620 (ui_file::putstr): New.
8621 (null_file_write): Delete.
8622 (ui_file::putstrn): New.
8623 (null_file_read): Delete.
8624 (ui_file::putc): New.
8625 (null_file_fputs): Delete.
8626 (null_file_write_async_safe): Delete.
8627 (ui_file::vprintf): New.
8628 (null_file_delete): Delete.
8629 (null_file::write): New.
8630 (null_file_fseek): Delete.
8631 (null_file::puts): New.
8632 (ui_file_data): Delete.
8633 (null_file::write_async_safe): New.
8634 (gdb_flush, ui_file_isatty): Adjust.
8635 (ui_file_put, ui_file_rewind): Delete.
8636 (ui_file_write): Adjust.
8637 (ui_file_write_for_put): Delete.
8638 (ui_file_write_async_safe, ui_file_read): Adjust.
8639 (ui_file_fseek): Delete.
8640 (fputs_unfiltered): Adjust.
8641 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
8642 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
8643 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
8644 (set_ui_file_data): Delete.
8645 (string_file::~string_file, string_file::write)
8646 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
8647 (do_ui_file_as_string, ui_file_as_string): Delete.
8648 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
8649 (struct mem_file): Delete.
8650 (mem_file_new): Delete.
8651 (stdio_file::stdio_file): New.
8652 (mem_file_delete): Delete.
8653 (stdio_file::stdio_file): New.
8654 (mem_fileopen): Delete.
8655 (stdio_file::~stdio_file): New.
8656 (mem_file_rewind): Delete.
8657 (stdio_file::set_stream): New.
8658 (mem_file_put): Delete.
8659 (stdio_file::open): New.
8660 (mem_file_write): Delete.
8661 (stdio_file_magic, struct stdio_file): Delete.
8662 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
8663 (stdio_file::flush): New.
8664 (stdio_file_read): Rename to ...
8665 (stdio_file::read): ... this. Adjust.
8666 (stdio_file_write): Rename to ...
8667 (stdio_file::write): ... this. Adjust.
8668 (stdio_file_write_async_safe): Rename to ...
8669 (stdio_file::write_async_safe) ... this. Adjust.
8670 (stdio_file_fputs): Rename to ...
8671 (stdio_file::puts) ... this. Adjust.
8672 (stdio_file_isatty): Delete.
8673 (stdio_file_fseek): Delete.
8674 (stdio_file::isatty): New.
8675 (stderr_file_write): Rename to ...
8676 (stderr_file::write) ... this. Adjust.
8677 (stderr_file_fputs): Rename to ...
8678 (stderr_file::puts) ... this. Adjust.
8679 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
8680 (stderr_file::stderr_file): New.
8681 (tee_file_magic): Delete.
8682 (struct tee_file): Delete.
8683 (tee_file::tee_file): New.
8684 (tee_file_new): Delete.
8685 (tee_file::~tee_file): New.
8686 (tee_file_delete): Delete.
8687 (tee_file_flush): Rename to ...
8688 (tee_file::flush): ... this. Adjust.
8689 (tee_file_write): Rename to ...
8690 (tee_file::write): ... this. Adjust.
8691 (tee_file::write_async_safe): New.
8692 (tee_file_fputs): Rename to ...
8693 (tee_file::puts): ... this. Adjust.
8694 (tee_file_isatty): Rename to ...
8695 (tee_file::isatty): ... this. Adjust.
8696 * ui-file.h (struct obstack, struct ui_file): Don't
8697 forward-declare.
8698 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
8699 (ui_file_write_ftype)
8700 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
8701 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
8702 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
8703 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
8704 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
8705 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
8706 (set_ui_file_fseek): Delete.
8707 (ui_file_data, ui_file_delete, ui_file_rewind)
8708 (struct ui_file): New.
8709 (ui_file_up): New.
8710 (class null_file): New.
8711 (null_stream): Declare.
8712 (ui_file_write_for_put, ui_file_put): Delete.
8713 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
8714 Delete.
8715 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
8716 (gdb_fopen, tee_file_new): Delete.
8717 (struct string_file): New.
8718 (struct stdio_file): New.
8719 (stdio_file_up): New.
8720 (struct stderr_file): New.
8721 (class tee_file): New.
8722 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
8723 of a 'ui_file *'. Adjust.
8724 * ui-out.h (class ui_out) <field_stream>: Likewise.
8725 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
8726 (null_stream): Delete.
8727 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
8728 Adjust.
8729 * utils.h (struct ui_file): Delete forward declaration..
8730 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
8731 (error_stream): Take a 'string_file &' instead of a
8732 'ui_file *'.
8733 * varobj.c (varobj_value_get_print_value): Use string_file.
8734 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
8735 * gdbarch.c: Regenerate.
8736
187808b0
PA
87372017-02-02 Pedro Alves <palves@redhat.com>
8738
8739 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
8740 (gdb_pretty_print_insn): ... this. Now a free function. Add back
8741 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
8742 Adjust to call gdb_print_insn instead of
8743 gdb_disassembler::print_insn.
8744 (dump_insns, do_mixed_source_and_assembly_deprecated)
8745 (do_mixed_source_and_assembly, do_assembly_only): Add back a
8746 'gdbarch' parameter. Remove gdb_disassembler parameter.
8747 (gdb_disassembly): Don't allocate a gdb_disassembler here.
8748 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
8749 declaration.
8750 (gdb_pretty_print_insn): Re-add declaration.
8751 * record-btrace.c (btrace_insn_history): Don't allocate a
8752 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
8753
7a8eb317
SM
87542017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
8755
8756 * disasm.h (gdb_disassembly): Remove file_string parameter.
8757 * disasm.c (gdb_disassembly): Likewise.
8758 * cli/cli-cmds.c (print_disassembly): Adapt.
8759 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
8760 * stack.c (do_gdb_disassembly): Likewise.
8761
7346ef59
AA
87622017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
8763
8764 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
8765 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
8766 targets. And if the implicit value is longer than needed, extract
8767 the first bytes instead of the "least significant" ones.
8768
cd4007e4
MM
87692017-02-01 Markus Metzger <markus.t.metzger@intel.com>
8770
8771 * btrace.c (btrace_enable): Do not call btrace_add_pc for
8772 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
8773 (btrace_fetch): Assert can_access_registers_ptid.
8774 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
8775 validate_registers_access.
8776
cf77c34e
MM
87772017-02-01 Markus Metzger <markus.t.metzger@intel.com>
8778
8779 * gdbthread.h (can_access_registers_ptid): New.
8780 * thread.c (can_access_registers_ptid): New.
8781
be85ce7d
PA
87822017-02-01 Pedro Alves <palves@redhat.com>
8783
8784 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
8785
29b0b251
PA
87862017-01-31 Pedro Alves <palves@redhat.com>
8787
8788 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
8789 Fix typos.
8790
289b5b24
PA
87912017-01-31 Pedro Alves <palves@redhat.com>
8792
8793 * stack.c (print_frame_args): Remove local mem_fileopen stream,
8794 not used.
8795
b47413b4
PA
87962017-01-31 Pedro Alves <palves@redhat.com>
8797
8798 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
8799
60adb36c
PA
88002017-01-31 Pedro Alves <palves@redhat.com>
8801
8802 * common/scoped_restore.h
8803 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
8804 change the value's parameter type to T2.
8805 (make_scoped_restore): Likewise.
8806
2735833d
WT
88072017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8808 Richard Henderson <rth@redhat.com>
8809
8810 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
8811 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
8812 GS_BASE for older kernels.
8813 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
8814 GS_BASE for older kernels.
8815 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
8816 and GS_BASE to the offset table.
8817 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
8818 system register group.
8819 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
8820 for older kernels.
8821 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
8822 amd64 ABI.
8823 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
8824 AMD64_GSBASE_REGNUM.
8825 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
8826 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
8827 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
8828 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
8829 i386/64bit-segments.xml in those rules.
8830 * features/i386/64bit-segments.xml: New file.
8831 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
8832 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
8833 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
8834 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
8835 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
8836 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
8837 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
8838 * features/i386/amd64-avx-linux.c: Regenerated.
8839 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
8840 * features/i386/amd64-avx-mpx.c: Regenerated.
8841 * features/i386/amd64-avx512-linux.c: Regenerated.
8842 * features/i386/amd64-linux.c: Regenerated.
8843 * features/i386/amd64-mpx-linux.c: Regenerated.
8844 * features/i386/i386-avx-mpx-linux.c: Regenerated.
8845 * features/i386/i386-avx-mpx.c: Regenerated.
8846 * features/i386/x32-avx-linux.c: Regenerated.
8847 * features/i386/x32-avx512-linux.c: Regenerated.
8848 * regformats/i386/amd64-avx-linux.dat: Regenerated.
8849 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
8850 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
8851 * regformats/i386/amd64-linux.dat: Regenerated.
8852 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
8853 * regformats/i386/x32-avx-linux.dat: Regenerated.
8854 * regformats/i386/x32-avx512-linux.dat: Regenerated.
8855 * regformats/i386/x32-linux.dat: Regenerated.
8856
8884e97e
WT
88572017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8858
8859 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
8860 Set to AMD64_NUM_REGS.
8861
7005d26a
WT
88622017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8863
8864 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
8865 that checks validity of a register number.
8866
4bd2e1b2
KC
88672017-01-27 Kees Cook <keescook@google.com>
8868
8869 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
8870 fetch_fpregs if target has fpa registers.
8871 (arm_linux_store_inferior_registers): Call store_fpregs if target
8872 has fpa registers.
8873
7cf1de6c
AA
88742017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
8875
8876 * cris-tdep.c (cris_gdbarch_init): Remove check for
8877 info.byte_order and force it to BFD_ENDIAN_LITTLE.
8878
874a1c8c
AT
88792017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
8880
8881 * corelow.c (get_core_register_section): Check for regset
8882 existence before checking for REGSET_VARIABLE_SIZE.
8883
d8b49cf0
YQ
88842017-01-26 Yao Qi <yao.qi@linaro.org>
8885 Pedro Alves <palves@redhat.com>
8886
8887 PR gdb/20939
8888 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
8889 call memory_error, save memaddr instead.
8890 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
8891 negative, cal memory_error.
8892 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
8893
658ca58c
YQ
88942017-01-26 Yao Qi <yao.qi@linaro.org>
8895
8896 * disasm-selftests.c (memory_error_test): New function.
8897 (_initialize_disasm_selftests): Register memory_error_test.
8898
79843d45
YQ
88992017-01-26 Yao Qi <yao.qi@linaro.org>
8900
8901 * Makefile.in (SFILES): Add disasm-selftests.c and
8902 selftest-arch.c.
8903 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
8904 * disasm-selftests.c: New file.
8905 * selftest-arch.c: New file.
8906 * selftest-arch.h: New file.
8907
8cafda32
YQ
89082017-01-26 Yao Qi <yao.qi@linaro.org>
8909
8910 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
8911 to bfd_arch_mep. Don't return 0 if section is not
8912 found. Call print_insn_mep.
8913
e47ad6c0
YQ
89142017-01-26 Pedro Alves <palves@redhat.com>
8915 Yao Qi <yao.qi@linaro.org>
8916
8917 * arm-tdep.c: Include "disasm.h".
8918 (gdb_print_insn_arm): Update code to get gdbarch.
8919 * disasm.c (dis_asm_read_memory): Change it to
8920 gdb_disassembler::dis_asm_read_memory.
8921 (dis_asm_memory_error): Likewise.
8922 (dis_asm_print_address): Likewise.
8923 (gdb_pretty_print_insn): Change it to
8924 gdb_disassembler::pretty_print_insn.
8925 (dump_insns): Add one argument gdb_disassemlber. All
8926 callers updated.
8927 (do_mixed_source_and_assembly_deprecated): Likewise.
8928 (do_mixed_source_and_assembly): Likewise.
8929 (do_assembly_only): Likewise.
8930 (gdb_disassembler::gdb_disassembler): New.
8931 (gdb_disassembler::print_insn): New.
8932 * disasm.h (class gdb_disassembler): New.
8933 (gdb_pretty_print_insn): Remove declaration.
8934 (gdb_disassemble_info): Likewise.
8935 * guile/scm-disasm.c (class gdbscm_disassembler): New.
8936 (gdbscm_disasm_read_memory_worker): Update.
8937 (gdbscm_disasm_read_memory): Update.
8938 (gdbscm_disasm_memory_error): Remove.
8939 (gdbscm_disasm_print_address): Remove.
8940 (gdbscm_disassembler::gdbscm_disassembler): New.
8941 (gdbscm_print_insn_from_port): Update.
8942 * mips-tdep.c: Include disasm.h.
8943 (gdb_print_insn_mips): Update code to get gdbarch.
8944 * record-btrace.c (btrace_insn_history): Update.
8945 * spu-tdep.c: Include disasm.h.
8946 (struct spu_dis_asm_data): Remove.
8947 (struct spu_dis_asm_info): New.
8948 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
8949 SPU id.
8950 (gdb_print_insn_spu): Cast disassemble_info to
8951 spu_dis_asm_info.
8952
80d75874
YQ
89532017-01-26 Yao Qi <yao.qi@linaro.org>
8954
8955 * disasm.c (do_ui_file_delete): Delete.
8956 (gdb_insn_length): Move code creating stream to ...
8957 * utils.c (null_stream): ... here. New function.
8958 * utils.h (null_stream): Declare.
8959
60685cd0
SM
89602017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
8961
8962 * python/py-inferior.c (find_thread_object): Return directly
8963 from the loop. Remove "found" variable.
8964
eb1cdb62
JB
89652017-01-21 Joel Brobecker <brobecker@adacore.com>
8966
8967 GDB 7.12.1 released.
8968
b1ce6568
SM
89692017-01-20 Simon Marchi <simon.marchi@ericsson.com>
8970
8971 * python/py-function.c (fnpy_call): Reorder declarations to have
8972 the gdbpy_enter object declared first.
8973 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
8974
6f8b0407
SM
89752017-01-20 Simon Marchi <simon.marchi@ericsson.com>
8976
fec93fb1 8977 PR python/21068
6f8b0407
SM
8978 * python/python-internal.h (PyMem_RawMalloc): Define for
8979 Python < 3.4.
8980 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
8981 PyMem_RawMalloc instead of PyMem_Malloc.
8982
78cbbba8
LM
89832017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
8984 Luis Machado <lgustavo@codesourcery.com>
8985
8986 * NEWS (New commands): Mention flash-erase.
8987 (New MI commands): Mention target-flash-erase.
8988 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
8989 command.
8990 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
8991 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
8992 * target.c (flash_erase_command): New function.
8993 (initialize_targets): Add new flash-erase command.
8994 * target.h (flash_erase_command): New declaration.
8995
2132fe85
JB
89962017-01-20 Joel Brobecker <brobecker@adacore.com>
8997
8998 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
8999 HAVE_SYS_PROCFS_H is defined.
9000
d1dff226
AH
90012017-01-18 Alan Hayward <alan.hayward@arm.com>
9002
9003 * remote.c (struct cached_reg): Change data into a pointer.
9004 * (stop_reply_dtr): Free data pointers before deleting vector.
9005 (process_stop_reply): Likewise.
9006 (remote_parse_stop_reply): Allocate space for data
9007
9890e433
AH
90082017-01-18 Alan Hayward <alan.hayward@arm.com>
9009
9010 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
9011 MAX_REGISTER_SIZE.
9012 (amd64_pseudo_register_read_value): Likewise.
9013 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
9014 (store_register_using_P): Likewise.
9015 * regcache.c (regcache_xfer_part): Likewise.
9016
7a36499a
IR
90172017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
9018
9019 Split real and pseudo registers.
9020 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
9021 (sparc32_pseudo_regnum): New enum.
9022 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
9023 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
9024 (SPARC32_CP0_REGISTERS): New macro.
9025 (sparc32_pseudo_register_name): New function.
9026 (sparc32_register_name): Use sparc32_pseudo_register_name.
9027 (sparc32_pseudo_register_type): New function.
9028 (sparc32_register_type): Use sparc32_pseudo_register_type.
9029 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
9030 pseudo register numbers.
9031 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
9032 (SPARC64_CP0_REGISTERS): New macro.
9033 (sparc64_pseudo_register_name): New function.
9034 (sparc64_register_name): Use sparc64_pseudo_register_name.
9035 (sparc64_pseudo_register_type): New function.
9036 (sparc64_register_type): Use sparc64_pseudo_register_type.
9037 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
9038 pseudo register numbers.
9039 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
9040 sparc64_store_arguments): Handle pseudo register numbers.
9041
6f8976bf
YQ
90422017-01-13 Yao Qi <yao.qi@linaro.org>
9043
9044 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
9045 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
9046 output.
9047 (getpkt_or_notif_sane_1): Likewise.
9048
e4241ace
YQ
90492017-01-13 Yao Qi <yao.qi@linaro.org>
9050
9051 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
9052 of CC. Pass "-x c++-header" instead of "-x c".
9053
3015c064
SM
90542017-01-12 Simon Marchi <simon.marchi@ericsson.com>
9055
9056 * remote.c (remote_can_async_p): Update comment.
9057
fde1b17d
SM
90582017-01-12 Simon Marchi <simon.marchi@ericsson.com>
9059
9060 * linux-nat.c (linux_nat_can_async_p): Update comment.
9061
ca1ca08b
SM
90622017-01-12 Simon Marchi <simon.marchi@ericsson.com>
9063
9064 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
9065
4ad2da73
SM
90662017-01-11 Simon Marchi <simon.marchi@ericsson.com>
9067
9068 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
9069
c8b23b3f
TT
90702017-01-10 Tom Tromey <tom@tromey.com>
9071
9072 * python/py-type.c (typy_legacy_template_argument): Update.
9073 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
9074 ~demangle_parse_info): Declare new members.
9075 (cp_demangled_name_to_comp): Return unique_ptr.
9076 (cp_demangled_name_parse_free)
9077 (make_cleanup_cp_demangled_name_parse_free)
9078 (cp_new_demangle_parse_info): Remove.
9079 * cp-support.c (do_demangled_name_parse_free_cleanup)
9080 (make_cleanup_cp_demangled_name_parse_free): Remove.
9081 (inspect_type, cp_canonicalize_string_full)
9082 (cp_canonicalize_string): Update.
9083 (mangled_name_to_comp): Change return type.
9084 (cp_class_name_from_physname, method_name_from_physname)
9085 (cp_func_name, cp_remove_params): Update.
9086 * cp-name-parser.y (demangle_parse_info): New constructor, from
9087 cp_new_demangle_parse_info.
9088 (~demangle_parse_info): New destructor, from
9089 cp_demangled_name_parse_free.
9090 (cp_merge_demangle_parse_infos): Update.
9091 (cp_demangled_name_to_comp): Change return type.
9092
1ac32117
TT
90932017-01-10 Tom Tromey <tom@tromey.com>
9094
9095 * top.c (prevent_dont_repeat): Change return type.
9096 * python/python.c (execute_gdb_command): Use std::string.
9097 Update.
9098 * guile/guile.c (gdbscm_execute_gdb_command): Update.
9099 * command.h (prevent_dont_repeat): Change return type.
9100 * breakpoint.c (bpstat_do_actions_1): Update.
9101
0cf08227
TT
91022017-01-10 Tom Tromey <tom@tromey.com>
9103
9104 * value.h (scoped_value_mark::~scoped_value_mark): Call
9105 free_to_mark.
9106 (scoped_value_mark::free_to_mark): New method.
9107 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
9108 scoped_value_mark.
9109
eb115069
TT
91102017-01-10 Tom Tromey <tom@tromey.com>
9111
9112 * python/py-value.c (valpy_dereference, valpy_referenced_value)
9113 (valpy_reference_value, valpy_const_value, valpy_get_address)
9114 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
9115 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
9116 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
9117 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
9118 scoped_value_mark.
9119 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
9120 * value.h (scoped_value_mark): New class.
9121
906768f9
TT
91222017-01-10 Tom Tromey <tom@tromey.com>
9123
9124 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
9125 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
9126 * psymtab.c (discard_psymtabs_upto): Remove.
9127 (make_cleanup_discard_psymtabs): Remove.
9128 (struct psymtab_state): Remove.
9129
bef155c3
TT
91302017-01-10 Tom Tromey <tom@tromey.com>
9131
9132 * record-full.c (record_full_save_cleanups): Remove.
9133 (record_full_save): Use gdb::unlinker.
9134 * gcore.c (do_bfd_delete_cleanup): Remove.
9135 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
9136 cleanups.
9137 * dwarf2read.c (unlink_if_set): Remove.
9138 (write_psymtabs_to_index): Use gdb::unlinker.
9139 * common/gdb_unlinker.h: New file.
9140
192b62ce
TT
91412017-01-10 Tom Tromey <tom@tromey.com>
9142
9143 * windows-tdep.c (windows_xfer_shared_library): Update.
9144 * windows-nat.c (windows_make_so): Update.
9145 * utils.h (make_cleanup_bfd_unref): Remove.
9146 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
9147 * symfile.h (symfile_bfd_open)
9148 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
9149 * symfile.c (read_symbols, symbol_file_add)
9150 (separate_debug_file_exists): Update.
9151 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
9152 (generic_load, reread_symbols): Update.
9153 * symfile-mem.c (symbol_file_add_from_memory): Update.
9154 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
9155 (spu_symbol_file_add_from_memory): Update.
9156 * solist.h (struct target_so_ops) <bfd_open>: Return
9157 gdb_bfd_ref_ptr.
9158 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
9159 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
9160 gdb_bfd_ref_ptr.
9161 (solib_map_sections, reload_shared_libraries_1): Update.
9162 * solib-svr4.c (enable_break): Update.
9163 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
9164 * solib-frv.c (enable_break2): Update.
9165 * solib-dsbt.c (enable_break): Update.
9166 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
9167 gdb_bfd_ref_ptr.
9168 (darwin_solib_get_all_image_info_addr_at_init): Update.
9169 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
9170 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
9171 * record-full.c (record_full_save): Update.
9172 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
9173 * procfs.c (insert_dbx_link_bpt_in_file): Update.
9174 * minidebug.c (find_separate_debug_file_in_section): Return
9175 gdb_bfd_ref_ptr.
9176 * machoread.c (macho_add_oso_symfile): Change abfd to
9177 gdb_bfd_ref_ptr.
9178 (macho_symfile_read_all_oso): Update.
9179 (macho_check_dsym): Return gdb_bfd_ref_ptr.
9180 (macho_symfile_read): Update.
9181 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
9182 (jit_bfd_try_read_symtab): Update.
9183 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9184 (gdb_bfd_openw, gdb_bfd_openr_iovec)
9185 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
9186 gdb_bfd_ref_ptr.
9187 (gdb_bfd_ref_policy): New struct.
9188 (gdb_bfd_ref_ptr): New typedef.
9189 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9190 (gdb_bfd_openw, gdb_bfd_openr_iovec)
9191 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
9192 gdb_bfd_ref_ptr.
9193 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
9194 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
9195 (gcore_command): Update.
9196 * exec.c (exec_file_attach): Update.
9197 * elfread.c (elf_symfile_read): Update.
9198 * dwarf2read.c (dwarf2_get_dwz_file): Update.
9199 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
9200 (open_and_init_dwo_file): Update.
9201 (open_dwp_file): Return gdb_bfd_ref_ptr.
9202 (open_and_init_dwp_file): Update.
9203 * corelow.c (core_open): Update.
9204 * compile/compile-object-load.c (compile_object_load): Update.
9205 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
9206 * coffread.c (coff_symfile_read): Update.
9207 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
9208 gdb_bfd_ref_ptr. Rename.
9209 (dump_bfd_file, restore_command): Update.
9210 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
9211 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
9212 (find_separate_debug_file_by_buildid): Update.
9213
50315b21
TT
92142017-01-10 Tom Tromey <tom@tromey.com>
9215
9216 * common/gdb_ref_ptr.h: New file.
9217 * python/py-ref.h (struct gdbpy_ref_policy): New.
9218 (gdbpy_ref): Now a typedef.
9219
fc4007c9
TT
92202017-01-10 Tom Tromey <tom@tromey.com>
9221
9222 * utils.h (make_cleanup_htab_delete): Don't declare.
9223 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
9224 Remove.
9225 * linespec.c (decode_compound_collector): Add constructor,
9226 destructor.
9227 (lookup_prefix_sym): Remove cleanup.
9228 (symtab_collector): Add constructor, destructor.
9229 (collect_symtabs_from_filename): Remove cleanup.
9230 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
9231 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
9232 Use htab_up.
9233 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
9234 * dwarf2read.c (dw2_expand_symtabs_matching)
9235 (dw2_map_symbol_filenames, dwarf_decode_macros)
9236 (write_psymtabs_to_index): Use htab_up.
9237 * dwarf2loc.c (func_verify_no_selftailcall)
9238 (call_site_find_chain_1, func_verify_no_selftailcall)
9239 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
9240 std::vector, gdb::unique_xmalloc_ptr.
9241 (call_sitep): Remove typedef.
9242 (dwarf2_locexpr_baton_eval): Remove unused variable.
9243
8dbcee67
TT
92442017-01-10 Tom Tromey <tom@tromey.com>
9245
9246 * python/python-internal.h (make_cleanup_py_decref)
9247 (make_cleanup_py_xdecref): Don't declare.
9248 * python/py-utils.c (py_decref, make_cleanup_py_decref)
9249 (py_xdecref, make_cleanup_py_xdecref): Remove.
9250
13df46cc
TT
92512017-01-10 Tom Tromey <tom@tromey.com>
9252
9253 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
9254 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
9255
06fc9bf7
TT
92562017-01-10 Tom Tromey <tom@tromey.com>
9257
9258 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
9259
830a4934
TT
92602017-01-10 Tom Tromey <tom@tromey.com>
9261
9262 * python/py-utils.c (unicode_to_encoded_string)
9263 (python_string_to_target_string)
9264 (python_string_to_target_python_string)
9265 (python_string_to_host_string, gdbpy_obj_to_string)
9266 (get_addr_from_python): Use gdbpy_ref.
9267
4586d543
TT
92682017-01-10 Tom Tromey <tom@tromey.com>
9269
9270 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
9271 gdbpy_ref.
9272
59876f8f
TT
92732017-01-10 Tom Tromey <tom@tromey.com>
9274
9275 * python/python.c (eval_python_command, gdbpy_decode_line)
9276 (gdbpy_run_events, gdbpy_start_type_printers)
9277 (gdbpy_apply_type_printers): Use gdbpy_ref.
9278
97d83487
TT
92792017-01-10 Tom Tromey <tom@tromey.com>
9280
9281 * python/py-param.c (get_doc_string, compute_enum_values): Use
9282 gdbpy_ref.
9283
9205649a
TT
92842017-01-10 Tom Tromey <tom@tromey.com>
9285
9286 * python/py-inferior.c (find_thread_object, build_inferior_list):
9287 Use gdbpy_ref.
9288
74c49d45
TT
92892017-01-10 Tom Tromey <tom@tromey.com>
9290
9291 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
9292
16361ffb
TT
92932017-01-10 Tom Tromey <tom@tromey.com>
9294
9295 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
9296 gdbpy_ref.
9297
905f2cca
TT
92982017-01-10 Tom Tromey <tom@tromey.com>
9299
9300 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
9301 extra incref.
9302 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
9303 Use gdbpy_ref.
9304
64081434
TT
93052017-01-10 Tom Tromey <tom@tromey.com>
9306
9307 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
9308 gdbpy_ref.
9309
59e9e831
TT
93102017-01-10 Tom Tromey <tom@tromey.com>
9311
9312 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
9313 decref results of PyArg_ParseTupleAndKeywords.
9314
9de10f6d
TT
93152017-01-10 Tom Tromey <tom@tromey.com>
9316
9317 * python/python.c (python_run_simple_file): Use
9318 unique_xmalloc_ptr, gdbpy_ref.
9319
2bd5759d
TT
93202017-01-10 Tom Tromey <tom@tromey.com>
9321
9322 * python/py-prettyprint.c (print_stack_unless_memory_error)
9323 (print_string_repr, print_children): Use gdbpy_ref.
9324 (dummy_python_frame): New class.
9325 (dummy_python_frame::dummy_python_frame): Rename from
9326 push_dummy_python_frame.
9327 (py_restore_tstate): Remove.
9328
3b4e0e01
TT
93292017-01-10 Tom Tromey <tom@tromey.com>
9330
9331 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
9332
17a22718
TT
93332017-01-10 Tom Tromey <tom@tromey.com>
9334
9335 * python/python.c (ensure_python_env, restore_python_env):
9336 Remove.
9337 * python/python-internal.h (ensure_python_env): Don't declare.
9338 * varobj.h (varobj_ensure_python_env): Don't declare.
9339 * varobj.c (varobj_ensure_python_env): Remove.
9340
68cdc557
TT
93412017-01-10 Tom Tromey <tom@tromey.com>
9342
9343 * varobj.c (varobj_value_get_print_value): Use
9344 gdbpy_enter_varobj.
9345
1eba6383
TT
93462017-01-10 Tom Tromey <tom@tromey.com>
9347
9348 * python/py-prettyprint.c (print_string_repr, print_children):
9349 Update.
9350 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
9351 of "encoding".
9352 * varobj.c (varobj_value_get_print_value): Update.
9353 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
9354
bde7b3e3
TT
93552017-01-10 Tom Tromey <tom@tromey.com>
9356
9357 * varobj.c (varobj_get_display_hint)
9358 (dynamic_varobj_has_child_method, install_new_value_visualizer)
9359 (varobj_set_visualizer, free_variable): Use
9360 gdbpy_enter_varobj.
9361
a7785f8c
TT
93622017-01-10 Tom Tromey <tom@tromey.com>
9363
9364 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
9365 (do_finish_initialization): New function. Use gdbpy_ref.
9366 (gdbpy_finish_initialization): Use gdbpy_enter. Call
9367 do_finish_initialization.
9368
2865bfce
TT
93692017-01-10 Tom Tromey <tom@tromey.com>
9370
9371 * python/py-param.c (get_set_value, get_show_value): Use
9372 gdbpy_enter, gdbpy_ref.
9373
0e9dcc75
TT
93742017-01-10 Tom Tromey <tom@tromey.com>
9375
9376 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
9377
12a5cedd
TT
93782017-01-10 Tom Tromey <tom@tromey.com>
9379
9380 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
9381
788f2586
TT
93822017-01-10 Tom Tromey <tom@tromey.com>
9383
9384 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
9385 Use gdbpy_enter_varobj.
9386
6cd67bea
TT
93872017-01-10 Tom Tromey <tom@tromey.com>
9388
9389 * varobj.c (gdbpy_enter_varobj): New constructor.
9390 * python/python-internal.h (gdbpy_enter_varobj): New class.
9391 * python/py-varobj.c (py_varobj_get_iterator): Use
9392 gdbpy_enter_varobj.
9393
14b122bf
TT
93942017-01-10 Tom Tromey <tom@tromey.com>
9395
9396 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
9397 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
9398 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
9399 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
9400 unique_xmalloc_ptr.
9401 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
9402
bf1ca3b9
TT
94032017-01-10 Tom Tromey <tom@tromey.com>
9404
9405 * python/py-xmethods.c (invoke_match_method): Use
9406 gdbpy_ref.
9407
572a5524
TT
94082017-01-10 Tom Tromey <tom@tromey.com>
9409
9410 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
9411 gdbpy_enter, gdbpy_ref.
9412
396a78b6
TT
94132017-01-10 Tom Tromey <tom@tromey.com>
9414
9415 * python/python.c (python_interactive_command): Use gdbpy_enter.
9416
a88b13c7
TT
94172017-01-10 Tom Tromey <tom@tromey.com>
9418
9419 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
9420 gdbpy_ref.
9421
e9f0c363
TT
94222017-01-10 Tom Tromey <tom@tromey.com>
9423
9424 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
9425 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
9426
6349f452
TT
94272017-01-10 Tom Tromey <tom@tromey.com>
9428
9429 * utils.h (htab_deleter): New struct.
9430 (htab_up): New typedef.
9431 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
9432 gdbpy_enter, gdbpy_ref, htab_up.
9433
c0171de6
TT
94342017-01-10 Tom Tromey <tom@tromey.com>
9435
9436 * python/py-unwind.c (pending_frame_invalidate): Remove.
9437 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
9438
f18e226f
TT
94392017-01-10 Tom Tromey <tom@tromey.com>
9440
9441 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
9442 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
9443
c57af3f1
TT
94442017-01-10 Tom Tromey <tom@tromey.com>
9445
9446 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
9447
60e600ec
TT
94482017-01-10 Tom Tromey <tom@tromey.com>
9449
9450 * python/python.c (gdbpy_eval_from_control_command)
9451 (gdbpy_source_script, gdbpy_run_events)
9452 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
9453 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
9454 gdbpy_enter.
9455
bf7da5b0
TT
94562017-01-10 Tom Tromey <tom@tromey.com>
9457
9458 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
9459
2d38bced
TT
94602017-01-10 Tom Tromey <tom@tromey.com>
9461
9462 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
9463
07bc7329
TT
94642017-01-10 Tom Tromey <tom@tromey.com>
9465
9466 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
9467 (python_on_inferior_call_pre, python_on_inferior_call_post)
9468 (python_on_memory_change, python_on_register_change)
9469 (python_inferior_exit, python_new_objfile, add_thread_object)
9470 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
9471
6e7c365e
TT
94722017-01-10 Tom Tromey <tom@tromey.com>
9473
9474 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
9475 (bpfinishpy_handle_exit): Use gdbpy_enter.
9476
6ba0cd40
TT
94772017-01-10 Tom Tromey <tom@tromey.com>
9478
9479 * python/py-cmd.c (cmdpy_destroyer)
9480 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
9481 gdbpy_enter.
9482
de2dc875
TT
94832017-01-10 Tom Tromey <tom@tromey.com>
9484
9485 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
9486 gdbpy_enter.
9487 (gdbpy_breakpoint_has_cond): Likewise.
9488
4ecee2c4
TT
94892017-01-10 Tom Tromey <tom@tromey.com>
9490
9491 * python/python.c (gdbpy_enter): New constructor.
9492 (~gdbpy_enter): New destructor.
9493 (restore_python_env, ensure_python_env): Rewrite.
9494 * python/python-internal.h (gdbpy_enter): New class.
9495
37fce74f
TT
94962017-01-10 Tom Tromey <tom@tromey.com>
9497
9498 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
9499
53a0cca3
TT
95002017-01-10 Tom Tromey <tom@tromey.com>
9501
9502 * python/py-value.c (value_has_field, get_field_flag)
9503 (get_field_type, valpy_getitem, convert_value_from_python): Use
9504 gdbpy_ref.
9505
ff3724f5
TT
95062017-01-10 Tom Tromey <tom@tromey.com>
9507
9508 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
9509 gdbpy_ref.
9510
0700aea5
TT
95112017-01-10 Tom Tromey <tom@tromey.com>
9512
9513 * python/py-prettyprint.c (search_pp_list)
9514 (find_pretty_printer_from_objfiles)
9515 (find_pretty_printer_from_progspace)
9516 (find_pretty_printer_from_gdb, find_pretty_printer)
9517 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
9518 gdbpy_ref.
9519
1bb44c9f
TT
95202017-01-10 Tom Tromey <tom@tromey.com>
9521
9522 * python/py-param.c (call_doc_function): Use gdbpy_ref.
9523
87ce03fd
TT
95242017-01-10 Tom Tromey <tom@tromey.com>
9525
9526 * python/py-linetable.c (build_line_table_tuple_from_pcs)
9527 (ltpy_get_all_source_lines): Use gdbpy_ref.
9528
ee0a3fb8
TT
95292017-01-10 Tom Tromey <tom@tromey.com>
9530
9531 * python/py-framefilter.c (extract_sym, extract_value)
9532 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
9533 gdbpy_ref.
9534
bf2a52fa
TT
95352017-01-10 Tom Tromey <tom@tromey.com>
9536
9537 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
9538
f59fe7f8
TT
95392017-01-10 Tom Tromey <tom@tromey.com>
9540
9541 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
9542
80bd970a
TT
95432017-01-10 Tom Tromey <tom@tromey.com>
9544
9545 * python/py-function.c (convert_values_to_python, fnpy_init): Use
9546 gdbpy_ref.
9547
d1b3de2e
TT
95482017-01-10 Tom Tromey <tom@tromey.com>
9549
9550 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
9551
3bb43384
TT
95522017-01-10 Tom Tromey <tom@tromey.com>
9553
9554 * python/py-type.c (convert_field, make_fielditem, typy_fields)
9555 (typy_range): Use gdbpy_ref.
9556
abf5651e
TT
95572017-01-10 Tom Tromey <tom@tromey.com>
9558
9559 * python/py-threadevent.c (create_thread_event_object): Use
9560 gdbpy_ref.
9561 * python/py-stopevent.c (create_stop_event_object): Simplify.
9562 (emit_stop_event): Use gdbpy_ref.
9563 * python/py-signalevent.c (create_signal_event_object): Use
9564 gdbpy_ref.
9565 * python/py-newobjfileevent.c (create_new_objfile_event_object)
9566 (emit_new_objfile_event, create_clear_objfiles_event_object)
9567 (emit_clear_objfiles_event): Use gdbpy_ref.
9568 * python/py-infevents.c (create_inferior_call_event_object)
9569 (create_register_changed_event_object)
9570 (create_memory_changed_event_object, emit_inferior_call_event)
9571 (emit_memory_changed_event, emit_register_changed_event): Use
9572 gdbpy_ref.
9573 * python/py-exitedevent.c (create_exited_event_object)
9574 (emit_exited_event): Use gdbpy_ref.
9575 * python/py-event.h (evpy_emit_event): Remove
9576 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
9577 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
9578 * python/py-continueevent.c (emit_continue_event): Use
9579 gdbpy_ref.
9580 * python/py-breakpoint.c (gdbpy_breakpoint_created)
9581 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
9582 gdbpy_ref.
9583 * python/py-bpevent.c (create_breakpoint_event_object): Use
9584 gdbpy_ref.
9585
a68ff33e
TT
95862017-01-10 Tom Tromey <tom@tromey.com>
9587
9588 * python/py-ref.h: New file.
9589
7becfd03
SM
95902017-01-10 Simon Marchi <simon.marchi@ericsson.com>
9591
9592 * cli-out.c (cli_ui_out::do_redirect): Change return type to
9593 void.
9594 * cli-out.h (cli_ui_out::do_redirect): Likewise.
9595 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
9596 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
9597 * ui-out.c (ui_out::redirect): Likewise.
9598 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
9599 * cli/cli-logging.c (set_logging_redirect): Update call site of
9600 ui_out::redirect.
9601 (handle_redirections): Likewise.
9602 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
9603 * top.c (execute_command_to_string): Likewise.
9604 * utils.c (do_ui_out_redirect_pop): Likewise.
9605
df294654
SM
96062017-01-10 Simon Marchi <simon.marchi@ericsson.com>
9607
9608 * stack.c (_initialize_stack): Update "frame" command help message.
9609
f5e6296e
IB
96102017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
9611
9612 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
9613
0e2d6fa6
YQ
96142017-01-06 Yao Qi <yao.qi@linaro.org>
9615
9616 * x86-linux-nat.h: Include gdb_proc_service.h.
9617
44d6d3f9
YQ
96182017-01-06 Yao Qi <yao.qi@linaro.org>
9619
9620 * ser-base.h: Include serial.h.
9621
656731fe
YQ
96222017-01-06 Yao Qi <yao.qi@linaro.org>
9623
9624 * ppc-linux-tdep.h: Include ppc-tdep.h.
9625
1ca8f924
YQ
96262017-01-06 Yao Qi <yao.qi@linaro.org>
9627
9628 * nat/amd64-linux-siginfo.h: Include signal.h.
9629
bc3008c4
YQ
96302017-01-06 Yao Qi <yao.qi@linaro.org>
9631
9632 * nat/aarch64-linux-hw-point.h: Include break-common.h.
9633
66c80d03
YQ
96342017-01-06 Yao Qi <yao.qi@linaro.org>
9635
9636 * mi/mi-parse.h: Include mi-cmds.h.
9637
051d2dda
YQ
96382017-01-06 Yao Qi <yao.qi@linaro.org>
9639
9640 * inf-loop.c: Don't include "target.h".
9641 * inf-loop.h: Include it here.
9642
8018d34f
YQ
96432017-01-06 Yao Qi <yao.qi@linaro.org>
9644
9645 * dfp.h: Include "dboulest.h" and "expression.h".
9646
c0b8369c
YQ
96472017-01-06 Yao Qi <yao.qi@linaro.org>
9648
9649 * ax-gdb.h: Include "ax.h".
9650
ad5cba2a
YQ
96512017-01-06 Yao Qi <yao.qi@linaro.org>
9652
9653 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
9654 with nat/gdb_ptrace.h.
9655
1c33cd7f
YQ
96562017-01-05 Yao Qi <yao.qi@linaro.org>
9657
9658 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
9659 new line.
9660 (mips64_fbsd_sigframe_init): Likewise.
9661
c988ac1d
JB
96622017-01-04 John Baldwin <jhb@FreeBSD.org>
9663
9664 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
9665 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
9666
b268007c
JB
96672017-01-04 John Baldwin <jhb@FreeBSD.org>
9668
9669 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
9670 * NEWS: Mention new FreeBSD/mips native configuration.
9671 * config/mips/fbsd.mh: New file.
9672 * configure.host: Add mips*-*-freebsd*.
9673 * mips-fbsd-nat.c: New file.
9674
387360da
JB
96752017-01-04 John Baldwin <jhb@FreeBSD.org>
9676
9677 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
9678 (ALLDEPFILES): Add mips-fbsd-tdep.c.
9679 * NEWS: Mention new FreeBSD/mips target.
9680 * configure.tgt: Add mips*-*-freebsd*.
9681 * mips-fbsd-tdep.c: New file.
9682 * mips-fbsd-tdep.h: New file.
9683
2aaaf250
YQ
96842017-01-04 Yao Qi <yao.qi@linaro.org>
9685
9686 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
9687 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
9688
61baf725
JB
96892017-01-01 Joel Brobecker <brobecker@adacore.com>
9690
6dbb839a 9691 Update copyright year range in all GDB files.
61baf725 9692
c113e7ff 96932017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 9694
c113e7ff 9695 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 9696
c113e7ff 9697For older changes see ChangeLog-2016.
c906108c
SS
9698\f
9699Local Variables:
9700mode: change-log
9701left-margin: 8
9702fill-column: 74
9703version-control: never
57da7796 9704coding: utf-8
c906108c 9705End:
This page took 2.439551 seconds and 4 git commands to generate.