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