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