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