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