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